3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

In sat: 'x' in init attr should not override constant

This commit is contained in:
Eddie Hung 2019-08-22 16:42:19 -07:00
parent 66607845ec
commit 2b37a093e9
3 changed files with 7 additions and 1 deletions

View file

@ -268,6 +268,8 @@ struct SatHelper
RTLIL::SigSpec removed_bits;
for (int i = 0; i < lhs.size(); i++) {
RTLIL::SigSpec bit = lhs.extract(i, 1);
if (bit.is_fully_const() && rhs[i] == State::Sx)
rhs[i] = bit;
if (!satgen.initial_state.check_all(bit)) {
removed_bits.append(bit);
lhs.remove(i, 1);