mirror of https://github.com/YosysHQ/yosys.git
Fixed "flatten" top-module detection: Only use on fully selected designs
This commit is contained in:
parent
981677cf09
commit
72b35e0b99
|
@ -501,9 +501,10 @@ struct FlattenPass : public Pass {
|
|||
celltypeMap[it.first].insert(it.first);
|
||||
|
||||
RTLIL::Module *top_mod = NULL;
|
||||
for (auto &mod_it : design->modules)
|
||||
if (mod_it.second->get_bool_attribute("\\top"))
|
||||
top_mod = mod_it.second;
|
||||
if (design->full_selection())
|
||||
for (auto &mod_it : design->modules)
|
||||
if (mod_it.second->get_bool_attribute("\\top"))
|
||||
top_mod = mod_it.second;
|
||||
|
||||
bool did_something = true;
|
||||
std::set<RTLIL::Cell*> handled_cells;
|
||||
|
|
Loading…
Reference in New Issue