verilog-apple-one/rtl/rom_wozmon.v
2018-01-27 22:13:52 +11:00

23 lines
358 B
Verilog

module rom_wozmon(
input clk,
input reset,
input [7:0] address,
output reg [7:0] dout
);
parameter ROM_FILENAME = "../roms/wozmon.hex";
reg [7:0] rom[0:255];
initial
$readmemh(ROM_FILENAME, rom, 0, 255);
always @(posedge clk)
begin
dout <= reset ? 8'h0 : rom[address];
end
endmodule