mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-13 17:36:16 +00:00
Cope with inout ports
This commit is contained in:
parent
437fec0d88
commit
1ec5f18346
1 changed files with 15 additions and 1 deletions
|
@ -197,9 +197,12 @@ struct XAigerWriter
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cell->input(conn.first))
|
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))
|
for (auto bit : sigmap(conn.second))
|
||||||
bit_users[bit].insert(cell->name);
|
bit_users[bit].insert(cell->name);
|
||||||
|
}
|
||||||
|
|
||||||
if (cell->output(conn.first))
|
if (cell->output(conn.first))
|
||||||
for (auto bit : sigmap(conn.second))
|
for (auto bit : sigmap(conn.second))
|
||||||
|
@ -287,7 +290,18 @@ struct XAigerWriter
|
||||||
for (auto user_cell : it.second)
|
for (auto user_cell : it.second)
|
||||||
toposort.edge(driver_cell, user_cell);
|
toposort.edge(driver_cell, user_cell);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
toposort.analyze_loops = true;
|
||||||
|
#endif
|
||||||
toposort.sort();
|
toposort.sort();
|
||||||
|
#ifndef NDEBUG
|
||||||
|
for (auto &it : toposort.loops) {
|
||||||
|
log(" loop");
|
||||||
|
for (auto cell : it)
|
||||||
|
log(" %s", log_id(cell));
|
||||||
|
log("\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
log_assert(!toposort.found_loops);
|
log_assert(!toposort.found_loops);
|
||||||
|
|
||||||
for (auto cell_name : toposort.sorted) {
|
for (auto cell_name : toposort.sorted) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue