diff --git a/techlibs/efinix/synth_efinix.cc b/techlibs/efinix/synth_efinix.cc index 8faa49fcb..5bb517112 100644 --- a/techlibs/efinix/synth_efinix.cc +++ b/techlibs/efinix/synth_efinix.cc @@ -203,10 +203,8 @@ struct SynthEfinixPass : public ScriptPass if (check_label("map_ffs")) { run("dfflegalize -cell $_DFFE_????_ 0 -cell $_SDFFE_????_ 0 -cell $_SDFFCE_????_ 0 -cell $_DLATCH_?_ x"); - if (help_mode) + if (latches == "error" || help_mode) run("check -latchonly -assert", "(only if -latches error, the default)"); - else if (latches == "error") - run("check -latchonly -assert"); run("techmap -D NO_LUT -map +/efinix/cells_map.v"); run("opt_expr -mux_undef"); run("simplemap"); diff --git a/techlibs/fabulous/synth_fabulous.cc b/techlibs/fabulous/synth_fabulous.cc index ecf59a376..f2aee882a 100644 --- a/techlibs/fabulous/synth_fabulous.cc +++ b/techlibs/fabulous/synth_fabulous.cc @@ -372,10 +372,8 @@ struct SynthPass : public ScriptPass } else { run("dfflegalize -cell $_DFF_P_ 0 -cell $_DLATCH_?_ x", "without -complex-dff"); } - if (help_mode) + if (latches == "error" || help_mode) run("check -latchonly -assert", "(only if -latches error, the default)"); - else if (latches == "error") - run("check -latchonly -assert"); run("techmap -map +/fabulous/latches_map.v"); run("techmap -map +/fabulous/ff_map.v"); if (help_mode) { diff --git a/techlibs/ice40/synth_ice40.cc b/techlibs/ice40/synth_ice40.cc index fa5b7c0db..07911350e 100644 --- a/techlibs/ice40/synth_ice40.cc +++ b/techlibs/ice40/synth_ice40.cc @@ -419,10 +419,8 @@ struct SynthIce40Pass : public ScriptPass run("abc", " (only if -abc2)"); run("ice40_opt", "(only if -abc2)"); } - if (help_mode) + if (latches == "error" || help_mode) run("check -latchonly -assert", "(only if -latches error, the default)"); - else if (latches == "error") - run("check -latchonly -assert"); run("techmap -map +/ice40/latches_map.v"); if (noabc || flowmap || help_mode) { run("simplemap", " (if -noabc or -flowmap)"); diff --git a/techlibs/lattice/synth_lattice.cc b/techlibs/lattice/synth_lattice.cc index cf2d19a1a..a6daf8f85 100644 --- a/techlibs/lattice/synth_lattice.cc +++ b/techlibs/lattice/synth_lattice.cc @@ -547,10 +547,8 @@ struct SynthLatticePass : public ScriptPass if (abc2 || help_mode) run("abc", " (only if -abc2)"); if (!asyncprld || help_mode) { - if (help_mode) + if (latches == "error" || help_mode) run("check -latchonly -assert", "(skip if -asyncprld; only if -latches error, the default)"); - else if (latches == "error") - run("check -latchonly -assert"); run("techmap -map +/lattice/latches_map.v", "(skip if -asyncprld)"); } diff --git a/techlibs/nanoxplore/synth_nanoxplore.cc b/techlibs/nanoxplore/synth_nanoxplore.cc index 664c9313a..0cd4b8b59 100644 --- a/techlibs/nanoxplore/synth_nanoxplore.cc +++ b/techlibs/nanoxplore/synth_nanoxplore.cc @@ -339,10 +339,8 @@ struct SynthNanoXplorePass : public ScriptPass dfflegalize_args += stringf(" -cell $_DLATCH_?_ x -mince %d -minsrst %d", min_ce_use, min_srst_use); run("dfflegalize" + dfflegalize_args,"($_*DFFE_* only if not -nodffe)"); run("opt_merge"); - if (help_mode) + if (latches == "error" || help_mode) run("check -latchonly -assert", "(only if -latches error, the default)"); - else if (latches == "error") - run("check -latchonly -assert"); run("techmap -map +/nanoxplore/latches_map.v"); run("techmap -map +/nanoxplore/cells_map.v"); run("opt_expr -undriven -mux_undef"); diff --git a/techlibs/quicklogic/synth_quicklogic.cc b/techlibs/quicklogic/synth_quicklogic.cc index 322c947a2..d4e987c0f 100644 --- a/techlibs/quicklogic/synth_quicklogic.cc +++ b/techlibs/quicklogic/synth_quicklogic.cc @@ -330,10 +330,8 @@ struct SynthQuickLogicPass : public ScriptPass { } if (check_label("map_luts", "(for pp3)") && (help_mode || family == "pp3")) { - if (help_mode) + if (latches == "error" || help_mode) run("check -latchonly -assert", "(only if -latches error, the default)"); - else if (latches == "error") - run("check -latchonly -assert"); run("techmap -map " + lib_path + family + "/latches_map.v"); if (abc9) { run("read_verilog -lib -specify -icells " + lib_path + family + "/abc9_model.v");