abc_flop to also get topologically sorted

This commit is contained in:
Eddie Hung 2019-07-10 20:26:09 -07:00
parent 9f608d6be3
commit 375fcbe511
1 changed files with 10 additions and 11 deletions

View File

@ -312,19 +312,18 @@ struct XAigerWriter
undriven_bits.erase(O);
ff_bits.emplace_back(q);
}
else {
for (const auto &conn : cell->connections()) {
if (cell->input(conn.first)) {
// Ignore inout for the sake of topographical ordering
if (cell->output(conn.first)) continue;
for (auto bit : sigmap(conn.second))
bit_users[bit].insert(cell->name);
}
if (cell->output(conn.first))
for (auto bit : sigmap(conn.second))
bit_drivers[bit].insert(cell->name);
for (const auto &conn : cell->connections()) {
if (cell->input(conn.first)) {
// Ignore inout for the sake of topographical ordering
if (cell->output(conn.first)) continue;
for (auto bit : sigmap(conn.second))
bit_users[bit].insert(cell->name);
}
if (cell->output(conn.first))
for (auto bit : sigmap(conn.second))
bit_drivers[bit].insert(cell->name);
}
}
else {