diff options
author | Miodrag Milanović <mmicko@gmail.com> | 2022-01-19 08:49:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-19 08:49:58 +0100 |
commit | 4525e419f64da95e37eba7c8b43972ab7349800d (patch) | |
tree | c97ad2f4dcbc324b8d548382ef63bcc67b3308ac /techlibs/anlogic/synth_anlogic.cc | |
parent | 59382945a9169b01a8b1b30b5e988e56e4912f06 (diff) | |
parent | c2b7ad3b28ebd7865c8b2e795b2942d5d1bd00f5 (diff) | |
download | yosys-4525e419f64da95e37eba7c8b43972ab7349800d.tar.gz yosys-4525e419f64da95e37eba7c8b43972ab7349800d.tar.bz2 yosys-4525e419f64da95e37eba7c8b43972ab7349800d.zip |
Merge pull request #3120 from Icenowy/anlogic-bram
anlogic: support BRAM mapping
Diffstat (limited to 'techlibs/anlogic/synth_anlogic.cc')
-rw-r--r-- | techlibs/anlogic/synth_anlogic.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/techlibs/anlogic/synth_anlogic.cc b/techlibs/anlogic/synth_anlogic.cc index 039cae00e..5da14c26b 100644 --- a/techlibs/anlogic/synth_anlogic.cc +++ b/techlibs/anlogic/synth_anlogic.cc @@ -63,6 +63,9 @@ struct SynthAnlogicPass : public ScriptPass log(" -nolutram\n"); log(" do not use EG_LOGIC_DRAM16X4 cells in output netlist\n"); log("\n"); + log(" -nobram\n"); + log(" do not use EG_PHY_BRAM or EG_PHY_BRAM32K cells in output netlist\n"); + log("\n"); log("\n"); log("The following commands are executed by this synthesis command:\n"); help_script(); @@ -70,7 +73,7 @@ struct SynthAnlogicPass : public ScriptPass } string top_opt, edif_file, json_file; - bool flatten, retime, nolutram; + bool flatten, retime, nolutram, nobram; void clear_flags() override { @@ -80,6 +83,7 @@ struct SynthAnlogicPass : public ScriptPass flatten = true; retime = false; nolutram = false; + nobram = false; } void execute(std::vector<std::string> args, RTLIL::Design *design) override @@ -118,6 +122,10 @@ struct SynthAnlogicPass : public ScriptPass nolutram = true; continue; } + if (args[argidx] == "-nobram") { + nobram = true; + continue; + } if (args[argidx] == "-retime") { retime = true; continue; @@ -158,6 +166,14 @@ struct SynthAnlogicPass : public ScriptPass run("synth -run coarse"); } + if (!nobram && check_label("map_bram", "(skip if -nobram)")) + { + run("memory_bram -rules +/anlogic/brams.txt"); + run("techmap -map +/anlogic/brams_map.v"); + run("setundef -zero -params t:EG_PHY_BRAM"); + run("setundef -zero -params t:EG_PHY_BRAM32K"); + } + if (!nolutram && check_label("map_lutram", "(skip if -nolutram)")) { run("memory_bram -rules +/anlogic/lutrams.txt"); |