-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstmem.v
More file actions
32 lines (30 loc) · 738 Bytes
/
Instmem.v
File metadata and controls
32 lines (30 loc) · 738 Bytes
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
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 11:47:55 04/14/2016
// Design Name:
// Module Name: Instmem
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module Instmem(
input [31:0] pc,
input InsMemRW,
output [31:0] inst);
reg [7:0] mem[100:0];
initial begin
$readmemb("instmemfile.txt", mem);
end
assign inst = InsMemRW ? 0 : {mem[pc], mem[pc + 1], mem[pc + 2], mem[pc + 3]}; //Êä³öpc¶ÔÓ¦µÄÖ¸Áî
endmodule