-
Notifications
You must be signed in to change notification settings - Fork 1
/
adapter_8_32.v
116 lines (95 loc) · 3.93 KB
/
adapter_8_32.v
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
`timescale 1ns / 1ps
module adapter_8_32(
input wire clk,
input wire rst,
// S AXI
input wire [31:0] s_axi_awaddr, // write address
input wire [2:0] s_axi_awprot, // write channel protection type
input wire s_axi_awvalid,// write address valid
output wire s_axi_awready,// write address ready
input wire [31:0] s_axi_wdata, // write data channel
input wire [3:0] s_axi_wstrb, // valid lanes
input wire s_axi_wvalid, // write valid
output wire s_axi_wready, // write ready
output wire [1:0] s_axi_bresp, // write response channel
output wire s_axi_bvalid, // write response channel valid
input wire s_axi_bready, // write response channel ready
input wire [31:0] s_axi_araddr, // read address
input wire [2:0] s_axi_arprot, // read channel protection type
input wire s_axi_arvalid,// read address valid
output wire s_axi_arready,// read address ready
output wire [31:0] s_axi_rdata, // read data
output wire s_axi_rvalid, // read valid
input wire s_axi_rready, // read ready
output wire [1:0] s_axi_rresp, // read response
// M AXI
output wire [31:0] m_axi_awaddr, // write address
output wire [2:0] m_axi_awprot, // write channel protection type
output wire m_axi_awvalid,// write address valid
input wire m_axi_awready,// write address ready
output wire [31:0] m_axi_wdata, // write data channel
output wire [3:0] m_axi_wstrb, // valid lanes
output wire m_axi_wvalid, // write valid
input wire m_axi_wready, // write ready
input wire [1:0] m_axi_bresp, // write response channel
input wire m_axi_bvalid, // write response channel valid
output wire m_axi_bready, // write response channel ready
output wire [31:0] m_axi_araddr, // read address
output wire [2:0] m_axi_arprot, // read channel protection type
output wire m_axi_arvalid,// read address valid
input wire m_axi_arready,// read address ready
input wire [31:0] m_axi_rdata, // read data
input wire m_axi_rvalid, // read valid
output wire m_axi_rready, // read ready
input wire [1:0] m_axi_rresp, // read response
// control
input wire [3:0] araddr_res // address residual
);
adapter_8_32_w w_inst(
.clk(clk),
.rst(rst),
.s_axi_awaddr(s_axi_awaddr),
.s_axi_awprot(s_axi_awprot),
.s_axi_awvalid(s_axi_awvalid),
.s_axi_awready(s_axi_awready),
.s_axi_wdata(s_axi_wdata),
.s_axi_wstrb(s_axi_wstrb),
.s_axi_wvalid(s_axi_wvalid),
.s_axi_wready(s_axi_wready),
.s_axi_bresp(s_axi_bresp),
.s_axi_bvalid(s_axi_bvalid),
.s_axi_bready(s_axi_bready),
.m_axi_awaddr(m_axi_awaddr),
.m_axi_awprot(m_axi_awprot),
.m_axi_awvalid(m_axi_awvalid),
.m_axi_awready(m_axi_awready),
.m_axi_wdata(m_axi_wdata),
.m_axi_wstrb(m_axi_wstrb),
.m_axi_wvalid(m_axi_wvalid),
.m_axi_wready(m_axi_wready),
.m_axi_bresp(m_axi_bresp),
.m_axi_bvalid(m_axi_bvalid),
.m_axi_bready(m_axi_bready)
);
adapter_8_32_r r_inst(
.clk(clk),
.rst(rst),
.s_axi_araddr(s_axi_araddr),
.s_axi_arprot(s_axi_arprot),
.s_axi_arvalid(s_axi_arvalid),
.s_axi_arready(s_axi_arready),
.s_axi_rdata(s_axi_rdata),
.s_axi_rvalid(s_axi_rvalid),
.s_axi_rready(s_axi_rready),
.s_axi_rresp(s_axi_rresp),
.m_axi_araddr (m_axi_araddr ),
.m_axi_arprot (m_axi_arprot ),
.m_axi_arvalid(m_axi_arvalid),
.m_axi_arready(m_axi_arready),
.m_axi_rdata (m_axi_rdata ),
.m_axi_rvalid (m_axi_rvalid ),
.m_axi_rready (m_axi_rready ),
.m_axi_rresp (m_axi_rresp ),
.araddr_res (araddr_res )
);
endmodule