Small improvement

This commit is contained in:
Eddie Hung 2019-05-28 11:29:59 -07:00
parent 5f39c262c2
commit 13e233217c
1 changed files with 2 additions and 4 deletions

View File

@ -328,6 +328,7 @@ struct XAigerWriter
if (I != b) if (I != b)
alias_map[b] = I; 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);
} }
} }
if (w->port_output) { if (w->port_output) {
@ -347,6 +348,7 @@ struct XAigerWriter
for (const auto &b : rhs.bits()) { for (const auto &b : rhs.bits()) {
SigBit O = sigmap(b); SigBit O = sigmap(b);
ci_bits.emplace_back(O, cell, port_name, offset++); ci_bits.emplace_back(O, cell, port_name, offset++);
undriven_bits.erase(O);
} }
} }
} }
@ -383,10 +385,6 @@ struct XAigerWriter
} }
} }
// Do some CI/CO post-processing:
// CIs cannot be undriven
for (const auto &c : ci_bits)
undriven_bits.erase(std::get<0>(c));
// Erase all POs that are undriven // Erase all POs that are undriven
if (!holes_mode) if (!holes_mode)
for (auto bit : undriven_bits) for (auto bit : undriven_bits)