3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-17 16:52:16 +00:00

Merge pull request #5270 from zhanghongce/main

Reorder the port wire declarations to follow the same order of the port declarations
This commit is contained in:
Jannis Harder 2025-08-11 15:35:25 +02:00 committed by GitHub
commit 2d90e80b52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2374,8 +2374,16 @@ void dump_module(std::ostream &f, std::string indent, RTLIL::Module *module)
f << indent + " " << "reg " << id(initial_id) << " = 0;\n";
}
for (auto w : module->wires())
// first dump input / output according to their order in module->ports
for (auto port : module->ports)
dump_wire(f, indent + " ", module->wire(port));
for (auto w : module->wires()) {
// avoid duplication
if (w->port_id)
continue;
dump_wire(f, indent + " ", w);
}
for (auto &mem : Mem::get_all_memories(module))
dump_memory(f, indent + " ", mem);