mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-08 12:11:24 +00:00
Added tests/techmap/mem_simple_4x1
This commit is contained in:
parent
79f8944811
commit
81b3f52519
8 changed files with 215 additions and 0 deletions
15
tests/techmap/mem_simple_4x1_uut.v
Normal file
15
tests/techmap/mem_simple_4x1_uut.v
Normal file
|
@ -0,0 +1,15 @@
|
|||
module uut (clk, rst, out, counter);
|
||||
|
||||
input clk, rst;
|
||||
output reg [7:0] out;
|
||||
output reg [4:0] counter;
|
||||
|
||||
reg [7:0] memory [0:19];
|
||||
|
||||
always @(posedge clk) begin
|
||||
counter <= rst || counter == 19 ? 0 : counter+1;
|
||||
memory[counter] <= counter;
|
||||
out <= memory[counter];
|
||||
end
|
||||
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue