1 |
77 |
mihad |
//////////////////////////////////////////////////////////////////////
|
2 |
|
|
//// ////
|
3 |
|
|
//// File name "wb_slave_unit.v" ////
|
4 |
|
|
//// ////
|
5 |
|
|
//// This file is part of the "PCI bridge" project ////
|
6 |
|
|
//// http://www.opencores.org/cores/pci/ ////
|
7 |
|
|
//// ////
|
8 |
|
|
//// Author(s): ////
|
9 |
|
|
//// - Miha Dolenc (mihad@opencores.org) ////
|
10 |
|
|
//// ////
|
11 |
|
|
//// All additional information is avaliable in the README ////
|
12 |
|
|
//// file. ////
|
13 |
|
|
//// ////
|
14 |
|
|
//// ////
|
15 |
|
|
//////////////////////////////////////////////////////////////////////
|
16 |
|
|
//// ////
|
17 |
|
|
//// Copyright (C) 2001 Miha Dolenc, mihad@opencores.org ////
|
18 |
|
|
//// ////
|
19 |
|
|
//// This source file may be used and distributed without ////
|
20 |
|
|
//// restriction provided that this copyright statement is not ////
|
21 |
|
|
//// removed from the file and that any derivative work contains ////
|
22 |
|
|
//// the original copyright notice and the associated disclaimer. ////
|
23 |
|
|
//// ////
|
24 |
|
|
//// This source file is free software; you can redistribute it ////
|
25 |
|
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
26 |
|
|
//// Public License as published by the Free Software Foundation; ////
|
27 |
|
|
//// either version 2.1 of the License, or (at your option) any ////
|
28 |
|
|
//// later version. ////
|
29 |
|
|
//// ////
|
30 |
|
|
//// This source is distributed in the hope that it will be ////
|
31 |
|
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
32 |
|
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
33 |
|
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
34 |
|
|
//// details. ////
|
35 |
|
|
//// ////
|
36 |
|
|
//// You should have received a copy of the GNU Lesser General ////
|
37 |
|
|
//// Public License along with this source; if not, download it ////
|
38 |
|
|
//// from http://www.opencores.org/lgpl.shtml ////
|
39 |
|
|
//// ////
|
40 |
|
|
//////////////////////////////////////////////////////////////////////
|
41 |
|
|
//
|
42 |
|
|
// CVS Revision History
|
43 |
|
|
//
|
44 |
|
|
// $Log: not supported by cvs2svn $
|
45 |
140 |
mihad |
// Revision 1.2 2003/10/17 09:11:52 markom
|
46 |
|
|
// mbist signals updated according to newest convention
|
47 |
|
|
//
|
48 |
122 |
markom |
// Revision 1.1 2003/01/27 16:49:31 mihad
|
49 |
|
|
// Changed module and file names. Updated scripts accordingly. FIFO synchronizations changed.
|
50 |
|
|
//
|
51 |
77 |
mihad |
// Revision 1.8 2002/10/18 03:36:37 tadejm
|
52 |
122 |
markom |
// Changed wrong signal name mbist_sen into mbist_ctrl_i.
|
53 |
77 |
mihad |
//
|
54 |
|
|
// Revision 1.7 2002/10/17 22:49:22 tadejm
|
55 |
|
|
// Changed BIST signals for RAMs.
|
56 |
|
|
//
|
57 |
|
|
// Revision 1.6 2002/10/11 10:09:01 mihad
|
58 |
|
|
// Added additional testcase and changed rst name in BIST to trst
|
59 |
|
|
//
|
60 |
|
|
// Revision 1.5 2002/10/08 17:17:06 mihad
|
61 |
|
|
// Added BIST signals for RAMs.
|
62 |
|
|
//
|
63 |
|
|
// Revision 1.4 2002/09/25 15:53:52 mihad
|
64 |
|
|
// Removed all logic from asynchronous reset network
|
65 |
|
|
//
|
66 |
|
|
// Revision 1.3 2002/02/01 15:25:13 mihad
|
67 |
|
|
// Repaired a few bugs, updated specification, added test bench files and design document
|
68 |
|
|
//
|
69 |
|
|
// Revision 1.2 2001/10/05 08:14:30 mihad
|
70 |
|
|
// Updated all files with inclusion of timescale file for simulation purposes.
|
71 |
|
|
//
|
72 |
|
|
// Revision 1.1.1.1 2001/10/02 15:33:46 mihad
|
73 |
|
|
// New project directory structure
|
74 |
|
|
//
|
75 |
|
|
//
|
76 |
|
|
|
77 |
|
|
// Module instantiates and connects other modules lower in hierarcy
|
78 |
|
|
// Wishbone slave unit consists of modules that together form datapath
|
79 |
|
|
// between external WISHBONE masters and external PCI targets
|
80 |
|
|
`include "pci_constants.v"
|
81 |
|
|
|
82 |
|
|
// synopsys translate_off
|
83 |
|
|
`include "timescale.v"
|
84 |
|
|
// synopsys translate_on
|
85 |
|
|
|
86 |
|
|
module pci_wb_slave_unit
|
87 |
|
|
(
|
88 |
|
|
reset_in,
|
89 |
|
|
wb_clock_in,
|
90 |
|
|
pci_clock_in,
|
91 |
|
|
ADDR_I,
|
92 |
|
|
SDATA_I,
|
93 |
|
|
SDATA_O,
|
94 |
|
|
CYC_I,
|
95 |
|
|
STB_I,
|
96 |
|
|
WE_I,
|
97 |
|
|
SEL_I,
|
98 |
|
|
ACK_O,
|
99 |
|
|
RTY_O,
|
100 |
|
|
ERR_O,
|
101 |
|
|
CAB_I,
|
102 |
|
|
wbu_map_in,
|
103 |
|
|
wbu_pref_en_in,
|
104 |
|
|
wbu_mrl_en_in,
|
105 |
|
|
wbu_pci_drcomp_pending_in,
|
106 |
|
|
wbu_conf_data_in,
|
107 |
|
|
wbu_pciw_empty_in,
|
108 |
|
|
wbu_bar0_in,
|
109 |
|
|
wbu_bar1_in,
|
110 |
|
|
wbu_bar2_in,
|
111 |
|
|
wbu_bar3_in,
|
112 |
|
|
wbu_bar4_in,
|
113 |
|
|
wbu_bar5_in,
|
114 |
|
|
wbu_am0_in,
|
115 |
|
|
wbu_am1_in,
|
116 |
|
|
wbu_am2_in,
|
117 |
|
|
wbu_am3_in,
|
118 |
|
|
wbu_am4_in,
|
119 |
|
|
wbu_am5_in,
|
120 |
|
|
wbu_ta0_in,
|
121 |
|
|
wbu_ta1_in,
|
122 |
|
|
wbu_ta2_in,
|
123 |
|
|
wbu_ta3_in,
|
124 |
|
|
wbu_ta4_in,
|
125 |
|
|
wbu_ta5_in,
|
126 |
|
|
wbu_at_en_in,
|
127 |
|
|
wbu_ccyc_addr_in ,
|
128 |
|
|
wbu_master_enable_in,
|
129 |
140 |
mihad |
wb_init_complete_in,
|
130 |
77 |
mihad |
wbu_cache_line_size_not_zero,
|
131 |
|
|
wbu_cache_line_size_in,
|
132 |
|
|
wbu_pciif_gnt_in,
|
133 |
|
|
wbu_pciif_frame_in,
|
134 |
|
|
wbu_pciif_irdy_in,
|
135 |
|
|
wbu_pciif_trdy_in,
|
136 |
|
|
wbu_pciif_trdy_reg_in,
|
137 |
|
|
wbu_pciif_stop_in,
|
138 |
|
|
wbu_pciif_stop_reg_in,
|
139 |
|
|
wbu_pciif_devsel_in,
|
140 |
|
|
wbu_pciif_devsel_reg_in,
|
141 |
|
|
wbu_pciif_ad_reg_in,
|
142 |
|
|
wbu_pciif_req_out,
|
143 |
|
|
wbu_pciif_frame_out,
|
144 |
|
|
wbu_pciif_frame_en_out,
|
145 |
|
|
wbu_pciif_frame_en_in,
|
146 |
|
|
wbu_pciif_frame_out_in,
|
147 |
|
|
wbu_pciif_frame_load_out,
|
148 |
|
|
wbu_pciif_irdy_out,
|
149 |
|
|
wbu_pciif_irdy_en_out,
|
150 |
|
|
wbu_pciif_ad_out,
|
151 |
|
|
wbu_pciif_ad_en_out,
|
152 |
|
|
wbu_pciif_cbe_out,
|
153 |
|
|
wbu_pciif_cbe_en_out,
|
154 |
|
|
wbu_err_addr_out,
|
155 |
|
|
wbu_err_bc_out,
|
156 |
|
|
wbu_err_signal_out,
|
157 |
|
|
wbu_err_source_out,
|
158 |
|
|
wbu_err_rty_exp_out,
|
159 |
|
|
wbu_tabort_rec_out,
|
160 |
|
|
wbu_mabort_rec_out,
|
161 |
|
|
wbu_conf_offset_out,
|
162 |
|
|
wbu_conf_renable_out,
|
163 |
|
|
wbu_conf_wenable_out,
|
164 |
|
|
wbu_conf_be_out,
|
165 |
|
|
wbu_conf_data_out,
|
166 |
|
|
wbu_del_read_comp_pending_out,
|
167 |
|
|
wbu_wbw_fifo_empty_out,
|
168 |
|
|
wbu_latency_tim_val_in,
|
169 |
|
|
wbu_ad_load_out,
|
170 |
|
|
wbu_ad_load_on_transfer_out
|
171 |
|
|
|
172 |
|
|
`ifdef PCI_BIST
|
173 |
|
|
,
|
174 |
|
|
// debug chain signals
|
175 |
122 |
markom |
mbist_si_i, // bist scan serial in
|
176 |
|
|
mbist_so_o, // bist scan serial out
|
177 |
|
|
mbist_ctrl_i // bist chain shift control
|
178 |
77 |
mihad |
`endif
|
179 |
|
|
);
|
180 |
|
|
|
181 |
|
|
input reset_in,
|
182 |
|
|
wb_clock_in,
|
183 |
|
|
pci_clock_in ;
|
184 |
|
|
|
185 |
|
|
input [31:0] ADDR_I ;
|
186 |
|
|
input [31:0] SDATA_I ;
|
187 |
|
|
output [31:0] SDATA_O ;
|
188 |
|
|
input CYC_I ;
|
189 |
|
|
input STB_I ;
|
190 |
|
|
input WE_I ;
|
191 |
|
|
input [3:0] SEL_I ;
|
192 |
|
|
output ACK_O ;
|
193 |
|
|
output RTY_O ;
|
194 |
|
|
output ERR_O ;
|
195 |
|
|
input CAB_I ;
|
196 |
|
|
|
197 |
|
|
input [5:0] wbu_map_in ;
|
198 |
|
|
input [5:0] wbu_pref_en_in ;
|
199 |
|
|
input [5:0] wbu_mrl_en_in ;
|
200 |
|
|
|
201 |
|
|
input wbu_pci_drcomp_pending_in ;
|
202 |
|
|
|
203 |
|
|
input [31:0] wbu_conf_data_in ;
|
204 |
|
|
|
205 |
|
|
input wbu_pciw_empty_in ;
|
206 |
|
|
|
207 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_bar0_in ;
|
208 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_bar1_in ;
|
209 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_bar2_in ;
|
210 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_bar3_in ;
|
211 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_bar4_in ;
|
212 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_bar5_in ;
|
213 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_am0_in ;
|
214 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_am1_in ;
|
215 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_am2_in ;
|
216 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_am3_in ;
|
217 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_am4_in ;
|
218 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_am5_in ;
|
219 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_ta0_in ;
|
220 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_ta1_in ;
|
221 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_ta2_in ;
|
222 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_ta3_in ;
|
223 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_ta4_in ;
|
224 |
|
|
input [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] wbu_ta5_in ;
|
225 |
|
|
input [5:0] wbu_at_en_in ;
|
226 |
|
|
|
227 |
|
|
input [23:0] wbu_ccyc_addr_in ;
|
228 |
|
|
|
229 |
140 |
mihad |
input wbu_master_enable_in ;
|
230 |
|
|
input wb_init_complete_in ;
|
231 |
77 |
mihad |
|
232 |
|
|
input wbu_cache_line_size_not_zero ;
|
233 |
|
|
input [7:0] wbu_cache_line_size_in ;
|
234 |
|
|
|
235 |
|
|
input wbu_pciif_gnt_in ;
|
236 |
|
|
input wbu_pciif_frame_in ;
|
237 |
|
|
input wbu_pciif_frame_en_in ;
|
238 |
|
|
input wbu_pciif_irdy_in ;
|
239 |
|
|
input wbu_pciif_trdy_in;
|
240 |
|
|
input wbu_pciif_trdy_reg_in;
|
241 |
|
|
input wbu_pciif_stop_in ;
|
242 |
|
|
input wbu_pciif_stop_reg_in ;
|
243 |
|
|
input wbu_pciif_devsel_in ;
|
244 |
|
|
input wbu_pciif_devsel_reg_in ;
|
245 |
|
|
input [31:0] wbu_pciif_ad_reg_in ;
|
246 |
|
|
|
247 |
|
|
output wbu_pciif_req_out ;
|
248 |
|
|
output wbu_pciif_frame_out ;
|
249 |
|
|
output wbu_pciif_frame_en_out ;
|
250 |
|
|
input wbu_pciif_frame_out_in ;
|
251 |
|
|
output wbu_pciif_frame_load_out ;
|
252 |
|
|
output wbu_pciif_irdy_out ;
|
253 |
|
|
output wbu_pciif_irdy_en_out ;
|
254 |
|
|
output [31:0] wbu_pciif_ad_out ;
|
255 |
|
|
output wbu_pciif_ad_en_out ;
|
256 |
|
|
output [3:0] wbu_pciif_cbe_out ;
|
257 |
|
|
output wbu_pciif_cbe_en_out ;
|
258 |
|
|
|
259 |
|
|
output [31:0] wbu_err_addr_out ;
|
260 |
|
|
output [3:0] wbu_err_bc_out ;
|
261 |
|
|
output wbu_err_signal_out ;
|
262 |
|
|
output wbu_err_source_out ;
|
263 |
|
|
output wbu_err_rty_exp_out ;
|
264 |
|
|
output wbu_tabort_rec_out ;
|
265 |
|
|
output wbu_mabort_rec_out ;
|
266 |
|
|
|
267 |
|
|
output [11:0] wbu_conf_offset_out ;
|
268 |
|
|
output wbu_conf_renable_out ;
|
269 |
|
|
output wbu_conf_wenable_out ;
|
270 |
|
|
output [3:0] wbu_conf_be_out ;
|
271 |
|
|
output [31:0] wbu_conf_data_out ;
|
272 |
|
|
|
273 |
|
|
output wbu_del_read_comp_pending_out ;
|
274 |
|
|
output wbu_wbw_fifo_empty_out ;
|
275 |
|
|
|
276 |
|
|
input [7:0] wbu_latency_tim_val_in ;
|
277 |
|
|
|
278 |
|
|
output wbu_ad_load_out ;
|
279 |
|
|
output wbu_ad_load_on_transfer_out ;
|
280 |
|
|
|
281 |
|
|
`ifdef PCI_BIST
|
282 |
|
|
/*-----------------------------------------------------
|
283 |
|
|
BIST debug chain port signals
|
284 |
|
|
-----------------------------------------------------*/
|
285 |
122 |
markom |
input mbist_si_i; // bist scan serial in
|
286 |
|
|
output mbist_so_o; // bist scan serial out
|
287 |
|
|
input [`PCI_MBIST_CTRL_WIDTH - 1:0] mbist_ctrl_i; // bist chain shift control
|
288 |
77 |
mihad |
`endif
|
289 |
|
|
|
290 |
|
|
// pci master interface outputs
|
291 |
|
|
wire [31:0] pcim_if_address_out ;
|
292 |
|
|
wire [3:0] pcim_if_bc_out ;
|
293 |
|
|
wire [31:0] pcim_if_data_out ;
|
294 |
|
|
wire [3:0] pcim_if_be_out ;
|
295 |
|
|
wire pcim_if_req_out ;
|
296 |
|
|
wire pcim_if_rdy_out ;
|
297 |
|
|
wire pcim_if_last_out ;
|
298 |
|
|
wire pcim_if_wbw_renable_out ;
|
299 |
|
|
wire pcim_if_wbr_wenable_out ;
|
300 |
|
|
wire [31:0] pcim_if_wbr_data_out ;
|
301 |
|
|
wire [3:0] pcim_if_wbr_be_out ;
|
302 |
|
|
wire [3:0] pcim_if_wbr_control_out ;
|
303 |
|
|
wire pcim_if_del_complete_out ;
|
304 |
|
|
wire pcim_if_del_error_out ;
|
305 |
|
|
wire pcim_if_del_rty_exp_out ;
|
306 |
|
|
wire [31:0] pcim_if_err_addr_out ;
|
307 |
|
|
wire [3:0] pcim_if_err_bc_out ;
|
308 |
|
|
wire pcim_if_err_signal_out ;
|
309 |
|
|
wire pcim_if_err_source_out ;
|
310 |
|
|
wire pcim_if_err_rty_exp_out ;
|
311 |
|
|
wire pcim_if_tabort_out ;
|
312 |
|
|
wire pcim_if_mabort_out ;
|
313 |
|
|
wire [31:0] pcim_if_next_data_out ;
|
314 |
|
|
wire [3:0] pcim_if_next_be_out ;
|
315 |
|
|
wire pcim_if_next_last_out ;
|
316 |
|
|
wire pcim_if_posted_write_not_present_out ;
|
317 |
|
|
|
318 |
|
|
|
319 |
|
|
|
320 |
|
|
wire pcim_sm_req_out ;
|
321 |
|
|
wire pcim_sm_frame_out ;
|
322 |
|
|
wire pcim_sm_frame_en_out ;
|
323 |
|
|
wire pcim_sm_irdy_out ;
|
324 |
|
|
wire pcim_sm_irdy_en_out ;
|
325 |
|
|
wire [31:0] pcim_sm_ad_out ;
|
326 |
|
|
wire pcim_sm_ad_en_out ;
|
327 |
|
|
wire [3:0] pcim_sm_cbe_out ;
|
328 |
|
|
wire pcim_sm_cbe_en_out ;
|
329 |
|
|
wire pcim_sm_ad_load_out ;
|
330 |
|
|
wire pcim_sm_ad_load_on_transfer_out ;
|
331 |
|
|
|
332 |
|
|
wire pcim_sm_wait_out ;
|
333 |
|
|
wire pcim_sm_wtransfer_out ;
|
334 |
|
|
wire pcim_sm_rtransfer_out ;
|
335 |
|
|
wire pcim_sm_retry_out ;
|
336 |
|
|
wire pcim_sm_rerror_out ;
|
337 |
|
|
wire pcim_sm_first_out ;
|
338 |
|
|
wire pcim_sm_mabort_out ;
|
339 |
|
|
wire pcim_sm_frame_load_out ;
|
340 |
|
|
|
341 |
|
|
assign wbu_pciif_frame_load_out = pcim_sm_frame_load_out ;
|
342 |
|
|
|
343 |
|
|
assign wbu_err_addr_out = pcim_if_err_addr_out ;
|
344 |
|
|
assign wbu_err_bc_out = pcim_if_err_bc_out ;
|
345 |
|
|
assign wbu_err_signal_out = pcim_if_err_signal_out ;
|
346 |
|
|
assign wbu_err_source_out = pcim_if_err_source_out ;
|
347 |
|
|
assign wbu_err_rty_exp_out = pcim_if_err_rty_exp_out ;
|
348 |
|
|
assign wbu_tabort_rec_out = pcim_if_tabort_out ;
|
349 |
|
|
assign wbu_mabort_rec_out = pcim_if_mabort_out ;
|
350 |
|
|
|
351 |
|
|
assign wbu_wbw_fifo_empty_out = pcim_if_posted_write_not_present_out ;
|
352 |
|
|
|
353 |
|
|
// pci master state machine outputs
|
354 |
|
|
// pci interface signals
|
355 |
|
|
assign wbu_pciif_req_out = pcim_sm_req_out ;
|
356 |
|
|
assign wbu_pciif_frame_out = pcim_sm_frame_out ;
|
357 |
|
|
assign wbu_pciif_frame_en_out = pcim_sm_frame_en_out ;
|
358 |
|
|
assign wbu_pciif_irdy_out = pcim_sm_irdy_out ;
|
359 |
|
|
assign wbu_pciif_irdy_en_out = pcim_sm_irdy_en_out ;
|
360 |
|
|
assign wbu_pciif_ad_out = pcim_sm_ad_out ;
|
361 |
|
|
assign wbu_pciif_ad_en_out = pcim_sm_ad_en_out ;
|
362 |
|
|
assign wbu_pciif_cbe_out = pcim_sm_cbe_out ;
|
363 |
|
|
assign wbu_pciif_cbe_en_out = pcim_sm_cbe_en_out ;
|
364 |
|
|
assign wbu_ad_load_out = pcim_sm_ad_load_out ;
|
365 |
|
|
assign wbu_ad_load_on_transfer_out = pcim_sm_ad_load_on_transfer_out ;
|
366 |
|
|
|
367 |
|
|
// signals to internal of the core
|
368 |
|
|
wire [31:0] pcim_sm_data_out ;
|
369 |
|
|
|
370 |
|
|
// wishbone slave state machine outputs
|
371 |
|
|
wire [3:0] wbs_sm_del_bc_out ;
|
372 |
|
|
wire wbs_sm_del_req_out ;
|
373 |
|
|
wire wbs_sm_del_done_out ;
|
374 |
|
|
wire wbs_sm_del_burst_out ;
|
375 |
|
|
wire wbs_sm_del_write_out ;
|
376 |
|
|
wire [11:0] wbs_sm_conf_offset_out ;
|
377 |
|
|
wire wbs_sm_conf_renable_out ;
|
378 |
|
|
wire wbs_sm_conf_wenable_out ;
|
379 |
|
|
wire [3:0] wbs_sm_conf_be_out ;
|
380 |
|
|
wire [31:0] wbs_sm_conf_data_out ;
|
381 |
|
|
wire [31:0] wbs_sm_data_out ;
|
382 |
|
|
wire [3:0] wbs_sm_cbe_out ;
|
383 |
|
|
wire wbs_sm_wbw_wenable_out ;
|
384 |
|
|
wire [3:0] wbs_sm_wbw_control_out ;
|
385 |
|
|
wire wbs_sm_wbr_renable_out ;
|
386 |
|
|
wire wbs_sm_wbr_flush_out ;
|
387 |
|
|
wire wbs_sm_del_in_progress_out ;
|
388 |
|
|
wire [31:0] wbs_sm_sdata_out ;
|
389 |
|
|
wire wbs_sm_ack_out ;
|
390 |
|
|
wire wbs_sm_rty_out ;
|
391 |
|
|
wire wbs_sm_err_out ;
|
392 |
|
|
wire wbs_sm_sample_address_out ;
|
393 |
|
|
|
394 |
|
|
assign wbu_conf_offset_out = wbs_sm_conf_offset_out ;
|
395 |
|
|
assign wbu_conf_renable_out = wbs_sm_conf_renable_out ;
|
396 |
|
|
assign wbu_conf_wenable_out = wbs_sm_conf_wenable_out ;
|
397 |
|
|
assign wbu_conf_be_out = ~wbs_sm_conf_be_out ;
|
398 |
|
|
assign wbu_conf_data_out = wbs_sm_conf_data_out ;
|
399 |
|
|
|
400 |
|
|
assign SDATA_O = wbs_sm_sdata_out ;
|
401 |
|
|
assign ACK_O = wbs_sm_ack_out ;
|
402 |
|
|
assign RTY_O = wbs_sm_rty_out ;
|
403 |
|
|
assign ERR_O = wbs_sm_err_out ;
|
404 |
|
|
|
405 |
|
|
|
406 |
|
|
// wbw_wbr fifo outputs
|
407 |
|
|
|
408 |
|
|
// wbw_fifo_outputs:
|
409 |
|
|
wire [31:0] fifos_wbw_addr_data_out ;
|
410 |
|
|
wire [3:0] fifos_wbw_cbe_out ;
|
411 |
|
|
wire [3:0] fifos_wbw_control_out ;
|
412 |
|
|
wire fifos_wbw_almost_full_out ;
|
413 |
|
|
wire fifos_wbw_full_out ;
|
414 |
|
|
wire fifos_wbw_empty_out ;
|
415 |
|
|
wire fifos_wbw_transaction_ready_out ;
|
416 |
|
|
|
417 |
|
|
// wbr_fifo_outputs
|
418 |
|
|
wire [31:0] fifos_wbr_data_out ;
|
419 |
|
|
wire [3:0] fifos_wbr_be_out ;
|
420 |
|
|
wire [3:0] fifos_wbr_control_out ;
|
421 |
|
|
wire fifos_wbr_empty_out ;
|
422 |
|
|
|
423 |
|
|
// address multiplexer outputs
|
424 |
|
|
wire [5:0] amux_hit_out ;
|
425 |
|
|
wire [31:0] amux_address_out ;
|
426 |
|
|
|
427 |
|
|
// delayed transaction logic outputs
|
428 |
|
|
wire [31:0] del_sync_addr_out ;
|
429 |
|
|
wire [3:0] del_sync_be_out ;
|
430 |
|
|
wire del_sync_we_out ;
|
431 |
|
|
wire del_sync_comp_req_pending_out ;
|
432 |
|
|
wire del_sync_comp_comp_pending_out ;
|
433 |
|
|
wire del_sync_req_req_pending_out ;
|
434 |
|
|
wire del_sync_req_comp_pending_out ;
|
435 |
|
|
wire [3:0] del_sync_bc_out ;
|
436 |
|
|
wire del_sync_status_out ;
|
437 |
|
|
wire del_sync_comp_flush_out ;
|
438 |
|
|
wire del_sync_burst_out ;
|
439 |
|
|
|
440 |
|
|
assign wbu_del_read_comp_pending_out = del_sync_comp_comp_pending_out ;
|
441 |
|
|
|
442 |
|
|
// delayed write storage output
|
443 |
|
|
wire [31:0] del_write_data_out ;
|
444 |
|
|
|
445 |
|
|
// config. cycle address decoder output
|
446 |
|
|
wire [31:0] ccyc_addr_out ;
|
447 |
|
|
|
448 |
|
|
|
449 |
|
|
// WISHBONE slave interface inputs
|
450 |
|
|
wire [4:0] wbs_sm_hit_in = amux_hit_out[5:1] ;
|
451 |
|
|
wire wbs_sm_conf_hit_in = amux_hit_out[0] ;
|
452 |
|
|
wire [4:0] wbs_sm_map_in = wbu_map_in[5:1] ;
|
453 |
|
|
wire [4:0] wbs_sm_pref_en_in = wbu_pref_en_in[5:1] ;
|
454 |
|
|
wire [4:0] wbs_sm_mrl_en_in = wbu_mrl_en_in[5:1] ;
|
455 |
|
|
wire [31:0] wbs_sm_addr_in = amux_address_out ;
|
456 |
|
|
wire [3:0] wbs_sm_del_bc_in = del_sync_bc_out ;
|
457 |
|
|
wire wbs_sm_del_req_pending_in = del_sync_req_req_pending_out ;
|
458 |
|
|
wire wbs_sm_wb_del_comp_pending_in = del_sync_req_comp_pending_out ;
|
459 |
|
|
wire wbs_sm_pci_drcomp_pending_in = wbu_pci_drcomp_pending_in ;
|
460 |
|
|
wire wbs_sm_del_write_in = del_sync_we_out ;
|
461 |
|
|
wire wbs_sm_del_error_in = del_sync_status_out ;
|
462 |
|
|
wire [31:0] wbs_sm_del_addr_in = del_sync_addr_out ;
|
463 |
|
|
wire [3:0] wbs_sm_del_be_in = del_sync_be_out ;
|
464 |
|
|
wire [31:0] wbs_sm_conf_data_in = wbu_conf_data_in ;
|
465 |
|
|
wire wbs_sm_wbw_almost_full_in = fifos_wbw_almost_full_out ;
|
466 |
|
|
wire wbs_sm_wbw_full_in = fifos_wbw_full_out ;
|
467 |
|
|
wire [3:0] wbs_sm_wbr_be_in = fifos_wbr_be_out ;
|
468 |
|
|
wire [31:0] wbs_sm_wbr_data_in = fifos_wbr_data_out ;
|
469 |
|
|
wire [3:0] wbs_sm_wbr_control_in = fifos_wbr_control_out ;
|
470 |
|
|
wire wbs_sm_wbr_empty_in = fifos_wbr_empty_out ;
|
471 |
|
|
wire wbs_sm_pciw_empty_in = wbu_pciw_empty_in ;
|
472 |
|
|
wire wbs_sm_lock_in = ~wbu_master_enable_in ;
|
473 |
|
|
wire wbs_sm_cache_line_size_not_zero = wbu_cache_line_size_not_zero ;
|
474 |
|
|
wire wbs_sm_cyc_in = CYC_I ;
|
475 |
|
|
wire wbs_sm_stb_in = STB_I ;
|
476 |
|
|
wire wbs_sm_we_in = WE_I ;
|
477 |
|
|
wire [3:0] wbs_sm_sel_in = SEL_I ;
|
478 |
|
|
wire [31:0] wbs_sm_sdata_in = SDATA_I ;
|
479 |
|
|
wire wbs_sm_cab_in = CAB_I ;
|
480 |
|
|
wire [31:0] wbs_sm_ccyc_addr_in = ccyc_addr_out ;
|
481 |
140 |
mihad |
wire wbs_sm_init_complete_in = wb_init_complete_in ;
|
482 |
77 |
mihad |
|
483 |
|
|
// WISHBONE slave interface instantiation
|
484 |
|
|
pci_wb_slave wishbone_slave(
|
485 |
|
|
.wb_clock_in (wb_clock_in) ,
|
486 |
|
|
.reset_in (reset_in) ,
|
487 |
|
|
.wb_hit_in (wbs_sm_hit_in) ,
|
488 |
|
|
.wb_conf_hit_in (wbs_sm_conf_hit_in) ,
|
489 |
|
|
.wb_map_in (wbs_sm_map_in) ,
|
490 |
|
|
.wb_pref_en_in (wbs_sm_pref_en_in) ,
|
491 |
|
|
.wb_mrl_en_in (wbs_sm_mrl_en_in) ,
|
492 |
|
|
.wb_addr_in (wbs_sm_addr_in),
|
493 |
|
|
.del_bc_in (wbs_sm_del_bc_in),
|
494 |
|
|
.wb_del_req_pending_in (wbs_sm_del_req_pending_in),
|
495 |
|
|
.wb_del_comp_pending_in (wbs_sm_wb_del_comp_pending_in),
|
496 |
|
|
.pci_drcomp_pending_in (wbs_sm_pci_drcomp_pending_in),
|
497 |
|
|
.del_bc_out (wbs_sm_del_bc_out),
|
498 |
|
|
.del_req_out (wbs_sm_del_req_out),
|
499 |
|
|
.del_done_out (wbs_sm_del_done_out),
|
500 |
|
|
.del_burst_out (wbs_sm_del_burst_out),
|
501 |
|
|
.del_write_out (wbs_sm_del_write_out),
|
502 |
|
|
.del_write_in (wbs_sm_del_write_in),
|
503 |
|
|
.del_error_in (wbs_sm_del_error_in),
|
504 |
|
|
.wb_del_addr_in (wbs_sm_del_addr_in),
|
505 |
|
|
.wb_del_be_in (wbs_sm_del_be_in),
|
506 |
|
|
.wb_conf_offset_out (wbs_sm_conf_offset_out),
|
507 |
|
|
.wb_conf_renable_out (wbs_sm_conf_renable_out),
|
508 |
|
|
.wb_conf_wenable_out (wbs_sm_conf_wenable_out),
|
509 |
|
|
.wb_conf_be_out (wbs_sm_conf_be_out),
|
510 |
|
|
.wb_conf_data_in (wbs_sm_conf_data_in),
|
511 |
|
|
.wb_conf_data_out (wbs_sm_conf_data_out),
|
512 |
|
|
.wb_data_out (wbs_sm_data_out),
|
513 |
|
|
.wb_cbe_out (wbs_sm_cbe_out),
|
514 |
|
|
.wbw_fifo_wenable_out (wbs_sm_wbw_wenable_out),
|
515 |
|
|
.wbw_fifo_control_out (wbs_sm_wbw_control_out),
|
516 |
|
|
.wbw_fifo_almost_full_in (wbs_sm_wbw_almost_full_in),
|
517 |
|
|
.wbw_fifo_full_in (wbs_sm_wbw_full_in),
|
518 |
|
|
.wbr_fifo_renable_out (wbs_sm_wbr_renable_out),
|
519 |
|
|
.wbr_fifo_be_in (wbs_sm_wbr_be_in),
|
520 |
|
|
.wbr_fifo_data_in (wbs_sm_wbr_data_in),
|
521 |
|
|
.wbr_fifo_control_in (wbs_sm_wbr_control_in),
|
522 |
|
|
.wbr_fifo_flush_out (wbs_sm_wbr_flush_out),
|
523 |
|
|
.wbr_fifo_empty_in (wbs_sm_wbr_empty_in),
|
524 |
|
|
.pciw_fifo_empty_in (wbs_sm_pciw_empty_in),
|
525 |
|
|
.wbs_lock_in (wbs_sm_lock_in),
|
526 |
140 |
mihad |
.init_complete_in (wbs_sm_init_complete_in),
|
527 |
77 |
mihad |
.cache_line_size_not_zero (wbs_sm_cache_line_size_not_zero),
|
528 |
|
|
.del_in_progress_out (wbs_sm_del_in_progress_out),
|
529 |
|
|
.ccyc_addr_in (wbs_sm_ccyc_addr_in),
|
530 |
|
|
.sample_address_out (wbs_sm_sample_address_out),
|
531 |
|
|
.CYC_I (wbs_sm_cyc_in),
|
532 |
|
|
.STB_I (wbs_sm_stb_in),
|
533 |
|
|
.WE_I (wbs_sm_we_in),
|
534 |
|
|
.SEL_I (wbs_sm_sel_in),
|
535 |
|
|
.SDATA_I (wbs_sm_sdata_in),
|
536 |
|
|
.SDATA_O (wbs_sm_sdata_out),
|
537 |
|
|
.ACK_O (wbs_sm_ack_out),
|
538 |
|
|
.RTY_O (wbs_sm_rty_out),
|
539 |
|
|
.ERR_O (wbs_sm_err_out),
|
540 |
|
|
.CAB_I (wbs_sm_cab_in)
|
541 |
|
|
);
|
542 |
|
|
|
543 |
|
|
// wbw_wbr_fifos inputs
|
544 |
|
|
// WBW_FIFO inputs
|
545 |
|
|
wire fifos_wbw_wenable_in = wbs_sm_wbw_wenable_out;
|
546 |
|
|
wire [31:0] fifos_wbw_addr_data_in = wbs_sm_data_out ;
|
547 |
|
|
wire [3:0] fifos_wbw_cbe_in = wbs_sm_cbe_out ;
|
548 |
|
|
wire [3:0] fifos_wbw_control_in = wbs_sm_wbw_control_out ;
|
549 |
|
|
wire fifos_wbw_renable_in = pcim_if_wbw_renable_out ;
|
550 |
|
|
|
551 |
|
|
//wire fifos_wbw_flush_in = 1'b0 ; flush for write fifo not used
|
552 |
|
|
|
553 |
|
|
// WBR_FIFO inputs
|
554 |
|
|
wire fifos_wbr_wenable_in = pcim_if_wbr_wenable_out ;
|
555 |
|
|
wire [31:0] fifos_wbr_data_in = pcim_if_wbr_data_out ;
|
556 |
|
|
wire [3:0] fifos_wbr_be_in = pcim_if_wbr_be_out ;
|
557 |
|
|
wire [3:0] fifos_wbr_control_in = pcim_if_wbr_control_out ;
|
558 |
|
|
wire fifos_wbr_renable_in = wbs_sm_wbr_renable_out ;
|
559 |
|
|
wire fifos_wbr_flush_in = wbs_sm_wbr_flush_out || del_sync_comp_flush_out ;
|
560 |
|
|
|
561 |
|
|
// WBW_FIFO and WBR_FIFO instantiation
|
562 |
|
|
pci_wbw_wbr_fifos fifos
|
563 |
|
|
(
|
564 |
|
|
.wb_clock_in (wb_clock_in),
|
565 |
|
|
.pci_clock_in (pci_clock_in),
|
566 |
|
|
.reset_in (reset_in),
|
567 |
|
|
.wbw_wenable_in (fifos_wbw_wenable_in),
|
568 |
|
|
.wbw_addr_data_in (fifos_wbw_addr_data_in),
|
569 |
|
|
.wbw_cbe_in (fifos_wbw_cbe_in),
|
570 |
|
|
.wbw_control_in (fifos_wbw_control_in),
|
571 |
|
|
.wbw_renable_in (fifos_wbw_renable_in),
|
572 |
|
|
.wbw_addr_data_out (fifos_wbw_addr_data_out),
|
573 |
|
|
.wbw_cbe_out (fifos_wbw_cbe_out),
|
574 |
|
|
.wbw_control_out (fifos_wbw_control_out),
|
575 |
|
|
// .wbw_flush_in (fifos_wbw_flush_in), // flush for write fifo not used
|
576 |
|
|
.wbw_almost_full_out (fifos_wbw_almost_full_out),
|
577 |
|
|
.wbw_full_out (fifos_wbw_full_out),
|
578 |
|
|
.wbw_empty_out (fifos_wbw_empty_out),
|
579 |
|
|
.wbw_transaction_ready_out (fifos_wbw_transaction_ready_out),
|
580 |
|
|
.wbr_wenable_in (fifos_wbr_wenable_in),
|
581 |
|
|
.wbr_data_in (fifos_wbr_data_in),
|
582 |
|
|
.wbr_be_in (fifos_wbr_be_in),
|
583 |
|
|
.wbr_control_in (fifos_wbr_control_in),
|
584 |
|
|
.wbr_renable_in (fifos_wbr_renable_in),
|
585 |
|
|
.wbr_data_out (fifos_wbr_data_out),
|
586 |
|
|
.wbr_be_out (fifos_wbr_be_out),
|
587 |
|
|
.wbr_control_out (fifos_wbr_control_out),
|
588 |
|
|
.wbr_flush_in (fifos_wbr_flush_in),
|
589 |
|
|
.wbr_empty_out (fifos_wbr_empty_out)
|
590 |
|
|
|
591 |
|
|
`ifdef PCI_BIST
|
592 |
|
|
,
|
593 |
122 |
markom |
.mbist_si_i (mbist_si_i),
|
594 |
|
|
.mbist_so_o (mbist_so_o),
|
595 |
|
|
.mbist_ctrl_i (mbist_ctrl_i)
|
596 |
77 |
mihad |
`endif
|
597 |
|
|
) ;
|
598 |
|
|
|
599 |
|
|
wire [31:0] amux_addr_in = ADDR_I ;
|
600 |
|
|
wire amux_sample_address_in = wbs_sm_sample_address_out ;
|
601 |
|
|
|
602 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_bar0_in = wbu_bar0_in ;
|
603 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_bar1_in = wbu_bar1_in ;
|
604 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_bar2_in = wbu_bar2_in ;
|
605 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_bar3_in = wbu_bar3_in ;
|
606 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_bar4_in = wbu_bar4_in ;
|
607 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_bar5_in = wbu_bar5_in ;
|
608 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_am0_in = wbu_am0_in ;
|
609 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_am1_in = wbu_am1_in ;
|
610 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_am2_in = wbu_am2_in ;
|
611 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_am3_in = wbu_am3_in ;
|
612 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_am4_in = wbu_am4_in ;
|
613 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_am5_in = wbu_am5_in ;
|
614 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_ta0_in = wbu_ta0_in ;
|
615 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_ta1_in = wbu_ta1_in ;
|
616 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_ta2_in = wbu_ta2_in ;
|
617 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_ta3_in = wbu_ta3_in ;
|
618 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_ta4_in = wbu_ta4_in ;
|
619 |
|
|
wire [(`WB_NUM_OF_DEC_ADDR_LINES - 1):0] amux_ta5_in = wbu_ta5_in ;
|
620 |
|
|
wire [5:0] amux_at_en_in = wbu_at_en_in ;
|
621 |
|
|
|
622 |
|
|
pci_wb_addr_mux wb_addr_dec
|
623 |
|
|
(
|
624 |
|
|
`ifdef REGISTER_WBS_OUTPUTS
|
625 |
|
|
.clk_in (wb_clock_in),
|
626 |
|
|
.reset_in (reset_in),
|
627 |
|
|
.sample_address_in (amux_sample_address_in),
|
628 |
|
|
`endif
|
629 |
|
|
.address_in (amux_addr_in),
|
630 |
|
|
.bar0_in (amux_bar0_in),
|
631 |
|
|
.bar1_in (amux_bar1_in),
|
632 |
|
|
.bar2_in (amux_bar2_in),
|
633 |
|
|
.bar3_in (amux_bar3_in),
|
634 |
|
|
.bar4_in (amux_bar4_in),
|
635 |
|
|
.bar5_in (amux_bar5_in),
|
636 |
|
|
.am0_in (amux_am0_in),
|
637 |
|
|
.am1_in (amux_am1_in),
|
638 |
|
|
.am2_in (amux_am2_in),
|
639 |
|
|
.am3_in (amux_am3_in),
|
640 |
|
|
.am4_in (amux_am4_in),
|
641 |
|
|
.am5_in (amux_am5_in),
|
642 |
|
|
.ta0_in (amux_ta0_in),
|
643 |
|
|
.ta1_in (amux_ta1_in),
|
644 |
|
|
.ta2_in (amux_ta2_in),
|
645 |
|
|
.ta3_in (amux_ta3_in),
|
646 |
|
|
.ta4_in (amux_ta4_in),
|
647 |
|
|
.ta5_in (amux_ta5_in),
|
648 |
|
|
.at_en_in (amux_at_en_in),
|
649 |
|
|
.hit_out (amux_hit_out),
|
650 |
|
|
.address_out (amux_address_out)
|
651 |
|
|
);
|
652 |
|
|
|
653 |
|
|
// delayed transaction logic inputs
|
654 |
|
|
wire del_sync_req_in = wbs_sm_del_req_out ;
|
655 |
|
|
wire del_sync_comp_in = pcim_if_del_complete_out ;
|
656 |
|
|
wire del_sync_done_in = wbs_sm_del_done_out ;
|
657 |
|
|
wire del_sync_in_progress_in = wbs_sm_del_in_progress_out ;
|
658 |
|
|
wire [31:0] del_sync_addr_in = wbs_sm_data_out ;
|
659 |
|
|
wire [3:0] del_sync_be_in = wbs_sm_conf_be_out ;
|
660 |
|
|
wire del_sync_we_in = wbs_sm_del_write_out ;
|
661 |
|
|
wire [3:0] del_sync_bc_in = wbs_sm_del_bc_out ;
|
662 |
|
|
wire del_sync_status_in = pcim_if_del_error_out ;
|
663 |
|
|
wire del_sync_burst_in = wbs_sm_del_burst_out ;
|
664 |
|
|
wire del_sync_retry_expired_in = pcim_if_del_rty_exp_out ;
|
665 |
|
|
|
666 |
|
|
// delayed transaction logic instantiation
|
667 |
|
|
pci_delayed_sync del_sync (
|
668 |
|
|
.reset_in (reset_in),
|
669 |
|
|
.req_clk_in (wb_clock_in),
|
670 |
|
|
.comp_clk_in (pci_clock_in),
|
671 |
|
|
.req_in (del_sync_req_in),
|
672 |
|
|
.comp_in (del_sync_comp_in),
|
673 |
|
|
.done_in (del_sync_done_in),
|
674 |
|
|
.in_progress_in (del_sync_in_progress_in),
|
675 |
|
|
.comp_req_pending_out (del_sync_comp_req_pending_out),
|
676 |
|
|
.comp_comp_pending_out(del_sync_comp_comp_pending_out),
|
677 |
|
|
.req_req_pending_out (del_sync_req_req_pending_out),
|
678 |
|
|
.req_comp_pending_out (del_sync_req_comp_pending_out),
|
679 |
|
|
.addr_in (del_sync_addr_in),
|
680 |
|
|
.be_in (del_sync_be_in),
|
681 |
|
|
.addr_out (del_sync_addr_out),
|
682 |
|
|
.be_out (del_sync_be_out),
|
683 |
|
|
.we_in (del_sync_we_in),
|
684 |
|
|
.we_out (del_sync_we_out),
|
685 |
|
|
.bc_in (del_sync_bc_in),
|
686 |
|
|
.bc_out (del_sync_bc_out),
|
687 |
|
|
.status_in (del_sync_status_in),
|
688 |
|
|
.status_out (del_sync_status_out),
|
689 |
|
|
.comp_flush_out (del_sync_comp_flush_out),
|
690 |
|
|
.burst_in (del_sync_burst_in),
|
691 |
|
|
.burst_out (del_sync_burst_out),
|
692 |
|
|
.retry_expired_in (del_sync_retry_expired_in)
|
693 |
|
|
);
|
694 |
|
|
|
695 |
|
|
// delayed write storage inputs
|
696 |
|
|
wire del_write_we_in = wbs_sm_del_req_out && wbs_sm_del_write_out ;
|
697 |
|
|
wire [31:0] del_write_data_in = wbs_sm_conf_data_out ;
|
698 |
|
|
|
699 |
|
|
pci_delayed_write_reg delayed_write_data
|
700 |
|
|
(
|
701 |
|
|
.reset_in (reset_in),
|
702 |
|
|
.req_clk_in (wb_clock_in),
|
703 |
|
|
.comp_wdata_out (del_write_data_out),
|
704 |
|
|
.req_we_in (del_write_we_in),
|
705 |
|
|
.req_wdata_in (del_write_data_in)
|
706 |
|
|
);
|
707 |
|
|
|
708 |
|
|
`ifdef HOST
|
709 |
|
|
// configuration cycle address decoder input
|
710 |
|
|
wire [31:0] ccyc_addr_in = {8'h00, wbu_ccyc_addr_in} ;
|
711 |
|
|
|
712 |
|
|
pci_conf_cyc_addr_dec ccyc_addr_dec
|
713 |
|
|
(
|
714 |
|
|
.ccyc_addr_in (ccyc_addr_in),
|
715 |
|
|
.ccyc_addr_out (ccyc_addr_out)
|
716 |
|
|
) ;
|
717 |
|
|
`else
|
718 |
|
|
`ifdef GUEST
|
719 |
|
|
assign ccyc_addr_out = 32'h0000_0000 ;
|
720 |
|
|
`endif
|
721 |
|
|
`endif
|
722 |
|
|
|
723 |
|
|
// pci master interface inputs
|
724 |
|
|
wire [31:0] pcim_if_wbw_addr_data_in = fifos_wbw_addr_data_out ;
|
725 |
|
|
wire [3:0] pcim_if_wbw_cbe_in = fifos_wbw_cbe_out ;
|
726 |
|
|
wire [3:0] pcim_if_wbw_control_in = fifos_wbw_control_out ;
|
727 |
|
|
wire pcim_if_wbw_empty_in = fifos_wbw_empty_out ;
|
728 |
|
|
wire pcim_if_wbw_transaction_ready_in = fifos_wbw_transaction_ready_out ;
|
729 |
|
|
wire [31:0] pcim_if_data_in = pcim_sm_data_out ;
|
730 |
|
|
wire [31:0] pcim_if_del_wdata_in = del_write_data_out ;
|
731 |
|
|
wire pcim_if_del_req_in = del_sync_comp_req_pending_out ;
|
732 |
|
|
wire [31:0] pcim_if_del_addr_in = del_sync_addr_out ;
|
733 |
|
|
wire [3:0] pcim_if_del_bc_in = del_sync_bc_out ;
|
734 |
|
|
wire [3:0] pcim_if_del_be_in = del_sync_be_out ;
|
735 |
|
|
wire pcim_if_del_burst_in = del_sync_burst_out ;
|
736 |
|
|
wire pcim_if_del_we_in = del_sync_we_out ;
|
737 |
|
|
wire [7:0] pcim_if_cache_line_size_in = wbu_cache_line_size_in ;
|
738 |
|
|
wire pcim_if_wait_in = pcim_sm_wait_out ;
|
739 |
|
|
wire pcim_if_wtransfer_in = pcim_sm_wtransfer_out ;
|
740 |
|
|
wire pcim_if_rtransfer_in = pcim_sm_rtransfer_out ;
|
741 |
|
|
wire pcim_if_retry_in = pcim_sm_retry_out ;
|
742 |
|
|
wire pcim_if_rerror_in = pcim_sm_rerror_out ;
|
743 |
|
|
wire pcim_if_first_in = pcim_sm_first_out ;
|
744 |
|
|
wire pcim_if_mabort_in = pcim_sm_mabort_out ;
|
745 |
|
|
|
746 |
|
|
pci_master32_sm_if pci_initiator_if
|
747 |
|
|
(
|
748 |
|
|
.clk_in (pci_clock_in),
|
749 |
|
|
.reset_in (reset_in),
|
750 |
|
|
.address_out (pcim_if_address_out),
|
751 |
|
|
.bc_out (pcim_if_bc_out),
|
752 |
|
|
.data_out (pcim_if_data_out),
|
753 |
|
|
.data_in (pcim_if_data_in),
|
754 |
|
|
.be_out (pcim_if_be_out),
|
755 |
|
|
.req_out (pcim_if_req_out),
|
756 |
|
|
.rdy_out (pcim_if_rdy_out),
|
757 |
|
|
.last_out (pcim_if_last_out),
|
758 |
|
|
.wbw_renable_out (pcim_if_wbw_renable_out),
|
759 |
|
|
.wbw_fifo_addr_data_in (pcim_if_wbw_addr_data_in),
|
760 |
|
|
.wbw_fifo_cbe_in (pcim_if_wbw_cbe_in),
|
761 |
|
|
.wbw_fifo_control_in (pcim_if_wbw_control_in),
|
762 |
|
|
.wbw_fifo_empty_in (pcim_if_wbw_empty_in),
|
763 |
|
|
.wbw_fifo_transaction_ready_in (pcim_if_wbw_transaction_ready_in),
|
764 |
|
|
.wbr_fifo_wenable_out (pcim_if_wbr_wenable_out),
|
765 |
|
|
.wbr_fifo_data_out (pcim_if_wbr_data_out),
|
766 |
|
|
.wbr_fifo_be_out (pcim_if_wbr_be_out),
|
767 |
|
|
.wbr_fifo_control_out (pcim_if_wbr_control_out),
|
768 |
|
|
.del_wdata_in (pcim_if_del_wdata_in),
|
769 |
|
|
.del_complete_out (pcim_if_del_complete_out),
|
770 |
|
|
.del_req_in (pcim_if_del_req_in),
|
771 |
|
|
.del_addr_in (pcim_if_del_addr_in),
|
772 |
|
|
.del_bc_in (pcim_if_del_bc_in),
|
773 |
|
|
.del_be_in (pcim_if_del_be_in),
|
774 |
|
|
.del_burst_in (pcim_if_del_burst_in),
|
775 |
|
|
.del_error_out (pcim_if_del_error_out),
|
776 |
|
|
.del_rty_exp_out (pcim_if_del_rty_exp_out),
|
777 |
|
|
.del_we_in (pcim_if_del_we_in),
|
778 |
|
|
.err_addr_out (pcim_if_err_addr_out),
|
779 |
|
|
.err_bc_out (pcim_if_err_bc_out),
|
780 |
|
|
.err_signal_out (pcim_if_err_signal_out),
|
781 |
|
|
.err_source_out (pcim_if_err_source_out),
|
782 |
|
|
.err_rty_exp_out (pcim_if_err_rty_exp_out),
|
783 |
|
|
.cache_line_size_in (pcim_if_cache_line_size_in),
|
784 |
|
|
.mabort_received_out (pcim_if_mabort_out),
|
785 |
|
|
.tabort_received_out (pcim_if_tabort_out),
|
786 |
|
|
.next_data_out (pcim_if_next_data_out),
|
787 |
|
|
.next_be_out (pcim_if_next_be_out),
|
788 |
|
|
.next_last_out (pcim_if_next_last_out),
|
789 |
|
|
.wait_in (pcim_if_wait_in),
|
790 |
|
|
.wtransfer_in (pcim_if_wtransfer_in),
|
791 |
|
|
.rtransfer_in (pcim_if_rtransfer_in),
|
792 |
|
|
.retry_in (pcim_if_retry_in),
|
793 |
|
|
.rerror_in (pcim_if_rerror_in),
|
794 |
|
|
.first_in (pcim_if_first_in),
|
795 |
|
|
.mabort_in (pcim_if_mabort_in),
|
796 |
|
|
.posted_write_not_present_out (pcim_if_posted_write_not_present_out)
|
797 |
|
|
);
|
798 |
|
|
|
799 |
|
|
// pci master state machine inputs
|
800 |
|
|
wire pcim_sm_gnt_in = wbu_pciif_gnt_in ;
|
801 |
|
|
wire pcim_sm_frame_in = wbu_pciif_frame_in ;
|
802 |
|
|
wire pcim_sm_irdy_in = wbu_pciif_irdy_in ;
|
803 |
|
|
wire pcim_sm_trdy_in = wbu_pciif_trdy_in;
|
804 |
|
|
wire pcim_sm_stop_in = wbu_pciif_stop_in ;
|
805 |
|
|
wire pcim_sm_devsel_in = wbu_pciif_devsel_in ;
|
806 |
|
|
wire [31:0] pcim_sm_ad_reg_in = wbu_pciif_ad_reg_in ;
|
807 |
|
|
wire [31:0] pcim_sm_address_in = pcim_if_address_out ;
|
808 |
|
|
wire [3:0] pcim_sm_bc_in = pcim_if_bc_out ;
|
809 |
|
|
wire [31:0] pcim_sm_data_in = pcim_if_data_out ;
|
810 |
|
|
wire [3:0] pcim_sm_be_in = pcim_if_be_out ;
|
811 |
|
|
wire pcim_sm_req_in = pcim_if_req_out ;
|
812 |
|
|
wire pcim_sm_rdy_in = pcim_if_rdy_out ;
|
813 |
|
|
wire pcim_sm_last_in = pcim_if_last_out ;
|
814 |
|
|
wire [7:0] pcim_sm_latency_tim_val_in = wbu_latency_tim_val_in ;
|
815 |
|
|
wire [31:0] pcim_sm_next_data_in = pcim_if_next_data_out ;
|
816 |
|
|
wire [3:0] pcim_sm_next_be_in = pcim_if_next_be_out ;
|
817 |
|
|
wire pcim_sm_next_last_in = pcim_if_next_last_out ;
|
818 |
|
|
wire pcim_sm_trdy_reg_in = wbu_pciif_trdy_reg_in ;
|
819 |
|
|
wire pcim_sm_stop_reg_in = wbu_pciif_stop_reg_in ;
|
820 |
|
|
wire pcim_sm_devsel_reg_in = wbu_pciif_devsel_reg_in ;
|
821 |
|
|
wire pcim_sm_frame_en_in = wbu_pciif_frame_en_in ;
|
822 |
|
|
wire pcim_sm_frame_out_in = wbu_pciif_frame_out_in ;
|
823 |
|
|
|
824 |
|
|
pci_master32_sm pci_initiator_sm
|
825 |
|
|
(
|
826 |
|
|
.clk_in (pci_clock_in),
|
827 |
|
|
.reset_in (reset_in),
|
828 |
|
|
.pci_req_out (pcim_sm_req_out),
|
829 |
|
|
.pci_gnt_in (pcim_sm_gnt_in),
|
830 |
|
|
.pci_frame_in (pcim_sm_frame_in),
|
831 |
|
|
.pci_frame_out (pcim_sm_frame_out),
|
832 |
|
|
.pci_frame_en_out (pcim_sm_frame_en_out),
|
833 |
|
|
.pci_frame_out_in (pcim_sm_frame_out_in),
|
834 |
|
|
.pci_frame_load_out (pcim_sm_frame_load_out),
|
835 |
|
|
.pci_frame_en_in (pcim_sm_frame_en_in),
|
836 |
|
|
.pci_irdy_in (pcim_sm_irdy_in),
|
837 |
|
|
.pci_irdy_out (pcim_sm_irdy_out),
|
838 |
|
|
.pci_irdy_en_out (pcim_sm_irdy_en_out),
|
839 |
|
|
.pci_trdy_in (pcim_sm_trdy_in),
|
840 |
|
|
.pci_trdy_reg_in (pcim_sm_trdy_reg_in),
|
841 |
|
|
.pci_stop_in (pcim_sm_stop_in),
|
842 |
|
|
.pci_stop_reg_in (pcim_sm_stop_reg_in),
|
843 |
|
|
.pci_devsel_in (pcim_sm_devsel_in),
|
844 |
|
|
.pci_devsel_reg_in (pcim_sm_devsel_reg_in),
|
845 |
|
|
.pci_ad_reg_in (pcim_sm_ad_reg_in),
|
846 |
|
|
.pci_ad_out (pcim_sm_ad_out),
|
847 |
|
|
.pci_ad_en_out (pcim_sm_ad_en_out),
|
848 |
|
|
.pci_cbe_out (pcim_sm_cbe_out),
|
849 |
|
|
.pci_cbe_en_out (pcim_sm_cbe_en_out),
|
850 |
|
|
.address_in (pcim_sm_address_in),
|
851 |
|
|
.bc_in (pcim_sm_bc_in),
|
852 |
|
|
.data_in (pcim_sm_data_in),
|
853 |
|
|
.data_out (pcim_sm_data_out),
|
854 |
|
|
.be_in (pcim_sm_be_in),
|
855 |
|
|
.req_in (pcim_sm_req_in),
|
856 |
|
|
.rdy_in (pcim_sm_rdy_in),
|
857 |
|
|
.last_in (pcim_sm_last_in),
|
858 |
|
|
.latency_tim_val_in (pcim_sm_latency_tim_val_in),
|
859 |
|
|
.next_data_in (pcim_sm_next_data_in),
|
860 |
|
|
.next_be_in (pcim_sm_next_be_in),
|
861 |
|
|
.next_last_in (pcim_sm_next_last_in),
|
862 |
|
|
.ad_load_out (pcim_sm_ad_load_out),
|
863 |
|
|
.ad_load_on_transfer_out (pcim_sm_ad_load_on_transfer_out),
|
864 |
|
|
.wait_out (pcim_sm_wait_out),
|
865 |
|
|
.wtransfer_out (pcim_sm_wtransfer_out),
|
866 |
|
|
.rtransfer_out (pcim_sm_rtransfer_out),
|
867 |
|
|
.retry_out (pcim_sm_retry_out),
|
868 |
|
|
.rerror_out (pcim_sm_rerror_out),
|
869 |
|
|
.first_out (pcim_sm_first_out),
|
870 |
|
|
.mabort_out (pcim_sm_mabort_out)
|
871 |
|
|
) ;
|
872 |
|
|
|
873 |
|
|
endmodule
|