3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-10 08:03:26 +00:00

functional.cc: Reverse port iteration

This commit is contained in:
Krystine Sherwin 2025-05-21 16:21:27 +12:00
parent 3001473ae5
commit 847558547b
No known key found for this signature in database

View file

@ -518,8 +518,8 @@ public:
if (cell->type.in(ID($assert), ID($assume), ID($live), ID($fair), ID($cover), ID($check)))
queue.emplace_back(cell);
}
for (auto port : module->ports) {
auto *wire = module->wire(port);
for (auto riter = module->ports.rbegin(); riter != module->ports.rend(); ++riter) {
auto *wire = module->wire(*riter);
if (wire && wire->port_input) {
factory.add_input(wire->name, ID($input), Sort(wire->width));
}