aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/xilinx/synth_xilinx.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-12-18 12:08:38 -0800
committerEddie Hung <eddie@fpgeh.com>2019-12-18 12:08:38 -0800
commitd0afe4e10d474e9254a6d5ebc7fbeeb8e2e0149a (patch)
tree526c60c70ac41f71eb0c1a0d83f556ce1b35b126 /techlibs/xilinx/synth_xilinx.cc
parentdccd7eb39f897f7fb04b038ee8ac11e676a8ea77 (diff)
parent520f1646cf0c0d83603c4bec2f6a37acca1d4960 (diff)
downloadyosys-d0afe4e10d474e9254a6d5ebc7fbeeb8e2e0149a.tar.gz
yosys-d0afe4e10d474e9254a6d5ebc7fbeeb8e2e0149a.tar.bz2
yosys-d0afe4e10d474e9254a6d5ebc7fbeeb8e2e0149a.zip
Merge branch 'master' of github.com:YosysHQ/yosys
Diffstat (limited to 'techlibs/xilinx/synth_xilinx.cc')
-rw-r--r--techlibs/xilinx/synth_xilinx.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/techlibs/xilinx/synth_xilinx.cc b/techlibs/xilinx/synth_xilinx.cc
index 2c5686a35..971089b28 100644
--- a/techlibs/xilinx/synth_xilinx.cc
+++ b/techlibs/xilinx/synth_xilinx.cc
@@ -444,6 +444,16 @@ struct SynthXilinxPass : public ScriptPass
}
if (check_label("map_ffram")) {
+ // Required for dffsr2dff to work.
+ run("simplemap t:$dff t:$adff t:$mux");
+ // Needs to be done before opt -mux_bool happens.
+ run("dffsr2dff");
+ if (help_mode)
+ run("dff2dffs [-match-init]", "(-match-init for xc6s only)");
+ else if (family == "xc6s")
+ run("dff2dffs -match-init");
+ else
+ run("dff2dffs");
if (widemux > 0)
run("opt -fast -mux_bool -undriven -fine"); // Necessary to omit -mux_undef otherwise muxcover
// performs less efficiently
@@ -453,14 +463,11 @@ struct SynthXilinxPass : public ScriptPass
}
if (check_label("fine")) {
- run("dffsr2dff");
- run("dff2dffe");
+ run("dff2dffe -direct-match $_DFF_* -direct-match $__DFFS_*");
if (help_mode) {
- run("simplemap t:$mux", " ('-widemux' only)");
run("muxcover <internal options>, ('-widemux' only)");
}
else if (widemux > 0) {
- run("simplemap t:$mux");
constexpr int cost_mux2 = 100;
std::string muxcover_args = stringf(" -nodecode -mux2=%d", cost_mux2);
switch (widemux) {
@@ -563,6 +570,7 @@ struct SynthXilinxPass : public ScriptPass
else
techmap_args += " -map " + ff_map_file;
run("techmap " + techmap_args);
+ run("xilinx_dffopt");
run("clean");
}