-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinsRom.v
38 lines (34 loc) · 788 Bytes
/
insRom.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 11:11:50 12/05/2015
// Design Name:
// Module Name: insRom
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module instRom(
input enabler,
input wire[31:0] a,
output reg[31:0] spo
);
reg[31:0] instMem[0:255];
initial $readmemh( "instRom.data", instMem );
always @ (*) begin
if (enabler == 0)
spo <= 0;
else
spo <= instMem[a[18:2]];
end
endmodule