3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 14:13:23 +00:00

aiger.cc: Explicit unsorted-pool-as-LIFO

This commit is contained in:
Krystine Sherwin 2025-05-31 09:55:00 +12:00
parent 0072a267cc
commit aac562d36a
No known key found for this signature in database

View file

@ -153,6 +153,9 @@ struct AigerWriter
sigmap.add(wire);
// handle ports
// provided the input_bits and output_bits don't get sorted they
// will be returned in reverse order, so add them in reverse to
// match
for (auto riter = module->ports.rbegin(); riter != module->ports.rend(); ++riter) {
auto *wire = module->wire(*riter);
for (int i = 0; i < GetSize(wire); i++)
@ -353,6 +356,7 @@ struct AigerWriter
}
init_map.sort();
// we are relying here on unsorted pools iterating last-in-first-out
if (!no_sort) {
input_bits.sort();
output_bits.sort();