diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2019-01-04 11:37:25 +0100 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2019-01-04 11:37:25 +0100 |
commit | 3b17c9018acd9d8bee12e653745fb2f00105bd58 (patch) | |
tree | 947a690b409a3fdcf582951a96a7d04ea537bba4 /techlibs/gowin | |
parent | d98fe8ce1fbcd5480181ed22d43b850863191033 (diff) | |
download | yosys-3b17c9018acd9d8bee12e653745fb2f00105bd58.tar.gz yosys-3b17c9018acd9d8bee12e653745fb2f00105bd58.tar.bz2 yosys-3b17c9018acd9d8bee12e653745fb2f00105bd58.zip |
Unify usage of noflatten among architectures
Diffstat (limited to 'techlibs/gowin')
-rw-r--r-- | techlibs/gowin/synth_gowin.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/techlibs/gowin/synth_gowin.cc b/techlibs/gowin/synth_gowin.cc index 9700b3898..96128a680 100644 --- a/techlibs/gowin/synth_gowin.cc +++ b/techlibs/gowin/synth_gowin.cc @@ -52,6 +52,9 @@ struct SynthGowinPass : public ScriptPass log(" -nobram\n"); log(" do not use BRAM cells in output netlist\n"); log("\n"); + log(" -noflatten\n"); + log(" do not flatten design before synthesis\n"); + log("\n"); log(" -retime\n"); log(" run 'abc' with -dff option\n"); log("\n"); @@ -62,14 +65,15 @@ struct SynthGowinPass : public ScriptPass } string top_opt, vout_file; - bool retime, nobram; + bool retime, flatten, nobram; void clear_flags() YS_OVERRIDE { top_opt = "-auto-top"; vout_file = ""; retime = false; - nobram = true; + flatten = true; + nobram = true; } void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE @@ -104,6 +108,10 @@ struct SynthGowinPass : public ScriptPass nobram = true; continue; } + if (args[argidx] == "-noflatten") { + flatten = false; + continue; + } break; } extra_args(args, argidx, design); @@ -127,7 +135,7 @@ struct SynthGowinPass : public ScriptPass run(stringf("hierarchy -check %s", help_mode ? "-top <top>" : top_opt.c_str())); } - if (check_label("flatten") && check_label("flatten", "(unless -noflatten)")) + if (flatten && check_label("flatten", "(unless -noflatten)")) { run("proc"); run("flatten"); |