OpenCores
URL https://opencores.org/ocsvn/pci/pci/trunk

Subversion Repositories pci

[/] [pci/] [tags/] [rel_3/] [rtl/] [verilog/] [top.v] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mihad
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  File name "top.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 6 mihad
// Revision 1.1.1.1  2001/10/02 15:33:47  mihad
46
// New project directory structure
47 2 mihad
//
48 6 mihad
//
49 2 mihad
 
50
// This top module is primarly used for testing plain PCI bridge core without any other cores attached.
51
// Other cores can be included in this top module and appropriate changes incorporated for overall design
52 6 mihad
`include "timescale.v"
53 2 mihad
 
54
module TOP
55
(
56
    CLK,
57
    AD,
58
    CBE,
59
    RST,
60
    INTA,
61
    REQ,
62
    GNT,
63
    FRAME,
64
    IRDY,
65
    IDSEL,
66
    DEVSEL,
67
    TRDY,
68
    STOP,
69
    PAR,
70
    PERR,
71
    SERR,
72
 
73
    CLK_I,
74
    RST_I,
75
    RST_O,
76
    INT_I,
77
    INT_O,
78
 
79
    // WISHBONE slave interface
80
    ADR_I,
81
    SDAT_I,
82
    SDAT_O,
83
    SEL_I,
84
    CYC_I,
85
    STB_I,
86
    WE_I,
87
    CAB_I,
88
    ACK_O,
89
    RTY_O,
90
    ERR_O,
91
 
92
    // WISHBONE master interface
93
    ADR_O,
94
    MDAT_I,
95
    MDAT_O,
96
    SEL_O,
97
    CYC_O,
98
    STB_O,
99
    WE_O,
100
    CAB_O,
101
    ACK_I,
102
    RTY_I,
103
    ERR_I
104
);
105
 
106
input           CLK ;
107
inout   [31:0]  AD ;
108
inout   [3:0]   CBE ;
109
inout           RST ;
110
inout           INTA ;
111
output          REQ ;
112
input           GNT ;
113
inout           FRAME ;
114
inout           IRDY ;
115
input           IDSEL ;
116
inout           DEVSEL ;
117
inout           TRDY ;
118
inout           STOP ;
119
inout           PAR ;
120
inout           PERR ;
121
output          SERR ;
122
 
123
// WISHBONE system signals
124
input   CLK_I ;
125
input   RST_I ;
126
output  RST_O ;
127
input   INT_I ;
128
output  INT_O ;
129
 
130
// WISHBONE slave interface
131
input   [31:0]  ADR_I ;
132
input   [31:0]  SDAT_I ;
133
output  [31:0]  SDAT_O ;
134
input   [3:0]   SEL_I ;
135
input           CYC_I ;
136
input           STB_I ;
137
input           WE_I  ;
138
input           CAB_I ;
139
output          ACK_O ;
140
output          RTY_O ;
141
output          ERR_O ;
142
 
143
// WISHBONE master interface
144
output  [31:0]  ADR_O ;
145
input   [31:0]  MDAT_I ;
146
output  [31:0]  MDAT_O ;
147
output  [3:0]   SEL_O ;
148
output          CYC_O ;
149
output          STB_O ;
150
output          WE_O  ;
151
output          CAB_O ;
152
input           ACK_I ;
153
input           RTY_I ;
154
input           ERR_I ;
155
 
156
 
157
wire    [31:0]  AD_out ;
158
wire    [31:0]  AD_en ;
159
 
160
 
161
wire    [31:0]  AD_in = AD ;
162
 
163
wire    [3:0]   CBE_in = CBE ;
164
wire    [3:0]   CBE_out ;
165
wire    [3:0]   CBE_en ;
166
 
167
 
168
 
169
wire            RST_in = RST ;
170
wire            RST_out ;
171
wire            RST_en ;
172
 
173
wire            INTA_in = INTA ;
174
wire            INTA_en ;
175
wire            INTA_out ;
176
 
177
wire            REQ_en ;
178
wire            REQ_out ;
179
 
180
wire            FRAME_in = FRAME ;
181
wire            FRAME_out ;
182
wire            FRAME_en ;
183
 
184
wire            IRDY_in = IRDY ;
185
wire            IRDY_out ;
186
wire            IRDY_en ;
187
 
188
wire            DEVSEL_in = DEVSEL ;
189
wire            DEVSEL_out ;
190
wire            DEVSEL_en ;
191
 
192
wire            TRDY_in = TRDY ;
193
wire            TRDY_out ;
194
wire            TRDY_en ;
195
 
196
wire            STOP_in = STOP ;
197
wire            STOP_out ;
198
wire            STOP_en ;
199
 
200
wire            PAR_in = PAR ;
201
wire            PAR_out ;
202
wire            PAR_en ;
203
 
204
wire            PERR_in = PERR ;
205
wire            PERR_out ;
206
wire            PERR_en ;
207
 
208
wire            SERR_out ;
209
wire            SERR_en ;
210
 
211
PCI_BRIDGE32 bridge
212
(
213
    // WISHBONE system signals
214
    .CLK_I(CLK_I),
215
    .RST_I(RST_I),
216
    .RST_O(RST_O),
217
    .INT_I(INT_I),
218
    .INT_O(INT_O),
219
 
220
    // WISHBONE slave interface
221
    .ADR_I(ADR_I),
222
    .SDAT_I(SDAT_I),
223
    .SDAT_O(SDAT_O),
224
    .SEL_I(SEL_I),
225
    .CYC_I(CYC_I),
226
    .STB_I(STB_I),
227
    .WE_I(WE_I),
228
    .CAB_I(CAB_I),
229
    .ACK_O(ACK_O),
230
    .RTY_O(RTY_O),
231
    .ERR_O(ERR_O),
232
 
233
    // WISHBONE master interface
234
    .ADR_O(ADR_O),
235
    .MDAT_I(MDAT_I),
236
    .MDAT_O(MDAT_O),
237
    .SEL_O(SEL_O),
238
    .CYC_O(CYC_O),
239
    .STB_O(STB_O),
240
    .WE_O(WE_O),
241
    .CAB_O(CAB_O),
242
    .ACK_I(ACK_I),
243
    .RTY_I(RTY_I),
244
    .ERR_I(ERR_I),
245
 
246
    // pci interface - system pins
247
    .PCI_CLK_IN (CLK),
248
    .PCI_RSTn_IN ( RST_in ),
249
    .PCI_RSTn_OUT ( RST_out ),
250
    .PCI_INTAn_IN ( INTA_in ),
251
    .PCI_INTAn_OUT( INTA_out),
252
    .PCI_RSTn_EN_OUT( RST_en),
253
    .PCI_INTAn_EN_OUT(INTA_en),
254
 
255
    // arbitration pins
256
    .PCI_REQn_OUT( REQ_out ),
257
    .PCI_REQn_EN_OUT ( REQ_en ),
258
 
259
    .PCI_GNTn_IN( GNT ),
260
 
261
    // protocol pins
262
    .PCI_FRAMEn_IN( FRAME_in),
263
    .PCI_FRAMEn_OUT( FRAME_out ),
264
 
265
    .PCI_FRAMEn_EN_OUT( FRAME_en ),
266
    .PCI_IRDYn_EN_OUT ( IRDY_en ),
267
    .PCI_DEVSELn_EN_OUT ( DEVSEL_en ),
268
    .PCI_TRDYn_EN_OUT ( TRDY_en ),
269
    .PCI_STOPn_EN_OUT ( STOP_en ),
270
    .PCI_AD_EN_OUT(AD_en),
271
    .PCI_CBEn_EN_OUT ( CBE_en) ,
272
 
273
    .PCI_IRDYn_IN ( IRDY_in ),
274
    .PCI_IRDYn_OUT ( IRDY_out ),
275
 
276
    .PCI_IDSEL_IN ( IDSEL ),
277
 
278
    .PCI_DEVSELn_IN( DEVSEL_in ),
279
    .PCI_DEVSELn_OUT ( DEVSEL_out ),
280
 
281
    .PCI_TRDYn_IN ( TRDY_in ),
282
    .PCI_TRDYn_OUT ( TRDY_out ),
283
 
284
    .PCI_STOPn_IN( STOP_in ),
285
    .PCI_STOPn_OUT ( STOP_out ),
286
 
287
    // data transfer pins   
288
    .PCI_AD_IN(AD_in),
289
    .PCI_AD_OUT (AD_out),
290
 
291
    .PCI_CBEn_IN( CBE_in ),
292
    .PCI_CBEn_OUT ( CBE_out ),
293
 
294
    // parity generation and checking pins
295
    .PCI_PAR_IN ( PAR_in ),
296
    .PCI_PAR_OUT ( PAR_out ),
297
    .PCI_PAR_EN_OUT ( PAR_en ),
298
 
299
    .PCI_PERRn_IN ( PERR_in ),
300
    .PCI_PERRn_OUT ( PERR_out ),
301
    .PCI_PERRn_EN_OUT ( PERR_en ),
302
 
303
    // system error pin
304
    .PCI_SERRn_OUT ( SERR_out ),
305
    .PCI_SERRn_EN_OUT ( SERR_en )
306
);
307
 
308
bufif0 AD_buf0   ( AD[0],  AD_out[0], AD_en[0]) ;
309
bufif0 AD_buf1   ( AD[1],  AD_out[1], AD_en[1]) ;
310
bufif0 AD_buf2   ( AD[2],  AD_out[2], AD_en[2]) ;
311
bufif0 AD_buf3   ( AD[3],  AD_out[3], AD_en[3]) ;
312
bufif0 AD_buf4   ( AD[4],  AD_out[4], AD_en[4]) ;
313
bufif0 AD_buf5   ( AD[5],  AD_out[5], AD_en[5]) ;
314
bufif0 AD_buf6   ( AD[6],  AD_out[6], AD_en[6]) ;
315
bufif0 AD_buf7   ( AD[7],  AD_out[7], AD_en[7]) ;
316
bufif0 AD_buf8   ( AD[8],  AD_out[8], AD_en[8]) ;
317
bufif0 AD_buf9   ( AD[9],  AD_out[9], AD_en[9]) ;
318
bufif0 AD_buf10  ( AD[10], AD_out[10],AD_en[10] ) ;
319
bufif0 AD_buf11  ( AD[11], AD_out[11],AD_en[11] ) ;
320
bufif0 AD_buf12  ( AD[12], AD_out[12],AD_en[12] ) ;
321
bufif0 AD_buf13  ( AD[13], AD_out[13],AD_en[13] ) ;
322
bufif0 AD_buf14  ( AD[14], AD_out[14],AD_en[14] ) ;
323
bufif0 AD_buf15  ( AD[15], AD_out[15],AD_en[15] ) ;
324
bufif0 AD_buf16  ( AD[16], AD_out[16],AD_en[16] ) ;
325
bufif0 AD_buf17  ( AD[17], AD_out[17],AD_en[17] ) ;
326
bufif0 AD_buf18  ( AD[18], AD_out[18],AD_en[18] ) ;
327
bufif0 AD_buf19  ( AD[19], AD_out[19],AD_en[19] ) ;
328
bufif0 AD_buf20  ( AD[20], AD_out[20],AD_en[20] ) ;
329
bufif0 AD_buf21  ( AD[21], AD_out[21],AD_en[21] ) ;
330
bufif0 AD_buf22  ( AD[22], AD_out[22],AD_en[22] ) ;
331
bufif0 AD_buf23  ( AD[23], AD_out[23],AD_en[23] ) ;
332
bufif0 AD_buf24  ( AD[24], AD_out[24],AD_en[24] ) ;
333
bufif0 AD_buf25  ( AD[25], AD_out[25],AD_en[25] ) ;
334
bufif0 AD_buf26  ( AD[26], AD_out[26],AD_en[26] ) ;
335
bufif0 AD_buf27  ( AD[27], AD_out[27],AD_en[27] ) ;
336
bufif0 AD_buf28  ( AD[28], AD_out[28],AD_en[28] ) ;
337
bufif0 AD_buf29  ( AD[29], AD_out[29],AD_en[29] ) ;
338
bufif0 AD_buf30  ( AD[30], AD_out[30],AD_en[30] ) ;
339
bufif0 AD_buf31  ( AD[31], AD_out[31],AD_en[31] ) ;
340
 
341
bufif0 CBE_buf0 ( CBE[0], CBE_out[0], CBE_en[0] ) ;
342
bufif0 CBE_buf1 ( CBE[1], CBE_out[1], CBE_en[1] ) ;
343
bufif0 CBE_buf2 ( CBE[2], CBE_out[2], CBE_en[2] ) ;
344
bufif0 CBE_buf3 ( CBE[3], CBE_out[3], CBE_en[3] ) ;
345
 
346
bufif0 FRAME_buf    ( FRAME, FRAME_out, FRAME_en ) ;
347
bufif0 IRDY_buf     ( IRDY, IRDY_out, IRDY_en ) ;
348
bufif0 DEVSEL_buf   ( DEVSEL, DEVSEL_out, DEVSEL_en ) ;
349
bufif0 TRDY_buf     ( TRDY, TRDY_out, TRDY_en ) ;
350
bufif0 STOP_buf     ( STOP, STOP_out, STOP_en ) ;
351
 
352
bufif0 RST_buf      ( RST, RST_out, RST_en ) ;
353
bufif0 INTA_buf     ( INTA, INTA_out, INTA_en) ;
354
bufif0 REQ_buf      ( REQ, REQ_out, REQ_en ) ;
355
bufif0 PAR_buf      ( PAR, PAR_out, PAR_en ) ;
356
bufif0 PERR_buf     ( PERR, PERR_out, PERR_en ) ;
357
bufif0 SERR_buf     ( SERR, SERR_out, SERR_en ) ;
358
 
359
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.