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

Subversion Repositories pcie_ds_dma

[/] [pcie_ds_dma/] [trunk/] [core/] [ds_dma64/] [pcie_src/] [pcie_core64_m1/] [source_artix7/] [cl_a7pcie_x4.vhd] - Blame information for rev 46

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

Line No. Rev Author Line
1 46 dsmv
-------------------------------------------------------------------------------
2
--
3
-- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved.
4
--
5
-- This file contains confidential and proprietary information
6
-- of Xilinx, Inc. and is protected under U.S. and
7
-- international copyright and other intellectual property
8
-- laws.
9
--
10
-- DISCLAIMER
11
-- This disclaimer is not a license and does not grant any
12
-- rights to the materials distributed herewith. Except as
13
-- otherwise provided in a valid license issued to you by
14
-- Xilinx, and to the maximum extent permitted by applicable
15
-- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
16
-- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
17
-- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
18
-- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
19
-- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
20
-- (2) Xilinx shall not be liable (whether in contract or tort,
21
-- including negligence, or under any other theory of
22
-- liability) for any loss or damage of any kind or nature
23
-- related to, arising under or in connection with these
24
-- materials, including for any direct, or any indirect,
25
-- special, incidental, or consequential loss or damage
26
-- (including loss of data, profits, goodwill, or any type of
27
-- loss or damage suffered as a result of any action brought
28
-- by a third party) even if such damage or loss was
29
-- reasonably foreseeable or Xilinx had been advised of the
30
-- possibility of the same.
31
--
32
-- CRITICAL APPLICATIONS
33
-- Xilinx products are not designed or intended to be fail-
34
-- safe, or for use in any application requiring fail-safe
35
-- performance, such as life-support or safety devices or
36
-- systems, Class III medical devices, nuclear facilities,
37
-- applications related to the deployment of airbags, or any
38
-- other applications that could lead to death, personal
39
-- injury, or severe property or environmental damage
40
-- (individually and collectively, "Critical
41
-- Applications"). Customer assumes the sole risk and
42
-- liability of any use of Xilinx products in Critical
43
-- Applications, subject only to applicable laws and
44
-- regulations governing limitations on product liability.
45
--
46
-- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
47
-- PART OF THIS FILE AT ALL TIMES.
48
--
49
-------------------------------------------------------------------------------
50
-- Project    : Series-7 Integrated Block for PCI Express
51
-- File       : cl_a7pcie_x4.vhd
52
-- Version    : 1.9
53
--
54
-- Description: Solution wrapper for Virtex7 Hard Block for PCI Express
55
--
56
--
57
--
58
----------------------------------------------------------------------------------
59
 
60
library ieee;
61
use ieee.std_logic_1164.all;
62
use ieee.std_logic_misc.all;
63
use ieee.std_logic_unsigned.all;
64
use ieee.numeric_std.all;
65
 
66
entity cl_a7pcie_x4 is
67
  generic (
68
    CFG_VEND_ID                                    : std_logic_vector := X"4953";
69
    CFG_DEV_ID                                     : std_logic_vector := X"5507";
70
    CFG_REV_ID                                     : std_logic_vector := X"00";
71
    CFG_SUBSYS_VEND_ID                             : std_logic_vector := X"10EE";
72
    CFG_SUBSYS_ID                                  : std_logic_vector := X"0701";
73
    ALLOW_X8_GEN2                                  : string     := "FALSE";
74
    PIPE_PIPELINE_STAGES                           : integer    := 1;
75
    AER_BASE_PTR                                   : bit_vector := X"000";
76
    AER_CAP_ECRC_CHECK_CAPABLE                     : string     := "FALSE";
77
    AER_CAP_MULTIHEADER                            : string     := "FALSE";
78
    AER_CAP_NEXTPTR                                : bit_vector := X"000";
79
    AER_CAP_OPTIONAL_ERR_SUPPORT                   : bit_vector := X"000000";
80
    AER_CAP_ON                                     : string     := "FALSE";
81
    AER_CAP_PERMIT_ROOTERR_UPDATE                  : string     := "FALSE";
82
 
83
    BAR0                                           : bit_vector := X"FFE00000";
84
    BAR1                                           : bit_vector := X"FFE00000";
85
    BAR2                                           : bit_vector := X"00000000";
86
    BAR3                                           : bit_vector := X"00000000";
87
    BAR4                                           : bit_vector := X"00000000";
88
    BAR5                                           : bit_vector := X"00000000";
89
 
90
    C_DATA_WIDTH                                   : integer    := 64;
91
    CARDBUS_CIS_POINTER                            : bit_vector := X"00000000";
92
    CLASS_CODE                                     : bit_vector := X"FFFFFF";
93
    CMD_INTX_IMPLEMENTED                           : string     := "TRUE";
94
    CPL_TIMEOUT_DISABLE_SUPPORTED                  : string     := "FALSE";
95
    CPL_TIMEOUT_RANGES_SUPPORTED                   : bit_vector := X"2";
96
 
97
    DEV_CAP_ENDPOINT_L0S_LATENCY                   : integer    := 0;
98
    DEV_CAP_ENDPOINT_L1_LATENCY                    : integer    := 7;
99
    DEV_CAP_EXT_TAG_SUPPORTED                      : string     := "FALSE";
100
    DEV_CAP_MAX_PAYLOAD_SUPPORTED                  : integer    := 1;
101
    DEV_CAP_PHANTOM_FUNCTIONS_SUPPORT              : integer    := 0;
102
 
103
    DEV_CAP2_ARI_FORWARDING_SUPPORTED              : string     := "FALSE";
104
    DEV_CAP2_ATOMICOP32_COMPLETER_SUPPORTED        : string     := "FALSE";
105
    DEV_CAP2_ATOMICOP64_COMPLETER_SUPPORTED        : string     := "FALSE";
106
    DEV_CAP2_ATOMICOP_ROUTING_SUPPORTED            : string     := "FALSE";
107
    DEV_CAP2_CAS128_COMPLETER_SUPPORTED            : string     := "FALSE";
108
    DEV_CAP2_TPH_COMPLETER_SUPPORTED               : bit_vector := X"00";
109
    DEV_CONTROL_EXT_TAG_DEFAULT                    : string     := "FALSE";
110
 
111
    DISABLE_LANE_REVERSAL                          : string     := "TRUE";
112
    DISABLE_RX_POISONED_RESP                       : string     := "FALSE";
113
    DISABLE_SCRAMBLING                             : string     := "FALSE";
114
    DSN_BASE_PTR                                   : bit_vector := X"100";
115
    DSN_CAP_NEXTPTR                                : bit_vector := X"000";
116
    DSN_CAP_ON                                     : string     := "TRUE";
117
 
118
    ENABLE_MSG_ROUTE                               : bit_vector := "00000000000";
119
    ENABLE_RX_TD_ECRC_TRIM                         : string     := "TRUE";
120
    EXPANSION_ROM                                  : bit_vector := X"00000000";
121
    EXT_CFG_CAP_PTR                                : bit_vector := X"3F";
122
    EXT_CFG_XP_CAP_PTR                             : bit_vector := X"3FF";
123
    HEADER_TYPE                                    : bit_vector := X"00";
124
    INTERRUPT_PIN                                  : bit_vector := X"1";
125
 
126
    LAST_CONFIG_DWORD                              : bit_vector := X"3FF";
127
    LINK_CAP_ASPM_OPTIONALITY                      : string     := "FALSE";
128
    LINK_CAP_DLL_LINK_ACTIVE_REPORTING_CAP         : string     := "FALSE";
129
    LINK_CAP_LINK_BANDWIDTH_NOTIFICATION_CAP       : string     := "FALSE";
130
    LINK_CAP_MAX_LINK_SPEED                        : bit_vector := X"2";
131
    LINK_CAP_MAX_LINK_SPEED_int                    : integer    := 2;
132
    LINK_CAP_MAX_LINK_WIDTH                        : bit_vector := X"04";
133
    LINK_CAP_MAX_LINK_WIDTH_int                    : integer    := 4;
134
 
135
    LINK_CTRL2_DEEMPHASIS                          : string     := "FALSE";
136
    LINK_CTRL2_HW_AUTONOMOUS_SPEED_DISABLE         : string     := "FALSE";
137
    LINK_CTRL2_TARGET_LINK_SPEED                   : bit_vector := X"2";
138
    LINK_STATUS_SLOT_CLOCK_CONFIG                  : string     := "TRUE";
139
 
140
    LL_ACK_TIMEOUT                                 : bit_vector := X"0000";
141
    LL_ACK_TIMEOUT_EN                              : string     := "FALSE";
142
    LL_ACK_TIMEOUT_FUNC                            : integer    := 0;
143
    LL_REPLAY_TIMEOUT                              : bit_vector := X"0000";
144
    LL_REPLAY_TIMEOUT_EN                           : string     := "FALSE";
145
    LL_REPLAY_TIMEOUT_FUNC                         : integer    := 1;
146
 
147
    LTSSM_MAX_LINK_WIDTH                           : bit_vector := X"04";
148
    MSI_CAP_MULTIMSGCAP                            : integer    := 0;
149
    MSI_CAP_MULTIMSG_EXTENSION                     : integer    := 0;
150
    MSI_CAP_ON                                     : string     := "FALSE";
151
    MSI_CAP_PER_VECTOR_MASKING_CAPABLE             : string     := "FALSE";
152
    MSI_CAP_64_BIT_ADDR_CAPABLE                    : string     := "TRUE";
153
 
154
    MSIX_CAP_ON                                    : string     := "FALSE";
155
    MSIX_CAP_PBA_BIR                               : integer    := 0;
156
    MSIX_CAP_PBA_OFFSET                            : bit_vector := X"0";
157
    MSIX_CAP_TABLE_BIR                             : integer    := 0;
158
    MSIX_CAP_TABLE_OFFSET                          : bit_vector := X"0";
159
    MSIX_CAP_TABLE_SIZE                            : bit_vector := X"0";
160
 
161
    PCIE_CAP_DEVICE_PORT_TYPE                      : bit_vector := X"0";
162
    PCIE_CAP_NEXTPTR                               : bit_vector := X"00";
163
 
164
    PM_CAP_DSI                                     : string     := "TRUE";
165
    PM_CAP_D1SUPPORT                               : string     := "FALSE";
166
    PM_CAP_D2SUPPORT                               : string     := "FALSE";
167
    PM_CAP_NEXTPTR                                 : bit_vector := X"60";
168
    PM_CAP_PMESUPPORT                              : bit_vector := X"0F";
169
    PM_CSR_NOSOFTRST                               : string     := "TRUE";
170
 
171
    PM_DATA_SCALE0                                 : bit_vector := X"0";
172
    PM_DATA_SCALE1                                 : bit_vector := X"0";
173
    PM_DATA_SCALE2                                 : bit_vector := X"0";
174
    PM_DATA_SCALE3                                 : bit_vector := X"0";
175
    PM_DATA_SCALE4                                 : bit_vector := X"0";
176
    PM_DATA_SCALE5                                 : bit_vector := X"0";
177
    PM_DATA_SCALE6                                 : bit_vector := X"0";
178
    PM_DATA_SCALE7                                 : bit_vector := X"0";
179
 
180
    PM_DATA0                                       : bit_vector := X"00";
181
    PM_DATA1                                       : bit_vector := X"00";
182
    PM_DATA2                                       : bit_vector := X"00";
183
    PM_DATA3                                       : bit_vector := X"00";
184
    PM_DATA4                                       : bit_vector := X"00";
185
    PM_DATA5                                       : bit_vector := X"00";
186
    PM_DATA6                                       : bit_vector := X"00";
187
    PM_DATA7                                       : bit_vector := X"00";
188
 
189
    RBAR_BASE_PTR                                  : bit_vector := X"000";
190
    RBAR_CAP_CONTROL_ENCODEDBAR0                   : bit_vector := X"00";
191
    RBAR_CAP_CONTROL_ENCODEDBAR1                   : bit_vector := X"00";
192
    RBAR_CAP_CONTROL_ENCODEDBAR2                   : bit_vector := X"00";
193
    RBAR_CAP_CONTROL_ENCODEDBAR3                   : bit_vector := X"00";
194
    RBAR_CAP_CONTROL_ENCODEDBAR4                   : bit_vector := X"00";
195
    RBAR_CAP_CONTROL_ENCODEDBAR5                   : bit_vector := X"00";
196
    RBAR_CAP_INDEX0                                : bit_vector := X"0";
197
    RBAR_CAP_INDEX1                                : bit_vector := X"0";
198
    RBAR_CAP_INDEX2                                : bit_vector := X"0";
199
    RBAR_CAP_INDEX3                                : bit_vector := X"0";
200
    RBAR_CAP_INDEX4                                : bit_vector := X"0";
201
    RBAR_CAP_INDEX5                                : bit_vector := X"0";
202
    RBAR_CAP_ON                                    : string     := "FALSE";
203
    RBAR_CAP_SUP0                                  : bit_vector := X"00001";
204
    RBAR_CAP_SUP1                                  : bit_vector := X"00001";
205
    RBAR_CAP_SUP2                                  : bit_vector := X"00001";
206
    RBAR_CAP_SUP3                                  : bit_vector := X"00001";
207
    RBAR_CAP_SUP4                                  : bit_vector := X"00001";
208
    RBAR_CAP_SUP5                                  : bit_vector := X"00001";
209
    RBAR_NUM                                       : bit_vector := X"0";
210
 
211
    RECRC_CHK                                      : integer    := 0;
212
    RECRC_CHK_TRIM                                 : string     := "FALSE";
213
    REF_CLK_FREQ                                   : integer    := 0;    -- 0 - 100 MHz; 1 - 125 MHz; 2 - 250 MHz
214
 
215
    --KEEP_WIDTH                                   : integer    := C_DATA_WIDTH / 8;
216
 
217
    TL_RX_RAM_RADDR_LATENCY                        : integer    := 0;
218
    TL_RX_RAM_RDATA_LATENCY                        : integer    := 2;
219
    TL_RX_RAM_WRITE_LATENCY                        : integer    := 0;
220
    TL_TX_RAM_RADDR_LATENCY                        : integer    := 0;
221
    TL_TX_RAM_RDATA_LATENCY                        : integer    := 2;
222
    TL_TX_RAM_WRITE_LATENCY                        : integer    := 0;
223
    TRN_NP_FC                                      : string     := "TRUE";
224
    TRN_DW                                         : string     := "FALSE";
225
 
226
    UPCONFIG_CAPABLE                               : string     := "TRUE";
227
    UPSTREAM_FACING                                : string     := "TRUE";
228
    UR_ATOMIC                                      : string     := "FALSE";
229
    UR_INV_REQ                                     : string     := "TRUE";
230
    UR_PRS_RESPONSE                                : string     := "TRUE";
231
    USER_CLK_FREQ                                  : integer    := 3;
232
    USER_CLK2_DIV2                                 : string     := "FALSE";
233
 
234
    VC_BASE_PTR                                    : bit_vector := X"000";
235
    VC_CAP_NEXTPTR                                 : bit_vector := X"000";
236
    VC_CAP_ON                                      : string     := "FALSE";
237
    VC_CAP_REJECT_SNOOP_TRANSACTIONS               : string     := "FALSE";
238
 
239
    VC0_CPL_INFINITE                               : string     := "TRUE";
240
    VC0_RX_RAM_LIMIT                               : bit_vector := X"3FF";
241
    VC0_TOTAL_CREDITS_CD                           : integer    := 370;
242
    VC0_TOTAL_CREDITS_CH                           : integer    := 72;
243
    VC0_TOTAL_CREDITS_NPH                          : integer    := 4;
244
    VC0_TOTAL_CREDITS_NPD                          : integer    := 8;
245
    VC0_TOTAL_CREDITS_PD                           : integer    := 32;
246
    VC0_TOTAL_CREDITS_PH                           : integer    := 4;
247
    VC0_TX_LASTPACKET                              : integer    := 28;
248
 
249
    VSEC_BASE_PTR                                  : bit_vector := X"000";
250
    VSEC_CAP_NEXTPTR                               : bit_vector := X"000";
251
    VSEC_CAP_ON                                    : string     := "FALSE";
252
 
253
    DISABLE_ASPM_L1_TIMER                          : string     := "FALSE";
254
    DISABLE_BAR_FILTERING                          : string     := "FALSE";
255
    DISABLE_ID_CHECK                               : string     := "FALSE";
256
    DISABLE_RX_TC_FILTER                           : string     := "FALSE";
257
    DNSTREAM_LINK_NUM                              : bit_vector := X"00";
258
 
259
    DSN_CAP_ID                                     : bit_vector := X"0003";
260
    DSN_CAP_VERSION                                : bit_vector := X"1";
261
    ENTER_RVRY_EI_L0                               : string     := "TRUE";
262
    INFER_EI                                       : bit_vector := X"00";
263
    IS_SWITCH                                      : string     := "FALSE";
264
 
265
    LINK_CAP_ASPM_SUPPORT                          : integer    := 1;
266
    LINK_CAP_CLOCK_POWER_MANAGEMENT                : string     := "FALSE";
267
    LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN1          : integer    := 7;
268
    LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN2          : integer    := 7;
269
    LINK_CAP_L0S_EXIT_LATENCY_GEN1                 : integer    := 7;
270
    LINK_CAP_L0S_EXIT_LATENCY_GEN2                 : integer    := 7;
271
    LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN1           : integer    := 7;
272
    LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN2           : integer    := 7;
273
    LINK_CAP_L1_EXIT_LATENCY_GEN1                  : integer    := 7;
274
    LINK_CAP_L1_EXIT_LATENCY_GEN2                  : integer    := 7;
275
    LINK_CAP_RSVD_23                               : integer    := 0;
276
    LINK_CONTROL_RCB                               : integer    := 0;
277
 
278
    MSI_BASE_PTR                                   : bit_vector := X"48";
279
    MSI_CAP_ID                                     : bit_vector := X"05";
280
    MSI_CAP_NEXTPTR                                : bit_vector := X"60";
281
    MSIX_BASE_PTR                                  : bit_vector := X"9c";
282
    MSIX_CAP_ID                                    : bit_vector := X"11";
283
    MSIX_CAP_NEXTPTR                               : bit_vector := X"00";
284
 
285
    N_FTS_COMCLK_GEN1                              : integer    := 255;
286
    N_FTS_COMCLK_GEN2                              : integer    := 255;
287
    N_FTS_GEN1                                     : integer    := 255;
288
    N_FTS_GEN2                                     : integer    := 255;
289
 
290
    PCIE_BASE_PTR                                  : bit_vector := X"60";
291
    PCIE_CAP_CAPABILITY_ID                         : bit_vector := X"10";
292
    PCIE_CAP_CAPABILITY_VERSION                    : bit_vector := X"2";
293
    PCIE_CAP_ON                                    : string     := "TRUE";
294
    PCIE_CAP_RSVD_15_14                            : integer    := 0;
295
    PCIE_CAP_SLOT_IMPLEMENTED                      : string     := "FALSE";
296
    PCIE_REVISION                                  : integer    := 2;
297
 
298
    PL_AUTO_CONFIG                                 : integer    := 0;
299
    PL_FAST_TRAIN                                  : string     := "FALSE";
300
    PCIE_EXT_CLK                                   : string     := "TRUE";
301
 
302
    PM_BASE_PTR                                    : bit_vector := X"40";
303
    PM_CAP_AUXCURRENT                              : integer    := 0;
304
    PM_CAP_ID                                      : bit_vector := X"01";
305
    PM_CAP_ON                                      : string     := "TRUE";
306
    PM_CAP_PME_CLOCK                               : string     := "FALSE";
307
    PM_CAP_RSVD_04                                 : integer    := 0;
308
    PM_CAP_VERSION                                 : integer    := 3;
309
    PM_CSR_BPCCEN                                  : string     := "FALSE";
310
    PM_CSR_B2B3                                    : string     := "FALSE";
311
 
312
    ROOT_CAP_CRS_SW_VISIBILITY                     : string     := "FALSE";
313
    SELECT_DLL_IF                                  : string     := "FALSE";
314
    SLOT_CAP_ATT_BUTTON_PRESENT                    : string     := "FALSE";
315
    SLOT_CAP_ATT_INDICATOR_PRESENT                 : string     := "FALSE";
316
    SLOT_CAP_ELEC_INTERLOCK_PRESENT                : string     := "FALSE";
317
    SLOT_CAP_HOTPLUG_CAPABLE                       : string     := "FALSE";
318
    SLOT_CAP_HOTPLUG_SURPRISE                      : string     := "FALSE";
319
    SLOT_CAP_MRL_SENSOR_PRESENT                    : string     := "FALSE";
320
    SLOT_CAP_NO_CMD_COMPLETED_SUPPORT              : string     := "FALSE";
321
    SLOT_CAP_PHYSICAL_SLOT_NUM                     : bit_vector := X"0000";
322
    SLOT_CAP_POWER_CONTROLLER_PRESENT              : string     := "FALSE";
323
    SLOT_CAP_POWER_INDICATOR_PRESENT               : string     := "FALSE";
324
    SLOT_CAP_SLOT_POWER_LIMIT_SCALE                : integer    := 0;
325
    SLOT_CAP_SLOT_POWER_LIMIT_VALUE                : bit_vector := X"00";
326
 
327
    SPARE_BIT0                                     : integer    := 0;
328
 
329
    SPARE_BIT1                                     : integer    := 0;
330
    SPARE_BIT2                                     : integer    := 0;
331
    SPARE_BIT3                                     : integer    := 0;
332
    SPARE_BIT4                                     : integer    := 0;
333
    SPARE_BIT5                                     : integer    := 0;
334
    SPARE_BIT6                                     : integer    := 0;
335
    SPARE_BIT7                                     : integer    := 0;
336
    SPARE_BIT8                                     : integer    := 0;
337
    SPARE_BYTE0                                    : bit_vector := X"00";
338
    SPARE_BYTE1                                    : bit_vector := X"00";
339
    SPARE_BYTE2                                    : bit_vector := X"00";
340
    SPARE_BYTE3                                    : bit_vector := X"00";
341
    SPARE_WORD0                                    : bit_vector := X"00000000";
342
    SPARE_WORD1                                    : bit_vector := X"00000000";
343
    SPARE_WORD2                                    : bit_vector := X"00000000";
344
    SPARE_WORD3                                    : bit_vector := X"00000000";
345
 
346
    TL_RBYPASS                                     : string     := "FALSE";
347
    TL_TFC_DISABLE                                 : string     := "FALSE";
348
    TL_TX_CHECKS_DISABLE                           : string     := "FALSE";
349
    EXIT_LOOPBACK_ON_EI                            : string     := "TRUE";
350
 
351
    CFG_ECRC_ERR_CPLSTAT                           : integer    := 0;
352
    CAPABILITIES_PTR                               : bit_vector := X"40";
353
    CRM_MODULE_RSTS                                : bit_vector := X"00";
354
    DEV_CAP_ENABLE_SLOT_PWR_LIMIT_SCALE            : string     := "TRUE";
355
    DEV_CAP_ENABLE_SLOT_PWR_LIMIT_VALUE            : string     := "TRUE";
356
    DEV_CAP_FUNCTION_LEVEL_RESET_CAPABLE           : string     := "FALSE";
357
    DEV_CAP_ROLE_BASED_ERROR                       : string     := "TRUE";
358
    DEV_CAP_RSVD_14_12                             : integer    := 0;
359
    DEV_CAP_RSVD_17_16                             : integer    := 0;
360
    DEV_CAP_RSVD_31_29                             : integer    := 0;
361
    DEV_CONTROL_AUX_POWER_SUPPORTED                : string     := "FALSE";
362
 
363
    VC_CAP_ID                                      : bit_vector := X"0002";
364
    VC_CAP_VERSION                                 : bit_vector := X"1";
365
    VSEC_CAP_HDR_ID                                : bit_vector := X"1234";
366
    VSEC_CAP_HDR_LENGTH                            : bit_vector := X"018";
367
    VSEC_CAP_HDR_REVISION                          : bit_vector := X"1";
368
    VSEC_CAP_ID                                    : bit_vector := X"000b";
369
    VSEC_CAP_IS_LINK_VISIBLE                       : string     := "TRUE";
370
    VSEC_CAP_VERSION                               : bit_vector := X"1";
371
 
372
    DISABLE_ERR_MSG                                : string     := "FALSE";
373
    DISABLE_LOCKED_FILTER                          : string     := "FALSE";
374
    DISABLE_PPM_FILTER                             : string     := "FALSE";
375
    ENDEND_TLP_PREFIX_FORWARDING_SUPPORTED         : string     := "FALSE";
376
    INTERRUPT_STAT_AUTO                            : string     := "TRUE";
377
    MPS_FORCE                                      : string     := "FALSE";
378
    PM_ASPML0S_TIMEOUT                             : bit_vector := X"0000";
379
    PM_ASPML0S_TIMEOUT_EN                          : string     := "FALSE";
380
    PM_ASPML0S_TIMEOUT_FUNC                        : integer    := 0;
381
    PM_ASPM_FASTEXIT                               : string     := "FALSE";
382
    PM_MF                                          : string     := "FALSE";
383
 
384
    RP_AUTO_SPD                                    : bit_vector := X"1";
385
    RP_AUTO_SPD_LOOPCNT                            : bit_vector := X"1f";
386
    SIM_VERSION                                    : string     := "1.0";
387
    SSL_MESSAGE_AUTO                               : string     := "FALSE";
388
    TECRC_EP_INV                                   : string     := "FALSE";
389
    UR_CFG1                                        : string     := "TRUE";
390
    USE_RID_PINS                                   : string     := "FALSE";
391
 
392
    -- New Parameters
393
    DEV_CAP2_ENDEND_TLP_PREFIX_SUPPORTED           : string     := "FALSE";
394
    DEV_CAP2_EXTENDED_FMT_FIELD_SUPPORTED          : string     := "FALSE";
395
    DEV_CAP2_LTR_MECHANISM_SUPPORTED               : string     := "FALSE";
396
    DEV_CAP2_MAX_ENDEND_TLP_PREFIXES               : bit_vector := X"0";
397
    DEV_CAP2_NO_RO_ENABLED_PRPR_PASSING            : string     := "FALSE";
398
 
399
    LINK_CAP_SURPRISE_DOWN_ERROR_CAPABLE           : string     := "FALSE";
400
 
401
    AER_CAP_ECRC_GEN_CAPABLE                       : string     := "FALSE";
402
    AER_CAP_ID                                     : bit_vector := X"0001";
403
    AER_CAP_VERSION                                : bit_vector := X"1";
404
 
405
    RBAR_CAP_ID                                    : bit_vector := X"0015";
406
    RBAR_CAP_NEXTPTR                               : bit_vector := X"000";
407
    RBAR_CAP_VERSION                               : bit_vector := X"1";
408
    PCIE_USE_MODE                                  : string     := "1.0";
409
    PCIE_GT_DEVICE                                 : string     := "GTP";
410
    PCIE_CHAN_BOND                                 : integer    := 1;
411
    PCIE_PLL_SEL                                   : string     := "CPLL";
412
    PCIE_ASYNC_EN                                  : string     := "FALSE";
413
    PCIE_TXBUF_EN                                  : string     := "FALSE"
414
  );
415
  port (
416
 
417
     -------------------------------------------------------------------------------------------------------------------
418
     -- 1. PCI Express (pci_exp) Interface                                                                            --
419
     -------------------------------------------------------------------------------------------------------------------
420
      pci_exp_txp                                : out std_logic_vector(3 downto 0);
421
      pci_exp_txn                                : out std_logic_vector(3 downto 0);
422
      pci_exp_rxp                                : in std_logic_vector(3 downto 0);
423
      pci_exp_rxn                                : in std_logic_vector(3 downto 0);
424
 
425
     -------------------------------------------------------------------------------------------------------------------
426
     -- 2. Clocking Interface                                                                                         --
427
     -------------------------------------------------------------------------------------------------------------------
428
      PIPE_PCLK_IN                               : in std_logic;
429
      PIPE_RXUSRCLK_IN                           : in std_logic;
430
      PIPE_RXOUTCLK_IN                           : in std_logic_vector(3 downto 0);
431
      PIPE_DCLK_IN                               : in std_logic;
432
      PIPE_USERCLK1_IN                           : in std_logic;
433
      PIPE_USERCLK2_IN                           : in std_logic;
434
      PIPE_OOBCLK_IN                             : in std_logic;
435
      PIPE_MMCM_LOCK_IN                          : in std_logic;
436
 
437
      PIPE_TXOUTCLK_OUT                          : out std_logic;
438
      PIPE_RXOUTCLK_OUT                          : out std_logic_vector(3 downto 0);
439
      PIPE_PCLK_SEL_OUT                          : out std_logic_vector(3 downto 0);
440
      PIPE_GEN3_OUT                              : out std_logic;
441
 
442
     -------------------------------------------------------------------------------------------------------------------
443
     -- 3. AXI-S Interface                                                                                            --
444
     -------------------------------------------------------------------------------------------------------------------
445
      -- Common
446
      user_clk_out                               : out std_logic;
447
      user_reset_out                             : out std_logic;
448
      user_lnk_up                                : out std_logic;
449
 
450
      -- TX
451
      tx_buf_av                                  : out std_logic_vector(5 downto 0);
452
      tx_cfg_req                                 : out std_logic;
453
      tx_err_drop                                : out std_logic;
454
      s_axis_tx_tready                           : out std_logic;
455
      s_axis_tx_tdata                            : in std_logic_vector((C_DATA_WIDTH - 1) downto 0);
456
      s_axis_tx_tkeep                            : in std_logic_vector((C_DATA_WIDTH / 8 - 1) downto 0);
457
      s_axis_tx_tlast                            : in std_logic;
458
      s_axis_tx_tvalid                           : in std_logic;
459
      s_axis_tx_tuser                            : in std_logic_vector(3 downto 0);
460
      tx_cfg_gnt                                 : in std_logic;
461
 
462
      -- RX
463
      m_axis_rx_tdata                            : out std_logic_vector((C_DATA_WIDTH - 1) downto 0);
464
      m_axis_rx_tkeep                            : out std_logic_vector((C_DATA_WIDTH / 8 - 1) downto 0);
465
      m_axis_rx_tlast                            : out std_logic;
466
      m_axis_rx_tvalid                           : out std_logic;
467
      m_axis_rx_tready                           : in std_logic;
468
      m_axis_rx_tuser                            : out std_logic_vector(21 downto 0);
469
      rx_np_ok                                   : in std_logic;
470
      rx_np_req                                  : in std_logic;
471
 
472
      -- Flow Control
473
      fc_cpld                                    : out std_logic_vector(11 downto 0);
474
      fc_cplh                                    : out std_logic_vector(7 downto 0);
475
      fc_npd                                     : out std_logic_vector(11 downto 0);
476
      fc_nph                                     : out std_logic_vector(7 downto 0);
477
      fc_pd                                      : out std_logic_vector(11 downto 0);
478
      fc_ph                                      : out std_logic_vector(7 downto 0);
479
      fc_sel                                     : in std_logic_vector(2 downto 0);
480
 
481
     -------------------------------------------------------------------------------------------------------------------
482
     -- 4. Configuration (CFG) Interface                                                                              --
483
     -------------------------------------------------------------------------------------------------------------------
484
     ---------------------------------------------------------------------
485
      -- EP and RP                                                      --
486
     ---------------------------------------------------------------------
487
      cfg_mgmt_do                                : out std_logic_vector (31 downto 0);
488
      cfg_mgmt_rd_wr_done                        : out std_logic;
489
 
490
      cfg_status                                 : out std_logic_vector(15 downto 0);
491
      cfg_command                                : out std_logic_vector(15 downto 0);
492
      cfg_dstatus                                : out std_logic_vector(15 downto 0);
493
      cfg_dcommand                               : out std_logic_vector(15 downto 0);
494
      cfg_lstatus                                : out std_logic_vector(15 downto 0);
495
      cfg_lcommand                               : out std_logic_vector(15 downto 0);
496
      cfg_dcommand2                              : out std_logic_vector(15 downto 0);
497
      cfg_pcie_link_state                        : out std_logic_vector(2 downto 0);
498
 
499
      cfg_pmcsr_pme_en                           : out std_logic;
500
      cfg_pmcsr_powerstate                       : out std_logic_vector(1 downto 0);
501
      cfg_pmcsr_pme_status                       : out std_logic;
502
      cfg_received_func_lvl_rst                  : out std_logic;
503
 
504
      -- Management Interface
505
      cfg_mgmt_di                                : in std_logic_vector (31 downto 0);
506
      cfg_mgmt_byte_en                           : in std_logic_vector (3 downto 0);
507
      cfg_mgmt_dwaddr                            : in std_logic_vector (9 downto 0);
508
      cfg_mgmt_wr_en                             : in std_logic;
509
      cfg_mgmt_rd_en                             : in std_logic;
510
      cfg_mgmt_wr_readonly                       : in std_logic;
511
 
512
      -- Error Reporting Interface
513
      cfg_err_ecrc                               : in std_logic;
514
      cfg_err_ur                                 : in std_logic;
515
      cfg_err_cpl_timeout                        : in std_logic;
516
      cfg_err_cpl_unexpect                       : in std_logic;
517
      cfg_err_cpl_abort                          : in std_logic;
518
      cfg_err_posted                             : in std_logic;
519
      cfg_err_cor                                : in std_logic;
520
      cfg_err_atomic_egress_blocked              : in std_logic;
521
      cfg_err_internal_cor                       : in std_logic;
522
      cfg_err_malformed                          : in std_logic;
523
      cfg_err_mc_blocked                         : in std_logic;
524
      cfg_err_poisoned                           : in std_logic;
525
      cfg_err_norecovery                         : in std_logic;
526
      cfg_err_tlp_cpl_header                     : in std_logic_vector(47 downto 0);
527
      cfg_err_cpl_rdy                            : out std_logic;
528
      cfg_err_locked                             : in std_logic;
529
      cfg_err_acs                                : in std_logic;
530
      cfg_err_internal_uncor                     : in std_logic;
531
      cfg_trn_pending                            : in std_logic;
532
      cfg_pm_halt_aspm_l0s                       : in std_logic;
533
      cfg_pm_halt_aspm_l1                        : in std_logic;
534
      cfg_pm_force_state_en                      : in std_logic;
535
      cfg_pm_force_state                         : std_logic_vector(1 downto 0);
536
      cfg_dsn                                    : std_logic_vector(63 downto 0);
537
 
538
     ---------------------------------------------------------------------
539
      -- EP Only                                                        --
540
     ---------------------------------------------------------------------
541
      cfg_interrupt                              : in std_logic;
542
      cfg_interrupt_rdy                          : out std_logic;
543
      cfg_interrupt_assert                       : in std_logic;
544
      cfg_interrupt_di                           : in std_logic_vector(7 downto 0);
545
      cfg_interrupt_do                           : out std_logic_vector(7 downto 0);
546
      cfg_interrupt_mmenable                     : out std_logic_vector(2 downto 0);
547
      cfg_interrupt_msienable                    : out std_logic;
548
      cfg_interrupt_msixenable                   : out std_logic;
549
      cfg_interrupt_msixfm                       : out std_logic;
550
      cfg_interrupt_stat                         : in std_logic;
551
      cfg_pciecap_interrupt_msgnum               : in std_logic_vector(4 downto 0);
552
      cfg_to_turnoff                             : out std_logic;
553
      cfg_turnoff_ok                             : in std_logic;
554
      cfg_bus_number                             : out std_logic_vector(7 downto 0);
555
      cfg_device_number                          : out std_logic_vector(4 downto 0);
556
      cfg_function_number                        : out std_logic_vector(2 downto 0);
557
      cfg_pm_wake                                : in std_logic;
558
 
559
     ---------------------------------------------------------------------
560
      -- RP Only                                                        --
561
     ---------------------------------------------------------------------
562
      cfg_pm_send_pme_to                         : in std_logic;
563
      cfg_ds_bus_number                          : in std_logic_vector(7 downto 0);
564
      cfg_ds_device_number                       : in std_logic_vector(4 downto 0);
565
      cfg_ds_function_number                     : in std_logic_vector(2 downto 0);
566
 
567
      cfg_mgmt_wr_rw1c_as_rw                     : in std_logic;
568
      cfg_msg_received                           : out std_logic;
569
      cfg_msg_data                               : out std_logic_vector(15 downto 0);
570
 
571
      cfg_bridge_serr_en                         : out std_logic;
572
      cfg_slot_control_electromech_il_ctl_pulse  : out std_logic;
573
      cfg_root_control_syserr_corr_err_en        : out std_logic;
574
      cfg_root_control_syserr_non_fatal_err_en   : out std_logic;
575
      cfg_root_control_syserr_fatal_err_en       : out std_logic;
576
      cfg_root_control_pme_int_en                : out std_logic;
577
      cfg_aer_rooterr_corr_err_reporting_en      : out std_logic;
578
      cfg_aer_rooterr_non_fatal_err_reporting_en : out std_logic;
579
      cfg_aer_rooterr_fatal_err_reporting_en     : out std_logic;
580
      cfg_aer_rooterr_corr_err_received          : out std_logic;
581
      cfg_aer_rooterr_non_fatal_err_received     : out std_logic;
582
      cfg_aer_rooterr_fatal_err_received         : out std_logic;
583
 
584
      cfg_msg_received_err_cor                   : out std_logic;
585
      cfg_msg_received_err_non_fatal             : out std_logic;
586
      cfg_msg_received_err_fatal                 : out std_logic;
587
      cfg_msg_received_pm_as_nak                 : out std_logic;
588
      cfg_msg_received_pm_pme                    : out std_logic;
589
      cfg_msg_received_pme_to_ack                : out std_logic;
590
      cfg_msg_received_assert_int_a              : out std_logic;
591
      cfg_msg_received_assert_int_b              : out std_logic;
592
      cfg_msg_received_assert_int_c              : out std_logic;
593
      cfg_msg_received_assert_int_d              : out std_logic;
594
      cfg_msg_received_deassert_int_a            : out std_logic;
595
      cfg_msg_received_deassert_int_b            : out std_logic;
596
      cfg_msg_received_deassert_int_c            : out std_logic;
597
      cfg_msg_received_deassert_int_d            : out std_logic;
598
      cfg_msg_received_setslotpowerlimit         : out std_logic;
599
 
600
     -------------------------------------------------------------------------------------------------------------------
601
     -- 5. Physical Layer Control and Status (PL) Interface                                                           --
602
     -------------------------------------------------------------------------------------------------------------------
603
      pl_directed_link_change                    : in std_logic_vector(1 downto 0);
604
      pl_directed_link_width                     : in std_logic_vector(1 downto 0);
605
      pl_directed_link_speed                     : in std_logic;
606
      pl_directed_link_auton                     : in std_logic;
607
      pl_upstream_prefer_deemph                  : in std_logic;
608
 
609
      pl_sel_lnk_rate                            : out std_logic;
610
      pl_sel_lnk_width                           : out std_logic_vector(1 downto 0);
611
      pl_ltssm_state                             : out std_logic_vector(5 downto 0);
612
      pl_lane_reversal_mode                      : out std_logic_vector(1 downto 0);
613
 
614
      pl_phy_lnk_up                              : out std_logic;
615
      pl_tx_pm_state                             : out std_logic_vector(2 downto 0);
616
      pl_rx_pm_state                             : out std_logic_vector(1 downto 0);
617
 
618
      pl_link_upcfg_cap                          : out std_logic;
619
      pl_link_gen2_cap                           : out std_logic;
620
      pl_link_partner_gen2_supported             : out std_logic;
621
      pl_initial_link_width                      : out std_logic_vector(2 downto 0);
622
 
623
      pl_directed_change_done                    : out std_logic;
624
 
625
     ---------------------------------------------------------------------
626
      -- EP Only                                                        --
627
     ---------------------------------------------------------------------
628
      pl_received_hot_rst                        : out std_logic;
629
     ---------------------------------------------------------------------
630
      -- RP Only                                                        --
631
     ---------------------------------------------------------------------
632
      pl_transmit_hot_rst                        : in std_logic;
633
      pl_downstream_deemph_source                : in std_logic;
634
     -------------------------------------------------------------------------------------------------------------------
635
     -- 6. AER interface                                                                                              --
636
     -------------------------------------------------------------------------------------------------------------------
637
      cfg_err_aer_headerlog                      : in std_logic_vector(127 downto 0);
638
      cfg_aer_interrupt_msgnum                   : in std_logic_vector(4 downto 0);
639
      cfg_err_aer_headerlog_set                  : out std_logic;
640
      cfg_aer_ecrc_check_en                      : out std_logic;
641
      cfg_aer_ecrc_gen_en                        : out std_logic;
642
     -------------------------------------------------------------------------------------------------------------------
643
     -- 7. VC interface                                                                                               --
644
     -------------------------------------------------------------------------------------------------------------------
645
      cfg_vc_tcvc_map                            : out std_logic_vector(6 downto 0);
646
 
647
     -------------------------------------------------------------------------------------------------------------------
648
     -- 8. System(SYS) Interface                                                                                      --
649
     -------------------------------------------------------------------------------------------------------------------
650
      PIPE_MMCM_RST_N                            : in std_logic;   --     // Async      | Async
651
      sys_clk                                    : in std_logic;
652
      sys_rst_n                                  : in std_logic
653
);
654
end cl_a7pcie_x4;
655
 
656
  architecture pcie_7x of cl_a7pcie_x4 is
657
 
658
   attribute CORE_GENERATION_INFO : string;
659
   attribute CORE_GENERATION_INFO of pcie_7x : ARCHITECTURE is
660
     "cl_a7pcie_x4,pcie_7x_v1_9,{LINK_CAP_MAX_LINK_SPEED=2,LINK_CAP_MAX_LINK_WIDTH=04,PCIE_CAP_DEVICE_PORT_TYPE=0000,DEV_CAP_MAX_PAYLOAD_SUPPORTED=1,USER_CLK_FREQ=3,REF_CLK_FREQ=0,MSI_CAP_ON=FALSE,MSI_CAP_MULTIMSGCAP=0,MSI_CAP_MULTIMSG_EXTENSION=0,MSIX_CAP_ON=FALSE,TL_TX_RAM_RADDR_LATENCY=0,TL_TX_RAM_RDATA_LATENCY=2,TL_RX_RAM_RADDR_LATENCY=0,TL_RX_RAM_RDATA_LATENCY=2,TL_RX_RAM_WRITE_LATENCY=0,VC0_TX_LASTPACKET=28,VC0_RX_RAM_LIMIT=3FF,VC0_TOTAL_CREDITS_PH=4,VC0_TOTAL_CREDITS_PD=32,VC0_TOTAL_CREDITS_NPH=4,VC0_TOTAL_CREDITS_NPD=8,VC0_TOTAL_CREDITS_CH=72,VC0_TOTAL_CREDITS_CD=370,VC0_CPL_INFINITE=TRUE,DEV_CAP_PHANTOM_FUNCTIONS_SUPPORT=0,DEV_CAP_EXT_TAG_SUPPORTED=FALSE,LINK_STATUS_SLOT_CLOCK_CONFIG=TRUE,ENABLE_RX_TD_ECRC_TRIM=TRUE,DISABLE_LANE_REVERSAL=TRUE,DISABLE_SCRAMBLING=FALSE,DSN_CAP_ON=TRUE,REVISION_ID=00,VC_CAP_ON=FALSE}";
661
    component cl_a7pcie_x4_pcie_top is
662
      generic (
663
        C_DATA_WIDTH                                   : INTEGER range 32 to 128 := 64;
664
        C_REM_WIDTH                                    : INTEGER range 0 to 128  :=  1;
665
        PIPE_PIPELINE_STAGES                           : INTEGER range 0 to 2 := 0;      -- 0 - 0 stages, 1 - 1 stage, 2 - 2 stages
666
        -- PCIE_2_1 params
667
        AER_BASE_PTR                                   : bit_vector := X"140";
668
        AER_CAP_ECRC_CHECK_CAPABLE                     : string     := "FALSE";
669
        AER_CAP_ECRC_GEN_CAPABLE                       : string     := "FALSE";
670
        AER_CAP_ID                                     : bit_vector := X"0001";
671
        AER_CAP_MULTIHEADER                            : string     := "FALSE";
672
        AER_CAP_NEXTPTR                                : bit_vector := X"178";
673
        AER_CAP_ON                                     : string     := "FALSE";
674
        AER_CAP_OPTIONAL_ERR_SUPPORT                   : bit_vector := X"000000";
675
        AER_CAP_PERMIT_ROOTERR_UPDATE                  : string     := "TRUE";
676
        AER_CAP_VERSION                                : bit_vector := X"2";
677
        ALLOW_X8_GEN2                                  : string     := "FALSE";
678
        BAR0                                           : bit_vector := X"FFFFFF00";
679
        BAR1                                           : bit_vector := X"FFFF0000";
680
        BAR2                                           : bit_vector := X"FFFF000C";
681
        BAR3                                           : bit_vector := X"FFFFFFFF";
682
        BAR4                                           : bit_vector := X"00000000";
683
        BAR5                                           : bit_vector := X"00000000";
684
        CAPABILITIES_PTR                               : bit_vector := X"40";
685
        CARDBUS_CIS_POINTER                            : bit_vector := X"00000000";
686
        CFG_ECRC_ERR_CPLSTAT                           : integer    := 0;
687
        CLASS_CODE                                     : bit_vector := X"000000";
688
        CMD_INTX_IMPLEMENTED                           : string     := "TRUE";
689
        CPL_TIMEOUT_DISABLE_SUPPORTED                  : string     := "FALSE";
690
        CPL_TIMEOUT_RANGES_SUPPORTED                   : bit_vector := X"0";
691
        CRM_MODULE_RSTS                                : bit_vector := X"00";
692
        DEV_CAP2_ARI_FORWARDING_SUPPORTED              : string     := "FALSE";
693
        DEV_CAP2_ATOMICOP32_COMPLETER_SUPPORTED        : string     := "FALSE";
694
        DEV_CAP2_ATOMICOP64_COMPLETER_SUPPORTED        : string     := "FALSE";
695
        DEV_CAP2_ATOMICOP_ROUTING_SUPPORTED            : string     := "FALSE";
696
        DEV_CAP2_CAS128_COMPLETER_SUPPORTED            : string     := "FALSE";
697
        DEV_CAP2_ENDEND_TLP_PREFIX_SUPPORTED           : string     := "FALSE";
698
        DEV_CAP2_EXTENDED_FMT_FIELD_SUPPORTED          : string     := "FALSE";
699
        DEV_CAP2_LTR_MECHANISM_SUPPORTED               : string     := "FALSE";
700
        DEV_CAP2_MAX_ENDEND_TLP_PREFIXES               : bit_vector := X"0";
701
        DEV_CAP2_NO_RO_ENABLED_PRPR_PASSING            : string     := "FALSE";
702
        DEV_CAP2_TPH_COMPLETER_SUPPORTED               : bit_vector := X"0";
703
        DEV_CAP_ENABLE_SLOT_PWR_LIMIT_SCALE            : string     := "TRUE";
704
        DEV_CAP_ENABLE_SLOT_PWR_LIMIT_VALUE            : string     := "TRUE";
705
        DEV_CAP_ENDPOINT_L0S_LATENCY                   : integer    := 0;
706
        DEV_CAP_ENDPOINT_L1_LATENCY                    : integer    := 0;
707
        DEV_CAP_EXT_TAG_SUPPORTED                      : string     := "TRUE";
708
        DEV_CAP_FUNCTION_LEVEL_RESET_CAPABLE           : string     := "FALSE";
709
        DEV_CAP_MAX_PAYLOAD_SUPPORTED                  : integer    := 2;
710
        DEV_CAP_PHANTOM_FUNCTIONS_SUPPORT              : integer    := 0;
711
        DEV_CAP_ROLE_BASED_ERROR                       : string     := "TRUE";
712
        DEV_CAP_RSVD_14_12                             : integer    := 0;
713
        DEV_CAP_RSVD_17_16                             : integer    := 0;
714
        DEV_CAP_RSVD_31_29                             : integer    := 0;
715
        DEV_CONTROL_AUX_POWER_SUPPORTED                : string     := "FALSE";
716
        DEV_CONTROL_EXT_TAG_DEFAULT                    : string     := "FALSE";
717
        DISABLE_ASPM_L1_TIMER                          : string     := "FALSE";
718
        DISABLE_BAR_FILTERING                          : string     := "FALSE";
719
        DISABLE_ERR_MSG                                : string     := "FALSE";
720
        DISABLE_ID_CHECK                               : string     := "FALSE";
721
        DISABLE_LANE_REVERSAL                          : string     := "FALSE";
722
        DISABLE_LOCKED_FILTER                          : string     := "FALSE";
723
        DISABLE_PPM_FILTER                             : string     := "FALSE";
724
        DISABLE_RX_POISONED_RESP                       : string     := "FALSE";
725
        DISABLE_RX_TC_FILTER                           : string     := "FALSE";
726
        DISABLE_SCRAMBLING                             : string     := "FALSE";
727
        DNSTREAM_LINK_NUM                              : bit_vector := X"00";
728
        DSN_BASE_PTR                                   : bit_vector := X"100";
729
        DSN_CAP_ID                                     : bit_vector := X"0003";
730
        DSN_CAP_NEXTPTR                                : bit_vector := X"10C";
731
        DSN_CAP_ON                                     : string     := "TRUE";
732
        DSN_CAP_VERSION                                : bit_vector := X"1";
733
        ENABLE_MSG_ROUTE                               : bit_vector := X"000";
734
        ENABLE_RX_TD_ECRC_TRIM                         : string     := "FALSE";
735
        ENDEND_TLP_PREFIX_FORWARDING_SUPPORTED         : string     := "FALSE";
736
        ENTER_RVRY_EI_L0                               : string     := "TRUE";
737
        EXIT_LOOPBACK_ON_EI                            : string     := "TRUE";
738
        EXPANSION_ROM                                  : bit_vector := X"FFFFF001";
739
        EXT_CFG_CAP_PTR                                : bit_vector := X"3F";
740
        EXT_CFG_XP_CAP_PTR                             : bit_vector := X"3FF";
741
        HEADER_TYPE                                    : bit_vector := X"00";
742
        INFER_EI                                       : bit_vector := X"00";
743
        INTERRUPT_PIN                                  : bit_vector := X"01";
744
        INTERRUPT_STAT_AUTO                            : string     := "TRUE";
745
        IS_SWITCH                                      : string     := "FALSE";
746
        LAST_CONFIG_DWORD                              : bit_vector := X"3FF";
747
        LINK_CAP_ASPM_OPTIONALITY                      : string     := "TRUE";
748
        LINK_CAP_ASPM_SUPPORT                          : integer    := 1;
749
        LINK_CAP_CLOCK_POWER_MANAGEMENT                : string     := "FALSE";
750
        LINK_CAP_DLL_LINK_ACTIVE_REPORTING_CAP         : string     := "FALSE";
751
        LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN1          : integer    := 7;
752
        LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN2          : integer    := 7;
753
        LINK_CAP_L0S_EXIT_LATENCY_GEN1                 : integer    := 7;
754
        LINK_CAP_L0S_EXIT_LATENCY_GEN2                 : integer    := 7;
755
        LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN1           : integer    := 7;
756
        LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN2           : integer    := 7;
757
        LINK_CAP_L1_EXIT_LATENCY_GEN1                  : integer    := 7;
758
        LINK_CAP_L1_EXIT_LATENCY_GEN2                  : integer    := 7;
759
        LINK_CAP_LINK_BANDWIDTH_NOTIFICATION_CAP       : string     := "FALSE";
760
        LINK_CAP_MAX_LINK_SPEED                        : bit_vector := X"1";
761
        LINK_CAP_MAX_LINK_SPEED_int                    : integer    := 1;
762
        LINK_CAP_MAX_LINK_WIDTH                        : bit_vector := X"08";
763
        LINK_CAP_MAX_LINK_WIDTH_int                    : integer    := 8;
764
        LINK_CAP_RSVD_23                               : integer    := 0;
765
        LINK_CAP_SURPRISE_DOWN_ERROR_CAPABLE           : string     := "FALSE";
766
        LINK_CONTROL_RCB                               : integer    := 0;
767
        LINK_CTRL2_DEEMPHASIS                          : string     := "FALSE";
768
        LINK_CTRL2_HW_AUTONOMOUS_SPEED_DISABLE         : string     := "FALSE";
769
        LINK_CTRL2_TARGET_LINK_SPEED                   : bit_vector := X"2";
770
        LINK_STATUS_SLOT_CLOCK_CONFIG                  : string     := "TRUE";
771
        LL_ACK_TIMEOUT                                 : bit_vector := X"0000";
772
        LL_ACK_TIMEOUT_EN                              : string     := "FALSE";
773
        LL_ACK_TIMEOUT_FUNC                            : integer    := 0;
774
        LL_REPLAY_TIMEOUT                              : bit_vector := X"0000";
775
        LL_REPLAY_TIMEOUT_EN                           : string     := "FALSE";
776
        LL_REPLAY_TIMEOUT_FUNC                         : integer    := 0;
777
        LTSSM_MAX_LINK_WIDTH                           : bit_vector := X"01";
778
        MPS_FORCE                                      : string     := "FALSE";
779
        MSIX_BASE_PTR                                  : bit_vector := X"9C";
780
        MSIX_CAP_ID                                    : bit_vector := X"11";
781
        MSIX_CAP_NEXTPTR                               : bit_vector := X"00";
782
        MSIX_CAP_ON                                    : string     := "FALSE";
783
        MSIX_CAP_PBA_BIR                               : integer    := 0;
784
        MSIX_CAP_PBA_OFFSET                            : bit_vector := X"00000050";
785
        MSIX_CAP_TABLE_BIR                             : integer    := 0;
786
        MSIX_CAP_TABLE_OFFSET                          : bit_vector := X"00000040";
787
        MSIX_CAP_TABLE_SIZE                            : bit_vector := X"000";
788
        MSI_BASE_PTR                                   : bit_vector := X"48";
789
        MSI_CAP_64_BIT_ADDR_CAPABLE                    : string     := "TRUE";
790
        MSI_CAP_ID                                     : bit_vector := X"05";
791
        MSI_CAP_MULTIMSGCAP                            : integer    := 0;
792
        MSI_CAP_MULTIMSG_EXTENSION                     : integer    := 0;
793
        MSI_CAP_NEXTPTR                                : bit_vector := X"60";
794
        MSI_CAP_ON                                     : string     := "FALSE";
795
        MSI_CAP_PER_VECTOR_MASKING_CAPABLE             : string     := "TRUE";
796
        N_FTS_COMCLK_GEN1                              : integer    := 255;
797
        N_FTS_COMCLK_GEN2                              : integer    := 255;
798
        N_FTS_GEN1                                     : integer    := 255;
799
        N_FTS_GEN2                                     : integer    := 255;
800
        PCIE_BASE_PTR                                  : bit_vector := X"60";
801
        PCIE_CAP_CAPABILITY_ID                         : bit_vector := X"10";
802
        PCIE_CAP_CAPABILITY_VERSION                    : bit_vector := X"2";
803
        PCIE_CAP_DEVICE_PORT_TYPE                      : bit_vector := X"0";
804
        PCIE_CAP_NEXTPTR                               : bit_vector := X"9C";
805
        PCIE_CAP_ON                                    : string     := "TRUE";
806
        PCIE_CAP_RSVD_15_14                            : integer    := 0;
807
        PCIE_CAP_SLOT_IMPLEMENTED                      : string     := "FALSE";
808
        PCIE_REVISION                                  : integer    := 2;
809
        PL_AUTO_CONFIG                                 : integer    := 0;
810
        PL_FAST_TRAIN                                  : string     := "FALSE";
811
        PM_ASPML0S_TIMEOUT                             : bit_vector := X"0000";
812
        PM_ASPML0S_TIMEOUT_EN                          : string     := "FALSE";
813
        PM_ASPML0S_TIMEOUT_FUNC                        : integer    := 0;
814
        PM_ASPM_FASTEXIT                               : string     := "FALSE";
815
        PM_BASE_PTR                                    : bit_vector := X"40";
816
        PM_CAP_AUXCURRENT                              : integer    := 0;
817
        PM_CAP_D1SUPPORT                               : string     := "TRUE";
818
        PM_CAP_D2SUPPORT                               : string     := "TRUE";
819
        PM_CAP_DSI                                     : string     := "FALSE";
820
        PM_CAP_ID                                      : bit_vector := X"01";
821
        PM_CAP_NEXTPTR                                 : bit_vector := X"48";
822
        PM_CAP_ON                                      : string     := "TRUE";
823
        PM_CAP_PMESUPPORT                              : bit_vector := X"0F";
824
        PM_CAP_PME_CLOCK                               : string     := "FALSE";
825
        PM_CAP_RSVD_04                                 : integer    := 0;
826
        PM_CAP_VERSION                                 : integer    := 3;
827
        PM_CSR_B2B3                                    : string     := "FALSE";
828
        PM_CSR_BPCCEN                                  : string     := "FALSE";
829
        PM_CSR_NOSOFTRST                               : string     := "TRUE";
830
        PM_DATA0                                       : bit_vector := X"01";
831
        PM_DATA1                                       : bit_vector := X"01";
832
        PM_DATA2                                       : bit_vector := X"01";
833
        PM_DATA3                                       : bit_vector := X"01";
834
        PM_DATA4                                       : bit_vector := X"01";
835
        PM_DATA5                                       : bit_vector := X"01";
836
        PM_DATA6                                       : bit_vector := X"01";
837
        PM_DATA7                                       : bit_vector := X"01";
838
        PM_DATA_SCALE0                                 : bit_vector := X"1";
839
        PM_DATA_SCALE1                                 : bit_vector := X"1";
840
        PM_DATA_SCALE2                                 : bit_vector := X"1";
841
        PM_DATA_SCALE3                                 : bit_vector := X"1";
842
        PM_DATA_SCALE4                                 : bit_vector := X"1";
843
        PM_DATA_SCALE5                                 : bit_vector := X"1";
844
        PM_DATA_SCALE6                                 : bit_vector := X"1";
845
        PM_DATA_SCALE7                                 : bit_vector := X"1";
846
        PM_MF                                          : string     := "FALSE";
847
        RBAR_BASE_PTR                                  : bit_vector := X"178";
848
        RBAR_CAP_CONTROL_ENCODEDBAR0                   : bit_vector := X"00";
849
        RBAR_CAP_CONTROL_ENCODEDBAR1                   : bit_vector := X"00";
850
        RBAR_CAP_CONTROL_ENCODEDBAR2                   : bit_vector := X"00";
851
        RBAR_CAP_CONTROL_ENCODEDBAR3                   : bit_vector := X"00";
852
        RBAR_CAP_CONTROL_ENCODEDBAR4                   : bit_vector := X"00";
853
        RBAR_CAP_CONTROL_ENCODEDBAR5                   : bit_vector := X"00";
854
        RBAR_CAP_ID                                    : bit_vector := X"0015";
855
        RBAR_CAP_INDEX0                                : bit_vector := X"0";
856
        RBAR_CAP_INDEX1                                : bit_vector := X"0";
857
        RBAR_CAP_INDEX2                                : bit_vector := X"0";
858
        RBAR_CAP_INDEX3                                : bit_vector := X"0";
859
        RBAR_CAP_INDEX4                                : bit_vector := X"0";
860
        RBAR_CAP_INDEX5                                : bit_vector := X"0";
861
        RBAR_CAP_NEXTPTR                               : bit_vector := X"000";
862
        RBAR_CAP_ON                                    : string     := "FALSE";
863
        RBAR_CAP_SUP0                                  : bit_vector := X"00000000";
864
        RBAR_CAP_SUP1                                  : bit_vector := X"00000000";
865
        RBAR_CAP_SUP2                                  : bit_vector := X"00000000";
866
        RBAR_CAP_SUP3                                  : bit_vector := X"00000000";
867
        RBAR_CAP_SUP4                                  : bit_vector := X"00000000";
868
        RBAR_CAP_SUP5                                  : bit_vector := X"00000000";
869
        RBAR_CAP_VERSION                               : bit_vector := X"1";
870
        RBAR_NUM                                       : bit_vector := X"1";
871
        RECRC_CHK                                      : integer    := 0;
872
        RECRC_CHK_TRIM                                 : string     := "FALSE";
873
        ROOT_CAP_CRS_SW_VISIBILITY                     : string     := "FALSE";
874
        RP_AUTO_SPD                                    : bit_vector := X"1";
875
        RP_AUTO_SPD_LOOPCNT                            : bit_vector := X"1F";
876
        SELECT_DLL_IF                                  : string     := "FALSE";
877
        SIM_VERSION                                    : string     := "1.0";
878
        SLOT_CAP_ATT_BUTTON_PRESENT                    : string     := "FALSE";
879
        SLOT_CAP_ATT_INDICATOR_PRESENT                 : string     := "FALSE";
880
        SLOT_CAP_ELEC_INTERLOCK_PRESENT                : string     := "FALSE";
881
        SLOT_CAP_HOTPLUG_CAPABLE                       : string     := "FALSE";
882
        SLOT_CAP_HOTPLUG_SURPRISE                      : string     := "FALSE";
883
        SLOT_CAP_MRL_SENSOR_PRESENT                    : string     := "FALSE";
884
        SLOT_CAP_NO_CMD_COMPLETED_SUPPORT              : string     := "FALSE";
885
        SLOT_CAP_PHYSICAL_SLOT_NUM                     : bit_vector := X"0000";
886
        SLOT_CAP_POWER_CONTROLLER_PRESENT              : string     := "FALSE";
887
        SLOT_CAP_POWER_INDICATOR_PRESENT               : string     := "FALSE";
888
        SLOT_CAP_SLOT_POWER_LIMIT_SCALE                : integer    := 0;
889
        SLOT_CAP_SLOT_POWER_LIMIT_VALUE                : bit_vector := X"00";
890
        SPARE_BIT0                                     : integer    := 0;
891
        SPARE_BIT1                                     : integer    := 0;
892
        SPARE_BIT2                                     : integer    := 0;
893
        SPARE_BIT3                                     : integer    := 0;
894
        SPARE_BIT4                                     : integer    := 0;
895
        SPARE_BIT5                                     : integer    := 0;
896
        SPARE_BIT6                                     : integer    := 0;
897
        SPARE_BIT7                                     : integer    := 0;
898
        SPARE_BIT8                                     : integer    := 0;
899
        SPARE_BYTE0                                    : bit_vector := X"00";
900
        SPARE_BYTE1                                    : bit_vector := X"00";
901
        SPARE_BYTE2                                    : bit_vector := X"00";
902
        SPARE_BYTE3                                    : bit_vector := X"00";
903
        SPARE_WORD0                                    : bit_vector := X"00000000";
904
        SPARE_WORD1                                    : bit_vector := X"00000000";
905
        SPARE_WORD2                                    : bit_vector := X"00000000";
906
        SPARE_WORD3                                    : bit_vector := X"00000000";
907
        SSL_MESSAGE_AUTO                               : string     := "FALSE";
908
        TECRC_EP_INV                                   : string     := "FALSE";
909
        TL_RBYPASS                                     : string     := "FALSE";
910
        TL_RX_RAM_RADDR_LATENCY                        : integer    := 0;
911
        TL_RX_RAM_RDATA_LATENCY                        : integer    := 2;
912
        TL_RX_RAM_WRITE_LATENCY                        : integer    := 0;
913
        TL_TFC_DISABLE                                 : string     := "FALSE";
914
        TL_TX_CHECKS_DISABLE                           : string     := "FALSE";
915
        TL_TX_RAM_RADDR_LATENCY                        : integer    := 0;
916
        TL_TX_RAM_RDATA_LATENCY                        : integer    := 2;
917
        TL_TX_RAM_WRITE_LATENCY                        : integer    := 0;
918
        TRN_DW                                         : string     := "FALSE";
919
        TRN_NP_FC                                      : string     := "FALSE";
920
        UPCONFIG_CAPABLE                               : string     := "TRUE";
921
        UPSTREAM_FACING                                : string     := "TRUE";
922
        UR_ATOMIC                                      : string     := "TRUE";
923
        UR_CFG1                                        : string     := "TRUE";
924
        UR_INV_REQ                                     : string     := "TRUE";
925
        UR_PRS_RESPONSE                                : string     := "TRUE";
926
        USER_CLK2_DIV2                                 : string     := "FALSE";
927
        USER_CLK_FREQ                                  : integer    := 3;
928
        USE_RID_PINS                                   : string     := "FALSE";
929
        VC0_CPL_INFINITE                               : string     := "TRUE";
930
        VC0_RX_RAM_LIMIT                               : bit_vector := X"03FF";
931
        VC0_TOTAL_CREDITS_CD                           : integer    := 127;
932
        VC0_TOTAL_CREDITS_CH                           : integer    := 31;
933
        VC0_TOTAL_CREDITS_NPD                          : integer    := 24;
934
        VC0_TOTAL_CREDITS_NPH                          : integer    := 12;
935
        VC0_TOTAL_CREDITS_PD                           : integer    := 288;
936
        VC0_TOTAL_CREDITS_PH                           : integer    := 32;
937
        VC0_TX_LASTPACKET                              : integer    := 31;
938
        VC_BASE_PTR                                    : bit_vector := X"10C";
939
        VC_CAP_ID                                      : bit_vector := X"0002";
940
        VC_CAP_NEXTPTR                                 : bit_vector := X"000";
941
        VC_CAP_ON                                      : string     := "FALSE";
942
        VC_CAP_REJECT_SNOOP_TRANSACTIONS               : string     := "FALSE";
943
        VC_CAP_VERSION                                 : bit_vector := X"1";
944
        VSEC_BASE_PTR                                  : bit_vector := X"128";
945
        VSEC_CAP_HDR_ID                                : bit_vector := X"1234";
946
        VSEC_CAP_HDR_LENGTH                            : bit_vector := X"018";
947
        VSEC_CAP_HDR_REVISION                          : bit_vector := X"1";
948
        VSEC_CAP_ID                                    : bit_vector := X"000B";
949
        VSEC_CAP_IS_LINK_VISIBLE                       : string     := "TRUE";
950
        VSEC_CAP_NEXTPTR                               : bit_vector := X"140";
951
        VSEC_CAP_ON                                    : string     := "FALSE";
952
        VSEC_CAP_VERSION                               : bit_vector := X"1"
953
      );
954
      port (
955
        -- Common
956
        user_clk_out                                   : out std_logic;
957
        user_reset                                     : in std_logic;
958
        user_lnk_up                                    : in std_logic;
959
 
960
        trn_lnk_up                                     : out std_logic;
961
        user_rst_n                                     : out std_logic;
962
 
963
        -- Tx
964
        tx_buf_av                                      : out std_logic_vector(5 downto 0);
965
        tx_cfg_req                                     : out std_logic;
966
        tx_err_drop                                    : out std_logic;
967
        s_axis_tx_tready                               : out std_logic;
968
        s_axis_tx_tdata                                : in std_logic_vector((C_DATA_WIDTH - 1) downto 0);
969
        s_axis_tx_tkeep                                : in std_logic_vector((C_DATA_WIDTH / 8 - 1) downto 0);
970
        s_axis_tx_tlast                                : in std_logic;
971
        s_axis_tx_tvalid                               : in std_logic;
972
        s_axis_tx_tuser                                : in std_logic_vector(3 downto 0);
973
        tx_cfg_gnt                                     : in std_logic;
974
 
975
        -- Rx
976
        m_axis_rx_tdata                                : out std_logic_vector((C_DATA_WIDTH - 1) downto 0);
977
        m_axis_rx_tkeep                                : out std_logic_vector((C_DATA_WIDTH / 8 - 1) downto 0);
978
        m_axis_rx_tlast                                : out std_logic;
979
        m_axis_rx_tvalid                               : out std_logic;
980
        m_axis_rx_tready                               : in std_logic;
981
        m_axis_rx_tuser                                : out std_logic_vector(21 downto 0);
982
        rx_np_ok                                       : in std_logic;
983
        rx_np_req                                      : in std_logic;
984
 
985
        -- Flow Control
986
        fc_cpld                                        : out std_logic_vector(11 downto 0);
987
        fc_cplh                                        : out std_logic_vector(7 downto 0);
988
        fc_npd                                         : out std_logic_vector(11 downto 0);
989
        fc_nph                                         : out std_logic_vector(7 downto 0);
990
        fc_pd                                          : out std_logic_vector(11 downto 0);
991
        fc_ph                                          : out std_logic_vector(7 downto 0);
992
        fc_sel                                         : in std_logic_vector(2 downto 0);
993
 
994
        pl_directed_link_change                        : in std_logic_vector(1 downto 0);
995
        pl_directed_link_width                         : in std_logic_vector(1 downto 0);
996
        pl_directed_link_speed                         : in std_logic;
997
        pl_directed_link_auton                         : in std_logic;
998
        pl_upstream_prefer_deemph                      : in std_logic;
999
        pl_downstream_deemph_source                    : in std_logic;
1000
        pl_directed_ltssm_new_vld                      : in std_logic;
1001
        pl_directed_ltssm_new                          : in std_logic_vector (5 downto 0);
1002
        pl_directed_ltssm_stall                        : in std_logic;
1003
 
1004
        cm_rst_n                                       : in std_logic;
1005
        func_lvl_rst_n                                 : in std_logic;
1006
        pl_transmit_hot_rst                            : in std_logic;
1007
        cfg_mgmt_di                                    : in std_logic_vector(31 downto 0);
1008
        cfg_mgmt_byte_en_n                             : in std_logic_vector(3 downto 0);
1009
        cfg_mgmt_dwaddr                                : in std_logic_vector(9 downto 0);
1010
        cfg_mgmt_wr_rw1c_as_rw_n                       : in std_logic;
1011
        cfg_mgmt_wr_readonly_n                         : in std_logic;
1012
        cfg_mgmt_wr_en_n                               : in std_logic;
1013
        cfg_mgmt_rd_en_n                               : in std_logic;
1014
        cfg_err_malformed_n                            : in std_logic;
1015
        cfg_err_cor_n                                  : in std_logic;
1016
        cfg_err_ur_n                                   : in std_logic;
1017
        cfg_err_ecrc_n                                 : in std_logic;
1018
        cfg_err_cpl_timeout_n                          : in std_logic;
1019
        cfg_err_cpl_abort_n                            : in std_logic;
1020
        cfg_err_cpl_unexpect_n                         : in std_logic;
1021
        cfg_err_poisoned_n                             : in std_logic;
1022
        cfg_err_acs_n                                  : in std_logic;
1023
        cfg_err_atomic_egress_blocked_n                : in std_logic;
1024
        cfg_err_mc_blocked_n                           : in std_logic;
1025
        cfg_err_internal_uncor_n                       : in std_logic;
1026
        cfg_err_internal_cor_n                         : in std_logic;
1027
        cfg_err_posted_n                               : in std_logic;
1028
        cfg_err_locked_n                               : in std_logic;
1029
        cfg_err_norecovery_n                           : in std_logic;
1030
        cfg_err_aer_headerlog                          : in std_logic_vector(127 downto 0);
1031
        cfg_err_tlp_cpl_header                         : in std_logic_vector(47 downto 0);
1032
        cfg_interrupt_n                                : in std_logic;
1033
        cfg_interrupt_di                               : in std_logic_vector(7 downto 0);
1034
        cfg_interrupt_assert_n                         : in std_logic;
1035
        cfg_interrupt_stat_n                           : in std_logic;
1036
        cfg_ds_bus_number                              : in std_logic_vector(7 downto 0);
1037
        cfg_ds_device_number                           : in std_logic_vector(4 downto 0);
1038
        cfg_ds_function_number                         : in std_logic_vector( 2 downto 0);
1039
        cfg_port_number                                : in std_logic_vector(7 downto 0);
1040
        cfg_pm_halt_aspm_l0s_n                         : in std_logic;
1041
        cfg_pm_halt_aspm_l1_n                          : in std_logic;
1042
        cfg_pm_force_state_en_n                        : in std_logic;
1043
        cfg_pm_force_state                             : in std_logic_vector(1 downto 0);
1044
        cfg_pm_wake_n                                  : in std_logic;
1045
        cfg_turnoff_ok                                 : in std_logic;
1046
        cfg_pm_send_pme_to_n                           : in std_logic;
1047
        cfg_pciecap_interrupt_msgnum                   : in std_logic_vector(4 downto 0);
1048
        cfg_trn_pending                                : in std_logic;
1049
        cfg_force_mps                                  : in std_logic_vector( 2 downto 0);
1050
        cfg_force_common_clock_off                     : in std_logic;
1051
        cfg_force_extended_sync_on                     : in std_logic;
1052
        cfg_dsn                                        : in std_logic_vector(63 downto 0);
1053
        cfg_aer_interrupt_msgnum                       : in std_logic_vector(4 downto 0);
1054
 
1055
        drp_clk                                        : in std_logic;
1056
        drp_en                                         : in std_logic;
1057
        drp_we                                         : in std_logic;
1058
        drp_addr                                       : in std_logic_vector(8 downto 0);
1059
        drp_di                                         : in std_logic_vector(15 downto 0);
1060
        drp_rdy                                        : out std_logic;
1061
        drp_do                                         : out std_logic_vector(15 downto 0);
1062
 
1063
        dbg_mode                                       : in std_logic_vector(1 downto 0);
1064
        dbg_sub_mode                                   : in std_logic;
1065
        pl_dbg_mode                                    : in std_logic_vector(2 downto 0);
1066
 
1067
        pl_sel_lnk_rate                                : out std_logic;
1068
        pl_sel_lnk_width                               : out std_logic_vector(1 downto 0);
1069
        pl_ltssm_state                                 : out std_logic_vector(5 downto 0);
1070
        pl_lane_reversal_mode                          : out std_logic_vector(1 downto 0);
1071
        pl_phy_lnk_up                                  : out std_logic;
1072
        pl_tx_pm_state                                 : out std_logic_vector(2 downto 0);
1073
        pl_rx_pm_state                                 : out std_logic_vector(1 downto 0);
1074
        pl_link_upcfg_cap                              : out std_logic;
1075
        pl_link_gen2_cap                               : out std_logic;
1076
        pl_link_partner_gen2_supported                 : out std_logic;
1077
        pl_initial_link_width                          : out std_logic_vector(2 downto 0);
1078
        pl_directed_change_done                        : out std_logic;
1079
        pl_received_hot_rst                            : out std_logic;
1080
        lnk_clk_en                                     : out std_logic;
1081
        cfg_mgmt_do                                    : out std_logic_vector(31 downto 0);
1082
        cfg_mgmt_rd_wr_done                            : out std_logic;
1083
        cfg_err_aer_headerlog_set                      : out std_logic;
1084
        cfg_err_cpl_rdy                                : out std_logic;
1085
        cfg_interrupt_rdy                              : out std_logic;
1086
        cfg_interrupt_mmenable                         : out std_logic_vector(2 downto 0);
1087
        cfg_interrupt_msienable                        : out std_logic;
1088
        cfg_interrupt_do                               : out std_logic_vector(7 downto 0);
1089
        cfg_interrupt_msixenable                       : out std_logic;
1090
        cfg_interrupt_msixfm                           : out std_logic;
1091
        cfg_bus_number                                 : out std_logic_vector(7 downto 0);
1092
        cfg_device_number                              : out std_logic_vector(4 downto 0);
1093
        cfg_function_number                            : out std_logic_vector(2 downto 0);
1094
        cfg_status                                     : out std_logic_vector(15 downto 0);
1095
        cfg_command                                    : out std_logic_vector(15 downto 0);
1096
        cfg_dstatus                                    : out std_logic_vector(15 downto 0);
1097
        cfg_dcommand                                   : out std_logic_vector(15 downto 0);
1098
        cfg_lstatus                                    : out std_logic_vector(15 downto 0);
1099
        cfg_lcommand                                   : out std_logic_vector(15 downto 0);
1100
        cfg_dcommand2                                  : out std_logic_vector(15 downto 0);
1101
        cfg_received_func_lvl_rst                      : out std_logic;
1102
        cfg_msg_received                               : out std_logic;
1103
        cfg_msg_data                                   : out std_logic_vector(15 downto 0);
1104
        cfg_msg_received_err_cor                       : out std_logic;
1105
        cfg_msg_received_err_non_fatal                 : out std_logic;
1106
        cfg_msg_received_err_fatal                     : out std_logic;
1107
        cfg_msg_received_assert_int_a                  : out std_logic;
1108
        cfg_msg_received_deassert_int_a                : out std_logic;
1109
        cfg_msg_received_assert_int_b                  : out std_logic;
1110
        cfg_msg_received_deassert_int_b                : out std_logic;
1111
        cfg_msg_received_assert_int_c                  : out std_logic;
1112
        cfg_msg_received_deassert_int_c                : out std_logic;
1113
        cfg_msg_received_assert_int_d                  : out std_logic;
1114
        cfg_msg_received_deassert_int_d                : out std_logic;
1115
        cfg_msg_received_pm_pme                        : out std_logic;
1116
        cfg_msg_received_pme_to_ack                    : out std_logic;
1117
        cfg_msg_received_pme_to                        : out std_logic;
1118
        cfg_msg_received_setslotpowerlimit             : out std_logic;
1119
        cfg_msg_received_unlock                        : out std_logic;
1120
        cfg_msg_received_pm_as_nak                     : out std_logic;
1121
        cfg_to_turnoff                                 : out std_logic;
1122
        cfg_pcie_link_state                            : out std_logic_vector(2 downto 0);
1123
        cfg_pm_rcv_as_req_l1_n                         : out std_logic;
1124
        cfg_pm_rcv_enter_l1_n                          : out std_logic;
1125
        cfg_pm_rcv_enter_l23_n                         : out std_logic;
1126
        cfg_pm_rcv_req_ack_n                           : out std_logic;
1127
        cfg_pmcsr_powerstate                           : out std_logic_vector(1 downto 0);
1128
        cfg_pmcsr_pme_en                               : out std_logic;
1129
        cfg_pmcsr_pme_status                           : out std_logic;
1130
        cfg_transaction                                : out std_logic;
1131
        cfg_transaction_type                           : out std_logic;
1132
        cfg_transaction_addr                           : out std_logic_vector(6 downto 0);
1133
        cfg_command_io_enable                          : out std_logic;
1134
        cfg_command_mem_enable                         : out std_logic;
1135
        cfg_command_bus_master_enable                  : out std_logic;
1136
        cfg_command_interrupt_disable                  : out std_logic;
1137
        cfg_command_serr_en                            : out std_logic;
1138
        cfg_bridge_serr_en                             : out std_logic;
1139
        cfg_dev_status_corr_err_detected               : out std_logic;
1140
        cfg_dev_status_non_fatal_err_detected          : out std_logic;
1141
        cfg_dev_status_fatal_err_detected              : out std_logic;
1142
        cfg_dev_status_ur_detected                     : out std_logic;
1143
        cfg_dev_control_corr_err_reporting_en          : out std_logic;
1144
        cfg_dev_control_non_fatal_reporting_en         : out std_logic;
1145
        cfg_dev_control_fatal_err_reporting_en         : out std_logic;
1146
        cfg_dev_control_ur_err_reporting_en            : out std_logic;
1147
        cfg_dev_control_enable_ro                      : out std_logic;
1148
        cfg_dev_control_max_payload                    : out std_logic_vector(2 downto 0);
1149
        cfg_dev_control_ext_tag_en                     : out std_logic;
1150
        cfg_dev_control_phantom_en                     : out std_logic;
1151
        cfg_dev_control_aux_power_en                   : out std_logic;
1152
        cfg_dev_control_no_snoop_en                    : out std_logic;
1153
        cfg_dev_control_max_read_req                   : out std_logic_vector(2 downto 0);
1154
        cfg_dev_id                                     : in std_logic_vector(15 downto 0);
1155
        cfg_vend_id                                    : in std_logic_vector(15 downto 0);
1156
        cfg_rev_id                                     : in std_logic_vector(7 downto 0);
1157
        cfg_subsys_id                                  : in std_logic_vector(15 downto 0);
1158
        cfg_subsys_vend_id                             : in std_logic_vector(15 downto 0);
1159
        cfg_link_status_current_speed                  : out std_logic_vector(1 downto 0);
1160
        cfg_link_status_negotiated_width               : out std_logic_vector(3 downto 0);
1161
        cfg_link_status_link_training                  : out std_logic;
1162
        cfg_link_status_dll_active                     : out std_logic;
1163
        cfg_link_status_bandwidth_status               : out std_logic;
1164
        cfg_link_status_auto_bandwidth_status          : out std_logic;
1165
        cfg_link_control_aspm_control                  : out std_logic_vector(1 downto 0);
1166
        cfg_link_control_rcb                           : out std_logic;
1167
        cfg_link_control_link_disable                  : out std_logic;
1168
        cfg_link_control_retrain_link                  : out std_logic;
1169
        cfg_link_control_common_clock                  : out std_logic;
1170
        cfg_link_control_extended_sync                 : out std_logic;
1171
        cfg_link_control_clock_pm_en                   : out std_logic;
1172
        cfg_link_control_hw_auto_width_dis             : out std_logic;
1173
        cfg_link_control_bandwidth_int_en              : out std_logic;
1174
        cfg_link_control_auto_bandwidth_int_en         : out std_logic;
1175
        cfg_dev_control2_cpl_timeout_val               : out std_logic_vector(3 downto 0);
1176
        cfg_dev_control2_cpl_timeout_dis               : out std_logic;
1177
        cfg_dev_control2_ari_forward_en                : out std_logic;
1178
        cfg_dev_control2_atomic_requester_en           : out std_logic;
1179
        cfg_dev_control2_atomic_egress_block           : out std_logic;
1180
        cfg_dev_control2_ido_req_en                    : out std_logic;
1181
        cfg_dev_control2_ido_cpl_en                    : out std_logic;
1182
        cfg_dev_control2_ltr_en                        : out std_logic;
1183
        cfg_dev_control2_tlp_prefix_block              : out std_logic;
1184
        cfg_slot_control_electromech_il_ctl_pulse      : out std_logic;
1185
        cfg_root_control_syserr_corr_err_en            : out std_logic;
1186
        cfg_root_control_syserr_non_fatal_err_en       : out std_logic;
1187
        cfg_root_control_syserr_fatal_err_en           : out std_logic;
1188
        cfg_root_control_pme_int_en                    : out std_logic;
1189
        cfg_aer_ecrc_check_en                          : out std_logic;
1190
        cfg_aer_ecrc_gen_en                            : out std_logic;
1191
        cfg_aer_rooterr_corr_err_reporting_en          : out std_logic;
1192
        cfg_aer_rooterr_non_fatal_err_reporting_en     : out std_logic;
1193
        cfg_aer_rooterr_fatal_err_reporting_en         : out std_logic;
1194
        cfg_aer_rooterr_corr_err_received              : out std_logic;
1195
        cfg_aer_rooterr_non_fatal_err_received         : out std_logic;
1196
        cfg_aer_rooterr_fatal_err_received             : out std_logic;
1197
        cfg_vc_tcvc_map                                : out std_logic_vector(6 downto 0);
1198
        dbg_vec_a                                      : out std_logic_vector(63 downto 0);
1199
        dbg_vec_b                                      : out std_logic_vector(63 downto 0);
1200
        dbg_vec_c                                      : out std_logic_vector(11 downto 0);
1201
        dbg_sclr_a                                     : out std_logic;
1202
        dbg_sclr_b                                     : out std_logic;
1203
        dbg_sclr_c                                     : out std_logic;
1204
        dbg_sclr_d                                     : out std_logic;
1205
        dbg_sclr_e                                     : out std_logic;
1206
        dbg_sclr_f                                     : out std_logic;
1207
        dbg_sclr_g                                     : out std_logic;
1208
        dbg_sclr_h                                     : out std_logic;
1209
        dbg_sclr_i                                     : out std_logic;
1210
        dbg_sclr_j                                     : out std_logic;
1211
        dbg_sclr_k                                     : out std_logic;
1212
        trn_rdllp_data                                 : out std_logic_vector(63 downto 0);
1213
        trn_rdllp_src_rdy                              : out std_logic_vector(1 downto 0);
1214
        pl_dbg_vec                                     : out std_logic_vector(11 downto 0);
1215
 
1216
        phy_rdy_n                                      : in std_logic;
1217
        pipe_clk                                       : in std_logic;
1218
        user_clk                                       : in std_logic;
1219
        user_clk2                                      : in std_logic;
1220
        pipe_rx0_polarity_gt                           : out std_logic;
1221
        pipe_rx1_polarity_gt                           : out std_logic;
1222
        pipe_rx2_polarity_gt                           : out std_logic;
1223
        pipe_rx3_polarity_gt                           : out std_logic;
1224
        pipe_rx4_polarity_gt                           : out std_logic;
1225
        pipe_rx5_polarity_gt                           : out std_logic;
1226
        pipe_rx6_polarity_gt                           : out std_logic;
1227
        pipe_rx7_polarity_gt                           : out std_logic;
1228
        pipe_tx_deemph_gt                              : out std_logic;
1229
        pipe_tx_margin_gt                              : out std_logic_vector (2 downto 0);
1230
        pipe_tx_rate_gt                                : out std_logic;
1231
        pipe_tx_rcvr_det_gt                            : out std_logic;
1232
        pipe_tx0_char_is_k_gt                          : out std_logic_vector (1 downto 0);
1233
        pipe_tx0_compliance_gt                         : out std_logic;
1234
        pipe_tx0_data_gt                               : out std_logic_vector (15 downto 0);
1235
        pipe_tx0_elec_idle_gt                          : out std_logic;
1236
        pipe_tx0_powerdown_gt                          : out std_logic_vector (1 downto 0);
1237
        pipe_tx1_char_is_k_gt                          : out std_logic_vector (1 downto 0);
1238
        pipe_tx1_compliance_gt                         : out std_logic;
1239
        pipe_tx1_data_gt                               : out std_logic_vector (15 downto 0);
1240
        pipe_tx1_elec_idle_gt                          : out std_logic;
1241
        pipe_tx1_powerdown_gt                          : out std_logic_vector (1 downto 0);
1242
        pipe_tx2_char_is_k_gt                          : out std_logic_vector (1 downto 0);
1243
        pipe_tx2_compliance_gt                         : out std_logic;
1244
        pipe_tx2_data_gt                               : out std_logic_vector (15 downto 0);
1245
        pipe_tx2_elec_idle_gt                          : out std_logic;
1246
        pipe_tx2_powerdown_gt                          : out std_logic_vector (1 downto 0);
1247
        pipe_tx3_char_is_k_gt                          : out std_logic_vector (1 downto 0);
1248
        pipe_tx3_compliance_gt                         : out std_logic;
1249
        pipe_tx3_data_gt                               : out std_logic_vector (15 downto 0);
1250
        pipe_tx3_elec_idle_gt                          : out std_logic;
1251
        pipe_tx3_powerdown_gt                          : out std_logic_vector (1 downto 0);
1252
        pipe_tx4_char_is_k_gt                          : out std_logic_vector (1 downto 0);
1253
        pipe_tx4_compliance_gt                         : out std_logic;
1254
        pipe_tx4_data_gt                               : out std_logic_vector (15 downto 0);
1255
        pipe_tx4_elec_idle_gt                          : out std_logic;
1256
        pipe_tx4_powerdown_gt                          : out std_logic_vector (1 downto 0);
1257
        pipe_tx5_char_is_k_gt                          : out std_logic_vector (1 downto 0);
1258
        pipe_tx5_compliance_gt                         : out std_logic;
1259
        pipe_tx5_data_gt                               : out std_logic_vector (15 downto 0);
1260
        pipe_tx5_elec_idle_gt                          : out std_logic;
1261
        pipe_tx5_powerdown_gt                          : out std_logic_vector (1 downto 0);
1262
        pipe_tx6_char_is_k_gt                          : out std_logic_vector (1 downto 0);
1263
        pipe_tx6_compliance_gt                         : out std_logic;
1264
        pipe_tx6_data_gt                               : out std_logic_vector (15 downto 0);
1265
        pipe_tx6_elec_idle_gt                          : out std_logic;
1266
        pipe_tx6_powerdown_gt                          : out std_logic_vector (1 downto 0);
1267
        pipe_tx7_char_is_k_gt                          : out std_logic_vector (1 downto 0);
1268
        pipe_tx7_compliance_gt                         : out std_logic;
1269
        pipe_tx7_data_gt                               : out std_logic_vector (15 downto 0);
1270
        pipe_tx7_elec_idle_gt                          : out std_logic;
1271
        pipe_tx7_powerdown_gt                          : out std_logic_vector (1 downto 0);
1272
 
1273
        pipe_rx0_chanisaligned_gt                      : in std_logic;
1274
        pipe_rx0_char_is_k_gt                          : in std_logic_vector (1 downto 0);
1275
        pipe_rx0_data_gt                               : in std_logic_vector (15 downto 0);
1276
        pipe_rx0_elec_idle_gt                          : in std_logic;
1277
        pipe_rx0_phy_status_gt                         : in std_logic;
1278
        pipe_rx0_status_gt                             : in std_logic_vector (2 downto 0);
1279
        pipe_rx0_valid_gt                              : in std_logic;
1280
        pipe_rx1_chanisaligned_gt                      : in std_logic;
1281
        pipe_rx1_char_is_k_gt                          : in std_logic_vector (1 downto 0);
1282
        pipe_rx1_data_gt                               : in std_logic_vector (15 downto 0);
1283
        pipe_rx1_elec_idle_gt                          : in std_logic;
1284
        pipe_rx1_phy_status_gt                         : in std_logic;
1285
        pipe_rx1_status_gt                             : in std_logic_vector (2 downto 0);
1286
        pipe_rx1_valid_gt                              : in std_logic;
1287
        pipe_rx2_chanisaligned_gt                      : in std_logic;
1288
        pipe_rx2_char_is_k_gt                          : in std_logic_vector (1 downto 0);
1289
        pipe_rx2_data_gt                               : in std_logic_vector (15 downto 0);
1290
        pipe_rx2_elec_idle_gt                          : in std_logic;
1291
        pipe_rx2_phy_status_gt                         : in std_logic;
1292
        pipe_rx2_status_gt                             : in std_logic_vector (2 downto 0);
1293
        pipe_rx2_valid_gt                              : in std_logic;
1294
        pipe_rx3_chanisaligned_gt                      : in std_logic;
1295
        pipe_rx3_char_is_k_gt                          : in std_logic_vector (1 downto 0);
1296
        pipe_rx3_data_gt                               : in std_logic_vector (15 downto 0);
1297
        pipe_rx3_elec_idle_gt                          : in std_logic;
1298
        pipe_rx3_phy_status_gt                         : in std_logic;
1299
        pipe_rx3_status_gt                             : in std_logic_vector (2 downto 0);
1300
        pipe_rx3_valid_gt                              : in std_logic;
1301
        pipe_rx4_chanisaligned_gt                      : in std_logic;
1302
        pipe_rx4_char_is_k_gt                          : in std_logic_vector (1 downto 0);
1303
        pipe_rx4_data_gt                               : in std_logic_vector (15 downto 0);
1304
        pipe_rx4_elec_idle_gt                          : in std_logic;
1305
        pipe_rx4_phy_status_gt                         : in std_logic;
1306
        pipe_rx4_status_gt                             : in std_logic_vector (2 downto 0);
1307
        pipe_rx4_valid_gt                              : in std_logic;
1308
        pipe_rx5_chanisaligned_gt                      : in std_logic;
1309
        pipe_rx5_char_is_k_gt                          : in std_logic_vector (1 downto 0);
1310
        pipe_rx5_data_gt                               : in std_logic_vector (15 downto 0);
1311
        pipe_rx5_elec_idle_gt                          : in std_logic;
1312
        pipe_rx5_phy_status_gt                         : in std_logic;
1313
        pipe_rx5_status_gt                             : in std_logic_vector (2 downto 0);
1314
        pipe_rx5_valid_gt                              : in std_logic;
1315
        pipe_rx6_chanisaligned_gt                      : in std_logic;
1316
        pipe_rx6_char_is_k_gt                          : in std_logic_vector (1 downto 0);
1317
        pipe_rx6_data_gt                               : in std_logic_vector (15 downto 0);
1318
        pipe_rx6_elec_idle_gt                          : in std_logic;
1319
        pipe_rx6_phy_status_gt                         : in std_logic;
1320
        pipe_rx6_status_gt                             : in std_logic_vector (2 downto 0);
1321
        pipe_rx6_valid_gt                              : in std_logic;
1322
        pipe_rx7_chanisaligned_gt                      : in std_logic;
1323
        pipe_rx7_char_is_k_gt                          : in std_logic_vector (1 downto 0);
1324
        pipe_rx7_data_gt                               : in std_logic_vector (15 downto 0);
1325
        pipe_rx7_elec_idle_gt                          : in std_logic;
1326
        pipe_rx7_phy_status_gt                         : in std_logic;
1327
        pipe_rx7_status_gt                             : in std_logic_vector (2 downto 0);
1328
        pipe_rx7_valid_gt                              : in std_logic
1329
      );
1330
    end component;
1331
 
1332
    component cl_a7pcie_x4_gt_top is
1333
      generic (
1334
        LINK_CAP_MAX_LINK_WIDTH_INT   : integer := 1;       -- 1 - x1 , 2 - x2 , 4 - x4 , 8 - x8
1335
        REF_CLK_FREQ                  : integer := 0;       -- 0 - 100 MHz , 1 - 125 MHz , 2 - 250 MHz
1336
        USER_CLK2_DIV2                : string  := "FALSE"; -- "TRUE" => user_clk2 = user_clk/2, where user_clk = 500 or 250 MHz.
1337
                                                            -- "FALSE" => user_clk2 = user_clk
1338
        USER_CLK_FREQ                 : integer := 3;       -- 0 - 31.25 MHz, 1 - 62.5 MHz, 2 - 125 MHz, 3 - 250 MHz, 4 - 500Mhz
1339
        PL_FAST_TRAIN                 : string  := "FALSE"; -- Simulation Speedup
1340
        PCIE_EXT_CLK                  : string  := "FALSE"; -- External Clock Enable
1341
        PCIE_USE_MODE                 : string  := "1.0";   -- 1.0 = K325T IES, 1.1 = vx485t IES, 3.0 = K325T GES
1342
        PCIE_GT_DEVICE                : string  := "GTX";   -- Select the GT to use (GTP for Artix-7, GTX for K7/V7)
1343
        PCIE_PLL_SEL                  : string  := "CPLL";  -- Select the PLL (CPLL or QPLL)
1344
        PCIE_ASYNC_EN                 : string  := "FALSE"; -- Asynchronous Clocking Enable
1345
        PCIE_TXBUF_EN                 : string  := "FALSE"; -- Use the Tansmit Buffer
1346
        PCIE_CHAN_BOND                : integer := 0        -- PCIE Channel Bond Methodology Select
1347
 
1348
      );
1349
      port (
1350
        -- pl ltssm
1351
        pl_ltssm_state         : in std_logic_vector(5 downto 0);
1352
 
1353
        -- Pipe Per-Link Signals
1354
        pipe_tx_rcvr_det       : in std_logic;
1355
        pipe_tx_reset          : in std_logic;
1356
        pipe_tx_rate           : in std_logic;
1357
        pipe_tx_deemph         : in std_logic;
1358
        pipe_tx_margin         : in std_logic_vector (2 downto 0);
1359
        pipe_tx_swing          : in std_logic;
1360
 
1361
        ----------------------------------------------------------------------------------------------------
1362
        -- External Clocking Interface                                                                    --
1363
        ----------------------------------------------------------------------------------------------------
1364
 
1365
        PIPE_PCLK_IN           : in std_logic;
1366
        PIPE_RXUSRCLK_IN       : in std_logic;
1367
        PIPE_RXOUTCLK_IN       : in std_logic_vector(3 downto 0);
1368
        PIPE_DCLK_IN           : in std_logic;
1369
        PIPE_USERCLK1_IN       : in std_logic;
1370
        PIPE_USERCLK2_IN       : in std_logic;
1371
        PIPE_OOBCLK_IN         : in std_logic;
1372
        PIPE_MMCM_LOCK_IN      : in std_logic;
1373
 
1374
        PIPE_TXOUTCLK_OUT      : out std_logic;
1375
        PIPE_RXOUTCLK_OUT      : out std_logic_vector(3 downto 0);
1376
        PIPE_PCLK_SEL_OUT      : out std_logic_vector(3 downto 0);
1377
        PIPE_GEN3_OUT          : out std_logic;
1378
 
1379
        -- Pipe Per-Lane Signals - Lane 0
1380
        pipe_rx0_char_is_k     : out std_logic_vector(1 downto 0);
1381
        pipe_rx0_data          : out std_logic_vector(15 downto 0);
1382
        pipe_rx0_valid         : out std_logic;
1383
        pipe_rx0_chanisaligned : out std_logic;
1384
        pipe_rx0_status        : out std_logic_vector(2 downto 0);
1385
        pipe_rx0_phy_status    : out std_logic;
1386
        pipe_rx0_elec_idle     : out std_logic;
1387
        pipe_rx0_polarity      : in std_logic;
1388
        pipe_tx0_compliance    : in std_logic;
1389
        pipe_tx0_char_is_k     : in std_logic_vector(1 downto 0);
1390
        pipe_tx0_data          : in std_logic_vector(15 downto 0);
1391
        pipe_tx0_elec_idle     : in std_logic;
1392
        pipe_tx0_powerdown     : in std_logic_vector(1 downto 0);
1393
 
1394
        -- Pipe Per-Lane Signals - Lane 1
1395
        pipe_rx1_char_is_k     : out std_logic_vector(1 downto 0);
1396
        pipe_rx1_data          : out std_logic_vector(15 downto 0);
1397
        pipe_rx1_valid         : out std_logic;
1398
        pipe_rx1_chanisaligned : out std_logic;
1399
        pipe_rx1_status        : out std_logic_vector(2 downto 0);
1400
        pipe_rx1_phy_status    : out std_logic;
1401
        pipe_rx1_elec_idle     : out std_logic;
1402
        pipe_rx1_polarity      : in std_logic;
1403
        pipe_tx1_compliance    : in std_logic;
1404
        pipe_tx1_char_is_k     : in std_logic_vector(1 downto 0);
1405
        pipe_tx1_data          : in std_logic_vector(15 downto 0);
1406
        pipe_tx1_elec_idle     : in std_logic;
1407
        pipe_tx1_powerdown     : in std_logic_vector(1 downto 0);
1408
 
1409
        -- Pipe Per-Lane Signals - Lane 2
1410
        pipe_rx2_char_is_k     : out std_logic_vector(1 downto 0);
1411
        pipe_rx2_data          : out std_logic_vector(15 downto 0);
1412
        pipe_rx2_valid         : out std_logic;
1413
        pipe_rx2_chanisaligned : out std_logic;
1414
        pipe_rx2_status        : out std_logic_vector(2 downto 0);
1415
        pipe_rx2_phy_status    : out std_logic;
1416
        pipe_rx2_elec_idle     : out std_logic;
1417
        pipe_rx2_polarity      : in std_logic;
1418
        pipe_tx2_compliance    : in std_logic;
1419
        pipe_tx2_char_is_k     : in std_logic_vector(1 downto 0);
1420
        pipe_tx2_data          : in std_logic_vector(15 downto 0);
1421
        pipe_tx2_elec_idle     : in std_logic;
1422
        pipe_tx2_powerdown     : in std_logic_vector(1 downto 0);
1423
 
1424
        -- Pipe Per-Lane Signals - Lane 3
1425
        pipe_rx3_char_is_k     : out std_logic_vector(1 downto 0);
1426
        pipe_rx3_data          : out std_logic_vector(15 downto 0);
1427
        pipe_rx3_valid         : out std_logic;
1428
        pipe_rx3_chanisaligned : out std_logic;
1429
        pipe_rx3_status        : out std_logic_vector(2 downto 0);
1430
        pipe_rx3_phy_status    : out std_logic;
1431
        pipe_rx3_elec_idle     : out std_logic;
1432
        pipe_rx3_polarity      : in std_logic;
1433
        pipe_tx3_compliance    : in std_logic;
1434
        pipe_tx3_char_is_k     : in std_logic_vector(1 downto 0);
1435
        pipe_tx3_data          : in std_logic_vector(15 downto 0);
1436
        pipe_tx3_elec_idle     : in std_logic;
1437
        pipe_tx3_powerdown     : in std_logic_vector(1 downto 0);
1438
 
1439
        -- Pipe Per-Lane Signals - Lane 4
1440
        pipe_rx4_char_is_k     : out std_logic_vector(1 downto 0);
1441
        pipe_rx4_data          : out std_logic_vector(15 downto 0);
1442
        pipe_rx4_valid         : out std_logic;
1443
        pipe_rx4_chanisaligned : out std_logic;
1444
        pipe_rx4_status        : out std_logic_vector(2 downto 0);
1445
        pipe_rx4_phy_status    : out std_logic;
1446
        pipe_rx4_elec_idle     : out std_logic;
1447
        pipe_rx4_polarity      : in std_logic;
1448
        pipe_tx4_compliance    : in std_logic;
1449
        pipe_tx4_char_is_k     : in std_logic_vector(1 downto 0);
1450
        pipe_tx4_data          : in std_logic_vector(15 downto 0);
1451
        pipe_tx4_elec_idle     : in std_logic;
1452
        pipe_tx4_powerdown     : in std_logic_vector(1 downto 0);
1453
 
1454
        -- Pipe Per-Lane Signals - Lane 5
1455
        pipe_rx5_char_is_k     : out std_logic_vector(1 downto 0);
1456
        pipe_rx5_data          : out std_logic_vector(15 downto 0);
1457
        pipe_rx5_valid         : out std_logic;
1458
        pipe_rx5_chanisaligned : out std_logic;
1459
        pipe_rx5_status        : out std_logic_vector(2 downto 0);
1460
        pipe_rx5_phy_status    : out std_logic;
1461
        pipe_rx5_elec_idle     : out std_logic;
1462
        pipe_rx5_polarity      : in std_logic;
1463
        pipe_tx5_compliance    : in std_logic;
1464
        pipe_tx5_char_is_k     : in std_logic_vector(1 downto 0);
1465
        pipe_tx5_data          : in std_logic_vector(15 downto 0);
1466
        pipe_tx5_elec_idle     : in std_logic;
1467
        pipe_tx5_powerdown     : in std_logic_vector(1 downto 0);
1468
 
1469
         -- Pipe Per-Lane Signals - Lane 6
1470
        pipe_rx6_char_is_k     : out std_logic_vector(1 downto 0);
1471
        pipe_rx6_data          : out std_logic_vector(15 downto 0);
1472
        pipe_rx6_valid         : out std_logic;
1473
        pipe_rx6_chanisaligned : out std_logic;
1474
        pipe_rx6_status        : out std_logic_vector(2 downto 0);
1475
        pipe_rx6_phy_status    : out std_logic;
1476
        pipe_rx6_elec_idle     : out std_logic;
1477
        pipe_rx6_polarity      : in std_logic;
1478
        pipe_tx6_compliance    : in std_logic;
1479
        pipe_tx6_char_is_k     : in std_logic_vector(1 downto 0);
1480
        pipe_tx6_data          : in std_logic_vector(15 downto 0);
1481
        pipe_tx6_elec_idle     : in std_logic;
1482
        pipe_tx6_powerdown     : in std_logic_vector(1 downto 0);
1483
 
1484
        -- Pipe Per-Lane Signals - Lane 7
1485
        pipe_rx7_char_is_k     : out std_logic_vector(1 downto 0);
1486
        pipe_rx7_data          : out std_logic_vector(15 downto 0);
1487
        pipe_rx7_valid         : out std_logic;
1488
        pipe_rx7_chanisaligned : out std_logic;
1489
        pipe_rx7_status        : out std_logic_vector(2 downto 0);
1490
        pipe_rx7_phy_status    : out std_logic;
1491
        pipe_rx7_elec_idle     : out std_logic;
1492
        pipe_rx7_polarity      : in std_logic;
1493
        pipe_tx7_compliance    : in std_logic;
1494
        pipe_tx7_char_is_k     : in std_logic_vector(1 downto 0);
1495
        pipe_tx7_data          : in std_logic_vector(15 downto 0);
1496
        pipe_tx7_elec_idle     : in std_logic;
1497
        pipe_tx7_powerdown     : in std_logic_vector(1 downto 0);
1498
 
1499
        -- PCI Express signals
1500
        pci_exp_txn             : out std_logic_vector((LINK_CAP_MAX_LINK_WIDTH_INT-1) downto 0);
1501
        pci_exp_txp             : out std_logic_vector((LINK_CAP_MAX_LINK_WIDTH_INT-1) downto 0);
1502
        pci_exp_rxn             : in std_logic_vector((LINK_CAP_MAX_LINK_WIDTH_INT-1) downto 0);
1503
        pci_exp_rxp             : in std_logic_vector((LINK_CAP_MAX_LINK_WIDTH_INT-1) downto 0);
1504
 
1505
         -- Non PIPE signals
1506
        sys_clk                 : in std_logic;
1507
        PIPE_MMCM_RST_N         : in std_logic;   --     // Async      | Async
1508
 
1509
        pipe_clk                : out std_logic;
1510
        user_clk                : out std_logic;
1511
        user_clk2               : out std_logic;
1512
        sys_rst_n               : in std_logic;
1513
        phy_rdy_n               : out std_logic
1514
      );
1515
    end component;
1516
 
1517
    signal user_clk                                : std_logic;
1518
    signal user_clk2                               : std_logic;
1519
    signal pipe_clk                                : std_logic;
1520
 
1521
    signal cfg_vend_id_wire                        : std_logic_vector(15 downto 0);--;= CFG_VEND_ID;
1522
    signal cfg_dev_id_wire                         : std_logic_vector(15 downto 0);--;= CFG_DEV_ID;
1523
    signal cfg_rev_id_wire                         : std_logic_vector(7 downto 0); --;= CFG_REV_ID;
1524
    signal cfg_subsys_vend_id_wire                 : std_logic_vector(15 downto 0);--;= CFG_SUBSYS_VEND_ID;
1525
    signal cfg_subsys_id_wire                      : std_logic_vector(15 downto 0);--;= CFG_SUBSYS_ID;
1526
 
1527
    -- PIPE Interface Wires
1528
    signal phy_rdy_n                               : std_logic;
1529
    signal pipe_rx0_polarity_gt                    : std_logic;
1530
    signal pipe_rx1_polarity_gt                    : std_logic;
1531
    signal pipe_rx2_polarity_gt                    : std_logic;
1532
    signal pipe_rx3_polarity_gt                    : std_logic;
1533
    signal pipe_rx4_polarity_gt                    : std_logic;
1534
    signal pipe_rx5_polarity_gt                    : std_logic;
1535
    signal pipe_rx6_polarity_gt                    : std_logic;
1536
    signal pipe_rx7_polarity_gt                    : std_logic;
1537
    signal pipe_tx_deemph_gt                       : std_logic;
1538
    signal pipe_tx_margin_gt                       : std_logic_vector(2 downto 0);
1539
    signal pipe_tx_rate_gt                         : std_logic;
1540
    signal pipe_tx_rcvr_det_gt                     : std_logic;
1541
    signal pipe_tx0_char_is_k_gt                   : std_logic_vector(1 downto 0);
1542
    signal pipe_tx0_compliance_gt                  : std_logic;
1543
    signal pipe_tx0_data_gt                        : std_logic_vector(15 downto 0);
1544
    signal pipe_tx0_elec_idle_gt                   : std_logic;
1545
    signal pipe_tx0_powerdown_gt                   : std_logic_vector(1 downto 0);
1546
    signal pipe_tx1_char_is_k_gt                   : std_logic_vector(1 downto 0);
1547
    signal pipe_tx1_compliance_gt                  : std_logic;
1548
    signal pipe_tx1_data_gt                        : std_logic_vector(15 downto 0);
1549
    signal pipe_tx1_elec_idle_gt                   : std_logic;
1550
    signal pipe_tx1_powerdown_gt                   : std_logic_vector(1 downto 0);
1551
    signal pipe_tx2_char_is_k_gt                   : std_logic_vector(1 downto 0);
1552
    signal pipe_tx2_compliance_gt                  : std_logic;
1553
    signal pipe_tx2_data_gt                        : std_logic_vector(15 downto 0);
1554
    signal pipe_tx2_elec_idle_gt                   : std_logic;
1555
    signal pipe_tx2_powerdown_gt                   : std_logic_vector(1 downto 0);
1556
    signal pipe_tx3_char_is_k_gt                   : std_logic_vector(1 downto 0);
1557
    signal pipe_tx3_compliance_gt                  : std_logic;
1558
    signal pipe_tx3_data_gt                        : std_logic_vector(15 downto 0);
1559
    signal pipe_tx3_elec_idle_gt                   : std_logic;
1560
    signal pipe_tx3_powerdown_gt                   : std_logic_vector(1 downto 0);
1561
    signal pipe_tx4_char_is_k_gt                   : std_logic_vector(1 downto 0);
1562
    signal pipe_tx4_compliance_gt                  : std_logic;
1563
    signal pipe_tx4_data_gt                        : std_logic_vector(15 downto 0);
1564
    signal pipe_tx4_elec_idle_gt                   : std_logic;
1565
    signal pipe_tx4_powerdown_gt                   : std_logic_vector(1 downto 0);
1566
    signal pipe_tx5_char_is_k_gt                   : std_logic_vector(1 downto 0);
1567
    signal pipe_tx5_compliance_gt                  : std_logic;
1568
    signal pipe_tx5_data_gt                        : std_logic_vector(15 downto 0);
1569
    signal pipe_tx5_elec_idle_gt                   : std_logic;
1570
    signal pipe_tx5_powerdown_gt                   : std_logic_vector(1 downto 0);
1571
    signal pipe_tx6_char_is_k_gt                   : std_logic_vector(1 downto 0);
1572
    signal pipe_tx6_compliance_gt                  : std_logic;
1573
    signal pipe_tx6_data_gt                        : std_logic_vector(15 downto 0);
1574
    signal pipe_tx6_elec_idle_gt                   : std_logic;
1575
    signal pipe_tx6_powerdown_gt                   : std_logic_vector(1 downto 0);
1576
    signal pipe_tx7_char_is_k_gt                   : std_logic_vector(1 downto 0);
1577
    signal pipe_tx7_compliance_gt                  : std_logic;
1578
    signal pipe_tx7_data_gt                        : std_logic_vector(15 downto 0);
1579
    signal pipe_tx7_elec_idle_gt                   : std_logic;
1580
    signal pipe_tx7_powerdown_gt                   : std_logic_vector(1 downto 0);
1581
 
1582
    signal pipe_rx0_chanisaligned_gt               : std_logic;
1583
    signal pipe_rx0_char_is_k_gt                   : std_logic_vector(1 downto 0);
1584
    signal pipe_rx0_data_gt                        : std_logic_vector(15 downto 0);
1585
    signal pipe_rx0_elec_idle_gt                   : std_logic;
1586
    signal pipe_rx0_phy_status_gt                  : std_logic;
1587
    signal pipe_rx0_status_gt                      : std_logic_vector(2 downto 0);
1588
    signal pipe_rx0_valid_gt                       : std_logic;
1589
    signal pipe_rx1_chanisaligned_gt               : std_logic;
1590
    signal pipe_rx1_char_is_k_gt                   : std_logic_vector(1 downto 0);
1591
    signal pipe_rx1_data_gt                        : std_logic_vector(15 downto 0);
1592
    signal pipe_rx1_elec_idle_gt                   : std_logic;
1593
    signal pipe_rx1_phy_status_gt                  : std_logic;
1594
    signal pipe_rx1_status_gt                      : std_logic_vector(2 downto 0);
1595
    signal pipe_rx1_valid_gt                       : std_logic;
1596
    signal pipe_rx2_chanisaligned_gt               : std_logic;
1597
    signal pipe_rx2_char_is_k_gt                   : std_logic_vector(1 downto 0);
1598
    signal pipe_rx2_data_gt                        : std_logic_vector(15 downto 0);
1599
    signal pipe_rx2_elec_idle_gt                   : std_logic;
1600
    signal pipe_rx2_phy_status_gt                  : std_logic;
1601
    signal pipe_rx2_status_gt                      : std_logic_vector(2 downto 0);
1602
    signal pipe_rx2_valid_gt                       : std_logic;
1603
    signal pipe_rx3_chanisaligned_gt               : std_logic;
1604
    signal pipe_rx3_char_is_k_gt                   : std_logic_vector(1 downto 0);
1605
    signal pipe_rx3_data_gt                        : std_logic_vector(15 downto 0);
1606
    signal pipe_rx3_elec_idle_gt                   : std_logic;
1607
    signal pipe_rx3_phy_status_gt                  : std_logic;
1608
    signal pipe_rx3_status_gt                      : std_logic_vector(2 downto 0);
1609
    signal pipe_rx3_valid_gt                       : std_logic;
1610
    signal pipe_rx4_chanisaligned_gt               : std_logic;
1611
    signal pipe_rx4_char_is_k_gt                   : std_logic_vector(1 downto 0);
1612
    signal pipe_rx4_data_gt                        : std_logic_vector(15 downto 0);
1613
    signal pipe_rx4_elec_idle_gt                   : std_logic;
1614
    signal pipe_rx4_phy_status_gt                  : std_logic;
1615
    signal pipe_rx4_status_gt                      : std_logic_vector(2 downto 0);
1616
    signal pipe_rx4_valid_gt                       : std_logic;
1617
    signal pipe_rx5_chanisaligned_gt               : std_logic;
1618
    signal pipe_rx5_char_is_k_gt                   : std_logic_vector(1 downto 0);
1619
    signal pipe_rx5_data_gt                        : std_logic_vector(15 downto 0);
1620
    signal pipe_rx5_elec_idle_gt                   : std_logic;
1621
    signal pipe_rx5_phy_status_gt                  : std_logic;
1622
    signal pipe_rx5_status_gt                      : std_logic_vector(2 downto 0);
1623
    signal pipe_rx5_valid_gt                       : std_logic;
1624
    signal pipe_rx6_chanisaligned_gt               : std_logic;
1625
    signal pipe_rx6_char_is_k_gt                   : std_logic_vector(1 downto 0);
1626
    signal pipe_rx6_data_gt                        : std_logic_vector(15 downto 0);
1627
    signal pipe_rx6_elec_idle_gt                   : std_logic;
1628
    signal pipe_rx6_phy_status_gt                  : std_logic;
1629
    signal pipe_rx6_status_gt                      : std_logic_vector(2 downto 0);
1630
    signal pipe_rx6_valid_gt                       : std_logic;
1631
    signal pipe_rx7_chanisaligned_gt               : std_logic;
1632
    signal pipe_rx7_char_is_k_gt                   : std_logic_vector(1 downto 0);
1633
    signal pipe_rx7_data_gt                        : std_logic_vector(15 downto 0);
1634
    signal pipe_rx7_elec_idle_gt                   : std_logic;
1635
    signal pipe_rx7_phy_status_gt                  : std_logic;
1636
    signal pipe_rx7_status_gt                      : std_logic_vector(2 downto 0);
1637
    signal pipe_rx7_valid_gt                       : std_logic;
1638
 
1639
    signal user_lnk_up_d                           : std_logic;
1640
    signal user_lnk_up_int                         : std_logic;
1641
    signal user_reset_int                          : std_logic;
1642
    signal user_rst_n                              : std_logic;
1643
    signal sys_or_hot_rst                          : std_logic;
1644
--    signal sys_rst_n                               : std_logic;
1645
    signal trn_lnk_up                              : std_logic;
1646
 
1647
    -- Intermediate signals that need to be inverted
1648
    signal cfg_mgmt_byte_en_int_n                  : std_logic_vector(3 downto 0);
1649
    signal cfg_err_cor_int_n                       : std_logic;
1650
    signal cfg_err_cpl_abort_int_n                 : std_logic;
1651
    signal cfg_err_cpl_timeout_int_n               : std_logic;
1652
    signal cfg_err_cpl_unexpect_int_n              : std_logic;
1653
    signal cfg_err_ecrc_int_n                      : std_logic;
1654
    signal cfg_err_locked_int_n                    : std_logic;
1655
    signal cfg_err_posted_int_n                    : std_logic;
1656
    signal cfg_err_ur_int_n                        : std_logic;
1657
    signal cfg_err_malformed_int_n                 : std_logic;
1658
    signal cfg_err_poisoned_int_n                  : std_logic;
1659
    signal cfg_err_atomic_egress_blocked_int_n     : std_logic;
1660
    signal cfg_err_mc_blocked_int_n                : std_logic;
1661
    signal cfg_err_internal_uncor_int_n            : std_logic;
1662
    signal cfg_err_internal_cor_int_n              : std_logic;
1663
    signal cfg_err_norecovery_int_n                : std_logic;
1664
    signal cfg_interrupt_assert_int_n              : std_logic;
1665
    signal cfg_interrupt_int_n                     : std_logic;
1666
    signal cfg_interrupt_stat_int_n                : std_logic;
1667
    signal cfg_pm_wake_int_n                       : std_logic;
1668
    signal cfg_pm_halt_aspm_l0s_int_n              : std_logic;
1669
    signal cfg_pm_halt_aspm_l1_int_n               : std_logic;
1670
    signal cfg_pm_force_state_en_int_n             : std_logic;
1671
    signal cfg_mgmt_rd_en_int_n                    : std_logic;
1672
    signal cfg_mgmt_wr_en_int_n                    : std_logic;
1673
    signal cfg_mgmt_wr_readonly_int_n              : std_logic;
1674
    signal cfg_mgmt_wr_rw1c_as_rw_int_n            : std_logic;
1675
    signal pl_received_hot_rst_int                 : std_logic;
1676
    signal pl_received_hot_rst_q                   : std_logic;
1677
    signal user_clk_out_int                        : std_logic;
1678
    signal pl_phy_lnk_up_int                       : std_logic;
1679
    signal pl_phy_lnk_up_q                         : std_logic;
1680
    signal bridge_reset_int                        : std_logic;
1681
    signal bridge_reset_d                          : std_logic;
1682
 
1683
    signal pl_ltssm_state_int                      : std_logic_vector(5 downto 0);
1684
 
1685
 
1686
 
1687
 
1688
 
1689
      -- map the data bits
1690
    function get_rem(
1691
      constant dw   : integer)
1692
      return integer is
1693
    begin  -- get_rem
1694
      if (dw = 128) then
1695
        return 2;
1696
      else
1697
        return 1;
1698
      end if;
1699
    end get_rem;
1700
 
1701
   function pad_gen (
1702
      in_vec   : bit_vector;
1703
      op_len   : integer)
1704
      return bit_vector is
1705
      variable ret : bit_vector(op_len-1 downto 0) := (others => '0');
1706
      constant len : integer := in_vec'length;  -- length of input vector
1707
   begin  -- pad_gen
1708
      for i in 0 to op_len-1 loop
1709
         if (i < len) then
1710
            ret(i) := in_vec(len-i-1);
1711
         else
1712
            ret(i) := '0';
1713
         end if;
1714
      end loop;  -- i
1715
      return ret;
1716
   end pad_gen;
1717
 
1718
    constant C_REM_WIDTH                       : integer := get_rem(C_DATA_WIDTH);
1719
    constant TCQ                               : integer := 1;       -- clock to out delay model
1720
 
1721
    begin
1722
--      sys_rst_n                                <= not sys_reset;
1723
      cfg_mgmt_byte_en_int_n                   <= not cfg_mgmt_byte_en;
1724
      cfg_err_cor_int_n                        <= not cfg_err_cor;
1725
      cfg_err_cpl_abort_int_n                  <= not cfg_err_cpl_abort;
1726
      cfg_err_cpl_timeout_int_n                <= not cfg_err_cpl_timeout;
1727
      cfg_err_cpl_unexpect_int_n               <= not cfg_err_cpl_unexpect;
1728
      cfg_err_ecrc_int_n                       <= not cfg_err_ecrc;
1729
      cfg_err_locked_int_n                     <= not cfg_err_locked;
1730
      cfg_err_posted_int_n                     <= not cfg_err_posted;
1731
      cfg_err_ur_int_n                         <= not cfg_err_ur;
1732
      cfg_err_malformed_int_n                  <= not cfg_err_malformed;
1733
      cfg_err_poisoned_int_n                   <= not cfg_err_poisoned;
1734
      cfg_err_atomic_egress_blocked_int_n      <= not cfg_err_atomic_egress_blocked;
1735
      cfg_err_mc_blocked_int_n                 <= not cfg_err_mc_blocked;
1736
      cfg_err_internal_uncor_int_n             <= not cfg_err_internal_uncor;
1737
      cfg_err_internal_cor_int_n               <= not cfg_err_internal_cor;
1738
      cfg_err_norecovery_int_n                 <= not cfg_err_norecovery;
1739
      cfg_interrupt_assert_int_n               <= not cfg_interrupt_assert;
1740
      cfg_interrupt_int_n                      <= not cfg_interrupt;
1741
      cfg_interrupt_stat_int_n                 <= not cfg_interrupt_stat;
1742
      cfg_pm_wake_int_n                        <= not cfg_pm_wake;
1743
      cfg_pm_halt_aspm_l0s_int_n               <= not cfg_pm_halt_aspm_l0s;
1744
      cfg_pm_halt_aspm_l1_int_n                <= not cfg_pm_halt_aspm_l1;
1745
      cfg_pm_force_state_en_int_n              <= not cfg_pm_force_state_en;
1746
      cfg_mgmt_rd_en_int_n                     <= not cfg_mgmt_rd_en;
1747
      cfg_mgmt_wr_en_int_n                     <= not cfg_mgmt_wr_en;
1748
      cfg_mgmt_wr_readonly_int_n               <= not cfg_mgmt_wr_readonly;
1749
      cfg_mgmt_wr_rw1c_as_rw_int_n             <= not cfg_mgmt_wr_rw1c_as_rw;
1750
      cfg_vend_id_wire                         <= CFG_VEND_ID;
1751
      cfg_dev_id_wire                          <= CFG_DEV_ID;
1752
      cfg_rev_id_wire                          <= CFG_REV_ID;
1753
      cfg_subsys_vend_id_wire                  <= CFG_SUBSYS_VEND_ID;
1754
      cfg_subsys_id_wire                       <= CFG_SUBSYS_ID;
1755
      sys_or_hot_rst                           <= (not sys_rst_n) or pl_received_hot_rst_q;
1756
      pl_received_hot_rst                      <= pl_received_hot_rst_q;
1757
      user_clk_out                             <= user_clk_out_int;
1758
      pl_phy_lnk_up                            <= pl_phy_lnk_up_q;
1759
      user_lnk_up                              <= user_lnk_up_int;
1760
 
1761
      pl_ltssm_state                           <= pl_ltssm_state_int;
1762
 
1763
 
1764
    -- Register Block Outputs to ease timing
1765
    process (user_clk_out_int)
1766
    begin
1767
      if (user_clk_out_int'event and user_clk_out_int = '1') then
1768
 
1769
        if (sys_rst_n = '0') then
1770
          pl_phy_lnk_up_q       <= '0' after (TCQ)*1 ps;
1771
          pl_received_hot_rst_q <= '0' after (TCQ)*1 ps;
1772
        else
1773
          pl_phy_lnk_up_q       <= pl_phy_lnk_up_int after (TCQ)*1 ps;
1774
          pl_received_hot_rst_q <= pl_received_hot_rst_int after (TCQ)*1 ps;
1775
        end if;
1776
      end if;
1777
     end process;
1778
 
1779
    process (user_clk_out_int)
1780
    begin
1781
      if (user_clk_out_int'event and user_clk_out_int = '1') then
1782
 
1783
        if (sys_rst_n = '0') then
1784
          user_lnk_up_int <= '0' after (TCQ)*1 ps;
1785
        else
1786
          user_lnk_up_int <= user_lnk_up_d after (TCQ)*1 ps;
1787
        end if;
1788
      end if;
1789
     end process;
1790
 
1791
    process (user_clk_out_int)
1792
    begin
1793
      if (user_clk_out_int'event and user_clk_out_int = '1') then
1794
 
1795
        if (sys_rst_n = '0') then
1796
          user_lnk_up_d <= '0' after (TCQ)*1 ps;
1797
        else
1798
          user_lnk_up_d <= trn_lnk_up after (TCQ)*1 ps;
1799
        end if;
1800
      end if;
1801
     end process;
1802
 
1803
 
1804
  -- Generate user_reset_out
1805
  -- Once user reset output of PCIE and Phy Layer is active, de-assert reset
1806
  -- Only assert reset if system reset or hot reset is seen.  Keep AXI backend/user application alive otherwise
1807
 
1808
    process (user_clk_out_int,sys_or_hot_rst)
1809
    begin
1810
      if (sys_or_hot_rst = '1') then
1811
        user_reset_int <= '1' after (TCQ)*1 ps;
1812
      elsif (user_clk_out_int'event and user_clk_out_int = '1') then
1813
        if (user_rst_n='1' and pl_phy_lnk_up_q='1') then
1814
            user_reset_int <= '0' after (TCQ)*1 ps;
1815
        end if;
1816
      end if;
1817
     end process;
1818
 
1819
    process (user_clk_out_int,sys_or_hot_rst)
1820
    begin
1821
      if (sys_or_hot_rst = '1') then
1822
         user_reset_out <= '1' after (TCQ)*1 ps;
1823
      elsif (user_clk_out_int'event and user_clk_out_int = '1') then
1824
         user_reset_out <= user_reset_int after (TCQ)*1 ps;
1825
      end if;
1826
     end process;
1827
 
1828
    process (user_clk_out_int,sys_or_hot_rst)
1829
    begin
1830
      if (sys_or_hot_rst = '1') then
1831
          bridge_reset_int <= '1' after (TCQ)*1 ps;
1832
      elsif (user_clk_out_int'event and user_clk_out_int = '1') then
1833
        if (user_rst_n='1' and pl_phy_lnk_up_q='1') then
1834
            bridge_reset_int <= '0' after (TCQ)*1 ps;
1835
        end if;
1836
      end if;
1837
     end process;
1838
 
1839
    process (user_clk_out_int,sys_or_hot_rst)
1840
    begin
1841
      if (sys_or_hot_rst = '1') then
1842
        bridge_reset_d <= '1' after (TCQ)*1 ps;
1843
      elsif (user_clk_out_int'event and user_clk_out_int = '1') then
1844
        bridge_reset_d <= bridge_reset_int after (TCQ)*1 ps;
1845
      end if;
1846
     end process;
1847
 
1848
  ----------------------------------------------------------------------------------------------------------------------
1849
  -- **** PCI Express Core Wrapper ****                                                                               --
1850
  -- The PCI Express Core Wrapper includes the following:                                                             --
1851
  --   1) AXI Streaming Bridge                                                                                        --
1852
  --   2) PCIE 2_1 Hard Block                                                                                         --
1853
  --   3) PCIE PIPE Interface Pipeline                                                                                --
1854
  ----------------------------------------------------------------------------------------------------------------------
1855
  pcie_top_i : cl_a7pcie_x4_pcie_top
1856
  generic map (
1857
    PIPE_PIPELINE_STAGES                     => PIPE_PIPELINE_STAGES ,
1858
    AER_BASE_PTR                             => AER_BASE_PTR ,
1859
    AER_CAP_ECRC_CHECK_CAPABLE               => AER_CAP_ECRC_CHECK_CAPABLE ,
1860
    AER_CAP_ECRC_GEN_CAPABLE                 => AER_CAP_ECRC_GEN_CAPABLE ,
1861
    AER_CAP_ID                               => AER_CAP_ID ,
1862
    AER_CAP_MULTIHEADER                      => AER_CAP_MULTIHEADER ,
1863
    AER_CAP_NEXTPTR                          => AER_CAP_NEXTPTR ,
1864
    AER_CAP_ON                               => AER_CAP_ON ,
1865
    AER_CAP_OPTIONAL_ERR_SUPPORT             => AER_CAP_OPTIONAL_ERR_SUPPORT ,
1866
    AER_CAP_PERMIT_ROOTERR_UPDATE            => AER_CAP_PERMIT_ROOTERR_UPDATE ,
1867
    AER_CAP_VERSION                          => AER_CAP_VERSION ,
1868
    ALLOW_X8_GEN2                            => ALLOW_X8_GEN2 ,
1869
    BAR0                                     => BAR0 ,
1870
    BAR1                                     => BAR1 ,
1871
    BAR2                                     => BAR2 ,
1872
    BAR3                                     => BAR3 ,
1873
    BAR4                                     => BAR4 ,
1874
    BAR5                                     => BAR5 ,
1875
    C_DATA_WIDTH                             => C_DATA_WIDTH ,
1876
    C_REM_WIDTH                              => C_REM_WIDTH,
1877
    CAPABILITIES_PTR                         => CAPABILITIES_PTR ,
1878
    CARDBUS_CIS_POINTER                      => CARDBUS_CIS_POINTER ,
1879
    CFG_ECRC_ERR_CPLSTAT                     => CFG_ECRC_ERR_CPLSTAT ,
1880
    CLASS_CODE                               => CLASS_CODE ,
1881
    CMD_INTX_IMPLEMENTED                     => CMD_INTX_IMPLEMENTED ,
1882
    CPL_TIMEOUT_DISABLE_SUPPORTED            => CPL_TIMEOUT_DISABLE_SUPPORTED ,
1883
    CPL_TIMEOUT_RANGES_SUPPORTED             => CPL_TIMEOUT_RANGES_SUPPORTED ,
1884
    CRM_MODULE_RSTS                          => CRM_MODULE_RSTS ,
1885
    DEV_CAP_ENABLE_SLOT_PWR_LIMIT_SCALE      => DEV_CAP_ENABLE_SLOT_PWR_LIMIT_SCALE ,
1886
    DEV_CAP_ENABLE_SLOT_PWR_LIMIT_VALUE      => DEV_CAP_ENABLE_SLOT_PWR_LIMIT_VALUE ,
1887
    DEV_CAP_ENDPOINT_L0S_LATENCY             => DEV_CAP_ENDPOINT_L0S_LATENCY ,
1888
    DEV_CAP_ENDPOINT_L1_LATENCY              => DEV_CAP_ENDPOINT_L1_LATENCY ,
1889
    DEV_CAP_EXT_TAG_SUPPORTED                => DEV_CAP_EXT_TAG_SUPPORTED ,
1890
    DEV_CAP_FUNCTION_LEVEL_RESET_CAPABLE     => DEV_CAP_FUNCTION_LEVEL_RESET_CAPABLE ,
1891
    DEV_CAP_MAX_PAYLOAD_SUPPORTED            => DEV_CAP_MAX_PAYLOAD_SUPPORTED ,
1892
    DEV_CAP_PHANTOM_FUNCTIONS_SUPPORT        => DEV_CAP_PHANTOM_FUNCTIONS_SUPPORT ,
1893
    DEV_CAP_ROLE_BASED_ERROR                 => DEV_CAP_ROLE_BASED_ERROR ,
1894
    DEV_CAP_RSVD_14_12                       => DEV_CAP_RSVD_14_12 ,
1895
    DEV_CAP_RSVD_17_16                       => DEV_CAP_RSVD_17_16 ,
1896
    DEV_CAP_RSVD_31_29                       => DEV_CAP_RSVD_31_29 ,
1897
    DEV_CONTROL_AUX_POWER_SUPPORTED          => DEV_CONTROL_AUX_POWER_SUPPORTED ,
1898
    DEV_CONTROL_EXT_TAG_DEFAULT              => DEV_CONTROL_EXT_TAG_DEFAULT ,
1899
    DISABLE_ASPM_L1_TIMER                    => DISABLE_ASPM_L1_TIMER ,
1900
    DISABLE_BAR_FILTERING                    => DISABLE_BAR_FILTERING ,
1901
    DISABLE_ID_CHECK                         => DISABLE_ID_CHECK ,
1902
    DISABLE_LANE_REVERSAL                    => DISABLE_LANE_REVERSAL ,
1903
    DISABLE_RX_POISONED_RESP                 => DISABLE_RX_POISONED_RESP ,
1904
    DISABLE_RX_TC_FILTER                     => DISABLE_RX_TC_FILTER ,
1905
    DISABLE_SCRAMBLING                       => DISABLE_SCRAMBLING ,
1906
    DNSTREAM_LINK_NUM                        => DNSTREAM_LINK_NUM ,
1907
    DSN_BASE_PTR                             => DSN_BASE_PTR ,
1908
    DSN_CAP_ID                               => DSN_CAP_ID ,
1909
    DSN_CAP_NEXTPTR                          => DSN_CAP_NEXTPTR ,
1910
    DSN_CAP_ON                               => DSN_CAP_ON ,
1911
    DSN_CAP_VERSION                          => DSN_CAP_VERSION ,
1912
    DEV_CAP2_ARI_FORWARDING_SUPPORTED        => DEV_CAP2_ARI_FORWARDING_SUPPORTED ,
1913
    DEV_CAP2_ATOMICOP32_COMPLETER_SUPPORTED  => DEV_CAP2_ATOMICOP32_COMPLETER_SUPPORTED ,
1914
    DEV_CAP2_ATOMICOP64_COMPLETER_SUPPORTED  => DEV_CAP2_ATOMICOP64_COMPLETER_SUPPORTED ,
1915
    DEV_CAP2_ATOMICOP_ROUTING_SUPPORTED      => DEV_CAP2_ATOMICOP_ROUTING_SUPPORTED ,
1916
    DEV_CAP2_CAS128_COMPLETER_SUPPORTED      => DEV_CAP2_CAS128_COMPLETER_SUPPORTED ,
1917
    DEV_CAP2_ENDEND_TLP_PREFIX_SUPPORTED     => DEV_CAP2_ENDEND_TLP_PREFIX_SUPPORTED ,
1918
    DEV_CAP2_EXTENDED_FMT_FIELD_SUPPORTED    => DEV_CAP2_EXTENDED_FMT_FIELD_SUPPORTED ,
1919
    DEV_CAP2_LTR_MECHANISM_SUPPORTED         => DEV_CAP2_LTR_MECHANISM_SUPPORTED ,
1920
    DEV_CAP2_MAX_ENDEND_TLP_PREFIXES         => DEV_CAP2_MAX_ENDEND_TLP_PREFIXES ,
1921
    DEV_CAP2_NO_RO_ENABLED_PRPR_PASSING      => DEV_CAP2_NO_RO_ENABLED_PRPR_PASSING ,
1922
    DEV_CAP2_TPH_COMPLETER_SUPPORTED         => DEV_CAP2_TPH_COMPLETER_SUPPORTED ,
1923
    DISABLE_ERR_MSG                          => DISABLE_ERR_MSG ,
1924
    DISABLE_LOCKED_FILTER                    => DISABLE_LOCKED_FILTER ,
1925
    DISABLE_PPM_FILTER                       => DISABLE_PPM_FILTER ,
1926
    ENDEND_TLP_PREFIX_FORWARDING_SUPPORTED   => ENDEND_TLP_PREFIX_FORWARDING_SUPPORTED ,
1927
    ENABLE_MSG_ROUTE                         => ENABLE_MSG_ROUTE ,
1928
    ENABLE_RX_TD_ECRC_TRIM                   => ENABLE_RX_TD_ECRC_TRIM ,
1929
    ENTER_RVRY_EI_L0                         => ENTER_RVRY_EI_L0 ,
1930
    EXIT_LOOPBACK_ON_EI                      => EXIT_LOOPBACK_ON_EI ,
1931
    EXPANSION_ROM                            => EXPANSION_ROM ,
1932
    EXT_CFG_CAP_PTR                          => EXT_CFG_CAP_PTR ,
1933
    EXT_CFG_XP_CAP_PTR                       => EXT_CFG_XP_CAP_PTR ,
1934
    HEADER_TYPE                              => HEADER_TYPE ,
1935
    INFER_EI                                 => INFER_EI ,
1936
    INTERRUPT_PIN                            => pad_gen(INTERRUPT_PIN, 8) ,
1937
    INTERRUPT_STAT_AUTO                      => INTERRUPT_STAT_AUTO ,
1938
    IS_SWITCH                                => IS_SWITCH ,
1939
    LAST_CONFIG_DWORD                        => LAST_CONFIG_DWORD ,
1940
    LINK_CAP_ASPM_OPTIONALITY                => LINK_CAP_ASPM_OPTIONALITY ,
1941
    LINK_CAP_ASPM_SUPPORT                    => LINK_CAP_ASPM_SUPPORT ,
1942
    LINK_CAP_CLOCK_POWER_MANAGEMENT          => LINK_CAP_CLOCK_POWER_MANAGEMENT ,
1943
    LINK_CAP_DLL_LINK_ACTIVE_REPORTING_CAP   => LINK_CAP_DLL_LINK_ACTIVE_REPORTING_CAP ,
1944
    LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN1    => LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN1 ,
1945
    LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN2    => LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN2 ,
1946
    LINK_CAP_L0S_EXIT_LATENCY_GEN1           => LINK_CAP_L0S_EXIT_LATENCY_GEN1 ,
1947
    LINK_CAP_L0S_EXIT_LATENCY_GEN2           => LINK_CAP_L0S_EXIT_LATENCY_GEN2 ,
1948
    LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN1     => LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN1 ,
1949
    LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN2     => LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN2 ,
1950
    LINK_CAP_L1_EXIT_LATENCY_GEN1            => LINK_CAP_L1_EXIT_LATENCY_GEN1 ,
1951
    LINK_CAP_L1_EXIT_LATENCY_GEN2            => LINK_CAP_L1_EXIT_LATENCY_GEN2 ,
1952
    LINK_CAP_LINK_BANDWIDTH_NOTIFICATION_CAP => LINK_CAP_LINK_BANDWIDTH_NOTIFICATION_CAP ,
1953
    LINK_CAP_MAX_LINK_SPEED                  => LINK_CAP_MAX_LINK_SPEED ,
1954
    LINK_CAP_MAX_LINK_SPEED_int              => LINK_CAP_MAX_LINK_SPEED_int ,
1955
    LINK_CAP_MAX_LINK_WIDTH                  => LINK_CAP_MAX_LINK_WIDTH ,
1956
    LINK_CAP_MAX_LINK_WIDTH_int              => LINK_CAP_MAX_LINK_WIDTH_int ,
1957
    LINK_CAP_RSVD_23                         => LINK_CAP_RSVD_23 ,
1958
    LINK_CAP_SURPRISE_DOWN_ERROR_CAPABLE     => LINK_CAP_SURPRISE_DOWN_ERROR_CAPABLE ,
1959
    LINK_CONTROL_RCB                         => LINK_CONTROL_RCB ,
1960
    LINK_CTRL2_DEEMPHASIS                    => LINK_CTRL2_DEEMPHASIS ,
1961
    LINK_CTRL2_HW_AUTONOMOUS_SPEED_DISABLE   => LINK_CTRL2_HW_AUTONOMOUS_SPEED_DISABLE ,
1962
    LINK_CTRL2_TARGET_LINK_SPEED             => LINK_CTRL2_TARGET_LINK_SPEED ,
1963
    LINK_STATUS_SLOT_CLOCK_CONFIG            => LINK_STATUS_SLOT_CLOCK_CONFIG ,
1964
    LL_ACK_TIMEOUT                           => LL_ACK_TIMEOUT ,
1965
    LL_ACK_TIMEOUT_EN                        => LL_ACK_TIMEOUT_EN ,
1966
    LL_ACK_TIMEOUT_FUNC                      => LL_ACK_TIMEOUT_FUNC ,
1967
    LL_REPLAY_TIMEOUT                        => LL_REPLAY_TIMEOUT ,
1968
    LL_REPLAY_TIMEOUT_EN                     => LL_REPLAY_TIMEOUT_EN ,
1969
    LL_REPLAY_TIMEOUT_FUNC                   => LL_REPLAY_TIMEOUT_FUNC ,
1970
    LTSSM_MAX_LINK_WIDTH                     => LTSSM_MAX_LINK_WIDTH ,
1971
    MPS_FORCE                                => MPS_FORCE,
1972
    MSI_BASE_PTR                             => MSI_BASE_PTR ,
1973
    MSI_CAP_ID                               => MSI_CAP_ID ,
1974
    MSI_CAP_MULTIMSGCAP                      => MSI_CAP_MULTIMSGCAP ,
1975
    MSI_CAP_MULTIMSG_EXTENSION               => MSI_CAP_MULTIMSG_EXTENSION ,
1976
    MSI_CAP_NEXTPTR                          => MSI_CAP_NEXTPTR ,
1977
    MSI_CAP_ON                               => MSI_CAP_ON ,
1978
    MSI_CAP_PER_VECTOR_MASKING_CAPABLE       => MSI_CAP_PER_VECTOR_MASKING_CAPABLE ,
1979
    MSI_CAP_64_BIT_ADDR_CAPABLE              => MSI_CAP_64_BIT_ADDR_CAPABLE ,
1980
    MSIX_BASE_PTR                            => MSIX_BASE_PTR ,
1981
    MSIX_CAP_ID                              => MSIX_CAP_ID ,
1982
    MSIX_CAP_NEXTPTR                         => MSIX_CAP_NEXTPTR ,
1983
    MSIX_CAP_ON                              => MSIX_CAP_ON ,
1984
    MSIX_CAP_PBA_BIR                         => MSIX_CAP_PBA_BIR ,
1985
    MSIX_CAP_PBA_OFFSET                      => pad_gen(MSIX_CAP_PBA_OFFSET, 29) ,
1986
    MSIX_CAP_TABLE_BIR                       => MSIX_CAP_TABLE_BIR ,
1987
    MSIX_CAP_TABLE_OFFSET                    => pad_gen(MSIX_CAP_TABLE_OFFSET, 29) ,
1988
    MSIX_CAP_TABLE_SIZE                      => pad_gen(MSIX_CAP_TABLE_SIZE, 11) ,
1989
    N_FTS_COMCLK_GEN1                        => N_FTS_COMCLK_GEN1 ,
1990
    N_FTS_COMCLK_GEN2                        => N_FTS_COMCLK_GEN2 ,
1991
    N_FTS_GEN1                               => N_FTS_GEN1 ,
1992
    N_FTS_GEN2                               => N_FTS_GEN2 ,
1993
    PCIE_BASE_PTR                            => PCIE_BASE_PTR ,
1994
    PCIE_CAP_CAPABILITY_ID                   => PCIE_CAP_CAPABILITY_ID ,
1995
    PCIE_CAP_CAPABILITY_VERSION              => PCIE_CAP_CAPABILITY_VERSION ,
1996
    PCIE_CAP_DEVICE_PORT_TYPE                => PCIE_CAP_DEVICE_PORT_TYPE ,
1997
    PCIE_CAP_NEXTPTR                         => PCIE_CAP_NEXTPTR ,
1998
    PCIE_CAP_ON                              => PCIE_CAP_ON ,
1999
    PCIE_CAP_RSVD_15_14                      => PCIE_CAP_RSVD_15_14 ,
2000
    PCIE_CAP_SLOT_IMPLEMENTED                => PCIE_CAP_SLOT_IMPLEMENTED ,
2001
    PCIE_REVISION                            => PCIE_REVISION ,
2002
    PL_AUTO_CONFIG                           => PL_AUTO_CONFIG ,
2003
    PL_FAST_TRAIN                            => PL_FAST_TRAIN ,
2004
    PM_ASPML0S_TIMEOUT                       => PM_ASPML0S_TIMEOUT ,
2005
    PM_ASPML0S_TIMEOUT_EN                    => PM_ASPML0S_TIMEOUT_EN ,
2006
    PM_ASPML0S_TIMEOUT_FUNC                  => PM_ASPML0S_TIMEOUT_FUNC ,
2007
    PM_ASPM_FASTEXIT                         => PM_ASPM_FASTEXIT ,
2008
    PM_BASE_PTR                              => PM_BASE_PTR ,
2009
    PM_CAP_AUXCURRENT                        => PM_CAP_AUXCURRENT ,
2010
    PM_CAP_D1SUPPORT                         => PM_CAP_D1SUPPORT ,
2011
    PM_CAP_D2SUPPORT                         => PM_CAP_D2SUPPORT ,
2012
    PM_CAP_DSI                               => PM_CAP_DSI ,
2013
    PM_CAP_ID                                => PM_CAP_ID ,
2014
    PM_CAP_NEXTPTR                           => PM_CAP_NEXTPTR ,
2015
    PM_CAP_ON                                => PM_CAP_ON ,
2016
    PM_CAP_PME_CLOCK                         => PM_CAP_PME_CLOCK ,
2017
    PM_CAP_PMESUPPORT                        => PM_CAP_PMESUPPORT ,
2018
    PM_CAP_RSVD_04                           => PM_CAP_RSVD_04 ,
2019
    PM_CAP_VERSION                           => PM_CAP_VERSION ,
2020
    PM_CSR_B2B3                              => PM_CSR_B2B3 ,
2021
    PM_CSR_BPCCEN                            => PM_CSR_BPCCEN ,
2022
    PM_CSR_NOSOFTRST                         => PM_CSR_NOSOFTRST ,
2023
    PM_DATA0                                 => PM_DATA0 ,
2024
    PM_DATA1                                 => PM_DATA1 ,
2025
    PM_DATA2                                 => PM_DATA2 ,
2026
    PM_DATA3                                 => PM_DATA3 ,
2027
    PM_DATA4                                 => PM_DATA4 ,
2028
    PM_DATA5                                 => PM_DATA5 ,
2029
    PM_DATA6                                 => PM_DATA6 ,
2030
    PM_DATA7                                 => PM_DATA7 ,
2031
    PM_DATA_SCALE0                           => PM_DATA_SCALE0 ,
2032
    PM_DATA_SCALE1                           => PM_DATA_SCALE1 ,
2033
    PM_DATA_SCALE2                           => PM_DATA_SCALE2 ,
2034
    PM_DATA_SCALE3                           => PM_DATA_SCALE3 ,
2035
    PM_DATA_SCALE4                           => PM_DATA_SCALE4 ,
2036
    PM_DATA_SCALE5                           => PM_DATA_SCALE5 ,
2037
    PM_DATA_SCALE6                           => PM_DATA_SCALE6 ,
2038
    PM_DATA_SCALE7                           => PM_DATA_SCALE7 ,
2039
    PM_MF                                    => PM_MF ,
2040
    RBAR_BASE_PTR                            => RBAR_BASE_PTR ,
2041
    RBAR_CAP_CONTROL_ENCODEDBAR0             => RBAR_CAP_CONTROL_ENCODEDBAR0 ,
2042
    RBAR_CAP_CONTROL_ENCODEDBAR1             => RBAR_CAP_CONTROL_ENCODEDBAR1 ,
2043
    RBAR_CAP_CONTROL_ENCODEDBAR2             => RBAR_CAP_CONTROL_ENCODEDBAR2 ,
2044
    RBAR_CAP_CONTROL_ENCODEDBAR3             => RBAR_CAP_CONTROL_ENCODEDBAR3 ,
2045
    RBAR_CAP_CONTROL_ENCODEDBAR4             => RBAR_CAP_CONTROL_ENCODEDBAR4 ,
2046
    RBAR_CAP_CONTROL_ENCODEDBAR5             => RBAR_CAP_CONTROL_ENCODEDBAR5 ,
2047
    RBAR_CAP_ID                              => RBAR_CAP_ID,
2048
    RBAR_CAP_INDEX0                          => RBAR_CAP_INDEX0 ,
2049
    RBAR_CAP_INDEX1                          => RBAR_CAP_INDEX1 ,
2050
    RBAR_CAP_INDEX2                          => RBAR_CAP_INDEX2 ,
2051
    RBAR_CAP_INDEX3                          => RBAR_CAP_INDEX3 ,
2052
    RBAR_CAP_INDEX4                          => RBAR_CAP_INDEX4 ,
2053
    RBAR_CAP_INDEX5                          => RBAR_CAP_INDEX5 ,
2054
    RBAR_CAP_NEXTPTR                         => RBAR_CAP_NEXTPTR ,
2055
    RBAR_CAP_ON                              => RBAR_CAP_ON ,
2056
    RBAR_CAP_SUP0                            => pad_gen(RBAR_CAP_SUP0, 32) ,
2057
    RBAR_CAP_SUP1                            => pad_gen(RBAR_CAP_SUP1, 32) ,
2058
    RBAR_CAP_SUP2                            => pad_gen(RBAR_CAP_SUP2, 32) ,
2059
    RBAR_CAP_SUP3                            => pad_gen(RBAR_CAP_SUP3, 32) ,
2060
    RBAR_CAP_SUP4                            => pad_gen(RBAR_CAP_SUP4, 32) ,
2061
    RBAR_CAP_SUP5                            => pad_gen(RBAR_CAP_SUP5, 32) ,
2062
    RBAR_CAP_VERSION                         => RBAR_CAP_VERSION ,
2063
    RBAR_NUM                                 => RBAR_NUM ,
2064
    RECRC_CHK                                => RECRC_CHK ,
2065
    RECRC_CHK_TRIM                           => RECRC_CHK_TRIM ,
2066
    ROOT_CAP_CRS_SW_VISIBILITY               => ROOT_CAP_CRS_SW_VISIBILITY ,
2067
    RP_AUTO_SPD                              => RP_AUTO_SPD ,
2068
    RP_AUTO_SPD_LOOPCNT                      => RP_AUTO_SPD_LOOPCNT ,
2069
    SELECT_DLL_IF                            => SELECT_DLL_IF ,
2070
    SLOT_CAP_ATT_BUTTON_PRESENT              => SLOT_CAP_ATT_BUTTON_PRESENT ,
2071
    SLOT_CAP_ATT_INDICATOR_PRESENT           => SLOT_CAP_ATT_INDICATOR_PRESENT ,
2072
    SLOT_CAP_ELEC_INTERLOCK_PRESENT          => SLOT_CAP_ELEC_INTERLOCK_PRESENT ,
2073
    SLOT_CAP_HOTPLUG_CAPABLE                 => SLOT_CAP_HOTPLUG_CAPABLE ,
2074
    SLOT_CAP_HOTPLUG_SURPRISE                => SLOT_CAP_HOTPLUG_SURPRISE ,
2075
    SLOT_CAP_MRL_SENSOR_PRESENT              => SLOT_CAP_MRL_SENSOR_PRESENT ,
2076
    SLOT_CAP_NO_CMD_COMPLETED_SUPPORT        => SLOT_CAP_NO_CMD_COMPLETED_SUPPORT ,
2077
    SLOT_CAP_PHYSICAL_SLOT_NUM               => SLOT_CAP_PHYSICAL_SLOT_NUM ,
2078
    SLOT_CAP_POWER_CONTROLLER_PRESENT        => SLOT_CAP_POWER_CONTROLLER_PRESENT ,
2079
    SLOT_CAP_POWER_INDICATOR_PRESENT         => SLOT_CAP_POWER_INDICATOR_PRESENT ,
2080
    SLOT_CAP_SLOT_POWER_LIMIT_SCALE          => SLOT_CAP_SLOT_POWER_LIMIT_SCALE ,
2081
    SLOT_CAP_SLOT_POWER_LIMIT_VALUE          => SLOT_CAP_SLOT_POWER_LIMIT_VALUE ,
2082
    SPARE_BIT0                               => SPARE_BIT0 ,
2083
    SPARE_BIT1                               => SPARE_BIT1 ,
2084
    SPARE_BIT2                               => SPARE_BIT2 ,
2085
    SPARE_BIT3                               => SPARE_BIT3 ,
2086
    SPARE_BIT4                               => SPARE_BIT4 ,
2087
    SPARE_BIT5                               => SPARE_BIT5 ,
2088
    SPARE_BIT6                               => SPARE_BIT6 ,
2089
    SPARE_BIT7                               => SPARE_BIT7 ,
2090
    SPARE_BIT8                               => SPARE_BIT8 ,
2091
    SPARE_BYTE0                              => SPARE_BYTE0 ,
2092
    SPARE_BYTE1                              => SPARE_BYTE1 ,
2093
    SPARE_BYTE2                              => SPARE_BYTE2 ,
2094
    SPARE_BYTE3                              => SPARE_BYTE3 ,
2095
    SPARE_WORD0                              => SPARE_WORD0 ,
2096
    SPARE_WORD1                              => SPARE_WORD1 ,
2097
    SPARE_WORD2                              => SPARE_WORD2 ,
2098
    SPARE_WORD3                              => SPARE_WORD3 ,
2099
    SSL_MESSAGE_AUTO                         => SSL_MESSAGE_AUTO ,
2100
    TECRC_EP_INV                             => TECRC_EP_INV ,
2101
    TL_RBYPASS                               => TL_RBYPASS ,
2102
    TL_RX_RAM_RADDR_LATENCY                  => TL_RX_RAM_RADDR_LATENCY ,
2103
    TL_RX_RAM_RDATA_LATENCY                  => TL_RX_RAM_RDATA_LATENCY ,
2104
    TL_RX_RAM_WRITE_LATENCY                  => TL_RX_RAM_WRITE_LATENCY ,
2105
    TL_TFC_DISABLE                           => TL_TFC_DISABLE ,
2106
    TL_TX_CHECKS_DISABLE                     => TL_TX_CHECKS_DISABLE ,
2107
    TL_TX_RAM_RADDR_LATENCY                  => TL_TX_RAM_RADDR_LATENCY ,
2108
    TL_TX_RAM_RDATA_LATENCY                  => TL_TX_RAM_RDATA_LATENCY ,
2109
    TL_TX_RAM_WRITE_LATENCY                  => TL_TX_RAM_WRITE_LATENCY ,
2110
    TRN_DW                                   => TRN_DW ,
2111
    TRN_NP_FC                                => TRN_NP_FC ,
2112
    UPCONFIG_CAPABLE                         => UPCONFIG_CAPABLE ,
2113
    UPSTREAM_FACING                          => UPSTREAM_FACING ,
2114
    UR_ATOMIC                                => UR_ATOMIC ,
2115
    UR_CFG1                                  => UR_CFG1 ,
2116
    UR_INV_REQ                               => UR_INV_REQ ,
2117
    UR_PRS_RESPONSE                          => UR_PRS_RESPONSE ,
2118
    USER_CLK2_DIV2                           => USER_CLK2_DIV2 ,
2119
    USER_CLK_FREQ                            => USER_CLK_FREQ ,
2120
    USE_RID_PINS                             => USE_RID_PINS ,
2121
    VC0_CPL_INFINITE                         => VC0_CPL_INFINITE ,
2122
    VC0_RX_RAM_LIMIT                         => pad_gen(VC0_RX_RAM_LIMIT, 13) ,
2123
    VC0_TOTAL_CREDITS_CD                     => VC0_TOTAL_CREDITS_CD ,
2124
    VC0_TOTAL_CREDITS_CH                     => VC0_TOTAL_CREDITS_CH ,
2125
    VC0_TOTAL_CREDITS_NPD                    => VC0_TOTAL_CREDITS_NPD,
2126
    VC0_TOTAL_CREDITS_NPH                    => VC0_TOTAL_CREDITS_NPH ,
2127
    VC0_TOTAL_CREDITS_PD                     => VC0_TOTAL_CREDITS_PD ,
2128
    VC0_TOTAL_CREDITS_PH                     => VC0_TOTAL_CREDITS_PH ,
2129
    VC0_TX_LASTPACKET                        => VC0_TX_LASTPACKET ,
2130
    VC_BASE_PTR                              => pad_gen(VC_BASE_PTR, 12) ,
2131
    VC_CAP_ID                                => VC_CAP_ID ,
2132
    VC_CAP_NEXTPTR                           => VC_CAP_NEXTPTR ,
2133
    VC_CAP_ON                                => VC_CAP_ON ,
2134
    VC_CAP_REJECT_SNOOP_TRANSACTIONS         => VC_CAP_REJECT_SNOOP_TRANSACTIONS ,
2135
    VC_CAP_VERSION                           => VC_CAP_VERSION ,
2136
    VSEC_BASE_PTR                            => pad_gen(VSEC_BASE_PTR, 12) ,
2137
    VSEC_CAP_HDR_ID                          => VSEC_CAP_HDR_ID ,
2138
    VSEC_CAP_HDR_LENGTH                      => VSEC_CAP_HDR_LENGTH ,
2139
    VSEC_CAP_HDR_REVISION                    => VSEC_CAP_HDR_REVISION ,
2140
    VSEC_CAP_ID                              => VSEC_CAP_ID ,
2141
    VSEC_CAP_IS_LINK_VISIBLE                 => VSEC_CAP_IS_LINK_VISIBLE ,
2142
    VSEC_CAP_NEXTPTR                         => VSEC_CAP_NEXTPTR ,
2143
    VSEC_CAP_ON                              => VSEC_CAP_ON ,
2144
    VSEC_CAP_VERSION                         => VSEC_CAP_VERSION
2145
    -- I/O
2146
  )
2147
  port map (
2148
 
2149
    -- AXI Interface
2150
    user_clk_out                               => user_clk_out_int ,
2151
    user_reset                                 => bridge_reset_d ,
2152
    user_lnk_up                                => user_lnk_up_int      ,
2153
 
2154
    user_rst_n                                 => user_rst_n       ,
2155
    trn_lnk_up                                 => trn_lnk_up       ,
2156
 
2157
    tx_buf_av                                  => tx_buf_av        ,
2158
    tx_err_drop                                => tx_err_drop      ,
2159
    tx_cfg_req                                 => tx_cfg_req       ,
2160
    s_axis_tx_tready                           => s_axis_tx_tready ,
2161
    s_axis_tx_tdata                            => s_axis_tx_tdata  ,
2162
    s_axis_tx_tkeep                            => s_axis_tx_tkeep  ,
2163
    s_axis_tx_tuser                            => s_axis_tx_tuser  ,
2164
    s_axis_tx_tlast                            => s_axis_tx_tlast  ,
2165
    s_axis_tx_tvalid                           => s_axis_tx_tvalid ,
2166
    tx_cfg_gnt                                 => tx_cfg_gnt ,
2167
 
2168
    m_axis_rx_tdata                            => m_axis_rx_tdata  ,
2169
    m_axis_rx_tkeep                            => m_axis_rx_tkeep  ,
2170
    m_axis_rx_tlast                            => m_axis_rx_tlast  ,
2171
    m_axis_rx_tvalid                           => m_axis_rx_tvalid ,
2172
    m_axis_rx_tready                           => m_axis_rx_tready ,
2173
    m_axis_rx_tuser                            => m_axis_rx_tuser  ,
2174
    rx_np_ok                                   => rx_np_ok ,
2175
    rx_np_req                                  => rx_np_req ,
2176
 
2177
    fc_cpld                                    => fc_cpld          ,
2178
    fc_cplh                                    => fc_cplh          ,
2179
    fc_npd                                     => fc_npd           ,
2180
    fc_nph                                     => fc_nph           ,
2181
    fc_pd                                      => fc_pd            ,
2182
    fc_ph                                      => fc_ph            ,
2183
    fc_sel                                     => fc_sel ,
2184
    cfg_turnoff_ok                             => cfg_turnoff_ok ,
2185
    cfg_received_func_lvl_rst                  => cfg_received_func_lvl_rst ,
2186
 
2187
    cm_rst_n                                   => '1' ,
2188
    func_lvl_rst_n                             => '1' ,
2189
 
2190
    cfg_dev_id                                 => cfg_dev_id_wire ,
2191
    cfg_vend_id                                => cfg_vend_id_wire ,
2192
    cfg_rev_id                                 => cfg_rev_id_wire ,
2193
    cfg_subsys_id                              => cfg_subsys_id_wire ,
2194
    cfg_subsys_vend_id                         => cfg_subsys_vend_id_wire ,
2195
    cfg_pciecap_interrupt_msgnum               => cfg_pciecap_interrupt_msgnum ,
2196
 
2197
    cfg_bridge_serr_en                         => cfg_bridge_serr_en ,
2198
    cfg_status                                 => cfg_status ,
2199
    cfg_command                                => cfg_command ,
2200
    cfg_dstatus                                => cfg_dstatus ,
2201
    cfg_dcommand                               => cfg_dcommand ,
2202
    cfg_lstatus                                => cfg_lstatus ,
2203
    cfg_lcommand                               => cfg_lcommand ,
2204
    cfg_dcommand2                              => cfg_dcommand2 ,
2205
 
2206
    cfg_command_bus_master_enable              => open ,
2207
    cfg_command_interrupt_disable              => open ,
2208
    cfg_command_io_enable                      => open ,
2209
    cfg_command_mem_enable                     => open ,
2210
    cfg_command_serr_en                        => open ,
2211
    cfg_dev_control_aux_power_en               => open ,
2212
    cfg_dev_control_corr_err_reporting_en      => open ,
2213
    cfg_dev_control_enable_ro                  => open ,
2214
    cfg_dev_control_ext_tag_en                 => open ,
2215
    cfg_dev_control_fatal_err_reporting_en     => open ,
2216
    cfg_dev_control_max_payload                => open ,
2217
    cfg_dev_control_max_read_req               => open ,
2218
    cfg_dev_control_non_fatal_reporting_en     => open ,
2219
    cfg_dev_control_no_snoop_en                => open ,
2220
    cfg_dev_control_phantom_en                 => open ,
2221
    cfg_dev_control_ur_err_reporting_en        => open ,
2222
    cfg_dev_control2_cpl_timeout_dis           => open ,
2223
    cfg_dev_control2_cpl_timeout_val           => open ,
2224
    cfg_dev_control2_ari_forward_en            => open ,
2225
    cfg_dev_control2_atomic_requester_en       => open ,
2226
    cfg_dev_control2_atomic_egress_block       => open ,
2227
    cfg_dev_control2_ido_req_en                => open ,
2228
    cfg_dev_control2_ido_cpl_en                => open ,
2229
    cfg_dev_control2_ltr_en                    => open ,
2230
    cfg_dev_control2_tlp_prefix_block          => open ,
2231
    cfg_dev_status_corr_err_detected           => open ,
2232
    cfg_dev_status_fatal_err_detected          => open ,
2233
    cfg_dev_status_non_fatal_err_detected      => open ,
2234
    cfg_dev_status_ur_detected                 => open ,
2235
 
2236
    cfg_mgmt_do                                => cfg_mgmt_do ,
2237
    cfg_err_aer_headerlog_set                  => cfg_err_aer_headerlog_set ,
2238
    cfg_err_aer_headerlog                      => cfg_err_aer_headerlog ,
2239
    cfg_err_cpl_rdy                            => cfg_err_cpl_rdy ,
2240
    cfg_interrupt_do                           => cfg_interrupt_do ,
2241
    cfg_interrupt_mmenable                     => cfg_interrupt_mmenable ,
2242
    cfg_interrupt_msienable                    => cfg_interrupt_msienable ,
2243
    cfg_interrupt_msixenable                   => cfg_interrupt_msixenable ,
2244
    cfg_interrupt_msixfm                       => cfg_interrupt_msixfm ,
2245
    cfg_interrupt_rdy                          => cfg_interrupt_rdy ,
2246
    cfg_link_control_rcb                       => open ,
2247
    cfg_link_control_aspm_control              => open ,
2248
    cfg_link_control_auto_bandwidth_int_en     => open ,
2249
    cfg_link_control_bandwidth_int_en          => open ,
2250
    cfg_link_control_clock_pm_en               => open ,
2251
    cfg_link_control_common_clock              => open ,
2252
    cfg_link_control_extended_sync             => open ,
2253
    cfg_link_control_hw_auto_width_dis         => open ,
2254
    cfg_link_control_link_disable              => open ,
2255
    cfg_link_control_retrain_link              => open ,
2256
    cfg_link_status_auto_bandwidth_status      => open ,
2257
    cfg_link_status_bandwidth_status           => open ,
2258
    cfg_link_status_current_speed              => open ,
2259
    cfg_link_status_dll_active                 => open ,
2260
    cfg_link_status_link_training              => open ,
2261
    cfg_link_status_negotiated_width           => open ,
2262
    cfg_msg_data                               => cfg_msg_data ,
2263
    cfg_msg_received                           => cfg_msg_received ,
2264
    cfg_msg_received_assert_int_a              => cfg_msg_received_assert_int_a ,
2265
    cfg_msg_received_assert_int_b              => cfg_msg_received_assert_int_b ,
2266
    cfg_msg_received_assert_int_c              => cfg_msg_received_assert_int_c ,
2267
    cfg_msg_received_assert_int_d              => cfg_msg_received_assert_int_d ,
2268
    cfg_msg_received_deassert_int_a            => cfg_msg_received_deassert_int_a ,
2269
    cfg_msg_received_deassert_int_b            => cfg_msg_received_deassert_int_b ,
2270
    cfg_msg_received_deassert_int_c            => cfg_msg_received_deassert_int_c ,
2271
    cfg_msg_received_deassert_int_d            => cfg_msg_received_deassert_int_d ,
2272
    cfg_msg_received_err_cor                   => cfg_msg_received_err_cor ,
2273
    cfg_msg_received_err_fatal                 => cfg_msg_received_err_fatal ,
2274
    cfg_msg_received_err_non_fatal             => cfg_msg_received_err_non_fatal ,
2275
    cfg_msg_received_pm_as_nak                 => cfg_msg_received_pm_as_nak ,
2276
    cfg_msg_received_pme_to                    => open ,
2277
    cfg_msg_received_pme_to_ack                => cfg_msg_received_pme_to_ack ,
2278
    cfg_msg_received_pm_pme                    => cfg_msg_received_pm_pme ,
2279
    cfg_msg_received_setslotpowerlimit         => cfg_msg_received_setslotpowerlimit ,
2280
    cfg_msg_received_unlock                    => open ,
2281
    cfg_to_turnoff                             => cfg_to_turnoff ,
2282
    cfg_pcie_link_state                        => cfg_pcie_link_state ,
2283
    cfg_pmcsr_pme_en                           => cfg_pmcsr_pme_en ,
2284
    cfg_pmcsr_powerstate                       => cfg_pmcsr_powerstate ,
2285
    cfg_pmcsr_pme_status                       => cfg_pmcsr_pme_status ,
2286
    cfg_pm_rcv_as_req_l1_n                     => open ,
2287
    cfg_pm_rcv_enter_l1_n                      => open ,
2288
    cfg_pm_rcv_enter_l23_n                     => open ,
2289
    cfg_pm_rcv_req_ack_n                       => open ,
2290
    cfg_mgmt_rd_wr_done                        => cfg_mgmt_rd_wr_done ,
2291
    cfg_slot_control_electromech_il_ctl_pulse  => cfg_slot_control_electromech_il_ctl_pulse ,
2292
    cfg_root_control_syserr_corr_err_en        => cfg_root_control_syserr_corr_err_en ,
2293
    cfg_root_control_syserr_non_fatal_err_en   => cfg_root_control_syserr_non_fatal_err_en ,
2294
    cfg_root_control_syserr_fatal_err_en       => cfg_root_control_syserr_fatal_err_en ,
2295
    cfg_root_control_pme_int_en                => cfg_root_control_pme_int_en,
2296
    cfg_aer_ecrc_check_en                      => cfg_aer_ecrc_check_en ,
2297
    cfg_aer_ecrc_gen_en                        => cfg_aer_ecrc_gen_en ,
2298
    cfg_aer_rooterr_corr_err_reporting_en      => cfg_aer_rooterr_corr_err_reporting_en ,
2299
    cfg_aer_rooterr_non_fatal_err_reporting_en => cfg_aer_rooterr_non_fatal_err_reporting_en ,
2300
    cfg_aer_rooterr_fatal_err_reporting_en     => cfg_aer_rooterr_fatal_err_reporting_en ,
2301
    cfg_aer_rooterr_corr_err_received          => cfg_aer_rooterr_corr_err_received ,
2302
    cfg_aer_rooterr_non_fatal_err_received     => cfg_aer_rooterr_non_fatal_err_received ,
2303
    cfg_aer_rooterr_fatal_err_received         => cfg_aer_rooterr_fatal_err_received ,
2304
    cfg_aer_interrupt_msgnum                   => cfg_aer_interrupt_msgnum ,
2305
    cfg_transaction                            => open ,
2306
    cfg_transaction_addr                       => open ,
2307
    cfg_transaction_type                       => open ,
2308
    cfg_vc_tcvc_map                            => cfg_vc_tcvc_map ,
2309
    cfg_mgmt_byte_en_n                         => cfg_mgmt_byte_en_int_n ,
2310
    cfg_mgmt_di                                => cfg_mgmt_di ,
2311
    cfg_dsn                                    => cfg_dsn ,
2312
    cfg_mgmt_dwaddr                            => cfg_mgmt_dwaddr ,
2313
    cfg_err_acs_n                              => '1' ,
2314
    cfg_err_cor_n                              => cfg_err_cor_int_n ,
2315
    cfg_err_cpl_abort_n                        => cfg_err_cpl_abort_int_n ,
2316
    cfg_err_cpl_timeout_n                      => cfg_err_cpl_timeout_int_n ,
2317
    cfg_err_cpl_unexpect_n                     => cfg_err_cpl_unexpect_int_n ,
2318
    cfg_err_ecrc_n                             => cfg_err_ecrc_int_n ,
2319
    cfg_err_locked_n                           => cfg_err_locked_int_n ,
2320
    cfg_err_posted_n                           => cfg_err_posted_int_n ,
2321
    cfg_err_tlp_cpl_header                     => cfg_err_tlp_cpl_header ,
2322
    cfg_err_ur_n                               => cfg_err_ur_int_n ,
2323
    cfg_err_malformed_n                        => cfg_err_malformed_int_n ,
2324
    cfg_err_poisoned_n                         => cfg_err_poisoned_int_n ,
2325
    cfg_err_atomic_egress_blocked_n            => cfg_err_atomic_egress_blocked_int_n ,
2326
    cfg_err_mc_blocked_n                       => cfg_err_mc_blocked_int_n ,
2327
    cfg_err_internal_uncor_n                   => cfg_err_internal_uncor_int_n ,
2328
    cfg_err_internal_cor_n                     => cfg_err_internal_cor_int_n ,
2329
    cfg_err_norecovery_n                       => cfg_err_norecovery_int_n ,
2330
 
2331
    cfg_interrupt_assert_n                     => cfg_interrupt_assert_int_n  ,
2332
    cfg_interrupt_di                           => cfg_interrupt_di ,
2333
    cfg_interrupt_n                            => cfg_interrupt_int_n ,
2334
    cfg_interrupt_stat_n                       => cfg_interrupt_stat_int_n  ,
2335
    cfg_bus_number                             => cfg_bus_number,
2336
    cfg_device_number                          => cfg_device_number,
2337
    cfg_function_number                        => cfg_function_number,
2338
    cfg_ds_bus_number                          => cfg_ds_bus_number ,
2339
    cfg_ds_device_number                       => cfg_ds_device_number ,
2340
    cfg_ds_function_number                     => cfg_ds_function_number  ,
2341
    cfg_pm_send_pme_to_n                       => '1' ,
2342
    cfg_pm_wake_n                              => cfg_pm_wake_int_n ,
2343
    cfg_pm_halt_aspm_l0s_n                     => cfg_pm_halt_aspm_l0s_int_n ,
2344
    cfg_pm_halt_aspm_l1_n                      => cfg_pm_halt_aspm_l1_int_n ,
2345
    cfg_pm_force_state_en_n                    => cfg_pm_force_state_en_int_n ,
2346
    cfg_pm_force_state                         => cfg_pm_force_state ,
2347
    cfg_force_mps                              => "000" ,
2348
    cfg_force_common_clock_off                 => '0' ,
2349
    cfg_force_extended_sync_on                 => '0' ,
2350
    cfg_port_number                            => x"00" ,
2351
    cfg_mgmt_rd_en_n                           => cfg_mgmt_rd_en_int_n ,
2352
    cfg_trn_pending                            => cfg_trn_pending ,
2353
    cfg_mgmt_wr_en_n                           => cfg_mgmt_wr_en_int_n ,
2354
    cfg_mgmt_wr_readonly_n                     => cfg_mgmt_wr_readonly_int_n ,
2355
    cfg_mgmt_wr_rw1c_as_rw_n                   => cfg_mgmt_wr_rw1c_as_rw_int_n ,
2356
 
2357
    pl_initial_link_width                      => pl_initial_link_width ,
2358
    pl_lane_reversal_mode                      => pl_lane_reversal_mode ,
2359
    pl_link_gen2_cap                           => pl_link_gen2_cap ,
2360
    pl_link_partner_gen2_supported             => pl_link_partner_gen2_supported ,
2361
    pl_link_upcfg_cap                          => pl_link_upcfg_cap ,
2362
    pl_ltssm_state                             => pl_ltssm_state_int ,
2363
    pl_phy_lnk_up                              => pl_phy_lnk_up_int ,
2364
    pl_received_hot_rst                        => pl_received_hot_rst_int ,
2365
    pl_rx_pm_state                             => pl_rx_pm_state ,
2366
    pl_sel_lnk_rate                            => pl_sel_lnk_rate ,
2367
    pl_sel_lnk_width                           => pl_sel_lnk_width ,
2368
    pl_tx_pm_state                             => pl_tx_pm_state ,
2369
    pl_directed_link_auton                     => pl_directed_link_auton ,
2370
    pl_directed_link_change                    => pl_directed_link_change ,
2371
    pl_directed_link_speed                     => pl_directed_link_speed ,
2372
    pl_directed_link_width                     => pl_directed_link_width ,
2373
    pl_downstream_deemph_source                => pl_downstream_deemph_source ,
2374
    pl_upstream_prefer_deemph                  => pl_upstream_prefer_deemph ,
2375
    pl_transmit_hot_rst                        => pl_transmit_hot_rst ,
2376
    pl_directed_ltssm_new_vld                  => '0' ,
2377
    pl_directed_ltssm_new                      => "000000" ,
2378
    pl_directed_ltssm_stall                    => '0' ,
2379
    pl_directed_change_done                    => pl_directed_change_done ,
2380
 
2381
    phy_rdy_n                                  => phy_rdy_n ,
2382
    dbg_sclr_a                                 => open ,
2383
    dbg_sclr_b                                 => open ,
2384
    dbg_sclr_c                                 => open ,
2385
    dbg_sclr_d                                 => open ,
2386
    dbg_sclr_e                                 => open ,
2387
    dbg_sclr_f                                 => open ,
2388
    dbg_sclr_g                                 => open ,
2389
    dbg_sclr_h                                 => open ,
2390
    dbg_sclr_i                                 => open ,
2391
    dbg_sclr_j                                 => open ,
2392
    dbg_sclr_k                                 => open ,
2393
 
2394
    dbg_vec_a                                  => open ,
2395
    dbg_vec_b                                  => open ,
2396
    dbg_vec_c                                  => open ,
2397
    pl_dbg_vec                                 => open ,
2398
    trn_rdllp_data                             => open ,
2399
    trn_rdllp_src_rdy                          => open ,
2400
    dbg_mode                                   => "00" ,
2401
    dbg_sub_mode                               => '0' ,
2402
    pl_dbg_mode                                => "000" ,
2403
 
2404
 
2405
    drp_clk                               => '0',
2406
    drp_en                                => '0',
2407
    drp_we                                => '0',
2408
    drp_addr                              => "000000000",
2409
    drp_di                                => X"0000",
2410
    drp_do                                => open,
2411
    drp_rdy                               => open,
2412
    -- Pipe Interface
2413
 
2414
    pipe_clk                                   => pipe_clk            ,
2415
    user_clk                                   => user_clk            ,
2416
    user_clk2                                  => user_clk2           ,
2417
    pipe_rx0_polarity_gt                       => pipe_rx0_polarity_gt       ,
2418
    pipe_rx1_polarity_gt                       => pipe_rx1_polarity_gt       ,
2419
    pipe_rx2_polarity_gt                       => pipe_rx2_polarity_gt       ,
2420
    pipe_rx3_polarity_gt                       => pipe_rx3_polarity_gt       ,
2421
    pipe_rx4_polarity_gt                       => pipe_rx4_polarity_gt       ,
2422
    pipe_rx5_polarity_gt                       => pipe_rx5_polarity_gt       ,
2423
    pipe_rx6_polarity_gt                       => pipe_rx6_polarity_gt       ,
2424
    pipe_rx7_polarity_gt                       => pipe_rx7_polarity_gt       ,
2425
    pipe_tx_deemph_gt                          => pipe_tx_deemph_gt          ,
2426
    pipe_tx_margin_gt                          => pipe_tx_margin_gt          ,
2427
    pipe_tx_rate_gt                            => pipe_tx_rate_gt            ,
2428
    pipe_tx_rcvr_det_gt                        => pipe_tx_rcvr_det_gt        ,
2429
    pipe_tx0_char_is_k_gt                      => pipe_tx0_char_is_k_gt      ,
2430
    pipe_tx0_compliance_gt                     => pipe_tx0_compliance_gt     ,
2431
    pipe_tx0_data_gt                           => pipe_tx0_data_gt           ,
2432
    pipe_tx0_elec_idle_gt                      => pipe_tx0_elec_idle_gt      ,
2433
    pipe_tx0_powerdown_gt                      => pipe_tx0_powerdown_gt      ,
2434
    pipe_tx1_char_is_k_gt                      => pipe_tx1_char_is_k_gt      ,
2435
    pipe_tx1_compliance_gt                     => pipe_tx1_compliance_gt     ,
2436
    pipe_tx1_data_gt                           => pipe_tx1_data_gt           ,
2437
    pipe_tx1_elec_idle_gt                      => pipe_tx1_elec_idle_gt      ,
2438
    pipe_tx1_powerdown_gt                      => pipe_tx1_powerdown_gt      ,
2439
    pipe_tx2_char_is_k_gt                      => pipe_tx2_char_is_k_gt      ,
2440
    pipe_tx2_compliance_gt                     => pipe_tx2_compliance_gt     ,
2441
    pipe_tx2_data_gt                           => pipe_tx2_data_gt           ,
2442
    pipe_tx2_elec_idle_gt                      => pipe_tx2_elec_idle_gt      ,
2443
    pipe_tx2_powerdown_gt                      => pipe_tx2_powerdown_gt      ,
2444
    pipe_tx3_char_is_k_gt                      => pipe_tx3_char_is_k_gt      ,
2445
    pipe_tx3_compliance_gt                     => pipe_tx3_compliance_gt     ,
2446
    pipe_tx3_data_gt                           => pipe_tx3_data_gt           ,
2447
    pipe_tx3_elec_idle_gt                      => pipe_tx3_elec_idle_gt      ,
2448
    pipe_tx3_powerdown_gt                      => pipe_tx3_powerdown_gt      ,
2449
    pipe_tx4_char_is_k_gt                      => pipe_tx4_char_is_k_gt      ,
2450
    pipe_tx4_compliance_gt                     => pipe_tx4_compliance_gt     ,
2451
    pipe_tx4_data_gt                           => pipe_tx4_data_gt           ,
2452
    pipe_tx4_elec_idle_gt                      => pipe_tx4_elec_idle_gt      ,
2453
    pipe_tx4_powerdown_gt                      => pipe_tx4_powerdown_gt      ,
2454
    pipe_tx5_char_is_k_gt                      => pipe_tx5_char_is_k_gt      ,
2455
    pipe_tx5_compliance_gt                     => pipe_tx5_compliance_gt     ,
2456
    pipe_tx5_data_gt                           => pipe_tx5_data_gt           ,
2457
    pipe_tx5_elec_idle_gt                      => pipe_tx5_elec_idle_gt      ,
2458
    pipe_tx5_powerdown_gt                      => pipe_tx5_powerdown_gt      ,
2459
    pipe_tx6_char_is_k_gt                      => pipe_tx6_char_is_k_gt      ,
2460
    pipe_tx6_compliance_gt                     => pipe_tx6_compliance_gt     ,
2461
    pipe_tx6_data_gt                           => pipe_tx6_data_gt           ,
2462
    pipe_tx6_elec_idle_gt                      => pipe_tx6_elec_idle_gt      ,
2463
    pipe_tx6_powerdown_gt                      => pipe_tx6_powerdown_gt      ,
2464
    pipe_tx7_char_is_k_gt                      => pipe_tx7_char_is_k_gt      ,
2465
    pipe_tx7_compliance_gt                     => pipe_tx7_compliance_gt     ,
2466
    pipe_tx7_data_gt                           => pipe_tx7_data_gt           ,
2467
    pipe_tx7_elec_idle_gt                      => pipe_tx7_elec_idle_gt      ,
2468
    pipe_tx7_powerdown_gt                      => pipe_tx7_powerdown_gt      ,
2469
 
2470
    pipe_rx0_chanisaligned_gt                  => pipe_rx0_chanisaligned_gt  ,
2471
    pipe_rx0_char_is_k_gt                      => pipe_rx0_char_is_k_gt      ,
2472
    pipe_rx0_data_gt                           => pipe_rx0_data_gt           ,
2473
    pipe_rx0_elec_idle_gt                      => pipe_rx0_elec_idle_gt      ,
2474
    pipe_rx0_phy_status_gt                     => pipe_rx0_phy_status_gt     ,
2475
    pipe_rx0_status_gt                         => pipe_rx0_status_gt         ,
2476
    pipe_rx0_valid_gt                          => pipe_rx0_valid_gt          ,
2477
    pipe_rx1_chanisaligned_gt                  => pipe_rx1_chanisaligned_gt  ,
2478
    pipe_rx1_char_is_k_gt                      => pipe_rx1_char_is_k_gt      ,
2479
    pipe_rx1_data_gt                           => pipe_rx1_data_gt           ,
2480
    pipe_rx1_elec_idle_gt                      => pipe_rx1_elec_idle_gt      ,
2481
    pipe_rx1_phy_status_gt                     => pipe_rx1_phy_status_gt     ,
2482
    pipe_rx1_status_gt                         => pipe_rx1_status_gt         ,
2483
    pipe_rx1_valid_gt                          => pipe_rx1_valid_gt          ,
2484
    pipe_rx2_chanisaligned_gt                  => pipe_rx2_chanisaligned_gt  ,
2485
    pipe_rx2_char_is_k_gt                      => pipe_rx2_char_is_k_gt      ,
2486
    pipe_rx2_data_gt                           => pipe_rx2_data_gt           ,
2487
    pipe_rx2_elec_idle_gt                      => pipe_rx2_elec_idle_gt      ,
2488
    pipe_rx2_phy_status_gt                     => pipe_rx2_phy_status_gt     ,
2489
    pipe_rx2_status_gt                         => pipe_rx2_status_gt         ,
2490
    pipe_rx2_valid_gt                          => pipe_rx2_valid_gt          ,
2491
    pipe_rx3_chanisaligned_gt                  => pipe_rx3_chanisaligned_gt  ,
2492
    pipe_rx3_char_is_k_gt                      => pipe_rx3_char_is_k_gt      ,
2493
    pipe_rx3_data_gt                           => pipe_rx3_data_gt           ,
2494
    pipe_rx3_elec_idle_gt                      => pipe_rx3_elec_idle_gt      ,
2495
    pipe_rx3_phy_status_gt                     => pipe_rx3_phy_status_gt     ,
2496
    pipe_rx3_status_gt                         => pipe_rx3_status_gt         ,
2497
    pipe_rx3_valid_gt                          => pipe_rx3_valid_gt          ,
2498
    pipe_rx4_chanisaligned_gt                  => pipe_rx4_chanisaligned_gt  ,
2499
    pipe_rx4_char_is_k_gt                      => pipe_rx4_char_is_k_gt      ,
2500
    pipe_rx4_data_gt                           => pipe_rx4_data_gt           ,
2501
    pipe_rx4_elec_idle_gt                      => pipe_rx4_elec_idle_gt      ,
2502
    pipe_rx4_phy_status_gt                     => pipe_rx4_phy_status_gt     ,
2503
    pipe_rx4_status_gt                         => pipe_rx4_status_gt         ,
2504
    pipe_rx4_valid_gt                          => pipe_rx4_valid_gt          ,
2505
    pipe_rx5_chanisaligned_gt                  => pipe_rx5_chanisaligned_gt  ,
2506
    pipe_rx5_char_is_k_gt                      => pipe_rx5_char_is_k_gt      ,
2507
    pipe_rx5_data_gt                           => pipe_rx5_data_gt           ,
2508
    pipe_rx5_elec_idle_gt                      => pipe_rx5_elec_idle_gt      ,
2509
    pipe_rx5_phy_status_gt                     => pipe_rx5_phy_status_gt     ,
2510
    pipe_rx5_status_gt                         => pipe_rx5_status_gt         ,
2511
    pipe_rx5_valid_gt                          => pipe_rx5_valid_gt          ,
2512
    pipe_rx6_chanisaligned_gt                  => pipe_rx6_chanisaligned_gt  ,
2513
    pipe_rx6_char_is_k_gt                      => pipe_rx6_char_is_k_gt      ,
2514
    pipe_rx6_data_gt                           => pipe_rx6_data_gt           ,
2515
    pipe_rx6_elec_idle_gt                      => pipe_rx6_elec_idle_gt      ,
2516
    pipe_rx6_phy_status_gt                     => pipe_rx6_phy_status_gt     ,
2517
    pipe_rx6_status_gt                         => pipe_rx6_status_gt         ,
2518
    pipe_rx6_valid_gt                          => pipe_rx6_valid_gt          ,
2519
    pipe_rx7_chanisaligned_gt                  => pipe_rx7_chanisaligned_gt  ,
2520
    pipe_rx7_char_is_k_gt                      => pipe_rx7_char_is_k_gt      ,
2521
    pipe_rx7_data_gt                           => pipe_rx7_data_gt           ,
2522
    pipe_rx7_elec_idle_gt                      => pipe_rx7_elec_idle_gt      ,
2523
    pipe_rx7_phy_status_gt                     => pipe_rx7_phy_status_gt     ,
2524
    pipe_rx7_status_gt                         => pipe_rx7_status_gt         ,
2525
    pipe_rx7_valid_gt                          => pipe_rx7_valid_gt
2526
 
2527
  );
2528
 
2529
  ----------------------------------------------------------------------------------------------------------------------
2530
  -- **** V7/K7/A7 GTX Wrapper ****                                                                                   --
2531
  --   The 7-Series GTX Wrapper includes the following:                                                               --
2532
  --     1) Virtex-7 GTX                                                                                              --
2533
  --     2) Kintex-7 GTX                                                                                              --
2534
  --     3) Artix-7  GTP                                                                                              --
2535
  ----------------------------------------------------------------------------------------------------------------------
2536
  gt_top_i : cl_a7pcie_x4_gt_top
2537
  generic map (
2538
    LINK_CAP_MAX_LINK_WIDTH_int   => LINK_CAP_MAX_LINK_WIDTH_int,
2539
    REF_CLK_FREQ                  => REF_CLK_FREQ,
2540
    USER_CLK_FREQ                 => USER_CLK_FREQ,
2541
    USER_CLK2_DIV2                => USER_CLK2_DIV2,
2542
    PL_FAST_TRAIN                 => PL_FAST_TRAIN,
2543
    PCIE_EXT_CLK                  => PCIE_EXT_CLK,
2544
    PCIE_USE_MODE                 => PCIE_USE_MODE,
2545
    PCIE_GT_DEVICE                => PCIE_GT_DEVICE,
2546
    PCIE_PLL_SEL                  => PCIE_PLL_SEL,
2547
    PCIE_ASYNC_EN                 => PCIE_ASYNC_EN,
2548
    PCIE_TXBUF_EN                 => PCIE_TXBUF_EN,
2549
    PCIE_CHAN_BOND                => PCIE_CHAN_BOND
2550
  )
2551
  port map (
2552
    -- pl ltssm
2553
    pl_ltssm_state                => pl_ltssm_state_int ,
2554
 
2555
    -- Pipe Common Signals
2556
    pipe_tx_rcvr_det              => pipe_tx_rcvr_det_gt ,
2557
    pipe_tx_reset                 => '0' ,
2558
    pipe_tx_rate                  => pipe_tx_rate_gt ,
2559
    pipe_tx_deemph                => pipe_tx_deemph_gt ,
2560
    pipe_tx_margin                => pipe_tx_margin_gt ,
2561
    pipe_tx_swing                 => '0' ,
2562
 
2563
    PIPE_PCLK_IN                  => PIPE_PCLK_IN ,
2564
    PIPE_RXUSRCLK_IN              => PIPE_RXUSRCLK_IN ,
2565
    PIPE_RXOUTCLK_IN              => PIPE_RXOUTCLK_IN ,
2566
    PIPE_DCLK_IN                  => PIPE_DCLK_IN ,
2567
    PIPE_USERCLK1_IN              => PIPE_USERCLK1_IN ,
2568
    PIPE_USERCLK2_IN              => PIPE_USERCLK2_IN ,
2569
    PIPE_OOBCLK_IN                => PIPE_OOBCLK_IN,
2570
    PIPE_MMCM_LOCK_IN             => PIPE_MMCM_LOCK_IN,
2571
 
2572
    PIPE_TXOUTCLK_OUT             => PIPE_TXOUTCLK_OUT,
2573
    PIPE_RXOUTCLK_OUT             => PIPE_RXOUTCLK_OUT,
2574
    PIPE_PCLK_SEL_OUT             => PIPE_PCLK_SEL_OUT,
2575
    PIPE_GEN3_OUT                 => PIPE_GEN3_OUT ,
2576
 
2577
    -- Pipe Per-Lane Signals - Lane 0
2578
    pipe_rx0_char_is_k            =>  pipe_rx0_char_is_k_gt ,
2579
    pipe_rx0_data                 =>  pipe_rx0_data_gt     ,
2580
    pipe_rx0_valid                =>  pipe_rx0_valid_gt    ,
2581
    pipe_rx0_chanisaligned        =>  pipe_rx0_chanisaligned_gt   ,
2582
    pipe_rx0_status               =>  pipe_rx0_status_gt      ,
2583
    pipe_rx0_phy_status           =>  pipe_rx0_phy_status_gt  ,
2584
    pipe_rx0_elec_idle            =>  pipe_rx0_elec_idle_gt   ,
2585
    pipe_rx0_polarity             =>  pipe_rx0_polarity_gt    ,
2586
    pipe_tx0_compliance           =>  pipe_tx0_compliance_gt  ,
2587
    pipe_tx0_char_is_k            =>  pipe_tx0_char_is_k_gt   ,
2588
    pipe_tx0_data                 =>  pipe_tx0_data_gt        ,
2589
    pipe_tx0_elec_idle            =>  pipe_tx0_elec_idle_gt   ,
2590
    pipe_tx0_powerdown            =>  pipe_tx0_powerdown_gt   ,
2591
 
2592
    -- Pipe Per-Lane Signals - Lane 1
2593
 
2594
    pipe_rx1_char_is_k            =>  pipe_rx1_char_is_k_gt,
2595
    pipe_rx1_data                 =>  pipe_rx1_data_gt     ,
2596
    pipe_rx1_valid                =>  pipe_rx1_valid_gt    ,
2597
    pipe_rx1_chanisaligned        =>  pipe_rx1_chanisaligned_gt   ,
2598
    pipe_rx1_status               =>  pipe_rx1_status_gt      ,
2599
    pipe_rx1_phy_status           =>  pipe_rx1_phy_status_gt  ,
2600
    pipe_rx1_elec_idle            =>  pipe_rx1_elec_idle_gt   ,
2601
    pipe_rx1_polarity             =>  pipe_rx1_polarity_gt    ,
2602
    pipe_tx1_compliance           =>  pipe_tx1_compliance_gt  ,
2603
    pipe_tx1_char_is_k            =>  pipe_tx1_char_is_k_gt   ,
2604
    pipe_tx1_data                 =>  pipe_tx1_data_gt        ,
2605
    pipe_tx1_elec_idle            =>  pipe_tx1_elec_idle_gt   ,
2606
    pipe_tx1_powerdown            =>  pipe_tx1_powerdown_gt   ,
2607
 
2608
    -- Pipe Per-Lane Signals - Lane 2
2609
 
2610
    pipe_rx2_char_is_k            =>  pipe_rx2_char_is_k_gt,
2611
    pipe_rx2_data                 =>  pipe_rx2_data_gt     ,
2612
    pipe_rx2_valid                =>  pipe_rx2_valid_gt    ,
2613
    pipe_rx2_chanisaligned        =>  pipe_rx2_chanisaligned_gt   ,
2614
    pipe_rx2_status               =>  pipe_rx2_status_gt      ,
2615
    pipe_rx2_phy_status           =>  pipe_rx2_phy_status_gt  ,
2616
    pipe_rx2_elec_idle            =>  pipe_rx2_elec_idle_gt   ,
2617
    pipe_rx2_polarity             =>  pipe_rx2_polarity_gt    ,
2618
    pipe_tx2_compliance           =>  pipe_tx2_compliance_gt  ,
2619
    pipe_tx2_char_is_k            =>  pipe_tx2_char_is_k_gt   ,
2620
    pipe_tx2_data                 =>  pipe_tx2_data_gt        ,
2621
    pipe_tx2_elec_idle            =>  pipe_tx2_elec_idle_gt   ,
2622
    pipe_tx2_powerdown            =>  pipe_tx2_powerdown_gt   ,
2623
 
2624
    -- Pipe Per-Lane Signals - Lane 3
2625
 
2626
    pipe_rx3_char_is_k            =>  pipe_rx3_char_is_k_gt,
2627
    pipe_rx3_data                 =>  pipe_rx3_data_gt     ,
2628
    pipe_rx3_valid                =>  pipe_rx3_valid_gt    ,
2629
    pipe_rx3_chanisaligned        =>  pipe_rx3_chanisaligned_gt   ,
2630
    pipe_rx3_status               =>  pipe_rx3_status_gt      ,
2631
    pipe_rx3_phy_status           =>  pipe_rx3_phy_status_gt  ,
2632
    pipe_rx3_elec_idle            =>  pipe_rx3_elec_idle_gt   ,
2633
    pipe_rx3_polarity             =>  pipe_rx3_polarity_gt    ,
2634
    pipe_tx3_compliance           =>  pipe_tx3_compliance_gt  ,
2635
    pipe_tx3_char_is_k            =>  pipe_tx3_char_is_k_gt   ,
2636
    pipe_tx3_data                 =>  pipe_tx3_data_gt        ,
2637
    pipe_tx3_elec_idle            =>  pipe_tx3_elec_idle_gt   ,
2638
    pipe_tx3_powerdown            =>  pipe_tx3_powerdown_gt   ,
2639
 
2640
    -- Pipe Per-Lane Signals - Lane 4
2641
 
2642
    pipe_rx4_char_is_k            =>  pipe_rx4_char_is_k_gt,
2643
    pipe_rx4_data                 =>  pipe_rx4_data_gt     ,
2644
    pipe_rx4_valid                =>  pipe_rx4_valid_gt    ,
2645
    pipe_rx4_chanisaligned        =>  pipe_rx4_chanisaligned_gt   ,
2646
    pipe_rx4_status               =>  pipe_rx4_status_gt      ,
2647
    pipe_rx4_phy_status           =>  pipe_rx4_phy_status_gt  ,
2648
    pipe_rx4_elec_idle            =>  pipe_rx4_elec_idle_gt   ,
2649
    pipe_rx4_polarity             =>  pipe_rx4_polarity_gt    ,
2650
    pipe_tx4_compliance           =>  pipe_tx4_compliance_gt  ,
2651
    pipe_tx4_char_is_k            =>  pipe_tx4_char_is_k_gt   ,
2652
    pipe_tx4_data                 =>  pipe_tx4_data_gt        ,
2653
    pipe_tx4_elec_idle            =>  pipe_tx4_elec_idle_gt   ,
2654
    pipe_tx4_powerdown            =>  pipe_tx4_powerdown_gt   ,
2655
 
2656
    -- Pipe Per-Lane Signals - Lane 5
2657
 
2658
    pipe_rx5_char_is_k            =>  pipe_rx5_char_is_k_gt,
2659
    pipe_rx5_data                 =>  pipe_rx5_data_gt     ,
2660
    pipe_rx5_valid                =>  pipe_rx5_valid_gt    ,
2661
    pipe_rx5_chanisaligned        =>  pipe_rx5_chanisaligned_gt   ,
2662
    pipe_rx5_status               =>  pipe_rx5_status_gt      ,
2663
    pipe_rx5_phy_status           =>  pipe_rx5_phy_status_gt  ,
2664
    pipe_rx5_elec_idle            =>  pipe_rx5_elec_idle_gt   ,
2665
    pipe_rx5_polarity             =>  pipe_rx5_polarity_gt    ,
2666
    pipe_tx5_compliance           =>  pipe_tx5_compliance_gt  ,
2667
    pipe_tx5_char_is_k            =>  pipe_tx5_char_is_k_gt   ,
2668
    pipe_tx5_data                 =>  pipe_tx5_data_gt        ,
2669
    pipe_tx5_elec_idle            =>  pipe_tx5_elec_idle_gt   ,
2670
    pipe_tx5_powerdown            =>  pipe_tx5_powerdown_gt   ,
2671
 
2672
    -- Pipe Per-Lane Signals - Lane 6
2673
 
2674
    pipe_rx6_char_is_k            =>  pipe_rx6_char_is_k_gt,
2675
    pipe_rx6_data                 =>  pipe_rx6_data_gt     ,
2676
    pipe_rx6_valid                =>  pipe_rx6_valid_gt    ,
2677
    pipe_rx6_chanisaligned        =>  pipe_rx6_chanisaligned_gt   ,
2678
    pipe_rx6_status               =>  pipe_rx6_status_gt      ,
2679
    pipe_rx6_phy_status           =>  pipe_rx6_phy_status_gt  ,
2680
    pipe_rx6_elec_idle            =>  pipe_rx6_elec_idle_gt   ,
2681
    pipe_rx6_polarity             =>  pipe_rx6_polarity_gt    ,
2682
    pipe_tx6_compliance           =>  pipe_tx6_compliance_gt  ,
2683
    pipe_tx6_char_is_k            =>  pipe_tx6_char_is_k_gt   ,
2684
    pipe_tx6_data                 =>  pipe_tx6_data_gt        ,
2685
    pipe_tx6_elec_idle            =>  pipe_tx6_elec_idle_gt   ,
2686
    pipe_tx6_powerdown            =>  pipe_tx6_powerdown_gt   ,
2687
 
2688
    -- Pipe Per-Lane Signals - Lane 7
2689
 
2690
    pipe_rx7_char_is_k            =>  pipe_rx7_char_is_k_gt,
2691
    pipe_rx7_data                 =>  pipe_rx7_data_gt     ,
2692
    pipe_rx7_valid                =>  pipe_rx7_valid_gt    ,
2693
    pipe_rx7_chanisaligned        =>  pipe_rx7_chanisaligned_gt   ,
2694
    pipe_rx7_status               =>  pipe_rx7_status_gt      ,
2695
    pipe_rx7_phy_status           =>  pipe_rx7_phy_status_gt  ,
2696
    pipe_rx7_elec_idle            =>  pipe_rx7_elec_idle_gt   ,
2697
    pipe_rx7_polarity             =>  pipe_rx7_polarity_gt    ,
2698
    pipe_tx7_compliance           =>  pipe_tx7_compliance_gt  ,
2699
    pipe_tx7_char_is_k            =>  pipe_tx7_char_is_k_gt   ,
2700
    pipe_tx7_data                 =>  pipe_tx7_data_gt        ,
2701
    pipe_tx7_elec_idle            =>  pipe_tx7_elec_idle_gt   ,
2702
    pipe_tx7_powerdown            =>  pipe_tx7_powerdown_gt   ,
2703
 
2704
    -- PCI Express Signals
2705
    pci_exp_txn                   =>  pci_exp_txn          ,
2706
    pci_exp_txp                   =>  pci_exp_txp          ,
2707
    pci_exp_rxn                   =>  pci_exp_rxn          ,
2708
    pci_exp_rxp                   =>  pci_exp_rxp          ,
2709
 
2710
    -- Non PIPE Signals
2711
    sys_clk                       =>  sys_clk             ,
2712
    sys_rst_n                     =>  sys_rst_n           ,
2713
    PIPE_MMCM_RST_N               =>  PIPE_MMCM_RST_N     ,        -- Async      | Async
2714
    pipe_clk                      =>  pipe_clk            ,
2715
 
2716
    user_clk                      =>  user_clk            ,
2717
    user_clk2                     =>  user_clk2           ,
2718
    phy_rdy_n                     =>  phy_rdy_n
2719
  );
2720
 
2721
end pcie_7x;

powered by: WebSVN 2.1.0

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