Add test for subarray access on multidimensional arrays
authorLukasz Dalek <ldalek@antmicro.com>
Mon, 3 Aug 2020 15:07:33 +0000 (17:07 +0200)
committerLukasz Dalek <ldalek@antmicro.com>
Mon, 3 Aug 2020 15:07:33 +0000 (17:07 +0200)
Signed-off-by: Lukasz Dalek <ldalek@antmicro.com>
tests/svtypes/multirange_subarray_access.ys [new file with mode: 0644]

diff --git a/tests/svtypes/multirange_subarray_access.ys b/tests/svtypes/multirange_subarray_access.ys
new file mode 100644 (file)
index 0000000..de57d14
--- /dev/null
@@ -0,0 +1,12 @@
+logger -expect error "Insufficient number of array indices for a." 1
+read_verilog -sv <<EOT
+module foo;
+logic a [6:0][4:0][1:0];
+logic b [1:0];
+
+assign a[0][0][0] = 1'b0;
+assign a[0][0][1] = 1'b1;
+assign b = a[0][0];
+
+endmodule
+EOT