log(" -top <module>\n");
log(" use the specified module as top module (default='top')\n");
log("\n");
+ log(" -auto-top\n");
+ log(" automatically determine the top of the design hierarchy\n");
+ log("\n");
log(" -flatten\n");
log(" flatten the design before synthesis. this will pass '-auto-top' to\n");
log(" 'hierarchy' if no top module is specified.\n");
}
string top_module, fsm_opts, memory_opts;
- bool flatten, ifxmode;
+ bool autotop, flatten, ifxmode;
virtual void clear_flags() YS_OVERRIDE
{
top_module.clear();
memory_opts.clear();
+
+ autotop = false;
flatten = false;
ifxmode = false;
}
}
continue;
}
+ if (args[argidx] == "-auto-top") {
+ autotop = true;
+ continue;
+ }
if (args[argidx] == "-flatten") {
flatten = true;
continue;
if (check_label("begin"))
{
if (help_mode) {
- run("hierarchy -check [-top <top>]");
+ run("hierarchy -check [-top <top> | -auto-top]");
} else {
if (top_module.empty()) {
- if (flatten)
+ if (flatten || autotop)
run("hierarchy -check -auto-top");
else
run("hierarchy -check");
log(" -top <module>\n");
log(" use the specified module as top module (default='top')\n");
log("\n");
+ log(" -auto-top\n");
+ log(" automatically determine the top of the design hierarchy\n");
+ log("\n");
log(" -flatten\n");
log(" flatten the design before synthesis. this will pass '-auto-top' to\n");
log(" 'hierarchy' if no top module is specified.\n");
}
string top_module, fsm_opts, memory_opts;
- bool flatten, noalumacc, nofsm, noabc;
+ bool autotop, flatten, noalumacc, nofsm, noabc;
virtual void clear_flags() YS_OVERRIDE
{
fsm_opts.clear();
memory_opts.clear();
+ autotop = false;
flatten = false;
noalumacc = false;
nofsm = false;
}
continue;
}
+ if (args[argidx] == "-auto-top") {
+ autotop = true;
+ continue;
+ }
if (args[argidx] == "-flatten") {
flatten = true;
continue;
if (check_label("begin"))
{
if (help_mode) {
- run("hierarchy -check [-top <top>]");
+ run("hierarchy -check [-top <top> | -auto-top]");
} else {
if (top_module.empty()) {
- if (flatten)
+ if (flatten || autotop)
run("hierarchy -check -auto-top");
else
run("hierarchy -check");