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:
parent
79f8944811
commit
81b3f52519
8 changed files with 215 additions and 0 deletions
13
tests/techmap/mem_simple_4x1_cells.v
Normal file
13
tests/techmap/mem_simple_4x1_cells.v
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue