diff options
author | David Shah <dave@ds0.me> | 2020-12-07 13:27:17 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2020-12-07 13:27:17 +0000 |
commit | 17812a1560b52b997889d606115266528cdc871f (patch) | |
tree | bd87d436f8b910ea837c5fc99fd7aa97bec4ab63 /techlibs/nexus/synth_nexus.cc | |
parent | 264e924abb85424a70daf50662700e3aceada689 (diff) | |
download | yosys-17812a1560b52b997889d606115266528cdc871f.tar.gz yosys-17812a1560b52b997889d606115266528cdc871f.tar.bz2 yosys-17812a1560b52b997889d606115266528cdc871f.zip |
nexus: Add LRAM inference
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'techlibs/nexus/synth_nexus.cc')
-rw-r--r-- | techlibs/nexus/synth_nexus.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/techlibs/nexus/synth_nexus.cc b/techlibs/nexus/synth_nexus.cc index 9eabbace7..7f36eb282 100644 --- a/techlibs/nexus/synth_nexus.cc +++ b/techlibs/nexus/synth_nexus.cc @@ -77,6 +77,11 @@ struct SynthNexusPass : public ScriptPass log(" -nodffe\n"); log(" do not use flipflops with CE in output netlist\n"); log("\n"); + log(" -nolram\n"); + log(" do not use large RAM cells in output netlist\n"); + log(" note that large RAM must be explicitly requested with a (* lram *)\n"); + log(" attribute on the memory.\n"); + log("\n"); log(" -nobram\n"); log(" do not use block RAM cells in output netlist\n"); log("\n"); @@ -101,7 +106,7 @@ struct SynthNexusPass : public ScriptPass } string top_opt, json_file, vm_file, family; - bool noccu2, nodffe, nobram, nolutram, nowidelut, noiopad, nodsp, flatten, dff, retime, abc9; + bool noccu2, nodffe, nolram, nobram, nolutram, nowidelut, noiopad, nodsp, flatten, dff, retime, abc9; void clear_flags() override { @@ -111,6 +116,7 @@ struct SynthNexusPass : public ScriptPass vm_file = ""; noccu2 = false; nodffe = false; + nolram = false; nobram = false; nolutram = false; nowidelut = false; @@ -181,6 +187,10 @@ struct SynthNexusPass : public ScriptPass nodffe = true; continue; } + if (args[argidx] == "-nolram") { + nolram = true; + continue; + } if (args[argidx] == "-nobram") { nobram = true; continue; @@ -286,6 +296,13 @@ struct SynthNexusPass : public ScriptPass run("opt_clean"); } + if (!nolram && check_label("map_lram", "(skip if -nolram)")) + { + run("memory_bram -rules +/nexus/lrams.txt"); + run("setundef -zero -params t:$__NX_PDPSC512K"); + run("techmap -map +/nexus/lrams_map.v"); + } + if (!nobram && check_label("map_bram", "(skip if -nobram)")) { run("memory_bram -rules +/nexus/brams.txt"); |