diff options
author | N. Engelhardt <nak@symbioticeda.com> | 2020-03-23 20:14:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-23 20:14:13 +0100 |
commit | 3e46faa58c86fb85ee722abcaef5588f76bde564 (patch) | |
tree | f878ffba2caef7b63fca94a69b3102bb562a7d7d /passes/cmds/add.cc | |
parent | b86905d9523767bccc9224ce33a0b51265e4950c (diff) | |
parent | 0da65d498b9f18ce0c09eedc19f16db2390e6dcb (diff) | |
download | yosys-3e46faa58c86fb85ee722abcaef5588f76bde564.tar.gz yosys-3e46faa58c86fb85ee722abcaef5588f76bde564.tar.bz2 yosys-3e46faa58c86fb85ee722abcaef5588f76bde564.zip |
Merge pull request #1763 from boqwxp/issue1762
Closes #1762. Adds warnings for `select` arguments not matching any object and for `add` command when no modules selected
Diffstat (limited to 'passes/cmds/add.cc')
-rw-r--r-- | passes/cmds/add.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/passes/cmds/add.cc b/passes/cmds/add.cc index 7b76f3d4a..c49b8bf5d 100644 --- a/passes/cmds/add.cc +++ b/passes/cmds/add.cc @@ -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; |