summaryrefslogtreecommitdiff
path: root/instrmem/v0.1/instr_memory.v
blob: 943d358470a70f0a0b02f84cc1b47b51b7d165e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
`include "parameters.h"

module instr_memory(
    input [15:0]pc,
    output [15:0]instruction
);

reg [`col - 1:0] memory [`row_i - 1:0];
wire [3:0] rom_addr = pc[4:1];

initial begin
    $readmemb("test.instr",memory,0,14);
end

assign instruction = memory[rom_addr];

endmodule