From 81a457c4a68937f8edb4c48ca5a5de86b5c05769 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 16 Apr 2018 20:44:26 +0200 Subject: [PATCH] Add "synth_ice40 -nodffe" Signed-off-by: Clifford Wolf --- techlibs/ice40/synth_ice40.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/techlibs/ice40/synth_ice40.cc b/techlibs/ice40/synth_ice40.cc index 0bb0fb139..42873305e 100644 --- a/techlibs/ice40/synth_ice40.cc +++ b/techlibs/ice40/synth_ice40.cc @@ -62,6 +62,9 @@ struct SynthIce40Pass : public ScriptPass log(" -nocarry\n"); log(" do not use SB_CARRY cells in output netlist\n"); log("\n"); + log(" -nodffe\n"); + log(" do not use SB_DFFE* cells in output netlist\n"); + log("\n"); log(" -nobram\n"); log(" do not use SB_RAM40_4K* cells in output netlist\n"); log("\n"); @@ -79,7 +82,7 @@ struct SynthIce40Pass : public ScriptPass } string top_opt, blif_file, edif_file; - bool nocarry, nobram, flatten, retime, abc2, vpr; + bool nocarry, nodffe, nobram, flatten, retime, abc2, vpr; virtual void clear_flags() YS_OVERRIDE { @@ -87,6 +90,7 @@ struct SynthIce40Pass : public ScriptPass blif_file = ""; edif_file = ""; nocarry = false; + nodffe = false; nobram = false; flatten = true; retime = false; @@ -138,6 +142,10 @@ struct SynthIce40Pass : public ScriptPass nocarry = true; continue; } + if (args[argidx] == "-nodffe") { + nodffe = true; + continue; + } if (args[argidx] == "-nobram") { nobram = true; continue; @@ -209,7 +217,8 @@ struct SynthIce40Pass : public ScriptPass if (check_label("map_ffs")) { run("dffsr2dff"); - run("dff2dffe -direct-match $_DFF_*"); + if (!nodffe) + run("dff2dffe -direct-match $_DFF_*"); run("techmap -D NO_SB_LUT4 -map +/ice40/cells_map.v"); run("opt_expr -mux_undef"); run("simplemap"); -- 2.30.2