xaiger: remove some unnecessary operations ...

... since they can not be triggered by (* keep *) anymore
(but could still be triggered by (* abc9_scc *) !?!)
This commit is contained in:
Eddie Hung 2020-03-06 10:51:47 -08:00
parent 80dcc8a0d1
commit 3be7784d0e
1 changed files with 2 additions and 9 deletions

View File

@ -224,8 +224,6 @@ struct XAigerWriter
alias_map[Q] = D; alias_map[Q] = D;
auto r YS_ATTRIBUTE(unused) = ff_bits.insert(std::make_pair(D, cell)); auto r YS_ATTRIBUTE(unused) = ff_bits.insert(std::make_pair(D, cell));
log_assert(r.second); log_assert(r.second);
if (input_bits.erase(Q))
log_assert(Q.wire->attributes.count(ID::keep));
continue; continue;
} }
@ -379,11 +377,6 @@ struct XAigerWriter
alias_map[O] = b; alias_map[O] = b;
ci_bits.emplace_back(b); ci_bits.emplace_back(b);
undriven_bits.erase(O); undriven_bits.erase(O);
// If PI and CI, then must be a (* keep *) wire
if (input_bits.erase(O)) {
log_assert(output_bits.count(O));
log_assert(O.wire->get_bool_attribute(ID::keep));
}
} }
} }
@ -468,8 +461,8 @@ struct XAigerWriter
for (const auto &bit : output_bits) { for (const auto &bit : output_bits) {
ordered_outputs[bit] = aig_o++; ordered_outputs[bit] = aig_o++;
int aig; int aig;
// Unlike bit2aig() which checks aig_map first, for // Unlike bit2aig() which checks aig_map first for
// inout/keep bits, since aig_map will point to // inout/scc bits, since aig_map will point to
// the PI, first attempt to find the NOT/AND driver // the PI, first attempt to find the NOT/AND driver
// before resorting to an aig_map lookup (which // before resorting to an aig_map lookup (which
// could be another PO) // could be another PO)