blob: 0c8d63026e8c08575b0ec632d904dd30b3d15a48 [file] [log] [blame]
`timescale 1ns / 1ps
module singleport_ram #(
parameter integer WORDS = 8192,
parameter ABITS = 13
)(
input clka,
input wea,
input [ABITS - 1:0] addra,
input [7:0] dina,
output reg [7:0] douta
);
reg [7:0] ram [0:WORDS-1];
always@(posedge clka) begin
if (wea)
ram[addra] <= dina;
end
always@(posedge clka) begin
douta <= ram[addra];
end
endmodule