-
Notifications
You must be signed in to change notification settings - Fork 2
/
CacheArbiterBus.sv
56 lines (50 loc) · 1.18 KB
/
CacheArbiterBus.sv
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* Bus Interface between ICache/Dcache and Arbiter */
interface CacheArbiterBus #(DATA_WIDTH = 512, ADDRESS = 64, TAG_WIDTH = 13) (
/* verilator lint_off UNDRIVEN */
/* verilator lint_off UNUSED */
input reset,
input clk
);
wire[ADDRESS-1:0] req;
wire[DATA_WIDTH-1:0] reqdata; // Used for Storing into Memory
wire[TAG_WIDTH-1:0] reqtag;
wire[DATA_WIDTH-1:0] resp;
wire[TAG_WIDTH-1:0] resptag;
wire reqcyc;
wire respcyc;
wire reqack;
wire respack;
parameter
READ /* verilator public */ = 1'b1,
WRITE /* verilator public */ = 1'b0,
MEMORY /* verilator public */ = 4'b0001,
MMIO /* verilator public */ = 4'b0011,
PORT /* verilator public */ = 4'b0100,
IRQ /* verilator public */ = 4'b1110;
modport ArbiterPorts (
input reset,
input clk,
input req,
input reqdata,
input reqtag,
output resp,
output resptag,
input reqcyc,
output respcyc,
output reqack,
input respack
);
modport CachePorts (
input reset,
input clk,
output req,
output reqdata,
output reqtag,
input resp,
input resptag,
output reqcyc,
input respcyc,
input reqack,
output respack
);
endinterface