2022-11-26 10:44:00 +00:00
|
|
|
`timescale 1ns / 1ps
|
|
|
|
|
|
|
|
// N = Bit width
|
2022-11-27 06:30:54 +00:00
|
|
|
module InstructionMemory #(
|
|
|
|
parameter N = 32,
|
|
|
|
parameter SIZE = 32
|
|
|
|
)
|
2022-11-26 10:44:00 +00:00
|
|
|
(
|
|
|
|
input logic[N-1:0] addr,
|
|
|
|
output logic[N-1:0] instr
|
2022-11-27 06:30:54 +00:00
|
|
|
);
|
|
|
|
logic[N-1:0] mem [SIZE-1:0];
|
|
|
|
|
|
|
|
initial $readmemh("../build/program.hex", mem);
|
2022-11-26 10:44:00 +00:00
|
|
|
endmodule
|