signed/unsigned mixed calculation with WIDTH warning off #511
Labels
area: wrong runtime result
Issue involves an incorrect runtine result from Verilated model
resolution: fixed
Closed; fixed
Author Name: junji hashimoto
Original Redmine Issue: 511 from https://www.veripool.org
Original Date: 2012-05-09
Original Assignee: Wilson Snyder (@wsnyder)
I think signed/unsigned mixed calculation is wrong.
Sample code is below.
module mod(A);
output [7:0] A;
wire [7:0] B;
wire signed [3:0] C;
assign C=-1;
assign B=3;
assign A=B+C;
endmodule
Verilator outputs A=-2(Wrong)
But
NC-Verilog outputs A=18(Correct)
In this case,
all number have to use unsigned.
The text was updated successfully, but these errors were encountered: