1 |
15 |
mihad |
//////////////////////////////////////////////////////////////////////
|
2 |
|
|
//// ////
|
3 |
|
|
//// File name "pci_regression_constants.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 |
|
|
//// - Tadej Markovic (tadej@opencores.org) ////
|
11 |
|
|
//// ////
|
12 |
|
|
//////////////////////////////////////////////////////////////////////
|
13 |
|
|
//// ////
|
14 |
|
|
//// Copyright (C) 2000 Miha Dolenc, mihad@opencores.org ////
|
15 |
|
|
//// ////
|
16 |
|
|
//// This source file may be used and distributed without ////
|
17 |
|
|
//// restriction provided that this copyright statement is not ////
|
18 |
|
|
//// removed from the file and that any derivative work contains ////
|
19 |
|
|
//// the original copyright notice and the associated disclaimer. ////
|
20 |
|
|
//// ////
|
21 |
|
|
//// This source file is free software; you can redistribute it ////
|
22 |
|
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
23 |
|
|
//// Public License as published by the Free Software Foundation; ////
|
24 |
|
|
//// either version 2.1 of the License, or (at your option) any ////
|
25 |
|
|
//// later version. ////
|
26 |
|
|
//// ////
|
27 |
|
|
//// This source is distributed in the hope that it will be ////
|
28 |
|
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
29 |
|
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
30 |
|
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
31 |
|
|
//// details. ////
|
32 |
|
|
//// ////
|
33 |
|
|
//// You should have received a copy of the GNU Lesser General ////
|
34 |
|
|
//// Public License along with this source; if not, download it ////
|
35 |
|
|
//// from http://www.opencores.org/lgpl.shtml ////
|
36 |
|
|
//// ////
|
37 |
|
|
//////////////////////////////////////////////////////////////////////
|
38 |
|
|
//
|
39 |
|
|
// CVS Revision History
|
40 |
|
|
//
|
41 |
|
|
// $Log: not supported by cvs2svn $
|
42 |
45 |
mihad |
// Revision 1.2 2002/02/19 16:32:29 mihad
|
43 |
|
|
// Modified testbench and fixed some bugs
|
44 |
|
|
//
|
45 |
26 |
mihad |
// Revision 1.1 2002/02/01 13:39:43 mihad
|
46 |
|
|
// Initial testbench import. Still under development
|
47 |
15 |
mihad |
//
|
48 |
26 |
mihad |
//
|
49 |
15 |
mihad |
|
50 |
|
|
///////////////////////////////////////////////////////////////////////////////
|
51 |
|
|
//// ===================================================================== ////
|
52 |
|
|
//// Following PCI_USER_CONSTANTS are just for regression testing purposes ////
|
53 |
|
|
//// (script for running regression is prepared for NC-Sim) ////
|
54 |
|
|
//// ////
|
55 |
|
|
//// For description of defines see pci_user_constants.v file ! ////
|
56 |
|
|
//// ===================================================================== ////
|
57 |
|
|
///////////////////////////////////////////////////////////////////////////////
|
58 |
|
|
|
59 |
|
|
// Fifo implementation defines:
|
60 |
|
|
// If FPGA and XILINX are defined, Xilinx's BlockSelectRAM+ is instantiated for Fifo storage.
|
61 |
|
|
// 16 bit width is used, so 8 bits of address ( 256 ) locations are available. If RAM_DONT_SHARE is not defined (commented out),
|
62 |
|
|
// then one block RAM is shared between two FIFOs. That means each Fifo can have a maximum address length of 7 - depth of 128 and only 6 block rams are used
|
63 |
|
|
// If RAM_DONT_SHARE is defined ( not commented out ), then 12 block RAMs are used and each Fifo can have a maximum address length of 8 ( 256 locations )
|
64 |
|
|
// If FPGA is not defined, then ASIC RAMs are used. Currently there is only one version of ARTISAN RAM supported. User should generate synchronous RAM with
|
65 |
|
|
// width of 40 and instantiate it in pci_tpram.v. If RAM_DONT_SHARE is defined, then these can be dual port rams ( write port
|
66 |
|
|
// in one clock domain, read in other ), otherwise it must be two port RAM ( read and write ports in both clock domains ).
|
67 |
|
|
// If RAM_DONT_SHARE is defined, then all RAM address lengths must be specified accordingly, otherwise there are two relevant lengths - PCI_FIFO_RAM_ADDR_LENGTH and
|
68 |
|
|
// WB_FIFO_RAM_ADDR_LENGTH.
|
69 |
|
|
|
70 |
|
|
`ifdef REGR_FIFO_SMALL_XILINX // with Xilinx FPGA parameters only
|
71 |
|
|
`define WBW_ADDR_LENGTH 3
|
72 |
|
|
`define WBR_ADDR_LENGTH 4
|
73 |
|
|
`define PCIW_ADDR_LENGTH 4
|
74 |
|
|
`define PCIR_ADDR_LENGTH 3
|
75 |
|
|
|
76 |
|
|
`define FPGA
|
77 |
|
|
`define XILINX
|
78 |
|
|
|
79 |
|
|
`define WB_RAM_DONT_SHARE
|
80 |
45 |
mihad |
`define PCI_RAM_DONT_SHARE
|
81 |
15 |
mihad |
|
82 |
|
|
`ifdef FPGA
|
83 |
|
|
`ifdef XILINX
|
84 |
45 |
mihad |
`define PCI_FIFO_RAM_ADDR_LENGTH 4 // PCI target unit fifo storage definition
|
85 |
15 |
mihad |
`define WB_FIFO_RAM_ADDR_LENGTH 4 // WB slave unit fifo storage definition
|
86 |
45 |
mihad |
//`define PCI_XILINX_RAMB4
|
87 |
15 |
mihad |
//`define WB_XILINX_RAMB4
|
88 |
45 |
mihad |
`define PCI_XILINX_DIST_RAM
|
89 |
15 |
mihad |
`define WB_XILINX_DIST_RAM
|
90 |
|
|
`endif
|
91 |
|
|
`else
|
92 |
|
|
`define PCI_FIFO_RAM_ADDR_LENGTH 8 // PCI target unit fifo storage definition when RAM sharing is used ( both pcir and pciw fifo use same instance of RAM )
|
93 |
|
|
`define WB_FIFO_RAM_ADDR_LENGTH 8 // WB slave unit fifo storage definition when RAM sharing is used ( both wbr and wbw fifo use same instance of RAM )
|
94 |
|
|
`define WB_ARTISAN_SDP
|
95 |
|
|
`define PCI_ARTISAN_SDP
|
96 |
|
|
`endif
|
97 |
|
|
`else
|
98 |
|
|
`ifdef REGR_FIFO_MEDIUM_ARTISAN // with Artisan parameter only
|
99 |
|
|
`define WBW_ADDR_LENGTH 7
|
100 |
|
|
`define WBR_ADDR_LENGTH 6
|
101 |
|
|
`define PCIW_ADDR_LENGTH 7
|
102 |
|
|
`define PCIR_ADDR_LENGTH 8
|
103 |
|
|
|
104 |
|
|
//`define FPGA
|
105 |
|
|
//`define XILINX
|
106 |
|
|
|
107 |
|
|
//`define WB_RAM_DONT_SHARE
|
108 |
|
|
`define PCI_RAM_DONT_SHARE
|
109 |
|
|
|
110 |
|
|
`ifdef FPGA
|
111 |
|
|
`ifdef XILINX
|
112 |
|
|
`define PCI_FIFO_RAM_ADDR_LENGTH 8 // PCI target unit fifo storage definition
|
113 |
|
|
`define WB_FIFO_RAM_ADDR_LENGTH 8 // WB slave unit fifo storage definition
|
114 |
|
|
`define PCI_XILINX_RAMB4
|
115 |
|
|
`define WB_XILINX_RAMB4
|
116 |
|
|
//`define PCI_XILINX_DIST_RAM
|
117 |
|
|
//`define WB_XILINX_DIST_RAM
|
118 |
|
|
`endif
|
119 |
|
|
`else
|
120 |
|
|
`define PCI_FIFO_RAM_ADDR_LENGTH 8 // PCI target unit fifo storage definition when RAM sharing is used ( both pcir and pciw fifo use same instance of RAM )
|
121 |
|
|
`define WB_FIFO_RAM_ADDR_LENGTH 8 // WB slave unit fifo storage definition when RAM sharing is used ( both wbr and wbw fifo use same instance of RAM )
|
122 |
|
|
`define WB_ARTISAN_SDP
|
123 |
|
|
`define PCI_ARTISAN_SDP
|
124 |
|
|
`endif
|
125 |
|
|
`else
|
126 |
|
|
`ifdef REGR_FIFO_SMALL_GENERIC // without any parameters only (generic)
|
127 |
|
|
`define WBW_ADDR_LENGTH 3
|
128 |
|
|
`define WBR_ADDR_LENGTH 4
|
129 |
|
|
`define PCIW_ADDR_LENGTH 4
|
130 |
|
|
`define PCIR_ADDR_LENGTH 3
|
131 |
|
|
|
132 |
|
|
//`define FPGA
|
133 |
|
|
//`define XILINX
|
134 |
|
|
|
135 |
|
|
`define WB_RAM_DONT_SHARE
|
136 |
|
|
//`define PCI_RAM_DONT_SHARE
|
137 |
|
|
|
138 |
|
|
`ifdef FPGA
|
139 |
|
|
`ifdef XILINX
|
140 |
|
|
`define PCI_FIFO_RAM_ADDR_LENGTH 8 // PCI target unit fifo storage definition
|
141 |
|
|
`define WB_FIFO_RAM_ADDR_LENGTH 8 // WB slave unit fifo storage definition
|
142 |
|
|
`define PCI_XILINX_RAMB4
|
143 |
|
|
`define WB_XILINX_RAMB4
|
144 |
|
|
//`define PCI_XILINX_DIST_RAM
|
145 |
|
|
//`define WB_XILINX_DIST_RAM
|
146 |
|
|
`endif
|
147 |
|
|
`else
|
148 |
|
|
`define PCI_FIFO_RAM_ADDR_LENGTH 5 // PCI target unit fifo storage definition when RAM sharing is used ( both pcir and pciw fifo use same instance of RAM )
|
149 |
|
|
`define WB_FIFO_RAM_ADDR_LENGTH 4 // WB slave unit fifo storage definition when RAM sharing is used ( both wbr and wbw fifo use same instance of RAM )
|
150 |
|
|
//`define WB_ARTISAN_SDP
|
151 |
|
|
//`define PCI_ARTISAN_SDP
|
152 |
|
|
`endif
|
153 |
|
|
`else
|
154 |
|
|
`ifdef REGR_FIFO_MEDIUM_GENERIC // without any parameters only (generic)
|
155 |
|
|
`define WBW_ADDR_LENGTH 7
|
156 |
|
|
`define WBR_ADDR_LENGTH 6
|
157 |
|
|
`define PCIW_ADDR_LENGTH 7
|
158 |
|
|
`define PCIR_ADDR_LENGTH 8
|
159 |
|
|
|
160 |
|
|
//`define FPGA
|
161 |
|
|
//`define XILINX
|
162 |
|
|
|
163 |
|
|
//`define WB_RAM_DONT_SHARE
|
164 |
|
|
`define PCI_RAM_DONT_SHARE
|
165 |
|
|
|
166 |
|
|
`ifdef FPGA
|
167 |
|
|
`ifdef XILINX
|
168 |
|
|
`define PCI_FIFO_RAM_ADDR_LENGTH 8 // PCI target unit fifo storage definition
|
169 |
|
|
`define WB_FIFO_RAM_ADDR_LENGTH 8 // WB slave unit fifo storage definition
|
170 |
|
|
`define PCI_XILINX_RAMB4
|
171 |
|
|
`define WB_XILINX_RAMB4
|
172 |
|
|
//`define PCI_XILINX_DIST_RAM
|
173 |
|
|
//`define WB_XILINX_DIST_RAM
|
174 |
|
|
`endif
|
175 |
|
|
`else
|
176 |
|
|
`define PCI_FIFO_RAM_ADDR_LENGTH 8 // PCI target unit fifo storage definition when RAM sharing is used ( both pcir and pciw fifo use same instance of RAM )
|
177 |
|
|
`define WB_FIFO_RAM_ADDR_LENGTH 8 // WB slave unit fifo storage definition when RAM sharing is used ( both wbr and wbw fifo use same instance of RAM )
|
178 |
|
|
//`define WB_ARTISAN_SDP
|
179 |
|
|
//`define PCI_ARTISAN_SDP
|
180 |
|
|
`endif
|
181 |
|
|
`else
|
182 |
|
|
`ifdef REGR_FIFO_LARGE_GENERIC // without any parameters only (generic)
|
183 |
26 |
mihad |
`define WBW_ADDR_LENGTH 9
|
184 |
|
|
`define WBR_ADDR_LENGTH 9
|
185 |
|
|
`define PCIW_ADDR_LENGTH 9
|
186 |
|
|
`define PCIR_ADDR_LENGTH 9
|
187 |
15 |
mihad |
|
188 |
|
|
//`define FPGA
|
189 |
|
|
//`define XILINX
|
190 |
|
|
|
191 |
|
|
//`define WB_RAM_DONT_SHARE
|
192 |
|
|
//`define PCI_RAM_DONT_SHARE
|
193 |
|
|
|
194 |
|
|
`ifdef FPGA
|
195 |
|
|
`ifdef XILINX
|
196 |
|
|
`define PCI_FIFO_RAM_ADDR_LENGTH 8 // PCI target unit fifo storage definition
|
197 |
|
|
`define WB_FIFO_RAM_ADDR_LENGTH 8 // WB slave unit fifo storage definition
|
198 |
|
|
`define PCI_XILINX_RAMB4
|
199 |
|
|
`define WB_XILINX_RAMB4
|
200 |
|
|
//`define PCI_XILINX_DIST_RAM
|
201 |
|
|
//`define WB_XILINX_DIST_RAM
|
202 |
|
|
`endif
|
203 |
|
|
`else
|
204 |
26 |
mihad |
`define PCI_FIFO_RAM_ADDR_LENGTH 10 // PCI target unit fifo storage definition when RAM sharing is used ( both pcir and pciw fifo use same instance of RAM )
|
205 |
|
|
`define WB_FIFO_RAM_ADDR_LENGTH 10 // WB slave unit fifo storage definition when RAM sharing is used ( both wbr and wbw fifo use same instance of RAM )
|
206 |
15 |
mihad |
//`define WB_ARTISAN_SDP
|
207 |
|
|
//`define PCI_ARTISAN_SDP
|
208 |
|
|
`endif
|
209 |
|
|
`else
|
210 |
|
|
`endif
|
211 |
|
|
`endif
|
212 |
|
|
`endif
|
213 |
|
|
`endif
|
214 |
|
|
`endif
|
215 |
|
|
|
216 |
|
|
// number defined here specifies how many MS bits in PCI address are compared with base address, to decode
|
217 |
|
|
// accesses. Maximum number allows for minimum image size ( number = 20, image size = 4KB ), minimum number
|
218 |
|
|
// allows for maximum image size ( number = 1, image size = 2GB ). If you intend on using different sizes of PCI images,
|
219 |
|
|
// you have to define a number of minimum sized image and enlarge others by specifying different address mask.
|
220 |
|
|
// smaller the number here, faster the decoder operation
|
221 |
45 |
mihad |
|
222 |
|
|
// initial value for PCI image address masks. Address masks can be defined in enabled state,
|
223 |
|
|
// to allow device independent software to detect size of image and map base addresses to
|
224 |
|
|
// memory space. If initial mask for an image is defined as 0, then device independent software
|
225 |
|
|
// won't detect base address implemented and device dependent software will have to configure
|
226 |
|
|
// address masks as well as base addresses!
|
227 |
|
|
|
228 |
|
|
// initial value for PCI image maping to MEMORY or IO spaces. If initial define is set to 0,
|
229 |
|
|
// then IMAGE with that base address points to MEMORY space, othervise it points ti IO space. D
|
230 |
|
|
// Device independent software sets the base addresses acording to MEMORY or IO maping!
|
231 |
|
|
|
232 |
15 |
mihad |
`ifdef PCI_DECODE_MIN
|
233 |
45 |
mihad |
|
234 |
15 |
mihad |
`define PCI_NUM_OF_DEC_ADDR_LINES 3
|
235 |
45 |
mihad |
|
236 |
|
|
|
237 |
|
|
// don't disable AM0 if GUEST bridge, otherwise there is no other way of accesing configuration space
|
238 |
|
|
`ifdef HOST
|
239 |
|
|
`define PCI_AM0 20'h0000_0
|
240 |
|
|
`else
|
241 |
|
|
`define PCI_AM0 20'hE000_0
|
242 |
|
|
`endif
|
243 |
|
|
|
244 |
|
|
`define PCI_AM1 20'hE000_0
|
245 |
|
|
`define PCI_AM2 20'h0000_0
|
246 |
|
|
`define PCI_AM3 20'hE000_0
|
247 |
|
|
`define PCI_AM4 20'h0000_0
|
248 |
|
|
`define PCI_AM5 20'hE000_0
|
249 |
|
|
|
250 |
|
|
`define PCI_BA0_MEM_IO 1'b1 // considered only when PCI_IMAGE0 is used as general PCI-WB image!
|
251 |
|
|
`define PCI_BA1_MEM_IO 1'b0
|
252 |
|
|
`define PCI_BA2_MEM_IO 1'b1
|
253 |
|
|
`define PCI_BA3_MEM_IO 1'b0
|
254 |
|
|
`define PCI_BA4_MEM_IO 1'b1
|
255 |
|
|
`define PCI_BA5_MEM_IO 1'b0
|
256 |
|
|
|
257 |
15 |
mihad |
`else
|
258 |
|
|
`ifdef PCI_DECODE_MED
|
259 |
45 |
mihad |
|
260 |
15 |
mihad |
`define PCI_NUM_OF_DEC_ADDR_LINES 12
|
261 |
45 |
mihad |
|
262 |
|
|
`define PCI_AM0 20'hfff0_0
|
263 |
|
|
`define PCI_AM1 20'h0000_0
|
264 |
|
|
`define PCI_AM2 20'hfff0_0
|
265 |
|
|
`define PCI_AM3 20'h0000_0
|
266 |
|
|
`define PCI_AM4 20'hfff0_0
|
267 |
|
|
`define PCI_AM5 20'h0000_0
|
268 |
|
|
|
269 |
|
|
`define PCI_BA0_MEM_IO 1'b1 // considered only when PCI_IMAGE0 is used as general PCI-WB image!
|
270 |
|
|
`define PCI_BA1_MEM_IO 1'b0
|
271 |
|
|
`define PCI_BA2_MEM_IO 1'b1
|
272 |
|
|
`define PCI_BA3_MEM_IO 1'b0
|
273 |
|
|
`define PCI_BA4_MEM_IO 1'b1
|
274 |
|
|
`define PCI_BA5_MEM_IO 1'b0
|
275 |
|
|
|
276 |
15 |
mihad |
`else
|
277 |
|
|
`ifdef PCI_DECODE_MAX
|
278 |
45 |
mihad |
|
279 |
15 |
mihad |
`define PCI_NUM_OF_DEC_ADDR_LINES 20
|
280 |
45 |
mihad |
|
281 |
|
|
`define PCI_AM0 20'hffff_e
|
282 |
|
|
`define PCI_AM1 20'hffff_c
|
283 |
|
|
`define PCI_AM2 20'hffff_8
|
284 |
|
|
`define PCI_AM3 20'hfffe_0
|
285 |
|
|
`define PCI_AM4 20'hfffc_0
|
286 |
|
|
`define PCI_AM5 20'hfff8_0
|
287 |
|
|
|
288 |
|
|
`define PCI_BA0_MEM_IO 1'b0 // considered only when PCI_IMAGE0 is used as general PCI-WB image!
|
289 |
|
|
`define PCI_BA1_MEM_IO 1'b0
|
290 |
|
|
`define PCI_BA2_MEM_IO 1'b1
|
291 |
|
|
`define PCI_BA3_MEM_IO 1'b1
|
292 |
|
|
`define PCI_BA4_MEM_IO 1'b0
|
293 |
|
|
`define PCI_BA5_MEM_IO 1'b0
|
294 |
|
|
|
295 |
15 |
mihad |
`endif
|
296 |
|
|
`endif
|
297 |
|
|
`endif
|
298 |
|
|
|
299 |
|
|
|
300 |
|
|
|
301 |
|
|
// number defined here specifies how many MS bits in WB address are compared with base address, to decode
|
302 |
|
|
// accesses. Maximum number allows for minimum image size ( number = 20, image size = 4KB ), minimum number
|
303 |
|
|
// allows for maximum image size ( number = 1, image size = 2GB ). If you intend on using different sizes of WB images,
|
304 |
|
|
// you have to define a number of minimum sized image and enlarge others by specifying different address mask.
|
305 |
|
|
// smaller the number here, faster the decoder operation
|
306 |
|
|
`ifdef WB_DECODE_MIN
|
307 |
26 |
mihad |
`define WB_NUM_OF_DEC_ADDR_LINES 4
|
308 |
15 |
mihad |
`else
|
309 |
|
|
`ifdef WB_DECODE_MED
|
310 |
|
|
`define WB_NUM_OF_DEC_ADDR_LINES 12
|
311 |
|
|
`else
|
312 |
|
|
`ifdef WB_DECODE_MAX
|
313 |
|
|
`define WB_NUM_OF_DEC_ADDR_LINES 20
|
314 |
|
|
`endif
|
315 |
|
|
`endif
|
316 |
|
|
`endif
|
317 |
|
|
|
318 |
|
|
// Base address for Configuration space access from WB bus. This value cannot be changed during runtime
|
319 |
|
|
`ifdef WB_CNF_BASE_ZERO
|
320 |
|
|
`define WB_CONFIGURATION_BASE 20'h0000_0
|
321 |
|
|
`else
|
322 |
26 |
mihad |
`define WB_CONFIGURATION_BASE 20'hB000_0
|
323 |
15 |
mihad |
`endif
|
324 |
|
|
|
325 |
|
|
/*-----------------------------------------------------------------------------------------------------------
|
326 |
|
|
[000h-00Ch] First 4 DWORDs (32-bit) of PCI configuration header - the same regardless of the HEADER type !
|
327 |
|
|
Vendor_ID is an ID for a specific vendor defined by PCI_SIG - 2321h does not belong to anyone (e.g.
|
328 |
|
|
Xilinx's Vendor_ID is 10EEh and Altera's Vendor_ID is 1172h). Device_ID and Revision_ID should be used
|
329 |
|
|
together by application.
|
330 |
|
|
-----------------------------------------------------------------------------------------------------------*/
|
331 |
|
|
`define HEADER_VENDOR_ID 16'h2321
|
332 |
|
|
`define HEADER_DEVICE_ID 16'h0001
|
333 |
|
|
`define HEADER_REVISION_ID 8'h01
|
334 |
|
|
|
335 |
|
|
// MAX Retry counter value for WISHBONE Master state-machine
|
336 |
|
|
// This value is 8-bit because of 8-bit retry counter !!!
|
337 |
26 |
mihad |
`define WB_RTY_CNT_MAX 8'hff
|
338 |
15 |
mihad |
|
339 |
|
|
/////////////////////////////////////////////////////////////////////////////////
|
340 |
|
|
//// ======================================================================= ////
|
341 |
|
|
//// Following PCI_TESTBENC_DEFINES are just for regression testing purposes ////
|
342 |
|
|
//// (script for running regression is prepared for NC-Sim) ////
|
343 |
|
|
//// ////
|
344 |
|
|
//// For description of defines see pci_testbench_defines.v file ! ////
|
345 |
|
|
//// ======================================================================= ////
|
346 |
|
|
/////////////////////////////////////////////////////////////////////////////////
|
347 |
|
|
|
348 |
|
|
// wishbone frequncy in GHz
|
349 |
|
|
`ifdef WB_CLK10
|
350 |
|
|
`define WB_FREQ 0.01
|
351 |
|
|
`else
|
352 |
|
|
`ifdef WB_CLK66
|
353 |
|
|
`define WB_FREQ 0.066
|
354 |
|
|
`else
|
355 |
26 |
mihad |
`ifdef WB_CLK220
|
356 |
|
|
`define WB_FREQ 0.22
|
357 |
15 |
mihad |
`endif
|
358 |
|
|
`endif
|
359 |
|
|
`endif
|
360 |
|
|
|
361 |
|
|
// values of image registers of PCI bridge device - valid are only upper 20 bits, others must be ZERO !
|
362 |
|
|
`define TAR0_BASE_ADDR_0 32'h1000_0000
|
363 |
|
|
`define TAR0_BASE_ADDR_1 32'h2000_0000
|
364 |
26 |
mihad |
`define TAR0_BASE_ADDR_2 32'h4000_0000
|
365 |
|
|
`define TAR0_BASE_ADDR_3 32'h6000_0000
|
366 |
|
|
`define TAR0_BASE_ADDR_4 32'h8000_0000
|
367 |
|
|
`define TAR0_BASE_ADDR_5 32'hA000_0000
|
368 |
15 |
mihad |
|
369 |
|
|
`define TAR0_ADDR_MASK_0 32'hFFFF_F000 // when BA0 is used to access configuration space, this is NOT important!
|
370 |
|
|
`define TAR0_ADDR_MASK_1 32'hFFFF_F000
|
371 |
|
|
`define TAR0_ADDR_MASK_2 32'hFFFF_F000
|
372 |
|
|
`define TAR0_ADDR_MASK_3 32'hFFFF_F000
|
373 |
|
|
`define TAR0_ADDR_MASK_4 32'hFFFF_F000
|
374 |
|
|
`define TAR0_ADDR_MASK_5 32'hFFFF_F000
|
375 |
|
|
|
376 |
26 |
mihad |
`define TAR0_TRAN_ADDR_0 32'hC000_0000 // when BA0 is used to access configuration space, this is NOT important!
|
377 |
|
|
`define TAR0_TRAN_ADDR_1 32'hA000_0000
|
378 |
|
|
`define TAR0_TRAN_ADDR_2 32'h8000_0000
|
379 |
|
|
`define TAR0_TRAN_ADDR_3 32'h6000_0000
|
380 |
|
|
`define TAR0_TRAN_ADDR_4 32'h4000_0000
|
381 |
|
|
`define TAR0_TRAN_ADDR_5 32'h2000_0000
|
382 |
15 |
mihad |
|
383 |
|
|
// values of image registers of PCI behavioral target devices !
|
384 |
26 |
mihad |
`define BEH_TAR1_MEM_START 32'hC000_0000
|
385 |
|
|
`define BEH_TAR1_MEM_END 32'hC000_0FFF
|
386 |
|
|
`define BEH_TAR1_IO_START 32'hD000_0001
|
387 |
|
|
`define BEH_TAR1_IO_END 32'hD000_0FFF
|
388 |
15 |
mihad |
|
389 |
26 |
mihad |
`define BEH_TAR2_MEM_START 32'hE000_0000
|
390 |
|
|
`define BEH_TAR2_MEM_END 32'hE000_0FFF
|
391 |
|
|
`define BEH_TAR2_IO_START 32'hF000_0001
|
392 |
|
|
`define BEH_TAR2_IO_END 32'hF000_0FFF
|
393 |
15 |
mihad |
|
394 |
45 |
mihad |
// IDSEL lines of each individual Target is connected to one address line
|
395 |
|
|
// following defines set the address line IDSEL is connected to
|
396 |
|
|
// TAR0 = DUT - bridge
|
397 |
|
|
// TAR1 = behavioral target 1
|
398 |
|
|
// TAR2 = behavioral target 2
|
399 |
|
|
|
400 |
|
|
`define TAR0_IDSEL_INDEX 31
|
401 |
|
|
`define TAR1_IDSEL_INDEX 29
|
402 |
|
|
`define TAR2_IDSEL_INDEX 30
|
403 |
|
|
|
404 |
|
|
// next 3 defines are derived from previous three defines
|
405 |
|
|
`define TAR0_IDSEL_ADDR (32'h0000_0001 << `TAR0_IDSEL_INDEX)
|
406 |
|
|
`define TAR1_IDSEL_ADDR (32'h0000_0001 << `TAR1_IDSEL_INDEX)
|
407 |
|
|
`define TAR2_IDSEL_ADDR (32'h0000_0001 << `TAR2_IDSEL_INDEX)
|
408 |
15 |
mihad |
/*=======================================================================================
|
409 |
|
|
Following defines are used in a script file for regression testing !!!
|
410 |
|
|
=========================================================================================
|
411 |
|
|
|
412 |
|
|
REGRESSION
|
413 |
|
|
HOST GUEST
|
414 |
|
|
REGR_FIFO_SMALL_XILINX REGR_FIFO_MEDIUM_ARTISAN REGR_FIFO_LARGE_GENERIC
|
415 |
|
|
(REGR_FIFO_SMALL_GENERIC) (REGR_FIFO_MEDIUM_GENERIC)
|
416 |
|
|
ADDR_TRAN_IMPL
|
417 |
|
|
WB_RETRY_MAX
|
418 |
|
|
WB_CNF_BASE_ZERO
|
419 |
|
|
NO_CNF_IMAGE
|
420 |
|
|
PCI_IMAGE0 // `ifdef HOST `ifdef NO_CNF_IMAGE `define PCI_IMAGE0
|
421 |
|
|
PCI_IMAGE2
|
422 |
|
|
PCI_IMAGE3
|
423 |
|
|
PCI_IMAGE4
|
424 |
|
|
PCI_IMAGE5
|
425 |
|
|
WB_IMAGE2
|
426 |
|
|
WB_IMAGE3
|
427 |
|
|
WB_IMAGE4
|
428 |
|
|
WB_IMAGE5
|
429 |
|
|
WB_DECODE_FAST WB_DECODE_MEDIUM WB_DECODE_SLOW
|
430 |
|
|
REGISTER_WBM_OUTPUTS
|
431 |
|
|
REGISTER_WBS_OUTPUTS
|
432 |
|
|
PCI_DECODE_MIN PCI_DECODE_MED PCI_DECODE_MAX
|
433 |
|
|
WB_DECODE_MIN WB_DECODE_MED WB_DECODE_MAX
|
434 |
|
|
PCI33 PCI66
|
435 |
|
|
WB_CLK10 WB_CLK66 WB_CLK100
|
436 |
|
|
ACTIVE_LOW_OE ACTIVE_HIGH_OE
|
437 |
|
|
|
438 |
|
|
-----------------------------------------------------------------------------------------
|
439 |
|
|
Follows combinations of defines used in a script file for regression testing !!!
|
440 |
|
|
-----------------------------------------------------------------------------------------
|
441 |
|
|
|
442 |
|
|
"REGRESSION+HOST+REGR_FIFO_SMALL_XILINX+WB_DECODE_FAST+PCI_DECODE_MAX+WB_DECODE_MIN+PCI33+WB_CLK10+ACTIVE_LOW_OE+REGISTER_WBM_OUTPUTS+REGISTER_WBS_OUTPUTS+ADDR_TRAN_IMPL+WB_RETRY_MAX+PCI_IMAGE0+PCI_IMAGE2"
|
443 |
|
|
"REGRESSION+HOST+REGR_FIFO_MEDIUM_ARTISAN+WB_DECODE_MEDIUM+PCI_DECODE_MED+WB_DECODE_MED+PCI33+WB_CLK66+ACTIVE_LOW_OE+REGISTER_WBM_OUTPUTS+REGISTER_WBS_OUTPUTS+ADDR_TRAN_IMPL+WB_RETRY_MAX+PCI_IMAGE0+PCI_IMAGE2+PCI_IMAGE3+PCI_IMAGE4+PCI_IMAGE5+WB_IMAGE2+WB_IMAGE5"
|
444 |
|
|
"REGRESSION+HOST+REGR_FIFO_LARGE_GENERIC+WB_DECODE_SLOW+PCI_DECODE_MIN+WB_DECODE_MAX+PCI66+WB_CLK66+ACTIVE_LOW_OE+REGISTER_WBM_OUTPUTS+REGISTER_WBS_OUTPUTS+WB_IMAGE5"
|
445 |
|
|
"REGRESSION+GUEST+REGR_FIFO_SMALL_XILINX+WB_DECODE_SLOW+PCI_DECODE_MED+WB_DECODE_MIN+PCI66+WB_CLK100+ACTIVE_LOW_OE+REGISTER_WBM_OUTPUTS+REGISTER_WBS_OUTPUTS+WB_RETRY_MAX+PCI_IMAGE0+PCI_IMAGE5+WB_IMAGE4"
|
446 |
|
|
"REGRESSION+GUEST+REGR_FIFO_MEDIUM_ARTISAN+WB_DECODE_FAST+PCI_DECODE_MIN+WB_DECODE_MAX+PCI33+WB_CLK100+ACTIVE_LOW_OE+REGISTER_WBM_OUTPUTS+REGISTER_WBS_OUTPUTS+ADDR_TRAN_IMPL+PCI_IMAGE0+WB_IMAGE2+WB_IMAGE3+WB_IMAGE4"
|
447 |
|
|
"REGRESSION+GUEST+REGR_FIFO_LARGE_GENERIC+WB_DECODE_MEDIUM+PCI_DECODE_MAX+WB_DECODE_MED+PCI66+WB_CLK10+ACTIVE_LOW_OE+REGISTER_WBM_OUTPUTS+REGISTER_WBS_OUTPUTS+ADDR_TRAN_IMPL"
|
448 |
|
|
"REGRESSION+HOST+REGR_FIFO_SMALL_XILINX+WB_DECODE_FAST+PCI_DECODE_MAX+WB_DECODE_MIN+PCI66+WB_CLK100+ACTIVE_HIGH_OE+WB_CNF_BASE_ZERO+NO_CNF_IMAGE+PCI_IMAGE0+PCI_IMAGE4"
|
449 |
|
|
"REGRESSION+HOST+REGR_FIFO_MEDIUM_ARTISAN+WB_DECODE_MEDIUM+PCI_DECODE_MED+WB_DECODE_MED+PCI66+WB_CLK10+ACTIVE_HIGH_OE+WB_CNF_BASE_ZERO+NO_CNF_IMAGE+PCI_IMAGE0+PCI_IMAGE2+PCI_IMAGE3+PCI_IMAGE4+PCI_IMAGE5+WB_IMAGE2+WB_IMAGE3+WB_IMAGE4+WB_IMAGE5"
|
450 |
|
|
"REGRESSION+HOST+REGR_FIFO_LARGE_GENERIC+WB_DECODE_SLOW+PCI_DECODE_MIN+WB_DECODE_MAX+PCI33+WB_CLK100+ACTIVE_HIGH_OE+ADDR_TRAN_IMPL+WB_RETRY_MAX+WB_CNF_BASE_ZERO+NO_CNF_IMAGE+WB_IMAGE3"
|
451 |
|
|
"REGRESSION+GUEST+REGR_FIFO_SMALL_XILINX+WB_DECODE_SLOW+PCI_DECODE_MED+WB_DECODE_MIN+PCI33+WB_CLK66+ACTIVE_HIGH_OE+ADDR_TRAN_IMPL+WB_CNF_BASE_ZERO+NO_CNF_IMAGE+PCI_IMAGE0+PCI_IMAGE3"
|
452 |
|
|
"REGRESSION+GUEST+REGR_FIFO_MEDIUM_ARTISAN+WB_DECODE_FAST+PCI_DECODE_MIN+WB_DECODE_MAX+PCI66+WB_CLK66+ACTIVE_HIGH_OE+WB_RETRY_MAX+WB_CNF_BASE_ZERO+NO_CNF_IMAGE+PCI_IMAGE0+PCI_IMAGE2+PCI_IMAGE3+PCI_IMAGE4+PCI_IMAGE5+WB_IMAGE2"
|
453 |
|
|
"REGRESSION+GUEST+REGR_FIFO_LARGE_GENERIC+WB_DECODE_MEDIUM+PCI_DECODE_MAX+WB_DECODE_MED+PCI33+WB_CLK10+ACTIVE_HIGH_OE+WB_RETRY_MAX+WB_CNF_BASE_ZERO+NO_CNF_IMAGE+WB_IMAGE2+WB_IMAGE3+WB_IMAGE4+WB_IMAGE5"
|
454 |
|
|
""
|
455 |
|
|
|
456 |
|
|
=========================================================================================
|
457 |
|
|
*/
|
458 |
|
|
|
459 |
|
|
|
460 |
|
|
|
461 |
|
|
|
462 |
|
|
|
463 |
|
|
|
464 |
|
|
|
465 |
|
|
|
466 |
|
|
|
467 |
|
|
|
468 |
|
|
|
469 |
|
|
|
470 |
|
|
|