Add comment on why partial multipliers are 18x18
authorEddie Hung <eddie@fpgeh.com>
Sat, 5 Oct 2019 05:30:14 +0000 (22:30 -0700)
committerEddie Hung <eddie@fpgeh.com>
Sat, 5 Oct 2019 05:31:04 +0000 (22:31 -0700)
techlibs/xilinx/synth_xilinx.cc

index 41429b3383ac6fb481e3b0a22a9010f82762b40b..4fe2877441f5aeaf9ea2b538a1544797d410288e 100644 (file)
@@ -342,10 +342,14 @@ struct SynthXilinxPass : public ScriptPass
                if (check_label("map_dsp", "(skip if '-nodsp')")) {
                        if (!nodsp || help_mode) {
                                // NB: Xilinx multipliers are signed only
-                               run("techmap -map +/mul2dsp.v -map +/xilinx/dsp_map.v -D DSP_A_MAXWIDTH=25 -D DSP_A_MAXWIDTH_PARTIAL=18 -D DSP_B_MAXWIDTH=18 "
-                                               "-D DSP_A_MINWIDTH=2 -D DSP_B_MINWIDTH=2 " // Blocks Nx1 multipliers
-                                               "-D DSP_Y_MINWIDTH=9 " // UG901 suggests small multiplies are those 4x4 and smaller
-                                               "-D DSP_SIGNEDONLY=1 -D DSP_NAME=$__MUL25X18");
+                               run("techmap -map +/mul2dsp.v -map +/xilinx/dsp_map.v -D DSP_A_MAXWIDTH=25 "
+                                       "-D DSP_A_MAXWIDTH_PARTIAL=18 -D DSP_B_MAXWIDTH=18 "    // Partial multipliers are intentionally
+                                                                                               // limited to 18x18 in order to take
+                                                                                               // advantage of the (PCOUT << 17) -> PCIN
+                                                                                               // dedicated cascade chain capability
+                                       "-D DSP_A_MINWIDTH=2 -D DSP_B_MINWIDTH=2 " // Blocks Nx1 multipliers
+                                       "-D DSP_Y_MINWIDTH=9 " // UG901 suggests small multiplies are those 4x4 and smaller
+                                       "-D DSP_SIGNEDONLY=1 -D DSP_NAME=$__MUL25X18");
                                run("select a:mul2dsp");
                                run("setattr -unset mul2dsp");
                                run("opt_expr -fine");