-
Notifications
You must be signed in to change notification settings - Fork 7
/
dma_axi_if.sv
172 lines (163 loc) · 3.26 KB
/
dma_axi_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
`ifndef DMA_AXI_IF_SV
`define DMA_AXI_IF_SV
interface dma_axi_if (
input clk,
input rst
);
import axi_data_types_pkg::*;
axi_id awid;
axi_address awaddr;
axi_burst_length awlen;
axi_burst_size awsize;
bit awvalid;
bit awready;
bit awack;
// axi_id awburst;
axi_id wid;
axi_data wdata;
axi_strobe wstrb;
bit wlast;
bit wvalid;
bit wready;
bit wack;
axi_id bid;
axi_response bresp;
bit bvalid;
bit bready;
bit back;
axi_id arid;
axi_address araddr;
axi_burst_length arlen;
axi_burst_size arsize;
bit arvalid;
bit arready;
bit arack;
// axi_id arburst;
axi_id rid;
axi_data rdata;
axi_response rresp;
bit rlast;
bit rvalid;
bit rready;
bit rack;
assign awack = (awvalid && awready) ? '1 : '0;
assign wack = (wvalid && wready) ? '1 : '0;
assign back = (bvalid && bready) ? '1 : '0;
assign arack = (arvalid && arready) ? '1 : '0;
assign rack = (rvalid && rready) ? '1 : '0;
clocking master_cb @(posedge clk);
output awid;
output awaddr;
output awlen;
output awsize;
output awvalid;
input awready;
input awack;
// output awburst;
output wid;
output wdata;
output wstrb;
output wlast;
output wvalid;
input wready;
input wack;
input bid;
input bresp;
input bvalid;
output bready;
input back;
output arid;
output araddr;
output arlen;
output arsize;
output arvalid;
input arready;
input arack;
// output arqos;
// output arburst;
input rid;
input rdata;
input rresp;
input rlast;
input rvalid;
output rready;
input rack;
endclocking
clocking slave_cb @(posedge clk);
input awid;
input awaddr;
input awlen;
input awsize;
input awvalid;
output awready;
input awack;
// input awburst;
input wid;
input wdata;
input wstrb;
input wlast;
input wvalid;
output wready;
input wack;
output bid;
output bresp;
output bvalid;
input bready;
input back;
input arid;
input araddr;
input arlen;
input arsize;
input arvalid;
output arready;
input arack;
// input arqos;
// input arburst;
output rid;
output rdata;
output rresp;
output rlast;
output rvalid;
input rready;
input rack;
endclocking
clocking monitor_cb @(posedge clk);
input awid;
input awaddr;
input awlen;
input awsize;
input awvalid;
input awready;
input awack;
// input awburst;
input wid;
input wdata;
input wstrb;
input wlast;
input wvalid;
input wready;
input wack;
input bid;
input bresp;
input bvalid;
input bready;
input back;
input arid;
input araddr;
input arlen;
input arsize;
input arvalid;
input arready;
input arack;
// input arqos;
// input arburst;
input rid;
input rdata;
input rresp;
input rlast;
input rvalid;
input rready;
input rack;
endclocking
endinterface : dma_axi_if
`endif