Add proper test for SV-style arrays

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2019-06-20 12:06:07 +02:00
parent 2428fb7dc2
commit 6a6dd5e057
3 changed files with 16 additions and 6 deletions

16
tests/simple/arrays02.sv Normal file
View File

@ -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

View File

@ -1,4 +0,0 @@
module unpacked_arrays;
reg array_range [0:7];
reg array_size [8];
endmodule

View File

@ -1,2 +0,0 @@
read_verilog -sv unpacked_arrays.sv
stat