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
1 changed files with 2 additions and 1 deletions

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());