3 parameter AddrWidth = 4,
4 parameter DataWidth = 4) (
5 (* gentb_constant = 1 *)
8 input [AddrWidth-1:0] Addr_i,
9 input [DataWidth-1:0] Data_i,
10 output [DataWidth-1:0] Data_o,
13 reg [DataWidth-1:0] Data_o;
15 localparam Size = 2**AddrWidth;
18 reg [DataWidth-1:0] Mem[Size-1:0];
22 always @(negedge Reset_n_i or posedge Clk_i)
27 for (i=0; i<Size; i=i+1)
34 Data_o <= Mem[Addr_i];
37 Mem[Addr_i] <= Data_i;