diff options
author | Jim Lawson <ucbjrl@berkeley.edu> | 2018-12-18 14:08:20 -0800 |
---|---|---|
committer | Jim Lawson <ucbjrl@berkeley.edu> | 2018-12-18 14:08:20 -0800 |
commit | f4d500f98e0e298a98099ec2177b43571e9cda61 (patch) | |
tree | e39952065ae50763d5ef47ec1495ad234eaca59e /techlibs/gowin/synth_gowin.cc | |
parent | 3bb9288d65f547085b79fbaffb7046f336ff7f59 (diff) | |
parent | 2d73e1b60a43f2a621b387768134b83054f59e89 (diff) | |
download | yosys-f4d500f98e0e298a98099ec2177b43571e9cda61.tar.gz yosys-f4d500f98e0e298a98099ec2177b43571e9cda61.tar.bz2 yosys-f4d500f98e0e298a98099ec2177b43571e9cda61.zip |
Merge remote-tracking branch 'upstream/master'
# Conflicts:
# CHANGELOG
# frontends/verific/verific.cc
# frontends/verilog/verilog_parser.y
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"); |