Describe instruction memory based on hex file
This commit is contained in:
parent
db273a2e41
commit
f895a4ccf6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user