diff options
author | Marcelina KoĆcielnicka <mwk@0x04.net> | 2020-07-22 13:34:11 +0200 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2020-07-30 22:26:20 +0200 |
commit | cf606998847a286a52f01d748372df396b59dd2b (patch) | |
tree | f36a622fc878847c6240dbbe5be49a8ef8f1a424 /techlibs/ice40/synth_ice40.cc | |
parent | 8501342fc5898ea1e6aadc33a27df54fa82d9107 (diff) | |
download | yosys-cf606998847a286a52f01d748372df396b59dd2b.tar.gz yosys-cf606998847a286a52f01d748372df396b59dd2b.tar.bz2 yosys-cf606998847a286a52f01d748372df396b59dd2b.zip |
synth_ice40: Use opt_dff.
The main part is converting ice40_dsp to recognize the new FF types
created in opt_dff instead of trying to recognize the mux patterns on
its own.
The fsm call has been moved upwards because the passes cannot deal with
$dffe/$sdff*, and other optimizations don't help it much anyway.
Diffstat (limited to 'techlibs/ice40/synth_ice40.cc')
-rw-r--r-- | techlibs/ice40/synth_ice40.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/techlibs/ice40/synth_ice40.cc b/techlibs/ice40/synth_ice40.cc index 4ddb6ca70..ae6d3539c 100644 --- a/techlibs/ice40/synth_ice40.cc +++ b/techlibs/ice40/synth_ice40.cc @@ -293,6 +293,10 @@ struct SynthIce40Pass : public ScriptPass run("opt_clean"); run("check"); run("opt"); + run("fsm"); + run("opt"); + run("opt_dff"); + run("opt"); run("wreduce"); run("peepopt"); run("opt_clean"); @@ -316,8 +320,6 @@ struct SynthIce40Pass : public ScriptPass } run("alumacc"); run("opt"); - run("fsm"); - run("opt -fast"); run("memory -nomap"); run("opt_clean"); } @@ -354,11 +356,6 @@ struct SynthIce40Pass : public ScriptPass if (check_label("map_ffs")) { - if (!nodffe) - run("dff2dffe -direct-match $_DFF_*"); - if (min_ce_use >= 0) { - run("opt_merge"); - } if (nodffe) run(stringf("dfflegalize -cell $_DFF_?_ 0 -cell $_DFF_?P?_ 0 -cell $_SDFF_?P?_ 0 -cell $_DLATCH_?_ x")); else @@ -366,7 +363,6 @@ struct SynthIce40Pass : public ScriptPass run("techmap -map +/ice40/ff_map.v"); run("opt_expr -mux_undef"); run("simplemap"); - run("ice40_ffssr"); run("ice40_opt -full"); } |