-
Notifications
You must be signed in to change notification settings - Fork 399
/
Copy pathaxi4_if.sv
183 lines (159 loc) · 3.59 KB
/
axi4_if.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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
//------------------------------------------------------------------------------
// axi4_if.sv
// published as part of https://github.com/pConst/basic_verilog
// Konstantin Pavlov, [email protected]
//------------------------------------------------------------------------------
// INFO ------------------------------------------------------------------------
// AXI4-M instantiation
//
interface axi4_if #( parameter
ADDR_W = 32,
DATA_W = 32,
ID_W = 8,
ARUSER_W = 0,
AWUSER_W = 0,
BUSER_W = 0,
RUSER_W = 0,
WUSER_W = 0
);
localparam STRB_W = DATA_W/8;
logic [ ADDR_W-1:0] araddr;
logic [ 1:0] arburst;
logic [ 3:0] arcache;
logic [ ID_W-1:0] arid;
logic [ 7:0] arlen;
logic [ 1:0] arlock;
logic [ 2:0] arprot;
logic [ 3:0] arqos;
logic arready;
logic [ 3:0] arregion;
logic [ 2:0] arsize;
logic [ARUSER_W-1:0] aruser;
logic arvalid;
logic [ ADDR_W-1:0] awaddr;
logic [ 1:0] awburst;
logic [ 3:0] awcache;
logic [ ID_W-1:0] awid;
logic [ 7:0] awlen;
logic [ 1:0] awlock;
logic [ 2:0] awprot;
logic [ 3:0] awqos;
logic awready;
logic [ 3:0] awregion;
logic [ 2:0] awsize;
logic [AWUSER_W-1:0] awuser;
logic awvalid;
logic [ ID_W-1:0] bid;
logic bready;
logic [ 1:0] bresp;
logic [ BUSER_W-1:0] buser;
logic bvalid;
logic [ DATA_W-1:0] rdata;
logic [ ID_W-1:0] rid;
logic rlast;
logic rready;
logic [ 1:0] rres
logic [ RUSER_W-1:0] ruser;
logic rvalid;
logic [ DATA_W-1:0] wdata;
logic wid;
logic wlast;
logic wready;
logic [ STRB_W-1:0] wstrb;
logic [ WUSER_W-1:0] wuser;
logic wvalid;
modport master_mp(
input arready,
input awready,
input bid,
input bresp,
input bvalid,
input rdata,
input rid,
input rlast,
input rresp,
input rvalid,
input wready,
output araddr,
output arburst,
output arcache,
output arid,
output arlen,
output arlock,
output arprot,
output arqos,
output arregion,
output arsize,
output aruser,
output arvalid,
output awaddr,
output awburst,
output awcache,
output awid,
output awlen,
output awlock,
output awprot,
output awqos,
output awregion,
output awsize,
output awuser,
output awvalid,
output bready,
output buser,
output rready,
output ruser,
output wdata,
output wid,
output wlast,
output wstrb,
output wuser,
output wvalid
);
modport slave_mp(
input araddr,
input arburst,
input arcache,
input arid,
input arlen,
input arlock,
input arprot,
input arqos,
input arregion,
input arsize,
input aruser,
input arvalid,
input awaddr,
input awburst,
input awcache,
input awid,
input awlen,
input awlock,
input awprot,
input awqos,
input awregion,
input awsize,
input awuser,
input awvalid,
input bready,
input buser,
input rready,
input ruser,
input wdata,
input wid,
input wlast,
input wstrb,
input wuser,
input wvalid,
output arready,
output awready,
output bid,
output bresp,
output bvalid,
output rdata,
output rid,
output rlast,
output rresp,
output rvalid,
output wready
);
endinterface