if (bit.wire == nullptr) {
if (wire->port_output) {
aig_map[wirebit] = (bit == State::S1) ? 1 : 0;
- //output_bits.insert(wirebit);
+ output_bits.insert(wirebit);
}
continue;
}
if (wire->port_output) {
if (bit != wirebit)
alias_map[wirebit] = bit;
- //output_bits.insert(wirebit);
+ output_bits.insert(wirebit);
}
}
}
{
SigBit A = sigmap(cell->getPort("\\A").as_bit());
SigBit Y = sigmap(cell->getPort("\\Y").as_bit());
- if (Y.wire->port_output)
- output_bits.insert(Y);
unused_bits.erase(A);
undriven_bits.erase(Y);
not_map[Y] = A;
SigBit A = sigmap(cell->getPort("\\A").as_bit());
SigBit B = sigmap(cell->getPort("\\B").as_bit());
SigBit Y = sigmap(cell->getPort("\\Y").as_bit());
- if (Y.wire->port_output)
- output_bits.insert(Y);
unused_bits.erase(A);
unused_bits.erase(B);
undriven_bits.erase(Y);
}
// Do some CI/CO post-processing:
- // Erase all COs that are undriven
- for (auto bit : undriven_bits)
+ // Erase all POs and COs that are undriven
+ for (auto bit : undriven_bits) {
co_bits.erase(bit);
+ output_bits.erase(bit);
+ }
// Erase all CIs that are also COs or POs
for (auto bit : co_bits)
ci_bits.erase(bit);