Files
iverilog/ivtest/ivltests/real_array_store_after_cmp.v
T
Lars-Peter Clausen c2c758369d Add regression tests for accidental store/load skip
Check that for the following operations the load or store is not skipped
after a operation that sets vvp flag 4.

 * Assignment to immediate indexed real array entry
 * Assignment operator on immediate indexed vector array entry
 * Assignment operator on dynamic vector part select

Signed-off-by: Lars-Peter Clausen <[email protected]>
2022-05-16 11:36:20 +02:00

24 lines
524 B
Verilog

// Check that a store to am entry of real typed array with an immediate index
// works if it happes after a comparison that sets vvp flag 4 to 0.
module test;
integer a = 0;
real r[1:0];
initial begin
if (a == 0) begin
// Make sure that this store happens, even though the compare above
// cleared set vvp flag 4
r[0] = 1.23;
end
if (r[0] == 1.23) begin
$display("PASSED");
end else begin
$display("FAILED. Expected %f, got %f", 1.23, r[0]);
end
end
endmodule