aboutsummaryrefslogtreecommitdiffstats
path: root/passes/cmds/add.cc
diff options
context:
space:
mode:
authorSergey <37293587+SergeyDegtyar@users.noreply.github.com>2019-10-01 10:57:09 +0300
committerGitHub <noreply@github.com>2019-10-01 10:57:09 +0300
commitd99b1e32618f8aa92c01eb0ac5d08486f411cca0 (patch)
tree5671ffa605b5f6b31b86aacb2dbeaacd018302d7 /passes/cmds/add.cc
parentfc56459746fec7751735749e3328378e1089b914 (diff)
parentd963e8c2c6207ad98d48dc528922ad58c030173f (diff)
downloadyosys-d99b1e32618f8aa92c01eb0ac5d08486f411cca0.tar.gz
yosys-d99b1e32618f8aa92c01eb0ac5d08486f411cca0.tar.bz2
yosys-d99b1e32618f8aa92c01eb0ac5d08486f411cca0.zip
Merge branch 'master' into SergeyDegtyar/anlogic
Diffstat (limited to 'passes/cmds/add.cc')
-rw-r--r--passes/cmds/add.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/passes/cmds/add.cc b/passes/cmds/add.cc
index af6f7043d..dd05ac81f 100644
--- a/passes/cmds/add.cc
+++ b/passes/cmds/add.cc
@@ -105,6 +105,11 @@ struct AddPass : public Pass {
log("Like 'add -input', but also connect the signal between instances of the\n");
log("selected modules.\n");
log("\n");
+ log("\n");
+ log(" add -mod <name[s]>\n");
+ log("\n");
+ log("Add module[s] with the specified name[s].\n");
+ log("\n");
}
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
{
@@ -113,6 +118,7 @@ struct AddPass : public Pass {
bool arg_flag_input = false;
bool arg_flag_output = false;
bool arg_flag_global = false;
+ bool mod_mode = false;
int arg_width = 0;
size_t argidx;
@@ -133,8 +139,20 @@ struct AddPass : public Pass {
arg_width = atoi(args[++argidx].c_str());
continue;
}
+ if (arg == "-mod") {
+ mod_mode = true;
+ argidx++;
+ break;
+ }
break;
}
+
+ if (mod_mode) {
+ for (; argidx < args.size(); argidx++)
+ design->addModule(RTLIL::escape_id(args[argidx]));
+ return;
+ }
+
extra_args(args, argidx, design);
for (auto &mod : design->modules_)