-
Notifications
You must be signed in to change notification settings - Fork 0
/
rggen_axi4lite_if.veryl
146 lines (136 loc) · 3.15 KB
/
rggen_axi4lite_if.veryl
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
import rggen_rtl_pkg::*;
pub interface rggen_axi4lite_if #(
param ID_WIDTH: u32 = 0,
param ADDRESS_WIDTH: u32 = 16,
param BUS_WIDTH: u32 = 32
) {
const IDW: u32 = clip_width(ID_WIDTH);
var awready: logic;
var awvalid: logic;
var awid: logic<IDW>;
var awaddr: logic<ADDRESS_WIDTH>;
var awprot: logic<3>;
var wready: logic;
var wvalid: logic;
var wdata: logic<BUS_WIDTH>;
var wstrb: logic<BUS_WIDTH/8>;
var bready: logic;
var bvalid: logic;
var bid: logic<IDW>;
var bresp: logic<2>;
var arready: logic;
var arvalid: logic;
var arid: logic<IDW>;
var araddr: logic<ADDRESS_WIDTH>;
var arprot: logic<3>;
var rready: logic;
var rvalid: logic;
var rid: logic<IDW>;
var rresp: logic<2>;
var rdata: logic<BUS_WIDTH>;
function awaddr_ack() -> logic {
return awvalid && awready;
}
function wdata_ack() -> logic {
return wvalid && wready;
}
function bresp_ack() -> logic {
return bvalid && bready;
}
function araddr_ack() -> logic {
return arvalid && arready;
}
function rresp_ack() -> logic {
return rvalid && rready;
}
modport master {
awready: input,
awvalid: output,
awid: output,
awaddr: output,
awprot: output,
wready: input,
wvalid: output,
wdata: output,
wstrb: output,
bready: output,
bvalid: input,
bid: input,
bresp: input,
arready: input,
arvalid: output,
arid: output,
araddr: output,
arprot: output,
rready: output,
rvalid: input,
rid: input,
rresp: input,
rdata: input,
awaddr_ack: import,
wdata_ack: import,
bresp_ack: import,
araddr_ack: import,
rresp_ack: import
}
modport slave {
awready: output,
awvalid: input,
awid: input,
awaddr: input,
awprot: input,
wready: output,
wvalid: input,
wdata: input,
wstrb: input,
bready: input,
bvalid: output,
bid: output,
bresp: output,
arready: output,
arvalid: input,
arid: input,
araddr: input,
arprot: input,
rready: input,
rvalid: output,
rid: output,
rresp: output,
rdata: output,
awaddr_ack: import,
wdata_ack: import,
bresp_ack: import,
araddr_ack: import,
rresp_ack: import
}
modport monitor {
awready: input,
awvalid: input,
awid: input,
awaddr: input,
awprot: input,
wready: input,
wvalid: input,
wdata: input,
wstrb: input,
bready: input,
bvalid: input,
bid: input,
bresp: input,
arready: input,
arvalid: input,
arid: input,
araddr: input,
arprot: input,
rready: input,
rvalid: input,
rid: input,
rresp: input,
rdata: input,
awaddr_ack: import,
wdata_ack: import,
bresp_ack: import,
araddr_ack: import,
rresp_ack: import
}
}