diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-06-20 10:47:20 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-06-20 17:38:04 -0700 |
commit | 4e5836a5fb009751a6f3bd7ec3eba20e223861f1 (patch) | |
tree | b787aaa71ed59eaddd6d18c92f1fdb4419fd3566 /backends/aiger/xaiger.cc | |
parent | 3f34779d64bbaee7210b567d4ad9ced456f0e159 (diff) | |
download | yosys-4e5836a5fb009751a6f3bd7ec3eba20e223861f1.tar.gz yosys-4e5836a5fb009751a6f3bd7ec3eba20e223861f1.tar.bz2 yosys-4e5836a5fb009751a6f3bd7ec3eba20e223861f1.zip |
Handle COs driven by 1'bx
Diffstat (limited to 'backends/aiger/xaiger.cc')
-rw-r--r-- | backends/aiger/xaiger.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/backends/aiger/xaiger.cc b/backends/aiger/xaiger.cc index 12b23cfe9..42f54209b 100644 --- a/backends/aiger/xaiger.cc +++ b/backends/aiger/xaiger.cc @@ -355,10 +355,16 @@ struct XAigerWriter } int offset = 0; - for (const auto &b : rhs.bits()) { + for (auto b : rhs.bits()) { SigBit I = sigmap(b); - if (I != b) - alias_map[b] = I; + if (b == RTLIL::Sx) + b = RTLIL::S0; + else if (I != b) { + if (I == RTLIL::Sx) + alias_map[b] = RTLIL::S0; + else + alias_map[b] = I; + } co_bits.emplace_back(b, cell, port_name, offset++, 0); unused_bits.erase(b); } |