mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 01:03:29 +02:00
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 <[email protected]>
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user