mirror of
https://github.com/YosysHQ/yosys
synced 2025-05-05 06:45:46 +00:00
Use selection helpers
Catch more uses of selection constructor without assigning a design.
This commit is contained in:
parent
a67b57bd64
commit
dac2bb7d4d
23 changed files with 84 additions and 78 deletions
|
@ -400,7 +400,7 @@ struct Abc9Pass : public ScriptPass
|
|||
}
|
||||
|
||||
log_push();
|
||||
active_design->selection().select(mod);
|
||||
active_design->select(mod);
|
||||
|
||||
if (!active_design->selected_whole_module(mod))
|
||||
log_error("Can't handle partially selected module %s!\n", log_id(mod));
|
||||
|
@ -452,7 +452,7 @@ struct Abc9Pass : public ScriptPass
|
|||
log_pop();
|
||||
}
|
||||
|
||||
active_design->selection_stack.pop_back();
|
||||
active_design->pop_selection();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -454,7 +454,7 @@ void prep_bypass(RTLIL::Design *design)
|
|||
|
||||
void prep_dff(RTLIL::Design *design)
|
||||
{
|
||||
auto r = design->selection_vars.insert(std::make_pair(ID($abc9_flops), RTLIL::Selection(false)));
|
||||
auto r = design->selection_vars.insert(std::make_pair(ID($abc9_flops), RTLIL::Selection(false, false, design)));
|
||||
auto &modules_sel = r.first->second;
|
||||
|
||||
for (auto module : design->selected_modules())
|
||||
|
|
|
@ -157,7 +157,7 @@ struct AbcNewPass : public ScriptPass {
|
|||
exe_options = abc_exe_options;
|
||||
log_header(active_design, "Mapping module '%s'.\n", log_id(mod));
|
||||
log_push();
|
||||
active_design->selection().select(mod);
|
||||
active_design->select(mod);
|
||||
}
|
||||
|
||||
std::string script_save;
|
||||
|
@ -194,7 +194,7 @@ struct AbcNewPass : public ScriptPass {
|
|||
}
|
||||
|
||||
if (!help_mode) {
|
||||
active_design->selection_stack.pop_back();
|
||||
active_design->pop_selection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ struct AigmapPass : public Pass {
|
|||
|
||||
if (select_mode) {
|
||||
log_assert(!design->selection_stack.empty());
|
||||
RTLIL::Selection& sel = design->selection_stack.back();
|
||||
RTLIL::Selection& sel = design->selection();
|
||||
sel.selected_members[module->name] = std::move(new_sel);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ struct NlutmapWorker
|
|||
|
||||
RTLIL::Selection get_selection()
|
||||
{
|
||||
RTLIL::Selection sel(false);
|
||||
RTLIL::Selection sel(false, false, module->design);
|
||||
for (auto cell : module->cells())
|
||||
if (!mapped_cells.count(cell))
|
||||
sel.select(module, cell);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue