aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/efinix
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-01-01 12:30:00 +0000
committerwhitequark <whitequark@whitequark.org>2020-01-01 12:30:00 +0000
commit550310e2647c7aac1e49b79d9ff912436103062f (patch)
tree7627eab28fcd68104522d1623108ebb478c9aa84 /techlibs/efinix
parent22fe931c861aa3f557327baf9d12ec57006308d9 (diff)
downloadyosys-550310e2647c7aac1e49b79d9ff912436103062f.tar.gz
yosys-550310e2647c7aac1e49b79d9ff912436103062f.tar.bz2
yosys-550310e2647c7aac1e49b79d9ff912436103062f.zip
Harmonize BRAM/LUTRAM descriptions across all of Yosys.
This commit: * renames all remaining instances of "DRAM" (which is ambiguous) to "LUTRAM" (which is not), finishing the work started in the commit 698ab9be; * renames memory rule files to brams.txt/lutrams.txt; * adds/renames script labels map_bram/map_lutram; * extracts where necessary script labels map_ffram and map_gates; * adds where necessary options -nobram/-nolutram. The end result is that BRAM/LUTRAM/FFRAM aspects of every target are now consistent with each other. Per architecture: * anlogic: rename drams.txt→lutrams.txt, add -nolutram, add :map_lutram, :map_ffram, :map_gates * ecp5: rename bram.txt→brams.txt, lutram.txt→lutrams.txt * efinix: rename bram.txt→brams.txt, add -nobram, add :map_ffram, :map_gates * gowin: rename bram.txt→brams.txt, dram.txt→lutrams.txt, rename -nodram→-nolutram (-nodram still recognized), rename :bram→:map_bram, :dram→:map_lutram, add :map_ffram, :map_gates
Diffstat (limited to 'techlibs/efinix')
-rw-r--r--techlibs/efinix/Makefile.inc2
-rw-r--r--techlibs/efinix/brams.txt (renamed from techlibs/efinix/bram.txt)0
-rw-r--r--techlibs/efinix/synth_efinix.cc22
3 files changed, 18 insertions, 6 deletions
diff --git a/techlibs/efinix/Makefile.inc b/techlibs/efinix/Makefile.inc
index 5013f7fc1..69665982c 100644
--- a/techlibs/efinix/Makefile.inc
+++ b/techlibs/efinix/Makefile.inc
@@ -7,4 +7,4 @@ $(eval $(call add_share_file,share/efinix,techlibs/efinix/cells_map.v))
$(eval $(call add_share_file,share/efinix,techlibs/efinix/arith_map.v))
$(eval $(call add_share_file,share/efinix,techlibs/efinix/cells_sim.v))
$(eval $(call add_share_file,share/efinix,techlibs/efinix/brams_map.v))
-$(eval $(call add_share_file,share/efinix,techlibs/efinix/bram.txt))
+$(eval $(call add_share_file,share/efinix,techlibs/efinix/brams.txt))
diff --git a/techlibs/efinix/bram.txt b/techlibs/efinix/brams.txt
index 0b3fd9308..0b3fd9308 100644
--- a/techlibs/efinix/bram.txt
+++ b/techlibs/efinix/brams.txt
diff --git a/techlibs/efinix/synth_efinix.cc b/techlibs/efinix/synth_efinix.cc
index 26a8d4eda..3e5274385 100644
--- a/techlibs/efinix/synth_efinix.cc
+++ b/techlibs/efinix/synth_efinix.cc
@@ -60,6 +60,9 @@ struct SynthEfinixPass : public ScriptPass
log(" -retime\n");
log(" run 'abc' with -dff option\n");
log("\n");
+ log(" -nobram\n");
+ log(" do not use EFX_RAM_5K 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 SynthEfinixPass : public ScriptPass
}
string top_opt, edif_file, json_file;
- bool flatten, retime;
+ bool flatten, retime, nobram;
void clear_flags() YS_OVERRIDE
{
@@ -76,6 +79,7 @@ struct SynthEfinixPass : public ScriptPass
json_file = "";
flatten = true;
retime = false;
+ nobram = false;
}
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
@@ -114,6 +118,10 @@ struct SynthEfinixPass : public ScriptPass
retime = true;
continue;
}
+ if (args[argidx] == "-nobram") {
+ nobram = true;
+ continue;
+ }
break;
}
extra_args(args, argidx, design);
@@ -150,18 +158,22 @@ struct SynthEfinixPass : public ScriptPass
run("synth -run coarse");
}
- if (check_label("map_bram", "(skip if -nobram)"))
+ if (!nobram || check_label("map_bram", "(skip if -nobram)"))
{
- run("memory_bram -rules +/efinix/bram.txt");
+ run("memory_bram -rules +/efinix/brams.txt");
run("techmap -map +/efinix/brams_map.v");
run("setundef -zero -params t:EFX_RAM_5K");
}
- 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 +/efinix/arith_map.v");
if (retime || help_mode)
run("abc -dff", "(only if -retime)");
@@ -194,7 +206,7 @@ struct SynthEfinixPass : public ScriptPass
run("efinix_fixcarry");
run("clean");
}
-
+
if (check_label("check"))
{
run("hierarchy -check");