-
Notifications
You must be signed in to change notification settings - Fork 7
/
axi_intf.sv
89 lines (71 loc) · 2.28 KB
/
axi_intf.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
// // Copyright (c) 2014-2018 ETH Zurich, University of Bologna
// //
// // Copyright and related rights are licensed under the Solderpad Hardware
// // License, Version 0.51 (the "License"); you may not use this file except in
// // compliance with the License. You may obtain a copy of the License at
// // http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law
// // or agreed to in writing, software, hardware and materials distributed under
// // this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// // CONDITIONS OF ANY KIND, either express or implied. See the License for the
// // specific language governing permissions and limitations under the License.
// //
// // Fabian Schuiki <[email protected]>
// //
// // This file defines the interfaces we support.
// /// An AXI4-Lite interface.
// interface AXI_LITE #(
// parameter AXI_ADDR_WIDTH = -1,
// parameter AXI_DATA_WIDTH = -1
// );
// import axi_pkg::*;
// localparam AXI_STRB_WIDTH = AXI_DATA_WIDTH / 8;
// typedef logic [AXI_ADDR_WIDTH-1:0] addr_t;
// typedef logic [AXI_DATA_WIDTH-1:0] data_t;
// typedef logic [AXI_STRB_WIDTH-1:0] strb_t;
// // AW channel
// addr_t aw_addr;
// logic aw_valid;
// logic aw_ready;
// data_t w_data;
// strb_t w_strb;
// logic w_valid;
// logic w_ready;
// resp_t b_resp;
// logic b_valid;
// logic b_ready;
// addr_t ar_addr;
// logic ar_valid;
// logic ar_ready;
// data_t r_data;
// resp_t r_resp;
// logic r_valid;
// logic r_ready;
// modport Master (
// output aw_addr, aw_valid, input aw_ready,
// output w_data, w_strb, w_valid, input w_ready,
// input b_resp, b_valid, output b_ready,
// output ar_addr, ar_valid, input ar_ready,
// input r_data, r_resp, r_valid, output r_ready
// );
// endinterface
package axi_master;
typedef struct packed {
axi_pkg::addr_t aw_addr;
logic aw_valid;
logic aw_ready;
axi_pkg::data_t w_data;
axi_pkg::strb_t w_strb;
logic w_valid;
logic w_ready;
axi_pkg::resp_t b_resp;
logic b_valid;
logic b_ready;
axi_pkg::addr_t ar_addr;
logic ar_valid;
logic ar_ready;
axi_pkg::data_t r_data;
axi_pkg::resp_t r_resp;
logic r_valid;
logic r_ready;
} master_t;
endpackage