mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 09:05:32 +00:00
Merge pull request #1950 from YosysHQ/eddie/design_import
design: -import to not count black/white-boxes as candidates for top
This commit is contained in:
commit
28623f19ee
3 changed files with 30 additions and 7 deletions
|
@ -228,14 +228,20 @@ struct DesignPass : public Pass {
|
|||
}
|
||||
|
||||
if (import_mode) {
|
||||
std::vector<RTLIL::Module*> candidates;
|
||||
for (auto module : copy_src_modules)
|
||||
{
|
||||
if (module->get_bool_attribute(ID::top)) {
|
||||
copy_src_modules.clear();
|
||||
copy_src_modules.push_back(module);
|
||||
candidates.clear();
|
||||
candidates.push_back(module);
|
||||
break;
|
||||
}
|
||||
if (!module->get_blackbox_attribute())
|
||||
candidates.push_back(module);
|
||||
}
|
||||
|
||||
if (GetSize(candidates) == 1)
|
||||
copy_src_modules = std::move(candidates);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue