Skip to content

Commit 8475585

Browse files
functional.cc: Reverse port iteration
1 parent 3001473 commit 8475585

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/functional.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,8 @@ class FunctionalIRConstruction {
518518
if (cell->type.in(ID($assert), ID($assume), ID($live), ID($fair), ID($cover), ID($check)))
519519
queue.emplace_back(cell);
520520
}
521-
for (auto port : module->ports) {
522-
auto *wire = module->wire(port);
521+
for (auto riter = module->ports.rbegin(); riter != module->ports.rend(); ++riter) {
522+
auto *wire = module->wire(*riter);
523523
if (wire && wire->port_input) {
524524
factory.add_input(wire->name, ID($input), Sort(wire->width));
525525
}

0 commit comments

Comments
 (0)