diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-01-14 12:25:45 -0800 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-01-14 12:25:45 -0800 |
commit | 468386d67d902722562e9a0412a76fca79ec4fa2 (patch) | |
tree | 4d80db2eecf632fdf018d0eed8810c356a5b8ae7 /backends | |
parent | d21262ee0439df761b054d46752c2c3d52e6f373 (diff) | |
download | yosys-468386d67d902722562e9a0412a76fca79ec4fa2.tar.gz yosys-468386d67d902722562e9a0412a76fca79ec4fa2.tar.bz2 yosys-468386d67d902722562e9a0412a76fca79ec4fa2.zip |
abc9_ops: -prep_holes -> -prep_xaiger, move padding to write_xaiger
Diffstat (limited to 'backends')
-rw-r--r-- | backends/aiger/xaiger.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/backends/aiger/xaiger.cc b/backends/aiger/xaiger.cc index 822ba4dec..2d908e33b 100644 --- a/backends/aiger/xaiger.cc +++ b/backends/aiger/xaiger.cc @@ -329,12 +329,11 @@ struct XAigerWriter } } - // Fully pad all unused input connections of this box cell with S0 - // Fully pad all undriven output connections of this box cell with anonymous wires for (auto port_name : r.first->second) { auto w = box_module->wire(port_name); log_assert(w); - auto rhs = cell->getPort(port_name); + auto rhs = cell->connections_.at(port_name, SigSpec()); + rhs.append(Const(State::Sx, GetSize(w)-GetSize(rhs))); if (w->port_input) for (auto b : rhs) { SigBit I = sigmap(b); @@ -429,6 +428,10 @@ struct XAigerWriter for (auto &bit : ci_bits) { aig_m++, aig_i++; + // 1'bx may exist here due to a box output + // that has been padded to its full width + if (bit == State::Sx) + continue; log_assert(!aig_map.count(bit)); aig_map[bit] = 2*aig_m; } |