mirror of
https://github.com/YosysHQ/yosys
synced 2025-05-04 22:35:46 +00:00
cutpoint: Add $scopeinfo cell
Also adds "blackbox" as a valid TYPE.
This commit is contained in:
parent
4eb2d06676
commit
8e9c96518c
2 changed files with 3 additions and 1 deletions
|
@ -2012,7 +2012,7 @@ namespace {
|
||||||
param(ID::TYPE);
|
param(ID::TYPE);
|
||||||
check_expected();
|
check_expected();
|
||||||
std::string scope_type = cell->getParam(ID::TYPE).decode_string();
|
std::string scope_type = cell->getParam(ID::TYPE).decode_string();
|
||||||
if (scope_type != "module" && scope_type != "struct")
|
if (scope_type != "module" && scope_type != "struct" && scope_type != "blackbox")
|
||||||
error(__LINE__);
|
error(__LINE__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,6 +93,8 @@ struct CutpointPass : public Pass {
|
||||||
if (module->get_blackbox_attribute()) {
|
if (module->get_blackbox_attribute()) {
|
||||||
module->set_bool_attribute(ID::blackbox, false);
|
module->set_bool_attribute(ID::blackbox, false);
|
||||||
module->set_bool_attribute(ID::whitebox, false);
|
module->set_bool_attribute(ID::whitebox, false);
|
||||||
|
auto scopeinfo = module->addCell(NEW_ID, ID($scopeinfo));
|
||||||
|
scopeinfo->setParam(ID::TYPE, RTLIL::Const("blackbox"));
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue