soc_maker 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +5 -0
- data/History.txt +4 -0
- data/LICENSE +678 -0
- data/README.rdoc +228 -0
- data/Rakefile +46 -0
- data/bin/soc_maker_cli +80 -0
- data/bin/soc_maker_parser +85 -0
- data/core_lib/cores/adv_debug_sys/01_adv_debug_sys.yaml +245 -0
- data/core_lib/cores/or1200_rel2/01_or1200.yaml +208 -0
- data/core_lib/cores/or1200_rel2/02_or1200_files.yaml +421 -0
- data/core_lib/cores/or1200_rel2/03_or1200_sparam.yaml +188 -0
- data/core_lib/cores/or1200_rel2/or1200_defines.v.in +1799 -0
- data/core_lib/cores/ram_wb/ram_wb.yaml +102 -0
- data/core_lib/cores/ram_wb/ram_wb_b3.v.in +259 -0
- data/core_lib/cores/uart16550/01_uart16550.yaml +99 -0
- data/core_lib/cores/uart16550/02_uart16550_files.yaml +70 -0
- data/core_lib/cores/wb_connect/minsoc_tc_top.v +1802 -0
- data/core_lib/cores/wb_connect/wb_connect.yaml +733 -0
- data/core_lib/inc.yaml +13 -0
- data/core_lib/interfaces/clk_rst/clk.yaml +9 -0
- data/core_lib/interfaces/clk_rst/rst.yaml +9 -0
- data/core_lib/interfaces/clk_rst/single.yaml +7 -0
- data/core_lib/interfaces/debug/debug.yaml +32 -0
- data/core_lib/interfaces/jtag/jtag.yaml +13 -0
- data/core_lib/interfaces/jtag/jtag_tap.yaml +22 -0
- data/core_lib/interfaces/power/or_power.yaml +25 -0
- data/core_lib/interfaces/uart/uart.yaml +21 -0
- data/core_lib/interfaces/wishbone/wishbone_ma_b3.yaml +54 -0
- data/core_lib/interfaces/wishbone/wishbone_sl_b3.yaml +51 -0
- data/doc/class_arch.uml +5113 -0
- data/doc/fig/hierarchical.svg +273 -0
- data/examples/or1200_test/or1200_test.cmd +78 -0
- data/examples/or1200_test/or1200_test.rb +136 -0
- data/examples/or1200_test/rtl/or1200_test_top.vhd +274 -0
- data/examples/or1200_test/rtl/s3astarter.ucf +10 -0
- data/examples/or1200_test/rtl/xilinx_internal_jtag.v +438 -0
- data/examples/or1200_test/rtl/xilinx_internal_jtag_options.v +12 -0
- data/examples/or1200_test/sw/README.txt +35 -0
- data/examples/or1200_test/sw/bin2vmem.c +159 -0
- data/examples/or1200_test/sw/board.h +24 -0
- data/examples/or1200_test/sw/compile.sh +18 -0
- data/examples/or1200_test/sw/except.S +152 -0
- data/examples/or1200_test/sw/int.c +79 -0
- data/examples/or1200_test/sw/int.h +14 -0
- data/examples/or1200_test/sw/interconnect.h +17 -0
- data/examples/or1200_test/sw/interrupts.c +14 -0
- data/examples/or1200_test/sw/main.c +16 -0
- data/examples/or1200_test/sw/or1200.h +454 -0
- data/examples/or1200_test/sw/orp.ld +60 -0
- data/examples/or1200_test/sw/reset.S +112 -0
- data/examples/or1200_test/sw/support.c +123 -0
- data/examples/or1200_test/sw/support.h +33 -0
- data/examples/or1200_test/sw/tick.c +30 -0
- data/examples/or1200_test/sw/tick.h +2 -0
- data/examples/or1200_test/sw/uart.c +136 -0
- data/examples/or1200_test/sw/uart.h +126 -0
- data/lib/soc_maker.rb +324 -0
- data/lib/soc_maker/cli.rb +544 -0
- data/lib/soc_maker/conf.rb +310 -0
- data/lib/soc_maker/core_def.rb +579 -0
- data/lib/soc_maker/core_inst.rb +305 -0
- data/lib/soc_maker/err.rb +211 -0
- data/lib/soc_maker/hdl_coder.rb +500 -0
- data/lib/soc_maker/hdl_file.rb +166 -0
- data/lib/soc_maker/hdl_parser.rb +431 -0
- data/lib/soc_maker/ifc_def.rb +193 -0
- data/lib/soc_maker/ifc_port.rb +133 -0
- data/lib/soc_maker/ifc_spc.rb +180 -0
- data/lib/soc_maker/lib.rb +289 -0
- data/lib/soc_maker/lib_inc.rb +109 -0
- data/lib/soc_maker/parameter.rb +149 -0
- data/lib/soc_maker/soc_def.rb +847 -0
- data/lib/soc_maker/sparameter.rb +289 -0
- data/lib/soc_maker/version.rb +8 -0
- data/lib/soc_maker/ypp.rb +130 -0
- data/soc_maker.gemspec +28 -0
- data/spec/cli_cmds1.txt +39 -0
- data/spec/cli_spec.rb +49 -0
- data/spec/conf_spec.rb +44 -0
- data/spec/core_def_spec.rb +503 -0
- data/spec/core_inst_spec.rb +169 -0
- data/spec/hdl_file_spec.rb +154 -0
- data/spec/hdl_parser_spec.rb +201 -0
- data/spec/ifc_def_spec.rb +121 -0
- data/spec/ifc_port_spec.rb +92 -0
- data/spec/ifc_spc_spec.rb +196 -0
- data/spec/lib_inc_spec.rb +99 -0
- data/spec/lib_spec.rb +209 -0
- data/spec/parameter_spec.rb +86 -0
- data/spec/soc_def_spec.rb +611 -0
- data/spec/soc_maker_spec.rb +7 -0
- data/spec/sparameter_spec.rb +182 -0
- data/spec/spec_helper.rb +78 -0
- data/spec/test_soc.yaml +105 -0
- data/spec/test_soc2.yaml +60 -0
- data/spec/test_soc_lib/cores/core_A_rel1/00_core_a.yaml +75 -0
- data/spec/test_soc_lib/cores/core_A_rel1/01_core_a.yaml +57 -0
- data/spec/test_soc_lib/cores/core_A_rel1/core_a.vhd +29 -0
- data/spec/test_soc_lib/cores/core_A_rel1/core_a_pkg.vhd.src +3 -0
- data/spec/test_soc_lib/cores/core_A_rel1/core_a_pkg2.vhd.src +4 -0
- data/spec/test_soc_lib/cores/core_A_rel1/core_a_pkg3.v.src +6 -0
- data/spec/test_soc_lib/cores/core_B_rel1/core_b.vhd +25 -0
- data/spec/test_soc_lib/cores/core_B_rel1/core_b.yaml +36 -0
- data/spec/test_soc_lib/cores/core_C_v1/core_C.vhd +57 -0
- data/spec/test_soc_lib/cores/core_C_v1/core_c.yaml +42 -0
- data/spec/test_soc_lib/cores/soc_A/soc_A.yaml +12 -0
- data/spec/test_soc_lib/cores/soc_maker_include.yaml +6 -0
- data/spec/test_soc_lib/ifcs/core_AB_ifc/bidir_ifc.yaml +19 -0
- data/spec/test_soc_lib/ifcs/core_AB_ifc/core_AB_ifc.yaml +15 -0
- data/spec/test_soc_lib/ifcs/core_AB_ifc/top_ifc.yaml +9 -0
- data/spec/test_soc_lib/soc_maker_include.yaml +4 -0
- data/spec/yaml_examples.rb +367 -0
- data/spec/ypp_spec.rb +156 -0
- data/test/test_soc_maker.rb +0 -0
- metadata +255 -0
@@ -0,0 +1,70 @@
|
|
1
|
+
hdlfiles:
|
2
|
+
:raminfr: SOCM_HDL_FILE
|
3
|
+
use_syn: true
|
4
|
+
use_sim: true
|
5
|
+
type: verilog
|
6
|
+
path: rtl/verilog/raminfr.v
|
7
|
+
:timescale: SOCM_HDL_FILE
|
8
|
+
use_syn: true
|
9
|
+
use_sim: true
|
10
|
+
type: verilog
|
11
|
+
path: rtl/verilog/timescale.v
|
12
|
+
:uart_debug_if: SOCM_HDL_FILE
|
13
|
+
use_syn: true
|
14
|
+
use_sim: true
|
15
|
+
type: verilog
|
16
|
+
path: rtl/verilog/uart_debug_if.v
|
17
|
+
|
18
|
+
:uart_defines: SOCM_HDL_FILE
|
19
|
+
use_syn: true
|
20
|
+
use_sim: true
|
21
|
+
type: verilog
|
22
|
+
path: rtl/verilog/uart_defines.v
|
23
|
+
|
24
|
+
:uart_receiver: SOCM_HDL_FILE
|
25
|
+
use_syn: true
|
26
|
+
use_sim: true
|
27
|
+
type: verilog
|
28
|
+
path: rtl/verilog/uart_receiver.v
|
29
|
+
|
30
|
+
:uart_regs: SOCM_HDL_FILE
|
31
|
+
use_syn: true
|
32
|
+
use_sim: true
|
33
|
+
type: verilog
|
34
|
+
path: rtl/verilog/uart_regs.v
|
35
|
+
|
36
|
+
:uart_rfifo: SOCM_HDL_FILE
|
37
|
+
use_syn: true
|
38
|
+
use_sim: true
|
39
|
+
type: verilog
|
40
|
+
path: rtl/verilog/uart_rfifo.v
|
41
|
+
|
42
|
+
:uart_sync_flops: SOCM_HDL_FILE
|
43
|
+
use_syn: true
|
44
|
+
use_sim: true
|
45
|
+
type: verilog
|
46
|
+
path: rtl/verilog/uart_sync_flops.v
|
47
|
+
|
48
|
+
:uart_tfifo: SOCM_HDL_FILE
|
49
|
+
use_syn: true
|
50
|
+
use_sim: true
|
51
|
+
type: verilog
|
52
|
+
path: rtl/verilog/uart_tfifo.v
|
53
|
+
|
54
|
+
:uart_top: SOCM_HDL_FILE
|
55
|
+
use_syn: true
|
56
|
+
use_sim: true
|
57
|
+
type: verilog
|
58
|
+
path: rtl/verilog/uart_top.v
|
59
|
+
|
60
|
+
:uart_transmitter: SOCM_HDL_FILE
|
61
|
+
use_syn: true
|
62
|
+
use_sim: true
|
63
|
+
type: verilog
|
64
|
+
path: rtl/verilog/uart_transmitter.v
|
65
|
+
|
66
|
+
:uart_tb: SOCM_HDL_FILE
|
67
|
+
use_syn: true
|
68
|
+
use_sim: true
|
69
|
+
type: verilog
|
70
|
+
path: rtl/verilog/uart_wb.v
|
@@ -0,0 +1,1802 @@
|
|
1
|
+
//////////////////////////////////////////////////////////////////////
|
2
|
+
//// ////
|
3
|
+
//// Xess Traffic Cop ////
|
4
|
+
//// ////
|
5
|
+
//// This file is part of the OR1K test application ////
|
6
|
+
//// http://www.opencores.org/cores/or1k/ ////
|
7
|
+
//// ////
|
8
|
+
//// Description ////
|
9
|
+
//// This block connectes the RISC and peripheral controller ////
|
10
|
+
//// cores together. ////
|
11
|
+
//// ////
|
12
|
+
//// To Do: ////
|
13
|
+
//// - nothing really ////
|
14
|
+
//// ////
|
15
|
+
//// Author(s): ////
|
16
|
+
//// - Damjan Lampret, lampret@opencores.org ////
|
17
|
+
//// ////
|
18
|
+
//////////////////////////////////////////////////////////////////////
|
19
|
+
//// ////
|
20
|
+
//// Copyright (C) 2002 OpenCores ////
|
21
|
+
//// ////
|
22
|
+
//// This source file may be used and distributed without ////
|
23
|
+
//// restriction provided that this copyright statement is not ////
|
24
|
+
//// removed from the file and that any derivative work contains ////
|
25
|
+
//// the original copyright notice and the associated disclaimer. ////
|
26
|
+
//// ////
|
27
|
+
//// This source file is free software; you can redistribute it ////
|
28
|
+
//// and/or modify it under the terms of the GNU Lesser General ////
|
29
|
+
//// Public License as published by the Free Software Foundation; ////
|
30
|
+
//// either version 2.1 of the License, or (at your option) any ////
|
31
|
+
//// later version. ////
|
32
|
+
//// ////
|
33
|
+
//// This source is distributed in the hope that it will be ////
|
34
|
+
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
35
|
+
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
36
|
+
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
37
|
+
//// details. ////
|
38
|
+
//// ////
|
39
|
+
//// You should have received a copy of the GNU Lesser General ////
|
40
|
+
//// Public License along with this source; if not, download it ////
|
41
|
+
//// from http://www.opencores.org/lgpl.shtml ////
|
42
|
+
//// ////
|
43
|
+
//////////////////////////////////////////////////////////////////////
|
44
|
+
//
|
45
|
+
// CVS Revision History
|
46
|
+
//
|
47
|
+
// $Log: tc_top.v,v $
|
48
|
+
// Revision 1.4 2004/04/05 08:44:34 lampret
|
49
|
+
// Merged branch_qmem into main tree.
|
50
|
+
//
|
51
|
+
// Revision 1.2 2002/03/29 20:57:30 lampret
|
52
|
+
// Removed unused ports wb_clki and wb_rst_i
|
53
|
+
//
|
54
|
+
// Revision 1.1.1.1 2002/03/21 16:55:44 lampret
|
55
|
+
// First import of the "new" XESS XSV environment.
|
56
|
+
//
|
57
|
+
//
|
58
|
+
//
|
59
|
+
|
60
|
+
// synopsys translate_off
|
61
|
+
`include "timescale.v"
|
62
|
+
// synopsys translate_on
|
63
|
+
|
64
|
+
//
|
65
|
+
// Width of address bus
|
66
|
+
//
|
67
|
+
`define TC_AW 32
|
68
|
+
|
69
|
+
//
|
70
|
+
// Width of data bus
|
71
|
+
//
|
72
|
+
`define TC_DW 32
|
73
|
+
|
74
|
+
//
|
75
|
+
// Width of byte select bus
|
76
|
+
//
|
77
|
+
`define TC_BSW 4
|
78
|
+
|
79
|
+
//
|
80
|
+
// Width of WB target inputs (coming from WB slave)
|
81
|
+
//
|
82
|
+
// data bus width + ack + err
|
83
|
+
//
|
84
|
+
`define TC_TIN_W `TC_DW+1+1
|
85
|
+
|
86
|
+
//
|
87
|
+
// Width of WB initiator inputs (coming from WB masters)
|
88
|
+
//
|
89
|
+
// cyc + stb + address bus width +
|
90
|
+
// byte select bus width + we + data bus width
|
91
|
+
//
|
92
|
+
`define TC_IIN_W 1+1+`TC_AW+`TC_BSW+1+`TC_DW
|
93
|
+
|
94
|
+
//
|
95
|
+
// Traffic Cop Top
|
96
|
+
//
|
97
|
+
module minsoc_tc_top (
|
98
|
+
wb_clk_i,
|
99
|
+
wb_rst_i,
|
100
|
+
|
101
|
+
i0_wb_clk_o,
|
102
|
+
i0_wb_rst_o,
|
103
|
+
i0_wb_cyc_i,
|
104
|
+
i0_wb_stb_i,
|
105
|
+
i0_wb_adr_i,
|
106
|
+
i0_wb_sel_i,
|
107
|
+
i0_wb_we_i,
|
108
|
+
i0_wb_dat_i,
|
109
|
+
i0_wb_dat_o,
|
110
|
+
i0_wb_ack_o,
|
111
|
+
i0_wb_err_o,
|
112
|
+
|
113
|
+
i1_wb_clk_o,
|
114
|
+
i1_wb_rst_o,
|
115
|
+
i1_wb_cyc_i,
|
116
|
+
i1_wb_stb_i,
|
117
|
+
i1_wb_adr_i,
|
118
|
+
i1_wb_sel_i,
|
119
|
+
i1_wb_we_i,
|
120
|
+
i1_wb_dat_i,
|
121
|
+
i1_wb_dat_o,
|
122
|
+
i1_wb_ack_o,
|
123
|
+
i1_wb_err_o,
|
124
|
+
|
125
|
+
i2_wb_clk_o,
|
126
|
+
i2_wb_rst_o,
|
127
|
+
i2_wb_cyc_i,
|
128
|
+
i2_wb_stb_i,
|
129
|
+
i2_wb_adr_i,
|
130
|
+
i2_wb_sel_i,
|
131
|
+
i2_wb_we_i,
|
132
|
+
i2_wb_dat_i,
|
133
|
+
i2_wb_dat_o,
|
134
|
+
i2_wb_ack_o,
|
135
|
+
i2_wb_err_o,
|
136
|
+
|
137
|
+
i3_wb_clk_o,
|
138
|
+
i3_wb_rst_o,
|
139
|
+
i3_wb_cyc_i,
|
140
|
+
i3_wb_stb_i,
|
141
|
+
i3_wb_adr_i,
|
142
|
+
i3_wb_sel_i,
|
143
|
+
i3_wb_we_i,
|
144
|
+
i3_wb_dat_i,
|
145
|
+
i3_wb_dat_o,
|
146
|
+
i3_wb_ack_o,
|
147
|
+
i3_wb_err_o,
|
148
|
+
|
149
|
+
i4_wb_clk_o,
|
150
|
+
i4_wb_rst_o,
|
151
|
+
i4_wb_cyc_i,
|
152
|
+
i4_wb_stb_i,
|
153
|
+
i4_wb_adr_i,
|
154
|
+
i4_wb_sel_i,
|
155
|
+
i4_wb_we_i,
|
156
|
+
i4_wb_dat_i,
|
157
|
+
i4_wb_dat_o,
|
158
|
+
i4_wb_ack_o,
|
159
|
+
i4_wb_err_o,
|
160
|
+
|
161
|
+
i5_wb_clk_o,
|
162
|
+
i5_wb_rst_o,
|
163
|
+
i5_wb_cyc_i,
|
164
|
+
i5_wb_stb_i,
|
165
|
+
i5_wb_adr_i,
|
166
|
+
i5_wb_sel_i,
|
167
|
+
i5_wb_we_i,
|
168
|
+
i5_wb_dat_i,
|
169
|
+
i5_wb_dat_o,
|
170
|
+
i5_wb_ack_o,
|
171
|
+
i5_wb_err_o,
|
172
|
+
|
173
|
+
i6_wb_clk_o,
|
174
|
+
i6_wb_rst_o,
|
175
|
+
i6_wb_cyc_i,
|
176
|
+
i6_wb_stb_i,
|
177
|
+
i6_wb_adr_i,
|
178
|
+
i6_wb_sel_i,
|
179
|
+
i6_wb_we_i,
|
180
|
+
i6_wb_dat_i,
|
181
|
+
i6_wb_dat_o,
|
182
|
+
i6_wb_ack_o,
|
183
|
+
i6_wb_err_o,
|
184
|
+
|
185
|
+
i7_wb_clk_o,
|
186
|
+
i7_wb_rst_o,
|
187
|
+
i7_wb_cyc_i,
|
188
|
+
i7_wb_stb_i,
|
189
|
+
i7_wb_adr_i,
|
190
|
+
i7_wb_sel_i,
|
191
|
+
i7_wb_we_i,
|
192
|
+
i7_wb_dat_i,
|
193
|
+
i7_wb_dat_o,
|
194
|
+
i7_wb_ack_o,
|
195
|
+
i7_wb_err_o,
|
196
|
+
|
197
|
+
t0_wb_clk_o,
|
198
|
+
t0_wb_rst_o,
|
199
|
+
t0_wb_cyc_o,
|
200
|
+
t0_wb_stb_o,
|
201
|
+
t0_wb_adr_o,
|
202
|
+
t0_wb_sel_o,
|
203
|
+
t0_wb_we_o,
|
204
|
+
t0_wb_dat_o,
|
205
|
+
t0_wb_dat_i,
|
206
|
+
t0_wb_ack_i,
|
207
|
+
t0_wb_err_i,
|
208
|
+
|
209
|
+
t1_wb_clk_o,
|
210
|
+
t1_wb_rst_o,
|
211
|
+
t1_wb_cyc_o,
|
212
|
+
t1_wb_stb_o,
|
213
|
+
t1_wb_adr_o,
|
214
|
+
t1_wb_sel_o,
|
215
|
+
t1_wb_we_o,
|
216
|
+
t1_wb_dat_o,
|
217
|
+
t1_wb_dat_i,
|
218
|
+
t1_wb_ack_i,
|
219
|
+
t1_wb_err_i,
|
220
|
+
|
221
|
+
t2_wb_clk_o,
|
222
|
+
t2_wb_rst_o,
|
223
|
+
t2_wb_cyc_o,
|
224
|
+
t2_wb_stb_o,
|
225
|
+
t2_wb_adr_o,
|
226
|
+
t2_wb_sel_o,
|
227
|
+
t2_wb_we_o,
|
228
|
+
t2_wb_dat_o,
|
229
|
+
t2_wb_dat_i,
|
230
|
+
t2_wb_ack_i,
|
231
|
+
t2_wb_err_i,
|
232
|
+
|
233
|
+
t3_wb_clk_o,
|
234
|
+
t3_wb_rst_o,
|
235
|
+
t3_wb_cyc_o,
|
236
|
+
t3_wb_stb_o,
|
237
|
+
t3_wb_adr_o,
|
238
|
+
t3_wb_sel_o,
|
239
|
+
t3_wb_we_o,
|
240
|
+
t3_wb_dat_o,
|
241
|
+
t3_wb_dat_i,
|
242
|
+
t3_wb_ack_i,
|
243
|
+
t3_wb_err_i,
|
244
|
+
|
245
|
+
t4_wb_clk_o,
|
246
|
+
t4_wb_rst_o,
|
247
|
+
t4_wb_cyc_o,
|
248
|
+
t4_wb_stb_o,
|
249
|
+
t4_wb_adr_o,
|
250
|
+
t4_wb_sel_o,
|
251
|
+
t4_wb_we_o,
|
252
|
+
t4_wb_dat_o,
|
253
|
+
t4_wb_dat_i,
|
254
|
+
t4_wb_ack_i,
|
255
|
+
t4_wb_err_i,
|
256
|
+
|
257
|
+
t5_wb_clk_o,
|
258
|
+
t5_wb_rst_o,
|
259
|
+
t5_wb_cyc_o,
|
260
|
+
t5_wb_stb_o,
|
261
|
+
t5_wb_adr_o,
|
262
|
+
t5_wb_sel_o,
|
263
|
+
t5_wb_we_o,
|
264
|
+
t5_wb_dat_o,
|
265
|
+
t5_wb_dat_i,
|
266
|
+
t5_wb_ack_i,
|
267
|
+
t5_wb_err_i,
|
268
|
+
|
269
|
+
t6_wb_clk_o,
|
270
|
+
t6_wb_rst_o,
|
271
|
+
t6_wb_cyc_o,
|
272
|
+
t6_wb_stb_o,
|
273
|
+
t6_wb_adr_o,
|
274
|
+
t6_wb_sel_o,
|
275
|
+
t6_wb_we_o,
|
276
|
+
t6_wb_dat_o,
|
277
|
+
t6_wb_dat_i,
|
278
|
+
t6_wb_ack_i,
|
279
|
+
t6_wb_err_i,
|
280
|
+
|
281
|
+
t7_wb_clk_o,
|
282
|
+
t7_wb_rst_o,
|
283
|
+
t7_wb_cyc_o,
|
284
|
+
t7_wb_stb_o,
|
285
|
+
t7_wb_adr_o,
|
286
|
+
t7_wb_sel_o,
|
287
|
+
t7_wb_we_o,
|
288
|
+
t7_wb_dat_o,
|
289
|
+
t7_wb_dat_i,
|
290
|
+
t7_wb_ack_i,
|
291
|
+
t7_wb_err_i,
|
292
|
+
|
293
|
+
t8_wb_clk_o,
|
294
|
+
t8_wb_rst_o,
|
295
|
+
t8_wb_cyc_o,
|
296
|
+
t8_wb_stb_o,
|
297
|
+
t8_wb_adr_o,
|
298
|
+
t8_wb_sel_o,
|
299
|
+
t8_wb_we_o,
|
300
|
+
t8_wb_dat_o,
|
301
|
+
t8_wb_dat_i,
|
302
|
+
t8_wb_ack_i,
|
303
|
+
t8_wb_err_i
|
304
|
+
|
305
|
+
);
|
306
|
+
|
307
|
+
//
|
308
|
+
// Parameters
|
309
|
+
//
|
310
|
+
parameter t0_addr_w = 4;
|
311
|
+
parameter t0_addr = 4'd8;
|
312
|
+
parameter t1_addr_w = 4;
|
313
|
+
parameter t1_addr = 4'd0;
|
314
|
+
parameter t28c_addr_w = 4;
|
315
|
+
parameter t28_addr = 4'd0;
|
316
|
+
parameter t28i_addr_w = 4;
|
317
|
+
parameter t2_addr = 4'd1;
|
318
|
+
parameter t3_addr = 4'd2;
|
319
|
+
parameter t4_addr = 4'd3;
|
320
|
+
parameter t5_addr = 4'd4;
|
321
|
+
parameter t6_addr = 4'd5;
|
322
|
+
parameter t7_addr = 4'd6;
|
323
|
+
parameter t8_addr = 4'd7;
|
324
|
+
|
325
|
+
//
|
326
|
+
// I/O Ports
|
327
|
+
//
|
328
|
+
input wb_clk_i;
|
329
|
+
input wb_rst_i;
|
330
|
+
|
331
|
+
//
|
332
|
+
// WB slave i/f connecting initiator 0
|
333
|
+
//
|
334
|
+
input i0_wb_cyc_i;
|
335
|
+
input i0_wb_stb_i;
|
336
|
+
input [`TC_AW-1:0] i0_wb_adr_i;
|
337
|
+
input [`TC_BSW-1:0] i0_wb_sel_i;
|
338
|
+
input i0_wb_we_i;
|
339
|
+
input [`TC_DW-1:0] i0_wb_dat_i;
|
340
|
+
output [`TC_DW-1:0] i0_wb_dat_o;
|
341
|
+
output i0_wb_ack_o;
|
342
|
+
output i0_wb_err_o;
|
343
|
+
|
344
|
+
//
|
345
|
+
// WB slave i/f connecting initiator 1
|
346
|
+
//
|
347
|
+
input i1_wb_cyc_i;
|
348
|
+
input i1_wb_stb_i;
|
349
|
+
input [`TC_AW-1:0] i1_wb_adr_i;
|
350
|
+
input [`TC_BSW-1:0] i1_wb_sel_i;
|
351
|
+
input i1_wb_we_i;
|
352
|
+
input [`TC_DW-1:0] i1_wb_dat_i;
|
353
|
+
output [`TC_DW-1:0] i1_wb_dat_o;
|
354
|
+
output i1_wb_ack_o;
|
355
|
+
output i1_wb_err_o;
|
356
|
+
|
357
|
+
//
|
358
|
+
// WB slave i/f connecting initiator 2
|
359
|
+
//
|
360
|
+
input i2_wb_cyc_i;
|
361
|
+
input i2_wb_stb_i;
|
362
|
+
input [`TC_AW-1:0] i2_wb_adr_i;
|
363
|
+
input [`TC_BSW-1:0] i2_wb_sel_i;
|
364
|
+
input i2_wb_we_i;
|
365
|
+
input [`TC_DW-1:0] i2_wb_dat_i;
|
366
|
+
output [`TC_DW-1:0] i2_wb_dat_o;
|
367
|
+
output i2_wb_ack_o;
|
368
|
+
output i2_wb_err_o;
|
369
|
+
|
370
|
+
//
|
371
|
+
// WB slave i/f connecting initiator 3
|
372
|
+
//
|
373
|
+
input i3_wb_cyc_i;
|
374
|
+
input i3_wb_stb_i;
|
375
|
+
input [`TC_AW-1:0] i3_wb_adr_i;
|
376
|
+
input [`TC_BSW-1:0] i3_wb_sel_i;
|
377
|
+
input i3_wb_we_i;
|
378
|
+
input [`TC_DW-1:0] i3_wb_dat_i;
|
379
|
+
output [`TC_DW-1:0] i3_wb_dat_o;
|
380
|
+
output i3_wb_ack_o;
|
381
|
+
output i3_wb_err_o;
|
382
|
+
|
383
|
+
//
|
384
|
+
// WB slave i/f connecting initiator 4
|
385
|
+
//
|
386
|
+
input i4_wb_cyc_i;
|
387
|
+
input i4_wb_stb_i;
|
388
|
+
input [`TC_AW-1:0] i4_wb_adr_i;
|
389
|
+
input [`TC_BSW-1:0] i4_wb_sel_i;
|
390
|
+
input i4_wb_we_i;
|
391
|
+
input [`TC_DW-1:0] i4_wb_dat_i;
|
392
|
+
output [`TC_DW-1:0] i4_wb_dat_o;
|
393
|
+
output i4_wb_ack_o;
|
394
|
+
output i4_wb_err_o;
|
395
|
+
|
396
|
+
//
|
397
|
+
// WB slave i/f connecting initiator 5
|
398
|
+
//
|
399
|
+
input i5_wb_cyc_i;
|
400
|
+
input i5_wb_stb_i;
|
401
|
+
input [`TC_AW-1:0] i5_wb_adr_i;
|
402
|
+
input [`TC_BSW-1:0] i5_wb_sel_i;
|
403
|
+
input i5_wb_we_i;
|
404
|
+
input [`TC_DW-1:0] i5_wb_dat_i;
|
405
|
+
output [`TC_DW-1:0] i5_wb_dat_o;
|
406
|
+
output i5_wb_ack_o;
|
407
|
+
output i5_wb_err_o;
|
408
|
+
|
409
|
+
//
|
410
|
+
// WB slave i/f connecting initiator 6
|
411
|
+
//
|
412
|
+
input i6_wb_cyc_i;
|
413
|
+
input i6_wb_stb_i;
|
414
|
+
input [`TC_AW-1:0] i6_wb_adr_i;
|
415
|
+
input [`TC_BSW-1:0] i6_wb_sel_i;
|
416
|
+
input i6_wb_we_i;
|
417
|
+
input [`TC_DW-1:0] i6_wb_dat_i;
|
418
|
+
output [`TC_DW-1:0] i6_wb_dat_o;
|
419
|
+
output i6_wb_ack_o;
|
420
|
+
output i6_wb_err_o;
|
421
|
+
|
422
|
+
//
|
423
|
+
// WB slave i/f connecting initiator 7
|
424
|
+
//
|
425
|
+
input i7_wb_cyc_i;
|
426
|
+
input i7_wb_stb_i;
|
427
|
+
input [`TC_AW-1:0] i7_wb_adr_i;
|
428
|
+
input [`TC_BSW-1:0] i7_wb_sel_i;
|
429
|
+
input i7_wb_we_i;
|
430
|
+
input [`TC_DW-1:0] i7_wb_dat_i;
|
431
|
+
output [`TC_DW-1:0] i7_wb_dat_o;
|
432
|
+
output i7_wb_ack_o;
|
433
|
+
output i7_wb_err_o;
|
434
|
+
|
435
|
+
//
|
436
|
+
// WB master i/f connecting target 0
|
437
|
+
//
|
438
|
+
output t0_wb_cyc_o;
|
439
|
+
output t0_wb_stb_o;
|
440
|
+
output [`TC_AW-1:0] t0_wb_adr_o;
|
441
|
+
output [`TC_BSW-1:0] t0_wb_sel_o;
|
442
|
+
output t0_wb_we_o;
|
443
|
+
output [`TC_DW-1:0] t0_wb_dat_o;
|
444
|
+
input [`TC_DW-1:0] t0_wb_dat_i;
|
445
|
+
input t0_wb_ack_i;
|
446
|
+
input t0_wb_err_i;
|
447
|
+
|
448
|
+
//
|
449
|
+
// WB master i/f connecting target 1
|
450
|
+
//
|
451
|
+
output t1_wb_cyc_o;
|
452
|
+
output t1_wb_stb_o;
|
453
|
+
output [`TC_AW-1:0] t1_wb_adr_o;
|
454
|
+
output [`TC_BSW-1:0] t1_wb_sel_o;
|
455
|
+
output t1_wb_we_o;
|
456
|
+
output [`TC_DW-1:0] t1_wb_dat_o;
|
457
|
+
input [`TC_DW-1:0] t1_wb_dat_i;
|
458
|
+
input t1_wb_ack_i;
|
459
|
+
input t1_wb_err_i;
|
460
|
+
|
461
|
+
//
|
462
|
+
// WB master i/f connecting target 2
|
463
|
+
//
|
464
|
+
output t2_wb_cyc_o;
|
465
|
+
output t2_wb_stb_o;
|
466
|
+
output [`TC_AW-1:0] t2_wb_adr_o;
|
467
|
+
output [`TC_BSW-1:0] t2_wb_sel_o;
|
468
|
+
output t2_wb_we_o;
|
469
|
+
output [`TC_DW-1:0] t2_wb_dat_o;
|
470
|
+
input [`TC_DW-1:0] t2_wb_dat_i;
|
471
|
+
input t2_wb_ack_i;
|
472
|
+
input t2_wb_err_i;
|
473
|
+
|
474
|
+
//
|
475
|
+
// WB master i/f connecting target 3
|
476
|
+
//
|
477
|
+
output t3_wb_cyc_o;
|
478
|
+
output t3_wb_stb_o;
|
479
|
+
output [`TC_AW-1:0] t3_wb_adr_o;
|
480
|
+
output [`TC_BSW-1:0] t3_wb_sel_o;
|
481
|
+
output t3_wb_we_o;
|
482
|
+
output [`TC_DW-1:0] t3_wb_dat_o;
|
483
|
+
input [`TC_DW-1:0] t3_wb_dat_i;
|
484
|
+
input t3_wb_ack_i;
|
485
|
+
input t3_wb_err_i;
|
486
|
+
|
487
|
+
//
|
488
|
+
// WB master i/f connecting target 4
|
489
|
+
//
|
490
|
+
output t4_wb_cyc_o;
|
491
|
+
output t4_wb_stb_o;
|
492
|
+
output [`TC_AW-1:0] t4_wb_adr_o;
|
493
|
+
output [`TC_BSW-1:0] t4_wb_sel_o;
|
494
|
+
output t4_wb_we_o;
|
495
|
+
output [`TC_DW-1:0] t4_wb_dat_o;
|
496
|
+
input [`TC_DW-1:0] t4_wb_dat_i;
|
497
|
+
input t4_wb_ack_i;
|
498
|
+
input t4_wb_err_i;
|
499
|
+
|
500
|
+
//
|
501
|
+
// WB master i/f connecting target 5
|
502
|
+
//
|
503
|
+
output t5_wb_cyc_o;
|
504
|
+
output t5_wb_stb_o;
|
505
|
+
output [`TC_AW-1:0] t5_wb_adr_o;
|
506
|
+
output [`TC_BSW-1:0] t5_wb_sel_o;
|
507
|
+
output t5_wb_we_o;
|
508
|
+
output [`TC_DW-1:0] t5_wb_dat_o;
|
509
|
+
input [`TC_DW-1:0] t5_wb_dat_i;
|
510
|
+
input t5_wb_ack_i;
|
511
|
+
input t5_wb_err_i;
|
512
|
+
|
513
|
+
//
|
514
|
+
// WB master i/f connecting target 6
|
515
|
+
//
|
516
|
+
output t6_wb_cyc_o;
|
517
|
+
output t6_wb_stb_o;
|
518
|
+
output [`TC_AW-1:0] t6_wb_adr_o;
|
519
|
+
output [`TC_BSW-1:0] t6_wb_sel_o;
|
520
|
+
output t6_wb_we_o;
|
521
|
+
output [`TC_DW-1:0] t6_wb_dat_o;
|
522
|
+
input [`TC_DW-1:0] t6_wb_dat_i;
|
523
|
+
input t6_wb_ack_i;
|
524
|
+
input t6_wb_err_i;
|
525
|
+
|
526
|
+
//
|
527
|
+
// WB master i/f connecting target 7
|
528
|
+
//
|
529
|
+
output t7_wb_cyc_o;
|
530
|
+
output t7_wb_stb_o;
|
531
|
+
output [`TC_AW-1:0] t7_wb_adr_o;
|
532
|
+
output [`TC_BSW-1:0] t7_wb_sel_o;
|
533
|
+
output t7_wb_we_o;
|
534
|
+
output [`TC_DW-1:0] t7_wb_dat_o;
|
535
|
+
input [`TC_DW-1:0] t7_wb_dat_i;
|
536
|
+
input t7_wb_ack_i;
|
537
|
+
input t7_wb_err_i;
|
538
|
+
|
539
|
+
//
|
540
|
+
// WB master i/f connecting target 8
|
541
|
+
//
|
542
|
+
output t8_wb_cyc_o;
|
543
|
+
output t8_wb_stb_o;
|
544
|
+
output [`TC_AW-1:0] t8_wb_adr_o;
|
545
|
+
output [`TC_BSW-1:0] t8_wb_sel_o;
|
546
|
+
output t8_wb_we_o;
|
547
|
+
output [`TC_DW-1:0] t8_wb_dat_o;
|
548
|
+
input [`TC_DW-1:0] t8_wb_dat_i;
|
549
|
+
input t8_wb_ack_i;
|
550
|
+
input t8_wb_err_i;
|
551
|
+
|
552
|
+
|
553
|
+
output i0_wb_clk_o;
|
554
|
+
output i0_wb_rst_o;
|
555
|
+
output i1_wb_clk_o;
|
556
|
+
output i1_wb_rst_o;
|
557
|
+
output i2_wb_clk_o;
|
558
|
+
output i2_wb_rst_o;
|
559
|
+
output i3_wb_clk_o;
|
560
|
+
output i3_wb_rst_o;
|
561
|
+
output i4_wb_clk_o;
|
562
|
+
output i4_wb_rst_o;
|
563
|
+
output i5_wb_clk_o;
|
564
|
+
output i5_wb_rst_o;
|
565
|
+
output i6_wb_clk_o;
|
566
|
+
output i6_wb_rst_o;
|
567
|
+
output i7_wb_clk_o;
|
568
|
+
output i7_wb_rst_o;
|
569
|
+
output t0_wb_clk_o;
|
570
|
+
output t0_wb_rst_o;
|
571
|
+
output t1_wb_clk_o;
|
572
|
+
output t1_wb_rst_o;
|
573
|
+
output t2_wb_clk_o;
|
574
|
+
output t2_wb_rst_o;
|
575
|
+
output t3_wb_clk_o;
|
576
|
+
output t3_wb_rst_o;
|
577
|
+
output t4_wb_clk_o;
|
578
|
+
output t4_wb_rst_o;
|
579
|
+
output t5_wb_clk_o;
|
580
|
+
output t5_wb_rst_o;
|
581
|
+
output t6_wb_clk_o;
|
582
|
+
output t6_wb_rst_o;
|
583
|
+
output t7_wb_clk_o;
|
584
|
+
output t7_wb_rst_o;
|
585
|
+
output t8_wb_clk_o;
|
586
|
+
output t8_wb_rst_o;
|
587
|
+
|
588
|
+
|
589
|
+
|
590
|
+
|
591
|
+
|
592
|
+
|
593
|
+
|
594
|
+
|
595
|
+
//
|
596
|
+
// Internal wires & registers
|
597
|
+
//
|
598
|
+
|
599
|
+
//
|
600
|
+
// Outputs for initiators from both mi_to_st blocks
|
601
|
+
//
|
602
|
+
wire [`TC_DW-1:0] xi0_wb_dat_o;
|
603
|
+
wire xi0_wb_ack_o;
|
604
|
+
wire xi0_wb_err_o;
|
605
|
+
wire [`TC_DW-1:0] xi1_wb_dat_o;
|
606
|
+
wire xi1_wb_ack_o;
|
607
|
+
wire xi1_wb_err_o;
|
608
|
+
wire [`TC_DW-1:0] xi2_wb_dat_o;
|
609
|
+
wire xi2_wb_ack_o;
|
610
|
+
wire xi2_wb_err_o;
|
611
|
+
wire [`TC_DW-1:0] xi3_wb_dat_o;
|
612
|
+
wire xi3_wb_ack_o;
|
613
|
+
wire xi3_wb_err_o;
|
614
|
+
wire [`TC_DW-1:0] xi4_wb_dat_o;
|
615
|
+
wire xi4_wb_ack_o;
|
616
|
+
wire xi4_wb_err_o;
|
617
|
+
wire [`TC_DW-1:0] xi5_wb_dat_o;
|
618
|
+
wire xi5_wb_ack_o;
|
619
|
+
wire xi5_wb_err_o;
|
620
|
+
wire [`TC_DW-1:0] xi6_wb_dat_o;
|
621
|
+
wire xi6_wb_ack_o;
|
622
|
+
wire xi6_wb_err_o;
|
623
|
+
wire [`TC_DW-1:0] xi7_wb_dat_o;
|
624
|
+
wire xi7_wb_ack_o;
|
625
|
+
wire xi7_wb_err_o;
|
626
|
+
wire [`TC_DW-1:0] yi0_wb_dat_o;
|
627
|
+
wire yi0_wb_ack_o;
|
628
|
+
wire yi0_wb_err_o;
|
629
|
+
wire [`TC_DW-1:0] yi1_wb_dat_o;
|
630
|
+
wire yi1_wb_ack_o;
|
631
|
+
wire yi1_wb_err_o;
|
632
|
+
wire [`TC_DW-1:0] yi2_wb_dat_o;
|
633
|
+
wire yi2_wb_ack_o;
|
634
|
+
wire yi2_wb_err_o;
|
635
|
+
wire [`TC_DW-1:0] yi3_wb_dat_o;
|
636
|
+
wire yi3_wb_ack_o;
|
637
|
+
wire yi3_wb_err_o;
|
638
|
+
wire [`TC_DW-1:0] yi4_wb_dat_o;
|
639
|
+
wire yi4_wb_ack_o;
|
640
|
+
wire yi4_wb_err_o;
|
641
|
+
wire [`TC_DW-1:0] yi5_wb_dat_o;
|
642
|
+
wire yi5_wb_ack_o;
|
643
|
+
wire yi5_wb_err_o;
|
644
|
+
wire [`TC_DW-1:0] yi6_wb_dat_o;
|
645
|
+
wire yi6_wb_ack_o;
|
646
|
+
wire yi6_wb_err_o;
|
647
|
+
wire [`TC_DW-1:0] yi7_wb_dat_o;
|
648
|
+
wire yi7_wb_ack_o;
|
649
|
+
wire yi7_wb_err_o;
|
650
|
+
|
651
|
+
//
|
652
|
+
// Intermediate signals connecting peripheral channel's
|
653
|
+
// mi_to_st and si_to_mt blocks.
|
654
|
+
//
|
655
|
+
wire z_wb_cyc_i;
|
656
|
+
wire z_wb_stb_i;
|
657
|
+
wire [`TC_AW-1:0] z_wb_adr_i;
|
658
|
+
wire [`TC_BSW-1:0] z_wb_sel_i;
|
659
|
+
wire z_wb_we_i;
|
660
|
+
wire [`TC_DW-1:0] z_wb_dat_i;
|
661
|
+
wire [`TC_DW-1:0] z_wb_dat_t;
|
662
|
+
wire z_wb_ack_t;
|
663
|
+
wire z_wb_err_t;
|
664
|
+
|
665
|
+
|
666
|
+
//
|
667
|
+
// Assign clock and resets
|
668
|
+
//
|
669
|
+
assign i0_wb_clk_o = wb_clk_i;
|
670
|
+
assign i0_wb_rst_o = wb_rst_i;
|
671
|
+
assign i1_wb_clk_o = wb_clk_i;
|
672
|
+
assign i1_wb_rst_o = wb_rst_i;
|
673
|
+
assign i2_wb_clk_o = wb_clk_i;
|
674
|
+
assign i2_wb_rst_o = wb_rst_i;
|
675
|
+
assign i3_wb_clk_o = wb_clk_i;
|
676
|
+
assign i3_wb_rst_o = wb_rst_i;
|
677
|
+
assign i4_wb_clk_o = wb_clk_i;
|
678
|
+
assign i4_wb_rst_o = wb_rst_i;
|
679
|
+
assign i5_wb_clk_o = wb_clk_i;
|
680
|
+
assign i5_wb_rst_o = wb_rst_i;
|
681
|
+
assign i6_wb_clk_o = wb_clk_i;
|
682
|
+
assign i6_wb_rst_o = wb_rst_i;
|
683
|
+
assign i7_wb_clk_o = wb_clk_i;
|
684
|
+
assign i7_wb_rst_o = wb_rst_i;
|
685
|
+
assign t0_wb_clk_o = wb_clk_i;
|
686
|
+
assign t0_wb_rst_o = wb_rst_i;
|
687
|
+
assign t1_wb_clk_o = wb_clk_i;
|
688
|
+
assign t1_wb_rst_o = wb_rst_i;
|
689
|
+
assign t2_wb_clk_o = wb_clk_i;
|
690
|
+
assign t2_wb_rst_o = wb_rst_i;
|
691
|
+
assign t3_wb_clk_o = wb_clk_i;
|
692
|
+
assign t3_wb_rst_o = wb_rst_i;
|
693
|
+
assign t4_wb_clk_o = wb_clk_i;
|
694
|
+
assign t4_wb_rst_o = wb_rst_i;
|
695
|
+
assign t5_wb_clk_o = wb_clk_i;
|
696
|
+
assign t5_wb_rst_o = wb_rst_i;
|
697
|
+
assign t6_wb_clk_o = wb_clk_i;
|
698
|
+
assign t6_wb_rst_o = wb_rst_i;
|
699
|
+
assign t7_wb_clk_o = wb_clk_i;
|
700
|
+
assign t7_wb_rst_o = wb_rst_i;
|
701
|
+
assign t8_wb_clk_o = wb_clk_i;
|
702
|
+
assign t8_wb_rst_o = wb_rst_i;
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
//
|
707
|
+
// Outputs for initiators are ORed from both mi_to_st blocks
|
708
|
+
//
|
709
|
+
assign i0_wb_dat_o = xi0_wb_dat_o | yi0_wb_dat_o;
|
710
|
+
assign i0_wb_ack_o = xi0_wb_ack_o | yi0_wb_ack_o;
|
711
|
+
assign i0_wb_err_o = xi0_wb_err_o | yi0_wb_err_o;
|
712
|
+
assign i1_wb_dat_o = xi1_wb_dat_o | yi1_wb_dat_o;
|
713
|
+
assign i1_wb_ack_o = xi1_wb_ack_o | yi1_wb_ack_o;
|
714
|
+
assign i1_wb_err_o = xi1_wb_err_o | yi1_wb_err_o;
|
715
|
+
assign i2_wb_dat_o = xi2_wb_dat_o | yi2_wb_dat_o;
|
716
|
+
assign i2_wb_ack_o = xi2_wb_ack_o | yi2_wb_ack_o;
|
717
|
+
assign i2_wb_err_o = xi2_wb_err_o | yi2_wb_err_o;
|
718
|
+
assign i3_wb_dat_o = xi3_wb_dat_o | yi3_wb_dat_o;
|
719
|
+
assign i3_wb_ack_o = xi3_wb_ack_o | yi3_wb_ack_o;
|
720
|
+
assign i3_wb_err_o = xi3_wb_err_o | yi3_wb_err_o;
|
721
|
+
assign i4_wb_dat_o = xi4_wb_dat_o | yi4_wb_dat_o;
|
722
|
+
assign i4_wb_ack_o = xi4_wb_ack_o | yi4_wb_ack_o;
|
723
|
+
assign i4_wb_err_o = xi4_wb_err_o | yi4_wb_err_o;
|
724
|
+
assign i5_wb_dat_o = xi5_wb_dat_o | yi5_wb_dat_o;
|
725
|
+
assign i5_wb_ack_o = xi5_wb_ack_o | yi5_wb_ack_o;
|
726
|
+
assign i5_wb_err_o = xi5_wb_err_o | yi5_wb_err_o;
|
727
|
+
assign i6_wb_dat_o = xi6_wb_dat_o | yi6_wb_dat_o;
|
728
|
+
assign i6_wb_ack_o = xi6_wb_ack_o | yi6_wb_ack_o;
|
729
|
+
assign i6_wb_err_o = xi6_wb_err_o | yi6_wb_err_o;
|
730
|
+
assign i7_wb_dat_o = xi7_wb_dat_o | yi7_wb_dat_o;
|
731
|
+
assign i7_wb_ack_o = xi7_wb_ack_o | yi7_wb_ack_o;
|
732
|
+
assign i7_wb_err_o = xi7_wb_err_o | yi7_wb_err_o;
|
733
|
+
|
734
|
+
//
|
735
|
+
// From initiators to target 0
|
736
|
+
//
|
737
|
+
tc_mi_to_st #(t0_addr_w, t0_addr,
|
738
|
+
0, t0_addr_w, t0_addr) t0_ch(
|
739
|
+
.wb_clk_i(wb_clk_i),
|
740
|
+
.wb_rst_i(wb_rst_i),
|
741
|
+
|
742
|
+
.i0_wb_cyc_i(i0_wb_cyc_i),
|
743
|
+
.i0_wb_stb_i(i0_wb_stb_i),
|
744
|
+
.i0_wb_adr_i(i0_wb_adr_i),
|
745
|
+
.i0_wb_sel_i(i0_wb_sel_i),
|
746
|
+
.i0_wb_we_i(i0_wb_we_i),
|
747
|
+
.i0_wb_dat_i(i0_wb_dat_i),
|
748
|
+
.i0_wb_dat_o(xi0_wb_dat_o),
|
749
|
+
.i0_wb_ack_o(xi0_wb_ack_o),
|
750
|
+
.i0_wb_err_o(xi0_wb_err_o),
|
751
|
+
|
752
|
+
.i1_wb_cyc_i(i1_wb_cyc_i),
|
753
|
+
.i1_wb_stb_i(i1_wb_stb_i),
|
754
|
+
.i1_wb_adr_i(i1_wb_adr_i),
|
755
|
+
.i1_wb_sel_i(i1_wb_sel_i),
|
756
|
+
.i1_wb_we_i(i1_wb_we_i),
|
757
|
+
.i1_wb_dat_i(i1_wb_dat_i),
|
758
|
+
.i1_wb_dat_o(xi1_wb_dat_o),
|
759
|
+
.i1_wb_ack_o(xi1_wb_ack_o),
|
760
|
+
.i1_wb_err_o(xi1_wb_err_o),
|
761
|
+
|
762
|
+
.i2_wb_cyc_i(i2_wb_cyc_i),
|
763
|
+
.i2_wb_stb_i(i2_wb_stb_i),
|
764
|
+
.i2_wb_adr_i(i2_wb_adr_i),
|
765
|
+
.i2_wb_sel_i(i2_wb_sel_i),
|
766
|
+
.i2_wb_we_i(i2_wb_we_i),
|
767
|
+
.i2_wb_dat_i(i2_wb_dat_i),
|
768
|
+
.i2_wb_dat_o(xi2_wb_dat_o),
|
769
|
+
.i2_wb_ack_o(xi2_wb_ack_o),
|
770
|
+
.i2_wb_err_o(xi2_wb_err_o),
|
771
|
+
|
772
|
+
.i3_wb_cyc_i(i3_wb_cyc_i),
|
773
|
+
.i3_wb_stb_i(i3_wb_stb_i),
|
774
|
+
.i3_wb_adr_i(i3_wb_adr_i),
|
775
|
+
.i3_wb_sel_i(i3_wb_sel_i),
|
776
|
+
.i3_wb_we_i(i3_wb_we_i),
|
777
|
+
.i3_wb_dat_i(i3_wb_dat_i),
|
778
|
+
.i3_wb_dat_o(xi3_wb_dat_o),
|
779
|
+
.i3_wb_ack_o(xi3_wb_ack_o),
|
780
|
+
.i3_wb_err_o(xi3_wb_err_o),
|
781
|
+
|
782
|
+
.i4_wb_cyc_i(i4_wb_cyc_i),
|
783
|
+
.i4_wb_stb_i(i4_wb_stb_i),
|
784
|
+
.i4_wb_adr_i(i4_wb_adr_i),
|
785
|
+
.i4_wb_sel_i(i4_wb_sel_i),
|
786
|
+
.i4_wb_we_i(i4_wb_we_i),
|
787
|
+
.i4_wb_dat_i(i4_wb_dat_i),
|
788
|
+
.i4_wb_dat_o(xi4_wb_dat_o),
|
789
|
+
.i4_wb_ack_o(xi4_wb_ack_o),
|
790
|
+
.i4_wb_err_o(xi4_wb_err_o),
|
791
|
+
|
792
|
+
.i5_wb_cyc_i(i5_wb_cyc_i),
|
793
|
+
.i5_wb_stb_i(i5_wb_stb_i),
|
794
|
+
.i5_wb_adr_i(i5_wb_adr_i),
|
795
|
+
.i5_wb_sel_i(i5_wb_sel_i),
|
796
|
+
.i5_wb_we_i(i5_wb_we_i),
|
797
|
+
.i5_wb_dat_i(i5_wb_dat_i),
|
798
|
+
.i5_wb_dat_o(xi5_wb_dat_o),
|
799
|
+
.i5_wb_ack_o(xi5_wb_ack_o),
|
800
|
+
.i5_wb_err_o(xi5_wb_err_o),
|
801
|
+
|
802
|
+
.i6_wb_cyc_i(i6_wb_cyc_i),
|
803
|
+
.i6_wb_stb_i(i6_wb_stb_i),
|
804
|
+
.i6_wb_adr_i(i6_wb_adr_i),
|
805
|
+
.i6_wb_sel_i(i6_wb_sel_i),
|
806
|
+
.i6_wb_we_i(i6_wb_we_i),
|
807
|
+
.i6_wb_dat_i(i6_wb_dat_i),
|
808
|
+
.i6_wb_dat_o(xi6_wb_dat_o),
|
809
|
+
.i6_wb_ack_o(xi6_wb_ack_o),
|
810
|
+
.i6_wb_err_o(xi6_wb_err_o),
|
811
|
+
|
812
|
+
.i7_wb_cyc_i(i7_wb_cyc_i),
|
813
|
+
.i7_wb_stb_i(i7_wb_stb_i),
|
814
|
+
.i7_wb_adr_i(i7_wb_adr_i),
|
815
|
+
.i7_wb_sel_i(i7_wb_sel_i),
|
816
|
+
.i7_wb_we_i(i7_wb_we_i),
|
817
|
+
.i7_wb_dat_i(i7_wb_dat_i),
|
818
|
+
.i7_wb_dat_o(xi7_wb_dat_o),
|
819
|
+
.i7_wb_ack_o(xi7_wb_ack_o),
|
820
|
+
.i7_wb_err_o(xi7_wb_err_o),
|
821
|
+
|
822
|
+
.t0_wb_cyc_o(t0_wb_cyc_o),
|
823
|
+
.t0_wb_stb_o(t0_wb_stb_o),
|
824
|
+
.t0_wb_adr_o(t0_wb_adr_o),
|
825
|
+
.t0_wb_sel_o(t0_wb_sel_o),
|
826
|
+
.t0_wb_we_o(t0_wb_we_o),
|
827
|
+
.t0_wb_dat_o(t0_wb_dat_o),
|
828
|
+
.t0_wb_dat_i(t0_wb_dat_i),
|
829
|
+
.t0_wb_ack_i(t0_wb_ack_i),
|
830
|
+
.t0_wb_err_i(t0_wb_err_i)
|
831
|
+
|
832
|
+
);
|
833
|
+
|
834
|
+
//
|
835
|
+
// From initiators to targets 1-8 (upper part)
|
836
|
+
//
|
837
|
+
tc_mi_to_st #(t1_addr_w, t1_addr,
|
838
|
+
1, t28c_addr_w, t28_addr) t18_ch_upper(
|
839
|
+
.wb_clk_i(wb_clk_i),
|
840
|
+
.wb_rst_i(wb_rst_i),
|
841
|
+
|
842
|
+
.i0_wb_cyc_i(i0_wb_cyc_i),
|
843
|
+
.i0_wb_stb_i(i0_wb_stb_i),
|
844
|
+
.i0_wb_adr_i(i0_wb_adr_i),
|
845
|
+
.i0_wb_sel_i(i0_wb_sel_i),
|
846
|
+
.i0_wb_we_i(i0_wb_we_i),
|
847
|
+
.i0_wb_dat_i(i0_wb_dat_i),
|
848
|
+
.i0_wb_dat_o(yi0_wb_dat_o),
|
849
|
+
.i0_wb_ack_o(yi0_wb_ack_o),
|
850
|
+
.i0_wb_err_o(yi0_wb_err_o),
|
851
|
+
|
852
|
+
.i1_wb_cyc_i(i1_wb_cyc_i),
|
853
|
+
.i1_wb_stb_i(i1_wb_stb_i),
|
854
|
+
.i1_wb_adr_i(i1_wb_adr_i),
|
855
|
+
.i1_wb_sel_i(i1_wb_sel_i),
|
856
|
+
.i1_wb_we_i(i1_wb_we_i),
|
857
|
+
.i1_wb_dat_i(i1_wb_dat_i),
|
858
|
+
.i1_wb_dat_o(yi1_wb_dat_o),
|
859
|
+
.i1_wb_ack_o(yi1_wb_ack_o),
|
860
|
+
.i1_wb_err_o(yi1_wb_err_o),
|
861
|
+
|
862
|
+
.i2_wb_cyc_i(i2_wb_cyc_i),
|
863
|
+
.i2_wb_stb_i(i2_wb_stb_i),
|
864
|
+
.i2_wb_adr_i(i2_wb_adr_i),
|
865
|
+
.i2_wb_sel_i(i2_wb_sel_i),
|
866
|
+
.i2_wb_we_i(i2_wb_we_i),
|
867
|
+
.i2_wb_dat_i(i2_wb_dat_i),
|
868
|
+
.i2_wb_dat_o(yi2_wb_dat_o),
|
869
|
+
.i2_wb_ack_o(yi2_wb_ack_o),
|
870
|
+
.i2_wb_err_o(yi2_wb_err_o),
|
871
|
+
|
872
|
+
.i3_wb_cyc_i(i3_wb_cyc_i),
|
873
|
+
.i3_wb_stb_i(i3_wb_stb_i),
|
874
|
+
.i3_wb_adr_i(i3_wb_adr_i),
|
875
|
+
.i3_wb_sel_i(i3_wb_sel_i),
|
876
|
+
.i3_wb_we_i(i3_wb_we_i),
|
877
|
+
.i3_wb_dat_i(i3_wb_dat_i),
|
878
|
+
.i3_wb_dat_o(yi3_wb_dat_o),
|
879
|
+
.i3_wb_ack_o(yi3_wb_ack_o),
|
880
|
+
.i3_wb_err_o(yi3_wb_err_o),
|
881
|
+
|
882
|
+
.i4_wb_cyc_i(i4_wb_cyc_i),
|
883
|
+
.i4_wb_stb_i(i4_wb_stb_i),
|
884
|
+
.i4_wb_adr_i(i4_wb_adr_i),
|
885
|
+
.i4_wb_sel_i(i4_wb_sel_i),
|
886
|
+
.i4_wb_we_i(i4_wb_we_i),
|
887
|
+
.i4_wb_dat_i(i4_wb_dat_i),
|
888
|
+
.i4_wb_dat_o(yi4_wb_dat_o),
|
889
|
+
.i4_wb_ack_o(yi4_wb_ack_o),
|
890
|
+
.i4_wb_err_o(yi4_wb_err_o),
|
891
|
+
|
892
|
+
.i5_wb_cyc_i(i5_wb_cyc_i),
|
893
|
+
.i5_wb_stb_i(i5_wb_stb_i),
|
894
|
+
.i5_wb_adr_i(i5_wb_adr_i),
|
895
|
+
.i5_wb_sel_i(i5_wb_sel_i),
|
896
|
+
.i5_wb_we_i(i5_wb_we_i),
|
897
|
+
.i5_wb_dat_i(i5_wb_dat_i),
|
898
|
+
.i5_wb_dat_o(yi5_wb_dat_o),
|
899
|
+
.i5_wb_ack_o(yi5_wb_ack_o),
|
900
|
+
.i5_wb_err_o(yi5_wb_err_o),
|
901
|
+
|
902
|
+
.i6_wb_cyc_i(i6_wb_cyc_i),
|
903
|
+
.i6_wb_stb_i(i6_wb_stb_i),
|
904
|
+
.i6_wb_adr_i(i6_wb_adr_i),
|
905
|
+
.i6_wb_sel_i(i6_wb_sel_i),
|
906
|
+
.i6_wb_we_i(i6_wb_we_i),
|
907
|
+
.i6_wb_dat_i(i6_wb_dat_i),
|
908
|
+
.i6_wb_dat_o(yi6_wb_dat_o),
|
909
|
+
.i6_wb_ack_o(yi6_wb_ack_o),
|
910
|
+
.i6_wb_err_o(yi6_wb_err_o),
|
911
|
+
|
912
|
+
.i7_wb_cyc_i(i7_wb_cyc_i),
|
913
|
+
.i7_wb_stb_i(i7_wb_stb_i),
|
914
|
+
.i7_wb_adr_i(i7_wb_adr_i),
|
915
|
+
.i7_wb_sel_i(i7_wb_sel_i),
|
916
|
+
.i7_wb_we_i(i7_wb_we_i),
|
917
|
+
.i7_wb_dat_i(i7_wb_dat_i),
|
918
|
+
.i7_wb_dat_o(yi7_wb_dat_o),
|
919
|
+
.i7_wb_ack_o(yi7_wb_ack_o),
|
920
|
+
.i7_wb_err_o(yi7_wb_err_o),
|
921
|
+
|
922
|
+
.t0_wb_cyc_o(z_wb_cyc_i),
|
923
|
+
.t0_wb_stb_o(z_wb_stb_i),
|
924
|
+
.t0_wb_adr_o(z_wb_adr_i),
|
925
|
+
.t0_wb_sel_o(z_wb_sel_i),
|
926
|
+
.t0_wb_we_o(z_wb_we_i),
|
927
|
+
.t0_wb_dat_o(z_wb_dat_i),
|
928
|
+
.t0_wb_dat_i(z_wb_dat_t),
|
929
|
+
.t0_wb_ack_i(z_wb_ack_t),
|
930
|
+
.t0_wb_err_i(z_wb_err_t)
|
931
|
+
|
932
|
+
);
|
933
|
+
|
934
|
+
//
|
935
|
+
// From initiators to targets 1-8 (lower part)
|
936
|
+
//
|
937
|
+
tc_si_to_mt #(t1_addr_w, t1_addr, t28i_addr_w, t2_addr, t3_addr,
|
938
|
+
t4_addr, t5_addr, t6_addr, t7_addr, t8_addr) t18_ch_lower(
|
939
|
+
|
940
|
+
.i0_wb_cyc_i(z_wb_cyc_i),
|
941
|
+
.i0_wb_stb_i(z_wb_stb_i),
|
942
|
+
.i0_wb_adr_i(z_wb_adr_i),
|
943
|
+
.i0_wb_sel_i(z_wb_sel_i),
|
944
|
+
.i0_wb_we_i(z_wb_we_i),
|
945
|
+
.i0_wb_dat_i(z_wb_dat_i),
|
946
|
+
.i0_wb_dat_o(z_wb_dat_t),
|
947
|
+
.i0_wb_ack_o(z_wb_ack_t),
|
948
|
+
.i0_wb_err_o(z_wb_err_t),
|
949
|
+
|
950
|
+
.t0_wb_cyc_o(t1_wb_cyc_o),
|
951
|
+
.t0_wb_stb_o(t1_wb_stb_o),
|
952
|
+
.t0_wb_adr_o(t1_wb_adr_o),
|
953
|
+
.t0_wb_sel_o(t1_wb_sel_o),
|
954
|
+
.t0_wb_we_o(t1_wb_we_o),
|
955
|
+
.t0_wb_dat_o(t1_wb_dat_o),
|
956
|
+
.t0_wb_dat_i(t1_wb_dat_i),
|
957
|
+
.t0_wb_ack_i(t1_wb_ack_i),
|
958
|
+
.t0_wb_err_i(t1_wb_err_i),
|
959
|
+
|
960
|
+
.t1_wb_cyc_o(t2_wb_cyc_o),
|
961
|
+
.t1_wb_stb_o(t2_wb_stb_o),
|
962
|
+
.t1_wb_adr_o(t2_wb_adr_o),
|
963
|
+
.t1_wb_sel_o(t2_wb_sel_o),
|
964
|
+
.t1_wb_we_o(t2_wb_we_o),
|
965
|
+
.t1_wb_dat_o(t2_wb_dat_o),
|
966
|
+
.t1_wb_dat_i(t2_wb_dat_i),
|
967
|
+
.t1_wb_ack_i(t2_wb_ack_i),
|
968
|
+
.t1_wb_err_i(t2_wb_err_i),
|
969
|
+
|
970
|
+
.t2_wb_cyc_o(t3_wb_cyc_o),
|
971
|
+
.t2_wb_stb_o(t3_wb_stb_o),
|
972
|
+
.t2_wb_adr_o(t3_wb_adr_o),
|
973
|
+
.t2_wb_sel_o(t3_wb_sel_o),
|
974
|
+
.t2_wb_we_o(t3_wb_we_o),
|
975
|
+
.t2_wb_dat_o(t3_wb_dat_o),
|
976
|
+
.t2_wb_dat_i(t3_wb_dat_i),
|
977
|
+
.t2_wb_ack_i(t3_wb_ack_i),
|
978
|
+
.t2_wb_err_i(t3_wb_err_i),
|
979
|
+
|
980
|
+
.t3_wb_cyc_o(t4_wb_cyc_o),
|
981
|
+
.t3_wb_stb_o(t4_wb_stb_o),
|
982
|
+
.t3_wb_adr_o(t4_wb_adr_o),
|
983
|
+
.t3_wb_sel_o(t4_wb_sel_o),
|
984
|
+
.t3_wb_we_o(t4_wb_we_o),
|
985
|
+
.t3_wb_dat_o(t4_wb_dat_o),
|
986
|
+
.t3_wb_dat_i(t4_wb_dat_i),
|
987
|
+
.t3_wb_ack_i(t4_wb_ack_i),
|
988
|
+
.t3_wb_err_i(t4_wb_err_i),
|
989
|
+
|
990
|
+
.t4_wb_cyc_o(t5_wb_cyc_o),
|
991
|
+
.t4_wb_stb_o(t5_wb_stb_o),
|
992
|
+
.t4_wb_adr_o(t5_wb_adr_o),
|
993
|
+
.t4_wb_sel_o(t5_wb_sel_o),
|
994
|
+
.t4_wb_we_o(t5_wb_we_o),
|
995
|
+
.t4_wb_dat_o(t5_wb_dat_o),
|
996
|
+
.t4_wb_dat_i(t5_wb_dat_i),
|
997
|
+
.t4_wb_ack_i(t5_wb_ack_i),
|
998
|
+
.t4_wb_err_i(t5_wb_err_i),
|
999
|
+
|
1000
|
+
.t5_wb_cyc_o(t6_wb_cyc_o),
|
1001
|
+
.t5_wb_stb_o(t6_wb_stb_o),
|
1002
|
+
.t5_wb_adr_o(t6_wb_adr_o),
|
1003
|
+
.t5_wb_sel_o(t6_wb_sel_o),
|
1004
|
+
.t5_wb_we_o(t6_wb_we_o),
|
1005
|
+
.t5_wb_dat_o(t6_wb_dat_o),
|
1006
|
+
.t5_wb_dat_i(t6_wb_dat_i),
|
1007
|
+
.t5_wb_ack_i(t6_wb_ack_i),
|
1008
|
+
.t5_wb_err_i(t6_wb_err_i),
|
1009
|
+
|
1010
|
+
.t6_wb_cyc_o(t7_wb_cyc_o),
|
1011
|
+
.t6_wb_stb_o(t7_wb_stb_o),
|
1012
|
+
.t6_wb_adr_o(t7_wb_adr_o),
|
1013
|
+
.t6_wb_sel_o(t7_wb_sel_o),
|
1014
|
+
.t6_wb_we_o(t7_wb_we_o),
|
1015
|
+
.t6_wb_dat_o(t7_wb_dat_o),
|
1016
|
+
.t6_wb_dat_i(t7_wb_dat_i),
|
1017
|
+
.t6_wb_ack_i(t7_wb_ack_i),
|
1018
|
+
.t6_wb_err_i(t7_wb_err_i),
|
1019
|
+
|
1020
|
+
.t7_wb_cyc_o(t8_wb_cyc_o),
|
1021
|
+
.t7_wb_stb_o(t8_wb_stb_o),
|
1022
|
+
.t7_wb_adr_o(t8_wb_adr_o),
|
1023
|
+
.t7_wb_sel_o(t8_wb_sel_o),
|
1024
|
+
.t7_wb_we_o(t8_wb_we_o),
|
1025
|
+
.t7_wb_dat_o(t8_wb_dat_o),
|
1026
|
+
.t7_wb_dat_i(t8_wb_dat_i),
|
1027
|
+
.t7_wb_ack_i(t8_wb_ack_i),
|
1028
|
+
.t7_wb_err_i(t8_wb_err_i)
|
1029
|
+
|
1030
|
+
);
|
1031
|
+
|
1032
|
+
endmodule
|
1033
|
+
|
1034
|
+
//
|
1035
|
+
// Multiple initiator to single target
|
1036
|
+
//
|
1037
|
+
module tc_mi_to_st (
|
1038
|
+
wb_clk_i,
|
1039
|
+
wb_rst_i,
|
1040
|
+
|
1041
|
+
i0_wb_cyc_i,
|
1042
|
+
i0_wb_stb_i,
|
1043
|
+
i0_wb_adr_i,
|
1044
|
+
i0_wb_sel_i,
|
1045
|
+
i0_wb_we_i,
|
1046
|
+
i0_wb_dat_i,
|
1047
|
+
i0_wb_dat_o,
|
1048
|
+
i0_wb_ack_o,
|
1049
|
+
i0_wb_err_o,
|
1050
|
+
|
1051
|
+
i1_wb_cyc_i,
|
1052
|
+
i1_wb_stb_i,
|
1053
|
+
i1_wb_adr_i,
|
1054
|
+
i1_wb_sel_i,
|
1055
|
+
i1_wb_we_i,
|
1056
|
+
i1_wb_dat_i,
|
1057
|
+
i1_wb_dat_o,
|
1058
|
+
i1_wb_ack_o,
|
1059
|
+
i1_wb_err_o,
|
1060
|
+
|
1061
|
+
i2_wb_cyc_i,
|
1062
|
+
i2_wb_stb_i,
|
1063
|
+
i2_wb_adr_i,
|
1064
|
+
i2_wb_sel_i,
|
1065
|
+
i2_wb_we_i,
|
1066
|
+
i2_wb_dat_i,
|
1067
|
+
i2_wb_dat_o,
|
1068
|
+
i2_wb_ack_o,
|
1069
|
+
i2_wb_err_o,
|
1070
|
+
|
1071
|
+
i3_wb_cyc_i,
|
1072
|
+
i3_wb_stb_i,
|
1073
|
+
i3_wb_adr_i,
|
1074
|
+
i3_wb_sel_i,
|
1075
|
+
i3_wb_we_i,
|
1076
|
+
i3_wb_dat_i,
|
1077
|
+
i3_wb_dat_o,
|
1078
|
+
i3_wb_ack_o,
|
1079
|
+
i3_wb_err_o,
|
1080
|
+
|
1081
|
+
i4_wb_cyc_i,
|
1082
|
+
i4_wb_stb_i,
|
1083
|
+
i4_wb_adr_i,
|
1084
|
+
i4_wb_sel_i,
|
1085
|
+
i4_wb_we_i,
|
1086
|
+
i4_wb_dat_i,
|
1087
|
+
i4_wb_dat_o,
|
1088
|
+
i4_wb_ack_o,
|
1089
|
+
i4_wb_err_o,
|
1090
|
+
|
1091
|
+
i5_wb_cyc_i,
|
1092
|
+
i5_wb_stb_i,
|
1093
|
+
i5_wb_adr_i,
|
1094
|
+
i5_wb_sel_i,
|
1095
|
+
i5_wb_we_i,
|
1096
|
+
i5_wb_dat_i,
|
1097
|
+
i5_wb_dat_o,
|
1098
|
+
i5_wb_ack_o,
|
1099
|
+
i5_wb_err_o,
|
1100
|
+
|
1101
|
+
i6_wb_cyc_i,
|
1102
|
+
i6_wb_stb_i,
|
1103
|
+
i6_wb_adr_i,
|
1104
|
+
i6_wb_sel_i,
|
1105
|
+
i6_wb_we_i,
|
1106
|
+
i6_wb_dat_i,
|
1107
|
+
i6_wb_dat_o,
|
1108
|
+
i6_wb_ack_o,
|
1109
|
+
i6_wb_err_o,
|
1110
|
+
|
1111
|
+
i7_wb_cyc_i,
|
1112
|
+
i7_wb_stb_i,
|
1113
|
+
i7_wb_adr_i,
|
1114
|
+
i7_wb_sel_i,
|
1115
|
+
i7_wb_we_i,
|
1116
|
+
i7_wb_dat_i,
|
1117
|
+
i7_wb_dat_o,
|
1118
|
+
i7_wb_ack_o,
|
1119
|
+
i7_wb_err_o,
|
1120
|
+
|
1121
|
+
t0_wb_cyc_o,
|
1122
|
+
t0_wb_stb_o,
|
1123
|
+
t0_wb_adr_o,
|
1124
|
+
t0_wb_sel_o,
|
1125
|
+
t0_wb_we_o,
|
1126
|
+
t0_wb_dat_o,
|
1127
|
+
t0_wb_dat_i,
|
1128
|
+
t0_wb_ack_i,
|
1129
|
+
t0_wb_err_i
|
1130
|
+
|
1131
|
+
);
|
1132
|
+
|
1133
|
+
//
|
1134
|
+
// Parameters
|
1135
|
+
//
|
1136
|
+
parameter t0_addr_w = 2;
|
1137
|
+
parameter t0_addr = 2'b00;
|
1138
|
+
parameter multitarg = 1'b0;
|
1139
|
+
parameter t17_addr_w = 2;
|
1140
|
+
parameter t17_addr = 2'b00;
|
1141
|
+
|
1142
|
+
//
|
1143
|
+
// I/O Ports
|
1144
|
+
//
|
1145
|
+
input wb_clk_i;
|
1146
|
+
input wb_rst_i;
|
1147
|
+
|
1148
|
+
//
|
1149
|
+
// WB slave i/f connecting initiator 0
|
1150
|
+
//
|
1151
|
+
input i0_wb_cyc_i;
|
1152
|
+
input i0_wb_stb_i;
|
1153
|
+
input [`TC_AW-1:0] i0_wb_adr_i;
|
1154
|
+
input [`TC_BSW-1:0] i0_wb_sel_i;
|
1155
|
+
input i0_wb_we_i;
|
1156
|
+
input [`TC_DW-1:0] i0_wb_dat_i;
|
1157
|
+
output [`TC_DW-1:0] i0_wb_dat_o;
|
1158
|
+
output i0_wb_ack_o;
|
1159
|
+
output i0_wb_err_o;
|
1160
|
+
|
1161
|
+
//
|
1162
|
+
// WB slave i/f connecting initiator 1
|
1163
|
+
//
|
1164
|
+
input i1_wb_cyc_i;
|
1165
|
+
input i1_wb_stb_i;
|
1166
|
+
input [`TC_AW-1:0] i1_wb_adr_i;
|
1167
|
+
input [`TC_BSW-1:0] i1_wb_sel_i;
|
1168
|
+
input i1_wb_we_i;
|
1169
|
+
input [`TC_DW-1:0] i1_wb_dat_i;
|
1170
|
+
output [`TC_DW-1:0] i1_wb_dat_o;
|
1171
|
+
output i1_wb_ack_o;
|
1172
|
+
output i1_wb_err_o;
|
1173
|
+
|
1174
|
+
//
|
1175
|
+
// WB slave i/f connecting initiator 2
|
1176
|
+
//
|
1177
|
+
input i2_wb_cyc_i;
|
1178
|
+
input i2_wb_stb_i;
|
1179
|
+
input [`TC_AW-1:0] i2_wb_adr_i;
|
1180
|
+
input [`TC_BSW-1:0] i2_wb_sel_i;
|
1181
|
+
input i2_wb_we_i;
|
1182
|
+
input [`TC_DW-1:0] i2_wb_dat_i;
|
1183
|
+
output [`TC_DW-1:0] i2_wb_dat_o;
|
1184
|
+
output i2_wb_ack_o;
|
1185
|
+
output i2_wb_err_o;
|
1186
|
+
|
1187
|
+
//
|
1188
|
+
// WB slave i/f connecting initiator 3
|
1189
|
+
//
|
1190
|
+
input i3_wb_cyc_i;
|
1191
|
+
input i3_wb_stb_i;
|
1192
|
+
input [`TC_AW-1:0] i3_wb_adr_i;
|
1193
|
+
input [`TC_BSW-1:0] i3_wb_sel_i;
|
1194
|
+
input i3_wb_we_i;
|
1195
|
+
input [`TC_DW-1:0] i3_wb_dat_i;
|
1196
|
+
output [`TC_DW-1:0] i3_wb_dat_o;
|
1197
|
+
output i3_wb_ack_o;
|
1198
|
+
output i3_wb_err_o;
|
1199
|
+
|
1200
|
+
//
|
1201
|
+
// WB slave i/f connecting initiator 4
|
1202
|
+
//
|
1203
|
+
input i4_wb_cyc_i;
|
1204
|
+
input i4_wb_stb_i;
|
1205
|
+
input [`TC_AW-1:0] i4_wb_adr_i;
|
1206
|
+
input [`TC_BSW-1:0] i4_wb_sel_i;
|
1207
|
+
input i4_wb_we_i;
|
1208
|
+
input [`TC_DW-1:0] i4_wb_dat_i;
|
1209
|
+
output [`TC_DW-1:0] i4_wb_dat_o;
|
1210
|
+
output i4_wb_ack_o;
|
1211
|
+
output i4_wb_err_o;
|
1212
|
+
|
1213
|
+
//
|
1214
|
+
// WB slave i/f connecting initiator 5
|
1215
|
+
//
|
1216
|
+
input i5_wb_cyc_i;
|
1217
|
+
input i5_wb_stb_i;
|
1218
|
+
input [`TC_AW-1:0] i5_wb_adr_i;
|
1219
|
+
input [`TC_BSW-1:0] i5_wb_sel_i;
|
1220
|
+
input i5_wb_we_i;
|
1221
|
+
input [`TC_DW-1:0] i5_wb_dat_i;
|
1222
|
+
output [`TC_DW-1:0] i5_wb_dat_o;
|
1223
|
+
output i5_wb_ack_o;
|
1224
|
+
output i5_wb_err_o;
|
1225
|
+
|
1226
|
+
//
|
1227
|
+
// WB slave i/f connecting initiator 6
|
1228
|
+
//
|
1229
|
+
input i6_wb_cyc_i;
|
1230
|
+
input i6_wb_stb_i;
|
1231
|
+
input [`TC_AW-1:0] i6_wb_adr_i;
|
1232
|
+
input [`TC_BSW-1:0] i6_wb_sel_i;
|
1233
|
+
input i6_wb_we_i;
|
1234
|
+
input [`TC_DW-1:0] i6_wb_dat_i;
|
1235
|
+
output [`TC_DW-1:0] i6_wb_dat_o;
|
1236
|
+
output i6_wb_ack_o;
|
1237
|
+
output i6_wb_err_o;
|
1238
|
+
|
1239
|
+
//
|
1240
|
+
// WB slave i/f connecting initiator 7
|
1241
|
+
//
|
1242
|
+
input i7_wb_cyc_i;
|
1243
|
+
input i7_wb_stb_i;
|
1244
|
+
input [`TC_AW-1:0] i7_wb_adr_i;
|
1245
|
+
input [`TC_BSW-1:0] i7_wb_sel_i;
|
1246
|
+
input i7_wb_we_i;
|
1247
|
+
input [`TC_DW-1:0] i7_wb_dat_i;
|
1248
|
+
output [`TC_DW-1:0] i7_wb_dat_o;
|
1249
|
+
output i7_wb_ack_o;
|
1250
|
+
output i7_wb_err_o;
|
1251
|
+
|
1252
|
+
//
|
1253
|
+
// WB master i/f connecting target
|
1254
|
+
//
|
1255
|
+
output t0_wb_cyc_o;
|
1256
|
+
output t0_wb_stb_o;
|
1257
|
+
output [`TC_AW-1:0] t0_wb_adr_o;
|
1258
|
+
output [`TC_BSW-1:0] t0_wb_sel_o;
|
1259
|
+
output t0_wb_we_o;
|
1260
|
+
output [`TC_DW-1:0] t0_wb_dat_o;
|
1261
|
+
input [`TC_DW-1:0] t0_wb_dat_i;
|
1262
|
+
input t0_wb_ack_i;
|
1263
|
+
input t0_wb_err_i;
|
1264
|
+
|
1265
|
+
//
|
1266
|
+
// Internal wires & registers
|
1267
|
+
//
|
1268
|
+
wire [`TC_IIN_W-1:0] i0_in, i1_in,
|
1269
|
+
i2_in, i3_in,
|
1270
|
+
i4_in, i5_in,
|
1271
|
+
i6_in, i7_in;
|
1272
|
+
wire [`TC_TIN_W-1:0] i0_out, i1_out,
|
1273
|
+
i2_out, i3_out,
|
1274
|
+
i4_out, i5_out,
|
1275
|
+
i6_out, i7_out;
|
1276
|
+
wire [`TC_IIN_W-1:0] t0_out;
|
1277
|
+
wire [`TC_TIN_W-1:0] t0_in;
|
1278
|
+
wire [7:0] req_i;
|
1279
|
+
wire [2:0] req_won;
|
1280
|
+
reg req_cont;
|
1281
|
+
reg [2:0] req_r;
|
1282
|
+
|
1283
|
+
//
|
1284
|
+
// Group WB initiator 0 i/f inputs and outputs
|
1285
|
+
//
|
1286
|
+
assign i0_in = {i0_wb_cyc_i, i0_wb_stb_i, i0_wb_adr_i,
|
1287
|
+
i0_wb_sel_i, i0_wb_we_i, i0_wb_dat_i};
|
1288
|
+
assign {i0_wb_dat_o, i0_wb_ack_o, i0_wb_err_o} = i0_out;
|
1289
|
+
|
1290
|
+
//
|
1291
|
+
// Group WB initiator 1 i/f inputs and outputs
|
1292
|
+
//
|
1293
|
+
assign i1_in = {i1_wb_cyc_i, i1_wb_stb_i, i1_wb_adr_i,
|
1294
|
+
i1_wb_sel_i, i1_wb_we_i, i1_wb_dat_i};
|
1295
|
+
assign {i1_wb_dat_o, i1_wb_ack_o, i1_wb_err_o} = i1_out;
|
1296
|
+
|
1297
|
+
//
|
1298
|
+
// Group WB initiator 2 i/f inputs and outputs
|
1299
|
+
//
|
1300
|
+
assign i2_in = {i2_wb_cyc_i, i2_wb_stb_i, i2_wb_adr_i,
|
1301
|
+
i2_wb_sel_i, i2_wb_we_i, i2_wb_dat_i};
|
1302
|
+
assign {i2_wb_dat_o, i2_wb_ack_o, i2_wb_err_o} = i2_out;
|
1303
|
+
|
1304
|
+
//
|
1305
|
+
// Group WB initiator 3 i/f inputs and outputs
|
1306
|
+
//
|
1307
|
+
assign i3_in = {i3_wb_cyc_i, i3_wb_stb_i, i3_wb_adr_i,
|
1308
|
+
i3_wb_sel_i, i3_wb_we_i, i3_wb_dat_i};
|
1309
|
+
assign {i3_wb_dat_o, i3_wb_ack_o, i3_wb_err_o} = i3_out;
|
1310
|
+
|
1311
|
+
//
|
1312
|
+
// Group WB initiator 4 i/f inputs and outputs
|
1313
|
+
//
|
1314
|
+
assign i4_in = {i4_wb_cyc_i, i4_wb_stb_i, i4_wb_adr_i,
|
1315
|
+
i4_wb_sel_i, i4_wb_we_i, i4_wb_dat_i};
|
1316
|
+
assign {i4_wb_dat_o, i4_wb_ack_o, i4_wb_err_o} = i4_out;
|
1317
|
+
|
1318
|
+
//
|
1319
|
+
// Group WB initiator 5 i/f inputs and outputs
|
1320
|
+
//
|
1321
|
+
assign i5_in = {i5_wb_cyc_i, i5_wb_stb_i, i5_wb_adr_i,
|
1322
|
+
i5_wb_sel_i, i5_wb_we_i, i5_wb_dat_i};
|
1323
|
+
assign {i5_wb_dat_o, i5_wb_ack_o, i5_wb_err_o} = i5_out;
|
1324
|
+
|
1325
|
+
//
|
1326
|
+
// Group WB initiator 6 i/f inputs and outputs
|
1327
|
+
//
|
1328
|
+
assign i6_in = {i6_wb_cyc_i, i6_wb_stb_i, i6_wb_adr_i,
|
1329
|
+
i6_wb_sel_i, i6_wb_we_i, i6_wb_dat_i};
|
1330
|
+
assign {i6_wb_dat_o, i6_wb_ack_o, i6_wb_err_o} = i6_out;
|
1331
|
+
|
1332
|
+
//
|
1333
|
+
// Group WB initiator 7 i/f inputs and outputs
|
1334
|
+
//
|
1335
|
+
assign i7_in = {i7_wb_cyc_i, i7_wb_stb_i, i7_wb_adr_i,
|
1336
|
+
i7_wb_sel_i, i7_wb_we_i, i7_wb_dat_i};
|
1337
|
+
assign {i7_wb_dat_o, i7_wb_ack_o, i7_wb_err_o} = i7_out;
|
1338
|
+
|
1339
|
+
//
|
1340
|
+
// Group WB target 0 i/f inputs and outputs
|
1341
|
+
//
|
1342
|
+
assign {t0_wb_cyc_o, t0_wb_stb_o, t0_wb_adr_o,
|
1343
|
+
t0_wb_sel_o, t0_wb_we_o, t0_wb_dat_o} = t0_out;
|
1344
|
+
assign t0_in = {t0_wb_dat_i, t0_wb_ack_i, t0_wb_err_i};
|
1345
|
+
|
1346
|
+
//
|
1347
|
+
// Assign to WB initiator i/f outputs
|
1348
|
+
//
|
1349
|
+
// Either inputs from the target are assigned or zeros.
|
1350
|
+
//
|
1351
|
+
assign i0_out = (req_won == 3'd0) ? t0_in : {`TC_TIN_W{1'b0}};
|
1352
|
+
assign i1_out = (req_won == 3'd1) ? t0_in : {`TC_TIN_W{1'b0}};
|
1353
|
+
assign i2_out = (req_won == 3'd2) ? t0_in : {`TC_TIN_W{1'b0}};
|
1354
|
+
assign i3_out = (req_won == 3'd3) ? t0_in : {`TC_TIN_W{1'b0}};
|
1355
|
+
assign i4_out = (req_won == 3'd4) ? t0_in : {`TC_TIN_W{1'b0}};
|
1356
|
+
assign i5_out = (req_won == 3'd5) ? t0_in : {`TC_TIN_W{1'b0}};
|
1357
|
+
assign i6_out = (req_won == 3'd6) ? t0_in : {`TC_TIN_W{1'b0}};
|
1358
|
+
assign i7_out = (req_won == 3'd7) ? t0_in : {`TC_TIN_W{1'b0}};
|
1359
|
+
|
1360
|
+
//
|
1361
|
+
// Assign to WB target i/f outputs
|
1362
|
+
//
|
1363
|
+
// Assign inputs from initiator to target outputs according to
|
1364
|
+
// which initiator has won. If there is no request for the target,
|
1365
|
+
// assign zeros.
|
1366
|
+
//
|
1367
|
+
assign t0_out = (req_won == 3'd0) ? i0_in :
|
1368
|
+
(req_won == 3'd1) ? i1_in :
|
1369
|
+
(req_won == 3'd2) ? i2_in :
|
1370
|
+
(req_won == 3'd3) ? i3_in :
|
1371
|
+
(req_won == 3'd4) ? i4_in :
|
1372
|
+
(req_won == 3'd5) ? i5_in :
|
1373
|
+
(req_won == 3'd6) ? i6_in :
|
1374
|
+
(req_won == 3'd7) ? i7_in : {`TC_IIN_W{1'b0}};
|
1375
|
+
|
1376
|
+
//
|
1377
|
+
// Determine if an initiator has address of the target.
|
1378
|
+
//
|
1379
|
+
assign req_i[0] = i0_wb_cyc_i &
|
1380
|
+
((i0_wb_adr_i[`TC_AW-1:`TC_AW-t0_addr_w] == t0_addr) |
|
1381
|
+
multitarg & (i0_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t17_addr));
|
1382
|
+
assign req_i[1] = i1_wb_cyc_i &
|
1383
|
+
((i1_wb_adr_i[`TC_AW-1:`TC_AW-t0_addr_w] == t0_addr) |
|
1384
|
+
multitarg & (i1_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t17_addr));
|
1385
|
+
assign req_i[2] = i2_wb_cyc_i &
|
1386
|
+
((i2_wb_adr_i[`TC_AW-1:`TC_AW-t0_addr_w] == t0_addr) |
|
1387
|
+
multitarg & (i2_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t17_addr));
|
1388
|
+
assign req_i[3] = i3_wb_cyc_i &
|
1389
|
+
((i3_wb_adr_i[`TC_AW-1:`TC_AW-t0_addr_w] == t0_addr) |
|
1390
|
+
multitarg & (i3_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t17_addr));
|
1391
|
+
assign req_i[4] = i4_wb_cyc_i &
|
1392
|
+
((i4_wb_adr_i[`TC_AW-1:`TC_AW-t0_addr_w] == t0_addr) |
|
1393
|
+
multitarg & (i4_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t17_addr));
|
1394
|
+
assign req_i[5] = i5_wb_cyc_i &
|
1395
|
+
((i5_wb_adr_i[`TC_AW-1:`TC_AW-t0_addr_w] == t0_addr) |
|
1396
|
+
multitarg & (i5_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t17_addr));
|
1397
|
+
assign req_i[6] = i6_wb_cyc_i &
|
1398
|
+
((i6_wb_adr_i[`TC_AW-1:`TC_AW-t0_addr_w] == t0_addr) |
|
1399
|
+
multitarg & (i6_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t17_addr));
|
1400
|
+
assign req_i[7] = i7_wb_cyc_i &
|
1401
|
+
((i7_wb_adr_i[`TC_AW-1:`TC_AW-t0_addr_w] == t0_addr) |
|
1402
|
+
multitarg & (i7_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t17_addr));
|
1403
|
+
|
1404
|
+
//
|
1405
|
+
// Determine who gets current access to the target.
|
1406
|
+
//
|
1407
|
+
// If current initiator still asserts request, do nothing
|
1408
|
+
// (keep current initiator).
|
1409
|
+
// Otherwise check each initiator's request, starting from initiator 0
|
1410
|
+
// (highest priority).
|
1411
|
+
// If there is no requests from initiators, park initiator 0.
|
1412
|
+
//
|
1413
|
+
assign req_won = req_cont ? req_r :
|
1414
|
+
req_i[0] ? 3'd0 :
|
1415
|
+
req_i[1] ? 3'd1 :
|
1416
|
+
req_i[2] ? 3'd2 :
|
1417
|
+
req_i[3] ? 3'd3 :
|
1418
|
+
req_i[4] ? 3'd4 :
|
1419
|
+
req_i[5] ? 3'd5 :
|
1420
|
+
req_i[6] ? 3'd6 :
|
1421
|
+
req_i[7] ? 3'd7 : 3'd0;
|
1422
|
+
|
1423
|
+
//
|
1424
|
+
// Check if current initiator still wants access to the target and if
|
1425
|
+
// it does, assert req_cont.
|
1426
|
+
//
|
1427
|
+
always @(req_r or req_i)
|
1428
|
+
case (req_r) // synopsys parallel_case
|
1429
|
+
3'd0: req_cont = req_i[0];
|
1430
|
+
3'd1: req_cont = req_i[1];
|
1431
|
+
3'd2: req_cont = req_i[2];
|
1432
|
+
3'd3: req_cont = req_i[3];
|
1433
|
+
3'd4: req_cont = req_i[4];
|
1434
|
+
3'd5: req_cont = req_i[5];
|
1435
|
+
3'd6: req_cont = req_i[6];
|
1436
|
+
3'd7: req_cont = req_i[7];
|
1437
|
+
endcase
|
1438
|
+
|
1439
|
+
//
|
1440
|
+
// Register who has current access to the target.
|
1441
|
+
//
|
1442
|
+
always @(posedge wb_clk_i or posedge wb_rst_i)
|
1443
|
+
if (wb_rst_i)
|
1444
|
+
req_r <= 3'd0;
|
1445
|
+
else
|
1446
|
+
req_r <= req_won;
|
1447
|
+
|
1448
|
+
endmodule
|
1449
|
+
|
1450
|
+
//
|
1451
|
+
// Single initiator to multiple targets
|
1452
|
+
//
|
1453
|
+
module tc_si_to_mt (
|
1454
|
+
|
1455
|
+
i0_wb_cyc_i,
|
1456
|
+
i0_wb_stb_i,
|
1457
|
+
i0_wb_adr_i,
|
1458
|
+
i0_wb_sel_i,
|
1459
|
+
i0_wb_we_i,
|
1460
|
+
i0_wb_dat_i,
|
1461
|
+
i0_wb_dat_o,
|
1462
|
+
i0_wb_ack_o,
|
1463
|
+
i0_wb_err_o,
|
1464
|
+
|
1465
|
+
t0_wb_cyc_o,
|
1466
|
+
t0_wb_stb_o,
|
1467
|
+
t0_wb_adr_o,
|
1468
|
+
t0_wb_sel_o,
|
1469
|
+
t0_wb_we_o,
|
1470
|
+
t0_wb_dat_o,
|
1471
|
+
t0_wb_dat_i,
|
1472
|
+
t0_wb_ack_i,
|
1473
|
+
t0_wb_err_i,
|
1474
|
+
|
1475
|
+
t1_wb_cyc_o,
|
1476
|
+
t1_wb_stb_o,
|
1477
|
+
t1_wb_adr_o,
|
1478
|
+
t1_wb_sel_o,
|
1479
|
+
t1_wb_we_o,
|
1480
|
+
t1_wb_dat_o,
|
1481
|
+
t1_wb_dat_i,
|
1482
|
+
t1_wb_ack_i,
|
1483
|
+
t1_wb_err_i,
|
1484
|
+
|
1485
|
+
t2_wb_cyc_o,
|
1486
|
+
t2_wb_stb_o,
|
1487
|
+
t2_wb_adr_o,
|
1488
|
+
t2_wb_sel_o,
|
1489
|
+
t2_wb_we_o,
|
1490
|
+
t2_wb_dat_o,
|
1491
|
+
t2_wb_dat_i,
|
1492
|
+
t2_wb_ack_i,
|
1493
|
+
t2_wb_err_i,
|
1494
|
+
|
1495
|
+
t3_wb_cyc_o,
|
1496
|
+
t3_wb_stb_o,
|
1497
|
+
t3_wb_adr_o,
|
1498
|
+
t3_wb_sel_o,
|
1499
|
+
t3_wb_we_o,
|
1500
|
+
t3_wb_dat_o,
|
1501
|
+
t3_wb_dat_i,
|
1502
|
+
t3_wb_ack_i,
|
1503
|
+
t3_wb_err_i,
|
1504
|
+
|
1505
|
+
t4_wb_cyc_o,
|
1506
|
+
t4_wb_stb_o,
|
1507
|
+
t4_wb_adr_o,
|
1508
|
+
t4_wb_sel_o,
|
1509
|
+
t4_wb_we_o,
|
1510
|
+
t4_wb_dat_o,
|
1511
|
+
t4_wb_dat_i,
|
1512
|
+
t4_wb_ack_i,
|
1513
|
+
t4_wb_err_i,
|
1514
|
+
|
1515
|
+
t5_wb_cyc_o,
|
1516
|
+
t5_wb_stb_o,
|
1517
|
+
t5_wb_adr_o,
|
1518
|
+
t5_wb_sel_o,
|
1519
|
+
t5_wb_we_o,
|
1520
|
+
t5_wb_dat_o,
|
1521
|
+
t5_wb_dat_i,
|
1522
|
+
t5_wb_ack_i,
|
1523
|
+
t5_wb_err_i,
|
1524
|
+
|
1525
|
+
t6_wb_cyc_o,
|
1526
|
+
t6_wb_stb_o,
|
1527
|
+
t6_wb_adr_o,
|
1528
|
+
t6_wb_sel_o,
|
1529
|
+
t6_wb_we_o,
|
1530
|
+
t6_wb_dat_o,
|
1531
|
+
t6_wb_dat_i,
|
1532
|
+
t6_wb_ack_i,
|
1533
|
+
t6_wb_err_i,
|
1534
|
+
|
1535
|
+
t7_wb_cyc_o,
|
1536
|
+
t7_wb_stb_o,
|
1537
|
+
t7_wb_adr_o,
|
1538
|
+
t7_wb_sel_o,
|
1539
|
+
t7_wb_we_o,
|
1540
|
+
t7_wb_dat_o,
|
1541
|
+
t7_wb_dat_i,
|
1542
|
+
t7_wb_ack_i,
|
1543
|
+
t7_wb_err_i
|
1544
|
+
|
1545
|
+
);
|
1546
|
+
|
1547
|
+
//
|
1548
|
+
// Parameters
|
1549
|
+
//
|
1550
|
+
parameter t0_addr_w = 3;
|
1551
|
+
parameter t0_addr = 3'd0;
|
1552
|
+
parameter t17_addr_w = 3;
|
1553
|
+
parameter t1_addr = 3'd1;
|
1554
|
+
parameter t2_addr = 3'd2;
|
1555
|
+
parameter t3_addr = 3'd3;
|
1556
|
+
parameter t4_addr = 3'd4;
|
1557
|
+
parameter t5_addr = 3'd5;
|
1558
|
+
parameter t6_addr = 3'd6;
|
1559
|
+
parameter t7_addr = 3'd7;
|
1560
|
+
|
1561
|
+
//
|
1562
|
+
// I/O Ports
|
1563
|
+
//
|
1564
|
+
|
1565
|
+
//
|
1566
|
+
// WB slave i/f connecting initiator 0
|
1567
|
+
//
|
1568
|
+
input i0_wb_cyc_i;
|
1569
|
+
input i0_wb_stb_i;
|
1570
|
+
input [`TC_AW-1:0] i0_wb_adr_i;
|
1571
|
+
input [`TC_BSW-1:0] i0_wb_sel_i;
|
1572
|
+
input i0_wb_we_i;
|
1573
|
+
input [`TC_DW-1:0] i0_wb_dat_i;
|
1574
|
+
output [`TC_DW-1:0] i0_wb_dat_o;
|
1575
|
+
output i0_wb_ack_o;
|
1576
|
+
output i0_wb_err_o;
|
1577
|
+
|
1578
|
+
//
|
1579
|
+
// WB master i/f connecting target 0
|
1580
|
+
//
|
1581
|
+
output t0_wb_cyc_o;
|
1582
|
+
output t0_wb_stb_o;
|
1583
|
+
output [`TC_AW-1:0] t0_wb_adr_o;
|
1584
|
+
output [`TC_BSW-1:0] t0_wb_sel_o;
|
1585
|
+
output t0_wb_we_o;
|
1586
|
+
output [`TC_DW-1:0] t0_wb_dat_o;
|
1587
|
+
input [`TC_DW-1:0] t0_wb_dat_i;
|
1588
|
+
input t0_wb_ack_i;
|
1589
|
+
input t0_wb_err_i;
|
1590
|
+
|
1591
|
+
//
|
1592
|
+
// WB master i/f connecting target 1
|
1593
|
+
//
|
1594
|
+
output t1_wb_cyc_o;
|
1595
|
+
output t1_wb_stb_o;
|
1596
|
+
output [`TC_AW-1:0] t1_wb_adr_o;
|
1597
|
+
output [`TC_BSW-1:0] t1_wb_sel_o;
|
1598
|
+
output t1_wb_we_o;
|
1599
|
+
output [`TC_DW-1:0] t1_wb_dat_o;
|
1600
|
+
input [`TC_DW-1:0] t1_wb_dat_i;
|
1601
|
+
input t1_wb_ack_i;
|
1602
|
+
input t1_wb_err_i;
|
1603
|
+
|
1604
|
+
//
|
1605
|
+
// WB master i/f connecting target 2
|
1606
|
+
//
|
1607
|
+
output t2_wb_cyc_o;
|
1608
|
+
output t2_wb_stb_o;
|
1609
|
+
output [`TC_AW-1:0] t2_wb_adr_o;
|
1610
|
+
output [`TC_BSW-1:0] t2_wb_sel_o;
|
1611
|
+
output t2_wb_we_o;
|
1612
|
+
output [`TC_DW-1:0] t2_wb_dat_o;
|
1613
|
+
input [`TC_DW-1:0] t2_wb_dat_i;
|
1614
|
+
input t2_wb_ack_i;
|
1615
|
+
input t2_wb_err_i;
|
1616
|
+
|
1617
|
+
//
|
1618
|
+
// WB master i/f connecting target 3
|
1619
|
+
//
|
1620
|
+
output t3_wb_cyc_o;
|
1621
|
+
output t3_wb_stb_o;
|
1622
|
+
output [`TC_AW-1:0] t3_wb_adr_o;
|
1623
|
+
output [`TC_BSW-1:0] t3_wb_sel_o;
|
1624
|
+
output t3_wb_we_o;
|
1625
|
+
output [`TC_DW-1:0] t3_wb_dat_o;
|
1626
|
+
input [`TC_DW-1:0] t3_wb_dat_i;
|
1627
|
+
input t3_wb_ack_i;
|
1628
|
+
input t3_wb_err_i;
|
1629
|
+
|
1630
|
+
//
|
1631
|
+
// WB master i/f connecting target 4
|
1632
|
+
//
|
1633
|
+
output t4_wb_cyc_o;
|
1634
|
+
output t4_wb_stb_o;
|
1635
|
+
output [`TC_AW-1:0] t4_wb_adr_o;
|
1636
|
+
output [`TC_BSW-1:0] t4_wb_sel_o;
|
1637
|
+
output t4_wb_we_o;
|
1638
|
+
output [`TC_DW-1:0] t4_wb_dat_o;
|
1639
|
+
input [`TC_DW-1:0] t4_wb_dat_i;
|
1640
|
+
input t4_wb_ack_i;
|
1641
|
+
input t4_wb_err_i;
|
1642
|
+
|
1643
|
+
//
|
1644
|
+
// WB master i/f connecting target 5
|
1645
|
+
//
|
1646
|
+
output t5_wb_cyc_o;
|
1647
|
+
output t5_wb_stb_o;
|
1648
|
+
output [`TC_AW-1:0] t5_wb_adr_o;
|
1649
|
+
output [`TC_BSW-1:0] t5_wb_sel_o;
|
1650
|
+
output t5_wb_we_o;
|
1651
|
+
output [`TC_DW-1:0] t5_wb_dat_o;
|
1652
|
+
input [`TC_DW-1:0] t5_wb_dat_i;
|
1653
|
+
input t5_wb_ack_i;
|
1654
|
+
input t5_wb_err_i;
|
1655
|
+
|
1656
|
+
//
|
1657
|
+
// WB master i/f connecting target 6
|
1658
|
+
//
|
1659
|
+
output t6_wb_cyc_o;
|
1660
|
+
output t6_wb_stb_o;
|
1661
|
+
output [`TC_AW-1:0] t6_wb_adr_o;
|
1662
|
+
output [`TC_BSW-1:0] t6_wb_sel_o;
|
1663
|
+
output t6_wb_we_o;
|
1664
|
+
output [`TC_DW-1:0] t6_wb_dat_o;
|
1665
|
+
input [`TC_DW-1:0] t6_wb_dat_i;
|
1666
|
+
input t6_wb_ack_i;
|
1667
|
+
input t6_wb_err_i;
|
1668
|
+
|
1669
|
+
//
|
1670
|
+
// WB master i/f connecting target 7
|
1671
|
+
//
|
1672
|
+
output t7_wb_cyc_o;
|
1673
|
+
output t7_wb_stb_o;
|
1674
|
+
output [`TC_AW-1:0] t7_wb_adr_o;
|
1675
|
+
output [`TC_BSW-1:0] t7_wb_sel_o;
|
1676
|
+
output t7_wb_we_o;
|
1677
|
+
output [`TC_DW-1:0] t7_wb_dat_o;
|
1678
|
+
input [`TC_DW-1:0] t7_wb_dat_i;
|
1679
|
+
input t7_wb_ack_i;
|
1680
|
+
input t7_wb_err_i;
|
1681
|
+
|
1682
|
+
//
|
1683
|
+
// Internal wires & registers
|
1684
|
+
//
|
1685
|
+
wire [`TC_IIN_W-1:0] i0_in;
|
1686
|
+
wire [`TC_TIN_W-1:0] i0_out;
|
1687
|
+
wire [`TC_IIN_W-1:0] t0_out, t1_out,
|
1688
|
+
t2_out, t3_out,
|
1689
|
+
t4_out, t5_out,
|
1690
|
+
t6_out, t7_out;
|
1691
|
+
wire [`TC_TIN_W-1:0] t0_in, t1_in,
|
1692
|
+
t2_in, t3_in,
|
1693
|
+
t4_in, t5_in,
|
1694
|
+
t6_in, t7_in;
|
1695
|
+
wire [7:0] req_t;
|
1696
|
+
|
1697
|
+
//
|
1698
|
+
// Group WB initiator 0 i/f inputs and outputs
|
1699
|
+
//
|
1700
|
+
assign i0_in = {i0_wb_cyc_i, i0_wb_stb_i, i0_wb_adr_i,
|
1701
|
+
i0_wb_sel_i, i0_wb_we_i, i0_wb_dat_i};
|
1702
|
+
assign {i0_wb_dat_o, i0_wb_ack_o, i0_wb_err_o} = i0_out;
|
1703
|
+
|
1704
|
+
//
|
1705
|
+
// Group WB target 0 i/f inputs and outputs
|
1706
|
+
//
|
1707
|
+
assign {t0_wb_cyc_o, t0_wb_stb_o, t0_wb_adr_o,
|
1708
|
+
t0_wb_sel_o, t0_wb_we_o, t0_wb_dat_o} = t0_out;
|
1709
|
+
assign t0_in = {t0_wb_dat_i, t0_wb_ack_i, t0_wb_err_i};
|
1710
|
+
|
1711
|
+
//
|
1712
|
+
// Group WB target 1 i/f inputs and outputs
|
1713
|
+
//
|
1714
|
+
assign {t1_wb_cyc_o, t1_wb_stb_o, t1_wb_adr_o,
|
1715
|
+
t1_wb_sel_o, t1_wb_we_o, t1_wb_dat_o} = t1_out;
|
1716
|
+
assign t1_in = {t1_wb_dat_i, t1_wb_ack_i, t1_wb_err_i};
|
1717
|
+
|
1718
|
+
//
|
1719
|
+
// Group WB target 2 i/f inputs and outputs
|
1720
|
+
//
|
1721
|
+
assign {t2_wb_cyc_o, t2_wb_stb_o, t2_wb_adr_o,
|
1722
|
+
t2_wb_sel_o, t2_wb_we_o, t2_wb_dat_o} = t2_out;
|
1723
|
+
assign t2_in = {t2_wb_dat_i, t2_wb_ack_i, t2_wb_err_i};
|
1724
|
+
|
1725
|
+
//
|
1726
|
+
// Group WB target 3 i/f inputs and outputs
|
1727
|
+
//
|
1728
|
+
assign {t3_wb_cyc_o, t3_wb_stb_o, t3_wb_adr_o,
|
1729
|
+
t3_wb_sel_o, t3_wb_we_o, t3_wb_dat_o} = t3_out;
|
1730
|
+
assign t3_in = {t3_wb_dat_i, t3_wb_ack_i, t3_wb_err_i};
|
1731
|
+
|
1732
|
+
//
|
1733
|
+
// Group WB target 4 i/f inputs and outputs
|
1734
|
+
//
|
1735
|
+
assign {t4_wb_cyc_o, t4_wb_stb_o, t4_wb_adr_o,
|
1736
|
+
t4_wb_sel_o, t4_wb_we_o, t4_wb_dat_o} = t4_out;
|
1737
|
+
assign t4_in = {t4_wb_dat_i, t4_wb_ack_i, t4_wb_err_i};
|
1738
|
+
|
1739
|
+
//
|
1740
|
+
// Group WB target 5 i/f inputs and outputs
|
1741
|
+
//
|
1742
|
+
assign {t5_wb_cyc_o, t5_wb_stb_o, t5_wb_adr_o,
|
1743
|
+
t5_wb_sel_o, t5_wb_we_o, t5_wb_dat_o} = t5_out;
|
1744
|
+
assign t5_in = {t5_wb_dat_i, t5_wb_ack_i, t5_wb_err_i};
|
1745
|
+
|
1746
|
+
//
|
1747
|
+
// Group WB target 6 i/f inputs and outputs
|
1748
|
+
//
|
1749
|
+
assign {t6_wb_cyc_o, t6_wb_stb_o, t6_wb_adr_o,
|
1750
|
+
t6_wb_sel_o, t6_wb_we_o, t6_wb_dat_o} = t6_out;
|
1751
|
+
assign t6_in = {t6_wb_dat_i, t6_wb_ack_i, t6_wb_err_i};
|
1752
|
+
|
1753
|
+
//
|
1754
|
+
// Group WB target 7 i/f inputs and outputs
|
1755
|
+
//
|
1756
|
+
assign {t7_wb_cyc_o, t7_wb_stb_o, t7_wb_adr_o,
|
1757
|
+
t7_wb_sel_o, t7_wb_we_o, t7_wb_dat_o} = t7_out;
|
1758
|
+
assign t7_in = {t7_wb_dat_i, t7_wb_ack_i, t7_wb_err_i};
|
1759
|
+
|
1760
|
+
//
|
1761
|
+
// Assign to WB target i/f outputs
|
1762
|
+
//
|
1763
|
+
// Either inputs from the initiator are assigned or zeros.
|
1764
|
+
//
|
1765
|
+
assign t0_out = req_t[0] ? i0_in : {`TC_IIN_W{1'b0}};
|
1766
|
+
assign t1_out = req_t[1] ? i0_in : {`TC_IIN_W{1'b0}};
|
1767
|
+
assign t2_out = req_t[2] ? i0_in : {`TC_IIN_W{1'b0}};
|
1768
|
+
assign t3_out = req_t[3] ? i0_in : {`TC_IIN_W{1'b0}};
|
1769
|
+
assign t4_out = req_t[4] ? i0_in : {`TC_IIN_W{1'b0}};
|
1770
|
+
assign t5_out = req_t[5] ? i0_in : {`TC_IIN_W{1'b0}};
|
1771
|
+
assign t6_out = req_t[6] ? i0_in : {`TC_IIN_W{1'b0}};
|
1772
|
+
assign t7_out = req_t[7] ? i0_in : {`TC_IIN_W{1'b0}};
|
1773
|
+
|
1774
|
+
//
|
1775
|
+
// Assign to WB initiator i/f outputs
|
1776
|
+
//
|
1777
|
+
// Assign inputs from target to initiator outputs according to
|
1778
|
+
// which target is accessed. If there is no request for a target,
|
1779
|
+
// assign zeros.
|
1780
|
+
//
|
1781
|
+
assign i0_out = req_t[0] ? t0_in :
|
1782
|
+
req_t[1] ? t1_in :
|
1783
|
+
req_t[2] ? t2_in :
|
1784
|
+
req_t[3] ? t3_in :
|
1785
|
+
req_t[4] ? t4_in :
|
1786
|
+
req_t[5] ? t5_in :
|
1787
|
+
req_t[6] ? t6_in :
|
1788
|
+
req_t[7] ? t7_in : {`TC_TIN_W{1'b0}};
|
1789
|
+
|
1790
|
+
//
|
1791
|
+
// Determine which target is being accessed.
|
1792
|
+
//
|
1793
|
+
assign req_t[0] = i0_wb_cyc_i & (i0_wb_adr_i[`TC_AW-1:`TC_AW-t0_addr_w] == t0_addr);
|
1794
|
+
assign req_t[1] = i0_wb_cyc_i & (i0_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t1_addr);
|
1795
|
+
assign req_t[2] = i0_wb_cyc_i & (i0_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t2_addr);
|
1796
|
+
assign req_t[3] = i0_wb_cyc_i & (i0_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t3_addr);
|
1797
|
+
assign req_t[4] = i0_wb_cyc_i & (i0_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t4_addr);
|
1798
|
+
assign req_t[5] = i0_wb_cyc_i & (i0_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t5_addr);
|
1799
|
+
assign req_t[6] = i0_wb_cyc_i & (i0_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t6_addr);
|
1800
|
+
assign req_t[7] = i0_wb_cyc_i & (i0_wb_adr_i[`TC_AW-1:`TC_AW-t17_addr_w] == t7_addr);
|
1801
|
+
|
1802
|
+
endmodule
|