mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-06 19:21:23 +00:00
Warn on empty selection for add
command.
This commit is contained in:
parent
7f5c73d58f
commit
5026f36250
2 changed files with 40 additions and 6 deletions
|
@ -206,6 +206,7 @@ struct AddPass : public Pass {
|
|||
|
||||
extra_args(args, argidx, design);
|
||||
|
||||
bool selected_anything = false;
|
||||
for (auto module : design->modules())
|
||||
{
|
||||
log_assert(module != nullptr);
|
||||
|
@ -214,11 +215,14 @@ struct AddPass : public Pass {
|
|||
if (module->get_bool_attribute("\\blackbox"))
|
||||
continue;
|
||||
|
||||
selected_anything = true;
|
||||
if (is_formal_celltype(command))
|
||||
add_formal(module, command, arg_name, enable_name);
|
||||
else if (command == "wire")
|
||||
add_wire(design, module, arg_name, arg_width, arg_flag_input, arg_flag_output, arg_flag_global);
|
||||
}
|
||||
if (!selected_anything)
|
||||
log_warning("No modules selected, or only blackboxes. Nothing was added.\n");
|
||||
}
|
||||
} AddPass;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue