Add regression test for real array index error
Check that using a real valued expression as an array index is rejected during elaboration. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
ba74c7b5ad
commit
ea57b6dd9a
|
|
@ -0,0 +1,12 @@
|
|||
// Check that real expressions can not be used as array indices.
|
||||
|
||||
module test;
|
||||
|
||||
reg [1:0] a[1:0];
|
||||
real r;
|
||||
|
||||
initial begin
|
||||
a[r] = 2'b10;
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
|
@ -6,6 +6,7 @@ always4A vvp_tests/always4A.json
|
|||
always4B vvp_tests/always4B.json
|
||||
analog1 vvp_tests/analog1.json
|
||||
analog2 vvp_tests/analog2.json
|
||||
array_index_real_fail vvp_tests/array_index_real_fail.json
|
||||
array_packed_sysfunct vvp_tests/array_packed_sysfunct.json
|
||||
array_packed_value_list vvp_tests/array_packed_value_list.json
|
||||
array_packed_write_read vvp_tests/array_packed_write_read.json
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"type" : "CE",
|
||||
"source" : "array_index_real_fail.v"
|
||||
}
|
||||
Loading…
Reference in New Issue