diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-03-31 11:17:56 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-03-31 11:17:56 +0200 |
commit | 5640b7d6078a681e33e85f06920394204f41c875 (patch) | |
tree | 96ebae5ed0626ae5238fe8b794e50e0cb9d87e7c /tests/simple/arrays01.v | |
parent | 04843bdcbeb62a202a6372ea5464de8c7ea66820 (diff) |
Added test cases from 2012 paper on comparison of foss verilog synthesis tools
Diffstat (limited to 'tests/simple/arrays01.v')
-rw-r--r-- | tests/simple/arrays01.v | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/simple/arrays01.v b/tests/simple/arrays01.v new file mode 100644 index 00000000..bd0eda29 --- /dev/null +++ b/tests/simple/arrays01.v @@ -0,0 +1,16 @@ +module uut_arrays01(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 [15:0]; + +always @(posedge clock) begin + if (we) + memory[addr] <= wr_data; + rd_data <= memory[addr]; +end + +endmodule |