3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-14 18:06:16 +00:00

Handle COs driven by 1'bx

This commit is contained in:
Eddie Hung 2019-06-20 10:47:20 -07:00
parent 3f34779d64
commit 4e5836a5fb

View file

@ -355,10 +355,16 @@ struct XAigerWriter
} }
int offset = 0; int offset = 0;
for (const auto &b : rhs.bits()) { for (auto b : rhs.bits()) {
SigBit I = sigmap(b); SigBit I = sigmap(b);
if (I != b) if (b == RTLIL::Sx)
alias_map[b] = I; 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); co_bits.emplace_back(b, cell, port_name, offset++, 0);
unused_bits.erase(b); unused_bits.erase(b);
} }