Describe instruction memory based on hex file

This commit is contained in:
Mario Romero 2022-11-27 03:30:54 -03:00
parent db273a2e41
commit f895a4ccf6

View File

@ -1,9 +1,15 @@
`timescale 1ns / 1ps
// N = Bit width
module InstructionMemory #(parameter N = 8)
module InstructionMemory #(
parameter N = 32,
parameter SIZE = 32
)
(
input logic[N-1:0] addr,
output logic[N-1:0] instr
);
logic[N-1:0] mem [SIZE-1:0];
initial $readmemh("../build/program.hex", mem);
endmodule