mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 20:18:20 +00:00
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);
|
celltypeMap[it.first].insert(it.first);
|
||||||
|
|
||||||
RTLIL::Module *top_mod = NULL;
|
RTLIL::Module *top_mod = NULL;
|
||||||
for (auto &mod_it : design->modules)
|
if (design->full_selection())
|
||||||
if (mod_it.second->get_bool_attribute("\\top"))
|
for (auto &mod_it : design->modules)
|
||||||
top_mod = mod_it.second;
|
if (mod_it.second->get_bool_attribute("\\top"))
|
||||||
|
top_mod = mod_it.second;
|
||||||
|
|
||||||
bool did_something = true;
|
bool did_something = true;
|
||||||
std::set<RTLIL::Cell*> handled_cells;
|
std::set<RTLIL::Cell*> handled_cells;
|
||||||
|
|
Loading…
Reference in a new issue