.B(B),\r
.Y(partial_sum[0][B_WIDTH+`DSP_A_MAXWIDTH-1:0])\r
);\r
- assign partial_sum[0][Y_WIDTH-1:B_WIDTH+`DSP_A_MAXWIDTH]=0;\r
+ assign partial_sum[0][Y_WIDTH-1:B_WIDTH+`DSP_A_MAXWIDTH]=0;\r
\r
for (i = 1; i < n-1; i=i+1) begin:slice\r
\$__mul_gen #(\r
.B(B[`DSP_B_MAXWIDTH-1:0]),\r
.Y(partial_sum[0][A_WIDTH+`DSP_B_MAXWIDTH-1:0])\r
);\r
- assign partial_sum[0][Y_WIDTH-1:A_WIDTH+`DSP_B_MAXWIDTH]=0;\r
+ assign partial_sum[0][Y_WIDTH-1:A_WIDTH+`DSP_B_MAXWIDTH]=0;\r
\r
for (i = 1; i < n-1; i=i+1) begin:slice\r
\$__mul_gen #(\r
.B_SIGNED(B_SIGNED),\r
.A_WIDTH(A_WIDTH),\r
.B_WIDTH(`DSP_B_MAXWIDTH),\r
- .Y_WIDTH(A_WIDTH+`DSP_B_MAXWIDTH)\r
+ .Y_WIDTH(A_WIDTH+`DSP_B_MAXWIDTH)\r
) mul (\r
.A(A),\r
.B(B[(i+1)*`DSP_B_MAXWIDTH-1:i*`DSP_B_MAXWIDTH]),\r
.Y(partial[i][A_WIDTH+`DSP_B_MAXWIDTH-1:0])\r
);\r
//assign partial_sum[i] = (partial[i] << i*`DSP_B_MAXWIDTH) + partial_sum[i-1];\r
- // was:\r
+ // was:\r
//assign partial_sum[i] = {\r
// partial[i][A_WIDTH+`DSP_B_MAXWIDTH-1:`DSP_B_MAXWIDTH], \r
// partial[i][`DSP_B_MAXWIDTH-1:0] + partial_sum[i-1][A_WIDTH+(i*`DSP_B_MAXWIDTH)-1:A_WIDTH+((i-1)*`DSP_B_MAXWIDTH)],\r
.B(B[B_WIDTH-1:(n-1)*`DSP_B_MAXWIDTH]),\r
.Y(partial[n-1][A_WIDTH+B_WIDTH-(n-1)*`DSP_B_MAXWIDTH-1:0])\r
);\r
- // AMD: this came comment out -- looks closer to right answer\r
+ // AMD: this came comment out -- looks closer to right answer\r
//assign Y = (partial[n-1] << (n-1)*`DSP_B_MAXWIDTH) + partial_sum[n-2];\r
- // was (looks broken)\r
+ // was (looks broken)\r
//assign Y = {\r
// partial[n-1][A_WIDTH+`DSP_B_MAXWIDTH-1:`DSP_B_MAXWIDTH],\r
// partial[n-1][`DSP_B_MAXWIDTH-1:0] + partial_sum[n-2][A_WIDTH+((n-1)*`DSP_B_MAXWIDTH)-1:A_WIDTH+((n-2)*`DSP_B_MAXWIDTH)],\r
// partial_sum[n-2][A_WIDTH+((n-2)*`DSP_B_MAXWIDTH):0]\r
- assign Y = {\r
+ assign Y = {\r
partial[n-1][A_WIDTH+B_WIDTH-(n-1)*`DSP_B_MAXWIDTH-1:0]\r
+ partial_sum[n-2][Y_WIDTH-1:((n-1)*`DSP_B_MAXWIDTH)],\r
partial_sum[n-2][((n-1)*`DSP_B_MAXWIDTH)-1:0]\r