input [B_WIDTH-1:0] B;\r
output [Y_WIDTH-1:0] Y;\r
\r
+ parameter _TECHMAP_CELLTYPE_ = "";\r
+\r
generate\r
if (0) begin end\r
`ifdef DSP_A_MINWIDTH\r
else if (Y_WIDTH < `DSP_Y_MINWIDTH)\r
wire _TECHMAP_FAIL_ = 1;\r
`endif\r
+ else if (_TECHMAP_CELLTYPE_ == "$mul" && A_SIGNED != B_SIGNED)\r
+ wire _TECHMAP_FAIL_ = 1;\r
`ifdef DSP_SIGNEDONLY\r
- else if (!A_SIGNED)\r
+ else if (_TECHMAP_CELLTYPE_ == "$mul" && !A_SIGNED)\r
\$mul #(\r
.A_SIGNED(1),\r
.B_SIGNED(1),\r
.Y(Y)\r
);\r
`endif\r
- else if (A_WIDTH < B_WIDTH)\r
+ else if (_TECHMAP_CELLTYPE_ == "$mul" && A_WIDTH < B_WIDTH)\r
\$mul #(\r
.A_SIGNED(B_SIGNED),\r
.B_SIGNED(A_SIGNED),\r