Files
PCXT_MiSTer/rtl/common/ram.v
Aitor Gómez 2b5681324b Beta 0.5
* Added UART module from ao486 project (COM1 assigned to USER I/O pins)
* Automatic loading of the BIOS ROM from /games/PCXT directory
* BIOS ROM hot swapping from the OSD menu
* Updated the code to the latest version of the SDRAM module of KFPC-XT, but not yet implemented in the core... needs to be revised and improved, it does not work properly.
2022-06-03 16:11:01 +02:00

20 lines
283 B
Verilog

module ram #(parameter AW=16)
(
input clka,
input ena,
input wea,
input [AW-1:0] addra,
input [7:0] dina,
output reg [7:0] douta
);
reg [7:0] ram[(2**AW)-1:0];
always @(posedge clka)
if (ena)
if (wea)
ram[addra] <= dina;
else
douta <= ram[addra];
endmodule