Revert "Be mindful that sigmap(wire) could have dupes when checking \init"

This reverts commit f46ac1df9f.
This commit is contained in:
Eddie Hung 2019-10-08 12:41:24 -07:00
parent cfc181cba9
commit ea54b5ea61
1 changed files with 1 additions and 4 deletions

View File

@ -265,18 +265,15 @@ struct SatHelper
RTLIL::SigSpec rhs = it.second->attributes.at("\\init"); RTLIL::SigSpec rhs = it.second->attributes.at("\\init");
log_assert(lhs.size() == rhs.size()); log_assert(lhs.size() == rhs.size());
dict<RTLIL::SigBit,SigBit> seen_init;
RTLIL::SigSpec removed_bits; RTLIL::SigSpec removed_bits;
for (int i = 0; i < lhs.size(); i++) { for (int i = 0; i < lhs.size(); i++) {
RTLIL::SigSpec bit = lhs.extract(i, 1); RTLIL::SigSpec bit = lhs.extract(i, 1);
if (rhs[i] == State::Sx || !satgen.initial_state.check_all(bit) || seen_init.at(bit, rhs[i]) != rhs[i]) { if (rhs[i] == State::Sx || !satgen.initial_state.check_all(bit)) {
removed_bits.append(bit); removed_bits.append(bit);
lhs.remove(i, 1); lhs.remove(i, 1);
rhs.remove(i, 1); rhs.remove(i, 1);
i--; i--;
} }
else
seen_init[bit] = rhs[i];
} }
if (removed_bits.size()) if (removed_bits.size())