Add regression test for delayed real assignments
Check that a blocking intra-assignment delay on a real value preserves the assigned value after the delay. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
d5306085c5
commit
a1c333ea6e
|
|
@ -0,0 +1,20 @@
|
|||
// Check that blocking intra-assignment delays can assign real values.
|
||||
|
||||
module test;
|
||||
real r;
|
||||
reg failed;
|
||||
|
||||
initial begin
|
||||
failed = 1'b0;
|
||||
|
||||
r = #1 1.25;
|
||||
if (r != 1.25) begin
|
||||
$display("FAILED(%0d). Expected 1.25, got %0.2f", `__LINE__, r);
|
||||
failed = 1'b1;
|
||||
end
|
||||
|
||||
if (!failed) begin
|
||||
$display("PASSED");
|
||||
end
|
||||
end
|
||||
endmodule
|
||||
|
|
@ -213,6 +213,7 @@ pv_wr_fn_vec2 vvp_tests/pv_wr_fn_vec2.json
|
|||
pv_wr_fn_vec4 vvp_tests/pv_wr_fn_vec4.json
|
||||
queue_fail vvp_tests/queue_fail.json
|
||||
readmem-invalid vvp_tests/readmem-invalid.json
|
||||
real_delay_assign vvp_tests/real_delay_assign.json
|
||||
real_negative_zero vvp_tests/real_negative_zero.json
|
||||
real_unary_minus_inf vvp_tests/real_unary_minus_inf.json
|
||||
real_unary_minus_nan vvp_tests/real_unary_minus_nan.json
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"type" : "normal",
|
||||
"source" : "real_delay_assign.v"
|
||||
}
|
||||
Loading…
Reference in New Issue