projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45d9caf
)
write_xaiger: sort holes by offset as well as port_id
author
Eddie Hung
<eddie@fpgeh.com>
Sat, 11 Jan 2020 19:49:57 +0000
(11:49 -0800)
committer
Eddie Hung
<eddie@fpgeh.com>
Sat, 11 Jan 2020 19:49:57 +0000
(11:49 -0800)
backends/aiger/xaiger.cc
patch
|
blob
|
history
diff --git
a/backends/aiger/xaiger.cc
b/backends/aiger/xaiger.cc
index b6a7dbac2c8d562987a5d5fb70901d6a6b1ecba2..7ee5058aeaa3a3efbf405d079496f58c5993adca 100644
(file)
--- 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());