aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/anlogic/synth_anlogic.cc
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-01-02 21:06:17 +0000
committerGitHub <noreply@github.com>2020-01-02 21:06:17 +0000
commitf8d5920a7e61f78873b7bf49dd7e8f3a83f7adf3 (patch)
treee7c5b19ffae2bfc40e682f696d2ae40513717ad7 /techlibs/anlogic/synth_anlogic.cc
parentef6548203cca239a98b00ea652a92fe3e20f97d7 (diff)
parent550310e2647c7aac1e49b79d9ff912436103062f (diff)
downloadyosys-f8d5920a7e61f78873b7bf49dd7e8f3a83f7adf3.tar.gz
yosys-f8d5920a7e61f78873b7bf49dd7e8f3a83f7adf3.tar.bz2
yosys-f8d5920a7e61f78873b7bf49dd7e8f3a83f7adf3.zip
Merge pull request #1604 from whitequark/unify-ram-naming
Harmonize BRAM/LUTRAM descriptions across all of Yosys
Diffstat (limited to 'techlibs/anlogic/synth_anlogic.cc')
-rw-r--r--techlibs/anlogic/synth_anlogic.cc24
1 files changed, 18 insertions, 6 deletions
diff --git a/techlibs/anlogic/synth_anlogic.cc b/techlibs/anlogic/synth_anlogic.cc
index 57b8a2b26..aaa6bda4a 100644
--- a/techlibs/anlogic/synth_anlogic.cc
+++ b/techlibs/anlogic/synth_anlogic.cc
@@ -60,6 +60,9 @@ struct SynthAnlogicPass : public ScriptPass
log(" -retime\n");
log(" run 'abc' with '-dff -D 1' options\n");
log("\n");
+ log(" -nolutram\n");
+ log(" do not use EG_LOGIC_DRAM16X4 cells in output netlist\n");
+ log("\n");
log("\n");
log("The following commands are executed by this synthesis command:\n");
help_script();
@@ -67,7 +70,7 @@ struct SynthAnlogicPass : public ScriptPass
}
string top_opt, edif_file, json_file;
- bool flatten, retime;
+ bool flatten, retime, nolutram;
void clear_flags() YS_OVERRIDE
{
@@ -76,6 +79,7 @@ struct SynthAnlogicPass : public ScriptPass
json_file = "";
flatten = true;
retime = false;
+ nolutram = false;
}
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
@@ -110,6 +114,10 @@ struct SynthAnlogicPass : public ScriptPass
flatten = false;
continue;
}
+ if (args[argidx] == "-nolutram") {
+ nolutram = true;
+ continue;
+ }
if (args[argidx] == "-retime") {
retime = true;
continue;
@@ -150,18 +158,22 @@ struct SynthAnlogicPass : public ScriptPass
run("synth -run coarse");
}
- if (check_label("dram"))
+ if (!nolutram && check_label("map_lutram", "(skip if -nolutram)"))
{
- run("memory_bram -rules +/anlogic/drams.txt");
- run("techmap -map +/anlogic/drams_map.v");
+ run("memory_bram -rules +/anlogic/lutrams.txt");
+ run("techmap -map +/anlogic/lutrams_map.v");
run("setundef -zero -params t:EG_LOGIC_DRAM16X4");
}
- if (check_label("fine"))
+ if (check_label("map_ffram"))
{
run("opt -fast -mux_undef -undriven -fine");
run("memory_map");
run("opt -undriven -fine");
+ }
+
+ if (check_label("map_gates"))
+ {
run("techmap -map +/techmap.v -map +/anlogic/arith_map.v");
if (retime || help_mode)
run("abc -dff -D 1", "(only if -retime)");
@@ -187,7 +199,7 @@ struct SynthAnlogicPass : public ScriptPass
run("techmap -map +/anlogic/cells_map.v");
run("clean");
}
-
+
if (check_label("map_anlogic"))
{
run("anlogic_fixcarry");