M
Mr. Ken
Guest
What's the right way to determine the bit-width growth of multiplication &
addition?
Assuming unsigned operations, all give me right result but fail HAL/LEDA
checks.
wire [5:0] a, b;
wire [6:0] c, d;
wire [13:0] e;
wire [7:0] f;
assign e = a * c + b * d;
assign e = {{6'd0}, a} * {{5'd0}, c} + {{6'd0}, b} * {{5'd0}, d};
assign f = a + c;
assign f = {{2'd0}, a} + {{1'd0}, c};
addition?
Assuming unsigned operations, all give me right result but fail HAL/LEDA
checks.
wire [5:0] a, b;
wire [6:0] c, d;
wire [13:0] e;
wire [7:0] f;
assign e = a * c + b * d;
assign e = {{6'd0}, a} * {{5'd0}, c} + {{6'd0}, b} * {{5'd0}, d};
assign f = a + c;
assign f = {{2'd0}, a} + {{1'd0}, c};