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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [PCIe/] [syn/] [a10gx_riffa/] [a10gx_riffa_pcie.sv] - Blame information for rev 49

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 49 qaztronic
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// Copyright (C) 2018 Authors and OPENCORES.ORG                 ////
4
////                                                              ////
5
//// This source file may be used and distributed without         ////
6
//// restriction provided that this copyright statement is not    ////
7
//// removed from the file and that any derivative work contains  ////
8
//// the original copyright notice and the associated disclaimer. ////
9
////                                                              ////
10
//// This source file is free software; you can redistribute it   ////
11
//// and/or modify it under the terms of the GNU Lesser General   ////
12
//// Public License as published by the Free Software Foundation; ////
13
//// either version 2.1 of the License, or (at your option) any   ////
14
//// later version.                                               ////
15
////                                                              ////
16
//// This source is distributed in the hope that it will be       ////
17
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
18
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
19
//// PURPOSE.  See the GNU Lesser General Public License for more ////
20
//// details.                                                     ////
21
////                                                              ////
22
//// You should have received a copy of the GNU Lesser General    ////
23
//// Public License along with this source; if not, download it   ////
24
//// from http://www.opencores.org/lgpl.shtml                     ////
25
////                                                              ////
26
//////////////////////////////////////////////////////////////////////
27
 
28
module
29
  a10gx_riffa_pcie
30
  #(
31
    C_PCI_DATA_WIDTH
32
  )
33
  (
34
    input  [ 7:0]  pcie_rx_p,          //PCML14  //PCIe Receive Data-req's OCT
35
    output [ 7:0]  pcie_tx_p,          //PCML14  //PCIe Transmit Data
36
    input          pcie_edge_refclk_p, //HCSL    //PCIe Clock- Terminate on MB
37
    input          pcie_perstn,        //1.8V    //PCIe Reset
38
    output         pld_clk,
39
 
40
    input     npor,
41
    output              reset_status,
42
    output      [7:0]   ko_cpl_spc_header,
43
    output      [11:0]  ko_cpl_spc_data,
44
    input               app_msi_req,
45
    output              app_msi_ack,
46
 
47
    output      [3:0]   tl_cfg_add,
48
    output      [31:0]  tl_cfg_ctl,
49
    output      [52:0]  tl_cfg_sts,
50
 
51
    output      [0:0]   rx_st_sop,
52
    output      [0:0]   rx_st_eop,
53
    output      [0:0]   rx_st_err,
54
    output      [0:0]   rx_st_valid,
55
    input               rx_st_ready,
56
    output      [C_PCI_DATA_WIDTH-1:0] rx_st_data,
57
    output      [0:0]   rx_st_empty,
58
 
59
    input       [0:0]   tx_st_sop,
60
    input       [0:0]   tx_st_eop,
61
    input       [0:0]   tx_st_err,
62
    input       [0:0]   tx_st_valid,
63
    output              tx_st_ready,
64
    input       [C_PCI_DATA_WIDTH-1:0] tx_st_data,
65
    input       [0:0]   tx_st_empty
66
  );
67
 
68
  // --------------------------------------------------------------------
69
  //
70
  wire                     pin_perst;
71
 
72
 
73
  // ----------Clocks & Locks----------
74
  wire                     coreclkout_hip;
75
  wire                     refclk;
76
  wire                     pld_core_ready;
77
  wire                     serdes_pll_locked;
78
 
79
  // ------------Status Interface------------
80
  wire                     derr_cor_ext_rcv;
81
  wire                     derr_cor_ext_rpl;
82
  wire                     derr_rpl;
83
  wire                     dlup;
84
  wire                     dlup_exit;
85
  wire                     ev128ns;
86
  wire                     ev1us;
87
  wire                     hotrst_exit;
88
  wire [3:0]               int_status;
89
  wire                     l2_exit;
90
  wire [3:0]               lane_act;
91
  wire [4:0]               ltssmstate;
92
  wire                     rx_par_err;
93
  wire [1:0]               tx_par_err;
94
  wire                     cfg_par_err;
95
 
96
  // ----------Clocks----------
97
  assign pld_clk = coreclkout_hip;
98
  assign refclk = pcie_edge_refclk_p;
99
  assign pld_core_ready = serdes_pll_locked;
100
 
101
  // ----------Resets----------
102
  assign pin_perst = pcie_perstn;
103
 
104
 
105
  // --------------------------------------------------------------------
106
  //
107
  wire [31:0] test_in = 32'h00000188;
108
  wire        simu_mode_pipe = 0;
109
  wire        sim_pipe_pclk_in = 0;
110
  wire [1:0]  sim_pipe_rate;
111
  wire [4:0]  sim_ltssmstate;
112
  wire [2:0]  eidleinfersel0;
113
  wire [2:0]  eidleinfersel1;
114
  wire [2:0]  eidleinfersel2;
115
  wire [2:0]  eidleinfersel3;
116
  wire [2:0]  eidleinfersel4;
117
  wire [2:0]  eidleinfersel5;
118
  wire [2:0]  eidleinfersel6;
119
  wire [2:0]  eidleinfersel7;
120
  wire [1:0]  powerdown0;
121
  wire [1:0]  powerdown1;
122
  wire [1:0]  powerdown2;
123
  wire [1:0]  powerdown3;
124
  wire [1:0]  powerdown4;
125
  wire [1:0]  powerdown5;
126
  wire [1:0]  powerdown6;
127
  wire [1:0]  powerdown7;
128
  wire        rxpolarity0;
129
  wire        rxpolarity1;
130
  wire        rxpolarity2;
131
  wire        rxpolarity3;
132
  wire        rxpolarity4;
133
  wire        rxpolarity5;
134
  wire        rxpolarity6;
135
  wire        rxpolarity7;
136
  wire        txcompl0;
137
  wire        txcompl1;
138
  wire        txcompl2;
139
  wire        txcompl3;
140
  wire        txcompl4;
141
  wire        txcompl5;
142
  wire        txcompl6;
143
  wire        txcompl7;
144
  wire [31:0] txdata0;
145
  wire [31:0] txdata1;
146
  wire [31:0] txdata2;
147
  wire [31:0] txdata3;
148
  wire [31:0] txdata4;
149
  wire [31:0] txdata5;
150
  wire [31:0] txdata6;
151
  wire [31:0] txdata7;
152
  wire [3:0]  txdatak0;
153
  wire [3:0]  txdatak1;
154
  wire [3:0]  txdatak2;
155
  wire [3:0]  txdatak3;
156
  wire [3:0]  txdatak4;
157
  wire [3:0]  txdatak5;
158
  wire [3:0]  txdatak6;
159
  wire [3:0]  txdatak7;
160
  wire        txdetectrx0;
161
  wire        txdetectrx1;
162
  wire        txdetectrx2;
163
  wire        txdetectrx3;
164
  wire        txdetectrx4;
165
  wire        txdetectrx5;
166
  wire        txdetectrx6;
167
  wire        txdetectrx7;
168
  wire        txelecidle0;
169
  wire        txelecidle1;
170
  wire        txelecidle2;
171
  wire        txelecidle3;
172
  wire        txelecidle4;
173
  wire        txelecidle5;
174
  wire        txelecidle6;
175
  wire        txelecidle7;
176
  wire        txdeemph0;
177
  wire        txdeemph1;
178
  wire        txdeemph2;
179
  wire        txdeemph3;
180
  wire        txdeemph4;
181
  wire        txdeemph5;
182
  wire        txdeemph6;
183
  wire        txdeemph7;
184
  wire [2:0]  txmargin0;
185
  wire [2:0]  txmargin1;
186
  wire [2:0]  txmargin2;
187
  wire [2:0]  txmargin3;
188
  wire [2:0]  txmargin4;
189
  wire [2:0]  txmargin5;
190
  wire [2:0]  txmargin6;
191
  wire [2:0]  txmargin7;
192
  wire        txswing0;
193
  wire        txswing1;
194
  wire        txswing2;
195
  wire        txswing3;
196
  wire        txswing4;
197
  wire        txswing5;
198
  wire        txswing6;
199
  wire        txswing7;
200
  wire        phystatus0 = 0;
201
  wire        phystatus1 = 0;
202
  wire        phystatus2 = 0;
203
  wire        phystatus3 = 0;
204
  wire        phystatus4 = 0;
205
  wire        phystatus5 = 0;
206
  wire        phystatus6 = 0;
207
  wire        phystatus7 = 0;
208
  wire [31:0] rxdata0 = 0;
209
  wire [31:0] rxdata1 = 0;
210
  wire [31:0] rxdata2 = 0;
211
  wire [31:0] rxdata3 = 0;
212
  wire [31:0] rxdata4 = 0;
213
  wire [31:0] rxdata5 = 0;
214
  wire [31:0] rxdata6 = 0;
215
  wire [31:0] rxdata7 = 0;
216
  wire [3:0]  rxdatak0 = 0;
217
  wire [3:0]  rxdatak1 = 0;
218
  wire [3:0]  rxdatak2 = 0;
219
  wire [3:0]  rxdatak3 = 0;
220
  wire [3:0]  rxdatak4 = 0;
221
  wire [3:0]  rxdatak5 = 0;
222
  wire [3:0]  rxdatak6 = 0;
223
  wire [3:0]  rxdatak7 = 0;
224
  wire        rxelecidle0 = 0;
225
  wire        rxelecidle1 = 0;
226
  wire        rxelecidle2 = 0;
227
  wire        rxelecidle3 = 0;
228
  wire        rxelecidle4 = 0;
229
  wire        rxelecidle5 = 0;
230
  wire        rxelecidle6 = 0;
231
  wire        rxelecidle7 = 0;
232
  wire [2:0]  rxstatus0 = 0;
233
  wire [2:0]  rxstatus1 = 0;
234
  wire [2:0]  rxstatus2 = 0;
235
  wire [2:0]  rxstatus3 = 0;
236
  wire [2:0]  rxstatus4 = 0;
237
  wire [2:0]  rxstatus5 = 0;
238
  wire [2:0]  rxstatus6 = 0;
239
  wire [2:0]  rxstatus7 = 0;
240
  wire        rxvalid0 = 0;
241
  wire        rxvalid1 = 0;
242
  wire        rxvalid2 = 0;
243
  wire        rxvalid3 = 0;
244
  wire        rxvalid4 = 0;
245
  wire        rxvalid5 = 0;
246
  wire        rxvalid6 = 0;
247
  wire        rxvalid7 = 0;
248
  wire        rxdataskip0 = 0;
249
  wire        rxdataskip1 = 0;
250
  wire        rxdataskip2 = 0;
251
  wire        rxdataskip3 = 0;
252
  wire        rxdataskip4 = 0;
253
  wire        rxdataskip5 = 0;
254
  wire        rxdataskip6 = 0;
255
  wire        rxdataskip7 = 0;
256
  wire        rxblkst0 = 0;
257
  wire        rxblkst1 = 0;
258
  wire        rxblkst2 = 0;
259
  wire        rxblkst3 = 0;
260
  wire        rxblkst4 = 0;
261
  wire        rxblkst5 = 0;
262
  wire        rxblkst6 = 0;
263
  wire        rxblkst7 = 0;
264
  wire [1:0]  rxsynchd0 = 0;
265
  wire [1:0]  rxsynchd1 = 0;
266
  wire [1:0]  rxsynchd2 = 0;
267
  wire [1:0]  rxsynchd3 = 0;
268
  wire [1:0]  rxsynchd4 = 0;
269
  wire [1:0]  rxsynchd5 = 0;
270
  wire [1:0]  rxsynchd6 = 0;
271
  wire [1:0]  rxsynchd7 = 0;
272
  wire [17:0] currentcoeff0;
273
  wire [17:0] currentcoeff1;
274
  wire [17:0] currentcoeff2;
275
  wire [17:0] currentcoeff3;
276
  wire [17:0] currentcoeff4;
277
  wire [17:0] currentcoeff5;
278
  wire [17:0] currentcoeff6;
279
  wire [17:0] currentcoeff7;
280
  wire [2:0]  currentrxpreset0;
281
  wire [2:0]  currentrxpreset1;
282
  wire [2:0]  currentrxpreset2;
283
  wire [2:0]  currentrxpreset3;
284
  wire [2:0]  currentrxpreset4;
285
  wire [2:0]  currentrxpreset5;
286
  wire [2:0]  currentrxpreset6;
287
  wire [2:0]  currentrxpreset7;
288
  wire [1:0]  txsynchd0;
289
  wire [1:0]  txsynchd1;
290
  wire [1:0]  txsynchd2;
291
  wire [1:0]  txsynchd3;
292
  wire [1:0]  txsynchd4;
293
  wire [1:0]  txsynchd5;
294
  wire [1:0]  txsynchd6;
295
  wire [1:0]  txsynchd7;
296
  wire        txblkst0;
297
  wire        txblkst1;
298
  wire        txblkst2;
299
  wire        txblkst3;
300
  wire        txblkst4;
301
  wire        txblkst5;
302
  wire        txblkst6;
303
  wire        txblkst7;
304
  wire        txdataskip0;
305
  wire        txdataskip1;
306
  wire        txdataskip2;
307
  wire        txdataskip3;
308
  wire        txdataskip4;
309
  wire        txdataskip5;
310
  wire        txdataskip6;
311
  wire        txdataskip7;
312
  wire [1:0]  rate0;
313
  wire [1:0]  rate1;
314
  wire [1:0]  rate2;
315
  wire [1:0]  rate3;
316
  wire [1:0]  rate4;
317
  wire [1:0]  rate5;
318
  wire [1:0]  rate6;
319
  wire [1:0]  rate7;
320
 
321
  wire  [1:0] currentspeed;
322
  wire pld_clk_inuse;
323
  wire testin_zero;
324
  wire clr_st;
325
  wire app_int_sts = 0;
326
  wire app_int_ack;
327
  wire [4:0] app_msi_num = 0;
328
  wire [2:0] app_msi_tc = 0;
329
  wire [7:0] rx_st_bar;
330
  wire rx_st_mask = 0;
331
  wire [11:0] tx_cred_data_fc;
332
  wire [5:0] tx_cred_fc_hip_cons;
333
  wire [5:0] tx_cred_fc_infinite;
334
  wire [7:0] tx_cred_hdr_fc;
335
  wire [1:0] tx_cred_fc_sel = 0;
336
  wire pm_auxpwr = 0;
337
  wire [9:0] pm_data = 0;
338
  wire pme_to_cr = 0;
339
  wire pm_event = 0;
340
  wire pme_to_sr;
341
  wire [4:0] hpg_ctrler = 0;
342
  wire [6:0] cpl_err = 0;
343
  wire cpl_pending = 0;
344
 
345
  A10GXGen2x8If128_PCIe
346
    A10GXGen2x8If128_PCIe_i
347
    (
348
      .rx_in0(pcie_rx_p[0]),
349
      .rx_in1(pcie_rx_p[1]),
350
      .rx_in2(pcie_rx_p[2]),
351
      .rx_in3(pcie_rx_p[3]),
352
      .rx_in4(pcie_rx_p[4]),
353
      .rx_in5(pcie_rx_p[5]),
354
      .rx_in6(pcie_rx_p[6]),
355
      .rx_in7(pcie_rx_p[7]),
356
      .tx_out0(pcie_tx_p[0]),
357
      .tx_out1(pcie_tx_p[1]),
358
      .tx_out2(pcie_tx_p[2]),
359
      .tx_out3(pcie_tx_p[3]),
360
      .tx_out4(pcie_tx_p[4]),
361
      .tx_out5(pcie_tx_p[5]),
362
      .tx_out6(pcie_tx_p[6]),
363
      .tx_out7(pcie_tx_p[7]),
364
      .*
365
    );
366
 
367
 
368
// --------------------------------------------------------------------
369
//
370
endmodule

powered by: WebSVN 2.1.0

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