mirror of
https://github.com/YosysHQ/yosys
synced 2025-05-06 15:25:47 +00:00
cutpoint: Use new selection helpers
This commit is contained in:
parent
44545653ef
commit
8b1cc6e05e
1 changed files with 3 additions and 4 deletions
|
@ -79,19 +79,18 @@ struct CutpointPass : public Pass {
|
|||
if (flag_blackbox) {
|
||||
if (!design->full_selection())
|
||||
log_cmd_error("This command only operates on fully selected designs!\n");
|
||||
RTLIL::Selection boxes(false);
|
||||
design->push_empty_selection();
|
||||
for (auto module : design->modules())
|
||||
if (flag_instances) {
|
||||
for (auto cell : module->cells()) {
|
||||
auto mod = design->module(cell->type);
|
||||
if (mod != nullptr && mod->get_blackbox_attribute())
|
||||
boxes.select(module, cell);
|
||||
design->select(module, cell);
|
||||
}
|
||||
} else {
|
||||
if (module->get_blackbox_attribute())
|
||||
boxes.select(module);
|
||||
design->select(module);
|
||||
}
|
||||
design->selection_stack.push_back(boxes);
|
||||
}
|
||||
|
||||
for (auto module : design->all_selected_modules())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue