From 71dfbf33b292b6920ff1bab308c0c10b737bf763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelina=20Ko=C5=9Bcielnicka?= Date: Thu, 2 Jun 2022 17:15:28 +0200 Subject: Add -no-rw-check option to memory_dff + memory + synth_{ice40,ecp5,gowin}. --- techlibs/gowin/synth_gowin.cc | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'techlibs/gowin/synth_gowin.cc') diff --git a/techlibs/gowin/synth_gowin.cc b/techlibs/gowin/synth_gowin.cc index d900bd255..15a0c41e0 100644 --- a/techlibs/gowin/synth_gowin.cc +++ b/techlibs/gowin/synth_gowin.cc @@ -81,6 +81,11 @@ struct SynthGowinPass : public ScriptPass log(" -abc9\n"); log(" use new ABC9 flow (EXPERIMENTAL)\n"); log("\n"); + log(" -no-rw-check\n"); + log(" marks all recognized read ports as \"return don't-care value on\n"); + log(" read/write collision\" (same result as setting the no_rw_check\n"); + log(" attribute on all memories).\n"); + log("\n"); log("\n"); log("The following commands are executed by this synthesis command:\n"); help_script(); @@ -88,7 +93,7 @@ struct SynthGowinPass : public ScriptPass } string top_opt, vout_file, json_file; - bool retime, nobram, nolutram, flatten, nodffe, nowidelut, abc9, noiopads, noalu; + bool retime, nobram, nolutram, flatten, nodffe, nowidelut, abc9, noiopads, noalu, no_rw_check; void clear_flags() override { @@ -104,6 +109,7 @@ struct SynthGowinPass : public ScriptPass abc9 = false; noiopads = false; noalu = false; + no_rw_check = false; } void execute(std::vector args, RTLIL::Design *design) override @@ -172,6 +178,10 @@ struct SynthGowinPass : public ScriptPass noiopads = true; continue; } + if (args[argidx] == "-no-rw-check") { + no_rw_check = true; + continue; + } break; } extra_args(args, argidx, design); @@ -189,6 +199,12 @@ struct SynthGowinPass : public ScriptPass void script() override { + std::string no_rw_check_opt = ""; + if (no_rw_check) + no_rw_check_opt = " -no-rw-check"; + if (help_mode) + no_rw_check_opt = " [-no-rw-check]"; + if (check_label("begin")) { run("read_verilog -specify -lib +/gowin/cells_sim.v"); @@ -205,7 +221,7 @@ struct SynthGowinPass : public ScriptPass if (check_label("coarse")) { - run("synth -run coarse"); + run("synth -run coarse" + no_rw_check_opt); } if (check_label("map_ram")) -- cgit v1.2.3