Add DSP_MINWIDTH=11 for ice40 since ice40_dsp uses this threshold
authorEddie Hung <eddie@fpgeh.com>
Fri, 19 Jul 2019 18:41:00 +0000 (11:41 -0700)
committerEddie Hung <eddie@fpgeh.com>
Fri, 19 Jul 2019 18:41:00 +0000 (11:41 -0700)
techlibs/ice40/synth_ice40.cc

index 5053e445d270ef2be25f433ca91b09fe4c9cf5f0..77bd0ac81ad2527c5857ac1b4b3ebecafa0ab11e 100644 (file)
@@ -266,7 +266,7 @@ struct SynthIce40Pass : public ScriptPass
                        run("opt_expr");
                        run("opt_clean");
                        if (help_mode || dsp) {
-                               run("techmap -map +/mul2dsp.v -D DSP_A_MAXWIDTH=16 -D DSP_B_MAXWIDTH=16 -D DSP_NAME=$__MUL16X16");
+                               run("techmap -map +/mul2dsp.v -D DSP_A_MAXWIDTH=16 -D DSP_B_MAXWIDTH=16 -D DSP_MINWIDTH=11 -D DSP_NAME=$__MUL16X16", "(if -dsp)");
                                run("ice40_dsp", "(if -dsp)");
                        }
                        run("alumacc");