aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ecp5/synth_ecp5.cc
diff options
context:
space:
mode:
authorMarcelina Koƛcielnicka <mwk@0x04.net>2022-02-08 03:52:16 +0100
committerMarcelina Koƛcielnicka <mwk@0x04.net>2022-05-18 17:32:56 +0200
commita04b025abff798f37d580a7d30084497d61d0fe0 (patch)
tree9b9d78548059437381e384c611fa5397d46fb76d /techlibs/ecp5/synth_ecp5.cc
parent7c5dba8b77571aa6a2c0c38eeed7963b401d1cbd (diff)
downloadyosys-a04b025abff798f37d580a7d30084497d61d0fe0.tar.gz
yosys-a04b025abff798f37d580a7d30084497d61d0fe0.tar.bz2
yosys-a04b025abff798f37d580a7d30084497d61d0fe0.zip
ecp5: Use `memory_libmap` pass.
Diffstat (limited to 'techlibs/ecp5/synth_ecp5.cc')
-rw-r--r--techlibs/ecp5/synth_ecp5.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/techlibs/ecp5/synth_ecp5.cc b/techlibs/ecp5/synth_ecp5.cc
index eb8ba8b9d..8c7ea5b39 100644
--- a/techlibs/ecp5/synth_ecp5.cc
+++ b/techlibs/ecp5/synth_ecp5.cc
@@ -277,24 +277,23 @@ struct SynthEcp5Pass : public ScriptPass
run("opt_clean");
}
- if (!nobram && check_label("map_bram", "(skip if -nobram)"))
+ if (check_label("map_ram"))
{
- run("memory_bram -rules +/ecp5/brams.txt");
- run("techmap -map +/ecp5/brams_map.v");
- }
-
- if (!nolutram && check_label("map_lutram", "(skip if -nolutram)"))
- {
- run("memory_bram -rules +/ecp5/lutrams.txt");
- run("techmap -map +/ecp5/lutrams_map.v");
+ std::string args = "";
+ 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 +/ecp5/lutrams.txt -lib +/ecp5/brams.txt" + args, "(-no-auto-block if -nobram, -no-auto-distributed if -nolutram)");
+ run("techmap -map +/ecp5/lutrams_map.v -map +/ecp5/brams_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");
}