aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ice40/synth_ice40.cc
diff options
context:
space:
mode:
authorMarcelina Koƛcielnicka <mwk@0x04.net>2020-07-03 00:21:24 +0200
committerMarcelina Koƛcielnicka <mwk@0x04.net>2020-07-05 05:12:09 +0200
commit1fc8c3a0d1b2e78c7c12123674732d516a0f5a9b (patch)
tree2705d1c0c2b1d3be01c2db975e85b5fb17efe65c /techlibs/ice40/synth_ice40.cc
parent01772dec8c13fb331df439319f4619b6292d6409 (diff)
downloadyosys-1fc8c3a0d1b2e78c7c12123674732d516a0f5a9b.tar.gz
yosys-1fc8c3a0d1b2e78c7c12123674732d516a0f5a9b.tar.bz2
yosys-1fc8c3a0d1b2e78c7c12123674732d516a0f5a9b.zip
ice40: Use dfflegalize.
Diffstat (limited to 'techlibs/ice40/synth_ice40.cc')
-rw-r--r--techlibs/ice40/synth_ice40.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/techlibs/ice40/synth_ice40.cc b/techlibs/ice40/synth_ice40.cc
index 6464368eb..4ddb6ca70 100644
--- a/techlibs/ice40/synth_ice40.cc
+++ b/techlibs/ice40/synth_ice40.cc
@@ -358,15 +358,14 @@ struct SynthIce40Pass : public ScriptPass
run("dff2dffe -direct-match $_DFF_*");
if (min_ce_use >= 0) {
run("opt_merge");
- run(stringf("dff2dffe -unmap-mince %d", min_ce_use));
- run("simplemap t:$dff");
}
- if ((abc9 && dff) || help_mode)
- run("zinit -all w:* t:$_DFF_?_ t:$_DFFE_??_ t:$_SDFF*", "(only if -abc9 and -dff");
+ if (nodffe)
+ run(stringf("dfflegalize -cell $_DFF_?_ 0 -cell $_DFF_?P?_ 0 -cell $_SDFF_?P?_ 0 -cell $_DLATCH_?_ x"));
+ else
+ run(stringf("dfflegalize -cell $_DFF_?_ 0 -cell $_DFFE_?P_ 0 -cell $_DFF_?P?_ 0 -cell $_DFFE_?P?P_ 0 -cell $_SDFF_?P?_ 0 -cell $_SDFFCE_?P?P_ 0 -cell $_DLATCH_?_ x -mince %d", min_ce_use));
run("techmap -map +/ice40/ff_map.v");
run("opt_expr -mux_undef");
run("simplemap");
- run("ice40_ffinit");
run("ice40_ffssr");
run("ice40_opt -full");
}