diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-12-05 09:08:30 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-05 09:08:30 -0800 |
commit | e1153031291275dc1c16445b1b2089ffd4335845 (patch) | |
tree | f45dd42d35408b5496b469a9f542a36fcfb08162 /techlibs/gowin/synth_gowin.cc | |
parent | 1a260ce89b79f0d4c2092f725b48583bd5e7bc41 (diff) | |
parent | 819ca7309620b3791c7b93de44990ffb4fceb30f (diff) | |
download | yosys-e1153031291275dc1c16445b1b2089ffd4335845.tar.gz yosys-e1153031291275dc1c16445b1b2089ffd4335845.tar.bz2 yosys-e1153031291275dc1c16445b1b2089ffd4335845.zip |
Merge pull request #713 from Diego-HR/master
Changes in GoWin synth commands and ALU primitive support
Diffstat (limited to 'techlibs/gowin/synth_gowin.cc')
-rw-r--r-- | techlibs/gowin/synth_gowin.cc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/techlibs/gowin/synth_gowin.cc b/techlibs/gowin/synth_gowin.cc index 793f345be..e3d924e26 100644 --- a/techlibs/gowin/synth_gowin.cc +++ b/techlibs/gowin/synth_gowin.cc @@ -49,6 +49,9 @@ struct SynthGowinPass : public ScriptPass log(" from label is synonymous to 'begin', and empty to label is\n"); log(" synonymous to the end of the command list.\n"); log("\n"); + log(" -nobram\n"); + log(" do not use BRAM cells in output netlist\n"); + log("\n"); log(" -retime\n"); log(" run 'abc' with -dff option\n"); log("\n"); @@ -59,13 +62,14 @@ struct SynthGowinPass : public ScriptPass } string top_opt, vout_file; - bool retime; + bool retime, nobram; void clear_flags() YS_OVERRIDE { top_opt = "-auto-top"; vout_file = ""; retime = false; + nobram = true; } void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE @@ -96,6 +100,10 @@ struct SynthGowinPass : public ScriptPass retime = true; continue; } + if (args[argidx] == "-nobram") { + nobram = true; + continue; + } break; } extra_args(args, argidx, design); @@ -119,7 +127,7 @@ struct SynthGowinPass : public ScriptPass run(stringf("hierarchy -check %s", help_mode ? "-top <top>" : top_opt.c_str())); } - if (check_label("flatten")) + if (check_label("flatten") && check_label("flatten", "(unless -noflatten)")) { run("proc"); run("flatten"); @@ -131,13 +139,18 @@ struct SynthGowinPass : public ScriptPass { run("synth -run coarse"); } - + if (!nobram && check_label("bram", "(skip if -nobram)")) + { + run("memory_bram -rules +/gowin/bram.txt"); + run("techmap -map +/gowin/brams_map.v"); + } if (check_label("fine")) { run("opt -fast -mux_undef -undriven -fine"); run("memory_map"); run("opt -undriven -fine"); - run("techmap"); + run("techmap -map +/techmap.v -map +/gowin/arith_map.v"); + run("opt -fine"); run("clean -purge"); run("splitnets -ports"); run("setundef -undriven -zero"); |