mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 22:23:23 +00:00
write_verilog: write module ports in order
This commit is contained in:
parent
6900818105
commit
45452c18b2
1 changed files with 3 additions and 1 deletions
|
@ -2356,7 +2356,9 @@ 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())
|
||||
std::vector<Wire*> wires = module->wires();
|
||||
std::sort(wires.begin(), wires.end(), [](Wire *a, Wire *b) { return a->port_id < b->port_id; });
|
||||
for (auto w : wires)
|
||||
dump_wire(f, indent + " ", w);
|
||||
|
||||
for (auto &mem : Mem::get_all_memories(module))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue