mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
design: -import to not count black/white-boxes as candidates for top
This commit is contained in:
parent
8d3f6d0d79
commit
dac5adde12
|
@ -228,14 +228,20 @@ struct DesignPass : public Pass {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (import_mode) {
|
if (import_mode) {
|
||||||
|
std::vector<RTLIL::Module*> candidates;
|
||||||
for (auto module : copy_src_modules)
|
for (auto module : copy_src_modules)
|
||||||
{
|
{
|
||||||
if (module->get_bool_attribute(ID::top)) {
|
if (module->get_bool_attribute(ID::top)) {
|
||||||
copy_src_modules.clear();
|
candidates.clear();
|
||||||
copy_src_modules.push_back(module);
|
candidates.push_back(module);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (!module->get_blackbox_attribute())
|
||||||
|
candidates.push_back(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (GetSize(candidates) == 1)
|
||||||
|
copy_src_modules = std::move(candidates);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue