Revert "No need for $__mul anymore?"
authorEddie Hung <eddie@fpgeh.com>
Thu, 26 Sep 2019 00:24:11 +0000 (17:24 -0700)
committerEddie Hung <eddie@fpgeh.com>
Thu, 26 Sep 2019 00:24:11 +0000 (17:24 -0700)
This reverts commit 1d875ac76a354f654f28b9632d83f6b43542e827.

techlibs/common/mul2dsp.v

index 8c6a836f8a621a1677aed2a12ef1fc169a431d58..953fc28d1366d7a60bf0281a65ff6275ce88c9dd 100644 (file)
@@ -49,7 +49,7 @@ $fatal(1, "Macro DSP_NAME must be defined");
 `define MAX(a,b) (a > b ? a : b)\r
 `define MIN(a,b) (a < b ? a : b)\r
 \r
-(* techmap_celltype = "$mul" *)\r
+(* techmap_celltype = "$mul $__mul" *)\r
 module _80_mul (A, B, Y);\r
        parameter A_SIGNED = 0;\r
        parameter B_SIGNED = 0;\r
@@ -128,9 +128,9 @@ module _80_mul (A, B, Y);
                        end\r
 \r
                        for (i = 0; i < n; i=i+1) begin:slice\r
-                               \$mul #(\r
+                               \$__mul #(\r
                                        .A_SIGNED(sign_headroom),\r
-                                       .B_SIGNED(sign_headroom),\r
+                                       .B_SIGNED(B_SIGNED),\r
                                        .A_WIDTH(`DSP_A_MAXWIDTH_PARTIAL),\r
                                        .B_WIDTH(B_WIDTH),\r
                                        .Y_WIDTH(partial_Y_WIDTH)\r
@@ -157,7 +157,7 @@ module _80_mul (A, B, Y);
                                end\r
                        end\r
 \r
-                       \$mul #(\r
+                       \$__mul #(\r
                                .A_SIGNED(A_SIGNED),\r
                                .B_SIGNED(B_SIGNED),\r
                                .A_WIDTH(last_A_WIDTH),\r
@@ -193,8 +193,8 @@ module _80_mul (A, B, Y);
                        end\r
 \r
                        for (i = 0; i < n; i=i+1) begin:slice\r
-                               \$mul #(\r
-                                       .A_SIGNED(sign_headroom),\r
+                               \$__mul #(\r
+                                       .A_SIGNED(A_SIGNED),\r
                                        .B_SIGNED(sign_headroom),\r
                                        .A_WIDTH(A_WIDTH),\r
                                        .B_WIDTH(`DSP_B_MAXWIDTH_PARTIAL),\r
@@ -222,7 +222,7 @@ module _80_mul (A, B, Y);
                                end\r
                        end\r
 \r
-                       \$mul #(\r
+                       \$__mul #(\r
                                .A_SIGNED(A_SIGNED),\r
                                .B_SIGNED(B_SIGNED),\r
                                .A_WIDTH(A_WIDTH),\r
@@ -267,7 +267,7 @@ module _80_mul (A, B, Y);
        endgenerate\r
 endmodule\r
 \r
-(* techmap_celltype = "$mul" *)\r
+(* techmap_celltype = "$mul $__mul" *)\r
 module _90_soft_mul (A, B, Y);\r
        parameter A_SIGNED = 0;\r
        parameter B_SIGNED = 0;\r