From: Eddie Hung Date: Sat, 11 Jan 2020 19:49:57 +0000 (-0800) Subject: write_xaiger: sort holes by offset as well as port_id X-Git-Tag: working-ls180~873^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ccee4b95e1e7a2edf55c989d6acc7d6f63762ba;p=yosys.git write_xaiger: sort holes by offset as well as port_id --- diff --git a/backends/aiger/xaiger.cc b/backends/aiger/xaiger.cc index b6a7dbac2..7ee5058ae 100644 --- a/backends/aiger/xaiger.cc +++ b/backends/aiger/xaiger.cc @@ -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());