1
0
mirror of synced 2026-04-30 13:42:32 +00:00

write_xaiger: sort holes by offset as well as port_id

This commit is contained in:
Eddie Hung
2020-01-11 11:49:57 -08:00
parent 45d9caf3f9
commit 1ccee4b95e

View File

@@ -474,7 +474,8 @@ struct XAigerWriter
if (holes_mode) {
struct sort_by_port_id {
bool operator()(const RTLIL::SigBit& a, const RTLIL::SigBit& b) const {
return a.wire->port_id < b.wire->port_id;
return a.wire->port_id < b.wire->port_id ||
(a.wire->port_id == b.wire->port_id && a.offset < b.offset);
}
};
input_bits.sort(sort_by_port_id());