diff options
author | Jim Lawson <ucbjrl@berkeley.edu> | 2019-02-11 12:43:46 -0800 |
---|---|---|
committer | Jim Lawson <ucbjrl@berkeley.edu> | 2019-02-11 12:43:46 -0800 |
commit | 311396860b7380e5dc68e66c17d5083d1953fe3f (patch) | |
tree | c5146a20e59acc342dfe414e1b35fdfe419b9e81 /techlibs/gowin/synth_gowin.cc | |
parent | 76696e80041dc5b8f4ba986f4f83d6e7b6854e96 (diff) | |
parent | e112d2fbf5a31f00ef19e6d05f28fecc1e9c56b9 (diff) | |
download | yosys-311396860b7380e5dc68e66c17d5083d1953fe3f.tar.gz yosys-311396860b7380e5dc68e66c17d5083d1953fe3f.tar.bz2 yosys-311396860b7380e5dc68e66c17d5083d1953fe3f.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'techlibs/gowin/synth_gowin.cc')
-rw-r--r-- | techlibs/gowin/synth_gowin.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/techlibs/gowin/synth_gowin.cc b/techlibs/gowin/synth_gowin.cc index e3d924e26..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,12 +108,16 @@ struct SynthGowinPass : public ScriptPass nobram = true; continue; } + if (args[argidx] == "-noflatten") { + flatten = false; + continue; + } break; } extra_args(args, argidx, design); if (!design->full_selection()) - log_cmd_error("This comannd only operates on fully selected designs!\n"); + log_cmd_error("This command only operates on fully selected designs!\n"); log_header(design, "Executing SYNTH_GOWIN pass.\n"); log_push(); @@ -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"); |