mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 09:05:32 +00:00
Fix translation bug: The old code really checks for the presense of a node, not an edge in glift and flatten.
Add back statement that inserts nodes in order in opt_expr.cc.
This commit is contained in:
parent
fd7bd420b3
commit
0a37c2a301
4 changed files with 4 additions and 9 deletions
|
@ -582,7 +582,7 @@ struct GliftPass : public Pass {
|
|||
for (auto cell : module->selected_cells()) {
|
||||
RTLIL::Module *tpl = design->module(cell->type);
|
||||
if (tpl != nullptr) {
|
||||
if (!topo_modules.has_edges(tpl))
|
||||
if (!topo_modules.has_node(tpl))
|
||||
worklist.push_back(tpl);
|
||||
topo_modules.edge(tpl, module);
|
||||
non_top_modules.insert(cell->type);
|
||||
|
|
|
@ -424,6 +424,7 @@ void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bool cons
|
|||
for (auto &bit : sig)
|
||||
outbit_to_cell[bit].insert(cell);
|
||||
}
|
||||
cells.node(cell);
|
||||
}
|
||||
|
||||
// Build the graph for the topological sort.
|
||||
|
|
|
@ -312,7 +312,7 @@ struct FlattenPass : public Pass {
|
|||
for (auto cell : module->selected_cells()) {
|
||||
RTLIL::Module *tpl = design->module(cell->type);
|
||||
if (tpl != nullptr) {
|
||||
if (!topo_modules.has_edges(tpl))
|
||||
if (!topo_modules.has_node(tpl))
|
||||
worklist.insert(tpl);
|
||||
topo_modules.edge(tpl, module);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue