aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/nexus/synth_nexus.cc
diff options
context:
space:
mode:
authorMarcelina Koƛcielnicka <mwk@0x04.net>2022-02-08 03:52:50 +0100
committerMarcelina Koƛcielnicka <mwk@0x04.net>2022-05-18 17:32:56 +0200
commit0a8eaca322a622610efe5a0d33d1cda83e4afa8c (patch)
tree4d34ed2365f87d7a4c9da09de9fda0e1e00d101c /techlibs/nexus/synth_nexus.cc
parenta04b025abff798f37d580a7d30084497d61d0fe0 (diff)
downloadyosys-0a8eaca322a622610efe5a0d33d1cda83e4afa8c.tar.gz
yosys-0a8eaca322a622610efe5a0d33d1cda83e4afa8c.tar.bz2
yosys-0a8eaca322a622610efe5a0d33d1cda83e4afa8c.zip
nexus: Use `memory_libmap` pass.
Diffstat (limited to 'techlibs/nexus/synth_nexus.cc')
-rw-r--r--techlibs/nexus/synth_nexus.cc33
1 files changed, 12 insertions, 21 deletions
diff --git a/techlibs/nexus/synth_nexus.cc b/techlibs/nexus/synth_nexus.cc
index 03bff0649..6fd15ba55 100644
--- a/techlibs/nexus/synth_nexus.cc
+++ b/techlibs/nexus/synth_nexus.cc
@@ -296,33 +296,24 @@ struct SynthNexusPass : public ScriptPass
run("opt_clean");
}
- if (!nolram && check_label("map_lram", "(skip if -nolram)"))
+ if (check_label("map_ram"))
{
- 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");
- run("setundef -zero -params t:$__NX_PDP16K");
- run("techmap -map +/nexus/brams_map.v");
- }
-
- if (!nolutram && check_label("map_lutram", "(skip if -nolutram)"))
- {
- run("memory_bram -rules +/nexus/lutrams.txt");
- run("setundef -zero -params t:$__NEXUS_DPR16X4");
- run("techmap -map +/nexus/lutrams_map.v");
+ std::string args = "";
+ args += " -no-auto-huge";
+ if (nobram)
+ args += " -no-auto-block";
+ if (nolutram)
+ args += " -no-auto-distributed";
+ if (help_mode)
+ args += " [-no-auto-block] [-no-auto-distributed]";
+ run("memory_libmap -lib +/nexus/lutrams.txt -lib +/nexus/brams.txt -lib +/nexus/lrams.txt" + args, "(-no-auto-block if -nobram, -no-auto-distributed if -nolutram)");
+ run("techmap -map +/nexus/lutrams_map.v -map +/nexus/brams_map.v -map +/nexus/lrams_map.v");
}
if (check_label("map_ffram"))
{
run("opt -fast -mux_undef -undriven -fine");
- run("memory_map -iattr -attr !ram_block -attr !rom_block -attr logic_block "
- "-attr syn_ramstyle=auto -attr syn_ramstyle=registers "
- "-attr syn_romstyle=auto -attr syn_romstyle=logic");
+ run("memory_map");
run("opt -undriven -fine");
}