Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 495 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 495 Bytes

Hardware Synthesis Laboratory

GitHub license

ROM

module rom(
    output reg [7:0] data,
    input wire [7:0] addr,
    input wire clk
    );
    
parameter width = 8;
parameter bits = 5;

reg [width-1:0] rom [2**bits-1:0];
initial $readmemb("rom.data", rom);

always@(posedge clk)
begin
    data <= rom[addr];
end
endmodule