Use sign_headroom instead
authorEddie Hung <eddie@fpgeh.com>
Fri, 19 Jul 2019 16:16:13 +0000 (09:16 -0700)
committerEddie Hung <eddie@fpgeh.com>
Fri, 19 Jul 2019 16:16:13 +0000 (09:16 -0700)
techlibs/common/mul2dsp.v

index 1f4759929d8eccc7caf0116206ef7b898aa6872d..da887d4265aa2c4ca29bfa731e50003a71d8c294 100644 (file)
@@ -108,7 +108,7 @@ module \$__mul_gen (A, B, Y);
                        end\r
 \r
                        \$__mul_gen #(\r
-                               .A_SIGNED(0),\r
+                               .A_SIGNED(sign_headroom),\r
                                .B_SIGNED(B_SIGNED),\r
                                .A_WIDTH(`DSP_A_MAXWIDTH),\r
                                .B_WIDTH(B_WIDTH),\r
@@ -122,7 +122,7 @@ module \$__mul_gen (A, B, Y);
 \r
                        for (i = 1; i < n-1; i=i+1) begin:slice\r
                                \$__mul_gen #(\r
-                                       .A_SIGNED(0),\r
+                                       .A_SIGNED(sign_headroom),\r
                                        .B_SIGNED(B_SIGNED),\r
                                        .A_WIDTH(`DSP_A_MAXWIDTH),\r
                                        .B_WIDTH(B_WIDTH),\r
@@ -163,7 +163,7 @@ module \$__mul_gen (A, B, Y);
 \r
                        \$__mul_gen #(\r
                                .A_SIGNED(A_SIGNED),\r
-                               .B_SIGNED(0),\r
+                               .B_SIGNED(sign_headroom),\r
                                .A_WIDTH(A_WIDTH),\r
                                .B_WIDTH(`DSP_B_MAXWIDTH),\r
                                .Y_WIDTH(partial_Y_WIDTH)\r
@@ -177,7 +177,7 @@ module \$__mul_gen (A, B, Y);
                        for (i = 1; i < n-1; i=i+1) begin:slice\r
                                \$__mul_gen #(\r
                                        .A_SIGNED(A_SIGNED),\r
-                                       .B_SIGNED(0),\r
+                                       .B_SIGNED(sign_headroom),\r
                                        .A_WIDTH(A_WIDTH),\r
                                        .B_WIDTH(`DSP_B_MAXWIDTH),\r
                                        .Y_WIDTH(partial_Y_WIDTH)\r