Add proper test for SV-style arrays
authorClifford Wolf <clifford@clifford.at>
Thu, 20 Jun 2019 10:06:07 +0000 (12:06 +0200)
committerClifford Wolf <clifford@clifford.at>
Thu, 20 Jun 2019 10:06:07 +0000 (12:06 +0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
tests/simple/arrays02.sv [new file with mode: 0644]
tests/various/unpacked_arrays.sv [deleted file]
tests/various/unpacked_arrays.ys [deleted file]

diff --git a/tests/simple/arrays02.sv b/tests/simple/arrays02.sv
new file mode 100644 (file)
index 0000000..76c2a73
--- /dev/null
@@ -0,0 +1,16 @@
+module uut_arrays02(clock, we, addr, wr_data, rd_data);
+
+input clock, we;
+input [3:0] addr, wr_data;
+output [3:0] rd_data;
+reg [3:0] rd_data;
+
+reg [3:0] memory [16];
+
+always @(posedge clock) begin
+       if (we)
+               memory[addr] <= wr_data;
+       rd_data <= memory[addr];
+end
+
+endmodule
diff --git a/tests/various/unpacked_arrays.sv b/tests/various/unpacked_arrays.sv
deleted file mode 100644 (file)
index 2f4ed0d..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-module unpacked_arrays;
-  reg array_range [0:7];
-  reg array_size [8];
-endmodule
diff --git a/tests/various/unpacked_arrays.ys b/tests/various/unpacked_arrays.ys
deleted file mode 100644 (file)
index 419152d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-read_verilog -sv unpacked_arrays.sv
-stat