mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-10 13:10:51 +00:00
initial import
This commit is contained in:
commit
7764d0ba1d
481 changed files with 54634 additions and 0 deletions
19
tests/simple/memory.v
Normal file
19
tests/simple/memory.v
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
module test01(clk, wr_en, wr_addr, wr_value, rd_addr, rd_value);
|
||||
|
||||
input clk, wr_en;
|
||||
input [3:0] wr_addr, rd_addr;
|
||||
input [7:0] wr_value;
|
||||
output reg [7:0] rd_value;
|
||||
|
||||
reg [7:0] data [15:0];
|
||||
|
||||
always @(posedge clk)
|
||||
if (wr_en)
|
||||
data[wr_addr] <= wr_value;
|
||||
|
||||
always @(posedge clk)
|
||||
rd_value <= data[rd_addr];
|
||||
|
||||
endmodule
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue