3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-22 02:57:51 +00:00

Added tests/techmap/mem_simple_4x1

This commit is contained in:
Clifford Wolf 2014-02-21 12:06:40 +01:00
parent 79f8944811
commit 81b3f52519
8 changed files with 215 additions and 0 deletions

View file

@ -0,0 +1,13 @@
module MEM4X1 (CLK, RD_ADDR, RD_DATA, WR_ADDR, WR_DATA, WR_EN);
input CLK, WR_DATA, WR_EN;
input [3:0] RD_ADDR, WR_ADDR;
output reg RD_DATA;
reg [15:0] memory;
always @(posedge CLK) begin
if (WR_EN)
memory[WR_ADDR] <= WR_DATA;
RD_DATA <= memory[RD_ADDR];
end
endmodule