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_pcie_top.vhd] - Blame information for rev 48

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_pcie_top.vhd
52 48 dsmv
-- Version    : 1.10
53 46 dsmv
-- Description: Solution wrapper for Virtex7 Hard Block for PCI Express
54
--
55
--
56
--
57
----------------------------------------------------------------------------------
58
 
59
library ieee;
60
use ieee.std_logic_1164.all;
61
use ieee.std_logic_misc.all;
62
use ieee.std_logic_unsigned.all;
63
 
64
--library unisim;
65
--use unisim.vcomponents.all;
66
 
67
entity cl_a7pcie_x4_pcie_top is
68
  generic (
69
  -- PCIE_2_1 params
70
  C_DATA_WIDTH                                   : INTEGER range 64 to 128 := 64;
71
  C_REM_WIDTH                                    : INTEGER range 0 to 128  :=  1;
72
  PIPE_PIPELINE_STAGES                           : INTEGER range 0 to 2 := 0;      -- 0 - 0 stages, 1 - 1 stage, 2 - 2 stages
73
  -- PCIE_2_1 params
74
  AER_BASE_PTR                                   : bit_vector := X"140";
75
  AER_CAP_ECRC_CHECK_CAPABLE                     : string     := "FALSE";
76
  AER_CAP_ECRC_GEN_CAPABLE                       : string     := "FALSE";
77
  AER_CAP_ID                                     : bit_vector := X"0001";
78
  AER_CAP_MULTIHEADER                            : string     := "FALSE";
79
  AER_CAP_NEXTPTR                                : bit_vector := X"178";
80
  AER_CAP_ON                                     : string     := "FALSE";
81
  AER_CAP_OPTIONAL_ERR_SUPPORT                   : bit_vector := X"000000";
82
  AER_CAP_PERMIT_ROOTERR_UPDATE                  : string     := "TRUE";
83
  AER_CAP_VERSION                                : bit_vector := X"2";
84
  ALLOW_X8_GEN2                                  : string     := "FALSE";
85
  BAR0                                           : bit_vector := X"FFFFFF00";
86
  BAR1                                           : bit_vector := X"FFFF0000";
87
  BAR2                                           : bit_vector := X"FFFF000C";
88
  BAR3                                           : bit_vector := X"FFFFFFFF";
89
  BAR4                                           : bit_vector := X"00000000";
90
  BAR5                                           : bit_vector := X"00000000";
91
  CAPABILITIES_PTR                               : bit_vector := X"40";
92
  CARDBUS_CIS_POINTER                            : bit_vector := X"00000000";
93
  CFG_ECRC_ERR_CPLSTAT                           : integer    := 0;
94
  CLASS_CODE                                     : bit_vector := X"000000";
95
  CMD_INTX_IMPLEMENTED                           : string     := "TRUE";
96
  CPL_TIMEOUT_DISABLE_SUPPORTED                  : string     := "FALSE";
97
  CPL_TIMEOUT_RANGES_SUPPORTED                   : bit_vector := X"0";
98
  CRM_MODULE_RSTS                                : bit_vector := X"00";
99
  DEV_CAP2_ARI_FORWARDING_SUPPORTED              : string     := "FALSE";
100
  DEV_CAP2_ATOMICOP32_COMPLETER_SUPPORTED        : string     := "FALSE";
101
  DEV_CAP2_ATOMICOP64_COMPLETER_SUPPORTED        : string     := "FALSE";
102
  DEV_CAP2_ATOMICOP_ROUTING_SUPPORTED            : string     := "FALSE";
103
  DEV_CAP2_CAS128_COMPLETER_SUPPORTED            : string     := "FALSE";
104
  DEV_CAP2_ENDEND_TLP_PREFIX_SUPPORTED           : string     := "FALSE";
105
  DEV_CAP2_EXTENDED_FMT_FIELD_SUPPORTED          : string     := "FALSE";
106
  DEV_CAP2_LTR_MECHANISM_SUPPORTED               : string     := "FALSE";
107
  DEV_CAP2_MAX_ENDEND_TLP_PREFIXES               : bit_vector := X"0";
108
  DEV_CAP2_NO_RO_ENABLED_PRPR_PASSING            : string     := "FALSE";
109
  DEV_CAP2_TPH_COMPLETER_SUPPORTED               : bit_vector := X"0";
110
  DEV_CAP_ENABLE_SLOT_PWR_LIMIT_SCALE            : string     := "TRUE";
111
  DEV_CAP_ENABLE_SLOT_PWR_LIMIT_VALUE            : string     := "TRUE";
112
  DEV_CAP_ENDPOINT_L0S_LATENCY                   : integer    := 0;
113
  DEV_CAP_ENDPOINT_L1_LATENCY                    : integer    := 0;
114
  DEV_CAP_EXT_TAG_SUPPORTED                      : string     := "TRUE";
115
  DEV_CAP_FUNCTION_LEVEL_RESET_CAPABLE           : string     := "FALSE";
116
  DEV_CAP_MAX_PAYLOAD_SUPPORTED                  : integer    := 2;
117
  DEV_CAP_PHANTOM_FUNCTIONS_SUPPORT              : integer    := 0;
118
  DEV_CAP_ROLE_BASED_ERROR                       : string     := "TRUE";
119
  DEV_CAP_RSVD_14_12                             : integer    := 0;
120
  DEV_CAP_RSVD_17_16                             : integer    := 0;
121
  DEV_CAP_RSVD_31_29                             : integer    := 0;
122
  DEV_CONTROL_AUX_POWER_SUPPORTED                : string     := "FALSE";
123
  DEV_CONTROL_EXT_TAG_DEFAULT                    : string     := "FALSE";
124
  DISABLE_ASPM_L1_TIMER                          : string     := "FALSE";
125
  DISABLE_BAR_FILTERING                          : string     := "FALSE";
126
  DISABLE_ERR_MSG                                : string     := "FALSE";
127
  DISABLE_ID_CHECK                               : string     := "FALSE";
128
  DISABLE_LANE_REVERSAL                          : string     := "FALSE";
129
  DISABLE_LOCKED_FILTER                          : string     := "FALSE";
130
  DISABLE_PPM_FILTER                             : string     := "FALSE";
131
  DISABLE_RX_POISONED_RESP                       : string     := "FALSE";
132
  DISABLE_RX_TC_FILTER                           : string     := "FALSE";
133
  DISABLE_SCRAMBLING                             : string     := "FALSE";
134
  DNSTREAM_LINK_NUM                              : bit_vector := X"00";
135
  DSN_BASE_PTR                                   : bit_vector := X"100";
136
  DSN_CAP_ID                                     : bit_vector := X"0003";
137
  DSN_CAP_NEXTPTR                                : bit_vector := X"10C";
138
  DSN_CAP_ON                                     : string     := "TRUE";
139
  DSN_CAP_VERSION                                : bit_vector := X"1";
140
  ENABLE_MSG_ROUTE                               : bit_vector := X"000";
141
  ENABLE_RX_TD_ECRC_TRIM                         : string     := "FALSE";
142
  ENDEND_TLP_PREFIX_FORWARDING_SUPPORTED         : string     := "FALSE";
143
  ENTER_RVRY_EI_L0                               : string     := "TRUE";
144
  EXIT_LOOPBACK_ON_EI                            : string     := "TRUE";
145
  EXPANSION_ROM                                  : bit_vector := X"FFFFF001";
146
  EXT_CFG_CAP_PTR                                : bit_vector := X"3F";
147
  EXT_CFG_XP_CAP_PTR                             : bit_vector := X"3FF";
148
  HEADER_TYPE                                    : bit_vector := X"00";
149
  INFER_EI                                       : bit_vector := X"00";
150
  INTERRUPT_PIN                                  : bit_vector := X"01";
151
  INTERRUPT_STAT_AUTO                            : string     := "TRUE";
152
  IS_SWITCH                                      : string     := "FALSE";
153
  LAST_CONFIG_DWORD                              : bit_vector := X"3FF";
154
  LINK_CAP_ASPM_OPTIONALITY                      : string     := "TRUE";
155
  LINK_CAP_ASPM_SUPPORT                          : integer    := 1;
156
  LINK_CAP_CLOCK_POWER_MANAGEMENT                : string     := "FALSE";
157
  LINK_CAP_DLL_LINK_ACTIVE_REPORTING_CAP         : string     := "FALSE";
158
  LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN1          : integer    := 7;
159
  LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN2          : integer    := 7;
160
  LINK_CAP_L0S_EXIT_LATENCY_GEN1                 : integer    := 7;
161
  LINK_CAP_L0S_EXIT_LATENCY_GEN2                 : integer    := 7;
162
  LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN1           : integer    := 7;
163
  LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN2           : integer    := 7;
164
  LINK_CAP_L1_EXIT_LATENCY_GEN1                  : integer    := 7;
165
  LINK_CAP_L1_EXIT_LATENCY_GEN2                  : integer    := 7;
166
  LINK_CAP_LINK_BANDWIDTH_NOTIFICATION_CAP       : string     := "FALSE";
167
  LINK_CAP_MAX_LINK_SPEED                        : bit_vector := X"1";
168
  LINK_CAP_MAX_LINK_SPEED_int                    : integer    := 1;
169
  LINK_CAP_MAX_LINK_WIDTH                        : bit_vector := X"08";
170
  LINK_CAP_MAX_LINK_WIDTH_int                    : integer    := 8;
171
  LINK_CAP_RSVD_23                               : integer    := 0;
172
  LINK_CAP_SURPRISE_DOWN_ERROR_CAPABLE           : string     := "FALSE";
173
  LINK_CONTROL_RCB                               : integer    := 0;
174
  LINK_CTRL2_DEEMPHASIS                          : string     := "FALSE";
175
  LINK_CTRL2_HW_AUTONOMOUS_SPEED_DISABLE         : string     := "FALSE";
176
  LINK_CTRL2_TARGET_LINK_SPEED                   : bit_vector := X"2";
177
  LINK_STATUS_SLOT_CLOCK_CONFIG                  : string     := "TRUE";
178
  LL_ACK_TIMEOUT                                 : bit_vector := X"0000";
179
  LL_ACK_TIMEOUT_EN                              : string     := "FALSE";
180
  LL_ACK_TIMEOUT_FUNC                            : integer    := 0;
181
  LL_REPLAY_TIMEOUT                              : bit_vector := X"0000";
182
  LL_REPLAY_TIMEOUT_EN                           : string     := "FALSE";
183
  LL_REPLAY_TIMEOUT_FUNC                         : integer    := 0;
184
  LTSSM_MAX_LINK_WIDTH                           : bit_vector := X"01";
185
  MPS_FORCE                                      : string     := "FALSE";
186
  MSIX_BASE_PTR                                  : bit_vector := X"9C";
187
  MSIX_CAP_ID                                    : bit_vector := X"11";
188
  MSIX_CAP_NEXTPTR                               : bit_vector := X"00";
189
  MSIX_CAP_ON                                    : string     := "FALSE";
190
  MSIX_CAP_PBA_BIR                               : integer    := 0;
191
  MSIX_CAP_PBA_OFFSET                            : bit_vector := X"00000050";
192
  MSIX_CAP_TABLE_BIR                             : integer    := 0;
193
  MSIX_CAP_TABLE_OFFSET                          : bit_vector := X"00000040";
194
  MSIX_CAP_TABLE_SIZE                            : bit_vector := X"000";
195
  MSI_BASE_PTR                                   : bit_vector := X"48";
196
  MSI_CAP_64_BIT_ADDR_CAPABLE                    : string     := "TRUE";
197
  MSI_CAP_ID                                     : bit_vector := X"05";
198
  MSI_CAP_MULTIMSGCAP                            : integer    := 0;
199
  MSI_CAP_MULTIMSG_EXTENSION                     : integer    := 0;
200
  MSI_CAP_NEXTPTR                                : bit_vector := X"60";
201
  MSI_CAP_ON                                     : string     := "FALSE";
202
  MSI_CAP_PER_VECTOR_MASKING_CAPABLE             : string     := "TRUE";
203
  N_FTS_COMCLK_GEN1                              : integer    := 255;
204
  N_FTS_COMCLK_GEN2                              : integer    := 255;
205
  N_FTS_GEN1                                     : integer    := 255;
206
  N_FTS_GEN2                                     : integer    := 255;
207
  PCIE_BASE_PTR                                  : bit_vector := X"60";
208
  PCIE_CAP_CAPABILITY_ID                         : bit_vector := X"10";
209
  PCIE_CAP_CAPABILITY_VERSION                    : bit_vector := X"2";
210
  PCIE_CAP_DEVICE_PORT_TYPE                      : bit_vector := X"0";
211
  PCIE_CAP_NEXTPTR                               : bit_vector := X"9C";
212
  PCIE_CAP_ON                                    : string     := "TRUE";
213
  PCIE_CAP_RSVD_15_14                            : integer    := 0;
214
  PCIE_CAP_SLOT_IMPLEMENTED                      : string     := "FALSE";
215
  PCIE_REVISION                                  : integer    := 2;
216
  PL_AUTO_CONFIG                                 : integer    := 0;
217
  PL_FAST_TRAIN                                  : string     := "FALSE";
218
  PM_ASPML0S_TIMEOUT                             : bit_vector := X"0000";
219
  PM_ASPML0S_TIMEOUT_EN                          : string     := "FALSE";
220
  PM_ASPML0S_TIMEOUT_FUNC                        : integer    := 0;
221
  PM_ASPM_FASTEXIT                               : string     := "FALSE";
222
  PM_BASE_PTR                                    : bit_vector := X"40";
223
  PM_CAP_AUXCURRENT                              : integer    := 0;
224
  PM_CAP_D1SUPPORT                               : string     := "TRUE";
225
  PM_CAP_D2SUPPORT                               : string     := "TRUE";
226
  PM_CAP_DSI                                     : string     := "FALSE";
227
  PM_CAP_ID                                      : bit_vector := X"01";
228
  PM_CAP_NEXTPTR                                 : bit_vector := X"48";
229
  PM_CAP_ON                                      : string     := "TRUE";
230
  PM_CAP_PMESUPPORT                              : bit_vector := X"0F";
231
  PM_CAP_PME_CLOCK                               : string     := "FALSE";
232
  PM_CAP_RSVD_04                                 : integer    := 0;
233
  PM_CAP_VERSION                                 : integer    := 3;
234
  PM_CSR_B2B3                                    : string     := "FALSE";
235
  PM_CSR_BPCCEN                                  : string     := "FALSE";
236
  PM_CSR_NOSOFTRST                               : string     := "TRUE";
237
  PM_DATA0                                       : bit_vector := X"01";
238
  PM_DATA1                                       : bit_vector := X"01";
239
  PM_DATA2                                       : bit_vector := X"01";
240
  PM_DATA3                                       : bit_vector := X"01";
241
  PM_DATA4                                       : bit_vector := X"01";
242
  PM_DATA5                                       : bit_vector := X"01";
243
  PM_DATA6                                       : bit_vector := X"01";
244
  PM_DATA7                                       : bit_vector := X"01";
245
  PM_DATA_SCALE0                                 : bit_vector := X"1";
246
  PM_DATA_SCALE1                                 : bit_vector := X"1";
247
  PM_DATA_SCALE2                                 : bit_vector := X"1";
248
  PM_DATA_SCALE3                                 : bit_vector := X"1";
249
  PM_DATA_SCALE4                                 : bit_vector := X"1";
250
  PM_DATA_SCALE5                                 : bit_vector := X"1";
251
  PM_DATA_SCALE6                                 : bit_vector := X"1";
252
  PM_DATA_SCALE7                                 : bit_vector := X"1";
253
  PM_MF                                          : string     := "FALSE";
254
  RBAR_BASE_PTR                                  : bit_vector := X"178";
255
  RBAR_CAP_CONTROL_ENCODEDBAR0                   : bit_vector := X"00";
256
  RBAR_CAP_CONTROL_ENCODEDBAR1                   : bit_vector := X"00";
257
  RBAR_CAP_CONTROL_ENCODEDBAR2                   : bit_vector := X"00";
258
  RBAR_CAP_CONTROL_ENCODEDBAR3                   : bit_vector := X"00";
259
  RBAR_CAP_CONTROL_ENCODEDBAR4                   : bit_vector := X"00";
260
  RBAR_CAP_CONTROL_ENCODEDBAR5                   : bit_vector := X"00";
261
  RBAR_CAP_ID                                    : bit_vector := X"0015";
262
  RBAR_CAP_INDEX0                                : bit_vector := X"0";
263
  RBAR_CAP_INDEX1                                : bit_vector := X"0";
264
  RBAR_CAP_INDEX2                                : bit_vector := X"0";
265
  RBAR_CAP_INDEX3                                : bit_vector := X"0";
266
  RBAR_CAP_INDEX4                                : bit_vector := X"0";
267
  RBAR_CAP_INDEX5                                : bit_vector := X"0";
268
  RBAR_CAP_NEXTPTR                               : bit_vector := X"000";
269
  RBAR_CAP_ON                                    : string     := "FALSE";
270
  RBAR_CAP_SUP0                                  : bit_vector := X"00000000";
271
  RBAR_CAP_SUP1                                  : bit_vector := X"00000000";
272
  RBAR_CAP_SUP2                                  : bit_vector := X"00000000";
273
  RBAR_CAP_SUP3                                  : bit_vector := X"00000000";
274
  RBAR_CAP_SUP4                                  : bit_vector := X"00000000";
275
  RBAR_CAP_SUP5                                  : bit_vector := X"00000000";
276
  RBAR_CAP_VERSION                               : bit_vector := X"1";
277
  RBAR_NUM                                       : bit_vector := X"1";
278
  RECRC_CHK                                      : integer    := 0;
279
  RECRC_CHK_TRIM                                 : string     := "FALSE";
280
  ROOT_CAP_CRS_SW_VISIBILITY                     : string     := "FALSE";
281
  RP_AUTO_SPD                                    : bit_vector := X"1";
282
  RP_AUTO_SPD_LOOPCNT                            : bit_vector := X"1F";
283
  SELECT_DLL_IF                                  : string     := "FALSE";
284
  SIM_VERSION                                    : string     := "1.0";
285
  SLOT_CAP_ATT_BUTTON_PRESENT                    : string     := "FALSE";
286
  SLOT_CAP_ATT_INDICATOR_PRESENT                 : string     := "FALSE";
287
  SLOT_CAP_ELEC_INTERLOCK_PRESENT                : string     := "FALSE";
288
  SLOT_CAP_HOTPLUG_CAPABLE                       : string     := "FALSE";
289
  SLOT_CAP_HOTPLUG_SURPRISE                      : string     := "FALSE";
290
  SLOT_CAP_MRL_SENSOR_PRESENT                    : string     := "FALSE";
291
  SLOT_CAP_NO_CMD_COMPLETED_SUPPORT              : string     := "FALSE";
292
  SLOT_CAP_PHYSICAL_SLOT_NUM                     : bit_vector := X"0000";
293
  SLOT_CAP_POWER_CONTROLLER_PRESENT              : string     := "FALSE";
294
  SLOT_CAP_POWER_INDICATOR_PRESENT               : string     := "FALSE";
295
  SLOT_CAP_SLOT_POWER_LIMIT_SCALE                : integer    := 0;
296
  SLOT_CAP_SLOT_POWER_LIMIT_VALUE                : bit_vector := X"00";
297
  SPARE_BIT0                                     : integer    := 0;
298
  SPARE_BIT1                                     : integer    := 0;
299
  SPARE_BIT2                                     : integer    := 0;
300
  SPARE_BIT3                                     : integer    := 0;
301
  SPARE_BIT4                                     : integer    := 0;
302
  SPARE_BIT5                                     : integer    := 0;
303
  SPARE_BIT6                                     : integer    := 0;
304
  SPARE_BIT7                                     : integer    := 0;
305
  SPARE_BIT8                                     : integer    := 0;
306
  SPARE_BYTE0                                    : bit_vector := X"00";
307
  SPARE_BYTE1                                    : bit_vector := X"00";
308
  SPARE_BYTE2                                    : bit_vector := X"00";
309
  SPARE_BYTE3                                    : bit_vector := X"00";
310
  SPARE_WORD0                                    : bit_vector := X"00000000";
311
  SPARE_WORD1                                    : bit_vector := X"00000000";
312
  SPARE_WORD2                                    : bit_vector := X"00000000";
313
  SPARE_WORD3                                    : bit_vector := X"00000000";
314
  SSL_MESSAGE_AUTO                               : string     := "FALSE";
315
  TECRC_EP_INV                                   : string     := "FALSE";
316
  TL_RBYPASS                                     : string     := "FALSE";
317
  TL_RX_RAM_RADDR_LATENCY                        : integer    := 0;
318
  TL_RX_RAM_RDATA_LATENCY                        : integer    := 2;
319
  TL_RX_RAM_WRITE_LATENCY                        : integer    := 0;
320
  TL_TFC_DISABLE                                 : string     := "FALSE";
321
  TL_TX_CHECKS_DISABLE                           : string     := "FALSE";
322
  TL_TX_RAM_RADDR_LATENCY                        : integer    := 0;
323
  TL_TX_RAM_RDATA_LATENCY                        : integer    := 2;
324
  TL_TX_RAM_WRITE_LATENCY                        : integer    := 0;
325
  TRN_DW                                         : string     := "FALSE";
326
  TRN_NP_FC                                      : string     := "FALSE";
327
  UPCONFIG_CAPABLE                               : string     := "TRUE";
328
  UPSTREAM_FACING                                : string     := "TRUE";
329
  UR_ATOMIC                                      : string     := "TRUE";
330
  UR_CFG1                                        : string     := "TRUE";
331
  UR_INV_REQ                                     : string     := "TRUE";
332
  UR_PRS_RESPONSE                                : string     := "TRUE";
333
  USER_CLK2_DIV2                                 : string     := "FALSE";
334
  USER_CLK_FREQ                                  : integer    := 3;
335
  USE_RID_PINS                                   : string     := "FALSE";
336
  VC0_CPL_INFINITE                               : string     := "TRUE";
337
  VC0_RX_RAM_LIMIT                               : bit_vector := X"03FF";
338
  VC0_TOTAL_CREDITS_CD                           : integer    := 127;
339
  VC0_TOTAL_CREDITS_CH                           : integer    := 31;
340
  VC0_TOTAL_CREDITS_NPD                          : integer    := 24;
341
  VC0_TOTAL_CREDITS_NPH                          : integer    := 12;
342
  VC0_TOTAL_CREDITS_PD                           : integer    := 288;
343
  VC0_TOTAL_CREDITS_PH                           : integer    := 32;
344
  VC0_TX_LASTPACKET                              : integer    := 31;
345
  VC_BASE_PTR                                    : bit_vector := X"10C";
346
  VC_CAP_ID                                      : bit_vector := X"0002";
347
  VC_CAP_NEXTPTR                                 : bit_vector := X"000";
348
  VC_CAP_ON                                      : string     := "FALSE";
349
  VC_CAP_REJECT_SNOOP_TRANSACTIONS               : string     := "FALSE";
350
  VC_CAP_VERSION                                 : bit_vector := X"1";
351
  VSEC_BASE_PTR                                  : bit_vector := X"128";
352
  VSEC_CAP_HDR_ID                                : bit_vector := X"1234";
353
  VSEC_CAP_HDR_LENGTH                            : bit_vector := X"018";
354
  VSEC_CAP_HDR_REVISION                          : bit_vector := X"1";
355
  VSEC_CAP_ID                                    : bit_vector := X"000B";
356
  VSEC_CAP_IS_LINK_VISIBLE                       : string     := "TRUE";
357
  VSEC_CAP_NEXTPTR                               : bit_vector := X"140";
358
  VSEC_CAP_ON                                    : string     := "FALSE";
359
  VSEC_CAP_VERSION                               : bit_vector := X"1"
360
  );
361
  port (
362
 
363
  -- wrapper input
364
  -- Common
365
  user_clk_out                                   : out std_logic;
366
  user_reset                                     : in std_logic;
367
  user_lnk_up                                    : in std_logic;
368
 
369
  trn_lnk_up                                     : out std_logic;
370
  user_rst_n                                     : out std_logic;
371
 
372
  -- Tx
373
  tx_buf_av                                      : out std_logic_vector(5 downto 0);
374
  tx_cfg_req                                     : out std_logic;
375
  tx_err_drop                                    : out std_logic;
376
  s_axis_tx_tready                               : out std_logic;
377
  s_axis_tx_tdata                                : in std_logic_vector((C_DATA_WIDTH - 1) downto 0);
378
  s_axis_tx_tkeep                                : in std_logic_vector((C_DATA_WIDTH / 8 - 1) downto 0);
379
  s_axis_tx_tlast                                : in std_logic;
380
  s_axis_tx_tvalid                               : in std_logic;
381
  s_axis_tx_tuser                                : in std_logic_vector(3 downto 0);
382
  tx_cfg_gnt                                     : in std_logic;
383
 
384
  -- Rx
385
  m_axis_rx_tdata                                : out std_logic_vector((C_DATA_WIDTH - 1) downto 0);
386
  m_axis_rx_tkeep                                : out std_logic_vector((C_DATA_WIDTH / 8 - 1) downto 0);
387
  m_axis_rx_tlast                                : out std_logic;
388
  m_axis_rx_tvalid                               : out std_logic;
389
  m_axis_rx_tready                               : in std_logic;
390
  m_axis_rx_tuser                                : out std_logic_vector(21 downto 0);
391
  rx_np_ok                                       : in std_logic;
392
  rx_np_req                                      : in std_logic;
393
 
394
  -- Flow Control
395
  fc_cpld                                        : out std_logic_vector(11 downto 0);
396
  fc_cplh                                        : out std_logic_vector(7 downto 0);
397
  fc_npd                                         : out std_logic_vector(11 downto 0);
398
  fc_nph                                         : out std_logic_vector(7 downto 0);
399
  fc_pd                                          : out std_logic_vector(11 downto 0);
400
  fc_ph                                          : out std_logic_vector(7 downto 0);
401
  fc_sel                                         : in std_logic_vector(2 downto 0);
402
 
403
  pl_directed_link_change                        : in std_logic_vector(1 downto 0);
404
  pl_directed_link_width                         : in std_logic_vector(1 downto 0);
405
  pl_directed_link_speed                         : in std_logic;
406
  pl_directed_link_auton                         : in std_logic;
407
  pl_upstream_prefer_deemph                      : in std_logic;
408
  pl_downstream_deemph_source                    : in std_logic;
409
  pl_directed_ltssm_new_vld                      : in std_logic;
410
  pl_directed_ltssm_new                          : in std_logic_vector (5 downto 0);
411
  pl_directed_ltssm_stall                        : in std_logic;
412
 
413
  cm_rst_n                                       : in std_logic;
414
  func_lvl_rst_n                                 : in std_logic;
415
  pl_transmit_hot_rst                            : in std_logic;
416
  cfg_mgmt_di                                    : in std_logic_vector(31 downto 0);
417
  cfg_mgmt_byte_en_n                             : in std_logic_vector(3 downto 0);
418
  cfg_mgmt_dwaddr                                : in std_logic_vector(9 downto 0);
419
  cfg_mgmt_wr_rw1c_as_rw_n                       : in std_logic;
420
  cfg_mgmt_wr_readonly_n                         : in std_logic;
421
  cfg_mgmt_wr_en_n                               : in std_logic;
422
  cfg_mgmt_rd_en_n                               : in std_logic;
423
  cfg_err_malformed_n                            : in std_logic;
424
  cfg_err_cor_n                                  : in std_logic;
425
  cfg_err_ur_n                                   : in std_logic;
426
  cfg_err_ecrc_n                                 : in std_logic;
427
  cfg_err_cpl_timeout_n                          : in std_logic;
428
  cfg_err_cpl_abort_n                            : in std_logic;
429
  cfg_err_cpl_unexpect_n                         : in std_logic;
430
  cfg_err_poisoned_n                             : in std_logic;
431
  cfg_err_acs_n                                  : in std_logic;
432
  cfg_err_atomic_egress_blocked_n                : in std_logic;
433
  cfg_err_mc_blocked_n                           : in std_logic;
434
  cfg_err_internal_uncor_n                       : in std_logic;
435
  cfg_err_internal_cor_n                         : in std_logic;
436
  cfg_err_posted_n                               : in std_logic;
437
  cfg_err_locked_n                               : in std_logic;
438
  cfg_err_norecovery_n                           : in std_logic;
439
  cfg_err_aer_headerlog                          : in std_logic_vector(127 downto 0);
440
  cfg_err_tlp_cpl_header                         : in std_logic_vector(47 downto 0);
441
  cfg_interrupt_n                                : in std_logic;
442
  cfg_interrupt_di                               : in std_logic_vector(7 downto 0);
443
  cfg_interrupt_assert_n                         : in std_logic;
444
  cfg_interrupt_stat_n                           : in std_logic;
445
  cfg_ds_bus_number                              : in std_logic_vector(7 downto 0);
446
  cfg_ds_device_number                           : in std_logic_vector(4 downto 0);
447
  cfg_ds_function_number                         : in std_logic_vector( 2 downto 0);
448
  cfg_port_number                                : in std_logic_vector(7 downto 0);
449
  cfg_pm_halt_aspm_l0s_n                         : in std_logic;
450
  cfg_pm_halt_aspm_l1_n                          : in std_logic;
451
  cfg_pm_force_state_en_n                        : in std_logic;
452
  cfg_pm_force_state                             : in std_logic_vector(1 downto 0);
453
  cfg_pm_wake_n                                  : in std_logic;
454
  cfg_turnoff_ok                                 : in std_logic;
455
  cfg_pm_send_pme_to_n                           : in std_logic;
456
  cfg_pciecap_interrupt_msgnum                   : in std_logic_vector(4 downto 0);
457
  cfg_trn_pending                                : in std_logic;
458
  cfg_force_mps                                  : in std_logic_vector( 2 downto 0);
459
  cfg_force_common_clock_off                     : in std_logic;
460
  cfg_force_extended_sync_on                     : in std_logic;
461
  cfg_dsn                                        : in std_logic_vector(63 downto 0);
462
  cfg_aer_interrupt_msgnum                       : in std_logic_vector(4 downto 0);
463
  cfg_dev_id                                     : in std_logic_vector(15 downto 0);
464
  cfg_vend_id                                    : in std_logic_vector(15 downto 0);
465
  cfg_rev_id                                     : in std_logic_vector(7 downto 0);
466
  cfg_subsys_id                                  : in std_logic_vector(15 downto 0);
467
  cfg_subsys_vend_id                             : in std_logic_vector(15 downto 0);
468
  drp_clk                                        : in std_logic;
469
  drp_en                                         : in std_logic;
470
  drp_we                                         : in std_logic;
471
  drp_addr                                       : in std_logic_vector(8 downto 0);
472
  drp_di                                         : in std_logic_vector(15 downto 0);
473
  drp_rdy                                        : out std_logic;
474
  drp_do                                         : out std_logic_vector(15 downto 0);
475
  dbg_mode                                       : in std_logic_vector(1 downto 0);
476
  dbg_sub_mode                                   : in std_logic;
477
  pl_dbg_mode                                    : in std_logic_vector(2 downto 0);
478
 
479
  pl_sel_lnk_rate                                : out std_logic;
480
  pl_sel_lnk_width                               : out std_logic_vector(1 downto 0);
481
  pl_ltssm_state                                 : out std_logic_vector(5 downto 0);
482
  pl_lane_reversal_mode                          : out std_logic_vector(1 downto 0);
483
  pl_phy_lnk_up                                  : out std_logic;
484
  pl_tx_pm_state                                 : out std_logic_vector(2 downto 0);
485
  pl_rx_pm_state                                 : out std_logic_vector(1 downto 0);
486
  pl_link_upcfg_cap                              : out std_logic;
487
  pl_link_gen2_cap                               : out std_logic;
488
  pl_link_partner_gen2_supported                 : out std_logic;
489
  pl_initial_link_width                          : out std_logic_vector(2 downto 0);
490
  pl_directed_change_done                        : out std_logic;
491
  pl_received_hot_rst                            : out std_logic;
492
  lnk_clk_en                                     : out std_logic;
493
  cfg_mgmt_do                                    : out std_logic_vector(31 downto 0);
494
  cfg_mgmt_rd_wr_done                            : out std_logic;
495
  cfg_err_aer_headerlog_set                      : out std_logic;
496
  cfg_err_cpl_rdy                                : out std_logic;
497
  cfg_interrupt_rdy                              : out std_logic;
498
  cfg_interrupt_mmenable                         : out std_logic_vector(2 downto 0);
499
  cfg_interrupt_msienable                        : out std_logic;
500
  cfg_interrupt_do                               : out std_logic_vector(7 downto 0);
501
  cfg_interrupt_msixenable                       : out std_logic;
502
  cfg_interrupt_msixfm                           : out std_logic;
503
  cfg_bus_number                                 : out std_logic_vector(7 downto 0);
504
  cfg_device_number                              : out std_logic_vector(4 downto 0);
505
  cfg_function_number                            : out std_logic_vector(2 downto 0);
506
  cfg_status                                     : out std_logic_vector(15 downto 0);
507
  cfg_command                                    : out std_logic_vector(15 downto 0);
508
  cfg_dstatus                                    : out std_logic_vector(15 downto 0);
509
  cfg_dcommand                                   : out std_logic_vector(15 downto 0);
510
  cfg_lstatus                                    : out std_logic_vector(15 downto 0);
511
  cfg_lcommand                                   : out std_logic_vector(15 downto 0);
512
  cfg_dcommand2                                  : out std_logic_vector(15 downto 0);
513
  cfg_received_func_lvl_rst                      : out std_logic;
514
  cfg_msg_received                               : out std_logic;
515
  cfg_msg_data                                   : out std_logic_vector(15 downto 0);
516
  cfg_msg_received_err_cor                       : out std_logic;
517
  cfg_msg_received_err_non_fatal                 : out std_logic;
518
  cfg_msg_received_err_fatal                     : out std_logic;
519
  cfg_msg_received_assert_int_a                  : out std_logic;
520
  cfg_msg_received_deassert_int_a                : out std_logic;
521
  cfg_msg_received_assert_int_b                  : out std_logic;
522
  cfg_msg_received_deassert_int_b                : out std_logic;
523
  cfg_msg_received_assert_int_c                  : out std_logic;
524
  cfg_msg_received_deassert_int_c                : out std_logic;
525
  cfg_msg_received_assert_int_d                  : out std_logic;
526
  cfg_msg_received_deassert_int_d                : out std_logic;
527
  cfg_msg_received_pm_pme                        : out std_logic;
528
  cfg_msg_received_pme_to_ack                    : out std_logic;
529
  cfg_msg_received_pme_to                        : out std_logic;
530
  cfg_msg_received_setslotpowerlimit             : out std_logic;
531
  cfg_msg_received_unlock                        : out std_logic;
532
  cfg_msg_received_pm_as_nak                     : out std_logic;
533
  cfg_to_turnoff                                 : out std_logic;
534
  cfg_pcie_link_state                            : out std_logic_vector(2 downto 0);
535
  cfg_pm_rcv_as_req_l1_n                         : out std_logic;
536
  cfg_pm_rcv_enter_l1_n                          : out std_logic;
537
  cfg_pm_rcv_enter_l23_n                         : out std_logic;
538
  cfg_pm_rcv_req_ack_n                           : out std_logic;
539
  cfg_pmcsr_powerstate                           : out std_logic_vector(1 downto 0);
540
  cfg_pmcsr_pme_en                               : out std_logic;
541
  cfg_pmcsr_pme_status                           : out std_logic;
542
  cfg_transaction                                : out std_logic;
543
  cfg_transaction_type                           : out std_logic;
544
  cfg_transaction_addr                           : out std_logic_vector(6 downto 0);
545
  cfg_command_io_enable                          : out std_logic;
546
  cfg_command_mem_enable                         : out std_logic;
547
  cfg_command_bus_master_enable                  : out std_logic;
548
  cfg_command_interrupt_disable                  : out std_logic;
549
  cfg_command_serr_en                            : out std_logic;
550
  cfg_bridge_serr_en                             : out std_logic;
551
  cfg_dev_status_corr_err_detected               : out std_logic;
552
  cfg_dev_status_non_fatal_err_detected          : out std_logic;
553
  cfg_dev_status_fatal_err_detected              : out std_logic;
554
  cfg_dev_status_ur_detected                     : out std_logic;
555
  cfg_dev_control_corr_err_reporting_en          : out std_logic;
556
  cfg_dev_control_non_fatal_reporting_en         : out std_logic;
557
  cfg_dev_control_fatal_err_reporting_en         : out std_logic;
558
  cfg_dev_control_ur_err_reporting_en            : out std_logic;
559
  cfg_dev_control_enable_ro                      : out std_logic;
560
  cfg_dev_control_max_payload                    : out std_logic_vector(2 downto 0);
561
  cfg_dev_control_ext_tag_en                     : out std_logic;
562
  cfg_dev_control_phantom_en                     : out std_logic;
563
  cfg_dev_control_aux_power_en                   : out std_logic;
564
  cfg_dev_control_no_snoop_en                    : out std_logic;
565
  cfg_dev_control_max_read_req                   : out std_logic_vector(2 downto 0);
566
  cfg_link_status_current_speed                  : out std_logic_vector(1 downto 0);
567
  cfg_link_status_negotiated_width               : out std_logic_vector(3 downto 0);
568
  cfg_link_status_link_training                  : out std_logic;
569
  cfg_link_status_dll_active                     : out std_logic;
570
  cfg_link_status_bandwidth_status               : out std_logic;
571
  cfg_link_status_auto_bandwidth_status          : out std_logic;
572
  cfg_link_control_aspm_control                  : out std_logic_vector(1 downto 0);
573
  cfg_link_control_rcb                           : out std_logic;
574
  cfg_link_control_link_disable                  : out std_logic;
575
  cfg_link_control_retrain_link                  : out std_logic;
576
  cfg_link_control_common_clock                  : out std_logic;
577
  cfg_link_control_extended_sync                 : out std_logic;
578
  cfg_link_control_clock_pm_en                   : out std_logic;
579
  cfg_link_control_hw_auto_width_dis             : out std_logic;
580
  cfg_link_control_bandwidth_int_en              : out std_logic;
581
  cfg_link_control_auto_bandwidth_int_en         : out std_logic;
582
  cfg_dev_control2_cpl_timeout_val               : out std_logic_vector(3 downto 0);
583
  cfg_dev_control2_cpl_timeout_dis               : out std_logic;
584
  cfg_dev_control2_ari_forward_en                : out std_logic;
585
  cfg_dev_control2_atomic_requester_en           : out std_logic;
586
  cfg_dev_control2_atomic_egress_block           : out std_logic;
587
  cfg_dev_control2_ido_req_en                    : out std_logic;
588
  cfg_dev_control2_ido_cpl_en                    : out std_logic;
589
  cfg_dev_control2_ltr_en                        : out std_logic;
590
  cfg_dev_control2_tlp_prefix_block              : out std_logic;
591
  cfg_slot_control_electromech_il_ctl_pulse      : out std_logic;
592
  cfg_root_control_syserr_corr_err_en            : out std_logic;
593
  cfg_root_control_syserr_non_fatal_err_en       : out std_logic;
594
  cfg_root_control_syserr_fatal_err_en           : out std_logic;
595
  cfg_root_control_pme_int_en                    : out std_logic;
596
  cfg_aer_ecrc_check_en                          : out std_logic;
597
  cfg_aer_ecrc_gen_en                            : out std_logic;
598
  cfg_aer_rooterr_corr_err_reporting_en          : out std_logic;
599
  cfg_aer_rooterr_non_fatal_err_reporting_en     : out std_logic;
600
  cfg_aer_rooterr_fatal_err_reporting_en         : out std_logic;
601
  cfg_aer_rooterr_corr_err_received              : out std_logic;
602
  cfg_aer_rooterr_non_fatal_err_received         : out std_logic;
603
  cfg_aer_rooterr_fatal_err_received             : out std_logic;
604
  cfg_vc_tcvc_map                                : out std_logic_vector(6 downto 0);
605
  dbg_vec_a                                      : out std_logic_vector(63 downto 0);
606
  dbg_vec_b                                      : out std_logic_vector(63 downto 0);
607
  dbg_vec_c                                      : out std_logic_vector(11 downto 0);
608
  dbg_sclr_a                                     : out std_logic;
609
  dbg_sclr_b                                     : out std_logic;
610
  dbg_sclr_c                                     : out std_logic;
611
  dbg_sclr_d                                     : out std_logic;
612
  dbg_sclr_e                                     : out std_logic;
613
  dbg_sclr_f                                     : out std_logic;
614
  dbg_sclr_g                                     : out std_logic;
615
  dbg_sclr_h                                     : out std_logic;
616
  dbg_sclr_i                                     : out std_logic;
617
  dbg_sclr_j                                     : out std_logic;
618
  dbg_sclr_k                                     : out std_logic;
619
  trn_rdllp_data                                 : out std_logic_vector(63 downto 0);
620
  trn_rdllp_src_rdy                              : out std_logic_vector(1 downto 0);
621
  pl_dbg_vec                                     : out std_logic_vector(11 downto 0);
622
 
623
  phy_rdy_n                                      : in std_logic;
624
  pipe_clk                                       : in std_logic;
625
  user_clk                                       : in std_logic;
626
  user_clk2                                      : in std_logic;
627
  pipe_rx0_polarity_gt                           : out std_logic;
628
  pipe_rx1_polarity_gt                           : out std_logic;
629
  pipe_rx2_polarity_gt                           : out std_logic;
630
  pipe_rx3_polarity_gt                           : out std_logic;
631
  pipe_rx4_polarity_gt                           : out std_logic;
632
  pipe_rx5_polarity_gt                           : out std_logic;
633
  pipe_rx6_polarity_gt                           : out std_logic;
634
  pipe_rx7_polarity_gt                           : out std_logic;
635
  pipe_tx_deemph_gt                              : out std_logic;
636
  pipe_tx_margin_gt                              : out std_logic_vector (2 downto 0);
637
  pipe_tx_rate_gt                                : out std_logic;
638
  pipe_tx_rcvr_det_gt                            : out std_logic;
639
  pipe_tx0_char_is_k_gt                          : out std_logic_vector (1 downto 0);
640
  pipe_tx0_compliance_gt                         : out std_logic;
641
  pipe_tx0_data_gt                               : out std_logic_vector (15 downto 0);
642
  pipe_tx0_elec_idle_gt                          : out std_logic;
643
  pipe_tx0_powerdown_gt                          : out std_logic_vector (1 downto 0);
644
  pipe_tx1_char_is_k_gt                          : out std_logic_vector (1 downto 0);
645
  pipe_tx1_compliance_gt                         : out std_logic;
646
  pipe_tx1_data_gt                               : out std_logic_vector (15 downto 0);
647
  pipe_tx1_elec_idle_gt                          : out std_logic;
648
  pipe_tx1_powerdown_gt                          : out std_logic_vector (1 downto 0);
649
  pipe_tx2_char_is_k_gt                          : out std_logic_vector (1 downto 0);
650
  pipe_tx2_compliance_gt                         : out std_logic;
651
  pipe_tx2_data_gt                               : out std_logic_vector (15 downto 0);
652
  pipe_tx2_elec_idle_gt                          : out std_logic;
653
  pipe_tx2_powerdown_gt                          : out std_logic_vector (1 downto 0);
654
  pipe_tx3_char_is_k_gt                          : out std_logic_vector (1 downto 0);
655
  pipe_tx3_compliance_gt                         : out std_logic;
656
  pipe_tx3_data_gt                               : out std_logic_vector (15 downto 0);
657
  pipe_tx3_elec_idle_gt                          : out std_logic;
658
  pipe_tx3_powerdown_gt                          : out std_logic_vector (1 downto 0);
659
  pipe_tx4_char_is_k_gt                          : out std_logic_vector (1 downto 0);
660
  pipe_tx4_compliance_gt                         : out std_logic;
661
  pipe_tx4_data_gt                               : out std_logic_vector (15 downto 0);
662
  pipe_tx4_elec_idle_gt                          : out std_logic;
663
  pipe_tx4_powerdown_gt                          : out std_logic_vector (1 downto 0);
664
  pipe_tx5_char_is_k_gt                          : out std_logic_vector (1 downto 0);
665
  pipe_tx5_compliance_gt                         : out std_logic;
666
  pipe_tx5_data_gt                               : out std_logic_vector (15 downto 0);
667
  pipe_tx5_elec_idle_gt                          : out std_logic;
668
  pipe_tx5_powerdown_gt                          : out std_logic_vector (1 downto 0);
669
  pipe_tx6_char_is_k_gt                          : out std_logic_vector (1 downto 0);
670
  pipe_tx6_compliance_gt                         : out std_logic;
671
  pipe_tx6_data_gt                               : out std_logic_vector (15 downto 0);
672
  pipe_tx6_elec_idle_gt                          : out std_logic;
673
  pipe_tx6_powerdown_gt                          : out std_logic_vector (1 downto 0);
674
  pipe_tx7_char_is_k_gt                          : out std_logic_vector (1 downto 0);
675
  pipe_tx7_compliance_gt                         : out std_logic;
676
  pipe_tx7_data_gt                               : out std_logic_vector (15 downto 0);
677
  pipe_tx7_elec_idle_gt                          : out std_logic;
678
  pipe_tx7_powerdown_gt                          : out std_logic_vector (1 downto 0);
679
 
680
  pipe_rx0_chanisaligned_gt                      : in std_logic;
681
  pipe_rx0_char_is_k_gt                          : in std_logic_vector (1 downto 0);
682
  pipe_rx0_data_gt                               : in std_logic_vector (15 downto 0);
683
  pipe_rx0_elec_idle_gt                          : in std_logic;
684
  pipe_rx0_phy_status_gt                         : in std_logic;
685
  pipe_rx0_status_gt                             : in std_logic_vector (2 downto 0);
686
  pipe_rx0_valid_gt                              : in std_logic;
687
  pipe_rx1_chanisaligned_gt                      : in std_logic;
688
  pipe_rx1_char_is_k_gt                          : in std_logic_vector (1 downto 0);
689
  pipe_rx1_data_gt                               : in std_logic_vector (15 downto 0);
690
  pipe_rx1_elec_idle_gt                          : in std_logic;
691
  pipe_rx1_phy_status_gt                         : in std_logic;
692
  pipe_rx1_status_gt                             : in std_logic_vector (2 downto 0);
693
  pipe_rx1_valid_gt                              : in std_logic;
694
  pipe_rx2_chanisaligned_gt                      : in std_logic;
695
  pipe_rx2_char_is_k_gt                          : in std_logic_vector (1 downto 0);
696
  pipe_rx2_data_gt                               : in std_logic_vector (15 downto 0);
697
  pipe_rx2_elec_idle_gt                          : in std_logic;
698
  pipe_rx2_phy_status_gt                         : in std_logic;
699
  pipe_rx2_status_gt                             : in std_logic_vector (2 downto 0);
700
  pipe_rx2_valid_gt                              : in std_logic;
701
  pipe_rx3_chanisaligned_gt                      : in std_logic;
702
  pipe_rx3_char_is_k_gt                          : in std_logic_vector (1 downto 0);
703
  pipe_rx3_data_gt                               : in std_logic_vector (15 downto 0);
704
  pipe_rx3_elec_idle_gt                          : in std_logic;
705
  pipe_rx3_phy_status_gt                         : in std_logic;
706
  pipe_rx3_status_gt                             : in std_logic_vector (2 downto 0);
707
  pipe_rx3_valid_gt                              : in std_logic;
708
  pipe_rx4_chanisaligned_gt                      : in std_logic;
709
  pipe_rx4_char_is_k_gt                          : in std_logic_vector (1 downto 0);
710
  pipe_rx4_data_gt                               : in std_logic_vector (15 downto 0);
711
  pipe_rx4_elec_idle_gt                          : in std_logic;
712
  pipe_rx4_phy_status_gt                         : in std_logic;
713
  pipe_rx4_status_gt                             : in std_logic_vector (2 downto 0);
714
  pipe_rx4_valid_gt                              : in std_logic;
715
  pipe_rx5_chanisaligned_gt                      : in std_logic;
716
  pipe_rx5_char_is_k_gt                          : in std_logic_vector (1 downto 0);
717
  pipe_rx5_data_gt                               : in std_logic_vector (15 downto 0);
718
  pipe_rx5_elec_idle_gt                          : in std_logic;
719
  pipe_rx5_phy_status_gt                         : in std_logic;
720
  pipe_rx5_status_gt                             : in std_logic_vector (2 downto 0);
721
  pipe_rx5_valid_gt                              : in std_logic;
722
  pipe_rx6_chanisaligned_gt                      : in std_logic;
723
  pipe_rx6_char_is_k_gt                          : in std_logic_vector (1 downto 0);
724
  pipe_rx6_data_gt                               : in std_logic_vector (15 downto 0);
725
  pipe_rx6_elec_idle_gt                          : in std_logic;
726
  pipe_rx6_phy_status_gt                         : in std_logic;
727
  pipe_rx6_status_gt                             : in std_logic_vector (2 downto 0);
728
  pipe_rx6_valid_gt                              : in std_logic;
729
  pipe_rx7_chanisaligned_gt                      : in std_logic;
730
  pipe_rx7_char_is_k_gt                          : in std_logic_vector (1 downto 0);
731
  pipe_rx7_data_gt                               : in std_logic_vector (15 downto 0);
732
  pipe_rx7_elec_idle_gt                          : in std_logic;
733
  pipe_rx7_phy_status_gt                         : in std_logic;
734
  pipe_rx7_status_gt                             : in std_logic_vector (2 downto 0);
735
  pipe_rx7_valid_gt                              : in std_logic
736
);
737
end cl_a7pcie_x4_pcie_top;
738
 
739
architecture pcie_7x of cl_a7pcie_x4_pcie_top is
740
   component cl_a7pcie_x4_pcie_7x is
741
      generic (
742
        C_DATA_WIDTH                                   : INTEGER range 32 to 128 := 64;
743
        C_REM_WIDTH                                    : INTEGER range 0 to 128  :=  1;
744
        -- PCIE_2_1 params
745
        AER_BASE_PTR                                   : bit_vector := X"140";
746
        AER_CAP_ECRC_CHECK_CAPABLE                     : string     := "FALSE";
747
        AER_CAP_ECRC_GEN_CAPABLE                       : string     := "FALSE";
748
        AER_CAP_ID                                     : bit_vector := X"0001";
749
        AER_CAP_MULTIHEADER                            : string     := "FALSE";
750
        AER_CAP_NEXTPTR                                : bit_vector := X"178";
751
        AER_CAP_ON                                     : string     := "FALSE";
752
        AER_CAP_OPTIONAL_ERR_SUPPORT                   : bit_vector := X"000000";
753
        AER_CAP_PERMIT_ROOTERR_UPDATE                  : string     := "TRUE";
754
        AER_CAP_VERSION                                : bit_vector := X"2";
755
        ALLOW_X8_GEN2                                  : string     := "FALSE";
756
        BAR0                                           : bit_vector := X"FFFFFF00";
757
        BAR1                                           : bit_vector := X"FFFF0000";
758
        BAR2                                           : bit_vector := X"FFFF000C";
759
        BAR3                                           : bit_vector := X"FFFFFFFF";
760
        BAR4                                           : bit_vector := X"00000000";
761
        BAR5                                           : bit_vector := X"00000000";
762
        CAPABILITIES_PTR                               : bit_vector := X"40";
763
        CARDBUS_CIS_POINTER                            : bit_vector := X"00000000";
764
        CFG_ECRC_ERR_CPLSTAT                           : integer    := 0;
765
        CLASS_CODE                                     : bit_vector := X"000000";
766
        CMD_INTX_IMPLEMENTED                           : string     := "TRUE";
767
        CPL_TIMEOUT_DISABLE_SUPPORTED                  : string     := "FALSE";
768
        CPL_TIMEOUT_RANGES_SUPPORTED                   : bit_vector := X"0";
769
        CRM_MODULE_RSTS                                : bit_vector := X"00";
770
        DEV_CAP2_ARI_FORWARDING_SUPPORTED              : string     := "FALSE";
771
        DEV_CAP2_ATOMICOP32_COMPLETER_SUPPORTED        : string     := "FALSE";
772
        DEV_CAP2_ATOMICOP64_COMPLETER_SUPPORTED        : string     := "FALSE";
773
        DEV_CAP2_ATOMICOP_ROUTING_SUPPORTED            : string     := "FALSE";
774
        DEV_CAP2_CAS128_COMPLETER_SUPPORTED            : string     := "FALSE";
775
        DEV_CAP2_ENDEND_TLP_PREFIX_SUPPORTED           : string     := "FALSE";
776
        DEV_CAP2_EXTENDED_FMT_FIELD_SUPPORTED          : string     := "FALSE";
777
        DEV_CAP2_LTR_MECHANISM_SUPPORTED               : string     := "FALSE";
778
        DEV_CAP2_MAX_ENDEND_TLP_PREFIXES               : bit_vector := X"0";
779
        DEV_CAP2_NO_RO_ENABLED_PRPR_PASSING            : string     := "FALSE";
780
        DEV_CAP2_TPH_COMPLETER_SUPPORTED               : bit_vector := X"0";
781
        DEV_CAP_ENABLE_SLOT_PWR_LIMIT_SCALE            : string     := "TRUE";
782
        DEV_CAP_ENABLE_SLOT_PWR_LIMIT_VALUE            : string     := "TRUE";
783
        DEV_CAP_ENDPOINT_L0S_LATENCY                   : integer    := 0;
784
        DEV_CAP_ENDPOINT_L1_LATENCY                    : integer    := 0;
785
        DEV_CAP_EXT_TAG_SUPPORTED                      : string     := "TRUE";
786
        DEV_CAP_FUNCTION_LEVEL_RESET_CAPABLE           : string     := "FALSE";
787
        DEV_CAP_MAX_PAYLOAD_SUPPORTED                  : integer    := 2;
788
        DEV_CAP_PHANTOM_FUNCTIONS_SUPPORT              : integer    := 0;
789
        DEV_CAP_ROLE_BASED_ERROR                       : string     := "TRUE";
790
        DEV_CAP_RSVD_14_12                             : integer    := 0;
791
        DEV_CAP_RSVD_17_16                             : integer    := 0;
792
        DEV_CAP_RSVD_31_29                             : integer    := 0;
793
        DEV_CONTROL_AUX_POWER_SUPPORTED                : string     := "FALSE";
794
        DEV_CONTROL_EXT_TAG_DEFAULT                    : string     := "FALSE";
795
        DISABLE_ASPM_L1_TIMER                          : string     := "FALSE";
796
        DISABLE_BAR_FILTERING                          : string     := "FALSE";
797
        DISABLE_ERR_MSG                                : string     := "FALSE";
798
        DISABLE_ID_CHECK                               : string     := "FALSE";
799
        DISABLE_LANE_REVERSAL                          : string     := "FALSE";
800
        DISABLE_LOCKED_FILTER                          : string     := "FALSE";
801
        DISABLE_PPM_FILTER                             : string     := "FALSE";
802
        DISABLE_RX_POISONED_RESP                       : string     := "FALSE";
803
        DISABLE_RX_TC_FILTER                           : string     := "FALSE";
804
        DISABLE_SCRAMBLING                             : string     := "FALSE";
805
        DNSTREAM_LINK_NUM                              : bit_vector := X"00";
806
        DSN_BASE_PTR                                   : bit_vector := X"100";
807
        DSN_CAP_ID                                     : bit_vector := X"0003";
808
        DSN_CAP_NEXTPTR                                : bit_vector := X"10C";
809
        DSN_CAP_ON                                     : string     := "TRUE";
810
        DSN_CAP_VERSION                                : bit_vector := X"1";
811
        ENABLE_MSG_ROUTE                               : bit_vector := X"000";
812
        ENABLE_RX_TD_ECRC_TRIM                         : string     := "FALSE";
813
        ENDEND_TLP_PREFIX_FORWARDING_SUPPORTED         : string     := "FALSE";
814
        ENTER_RVRY_EI_L0                               : string     := "TRUE";
815
        EXIT_LOOPBACK_ON_EI                            : string     := "TRUE";
816
        EXPANSION_ROM                                  : bit_vector := X"FFFFF001";
817
        EXT_CFG_CAP_PTR                                : bit_vector := X"3F";
818
        EXT_CFG_XP_CAP_PTR                             : bit_vector := X"3FF";
819
        HEADER_TYPE                                    : bit_vector := X"00";
820
        INFER_EI                                       : bit_vector := X"00";
821
        INTERRUPT_PIN                                  : bit_vector := X"01";
822
        INTERRUPT_STAT_AUTO                            : string     := "TRUE";
823
        IS_SWITCH                                      : string     := "FALSE";
824
        LAST_CONFIG_DWORD                              : bit_vector := X"3FF";
825
        LINK_CAP_ASPM_OPTIONALITY                      : string     := "TRUE";
826
        LINK_CAP_ASPM_SUPPORT                          : integer    := 1;
827
        LINK_CAP_CLOCK_POWER_MANAGEMENT                : string     := "FALSE";
828
        LINK_CAP_DLL_LINK_ACTIVE_REPORTING_CAP         : string     := "FALSE";
829
        LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN1          : integer    := 7;
830
        LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN2          : integer    := 7;
831
        LINK_CAP_L0S_EXIT_LATENCY_GEN1                 : integer    := 7;
832
        LINK_CAP_L0S_EXIT_LATENCY_GEN2                 : integer    := 7;
833
        LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN1           : integer    := 7;
834
        LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN2           : integer    := 7;
835
        LINK_CAP_L1_EXIT_LATENCY_GEN1                  : integer    := 7;
836
        LINK_CAP_L1_EXIT_LATENCY_GEN2                  : integer    := 7;
837
        LINK_CAP_LINK_BANDWIDTH_NOTIFICATION_CAP       : string     := "FALSE";
838
        LINK_CAP_MAX_LINK_SPEED                        : bit_vector := X"1";
839
        LINK_CAP_MAX_LINK_SPEED_int                    : integer    := 1;
840
        LINK_CAP_MAX_LINK_WIDTH                        : bit_vector := X"08";
841
        LINK_CAP_MAX_LINK_WIDTH_int                    : integer    := 8;
842
        LINK_CAP_RSVD_23                               : integer    := 0;
843
        LINK_CAP_SURPRISE_DOWN_ERROR_CAPABLE           : string     := "FALSE";
844
        LINK_CONTROL_RCB                               : integer    := 0;
845
        LINK_CTRL2_DEEMPHASIS                          : string     := "FALSE";
846
        LINK_CTRL2_HW_AUTONOMOUS_SPEED_DISABLE         : string     := "FALSE";
847
        LINK_CTRL2_TARGET_LINK_SPEED                   : bit_vector := X"2";
848
        LINK_STATUS_SLOT_CLOCK_CONFIG                  : string     := "TRUE";
849
        LL_ACK_TIMEOUT                                 : bit_vector := X"0000";
850
        LL_ACK_TIMEOUT_EN                              : string     := "FALSE";
851
        LL_ACK_TIMEOUT_FUNC                            : integer    := 0;
852
        LL_REPLAY_TIMEOUT                              : bit_vector := X"0000";
853
        LL_REPLAY_TIMEOUT_EN                           : string     := "FALSE";
854
        LL_REPLAY_TIMEOUT_FUNC                         : integer    := 0;
855
        LTSSM_MAX_LINK_WIDTH                           : bit_vector := X"01";
856
        MPS_FORCE                                      : string     := "FALSE";
857
        MSIX_BASE_PTR                                  : bit_vector := X"9C";
858
        MSIX_CAP_ID                                    : bit_vector := X"11";
859
        MSIX_CAP_NEXTPTR                               : bit_vector := X"00";
860
        MSIX_CAP_ON                                    : string     := "FALSE";
861
        MSIX_CAP_PBA_BIR                               : integer    := 0;
862
        MSIX_CAP_PBA_OFFSET                            : bit_vector := X"00000050";
863
        MSIX_CAP_TABLE_BIR                             : integer    := 0;
864
        MSIX_CAP_TABLE_OFFSET                          : bit_vector := X"00000040";
865
        MSIX_CAP_TABLE_SIZE                            : bit_vector := X"000";
866
        MSI_BASE_PTR                                   : bit_vector := X"48";
867
        MSI_CAP_64_BIT_ADDR_CAPABLE                    : string     := "TRUE";
868
        MSI_CAP_ID                                     : bit_vector := X"05";
869
        MSI_CAP_MULTIMSGCAP                            : integer    := 0;
870
        MSI_CAP_MULTIMSG_EXTENSION                     : integer    := 0;
871
        MSI_CAP_NEXTPTR                                : bit_vector := X"60";
872
        MSI_CAP_ON                                     : string     := "FALSE";
873
        MSI_CAP_PER_VECTOR_MASKING_CAPABLE             : string     := "TRUE";
874
        N_FTS_COMCLK_GEN1                              : integer    := 255;
875
        N_FTS_COMCLK_GEN2                              : integer    := 255;
876
        N_FTS_GEN1                                     : integer    := 255;
877
        N_FTS_GEN2                                     : integer    := 255;
878
        PCIE_BASE_PTR                                  : bit_vector := X"60";
879
        PCIE_CAP_CAPABILITY_ID                         : bit_vector := X"10";
880
        PCIE_CAP_CAPABILITY_VERSION                    : bit_vector := X"2";
881
        PCIE_CAP_DEVICE_PORT_TYPE                      : bit_vector := X"0";
882
        PCIE_CAP_NEXTPTR                               : bit_vector := X"9C";
883
        PCIE_CAP_ON                                    : string     := "TRUE";
884
        PCIE_CAP_RSVD_15_14                            : integer    := 0;
885
        PCIE_CAP_SLOT_IMPLEMENTED                      : string     := "FALSE";
886
        PCIE_REVISION                                  : integer    := 2;
887
        PL_AUTO_CONFIG                                 : integer    := 0;
888
        PL_FAST_TRAIN                                  : string     := "FALSE";
889
        PM_ASPML0S_TIMEOUT                             : bit_vector := X"0000";
890
        PM_ASPML0S_TIMEOUT_EN                          : string     := "FALSE";
891
        PM_ASPML0S_TIMEOUT_FUNC                        : integer    := 0;
892
        PM_ASPM_FASTEXIT                               : string     := "FALSE";
893
        PM_BASE_PTR                                    : bit_vector := X"40";
894
        PM_CAP_AUXCURRENT                              : integer    := 0;
895
        PM_CAP_D1SUPPORT                               : string     := "TRUE";
896
        PM_CAP_D2SUPPORT                               : string     := "TRUE";
897
        PM_CAP_DSI                                     : string     := "FALSE";
898
        PM_CAP_ID                                      : bit_vector := X"01";
899
        PM_CAP_NEXTPTR                                 : bit_vector := X"48";
900
        PM_CAP_ON                                      : string     := "TRUE";
901
        PM_CAP_PMESUPPORT                              : bit_vector := X"0F";
902
        PM_CAP_PME_CLOCK                               : string     := "FALSE";
903
        PM_CAP_RSVD_04                                 : integer    := 0;
904
        PM_CAP_VERSION                                 : integer    := 3;
905
        PM_CSR_B2B3                                    : string     := "FALSE";
906
        PM_CSR_BPCCEN                                  : string     := "FALSE";
907
        PM_CSR_NOSOFTRST                               : string     := "TRUE";
908
        PM_DATA0                                       : bit_vector := X"01";
909
        PM_DATA1                                       : bit_vector := X"01";
910
        PM_DATA2                                       : bit_vector := X"01";
911
        PM_DATA3                                       : bit_vector := X"01";
912
        PM_DATA4                                       : bit_vector := X"01";
913
        PM_DATA5                                       : bit_vector := X"01";
914
        PM_DATA6                                       : bit_vector := X"01";
915
        PM_DATA7                                       : bit_vector := X"01";
916
        PM_DATA_SCALE0                                 : bit_vector := X"1";
917
        PM_DATA_SCALE1                                 : bit_vector := X"1";
918
        PM_DATA_SCALE2                                 : bit_vector := X"1";
919
        PM_DATA_SCALE3                                 : bit_vector := X"1";
920
        PM_DATA_SCALE4                                 : bit_vector := X"1";
921
        PM_DATA_SCALE5                                 : bit_vector := X"1";
922
        PM_DATA_SCALE6                                 : bit_vector := X"1";
923
        PM_DATA_SCALE7                                 : bit_vector := X"1";
924
        PM_MF                                          : string     := "FALSE";
925
        RBAR_BASE_PTR                                  : bit_vector := X"178";
926
        RBAR_CAP_CONTROL_ENCODEDBAR0                   : bit_vector := X"00";
927
        RBAR_CAP_CONTROL_ENCODEDBAR1                   : bit_vector := X"00";
928
        RBAR_CAP_CONTROL_ENCODEDBAR2                   : bit_vector := X"00";
929
        RBAR_CAP_CONTROL_ENCODEDBAR3                   : bit_vector := X"00";
930
        RBAR_CAP_CONTROL_ENCODEDBAR4                   : bit_vector := X"00";
931
        RBAR_CAP_CONTROL_ENCODEDBAR5                   : bit_vector := X"00";
932
        RBAR_CAP_ID                                    : bit_vector := X"0015";
933
        RBAR_CAP_INDEX0                                : bit_vector := X"0";
934
        RBAR_CAP_INDEX1                                : bit_vector := X"0";
935
        RBAR_CAP_INDEX2                                : bit_vector := X"0";
936
        RBAR_CAP_INDEX3                                : bit_vector := X"0";
937
        RBAR_CAP_INDEX4                                : bit_vector := X"0";
938
        RBAR_CAP_INDEX5                                : bit_vector := X"0";
939
        RBAR_CAP_NEXTPTR                               : bit_vector := X"000";
940
        RBAR_CAP_ON                                    : string     := "FALSE";
941
        RBAR_CAP_SUP0                                  : bit_vector := X"00000000";
942
        RBAR_CAP_SUP1                                  : bit_vector := X"00000000";
943
        RBAR_CAP_SUP2                                  : bit_vector := X"00000000";
944
        RBAR_CAP_SUP3                                  : bit_vector := X"00000000";
945
        RBAR_CAP_SUP4                                  : bit_vector := X"00000000";
946
        RBAR_CAP_SUP5                                  : bit_vector := X"00000000";
947
        RBAR_CAP_VERSION                               : bit_vector := X"1";
948
        RBAR_NUM                                       : bit_vector := X"1";
949
        RECRC_CHK                                      : integer    := 0;
950
        RECRC_CHK_TRIM                                 : string     := "FALSE";
951
        ROOT_CAP_CRS_SW_VISIBILITY                     : string     := "FALSE";
952
        RP_AUTO_SPD                                    : bit_vector := X"1";
953
        RP_AUTO_SPD_LOOPCNT                            : bit_vector := X"1F";
954
        SELECT_DLL_IF                                  : string     := "FALSE";
955
        SIM_VERSION                                    : string     := "1.0";
956
        SLOT_CAP_ATT_BUTTON_PRESENT                    : string     := "FALSE";
957
        SLOT_CAP_ATT_INDICATOR_PRESENT                 : string     := "FALSE";
958
        SLOT_CAP_ELEC_INTERLOCK_PRESENT                : string     := "FALSE";
959
        SLOT_CAP_HOTPLUG_CAPABLE                       : string     := "FALSE";
960
        SLOT_CAP_HOTPLUG_SURPRISE                      : string     := "FALSE";
961
        SLOT_CAP_MRL_SENSOR_PRESENT                    : string     := "FALSE";
962
        SLOT_CAP_NO_CMD_COMPLETED_SUPPORT              : string     := "FALSE";
963
        SLOT_CAP_PHYSICAL_SLOT_NUM                     : bit_vector := X"0000";
964
        SLOT_CAP_POWER_CONTROLLER_PRESENT              : string     := "FALSE";
965
        SLOT_CAP_POWER_INDICATOR_PRESENT               : string     := "FALSE";
966
        SLOT_CAP_SLOT_POWER_LIMIT_SCALE                : integer    := 0;
967
        SLOT_CAP_SLOT_POWER_LIMIT_VALUE                : bit_vector := X"00";
968
        SPARE_BIT0                                     : integer    := 0;
969
        SPARE_BIT1                                     : integer    := 0;
970
        SPARE_BIT2                                     : integer    := 0;
971
        SPARE_BIT3                                     : integer    := 0;
972
        SPARE_BIT4                                     : integer    := 0;
973
        SPARE_BIT5                                     : integer    := 0;
974
        SPARE_BIT6                                     : integer    := 0;
975
        SPARE_BIT7                                     : integer    := 0;
976
        SPARE_BIT8                                     : integer    := 0;
977
        SPARE_BYTE0                                    : bit_vector := X"00";
978
        SPARE_BYTE1                                    : bit_vector := X"00";
979
        SPARE_BYTE2                                    : bit_vector := X"00";
980
        SPARE_BYTE3                                    : bit_vector := X"00";
981
        SPARE_WORD0                                    : bit_vector := X"00000000";
982
        SPARE_WORD1                                    : bit_vector := X"00000000";
983
        SPARE_WORD2                                    : bit_vector := X"00000000";
984
        SPARE_WORD3                                    : bit_vector := X"00000000";
985
        SSL_MESSAGE_AUTO                               : string     := "FALSE";
986
        TECRC_EP_INV                                   : string     := "FALSE";
987
        TL_RBYPASS                                     : string     := "FALSE";
988
        TL_RX_RAM_RADDR_LATENCY                        : integer    := 0;
989
        TL_RX_RAM_RDATA_LATENCY                        : integer    := 2;
990
        TL_RX_RAM_WRITE_LATENCY                        : integer    := 0;
991
        TL_TFC_DISABLE                                 : string     := "FALSE";
992
        TL_TX_CHECKS_DISABLE                           : string     := "FALSE";
993
        TL_TX_RAM_RADDR_LATENCY                        : integer    := 0;
994
        TL_TX_RAM_RDATA_LATENCY                        : integer    := 2;
995
        TL_TX_RAM_WRITE_LATENCY                        : integer    := 0;
996
        TRN_DW                                         : string     := "FALSE";
997
        TRN_NP_FC                                      : string     := "FALSE";
998
        UPCONFIG_CAPABLE                               : string     := "TRUE";
999
        UPSTREAM_FACING                                : string     := "TRUE";
1000
        UR_ATOMIC                                      : string     := "TRUE";
1001
        UR_CFG1                                        : string     := "TRUE";
1002
        UR_INV_REQ                                     : string     := "TRUE";
1003
        UR_PRS_RESPONSE                                : string     := "TRUE";
1004
        USER_CLK2_DIV2                                 : string     := "FALSE";
1005
        USER_CLK_FREQ                                  : integer    := 3;
1006
        USE_RID_PINS                                   : string     := "FALSE";
1007
        VC0_CPL_INFINITE                               : string     := "TRUE";
1008
        VC0_RX_RAM_LIMIT                               : bit_vector := X"03FF";
1009
        VC0_TOTAL_CREDITS_CD                           : integer    := 127;
1010
        VC0_TOTAL_CREDITS_CH                           : integer    := 31;
1011
        VC0_TOTAL_CREDITS_NPD                          : integer    := 24;
1012
        VC0_TOTAL_CREDITS_NPH                          : integer    := 12;
1013
        VC0_TOTAL_CREDITS_PD                           : integer    := 288;
1014
        VC0_TOTAL_CREDITS_PH                           : integer    := 32;
1015
        VC0_TX_LASTPACKET                              : integer    := 31;
1016
        VC_BASE_PTR                                    : bit_vector := X"10C";
1017
        VC_CAP_ID                                      : bit_vector := X"0002";
1018
        VC_CAP_NEXTPTR                                 : bit_vector := X"000";
1019
        VC_CAP_ON                                      : string     := "FALSE";
1020
        VC_CAP_REJECT_SNOOP_TRANSACTIONS               : string     := "FALSE";
1021
        VC_CAP_VERSION                                 : bit_vector := X"1";
1022
        VSEC_BASE_PTR                                  : bit_vector := X"128";
1023
        VSEC_CAP_HDR_ID                                : bit_vector := X"1234";
1024
        VSEC_CAP_HDR_LENGTH                            : bit_vector := X"018";
1025
        VSEC_CAP_HDR_REVISION                          : bit_vector := X"1";
1026
        VSEC_CAP_ID                                    : bit_vector := X"000B";
1027
        VSEC_CAP_IS_LINK_VISIBLE                       : string     := "TRUE";
1028
        VSEC_CAP_NEXTPTR                               : bit_vector := X"140";
1029
        VSEC_CAP_ON                                    : string     := "FALSE";
1030
        VSEC_CAP_VERSION                               : bit_vector := X"1"
1031
      );
1032
      port (
1033
        trn_td                                         : in std_logic_vector(C_DATA_WIDTH-1 downto 0);
1034
        trn_trem                                       : in std_logic_vector(C_REM_WIDTH-1 downto 0);
1035
        trn_tsof                                       : in std_logic;
1036
        trn_teof                                       : in std_logic;
1037
        trn_tsrc_rdy                                   : in std_logic;
1038
        trn_tsrc_dsc                                   : in std_logic;
1039
        trn_terrfwd                                    : in std_logic;
1040
        trn_tecrc_gen                                  : in std_logic;
1041
        trn_tstr                                       : in std_logic;
1042
        trn_tcfg_gnt                                   : in std_logic;
1043
        trn_rdst_rdy                                   : in std_logic;
1044
        trn_rnp_req                                    : in std_logic;
1045
        trn_rfcp_ret                                   : in std_logic;
1046
        trn_rnp_ok                                     : in std_logic;
1047
        trn_fc_sel                                     : in std_logic_vector( 2 downto 0);
1048
        trn_tdllp_data                                 : in std_logic_vector(31 downto 0);
1049
        trn_tdllp_src_rdy                              : in std_logic;
1050
        ll2_tlp_rcv                                    : in std_logic;
1051
        ll2_send_enter_l1                              : in std_logic;
1052
        ll2_send_enter_l23                             : in std_logic;
1053
        ll2_send_as_req_l1                             : in std_logic;
1054
        ll2_send_pm_ack                                : in std_logic;
1055
        pl2_directed_lstate                            : in std_logic_vector(4 downto 0);
1056
        ll2_suspend_now                                : in std_logic;
1057
        tl2_ppm_suspend_req                            : in std_logic;
1058
        tl2_aspm_suspend_credit_check                  : in std_logic;
1059
        pl_directed_link_change                        : in std_logic_vector( 1 downto 0);
1060
        pl_directed_link_width                         : in std_logic_vector( 1 downto 0);
1061
        pl_directed_link_speed                         : in std_logic;
1062
        pl_directed_link_auton                         : in std_logic;
1063
        pl_upstream_prefer_deemph                      : in std_logic;
1064
        pl_downstream_deemph_source                    : in std_logic;
1065
        pl_directed_ltssm_new_vld                      : in std_logic;
1066
        pl_directed_ltssm_new                          : in std_logic_vector( 5 downto 0);
1067
        pl_directed_ltssm_stall                        : in std_logic;
1068
        pipe_rx0_char_is_k                             : in std_logic_vector( 1 downto 0);
1069
        pipe_rx1_char_is_k                             : in std_logic_vector( 1 downto 0);
1070
        pipe_rx2_char_is_k                             : in std_logic_vector( 1 downto 0);
1071
        pipe_rx3_char_is_k                             : in std_logic_vector( 1 downto 0);
1072
        pipe_rx4_char_is_k                             : in std_logic_vector( 1 downto 0);
1073
        pipe_rx5_char_is_k                             : in std_logic_vector( 1 downto 0);
1074
        pipe_rx6_char_is_k                             : in std_logic_vector( 1 downto 0);
1075
        pipe_rx7_char_is_k                             : in std_logic_vector( 1 downto 0);
1076
        pipe_rx0_valid                                 : in std_logic;
1077
        pipe_rx1_valid                                 : in std_logic;
1078
        pipe_rx2_valid                                 : in std_logic;
1079
        pipe_rx3_valid                                 : in std_logic;
1080
        pipe_rx4_valid                                 : in std_logic;
1081
        pipe_rx5_valid                                 : in std_logic;
1082
        pipe_rx6_valid                                 : in std_logic;
1083
        pipe_rx7_valid                                 : in std_logic;
1084
        pipe_rx0_data                                  : in std_logic_vector(15 downto 0);
1085
        pipe_rx1_data                                  : in std_logic_vector(15 downto 0);
1086
        pipe_rx2_data                                  : in std_logic_vector(15 downto 0);
1087
        pipe_rx3_data                                  : in std_logic_vector(15 downto 0);
1088
        pipe_rx4_data                                  : in std_logic_vector(15 downto 0);
1089
        pipe_rx5_data                                  : in std_logic_vector(15 downto 0);
1090
        pipe_rx6_data                                  : in std_logic_vector(15 downto 0);
1091
        pipe_rx7_data                                  : in std_logic_vector(15 downto 0);
1092
        pipe_rx0_chanisaligned                         : in std_logic;
1093
        pipe_rx1_chanisaligned                         : in std_logic;
1094
        pipe_rx2_chanisaligned                         : in std_logic;
1095
        pipe_rx3_chanisaligned                         : in std_logic;
1096
        pipe_rx4_chanisaligned                         : in std_logic;
1097
        pipe_rx5_chanisaligned                         : in std_logic;
1098
        pipe_rx6_chanisaligned                         : in std_logic;
1099
        pipe_rx7_chanisaligned                         : in std_logic;
1100
        pipe_rx0_status                                : in std_logic_vector( 2 downto 0);
1101
        pipe_rx1_status                                : in std_logic_vector( 2 downto 0);
1102
        pipe_rx2_status                                : in std_logic_vector( 2 downto 0);
1103
        pipe_rx3_status                                : in std_logic_vector( 2 downto 0);
1104
        pipe_rx4_status                                : in std_logic_vector( 2 downto 0);
1105
        pipe_rx5_status                                : in std_logic_vector( 2 downto 0);
1106
        pipe_rx6_status                                : in std_logic_vector( 2 downto 0);
1107
        pipe_rx7_status                                : in std_logic_vector( 2 downto 0);
1108
        pipe_rx0_phy_status                            : in std_logic;
1109
        pipe_rx1_phy_status                            : in std_logic;
1110
        pipe_rx2_phy_status                            : in std_logic;
1111
        pipe_rx3_phy_status                            : in std_logic;
1112
        pipe_rx4_phy_status                            : in std_logic;
1113
        pipe_rx5_phy_status                            : in std_logic;
1114
        pipe_rx6_phy_status                            : in std_logic;
1115
        pipe_rx7_phy_status                            : in std_logic;
1116
        pipe_rx0_elec_idle                             : in std_logic;
1117
        pipe_rx1_elec_idle                             : in std_logic;
1118
        pipe_rx2_elec_idle                             : in std_logic;
1119
        pipe_rx3_elec_idle                             : in std_logic;
1120
        pipe_rx4_elec_idle                             : in std_logic;
1121
        pipe_rx5_elec_idle                             : in std_logic;
1122
        pipe_rx6_elec_idle                             : in std_logic;
1123
        pipe_rx7_elec_idle                             : in std_logic;
1124
        pipe_clk                                       : in std_logic;
1125
        user_clk                                       : in std_logic;
1126
        user_clk2                                      : in std_logic;
1127
        user_clk_prebuf                                : in std_logic;
1128
        user_clk_prebuf_en                             : in std_logic;
1129
        scanmode_n                                     : in std_logic;
1130
        scanenable_n                                   : in std_logic;
1131
        edt_clk                                        : in std_logic;
1132
        edt_bypass                                     : in std_logic;
1133
        edt_update                                     : in std_logic;
1134
        edt_configuration                              : in std_logic;
1135
        edt_single_bypass_chain                        : in std_logic;
1136
        edt_channels_in1                               : in std_logic;
1137
        edt_channels_in2                               : in std_logic;
1138
        edt_channels_in3                               : in std_logic;
1139
        edt_channels_in4                               : in std_logic;
1140
        edt_channels_in5                               : in std_logic;
1141
        edt_channels_in6                               : in std_logic;
1142
        edt_channels_in7                               : in std_logic;
1143
        edt_channels_in8                               : in std_logic;
1144
        pmv_enable_n                                   : in std_logic;
1145
        pmv_select                                     : in std_logic_vector( 2 downto 0);
1146
        pmv_divide                                     : in std_logic_vector( 1 downto 0);
1147
        sys_rst_n                                      : in std_logic;
1148
        cm_rst_n                                       : in std_logic;
1149
        cm_sticky_rst_n                                : in std_logic;
1150
        func_lvl_rst_n                                 : in std_logic;
1151
        tl_rst_n                                       : in std_logic;
1152
        dl_rst_n                                       : in std_logic;
1153
        pl_rst_n                                       : in std_logic;
1154
        pl_transmit_hot_rst                            : in std_logic;
1155
        cfg_reset                                      : in std_logic;
1156
        gwe                                            : in std_logic;
1157
        grestore                                       : in std_logic;
1158
        ghigh                                          : in std_logic;
1159
        cfg_mgmt_di                                    : in std_logic_vector(31 downto 0);
1160
        cfg_mgmt_byte_en_n                             : in std_logic_vector( 3 downto 0);
1161
        cfg_mgmt_dwaddr                                : in std_logic_vector( 9 downto 0);
1162
        cfg_mgmt_wr_rw1c_as_rw_n                       : in std_logic;
1163
        cfg_mgmt_wr_readonly_n                         : in std_logic;
1164
        cfg_mgmt_wr_en_n                               : in std_logic;
1165
        cfg_mgmt_rd_en_n                               : in std_logic;
1166
        cfg_err_malformed_n                            : in std_logic;
1167
        cfg_err_cor_n                                  : in std_logic;
1168
        cfg_err_ur_n                                   : in std_logic;
1169
        cfg_err_ecrc_n                                 : in std_logic;
1170
        cfg_err_cpl_timeout_n                          : in std_logic;
1171
        cfg_err_cpl_abort_n                            : in std_logic;
1172
        cfg_err_cpl_unexpect_n                         : in std_logic;
1173
        cfg_err_poisoned_n                             : in std_logic;
1174
        cfg_err_acs_n                                  : in std_logic;
1175
        cfg_err_atomic_egress_blocked_n                : in std_logic;
1176
        cfg_err_mc_blocked_n                           : in std_logic;
1177
        cfg_err_internal_uncor_n                       : in std_logic;
1178
        cfg_err_internal_cor_n                         : in std_logic;
1179
        cfg_err_posted_n                               : in std_logic;
1180
        cfg_err_locked_n                               : in std_logic;
1181
        cfg_err_norecovery_n                           : in std_logic;
1182
        cfg_err_aer_headerlog                          : in std_logic_vector(127 downto 0);
1183
        cfg_err_tlp_cpl_header                         : in std_logic_vector(47 downto 0);
1184
        cfg_interrupt_n                                : in std_logic;
1185
        cfg_interrupt_di                               : in std_logic_vector(7 downto 0);
1186
        cfg_interrupt_assert_n                         : in std_logic;
1187
        cfg_interrupt_stat_n                           : in std_logic;
1188
        cfg_ds_bus_number                              : in std_logic_vector(7 downto 0);
1189
        cfg_ds_device_number                           : in std_logic_vector(4 downto 0);
1190
        cfg_ds_function_number                         : in std_logic_vector( 2 downto 0);
1191
        cfg_port_number                                : in std_logic_vector(7 downto 0);
1192
        cfg_pm_halt_aspm_l0s_n                         : in std_logic;
1193
        cfg_pm_halt_aspm_l1_n                          : in std_logic;
1194
        cfg_pm_force_state_en_n                        : in std_logic;
1195
        cfg_pm_force_state                             : in std_logic_vector(1 downto 0);
1196
        cfg_pm_wake_n                                  : in std_logic;
1197
        cfg_pm_turnoff_ok_n                            : in std_logic;
1198
        cfg_pm_send_pme_to_n                           : in std_logic;
1199
        cfg_pciecap_interrupt_msgnum                   : in std_logic_vector(4 downto 0);
1200
        cfg_trn_pending_n                              : in std_logic;
1201
        cfg_force_mps                                  : in std_logic_vector( 2 downto 0);
1202
        cfg_force_common_clock_off                     : in std_logic;
1203
        cfg_force_extended_sync_on                     : in std_logic;
1204
        cfg_dsn                                        : in std_logic_vector(63 downto 0);
1205
        cfg_aer_interrupt_msgnum                       : in std_logic_vector(4 downto 0);
1206
        cfg_dev_id                                     : in std_logic_vector(15 downto 0);
1207
        cfg_vend_id                                    : in std_logic_vector(15 downto 0);
1208
        cfg_rev_id                                     : in std_logic_vector(7 downto 0);
1209
        cfg_subsys_id                                  : in std_logic_vector(15 downto 0);
1210
        cfg_subsys_vend_id                             : in std_logic_vector(15 downto 0);
1211
        drp_clk                                        : in std_logic;
1212
        drp_en                                         : in std_logic;
1213
        drp_we                                         : in std_logic;
1214
        drp_addr                                       : in std_logic_vector(8 downto 0);
1215
        drp_di                                         : in std_logic_vector(15 downto 0);
1216
        drp_rdy                                        : out std_logic;
1217
        drp_do                                         : out std_logic_vector(15 downto 0);
1218
        dbg_mode                                       : in std_logic_vector(1 downto 0);
1219
        dbg_sub_mode                                   : in std_logic;
1220
        pl_dbg_mode                                    : in std_logic_vector( 2 downto 0);
1221
 
1222
        trn_clk                                        : out std_logic;
1223
 
1224
        trn_tdst_rdy                                   : out std_logic;
1225
        trn_terr_drop                                  : out std_logic;
1226
        trn_tbuf_av                                    : out std_logic_vector( 5 downto 0);
1227
        trn_tcfg_req                                   : out std_logic;
1228
 
1229
        trn_rd                                         : out std_logic_vector(C_DATA_WIDTH- 1 downto 0);
1230
        trn_rrem                                       : out std_logic_vector(C_REM_WIDTH- 1 downto 0);
1231
 
1232
        trn_rsof                                       : out std_logic;
1233
        trn_reof                                       : out std_logic;
1234
        trn_rsrc_rdy                                   : out std_logic;
1235
        trn_rsrc_dsc                                   : out std_logic;
1236
        trn_recrc_err                                  : out std_logic;
1237
        trn_rerrfwd                                    : out std_logic;
1238
        trn_rbar_hit                                   : out std_logic_vector( 7 downto 0);
1239
        trn_lnk_up                                     : out std_logic;
1240
        trn_fc_ph                                      : out std_logic_vector( 7 downto 0);
1241
        trn_fc_pd                                      : out std_logic_vector(11 downto 0);
1242
        trn_fc_nph                                     : out std_logic_vector( 7 downto 0);
1243
        trn_fc_npd                                     : out std_logic_vector(11 downto 0);
1244
        trn_fc_cplh                                    : out std_logic_vector( 7 downto 0);
1245
        trn_fc_cpld                                    : out std_logic_vector(11 downto 0);
1246
        trn_tdllp_dst_rdy                              : out std_logic;
1247
        trn_rdllp_data                                 : out std_logic_vector(63 downto 0);
1248
        trn_rdllp_src_rdy                              : out std_logic_vector( 1 downto 0);
1249
        ll2_tfc_init1_seq                              : out std_logic;
1250
        ll2_tfc_init2_seq                              : out std_logic;
1251
        pl2_suspend_ok                                 : out std_logic;
1252
        pl2_recovery                                   : out std_logic;
1253
        pl2_rx_elec_idle                               : out std_logic;
1254
        pl2_rx_pm_state                                : out std_logic_vector( 1 downto 0);
1255
        pl2_l0_req                                     : out std_logic;
1256
        ll2_suspend_ok                                 : out std_logic;
1257
        ll2_tx_idle                                    : out std_logic;
1258
        ll2_link_status                                : out std_logic_vector( 4 downto 0);
1259
        tl2_ppm_suspend_ok                             : out std_logic;
1260
        tl2_aspm_suspend_req                           : out std_logic;
1261
        tl2_aspm_suspend_credit_check_ok               : out std_logic;
1262
        pl2_link_up                                    : out std_logic;
1263
        pl2_receiver_err                               : out std_logic;
1264
        ll2_receiver_err                               : out std_logic;
1265
        ll2_protocol_err                               : out std_logic;
1266
        ll2_bad_tlp_err                                : out std_logic;
1267
        ll2_bad_dllp_err                               : out std_logic;
1268
        ll2_replay_ro_err                              : out std_logic;
1269
        ll2_replay_to_err                              : out std_logic;
1270
        tl2_err_hdr                                    : out std_logic_vector(63 downto 0);
1271
        tl2_err_malformed                              : out std_logic;
1272
        tl2_err_rxoverflow                             : out std_logic;
1273
        tl2_err_fcpe                                   : out std_logic;
1274
        pl_sel_lnk_rate                                : out std_logic;
1275
        pl_sel_lnk_width                               : out std_logic_vector( 1 downto 0);
1276
        pl_ltssm_state                                 : out std_logic_vector( 5 downto 0);
1277
        pl_lane_reversal_mode                          : out std_logic_vector( 1 downto 0);
1278
        pl_phy_lnk_up_n                                : out std_logic;
1279
        pl_tx_pm_state                                 : out std_logic_vector( 2 downto 0);
1280
        pl_rx_pm_state                                 : out std_logic_vector( 1 downto 0);
1281
        pl_link_upcfg_cap                              : out std_logic;
1282
        pl_link_gen2_cap                               : out std_logic;
1283
        pl_link_partner_gen2_supported                 : out std_logic;
1284
        pl_initial_link_width                          : out std_logic_vector( 2 downto 0);
1285
        pl_directed_change_done                        : out std_logic;
1286
        pipe_tx_rcvr_det                               : out std_logic;
1287
        pipe_tx_reset                                  : out std_logic;
1288
        pipe_tx_rate                                   : out std_logic;
1289
        pipe_tx_deemph                                 : out std_logic;
1290
        pipe_tx_margin                                 : out std_logic_vector( 2 downto 0);
1291
        pipe_rx0_polarity                              : out std_logic;
1292
        pipe_rx1_polarity                              : out std_logic;
1293
        pipe_rx2_polarity                              : out std_logic;
1294
        pipe_rx3_polarity                              : out std_logic;
1295
        pipe_rx4_polarity                              : out std_logic;
1296
        pipe_rx5_polarity                              : out std_logic;
1297
        pipe_rx6_polarity                              : out std_logic;
1298
        pipe_rx7_polarity                              : out std_logic;
1299
        pipe_tx0_compliance                            : out std_logic;
1300
        pipe_tx1_compliance                            : out std_logic;
1301
        pipe_tx2_compliance                            : out std_logic;
1302
        pipe_tx3_compliance                            : out std_logic;
1303
        pipe_tx4_compliance                            : out std_logic;
1304
        pipe_tx5_compliance                            : out std_logic;
1305
        pipe_tx6_compliance                            : out std_logic;
1306
        pipe_tx7_compliance                            : out std_logic;
1307
        pipe_tx0_char_is_k                             : out std_logic_vector( 1 downto 0);
1308
        pipe_tx1_char_is_k                             : out std_logic_vector( 1 downto 0);
1309
        pipe_tx2_char_is_k                             : out std_logic_vector( 1 downto 0);
1310
        pipe_tx3_char_is_k                             : out std_logic_vector( 1 downto 0);
1311
        pipe_tx4_char_is_k                             : out std_logic_vector( 1 downto 0);
1312
        pipe_tx5_char_is_k                             : out std_logic_vector( 1 downto 0);
1313
        pipe_tx6_char_is_k                             : out std_logic_vector( 1 downto 0);
1314
        pipe_tx7_char_is_k                             : out std_logic_vector( 1 downto 0);
1315
        pipe_tx0_data                                  : out std_logic_vector(15 downto 0);
1316
        pipe_tx1_data                                  : out std_logic_vector(15 downto 0);
1317
        pipe_tx2_data                                  : out std_logic_vector(15 downto 0);
1318
        pipe_tx3_data                                  : out std_logic_vector(15 downto 0);
1319
        pipe_tx4_data                                  : out std_logic_vector(15 downto 0);
1320
        pipe_tx5_data                                  : out std_logic_vector(15 downto 0);
1321
        pipe_tx6_data                                  : out std_logic_vector(15 downto 0);
1322
        pipe_tx7_data                                  : out std_logic_vector(15 downto 0);
1323
        pipe_tx0_elec_idle                             : out std_logic;
1324
        pipe_tx1_elec_idle                             : out std_logic;
1325
        pipe_tx2_elec_idle                             : out std_logic;
1326
        pipe_tx3_elec_idle                             : out std_logic;
1327
        pipe_tx4_elec_idle                             : out std_logic;
1328
        pipe_tx5_elec_idle                             : out std_logic;
1329
        pipe_tx6_elec_idle                             : out std_logic;
1330
        pipe_tx7_elec_idle                             : out std_logic;
1331
        pipe_tx0_powerdown                             : out std_logic_vector( 1 downto 0);
1332
        pipe_tx1_powerdown                             : out std_logic_vector( 1 downto 0);
1333
        pipe_tx2_powerdown                             : out std_logic_vector( 1 downto 0);
1334
        pipe_tx3_powerdown                             : out std_logic_vector( 1 downto 0);
1335
        pipe_tx4_powerdown                             : out std_logic_vector( 1 downto 0);
1336
        pipe_tx5_powerdown                             : out std_logic_vector( 1 downto 0);
1337
        pipe_tx6_powerdown                             : out std_logic_vector( 1 downto 0);
1338
        pipe_tx7_powerdown                             : out std_logic_vector( 1 downto 0);
1339
        pmv_out                                        : out std_logic;
1340
        user_rst_n                                     : out std_logic;
1341
        pl_received_hot_rst                            : out std_logic;
1342
        received_func_lvl_rst_n                        : out std_logic;
1343
        lnk_clk_en                                     : out std_logic;
1344
        cfg_mgmt_do                                    : out std_logic_vector(31 downto 0);
1345
        cfg_mgmt_rd_wr_done_n                          : out std_logic;
1346
        cfg_err_aer_headerlog_set_n                    : out std_logic;
1347
        cfg_err_cpl_rdy_n                              : out std_logic;
1348
        cfg_interrupt_rdy_n                            : out std_logic;
1349
        cfg_interrupt_mmenable                         : out std_logic_vector( 2 downto 0);
1350
        cfg_interrupt_msienable                        : out std_logic;
1351
        cfg_interrupt_do                               : out std_logic_vector( 7 downto 0);
1352
        cfg_interrupt_msixenable                       : out std_logic;
1353
        cfg_interrupt_msixfm                           : out std_logic;
1354
        cfg_msg_received                               : out std_logic;
1355
        cfg_msg_data                                   : out std_logic_vector(15 downto 0);
1356
        cfg_msg_received_err_cor                       : out std_logic;
1357
        cfg_msg_received_err_non_fatal                 : out std_logic;
1358
        cfg_msg_received_err_fatal                     : out std_logic;
1359
        cfg_msg_received_assert_int_a                  : out std_logic;
1360
        cfg_msg_received_deassert_int_a                : out std_logic;
1361
        cfg_msg_received_assert_int_b                  : out std_logic;
1362
        cfg_msg_received_deassert_int_b                : out std_logic;
1363
        cfg_msg_received_assert_int_c                  : out std_logic;
1364
        cfg_msg_received_deassert_int_c                : out std_logic;
1365
        cfg_msg_received_assert_int_d                  : out std_logic;
1366
        cfg_msg_received_deassert_int_d                : out std_logic;
1367
        cfg_msg_received_pm_pme                        : out std_logic;
1368
        cfg_msg_received_pme_to_ack                    : out std_logic;
1369
        cfg_msg_received_pme_to                        : out std_logic;
1370
        cfg_msg_received_setslotpowerlimit             : out std_logic;
1371
        cfg_msg_received_unlock                        : out std_logic;
1372
        cfg_msg_received_pm_as_nak                     : out std_logic;
1373
        cfg_pcie_link_state                            : out std_logic_vector( 2 downto 0);
1374
        cfg_pm_rcv_as_req_l1_n                         : out std_logic;
1375
        cfg_pm_rcv_enter_l1_n                          : out std_logic;
1376
        cfg_pm_rcv_enter_l23_n                         : out std_logic;
1377
        cfg_pm_rcv_req_ack_n                           : out std_logic;
1378
        cfg_pmcsr_powerstate                           : out std_logic_vector( 1 downto 0);
1379
        cfg_pmcsr_pme_en                               : out std_logic;
1380
        cfg_pmcsr_pme_status                           : out std_logic;
1381
        cfg_transaction                                : out std_logic;
1382
        cfg_transaction_type                           : out std_logic;
1383
        cfg_transaction_addr                           : out std_logic_vector( 6 downto 0);
1384
        cfg_command_io_enable                          : out std_logic;
1385
        cfg_command_mem_enable                         : out std_logic;
1386
        cfg_command_bus_master_enable                  : out std_logic;
1387
        cfg_command_interrupt_disable                  : out std_logic;
1388
        cfg_command_serr_en                            : out std_logic;
1389
        cfg_bridge_serr_en                             : out std_logic;
1390
        cfg_dev_status_corr_err_detected               : out std_logic;
1391
        cfg_dev_status_non_fatal_err_detected          : out std_logic;
1392
        cfg_dev_status_fatal_err_detected              : out std_logic;
1393
        cfg_dev_status_ur_detected                     : out std_logic;
1394
        cfg_dev_control_corr_err_reporting_en          : out std_logic;
1395
        cfg_dev_control_non_fatal_reporting_en         : out std_logic;
1396
        cfg_dev_control_fatal_err_reporting_en         : out std_logic;
1397
        cfg_dev_control_ur_err_reporting_en            : out std_logic;
1398
        cfg_dev_control_enable_ro                      : out std_logic;
1399
        cfg_dev_control_max_payload                    : out std_logic_vector( 2 downto 0);
1400
        cfg_dev_control_ext_tag_en                     : out std_logic;
1401
        cfg_dev_control_phantom_en                     : out std_logic;
1402
        cfg_dev_control_aux_power_en                   : out std_logic;
1403
        cfg_dev_control_no_snoop_en                    : out std_logic;
1404
        cfg_dev_control_max_read_req                   : out std_logic_vector( 2 downto 0);
1405
        cfg_link_status_current_speed                  : out std_logic_vector( 1 downto 0);
1406
        cfg_link_status_negotiated_width               : out std_logic_vector( 3 downto 0);
1407
        cfg_link_status_link_training                  : out std_logic;
1408
        cfg_link_status_dll_active                     : out std_logic;
1409
        cfg_link_status_bandwidth_status               : out std_logic;
1410
        cfg_link_status_auto_bandwidth_status          : out std_logic;
1411
        cfg_link_control_aspm_control                  : out std_logic_vector( 1 downto 0);
1412
        cfg_link_control_rcb                           : out std_logic;
1413
        cfg_link_control_link_disable                  : out std_logic;
1414
        cfg_link_control_retrain_link                  : out std_logic;
1415
        cfg_link_control_common_clock                  : out std_logic;
1416
        cfg_link_control_extended_sync                 : out std_logic;
1417
        cfg_link_control_clock_pm_en                   : out std_logic;
1418
        cfg_link_control_hw_auto_width_dis             : out std_logic;
1419
        cfg_link_control_bandwidth_int_en              : out std_logic;
1420
        cfg_link_control_auto_bandwidth_int_en         : out std_logic;
1421
        cfg_dev_control2_cpl_timeout_val               : out std_logic_vector( 3 downto 0);
1422
        cfg_dev_control2_cpl_timeout_dis               : out std_logic;
1423
        cfg_dev_control2_ari_forward_en                : out std_logic;
1424
        cfg_dev_control2_atomic_requester_en           : out std_logic;
1425
        cfg_dev_control2_atomic_egress_block           : out std_logic;
1426
        cfg_dev_control2_ido_req_en                    : out std_logic;
1427
        cfg_dev_control2_ido_cpl_en                    : out std_logic;
1428
        cfg_dev_control2_ltr_en                        : out std_logic;
1429
        cfg_dev_control2_tlp_prefix_block              : out std_logic;
1430
        cfg_slot_control_electromech_il_ctl_pulse      : out std_logic;
1431
        cfg_root_control_syserr_corr_err_en            : out std_logic;
1432
        cfg_root_control_syserr_non_fatal_err_en       : out std_logic;
1433
        cfg_root_control_syserr_fatal_err_en           : out std_logic;
1434
        cfg_root_control_pme_int_en                    : out std_logic;
1435
        cfg_aer_ecrc_check_en                          : out std_logic;
1436
        cfg_aer_ecrc_gen_en                            : out std_logic;
1437
        cfg_aer_rooterr_corr_err_reporting_en          : out std_logic;
1438
        cfg_aer_rooterr_non_fatal_err_reporting_en     : out std_logic;
1439
        cfg_aer_rooterr_fatal_err_reporting_en         : out std_logic;
1440
        cfg_aer_rooterr_corr_err_received              : out std_logic;
1441
        cfg_aer_rooterr_non_fatal_err_received         : out std_logic;
1442
        cfg_aer_rooterr_fatal_err_received             : out std_logic;
1443
        cfg_vc_tcvc_map                                : out std_logic_vector( 6 downto 0);
1444
        dbg_vec_a                                      : out std_logic_vector(63 downto 0);
1445
        dbg_vec_b                                      : out std_logic_vector(63 downto 0);
1446
        dbg_vec_c                                      : out std_logic_vector(11 downto 0);
1447
        dbg_sclr_a                                     : out std_logic;
1448
        dbg_sclr_b                                     : out std_logic;
1449
        dbg_sclr_c                                     : out std_logic;
1450
        dbg_sclr_d                                     : out std_logic;
1451
        dbg_sclr_e                                     : out std_logic;
1452
        dbg_sclr_f                                     : out std_logic;
1453
        dbg_sclr_g                                     : out std_logic;
1454
        dbg_sclr_h                                     : out std_logic;
1455
        dbg_sclr_i                                     : out std_logic;
1456
        dbg_sclr_j                                     : out std_logic;
1457
        dbg_sclr_k                                     : out std_logic;
1458
        pl_dbg_vec                                     : out std_logic_vector(11 downto 0);
1459
        xil_unconn_out                                 : out std_logic_vector(18 downto 0)
1460
      );
1461
   end component;
1462
 
1463
   component cl_a7pcie_x4_axi_basic_top is
1464
      generic (
1465
        C_DATA_WIDTH              : INTEGER := 128;     -- RX/TX interface data width
1466
        C_FAMILY                  : STRING := "X7";    -- Targeted FPGA family
1467
        C_ROOT_PORT               : BOOLEAN := FALSE; -- PCIe block is in root port mode
1468
        C_PM_PRIORITY             : BOOLEAN := FALSE; -- Disable TX packet boundary thrtl
1469
        TCQ                       : INTEGER := 1;      -- Clock to Q time
1470
        C_REM_WIDTH               : INTEGER := 1       -- trem/rrem width
1471
      );
1472
      port (
1473
        -----------------------------------------------
1474
        -- User Design I/O
1475
        -----------------------------------------------
1476
 
1477
        -- AXI TX
1478
        -------------
1479
        s_axis_tx_tdata         : IN STD_LOGIC_VECTOR(C_DATA_WIDTH - 1 DOWNTO 0) := (OTHERS=>'0');
1480
        s_axis_tx_tvalid        : IN STD_LOGIC                                   := '0';
1481
        s_axis_tx_tready        : OUT STD_LOGIC                                  := '0';
1482
        s_axis_tx_tkeep         : IN STD_LOGIC_VECTOR((C_DATA_WIDTH/8)-1 DOWNTO 0) := (OTHERS=>'0');
1483
        s_axis_tx_tlast         : IN STD_LOGIC                                   := '0';
1484
        s_axis_tx_tuser         : IN STD_LOGIC_VECTOR(3 DOWNTO 0) := (OTHERS=>'0');
1485
 
1486
        -- AXI RX
1487
        -------------
1488
        m_axis_rx_tdata         : OUT STD_LOGIC_VECTOR(C_DATA_WIDTH - 1 DOWNTO 0) := (OTHERS=>'0');
1489
        m_axis_rx_tvalid        : OUT STD_LOGIC                                   := '0';
1490
        m_axis_rx_tready        : IN STD_LOGIC                                    := '0';
1491
        m_axis_rx_tkeep         : OUT STD_LOGIC_VECTOR((C_DATA_WIDTH/8)-1 DOWNTO 0) := (OTHERS=>'0');
1492
        m_axis_rx_tlast         : OUT STD_LOGIC                                   := '0';
1493
        m_axis_rx_tuser         : OUT STD_LOGIC_VECTOR(21 DOWNTO 0) := (OTHERS=>'0');
1494
 
1495
        -- User Misc.
1496
        -------------
1497
        user_turnoff_ok         : IN STD_LOGIC                                   := '0';
1498
        user_tcfg_gnt           : IN STD_LOGIC                                   := '0';
1499
 
1500
        -----------------------------------------------
1501
        -- PCIe Block I/O
1502
        -----------------------------------------------
1503
 
1504
        -- TRN TX
1505
        -------------
1506
        trn_td                  : OUT STD_LOGIC_VECTOR(C_DATA_WIDTH - 1 DOWNTO 0) := (OTHERS=>'0');
1507
        trn_tsof                : OUT STD_LOGIC                                   := '0';
1508
        trn_teof                : OUT STD_LOGIC                                   := '0';
1509
        trn_tsrc_rdy            : OUT STD_LOGIC                                   := '0';
1510
        trn_tdst_rdy            : IN STD_LOGIC                                    := '0';
1511
        trn_tsrc_dsc            : OUT STD_LOGIC                                   := '0';
1512
        trn_trem                : OUT STD_LOGIC_VECTOR(C_REM_WIDTH - 1 DOWNTO 0)  := (OTHERS=>'0');
1513
        trn_terrfwd             : OUT STD_LOGIC                                   := '0';
1514
        trn_tstr                : OUT STD_LOGIC                                   := '0';
1515
        trn_tbuf_av             : IN STD_LOGIC_VECTOR(5 DOWNTO 0)                 := (OTHERS=>'0');
1516
        trn_tecrc_gen           : OUT STD_LOGIC                                   := '0';
1517
 
1518
        -- TRN RX
1519
        -------------
1520
        trn_rd                  : IN STD_LOGIC_VECTOR(C_DATA_WIDTH - 1 DOWNTO 0) := (OTHERS=>'0');
1521
        trn_rsof                : IN STD_LOGIC                                   := '0';
1522
        trn_reof                : IN STD_LOGIC                                   := '0';
1523
        trn_rsrc_rdy            : IN STD_LOGIC                                   := '0';
1524
        trn_rdst_rdy            : OUT STD_LOGIC                                  := '0';
1525
        trn_rsrc_dsc            : IN STD_LOGIC                                   := '0';
1526
        trn_rrem                : IN STD_LOGIC_VECTOR(C_REM_WIDTH - 1 DOWNTO 0)  := (OTHERS=>'0');
1527
        trn_rerrfwd             : IN STD_LOGIC                                   := '0';
1528
        trn_rbar_hit            : IN STD_LOGIC_VECTOR(6 DOWNTO 0)                := (OTHERS=>'0');
1529
        trn_recrc_err           : IN STD_LOGIC                                   := '0';
1530
 
1531
        -- TRN Misc.
1532
        -------------
1533
        trn_tcfg_req            : IN STD_LOGIC                                   := '0';
1534
        trn_tcfg_gnt            : OUT STD_LOGIC                                  := '0';
1535
        trn_lnk_up              : IN STD_LOGIC                                   := '0';
1536
 
1537
        -- 7 Series/Virtex6 PM
1538
        -------------
1539
        cfg_pcie_link_state     : IN STD_LOGIC_VECTOR(2 DOWNTO 0)                := (OTHERS=>'0');
1540
 
1541
        -- Virtex6 PM
1542
        -------------
1543
        cfg_pm_send_pme_to      : IN STD_LOGIC                                   := '0';
1544
        cfg_pmcsr_powerstate    : IN STD_LOGIC_VECTOR(1 DOWNTO 0)                := (OTHERS=>'0');
1545
        trn_rdllp_data          : IN STD_LOGIC_VECTOR(31 DOWNTO 0)               := (OTHERS=>'0');
1546
        trn_rdllp_src_rdy       : IN STD_LOGIC                                   := '0';
1547
 
1548
        -- Virtex6/Spartan6 PM
1549
        -------------
1550
        cfg_to_turnoff          : IN STD_LOGIC                                   := '0';
1551
        cfg_turnoff_ok          : OUT STD_LOGIC                                  := '0';
1552
 
1553
        np_counter              : OUT STD_LOGIC_VECTOR(2 DOWNTO 0)               := (OTHERS=>'0');
1554
        user_clk                : IN STD_LOGIC                                   := '0';
1555
        user_rst                : IN STD_LOGIC                                   := '0'
1556
      );
1557
   end component;
1558
 
1559
   component cl_a7pcie_x4_pcie_pipe_pipeline is
1560
      generic (
1561
       LINK_CAP_MAX_LINK_WIDTH_int                  : integer := 8;
1562
       PIPE_PIPELINE_STAGES                         : integer := 0  -- 0 - 0 stages, 1 - 1 stage, 2 - 2 stages
1563
      );
1564
      port (
1565
        -- Pipe Per-Link Signals
1566
        pipe_tx_rcvr_det_i                           : in std_logic;
1567
        pipe_tx_reset_i                              : in std_logic;
1568
        pipe_tx_rate_i                               : in std_logic;
1569
        pipe_tx_deemph_i                             : in std_logic;
1570
        pipe_tx_margin_i                             : in std_logic_vector(2 downto 0);
1571
        pipe_tx_swing_i                              : in std_logic;
1572
 
1573
        pipe_tx_rcvr_det_o                           : out std_logic;
1574
        pipe_tx_reset_o                              : out std_logic;
1575
        pipe_tx_rate_o                               : out std_logic;
1576
        pipe_tx_deemph_o                             : out std_logic;
1577
        pipe_tx_margin_o                             : out std_logic_vector(2 downto 0);
1578
        pipe_tx_swing_o                              : out std_logic;
1579
 
1580
        -- Pipe Per-Lane Signals - Lane 0
1581
        pipe_rx0_char_is_k_o                         : out std_logic_vector(1 downto 0);
1582
        pipe_rx0_data_o                              : out std_logic_vector(15 downto 0);
1583
        pipe_rx0_valid_o                             : out std_logic;
1584
        pipe_rx0_chanisaligned_o                     : out std_logic;
1585
        pipe_rx0_status_o                            : out std_logic_vector(2 downto 0);
1586
        pipe_rx0_phy_status_o                        : out std_logic;
1587
        pipe_rx0_elec_idle_o                         : out std_logic;
1588
        pipe_rx0_polarity_i                          : in std_logic;
1589
 
1590
        pipe_tx0_compliance_i                        : in std_logic;
1591
        pipe_tx0_char_is_k_i                         : in std_logic_vector(1 downto 0);
1592
        pipe_tx0_data_i                              : in std_logic_vector(15 downto 0);
1593
        pipe_tx0_elec_idle_i                         : in std_logic;
1594
        pipe_tx0_powerdown_i                         : in std_logic_vector(1 downto 0);
1595
 
1596
        pipe_rx0_char_is_k_i                         : in std_logic_vector(1 downto 0);
1597
        pipe_rx0_data_i                              : in std_logic_vector(15 downto 0);
1598
        pipe_rx0_valid_i                             : in std_logic;
1599
        pipe_rx0_chanisaligned_i                     : in std_logic;
1600
        pipe_rx0_status_i                            : in std_logic_vector(2 downto 0);
1601
        pipe_rx0_phy_status_i                        : in std_logic;
1602
        pipe_rx0_elec_idle_i                         : in std_logic;
1603
        pipe_rx0_polarity_o                          : out std_logic;
1604
 
1605
        pipe_tx0_compliance_o                        : out std_logic;
1606
        pipe_tx0_char_is_k_o                         : out std_logic_vector(1 downto 0);
1607
        pipe_tx0_data_o                              : out std_logic_vector(15 downto 0);
1608
        pipe_tx0_elec_idle_o                         : out std_logic;
1609
        pipe_tx0_powerdown_o                         : out std_logic_vector(1 downto 0);
1610
 
1611
        -- Pipe Per-Lane Signals - Lane 1
1612
        pipe_rx1_char_is_k_o                         : out std_logic_vector(1 downto 0);
1613
        pipe_rx1_data_o                              : out std_logic_vector(15 downto 0);
1614
        pipe_rx1_valid_o                             : out std_logic;
1615
        pipe_rx1_chanisaligned_o                     : out std_logic;
1616
        pipe_rx1_status_o                            : out std_logic_vector(2 downto 0);
1617
        pipe_rx1_phy_status_o                        : out std_logic;
1618
        pipe_rx1_elec_idle_o                         : out std_logic;
1619
        pipe_rx1_polarity_i                          : in std_logic;
1620
 
1621
        pipe_tx1_compliance_i                        : in std_logic;
1622
        pipe_tx1_char_is_k_i                         : in std_logic_vector(1 downto 0);
1623
        pipe_tx1_data_i                              : in std_logic_vector(15 downto 0);
1624
        pipe_tx1_elec_idle_i                         : in std_logic;
1625
        pipe_tx1_powerdown_i                         : in std_logic_vector(1 downto 0);
1626
 
1627
        pipe_rx1_char_is_k_i                         : in std_logic_vector(1 downto 0);
1628
        pipe_rx1_data_i                              : in std_logic_vector(15 downto 0);
1629
        pipe_rx1_valid_i                             : in std_logic;
1630
        pipe_rx1_chanisaligned_i                     : in std_logic;
1631
        pipe_rx1_status_i                            : in std_logic_vector(2 downto 0);
1632
        pipe_rx1_phy_status_i                        : in std_logic;
1633
        pipe_rx1_elec_idle_i                         : in std_logic;
1634
        pipe_rx1_polarity_o                          : out std_logic;
1635
 
1636
        pipe_tx1_compliance_o                        : out std_logic;
1637
        pipe_tx1_char_is_k_o                         : out std_logic_vector(1 downto 0);
1638
        pipe_tx1_data_o                              : out std_logic_vector(15 downto 0);
1639
        pipe_tx1_elec_idle_o                         : out std_logic;
1640
        pipe_tx1_powerdown_o                         : out std_logic_vector(1 downto 0);
1641
 
1642
        -- Pipe Per-Lane Signals - Lane 2
1643
        pipe_rx2_char_is_k_o                         : out std_logic_vector(1 downto 0);
1644
        pipe_rx2_data_o                              : out std_logic_vector(15 downto 0);
1645
        pipe_rx2_valid_o                             : out std_logic;
1646
        pipe_rx2_chanisaligned_o                     : out std_logic;
1647
        pipe_rx2_status_o                            : out std_logic_vector(2 downto 0);
1648
        pipe_rx2_phy_status_o                        : out std_logic;
1649
        pipe_rx2_elec_idle_o                         : out std_logic;
1650
        pipe_rx2_polarity_i                          : in std_logic;
1651
 
1652
        pipe_tx2_compliance_i                        : in std_logic;
1653
        pipe_tx2_char_is_k_i                         : in std_logic_vector(1 downto 0);
1654
        pipe_tx2_data_i                              : in std_logic_vector(15 downto 0);
1655
        pipe_tx2_elec_idle_i                         : in std_logic;
1656
        pipe_tx2_powerdown_i                         : in std_logic_vector(1 downto 0);
1657
 
1658
        pipe_rx2_char_is_k_i                         : in std_logic_vector(1 downto 0);
1659
        pipe_rx2_data_i                              : in std_logic_vector(15 downto 0);
1660
        pipe_rx2_valid_i                             : in std_logic;
1661
        pipe_rx2_chanisaligned_i                     : in std_logic;
1662
        pipe_rx2_status_i                            : in std_logic_vector(2 downto 0);
1663
        pipe_rx2_phy_status_i                        : in std_logic;
1664
        pipe_rx2_elec_idle_i                         : in std_logic;
1665
        pipe_rx2_polarity_o                          : out std_logic;
1666
 
1667
        pipe_tx2_compliance_o                        : out std_logic;
1668
        pipe_tx2_char_is_k_o                         : out std_logic_vector(1 downto 0);
1669
        pipe_tx2_data_o                              : out std_logic_vector(15 downto 0);
1670
        pipe_tx2_elec_idle_o                         : out std_logic;
1671
        pipe_tx2_powerdown_o                         : out std_logic_vector(1 downto 0);
1672
 
1673
        -- Pipe Per-Lane Signals - Lane 3
1674
        pipe_rx3_char_is_k_o                         : out std_logic_vector(1 downto 0);
1675
        pipe_rx3_data_o                              : out std_logic_vector(15 downto 0);
1676
        pipe_rx3_valid_o                             : out std_logic;
1677
        pipe_rx3_chanisaligned_o                     : out std_logic;
1678
        pipe_rx3_status_o                            : out std_logic_vector(2 downto 0);
1679
        pipe_rx3_phy_status_o                        : out std_logic;
1680
        pipe_rx3_elec_idle_o                         : out std_logic;
1681
        pipe_rx3_polarity_i                          : in std_logic;
1682
 
1683
        pipe_tx3_compliance_i                        : in std_logic;
1684
        pipe_tx3_char_is_k_i                         : in std_logic_vector(1 downto 0);
1685
        pipe_tx3_data_i                              : in std_logic_vector(15 downto 0);
1686
        pipe_tx3_elec_idle_i                         : in std_logic;
1687
        pipe_tx3_powerdown_i                         : in std_logic_vector(1 downto 0);
1688
 
1689
        pipe_rx3_char_is_k_i                         : in std_logic_vector(1 downto 0);
1690
        pipe_rx3_data_i                              : in std_logic_vector(15 downto 0);
1691
        pipe_rx3_valid_i                             : in std_logic;
1692
        pipe_rx3_chanisaligned_i                     : in std_logic;
1693
        pipe_rx3_status_i                            : in std_logic_vector(2 downto 0);
1694
        pipe_rx3_phy_status_i                        : in std_logic;
1695
        pipe_rx3_elec_idle_i                         : in std_logic;
1696
        pipe_rx3_polarity_o                          : out std_logic;
1697
 
1698
        pipe_tx3_compliance_o                        : out std_logic;
1699
        pipe_tx3_char_is_k_o                         : out std_logic_vector(1 downto 0);
1700
        pipe_tx3_data_o                              : out std_logic_vector(15 downto 0);
1701
        pipe_tx3_elec_idle_o                         : out std_logic;
1702
        pipe_tx3_powerdown_o                         : out std_logic_vector(1 downto 0);
1703
 
1704
        -- Pipe Per-Lane Signals - Lane 4
1705
        pipe_rx4_char_is_k_o                         : out std_logic_vector(1 downto 0);
1706
        pipe_rx4_data_o                              : out std_logic_vector(15 downto 0);
1707
        pipe_rx4_valid_o                             : out std_logic;
1708
        pipe_rx4_chanisaligned_o                     : out std_logic;
1709
        pipe_rx4_status_o                            : out std_logic_vector(2 downto 0);
1710
        pipe_rx4_phy_status_o                        : out std_logic;
1711
        pipe_rx4_elec_idle_o                         : out std_logic;
1712
        pipe_rx4_polarity_i                          : in std_logic;
1713
 
1714
        pipe_tx4_compliance_i                        : in std_logic;
1715
        pipe_tx4_char_is_k_i                         : in std_logic_vector(1 downto 0);
1716
        pipe_tx4_data_i                              : in std_logic_vector(15 downto 0);
1717
        pipe_tx4_elec_idle_i                         : in std_logic;
1718
        pipe_tx4_powerdown_i                         : in std_logic_vector(1 downto 0);
1719
 
1720
        pipe_rx4_char_is_k_i                         : in std_logic_vector(1 downto 0);
1721
        pipe_rx4_data_i                              : in std_logic_vector(15 downto 0);
1722
        pipe_rx4_valid_i                             : in std_logic;
1723
        pipe_rx4_chanisaligned_i                     : in std_logic;
1724
        pipe_rx4_status_i                            : in std_logic_vector(2 downto 0);
1725
        pipe_rx4_phy_status_i                        : in std_logic;
1726
        pipe_rx4_elec_idle_i                         : in std_logic;
1727
        pipe_rx4_polarity_o                          : out std_logic;
1728
 
1729
        pipe_tx4_compliance_o                        : out std_logic;
1730
        pipe_tx4_char_is_k_o                         : out std_logic_vector(1 downto 0);
1731
        pipe_tx4_data_o                              : out std_logic_vector(15 downto 0);
1732
        pipe_tx4_elec_idle_o                         : out std_logic;
1733
        pipe_tx4_powerdown_o                         : out std_logic_vector(1 downto 0);
1734
 
1735
        -- Pipe Per-Lane Signals - Lane 5
1736
        pipe_rx5_char_is_k_o                         : out std_logic_vector(1 downto 0);
1737
        pipe_rx5_data_o                              : out std_logic_vector(15 downto 0);
1738
        pipe_rx5_valid_o                             : out std_logic;
1739
        pipe_rx5_chanisaligned_o                     : out std_logic;
1740
        pipe_rx5_status_o                            : out std_logic_vector(2 downto 0);
1741
        pipe_rx5_phy_status_o                        : out std_logic;
1742
        pipe_rx5_elec_idle_o                         : out std_logic;
1743
        pipe_rx5_polarity_i                          : in std_logic;
1744
 
1745
        pipe_tx5_compliance_i                        : in std_logic;
1746
        pipe_tx5_char_is_k_i                         : in std_logic_vector(1 downto 0);
1747
        pipe_tx5_data_i                              : in std_logic_vector(15 downto 0);
1748
        pipe_tx5_elec_idle_i                         : in std_logic;
1749
        pipe_tx5_powerdown_i                         : in std_logic_vector(1 downto 0);
1750
 
1751
        pipe_rx5_char_is_k_i                         : in std_logic_vector(1 downto 0);
1752
        pipe_rx5_data_i                              : in std_logic_vector(15 downto 0);
1753
        pipe_rx5_valid_i                             : in std_logic;
1754
        pipe_rx5_chanisaligned_i                     : in std_logic;
1755
        pipe_rx5_status_i                            : in std_logic_vector(2 downto 0);
1756
        pipe_rx5_phy_status_i                        : in std_logic;
1757
        pipe_rx5_elec_idle_i                         : in std_logic;
1758
        pipe_rx5_polarity_o                          : out std_logic;
1759
 
1760
        pipe_tx5_compliance_o                        : out std_logic;
1761
        pipe_tx5_char_is_k_o                         : out std_logic_vector(1 downto 0);
1762
        pipe_tx5_data_o                              : out std_logic_vector(15 downto 0);
1763
        pipe_tx5_elec_idle_o                         : out std_logic;
1764
        pipe_tx5_powerdown_o                         : out std_logic_vector(1 downto 0);
1765
 
1766
        -- Pipe Per-Lane Signals - Lane 6
1767
        pipe_rx6_char_is_k_o                         : out std_logic_vector(1 downto 0);
1768
        pipe_rx6_data_o                              : out std_logic_vector(15 downto 0);
1769
        pipe_rx6_valid_o                             : out std_logic;
1770
        pipe_rx6_chanisaligned_o                     : out std_logic;
1771
        pipe_rx6_status_o                            : out std_logic_vector(2 downto 0);
1772
        pipe_rx6_phy_status_o                        : out std_logic;
1773
        pipe_rx6_elec_idle_o                         : out std_logic;
1774
        pipe_rx6_polarity_i                          : in std_logic;
1775
 
1776
        pipe_tx6_compliance_i                        : in std_logic;
1777
        pipe_tx6_char_is_k_i                         : in std_logic_vector(1 downto 0);
1778
        pipe_tx6_data_i                              : in std_logic_vector(15 downto 0);
1779
        pipe_tx6_elec_idle_i                         : in std_logic;
1780
        pipe_tx6_powerdown_i                         : in std_logic_vector(1 downto 0);
1781
 
1782
        pipe_rx6_char_is_k_i                         : in std_logic_vector(1 downto 0);
1783
        pipe_rx6_data_i                              : in std_logic_vector(15 downto 0);
1784
        pipe_rx6_valid_i                             : in std_logic;
1785
        pipe_rx6_chanisaligned_i                     : in std_logic;
1786
        pipe_rx6_status_i                            : in std_logic_vector(2 downto 0);
1787
        pipe_rx6_phy_status_i                        : in std_logic;
1788
        pipe_rx6_elec_idle_i                         : in std_logic;
1789
        pipe_rx6_polarity_o                          : out std_logic;
1790
 
1791
        pipe_tx6_compliance_o                        : out std_logic;
1792
        pipe_tx6_char_is_k_o                         : out std_logic_vector(1 downto 0);
1793
        pipe_tx6_data_o                              : out std_logic_vector(15 downto 0);
1794
        pipe_tx6_elec_idle_o                         : out std_logic;
1795
        pipe_tx6_powerdown_o                         : out std_logic_vector(1 downto 0);
1796
 
1797
        -- Pipe Per-Lane Signals - Lane 7
1798
        pipe_rx7_char_is_k_o                         : out std_logic_vector(1 downto 0);
1799
        pipe_rx7_data_o                              : out std_logic_vector(15 downto 0);
1800
        pipe_rx7_valid_o                             : out std_logic;
1801
        pipe_rx7_chanisaligned_o                     : out std_logic;
1802
        pipe_rx7_status_o                            : out std_logic_vector(2 downto 0);
1803
        pipe_rx7_phy_status_o                        : out std_logic;
1804
        pipe_rx7_elec_idle_o                         : out std_logic;
1805
        pipe_rx7_polarity_i                          : in std_logic;
1806
 
1807
        pipe_tx7_compliance_i                        : in std_logic;
1808
        pipe_tx7_char_is_k_i                         : in std_logic_vector(1 downto 0);
1809
        pipe_tx7_data_i                              : in std_logic_vector(15 downto 0);
1810
        pipe_tx7_elec_idle_i                         : in std_logic;
1811
        pipe_tx7_powerdown_i                         : in std_logic_vector(1 downto 0);
1812
 
1813
        pipe_rx7_char_is_k_i                         : in std_logic_vector(1 downto 0);
1814
        pipe_rx7_data_i                              : in std_logic_vector(15 downto 0);
1815
        pipe_rx7_valid_i                             : in std_logic;
1816
        pipe_rx7_chanisaligned_i                     : in std_logic;
1817
        pipe_rx7_status_i                            : in std_logic_vector(2 downto 0);
1818
        pipe_rx7_phy_status_i                        : in std_logic;
1819
        pipe_rx7_elec_idle_i                         : in std_logic;
1820
        pipe_rx7_polarity_o                          : out std_logic;
1821
 
1822
        pipe_tx7_compliance_o                        : out std_logic;
1823
        pipe_tx7_char_is_k_o                         : out std_logic_vector(1 downto 0);
1824
        pipe_tx7_data_o                              : out std_logic_vector(15 downto 0);
1825
        pipe_tx7_elec_idle_o                         : out std_logic;
1826
        pipe_tx7_powerdown_o                         : out std_logic_vector(1 downto 0);
1827
 
1828
        -- Non PIPE signals
1829
        pl_ltssm_state                               : in std_logic_vector(5 downto 0);
1830
        pipe_clk                                     : in std_logic;
1831
        rst_n                                        : in std_logic
1832
      );
1833
   end component;
1834
 
1835
  -- TRN Interface
1836
  signal    trn_td                   : std_logic_vector ((C_DATA_WIDTH - 1) downto 0);
1837
  signal    trn_trem                 : std_logic_vector ((C_REM_WIDTH - 1) downto 0);
1838
  signal    trn_tsof                 : std_logic;
1839
  signal    trn_teof                 : std_logic;
1840
  signal    trn_tsrc_rdy             : std_logic;
1841
  signal    trn_tsrc_dsc             : std_logic;
1842
  signal    trn_terrfwd              : std_logic;
1843
  signal    trn_tecrc_gen            : std_logic;
1844
  signal    trn_tstr                 : std_logic;
1845
  signal    trn_tcfg_gnt             : std_logic;
1846
  signal    trn_tdst_rdy             : std_logic;
1847
  signal    trn_recrc_err            : std_logic;
1848
 
1849
 
1850
  signal    trn_rd                   : std_logic_vector ((C_DATA_WIDTH - 1) downto 0);
1851
  signal    trn_rrem                 : std_logic_vector ((C_REM_WIDTH - 1) downto 0);
1852
  signal    trn_rdst_rdy             : std_logic;
1853
  signal    trn_rsof                 : std_logic;
1854
  signal    trn_reof                 : std_logic;
1855
  signal    trn_rsrc_rdy             : std_logic;
1856
  signal    trn_rsrc_dsc             : std_logic;
1857
  signal    trn_rerrfwd              : std_logic;
1858
  signal    trn_rbar_hit             : std_logic_vector (7 downto 0);
1859
 
1860
  signal sys_reset_n_d               : std_logic;
1861
  signal pipe_rx0_char_is_k          : std_logic_vector(1 downto 0);
1862
  signal pipe_rx1_char_is_k          : std_logic_vector(1 downto 0);
1863
  signal pipe_rx2_char_is_k          : std_logic_vector(1 downto 0);
1864
  signal pipe_rx3_char_is_k          : std_logic_vector(1 downto 0);
1865
  signal pipe_rx4_char_is_k          : std_logic_vector(1 downto 0);
1866
  signal pipe_rx5_char_is_k          : std_logic_vector(1 downto 0);
1867
  signal pipe_rx6_char_is_k          : std_logic_vector(1 downto 0);
1868
  signal pipe_rx7_char_is_k          : std_logic_vector(1 downto 0);
1869
  signal pipe_rx0_valid              : std_logic;
1870
  signal pipe_rx1_valid              : std_logic;
1871
  signal pipe_rx2_valid              : std_logic;
1872
  signal pipe_rx3_valid              : std_logic;
1873
  signal pipe_rx4_valid              : std_logic;
1874
  signal pipe_rx5_valid              : std_logic;
1875
  signal pipe_rx6_valid              : std_logic;
1876
  signal pipe_rx7_valid              : std_logic;
1877
  signal pipe_rx0_data               : std_logic_vector(15 downto 0);
1878
  signal pipe_rx1_data               : std_logic_vector(15 downto 0);
1879
  signal pipe_rx2_data               : std_logic_vector(15 downto 0);
1880
  signal pipe_rx3_data               : std_logic_vector(15 downto 0);
1881
  signal pipe_rx4_data               : std_logic_vector(15 downto 0);
1882
  signal pipe_rx5_data               : std_logic_vector(15 downto 0);
1883
  signal pipe_rx6_data               : std_logic_vector(15 downto 0);
1884
  signal pipe_rx7_data               : std_logic_vector(15 downto 0);
1885
  signal pipe_rx0_chanisaligned      : std_logic;
1886
  signal pipe_rx1_chanisaligned      : std_logic;
1887
  signal pipe_rx2_chanisaligned      : std_logic;
1888
  signal pipe_rx3_chanisaligned      : std_logic;
1889
  signal pipe_rx4_chanisaligned      : std_logic;
1890
  signal pipe_rx5_chanisaligned      : std_logic;
1891
  signal pipe_rx6_chanisaligned      : std_logic;
1892
  signal pipe_rx7_chanisaligned      : std_logic;
1893
  signal pipe_rx0_status             : std_logic_vector(2 downto 0);
1894
  signal pipe_rx1_status             : std_logic_vector(2 downto 0);
1895
  signal pipe_rx2_status             : std_logic_vector(2 downto 0);
1896
  signal pipe_rx3_status             : std_logic_vector(2 downto 0);
1897
  signal pipe_rx4_status             : std_logic_vector(2 downto 0);
1898
  signal pipe_rx5_status             : std_logic_vector(2 downto 0);
1899
  signal pipe_rx6_status             : std_logic_vector(2 downto 0);
1900
  signal pipe_rx7_status             : std_logic_vector(2 downto 0);
1901
  signal pipe_rx0_phy_status         : std_logic;
1902
  signal pipe_rx1_phy_status         : std_logic;
1903
  signal pipe_rx2_phy_status         : std_logic;
1904
  signal pipe_rx3_phy_status         : std_logic;
1905
  signal pipe_rx4_phy_status         : std_logic;
1906
  signal pipe_rx5_phy_status         : std_logic;
1907
  signal pipe_rx6_phy_status         : std_logic;
1908
  signal pipe_rx7_phy_status         : std_logic;
1909
 
1910
  signal pipe_rx0_elec_idle          : std_logic;
1911
  signal pipe_rx1_elec_idle          : std_logic;
1912
  signal pipe_rx2_elec_idle          : std_logic;
1913
  signal pipe_rx3_elec_idle          : std_logic;
1914
  signal pipe_rx4_elec_idle          : std_logic;
1915
  signal pipe_rx5_elec_idle          : std_logic;
1916
  signal pipe_rx6_elec_idle          : std_logic;
1917
  signal pipe_rx7_elec_idle          : std_logic;
1918
 
1919
 
1920
  signal pipe_tx_reset               : std_logic;
1921
  signal pipe_tx_rate                : std_logic;
1922
  signal pipe_tx_deemph              : std_logic;
1923
  signal pipe_tx_margin              : std_logic_vector(2 downto 0);
1924
  signal pipe_rx0_polarity           : std_logic;
1925
  signal pipe_rx1_polarity           : std_logic;
1926
  signal pipe_rx2_polarity           : std_logic;
1927
  signal pipe_rx3_polarity           : std_logic;
1928
  signal pipe_rx4_polarity           : std_logic;
1929
  signal pipe_rx5_polarity           : std_logic;
1930
  signal pipe_rx6_polarity           : std_logic;
1931
  signal pipe_rx7_polarity           : std_logic;
1932
  signal pipe_tx0_compliance         : std_logic;
1933
  signal pipe_tx1_compliance         : std_logic;
1934
  signal pipe_tx2_compliance         : std_logic;
1935
  signal pipe_tx3_compliance         : std_logic;
1936
  signal pipe_tx4_compliance         : std_logic;
1937
  signal pipe_tx5_compliance         : std_logic;
1938
  signal pipe_tx6_compliance         : std_logic;
1939
  signal pipe_tx7_compliance         : std_logic;
1940
  signal pipe_tx0_char_is_k          : std_logic_vector(1 downto 0);
1941
  signal pipe_tx1_char_is_k          : std_logic_vector(1 downto 0);
1942
  signal pipe_tx2_char_is_k          : std_logic_vector(1 downto 0);
1943
  signal pipe_tx3_char_is_k          : std_logic_vector(1 downto 0);
1944
  signal pipe_tx4_char_is_k          : std_logic_vector(1 downto 0);
1945
  signal pipe_tx5_char_is_k          : std_logic_vector(1 downto 0);
1946
  signal pipe_tx6_char_is_k          : std_logic_vector(1 downto 0);
1947
  signal pipe_tx7_char_is_k          : std_logic_vector(1 downto 0);
1948
  signal pipe_tx0_data               : std_logic_vector(15 downto 0);
1949
  signal pipe_tx1_data               : std_logic_vector(15 downto 0);
1950
  signal pipe_tx2_data               : std_logic_vector(15 downto 0);
1951
  signal pipe_tx3_data               : std_logic_vector(15 downto 0);
1952
  signal pipe_tx4_data               : std_logic_vector(15 downto 0);
1953
  signal pipe_tx5_data               : std_logic_vector(15 downto 0);
1954
  signal pipe_tx6_data               : std_logic_vector(15 downto 0);
1955
  signal pipe_tx7_data               : std_logic_vector(15 downto 0);
1956
  signal pipe_tx0_elec_idle          : std_logic;
1957
  signal pipe_tx1_elec_idle          : std_logic;
1958
  signal pipe_tx2_elec_idle          : std_logic;
1959
  signal pipe_tx3_elec_idle          : std_logic;
1960
  signal pipe_tx4_elec_idle          : std_logic;
1961
  signal pipe_tx5_elec_idle          : std_logic;
1962
  signal pipe_tx6_elec_idle          : std_logic;
1963
  signal pipe_tx7_elec_idle          : std_logic;
1964
  signal pipe_tx0_powerdown          : std_logic_vector(1 downto 0);
1965
  signal pipe_tx1_powerdown          : std_logic_vector(1 downto 0);
1966
  signal pipe_tx2_powerdown          : std_logic_vector(1 downto 0);
1967
  signal pipe_tx3_powerdown          : std_logic_vector(1 downto 0);
1968
  signal pipe_tx4_powerdown          : std_logic_vector(1 downto 0);
1969
  signal pipe_tx5_powerdown          : std_logic_vector(1 downto 0);
1970
  signal pipe_tx6_powerdown          : std_logic_vector(1 downto 0);
1971
  signal pipe_tx7_powerdown          : std_logic_vector(1 downto 0);
1972
 
1973
  signal cfg_received_func_lvl_rst_n : std_logic;
1974
  signal cfg_err_cpl_rdy_n           : std_logic;
1975
  signal cfg_interrupt_rdy_n         : std_logic;
1976
  signal cfg_bus_number_d            : std_logic_vector(7 downto 0);
1977
  signal cfg_device_number_d         : std_logic_vector(4 downto 0);
1978
  signal cfg_function_number_d       : std_logic_vector(2 downto 0);
1979
 
1980
  signal cfg_mgmt_rd_wr_done_n         : std_logic;
1981
  signal pl_phy_lnk_up_n               : std_logic;
1982
  signal cfg_err_aer_headerlog_set_n   : std_logic;
1983
 
1984
  -- Define intermediate wires
1985
  signal cfg_command_mem_enable_int    : std_logic;
1986
  signal cfg_msg_received_pme_to_int   : std_logic;
1987
  signal cfg_command_interrupt_disable_int : std_logic;
1988
  signal cfg_command_serr_en_int           : std_logic;
1989
  signal cfg_command_bus_master_enable_int : std_logic;
1990
  signal cfg_command_io_enable_int         : std_logic;
1991
  signal cfg_trn_pending_n                 : std_logic;
1992
  signal cfg_dev_status_ur_detected_int    : std_logic;
1993
  signal cfg_dev_status_fatal_err_detected_int : std_logic;
1994
  signal cfg_dev_status_non_fatal_err_detected_int : std_logic;
1995
  signal cfg_dev_status_corr_err_detected_int : std_logic;
1996
  signal cfg_dev_control_non_fatal_reporting_en_int : std_logic;
1997
  signal cfg_dev_control_fatal_err_reporting_en_int : std_logic;
1998
  signal cfg_dev_control_corr_err_reporting_en_int : std_logic;
1999
  signal cfg_dev_control_ur_err_reporting_en_int : std_logic;
2000
  signal cfg_dev_control_max_read_req_int : std_logic_vector(2 downto 0);
2001
  signal cfg_dev_control_max_payload_int : std_logic_vector(2 downto 0);
2002
  signal cfg_dev_control_enable_ro_int : std_logic;
2003
  signal cfg_dev_control_no_snoop_en_int : std_logic;
2004
  signal cfg_dev_control_aux_power_en_int : std_logic;
2005
  signal cfg_dev_control_phantom_en_int : std_logic;
2006
  signal cfg_dev_control_ext_tag_en_int : std_logic;
2007
  signal cfg_link_status_auto_bandwidth_status_int   : std_logic;
2008
  signal cfg_link_status_bandwidth_status_int        : std_logic;
2009
  signal cfg_link_status_dll_active_int              : std_logic;
2010
  signal cfg_link_status_link_training_int           : std_logic;
2011
  signal cfg_link_status_negotiated_width_int        : std_logic_vector(3 downto 0);
2012
  signal cfg_link_status_current_speed_int           : std_logic_vector(1 downto 0);
2013
  signal cfg_link_control_auto_bandwidth_int_en_int  : std_logic;
2014
  signal cfg_link_control_bandwidth_int_en_int       : std_logic;
2015
  signal cfg_link_control_hw_auto_width_dis_int      : std_logic;
2016
  signal cfg_link_control_clock_pm_en_int            : std_logic;
2017
  signal cfg_link_control_extended_sync_int          : std_logic;
2018
  signal cfg_link_control_common_clock_int           : std_logic;
2019
  signal cfg_link_control_retrain_link_int           : std_logic;
2020
  signal cfg_link_control_link_disable_int           : std_logic;
2021
  signal cfg_link_control_rcb_int                    : std_logic;
2022
  signal cfg_link_control_aspm_control_int           : std_logic_vector(1 downto 0);
2023
  signal cfg_dev_control2_tlp_prefix_block_int       : std_logic;
2024
  signal cfg_dev_control2_ltr_en_int                 : std_logic;
2025
  signal cfg_dev_control2_ido_cpl_en_int             : std_logic;
2026
  signal cfg_dev_control2_ido_req_en_int             : std_logic;
2027
  signal cfg_dev_control2_atomic_egress_block_int    : std_logic;
2028
  signal cfg_dev_control2_atomic_requester_en_int    : std_logic;
2029
  signal cfg_dev_control2_ari_forward_en_int         : std_logic;
2030
  signal cfg_dev_control2_cpl_timeout_dis_int        : std_logic;
2031
  signal cfg_dev_control2_cpl_timeout_val_int        : std_logic_vector(3 downto 0);
2032
  signal user_clk_out_int                            : std_logic;
2033
  signal cfg_msg_received_int                        : std_logic;
2034
  signal cfg_msg_data_int                            : std_logic_vector(15 downto 0);
2035
  signal cfg_turnoff_ok_int_n                        : std_logic;
2036
  signal cfg_turnoff_ok_int                          : std_logic;
2037
  signal phy_rdy                                     : std_logic;
2038
  signal tx_buf_av_int                               : std_logic_vector(5 downto 0);
2039
  signal tx_cfg_req_int                              : std_logic;
2040
  signal cfg_pcie_link_state_int                     : std_logic_vector(2 downto 0);
2041
  signal cfg_pmcsr_powerstate_int                    : std_logic_vector(1 downto 0);
2042
  signal pipe_tx_rcvr_det                            : std_logic;
2043
  signal pl_ltssm_state_int                          : std_logic_vector(5 downto 0);
2044
 
2045
 -- signal cfg_to_turnoff              : std_logic;
2046
   -- Calculate Link Status Slot Clock Config Bit
2047
  function get_slot_clk_cfg (
2048
    constant lstat_clk_cfg   : string)
2049
    return std_logic is
2050
  begin  -- msb_d
2051
    if (lstat_clk_cfg = "TRUE") then
2052
      return '1';
2053
    else
2054
      return '0';
2055
    end if;
2056
  end get_slot_clk_cfg;
2057
 
2058
  constant lstatus_slot_clk_config  : std_logic :=  get_slot_clk_cfg(LINK_STATUS_SLOT_CLOCK_CONFIG);
2059
  constant TCQ     : integer := 1;
2060
 
2061
  begin
2062
 
2063
    -- Assign outputs
2064
    cfg_msg_received_pme_to                 <= cfg_msg_received_pme_to_int;
2065
    cfg_command_mem_enable                  <= cfg_command_mem_enable_int;
2066
    cfg_command_interrupt_disable           <= cfg_command_interrupt_disable_int;
2067
    cfg_command_serr_en                     <= cfg_command_serr_en_int;
2068
    cfg_command_bus_master_enable           <= cfg_command_bus_master_enable_int;
2069
    cfg_command_io_enable                   <= cfg_command_io_enable_int;
2070
    cfg_trn_pending_n                       <= not cfg_trn_pending;
2071
    cfg_dev_status_ur_detected              <= cfg_dev_status_ur_detected_int;
2072
    cfg_dev_status_fatal_err_detected       <= cfg_dev_status_fatal_err_detected_int;
2073
    cfg_dev_status_non_fatal_err_detected   <= cfg_dev_status_non_fatal_err_detected_int;
2074
    cfg_dev_status_corr_err_detected        <= cfg_dev_status_corr_err_detected_int;
2075
    cfg_dev_control_non_fatal_reporting_en  <= cfg_dev_control_non_fatal_reporting_en_int;
2076
    cfg_dev_control_fatal_err_reporting_en  <= cfg_dev_control_fatal_err_reporting_en_int;
2077
    cfg_dev_control_corr_err_reporting_en   <= cfg_dev_control_corr_err_reporting_en_int;
2078
    cfg_dev_control_ur_err_reporting_en     <= cfg_dev_control_ur_err_reporting_en_int;
2079
    cfg_dev_control_max_read_req            <= cfg_dev_control_max_read_req_int;
2080
    cfg_dev_control_max_payload             <= cfg_dev_control_max_payload_int;
2081
    cfg_dev_control_enable_ro               <= cfg_dev_control_enable_ro_int;
2082
    cfg_dev_control_no_snoop_en             <= cfg_dev_control_no_snoop_en_int;
2083
    cfg_dev_control_aux_power_en            <= cfg_dev_control_aux_power_en_int;
2084
    cfg_dev_control_phantom_en              <= cfg_dev_control_phantom_en_int;
2085
    cfg_dev_control_ext_tag_en              <= cfg_dev_control_ext_tag_en_int;
2086
    cfg_link_status_auto_bandwidth_status   <= cfg_link_status_auto_bandwidth_status_int;
2087
    cfg_link_status_bandwidth_status        <= cfg_link_status_bandwidth_status_int;
2088
    cfg_link_status_dll_active              <= cfg_link_status_dll_active_int;
2089
    cfg_link_status_link_training           <= cfg_link_status_link_training_int;
2090
    cfg_link_status_negotiated_width        <= cfg_link_status_negotiated_width_int;
2091
    cfg_link_status_current_speed           <= cfg_link_status_current_speed_int;
2092
    cfg_link_control_auto_bandwidth_int_en  <= cfg_link_control_auto_bandwidth_int_en_int;
2093
    cfg_link_control_bandwidth_int_en       <= cfg_link_control_bandwidth_int_en_int;
2094
    cfg_link_control_hw_auto_width_dis      <= cfg_link_control_hw_auto_width_dis_int;
2095
    cfg_link_control_clock_pm_en            <= cfg_link_control_clock_pm_en_int;
2096
    cfg_link_control_extended_sync          <= cfg_link_control_extended_sync_int;
2097
    cfg_link_control_common_clock           <= cfg_link_control_common_clock_int;
2098
    cfg_link_control_retrain_link           <= cfg_link_control_retrain_link_int;
2099
    cfg_link_control_link_disable           <= cfg_link_control_link_disable_int;
2100
    cfg_link_control_rcb                    <= cfg_link_control_rcb_int;
2101
    cfg_link_control_aspm_control           <= cfg_link_control_aspm_control_int;
2102
    cfg_dev_control2_tlp_prefix_block       <= cfg_dev_control2_tlp_prefix_block_int;
2103
    cfg_dev_control2_ltr_en                 <= cfg_dev_control2_ltr_en_int;
2104
    cfg_dev_control2_ido_cpl_en             <= cfg_dev_control2_ido_cpl_en_int;
2105
    cfg_dev_control2_ido_req_en             <= cfg_dev_control2_ido_req_en_int;
2106
    cfg_dev_control2_atomic_egress_block    <= cfg_dev_control2_atomic_egress_block_int;
2107
    cfg_dev_control2_atomic_requester_en    <= cfg_dev_control2_atomic_requester_en_int;
2108
    cfg_dev_control2_ari_forward_en         <= cfg_dev_control2_ari_forward_en_int;
2109
    cfg_dev_control2_cpl_timeout_dis        <= cfg_dev_control2_cpl_timeout_dis_int;
2110
    cfg_dev_control2_cpl_timeout_val        <= cfg_dev_control2_cpl_timeout_val_int;
2111
    user_clk_out                            <= user_clk_out_int;
2112
    cfg_msg_received                        <= cfg_msg_received_int;
2113
    cfg_msg_data                            <= cfg_msg_data_int;
2114
    cfg_turnoff_ok_int_n                    <= not cfg_turnoff_ok_int;
2115
    phy_rdy                                 <= not phy_rdy_n;
2116
    tx_buf_av                               <= tx_buf_av_int;
2117
    tx_cfg_req                              <= tx_cfg_req_int;
2118
    cfg_pcie_link_state                     <= cfg_pcie_link_state_int;
2119
    cfg_pmcsr_powerstate                    <= cfg_pmcsr_powerstate_int;
2120
    pl_ltssm_state                          <= pl_ltssm_state_int;
2121
 
2122
    -- Assign intermediate signals
2123
    cfg_received_func_lvl_rst <= not cfg_received_func_lvl_rst_n;
2124
    cfg_err_cpl_rdy           <= not cfg_err_cpl_rdy_n;
2125
    cfg_interrupt_rdy         <= not cfg_interrupt_rdy_n;
2126
    cfg_mgmt_rd_wr_done       <= not cfg_mgmt_rd_wr_done_n;
2127
    pl_phy_lnk_up             <= not pl_phy_lnk_up_n;
2128
    cfg_err_aer_headerlog_set <= not cfg_err_aer_headerlog_set_n;
2129
    cfg_to_turnoff            <= cfg_msg_received_pme_to_int;
2130
 
2131
    cfg_status                <=  X"0000";
2132
 
2133
    cfg_command               <=  ("00000" &
2134
                                  cfg_command_interrupt_disable_int &
2135
                                  '0' &
2136
                                  cfg_command_serr_en_int &
2137
                                  "00000" &
2138
                                  cfg_command_bus_master_enable_int &
2139
                                  cfg_command_mem_enable_int &
2140
                                  cfg_command_io_enable_int);
2141
 
2142
    cfg_dstatus                   <= "0000000000" &
2143
                                  cfg_trn_pending &
2144
                                  '0' &
2145
                                  cfg_dev_status_ur_detected_int &
2146
                                  cfg_dev_status_fatal_err_detected_int &
2147
                                  cfg_dev_status_non_fatal_err_detected_int &
2148
                                  cfg_dev_status_corr_err_detected_int;
2149
 
2150
    cfg_dcommand                  <= '0' &
2151
                                     cfg_dev_control_max_read_req_int &
2152
                                     cfg_dev_control_no_snoop_en_int &
2153
                                     cfg_dev_control_aux_power_en_int &
2154
                                     cfg_dev_control_phantom_en_int &
2155
                                     cfg_dev_control_ext_tag_en_int &
2156
                                     cfg_dev_control_max_payload_int &
2157
                                     cfg_dev_control_enable_ro_int &
2158
                                     cfg_dev_control_ur_err_reporting_en_int &
2159
                                     cfg_dev_control_fatal_err_reporting_en_int &
2160
                                     cfg_dev_control_non_fatal_reporting_en_int &
2161
                                     cfg_dev_control_corr_err_reporting_en_int;
2162
 
2163
    cfg_lstatus                   <= cfg_link_status_auto_bandwidth_status_int &
2164
                                     cfg_link_status_bandwidth_status_int &
2165
                                     cfg_link_status_dll_active_int &
2166
                                     lstatus_slot_clk_config &
2167
                                     cfg_link_status_link_training_int &
2168
                                     '0' &
2169
                                     "00" &
2170
                                     cfg_link_status_negotiated_width_int &
2171
                                     "00" &
2172
                                     cfg_link_status_current_speed_int;
2173
 
2174
    cfg_lcommand                   <= "0000" &
2175
                                     cfg_link_control_auto_bandwidth_int_en_int &
2176
                                     cfg_link_control_bandwidth_int_en_int &
2177
                                     cfg_link_control_hw_auto_width_dis_int &
2178
                                     cfg_link_control_clock_pm_en_int &
2179
                                     cfg_link_control_extended_sync_int &
2180
                                     cfg_link_control_common_clock_int &
2181
                                     cfg_link_control_retrain_link_int &
2182
                                     cfg_link_control_link_disable_int &
2183
                                     cfg_link_control_rcb_int &
2184
                                     '0' &
2185
                                     cfg_link_control_aspm_control_int;
2186
 
2187
    cfg_bus_number                <= cfg_bus_number_d;
2188
 
2189
    cfg_device_number             <= cfg_device_number_d;
2190
 
2191
    cfg_function_number           <=  cfg_function_number_d;
2192
 
2193
    cfg_dcommand2                 <= "0000" &
2194
                                     cfg_dev_control2_tlp_prefix_block_int &
2195
                                     cfg_dev_control2_ltr_en_int &
2196
                                     cfg_dev_control2_ido_cpl_en_int  &
2197
                                     cfg_dev_control2_ido_req_en_int &
2198
                                     cfg_dev_control2_atomic_egress_block_int &
2199
                                     cfg_dev_control2_atomic_requester_en_int &
2200
                                     cfg_dev_control2_ari_forward_en_int &
2201
                                     cfg_dev_control2_cpl_timeout_dis_int &
2202
                                     cfg_dev_control2_cpl_timeout_val_int;
2203
 
2204
  -- Capture Bus/Device/Function number
2205
    process (user_clk_out_int)
2206
    begin
2207
      if (user_clk_out_int'event and user_clk_out_int = '1') then
2208
 
2209
        if (user_lnk_up = '0') then
2210
 
2211
          cfg_bus_number_d <= X"00" after (TCQ)*1 ps;
2212
        elsif (cfg_msg_received_int = '0') then
2213
          cfg_bus_number_d <= cfg_msg_data_int(15 downto 8) after (TCQ)*1 ps;
2214
        else
2215
          cfg_bus_number_d <=  cfg_bus_number_d after (TCQ)*1 ps;
2216
        end if;
2217
      end if;
2218
    end process;
2219
 
2220
  -- Capture Bus/Device/Function number
2221
    process (user_clk_out_int)
2222
    begin
2223
      if (user_clk_out_int'event and user_clk_out_int = '1') then
2224
        if (user_lnk_up = '0') then
2225
          cfg_device_number_d <= "00000" after (TCQ)*1 ps;
2226
        elsif (cfg_msg_received_int = '0') then
2227
          cfg_device_number_d <= cfg_msg_data_int(7 downto 3) after (TCQ)*1 ps;
2228
        else
2229
          cfg_device_number_d <=  cfg_device_number_d after (TCQ)*1 ps;
2230
        end if;
2231
      end if;
2232
    end process;
2233
 
2234
  -- Capture Bus/Device/Function number
2235
    process (user_clk_out_int)
2236
    begin
2237
      if (user_clk_out_int'event and user_clk_out_int = '1') then
2238
        if (user_lnk_up = '0') then
2239
          cfg_function_number_d <= "000" after (TCQ)*1 ps;
2240
        elsif (cfg_msg_received_int = '0') then
2241
          cfg_function_number_d <= cfg_msg_data_int(2 downto 0) after (TCQ)*1 ps;
2242
        else
2243
          cfg_function_number_d <=  cfg_function_number_d after (TCQ)*1 ps;
2244
        end if;
2245
      end if;
2246
    end process;
2247
 
2248
  axi_basic_top_i : cl_a7pcie_x4_axi_basic_top
2249
    generic map (
2250
      C_DATA_WIDTH     => C_DATA_WIDTH,       -- RX/TX interface data width
2251
      C_FAMILY         => "X7",               -- Targeted FPGA family
2252
      C_ROOT_PORT      => FALSE,            -- PCIe block is in root port mode
2253
      C_PM_PRIORITY    => FALSE,            -- Disable TX packet boundary thrtl
2254
      TCQ              => TCQ,             -- Clock to Q time
2255
      C_REM_WIDTH      => C_REM_WIDTH
2256
 
2257
    )
2258
    port map (
2259
 
2260
      -------------------------------------------------
2261
      -- User Design I/O                             --
2262
      -------------------------------------------------
2263
 
2264
      -- AXI TX
2265
      -------------
2266
      s_axis_tx_tdata          => s_axis_tx_tdata,          --  input
2267
      s_axis_tx_tvalid         => s_axis_tx_tvalid,         --  input
2268
      s_axis_tx_tready         => s_axis_tx_tready,         --  output
2269
      s_axis_tx_tkeep          => s_axis_tx_tkeep,          --  input
2270
      s_axis_tx_tlast          => s_axis_tx_tlast,          --  input
2271
      s_axis_tx_tuser          => s_axis_tx_tuser,          --  input
2272
 
2273
      -- AXI RX
2274
      -------------
2275
      m_axis_rx_tdata          => m_axis_rx_tdata,          --  output
2276
      m_axis_rx_tvalid         => m_axis_rx_tvalid,         --  output
2277
      m_axis_rx_tready         => m_axis_rx_tready,         --  input
2278
      m_axis_rx_tkeep          => m_axis_rx_tkeep,          --  output
2279
      m_axis_rx_tlast          => m_axis_rx_tlast,          --  output
2280
      m_axis_rx_tuser          => m_axis_rx_tuser,          --  output
2281
 
2282
      -- User Misc.
2283
      ------------
2284
      user_turnoff_ok          => cfg_turnoff_ok,           --  input
2285
      user_tcfg_gnt            => tx_cfg_gnt,               --  input
2286
 
2287
      ------------------------------------------------
2288
      -- PCIe Block I/O                              --
2289
      ------------------------------------------------
2290
 
2291
      -- TRN TX
2292
      ------------
2293
      trn_td                   => trn_td,                   --  output
2294
      trn_tsof                 => trn_tsof,                 --  output
2295
      trn_teof                 => trn_teof,                 --  output
2296
      trn_tsrc_rdy             => trn_tsrc_rdy,             --  output
2297
      trn_tdst_rdy             => trn_tdst_rdy,             --  input
2298
      trn_tsrc_dsc             => trn_tsrc_dsc,             --  output
2299
      trn_trem                 => trn_trem,                 --  output
2300
      trn_terrfwd              => trn_terrfwd,              --  output
2301
      trn_tstr                 => trn_tstr,                 --  output
2302
      trn_tbuf_av              => tx_buf_av_int,                --  input
2303
      trn_tecrc_gen            => trn_tecrc_gen,            --  output
2304
 
2305
      -- TRN RX
2306
      ------------
2307
      trn_rd                   => trn_rd,                   --  input
2308
      trn_rsof                 => trn_rsof,                 --  input
2309
      trn_reof                 => trn_reof,                 --  input
2310
      trn_rsrc_rdy             => trn_rsrc_rdy,             --  input
2311
      trn_rdst_rdy             => trn_rdst_rdy,             --  output
2312
      trn_rsrc_dsc             => trn_rsrc_dsc,             --  input
2313
      trn_rrem                 => trn_rrem,                 --  input
2314
      trn_rerrfwd              => trn_rerrfwd,              --  input
2315
      trn_rbar_hit             => trn_rbar_hit(6 downto 0), --  input
2316
      trn_recrc_err            => trn_recrc_err,            --  input
2317
 
2318
      -- TRN Misc.
2319
      ------------
2320
      trn_tcfg_req             =>  tx_cfg_req_int ,         --  input
2321
      trn_tcfg_gnt             =>  trn_tcfg_gnt,            --  output
2322
      trn_lnk_up               =>  user_lnk_up,             --  input
2323
 
2324
      -- Fuji3/Virtex6 PM
2325
      ------------
2326
      cfg_pcie_link_state      => cfg_pcie_link_state_int,      --  input
2327
 
2328
      -- Virtex6 PM
2329
      ------------
2330
      cfg_pm_send_pme_to       => '0',                          --  input  NOT USED FOR EP
2331
      cfg_pmcsr_powerstate     => cfg_pmcsr_powerstate_int,     --  input
2332
      trn_rdllp_data           => x"00000000",                  --  input
2333
      trn_rdllp_src_rdy        => '0',                          --  input
2334
 
2335
      -- Power Mgmt for S6/V6
2336
      ------------
2337
      cfg_to_turnoff           => cfg_msg_received_pme_to_int,  --  input
2338
      cfg_turnoff_ok           => cfg_turnoff_ok_int,           --  output
2339
 
2340
      -- System
2341
      ------------
2342
      user_clk                 => user_clk_out_int,             --  input
2343
      user_rst                 => user_reset,                   --  input
2344
      np_counter               => open                          --  output
2345
 
2346
    );
2347
 
2348
 
2349
 ---------------------------------------------------------
2350
 -- PCI Express Pipe Wrapper
2351
 ---------------------------------------------------------
2352
  pcie_7x_i : cl_a7pcie_x4_pcie_7x
2353
    generic map (
2354
      AER_BASE_PTR    => AER_BASE_PTR ,
2355
      AER_CAP_ECRC_CHECK_CAPABLE      => AER_CAP_ECRC_CHECK_CAPABLE ,
2356
      AER_CAP_ECRC_GEN_CAPABLE=> AER_CAP_ECRC_GEN_CAPABLE ,
2357
      AER_CAP_ID      => AER_CAP_ID ,
2358
      AER_CAP_MULTIHEADER => AER_CAP_MULTIHEADER ,
2359
      AER_CAP_NEXTPTR => AER_CAP_NEXTPTR ,
2360
      AER_CAP_ON      => AER_CAP_ON ,
2361
      AER_CAP_OPTIONAL_ERR_SUPPORT    => AER_CAP_OPTIONAL_ERR_SUPPORT ,
2362
      AER_CAP_PERMIT_ROOTERR_UPDATE   => AER_CAP_PERMIT_ROOTERR_UPDATE ,
2363
      AER_CAP_VERSION => AER_CAP_VERSION ,
2364
      ALLOW_X8_GEN2 =>ALLOW_X8_GEN2,
2365
      BAR0    => BAR0 ,
2366
      BAR1    => BAR1 ,
2367
      BAR2    => BAR2 ,
2368
      BAR3    => BAR3 ,
2369
      BAR4    => BAR4 ,
2370
      BAR5    => BAR5 ,
2371
      C_DATA_WIDTH => C_DATA_WIDTH ,
2372
      C_REM_WIDTH  => C_REM_WIDTH ,
2373
      CAPABILITIES_PTR=> CAPABILITIES_PTR ,
2374
      CFG_ECRC_ERR_CPLSTAT    => CFG_ECRC_ERR_CPLSTAT ,
2375
      CARDBUS_CIS_POINTER     => CARDBUS_CIS_POINTER ,
2376
      CLASS_CODE      => CLASS_CODE ,
2377
      CMD_INTX_IMPLEMENTED    => CMD_INTX_IMPLEMENTED ,
2378
      CPL_TIMEOUT_DISABLE_SUPPORTED   => CPL_TIMEOUT_DISABLE_SUPPORTED ,
2379
      CPL_TIMEOUT_RANGES_SUPPORTED    => CPL_TIMEOUT_RANGES_SUPPORTED ,
2380
      CRM_MODULE_RSTS =>CRM_MODULE_RSTS,
2381
      DEV_CAP_ENABLE_SLOT_PWR_LIMIT_SCALE     => DEV_CAP_ENABLE_SLOT_PWR_LIMIT_SCALE ,
2382
      DEV_CAP_ENABLE_SLOT_PWR_LIMIT_VALUE     => DEV_CAP_ENABLE_SLOT_PWR_LIMIT_VALUE ,
2383
      DEV_CAP_ENDPOINT_L0S_LATENCY    => DEV_CAP_ENDPOINT_L0S_LATENCY ,
2384
      DEV_CAP_ENDPOINT_L1_LATENCY     => DEV_CAP_ENDPOINT_L1_LATENCY ,
2385
      DEV_CAP_EXT_TAG_SUPPORTED => DEV_CAP_EXT_TAG_SUPPORTED ,
2386
      DEV_CAP_FUNCTION_LEVEL_RESET_CAPABLE    => DEV_CAP_FUNCTION_LEVEL_RESET_CAPABLE ,
2387
      DEV_CAP_MAX_PAYLOAD_SUPPORTED   => DEV_CAP_MAX_PAYLOAD_SUPPORTED ,
2388
      DEV_CAP_PHANTOM_FUNCTIONS_SUPPORT => DEV_CAP_PHANTOM_FUNCTIONS_SUPPORT ,
2389
      DEV_CAP_ROLE_BASED_ERROR=> DEV_CAP_ROLE_BASED_ERROR ,
2390
      DEV_CAP_RSVD_14_12      => DEV_CAP_RSVD_14_12 ,
2391
      DEV_CAP_RSVD_17_16      => DEV_CAP_RSVD_17_16 ,
2392
      DEV_CAP_RSVD_31_29      => DEV_CAP_RSVD_31_29 ,
2393
      DEV_CONTROL_AUX_POWER_SUPPORTED => DEV_CONTROL_AUX_POWER_SUPPORTED ,
2394
      DEV_CONTROL_EXT_TAG_DEFAULT => DEV_CONTROL_EXT_TAG_DEFAULT ,
2395
      DISABLE_ASPM_L1_TIMER   => DISABLE_ASPM_L1_TIMER ,
2396
      DISABLE_BAR_FILTERING   => DISABLE_BAR_FILTERING ,
2397
      DISABLE_ID_CHECK=> DISABLE_ID_CHECK ,
2398
      DISABLE_LANE_REVERSAL   => DISABLE_LANE_REVERSAL ,
2399
      DISABLE_RX_POISONED_RESP =>DISABLE_RX_POISONED_RESP,
2400
      DISABLE_RX_TC_FILTER    => DISABLE_RX_TC_FILTER ,
2401
      DISABLE_SCRAMBLING      => DISABLE_SCRAMBLING ,
2402
      DNSTREAM_LINK_NUM => DNSTREAM_LINK_NUM ,
2403
      DSN_BASE_PTR    => DSN_BASE_PTR ,
2404
      DSN_CAP_ID      => DSN_CAP_ID ,
2405
      DSN_CAP_NEXTPTR => DSN_CAP_NEXTPTR ,
2406
      DSN_CAP_ON      => DSN_CAP_ON ,
2407
      DSN_CAP_VERSION => DSN_CAP_VERSION ,
2408
      DEV_CAP2_ARI_FORWARDING_SUPPORTED=>DEV_CAP2_ARI_FORWARDING_SUPPORTED,
2409
      DEV_CAP2_ATOMICOP32_COMPLETER_SUPPORTED =>DEV_CAP2_ATOMICOP32_COMPLETER_SUPPORTED,
2410
      DEV_CAP2_ATOMICOP64_COMPLETER_SUPPORTED =>DEV_CAP2_ATOMICOP64_COMPLETER_SUPPORTED,
2411
      DEV_CAP2_ATOMICOP_ROUTING_SUPPORTED =>DEV_CAP2_ATOMICOP_ROUTING_SUPPORTED,
2412
      DEV_CAP2_CAS128_COMPLETER_SUPPORTED =>DEV_CAP2_CAS128_COMPLETER_SUPPORTED,
2413
      DEV_CAP2_ENDEND_TLP_PREFIX_SUPPORTED =>DEV_CAP2_ENDEND_TLP_PREFIX_SUPPORTED,
2414
      DEV_CAP2_EXTENDED_FMT_FIELD_SUPPORTED =>DEV_CAP2_EXTENDED_FMT_FIELD_SUPPORTED,
2415
      DEV_CAP2_LTR_MECHANISM_SUPPORTED =>DEV_CAP2_LTR_MECHANISM_SUPPORTED,
2416
      DEV_CAP2_MAX_ENDEND_TLP_PREFIXES =>DEV_CAP2_MAX_ENDEND_TLP_PREFIXES,
2417
      DEV_CAP2_NO_RO_ENABLED_PRPR_PASSING =>DEV_CAP2_NO_RO_ENABLED_PRPR_PASSING,
2418
      DEV_CAP2_TPH_COMPLETER_SUPPORTED =>DEV_CAP2_TPH_COMPLETER_SUPPORTED,
2419
      DISABLE_ERR_MSG =>DISABLE_ERR_MSG,
2420
      DISABLE_LOCKED_FILTER =>DISABLE_LOCKED_FILTER,
2421
      DISABLE_PPM_FILTER =>DISABLE_PPM_FILTER,
2422
      ENDEND_TLP_PREFIX_FORWARDING_SUPPORTED =>ENDEND_TLP_PREFIX_FORWARDING_SUPPORTED,
2423
      ENABLE_MSG_ROUTE=> ENABLE_MSG_ROUTE ,
2424
      ENABLE_RX_TD_ECRC_TRIM  => ENABLE_RX_TD_ECRC_TRIM ,
2425
      ENTER_RVRY_EI_L0=> ENTER_RVRY_EI_L0 ,
2426
      EXIT_LOOPBACK_ON_EI =>EXIT_LOOPBACK_ON_EI,
2427
      EXPANSION_ROM   => EXPANSION_ROM ,
2428
      EXT_CFG_CAP_PTR => EXT_CFG_CAP_PTR ,
2429
      EXT_CFG_XP_CAP_PTR      => EXT_CFG_XP_CAP_PTR ,
2430
      HEADER_TYPE     => HEADER_TYPE ,
2431
      INFER_EI=> INFER_EI ,
2432
      INTERRUPT_PIN   => INTERRUPT_PIN ,
2433
      INTERRUPT_STAT_AUTO =>INTERRUPT_STAT_AUTO,
2434
      IS_SWITCH => IS_SWITCH ,
2435
      LAST_CONFIG_DWORD => LAST_CONFIG_DWORD ,
2436
      LINK_CAP_ASPM_OPTIONALITY => LINK_CAP_ASPM_OPTIONALITY ,
2437
      LINK_CAP_ASPM_SUPPORT   => LINK_CAP_ASPM_SUPPORT ,
2438
      LINK_CAP_CLOCK_POWER_MANAGEMENT => LINK_CAP_CLOCK_POWER_MANAGEMENT ,
2439
      LINK_CAP_DLL_LINK_ACTIVE_REPORTING_CAP  => LINK_CAP_DLL_LINK_ACTIVE_REPORTING_CAP ,
2440
      LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN1   => LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN1 ,
2441
      LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN2   => LINK_CAP_L0S_EXIT_LATENCY_COMCLK_GEN2 ,
2442
      LINK_CAP_L0S_EXIT_LATENCY_GEN1  => LINK_CAP_L0S_EXIT_LATENCY_GEN1 ,
2443
      LINK_CAP_L0S_EXIT_LATENCY_GEN2  => LINK_CAP_L0S_EXIT_LATENCY_GEN2 ,
2444
      LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN1    => LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN1 ,
2445
      LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN2    => LINK_CAP_L1_EXIT_LATENCY_COMCLK_GEN2 ,
2446
      LINK_CAP_L1_EXIT_LATENCY_GEN1   => LINK_CAP_L1_EXIT_LATENCY_GEN1 ,
2447
      LINK_CAP_L1_EXIT_LATENCY_GEN2   => LINK_CAP_L1_EXIT_LATENCY_GEN2 ,
2448
      LINK_CAP_LINK_BANDWIDTH_NOTIFICATION_CAP =>LINK_CAP_LINK_BANDWIDTH_NOTIFICATION_CAP,
2449
      LINK_CAP_MAX_LINK_SPEED => LINK_CAP_MAX_LINK_SPEED ,
2450
      LINK_CAP_MAX_LINK_SPEED_int => LINK_CAP_MAX_LINK_SPEED_int ,
2451
      LINK_CAP_MAX_LINK_WIDTH => LINK_CAP_MAX_LINK_WIDTH ,
2452
      LINK_CAP_MAX_LINK_WIDTH_int => LINK_CAP_MAX_LINK_WIDTH_int ,
2453
      LINK_CAP_RSVD_23=> LINK_CAP_RSVD_23 ,
2454
      LINK_CAP_SURPRISE_DOWN_ERROR_CAPABLE    => LINK_CAP_SURPRISE_DOWN_ERROR_CAPABLE ,
2455
      LINK_CONTROL_RCB=> LINK_CONTROL_RCB ,
2456
      LINK_CTRL2_DEEMPHASIS   => LINK_CTRL2_DEEMPHASIS ,
2457
      LINK_CTRL2_HW_AUTONOMOUS_SPEED_DISABLE  => LINK_CTRL2_HW_AUTONOMOUS_SPEED_DISABLE ,
2458
      LINK_CTRL2_TARGET_LINK_SPEED    => LINK_CTRL2_TARGET_LINK_SPEED ,
2459
      LINK_STATUS_SLOT_CLOCK_CONFIG   => LINK_STATUS_SLOT_CLOCK_CONFIG ,
2460
      LL_ACK_TIMEOUT  => LL_ACK_TIMEOUT ,
2461
      LL_ACK_TIMEOUT_EN => LL_ACK_TIMEOUT_EN ,
2462
      LL_ACK_TIMEOUT_FUNC     => LL_ACK_TIMEOUT_FUNC ,
2463
      LL_REPLAY_TIMEOUT => LL_REPLAY_TIMEOUT ,
2464
      LL_REPLAY_TIMEOUT_EN    => LL_REPLAY_TIMEOUT_EN ,
2465
      LL_REPLAY_TIMEOUT_FUNC  => LL_REPLAY_TIMEOUT_FUNC ,
2466
      LTSSM_MAX_LINK_WIDTH    => LTSSM_MAX_LINK_WIDTH ,
2467
      MPS_FORCE =>MPS_FORCE,
2468
      MSI_BASE_PTR    => MSI_BASE_PTR ,
2469
      MSI_CAP_ID      => MSI_CAP_ID ,
2470
      MSI_CAP_MULTIMSGCAP     => MSI_CAP_MULTIMSGCAP ,
2471
      MSI_CAP_MULTIMSG_EXTENSION      => MSI_CAP_MULTIMSG_EXTENSION ,
2472
      MSI_CAP_NEXTPTR => MSI_CAP_NEXTPTR ,
2473
      MSI_CAP_ON      => MSI_CAP_ON ,
2474
      MSI_CAP_PER_VECTOR_MASKING_CAPABLE      => MSI_CAP_PER_VECTOR_MASKING_CAPABLE ,
2475
      MSI_CAP_64_BIT_ADDR_CAPABLE     => MSI_CAP_64_BIT_ADDR_CAPABLE ,
2476
      MSIX_BASE_PTR   => MSIX_BASE_PTR ,
2477
      MSIX_CAP_ID     => MSIX_CAP_ID ,
2478
      MSIX_CAP_NEXTPTR=> MSIX_CAP_NEXTPTR ,
2479
      MSIX_CAP_ON     => MSIX_CAP_ON ,
2480
      MSIX_CAP_PBA_BIR=> MSIX_CAP_PBA_BIR ,
2481
      MSIX_CAP_PBA_OFFSET     => MSIX_CAP_PBA_OFFSET ,
2482
      MSIX_CAP_TABLE_BIR      => MSIX_CAP_TABLE_BIR ,
2483
      MSIX_CAP_TABLE_OFFSET   => MSIX_CAP_TABLE_OFFSET ,
2484
      MSIX_CAP_TABLE_SIZE     => MSIX_CAP_TABLE_SIZE ,
2485
      N_FTS_COMCLK_GEN1 => N_FTS_COMCLK_GEN1 ,
2486
      N_FTS_COMCLK_GEN2 => N_FTS_COMCLK_GEN2 ,
2487
      N_FTS_GEN1      => N_FTS_GEN1 ,
2488
      N_FTS_GEN2      => N_FTS_GEN2 ,
2489
      PCIE_BASE_PTR   => PCIE_BASE_PTR ,
2490
      PCIE_CAP_CAPABILITY_ID  => PCIE_CAP_CAPABILITY_ID ,
2491
      PCIE_CAP_CAPABILITY_VERSION     => PCIE_CAP_CAPABILITY_VERSION ,
2492
      PCIE_CAP_DEVICE_PORT_TYPE => PCIE_CAP_DEVICE_PORT_TYPE ,
2493
      PCIE_CAP_NEXTPTR=> PCIE_CAP_NEXTPTR ,
2494
      PCIE_CAP_ON     => PCIE_CAP_ON ,
2495
      PCIE_CAP_RSVD_15_14     => PCIE_CAP_RSVD_15_14 ,
2496
      PCIE_CAP_SLOT_IMPLEMENTED => PCIE_CAP_SLOT_IMPLEMENTED ,
2497
      PCIE_REVISION   => PCIE_REVISION ,
2498
      PL_AUTO_CONFIG  => PL_AUTO_CONFIG ,
2499
      PL_FAST_TRAIN   => PL_FAST_TRAIN ,
2500
      PM_ASPML0S_TIMEOUT => PM_ASPML0S_TIMEOUT ,
2501
      PM_ASPML0S_TIMEOUT_EN => PM_ASPML0S_TIMEOUT_EN ,
2502
      PM_ASPML0S_TIMEOUT_FUNC => PM_ASPML0S_TIMEOUT_FUNC ,
2503
      PM_ASPM_FASTEXIT => PM_ASPM_FASTEXIT ,
2504
      PM_BASE_PTR     => PM_BASE_PTR ,
2505
      PM_CAP_AUXCURRENT => PM_CAP_AUXCURRENT ,
2506
      PM_CAP_D1SUPPORT=> PM_CAP_D1SUPPORT ,
2507
      PM_CAP_D2SUPPORT=> PM_CAP_D2SUPPORT ,
2508
      PM_CAP_DSI      => PM_CAP_DSI ,
2509
      PM_CAP_ID => PM_CAP_ID ,
2510
      PM_CAP_NEXTPTR  => PM_CAP_NEXTPTR ,
2511
      PM_CAP_ON => PM_CAP_ON ,
2512
      PM_CAP_PME_CLOCK=> PM_CAP_PME_CLOCK ,
2513
      PM_CAP_PMESUPPORT => PM_CAP_PMESUPPORT ,
2514
      PM_CAP_RSVD_04  => PM_CAP_RSVD_04 ,
2515
      PM_CAP_VERSION  => PM_CAP_VERSION ,
2516
      PM_CSR_B2B3     => PM_CSR_B2B3 ,
2517
      PM_CSR_BPCCEN   => PM_CSR_BPCCEN ,
2518
      PM_CSR_NOSOFTRST=> PM_CSR_NOSOFTRST ,
2519
      PM_DATA0=> PM_DATA0 ,
2520
      PM_DATA1=> PM_DATA1 ,
2521
      PM_DATA2=> PM_DATA2 ,
2522
      PM_DATA3=> PM_DATA3 ,
2523
      PM_DATA4=> PM_DATA4 ,
2524
      PM_DATA5=> PM_DATA5 ,
2525
      PM_DATA6=> PM_DATA6 ,
2526
      PM_DATA7=> PM_DATA7 ,
2527
      PM_DATA_SCALE0  => PM_DATA_SCALE0 ,
2528
      PM_DATA_SCALE1  => PM_DATA_SCALE1 ,
2529
      PM_DATA_SCALE2  => PM_DATA_SCALE2 ,
2530
      PM_DATA_SCALE3  => PM_DATA_SCALE3 ,
2531
      PM_DATA_SCALE4  => PM_DATA_SCALE4 ,
2532
      PM_DATA_SCALE5  => PM_DATA_SCALE5 ,
2533
      PM_DATA_SCALE6  => PM_DATA_SCALE6 ,
2534
      PM_DATA_SCALE7  => PM_DATA_SCALE7 ,
2535
      PM_MF =>PM_MF,
2536
      RBAR_BASE_PTR =>RBAR_BASE_PTR,
2537
      RBAR_CAP_CONTROL_ENCODEDBAR0 =>RBAR_CAP_CONTROL_ENCODEDBAR0,
2538
      RBAR_CAP_CONTROL_ENCODEDBAR1 =>RBAR_CAP_CONTROL_ENCODEDBAR1,
2539
      RBAR_CAP_CONTROL_ENCODEDBAR2 =>RBAR_CAP_CONTROL_ENCODEDBAR2,
2540
      RBAR_CAP_CONTROL_ENCODEDBAR3 =>RBAR_CAP_CONTROL_ENCODEDBAR3,
2541
      RBAR_CAP_CONTROL_ENCODEDBAR4 =>RBAR_CAP_CONTROL_ENCODEDBAR4,
2542
      RBAR_CAP_CONTROL_ENCODEDBAR5 =>RBAR_CAP_CONTROL_ENCODEDBAR5,
2543
      RBAR_CAP_ID =>RBAR_CAP_ID,
2544
      RBAR_CAP_INDEX0 =>RBAR_CAP_INDEX0,
2545
      RBAR_CAP_INDEX1 =>RBAR_CAP_INDEX1,
2546
      RBAR_CAP_INDEX2 =>RBAR_CAP_INDEX2,
2547
      RBAR_CAP_INDEX3 =>RBAR_CAP_INDEX3,
2548
      RBAR_CAP_INDEX4 =>RBAR_CAP_INDEX4,
2549
      RBAR_CAP_INDEX5 =>RBAR_CAP_INDEX5,
2550
      RBAR_CAP_NEXTPTR =>RBAR_CAP_NEXTPTR,
2551
      RBAR_CAP_ON =>RBAR_CAP_ON,
2552
      RBAR_CAP_SUP0 =>RBAR_CAP_SUP0,
2553
      RBAR_CAP_SUP1 =>RBAR_CAP_SUP1,
2554
      RBAR_CAP_SUP2 =>RBAR_CAP_SUP2,
2555
      RBAR_CAP_SUP3 =>RBAR_CAP_SUP3,
2556
      RBAR_CAP_SUP4 =>RBAR_CAP_SUP4,
2557
      RBAR_CAP_SUP5 =>RBAR_CAP_SUP5,
2558
      RBAR_CAP_VERSION =>RBAR_CAP_VERSION,
2559
      RBAR_NUM =>RBAR_NUM,
2560
      RECRC_CHK  =>RECRC_CHK,
2561
      RECRC_CHK_TRIM =>RECRC_CHK_TRIM,
2562
      ROOT_CAP_CRS_SW_VISIBILITY      => ROOT_CAP_CRS_SW_VISIBILITY ,
2563
      RP_AUTO_SPD       => RP_AUTO_SPD ,
2564
      RP_AUTO_SPD_LOOPCNT        => RP_AUTO_SPD_LOOPCNT ,
2565
      SELECT_DLL_IF   => SELECT_DLL_IF ,
2566
      SLOT_CAP_ATT_BUTTON_PRESENT     => SLOT_CAP_ATT_BUTTON_PRESENT ,
2567
      SLOT_CAP_ATT_INDICATOR_PRESENT  => SLOT_CAP_ATT_INDICATOR_PRESENT ,
2568
      SLOT_CAP_ELEC_INTERLOCK_PRESENT => SLOT_CAP_ELEC_INTERLOCK_PRESENT ,
2569
      SLOT_CAP_HOTPLUG_CAPABLE=> SLOT_CAP_HOTPLUG_CAPABLE ,
2570
      SLOT_CAP_HOTPLUG_SURPRISE => SLOT_CAP_HOTPLUG_SURPRISE ,
2571
      SLOT_CAP_MRL_SENSOR_PRESENT     => SLOT_CAP_MRL_SENSOR_PRESENT ,
2572
      SLOT_CAP_NO_CMD_COMPLETED_SUPPORT => SLOT_CAP_NO_CMD_COMPLETED_SUPPORT ,
2573
      SLOT_CAP_PHYSICAL_SLOT_NUM      => SLOT_CAP_PHYSICAL_SLOT_NUM ,
2574
      SLOT_CAP_POWER_CONTROLLER_PRESENT => SLOT_CAP_POWER_CONTROLLER_PRESENT ,
2575
      SLOT_CAP_POWER_INDICATOR_PRESENT=> SLOT_CAP_POWER_INDICATOR_PRESENT ,
2576
      SLOT_CAP_SLOT_POWER_LIMIT_SCALE => SLOT_CAP_SLOT_POWER_LIMIT_SCALE ,
2577
      SLOT_CAP_SLOT_POWER_LIMIT_VALUE => SLOT_CAP_SLOT_POWER_LIMIT_VALUE ,
2578
      SPARE_BIT0      => SPARE_BIT0 ,
2579
      SPARE_BIT1      => SPARE_BIT1 ,
2580
      SPARE_BIT2      => SPARE_BIT2 ,
2581
      SPARE_BIT3      => SPARE_BIT3 ,
2582
      SPARE_BIT4      => SPARE_BIT4 ,
2583
      SPARE_BIT5      => SPARE_BIT5 ,
2584
      SPARE_BIT6      => SPARE_BIT6 ,
2585
      SPARE_BIT7      => SPARE_BIT7 ,
2586
      SPARE_BIT8      => SPARE_BIT8 ,
2587
      SPARE_BYTE0     => SPARE_BYTE0 ,
2588
      SPARE_BYTE1     => SPARE_BYTE1 ,
2589
      SPARE_BYTE2     => SPARE_BYTE2 ,
2590
      SPARE_BYTE3     => SPARE_BYTE3 ,
2591
      SPARE_WORD0     => SPARE_WORD0 ,
2592
      SPARE_WORD1     => SPARE_WORD1 ,
2593
      SPARE_WORD2     => SPARE_WORD2 ,
2594
      SPARE_WORD3     => SPARE_WORD3 ,
2595
      SSL_MESSAGE_AUTO =>SSL_MESSAGE_AUTO,
2596
      TECRC_EP_INV      => TECRC_EP_INV ,
2597
      TL_RBYPASS=>TL_RBYPASS,
2598
      TL_RX_RAM_RADDR_LATENCY => TL_RX_RAM_RADDR_LATENCY ,
2599
      TL_RX_RAM_RDATA_LATENCY => TL_RX_RAM_RDATA_LATENCY ,
2600
      TL_RX_RAM_WRITE_LATENCY => TL_RX_RAM_WRITE_LATENCY ,
2601
      TL_TFC_DISABLE  => TL_TFC_DISABLE ,
2602
      TL_TX_CHECKS_DISABLE    => TL_TX_CHECKS_DISABLE ,
2603
      TL_TX_RAM_RADDR_LATENCY => TL_TX_RAM_RADDR_LATENCY ,
2604
      TL_TX_RAM_RDATA_LATENCY => TL_TX_RAM_RDATA_LATENCY ,
2605
      TL_TX_RAM_WRITE_LATENCY => TL_TX_RAM_WRITE_LATENCY ,
2606
      TRN_DW =>TRN_DW,
2607
      TRN_NP_FC =>TRN_NP_FC,
2608
      UPCONFIG_CAPABLE=> UPCONFIG_CAPABLE ,
2609
      UPSTREAM_FACING => UPSTREAM_FACING ,
2610
      UR_ATOMIC =>UR_ATOMIC,
2611
      UR_CFG1 =>UR_CFG1,
2612
      UR_INV_REQ=>UR_INV_REQ,
2613
      UR_PRS_RESPONSE =>UR_PRS_RESPONSE,
2614
      USER_CLK2_DIV2 =>USER_CLK2_DIV2,
2615
      USER_CLK_FREQ   => USER_CLK_FREQ ,
2616
      USE_RID_PINS =>USE_RID_PINS,
2617
      VC0_CPL_INFINITE=> VC0_CPL_INFINITE ,
2618
      VC0_RX_RAM_LIMIT=> VC0_RX_RAM_LIMIT ,
2619
      VC0_TOTAL_CREDITS_CD    => VC0_TOTAL_CREDITS_CD ,
2620
      VC0_TOTAL_CREDITS_CH    => VC0_TOTAL_CREDITS_CH ,
2621
      VC0_TOTAL_CREDITS_NPD =>VC0_TOTAL_CREDITS_NPD,
2622
      VC0_TOTAL_CREDITS_NPH   => VC0_TOTAL_CREDITS_NPH ,
2623
      VC0_TOTAL_CREDITS_PD    => VC0_TOTAL_CREDITS_PD ,
2624
      VC0_TOTAL_CREDITS_PH    => VC0_TOTAL_CREDITS_PH ,
2625
      VC0_TX_LASTPACKET => VC0_TX_LASTPACKET ,
2626
      VC_BASE_PTR     => VC_BASE_PTR ,
2627
      VC_CAP_ID => VC_CAP_ID ,
2628
      VC_CAP_NEXTPTR  => VC_CAP_NEXTPTR ,
2629
      VC_CAP_ON => VC_CAP_ON ,
2630
      VC_CAP_REJECT_SNOOP_TRANSACTIONS=> VC_CAP_REJECT_SNOOP_TRANSACTIONS ,
2631
      VC_CAP_VERSION  => VC_CAP_VERSION ,
2632
      VSEC_BASE_PTR   => VSEC_BASE_PTR ,
2633
      VSEC_CAP_HDR_ID => VSEC_CAP_HDR_ID ,
2634
      VSEC_CAP_HDR_LENGTH     => VSEC_CAP_HDR_LENGTH ,
2635
      VSEC_CAP_HDR_REVISION   => VSEC_CAP_HDR_REVISION ,
2636
      VSEC_CAP_ID     => VSEC_CAP_ID ,
2637
      VSEC_CAP_IS_LINK_VISIBLE=> VSEC_CAP_IS_LINK_VISIBLE ,
2638
      VSEC_CAP_NEXTPTR=> VSEC_CAP_NEXTPTR ,
2639
      VSEC_CAP_ON     => VSEC_CAP_ON ,
2640
      VSEC_CAP_VERSION=> VSEC_CAP_VERSION
2641
    )
2642
    port map (
2643
      trn_lnk_up                                => trn_lnk_up ,
2644
      trn_clk                                   => user_clk_out_int ,
2645
      lnk_clk_en                                => lnk_clk_en,
2646
      user_rst_n                                => user_rst_n ,
2647
      received_func_lvl_rst_n                   => cfg_received_func_lvl_rst_n ,
2648
      sys_rst_n                                 => phy_rdy,
2649
      pl_rst_n                                  => '1' ,
2650
      dl_rst_n                                  => '1' ,
2651
      tl_rst_n                                  => '1' ,
2652
      cm_sticky_rst_n                           => '1' ,
2653
 
2654
      func_lvl_rst_n                            => func_lvl_rst_n ,
2655
      cm_rst_n                                  => cm_rst_n ,
2656
      trn_rbar_hit                              => trn_rbar_hit ,
2657
      trn_rd                                    => trn_rd ,
2658
      trn_recrc_err                             => trn_recrc_err ,
2659
      trn_reof                                  => trn_reof ,
2660
      trn_rerrfwd                               => trn_rerrfwd ,
2661
      trn_rrem                                  => trn_rrem ,
2662
      trn_rsof                                  => trn_rsof ,
2663
      trn_rsrc_dsc                              => trn_rsrc_dsc ,
2664
      trn_rsrc_rdy                              => trn_rsrc_rdy ,
2665
      trn_rdst_rdy                              => trn_rdst_rdy ,
2666
      trn_rnp_ok                                => rx_np_ok ,
2667
      trn_rnp_req                               => rx_np_req ,
2668
      trn_rfcp_ret                              => '1' ,
2669
      trn_tbuf_av                               => tx_buf_av_int ,
2670
      trn_tcfg_req                              => tx_cfg_req_int ,
2671
      trn_tdllp_dst_rdy                         => open ,
2672
      trn_tdst_rdy                              => trn_tdst_rdy ,
2673
      trn_terr_drop                             => tx_err_drop ,
2674
      trn_tcfg_gnt                              => trn_tcfg_gnt ,
2675
      trn_td                                    => trn_td ,
2676
      trn_tdllp_data                            => x"00000000" ,
2677
      trn_tdllp_src_rdy                         => '0' ,
2678
      trn_tecrc_gen                             => trn_tecrc_gen ,
2679
      trn_teof                                  => trn_teof ,
2680
      trn_terrfwd                               => trn_terrfwd ,
2681
      trn_trem                                  => trn_trem,
2682
      trn_tsof                                  => trn_tsof ,
2683
      trn_tsrc_dsc                              => trn_tsrc_dsc ,
2684
      trn_tsrc_rdy                              => trn_tsrc_rdy ,
2685
      trn_tstr                                  => trn_tstr ,
2686
 
2687
      trn_fc_cpld                               => fc_cpld ,
2688
      trn_fc_cplh                               => fc_cplh ,
2689
      trn_fc_npd                                => fc_npd ,
2690
      trn_fc_nph                                => fc_nph ,
2691
      trn_fc_pd                                 => fc_pd ,
2692
      trn_fc_ph                                 => fc_ph ,
2693
      trn_fc_sel                                => fc_sel ,
2694
 
2695
      cfg_dev_id                                => cfg_dev_id,
2696
      cfg_vend_id                               => cfg_vend_id,
2697
      cfg_rev_id                                => cfg_rev_id,
2698
      cfg_subsys_id                             => cfg_subsys_id,
2699
      cfg_subsys_vend_id                        => cfg_subsys_vend_id,
2700
      cfg_pciecap_interrupt_msgnum              => cfg_pciecap_interrupt_msgnum,
2701
 
2702
      cfg_bridge_serr_en                        => cfg_bridge_serr_en,
2703
 
2704
      cfg_command_bus_master_enable             => cfg_command_bus_master_enable_int ,
2705
      cfg_command_interrupt_disable             => cfg_command_interrupt_disable_int ,
2706
      cfg_command_io_enable                     => cfg_command_io_enable_int ,
2707
      cfg_command_mem_enable                    => cfg_command_mem_enable_int ,
2708
      cfg_command_serr_en                       => cfg_command_serr_en_int ,
2709
      cfg_dev_control_aux_power_en              => cfg_dev_control_aux_power_en_int ,
2710
      cfg_dev_control_corr_err_reporting_en     => cfg_dev_control_corr_err_reporting_en_int ,
2711
      cfg_dev_control_enable_ro                 => cfg_dev_control_enable_ro_int ,
2712
      cfg_dev_control_ext_tag_en                => cfg_dev_control_ext_tag_en_int ,
2713
      cfg_dev_control_fatal_err_reporting_en    => cfg_dev_control_fatal_err_reporting_en_int ,
2714
      cfg_dev_control_max_payload               => cfg_dev_control_max_payload_int ,
2715
      cfg_dev_control_max_read_req              => cfg_dev_control_max_read_req_int ,
2716
      cfg_dev_control_non_fatal_reporting_en    => cfg_dev_control_non_fatal_reporting_en_int ,
2717
      cfg_dev_control_no_snoop_en               => cfg_dev_control_no_snoop_en_int ,
2718
      cfg_dev_control_phantom_en                => cfg_dev_control_phantom_en_int ,
2719
      cfg_dev_control_ur_err_reporting_en       => cfg_dev_control_ur_err_reporting_en_int ,
2720
      cfg_dev_control2_cpl_timeout_dis          => cfg_dev_control2_cpl_timeout_dis_int ,
2721
      cfg_dev_control2_cpl_timeout_val          => cfg_dev_control2_cpl_timeout_val_int ,
2722
      cfg_dev_control2_ari_forward_en           => cfg_dev_control2_ari_forward_en_int,
2723
      cfg_dev_control2_atomic_requester_en      => cfg_dev_control2_atomic_requester_en_int,
2724
      cfg_dev_control2_atomic_egress_block      => cfg_dev_control2_atomic_egress_block_int,
2725
      cfg_dev_control2_ido_req_en               => cfg_dev_control2_ido_req_en_int,
2726
      cfg_dev_control2_ido_cpl_en               => cfg_dev_control2_ido_cpl_en_int,
2727
      cfg_dev_control2_ltr_en                   => cfg_dev_control2_ltr_en_int,
2728
      cfg_dev_control2_tlp_prefix_block         => cfg_dev_control2_tlp_prefix_block_int,
2729
      cfg_dev_status_corr_err_detected          => cfg_dev_status_corr_err_detected_int ,
2730
      cfg_dev_status_fatal_err_detected         => cfg_dev_status_fatal_err_detected_int ,
2731
      cfg_dev_status_non_fatal_err_detected     => cfg_dev_status_non_fatal_err_detected_int ,
2732
      cfg_dev_status_ur_detected                => cfg_dev_status_ur_detected_int ,
2733
 
2734
      cfg_mgmt_do                               => cfg_mgmt_do ,
2735
      cfg_err_aer_headerlog_set_n               => cfg_err_aer_headerlog_set_n,
2736
      cfg_err_aer_headerlog                     => cfg_err_aer_headerlog,
2737
      cfg_err_cpl_rdy_n                         => cfg_err_cpl_rdy_n ,
2738
      cfg_interrupt_do                          => cfg_interrupt_do ,
2739
      cfg_interrupt_mmenable                    => cfg_interrupt_mmenable ,
2740
      cfg_interrupt_msienable                   => cfg_interrupt_msienable ,
2741
      cfg_interrupt_msixenable                  => cfg_interrupt_msixenable ,
2742
      cfg_interrupt_msixfm                      => cfg_interrupt_msixfm ,
2743
      cfg_interrupt_rdy_n                       => cfg_interrupt_rdy_n ,
2744
      cfg_link_control_rcb                      => cfg_link_control_rcb_int ,
2745
      cfg_link_control_aspm_control             => cfg_link_control_aspm_control_int ,
2746
      cfg_link_control_auto_bandwidth_int_en    => cfg_link_control_auto_bandwidth_int_en_int ,
2747
      cfg_link_control_bandwidth_int_en         => cfg_link_control_bandwidth_int_en_int ,
2748
      cfg_link_control_clock_pm_en              => cfg_link_control_clock_pm_en_int ,
2749
      cfg_link_control_common_clock             => cfg_link_control_common_clock_int ,
2750
      cfg_link_control_extended_sync            => cfg_link_control_extended_sync_int ,
2751
      cfg_link_control_hw_auto_width_dis        => cfg_link_control_hw_auto_width_dis_int ,
2752
      cfg_link_control_link_disable             => cfg_link_control_link_disable_int ,
2753
      cfg_link_control_retrain_link             => cfg_link_control_retrain_link_int ,
2754
      cfg_link_status_auto_bandwidth_status     => cfg_link_status_auto_bandwidth_status_int ,
2755
      cfg_link_status_bandwidth_status          => cfg_link_status_bandwidth_status_int ,
2756
      cfg_link_status_current_speed             => cfg_link_status_current_speed_int ,
2757
      cfg_link_status_dll_active                => cfg_link_status_dll_active_int ,
2758
      cfg_link_status_link_training             => cfg_link_status_link_training_int ,
2759
      cfg_link_status_negotiated_width          => cfg_link_status_negotiated_width_int,
2760
      cfg_msg_data                              => cfg_msg_data_int ,
2761
      cfg_msg_received                          => cfg_msg_received_int ,
2762
      cfg_msg_received_assert_int_a             => cfg_msg_received_assert_int_a,
2763
      cfg_msg_received_assert_int_b             => cfg_msg_received_assert_int_b,
2764
      cfg_msg_received_assert_int_c             => cfg_msg_received_assert_int_c,
2765
      cfg_msg_received_assert_int_d             => cfg_msg_received_assert_int_d,
2766
      cfg_msg_received_deassert_int_a           => cfg_msg_received_deassert_int_a,
2767
      cfg_msg_received_deassert_int_b           => cfg_msg_received_deassert_int_b,
2768
      cfg_msg_received_deassert_int_c           => cfg_msg_received_deassert_int_c,
2769
      cfg_msg_received_deassert_int_d           => cfg_msg_received_deassert_int_d,
2770
      cfg_msg_received_err_cor                  => cfg_msg_received_err_cor,
2771
      cfg_msg_received_err_fatal                => cfg_msg_received_err_fatal,
2772
      cfg_msg_received_err_non_fatal            => cfg_msg_received_err_non_fatal,
2773
      cfg_msg_received_pm_as_nak                => cfg_msg_received_pm_as_nak,
2774
      cfg_msg_received_pme_to                   => cfg_msg_received_pme_to_int ,
2775
      cfg_msg_received_pme_to_ack               => cfg_msg_received_pme_to_ack,
2776
      cfg_msg_received_pm_pme                   => cfg_msg_received_pm_pme,
2777
      cfg_msg_received_setslotpowerlimit        => cfg_msg_received_setslotpowerlimit,
2778
      cfg_msg_received_unlock                   => cfg_msg_received_unlock,
2779
      cfg_pcie_link_state                       => cfg_pcie_link_state_int ,
2780
      cfg_pmcsr_pme_en                          => cfg_pmcsr_pme_en,
2781
      cfg_pmcsr_powerstate                      => cfg_pmcsr_powerstate_int,
2782
      cfg_pmcsr_pme_status                      => cfg_pmcsr_pme_status,
2783
      cfg_pm_rcv_as_req_l1_n                    => cfg_pm_rcv_as_req_l1_n,
2784
      cfg_pm_rcv_enter_l1_n                     => cfg_pm_rcv_enter_l1_n,
2785
      cfg_pm_rcv_enter_l23_n                    => cfg_pm_rcv_enter_l23_n,
2786
 
2787
      cfg_pm_rcv_req_ack_n                      => cfg_pm_rcv_req_ack_n,
2788
      cfg_mgmt_rd_wr_done_n                     => cfg_mgmt_rd_wr_done_n ,
2789
      cfg_slot_control_electromech_il_ctl_pulse =>cfg_slot_control_electromech_il_ctl_pulse,
2790
      cfg_root_control_syserr_corr_err_en       => cfg_root_control_syserr_corr_err_en,
2791
      cfg_root_control_syserr_non_fatal_err_en  => cfg_root_control_syserr_non_fatal_err_en,
2792
      cfg_root_control_syserr_fatal_err_en      => cfg_root_control_syserr_fatal_err_en,
2793
      cfg_root_control_pme_int_en               => cfg_root_control_pme_int_en   ,
2794
      cfg_aer_ecrc_check_en                     => cfg_aer_ecrc_check_en ,
2795
      cfg_aer_ecrc_gen_en                       => cfg_aer_ecrc_gen_en ,
2796
      cfg_aer_rooterr_corr_err_reporting_en     => cfg_aer_rooterr_corr_err_reporting_en,
2797
      cfg_aer_rooterr_non_fatal_err_reporting_en=> cfg_aer_rooterr_non_fatal_err_reporting_en,
2798
      cfg_aer_rooterr_fatal_err_reporting_en    => cfg_aer_rooterr_fatal_err_reporting_en,
2799
      cfg_aer_rooterr_corr_err_received         => cfg_aer_rooterr_corr_err_received,
2800
      cfg_aer_rooterr_non_fatal_err_received    => cfg_aer_rooterr_non_fatal_err_received,
2801
      cfg_aer_rooterr_fatal_err_received        => cfg_aer_rooterr_fatal_err_received,
2802
      cfg_aer_interrupt_msgnum                  => cfg_aer_interrupt_msgnum      ,
2803
      cfg_transaction                           => cfg_transaction,
2804
      cfg_transaction_addr                      => cfg_transaction_addr,
2805
      cfg_transaction_type                      => cfg_transaction_type,
2806
      cfg_vc_tcvc_map                           => cfg_vc_tcvc_map,
2807
      cfg_mgmt_byte_en_n                        => cfg_mgmt_byte_en_n ,
2808
      cfg_mgmt_di                               => cfg_mgmt_di ,
2809
      cfg_ds_bus_number                         => cfg_ds_bus_number ,
2810
      cfg_ds_device_number                      => cfg_ds_device_number ,
2811
      cfg_ds_function_number                    => cfg_ds_function_number ,
2812
      cfg_dsn                                   => cfg_dsn ,
2813
      cfg_mgmt_dwaddr                           => cfg_mgmt_dwaddr ,
2814
      cfg_err_acs_n                             => '1' ,
2815
      cfg_err_cor_n                             => cfg_err_cor_n ,
2816
      cfg_err_cpl_abort_n                       => cfg_err_cpl_abort_n ,
2817
      cfg_err_cpl_timeout_n                     => cfg_err_cpl_timeout_n ,
2818
      cfg_err_cpl_unexpect_n                    => cfg_err_cpl_unexpect_n ,
2819
      cfg_err_ecrc_n                            => cfg_err_ecrc_n ,
2820
      cfg_err_locked_n                          => cfg_err_locked_n ,
2821
      cfg_err_posted_n                          => cfg_err_posted_n ,
2822
      cfg_err_tlp_cpl_header                    => cfg_err_tlp_cpl_header ,
2823
      cfg_err_ur_n                              => cfg_err_ur_n ,
2824
      cfg_err_malformed_n                       => cfg_err_malformed_n ,
2825
      cfg_err_poisoned_n                        => cfg_err_poisoned_n,
2826
      cfg_err_atomic_egress_blocked_n           => cfg_err_atomic_egress_blocked_n ,
2827
      cfg_err_mc_blocked_n                      => cfg_err_mc_blocked_n  ,
2828
      cfg_err_internal_uncor_n                  => cfg_err_internal_uncor_n      ,
2829
      cfg_err_internal_cor_n                    => cfg_err_internal_cor_n ,
2830
      cfg_err_norecovery_n                      => cfg_err_norecovery_n  ,
2831
 
2832
      cfg_interrupt_assert_n                    => cfg_interrupt_assert_n ,
2833
      cfg_interrupt_di                          => cfg_interrupt_di ,
2834
      cfg_interrupt_n                           => cfg_interrupt_n ,
2835
      cfg_interrupt_stat_n                      => cfg_interrupt_stat_n,
2836
      cfg_pm_send_pme_to_n                      => cfg_pm_send_pme_to_n ,
2837
      cfg_pm_turnoff_ok_n                       => cfg_turnoff_ok_int_n ,
2838
      cfg_pm_wake_n                             => cfg_pm_wake_n ,
2839
      cfg_pm_halt_aspm_l0s_n                    => cfg_pm_halt_aspm_l0s_n ,
2840
      cfg_pm_halt_aspm_l1_n                     => cfg_pm_halt_aspm_l1_n ,
2841
      cfg_pm_force_state_en_n                   => cfg_pm_force_state_en_n ,
2842
      cfg_pm_force_state                        => cfg_pm_force_state ,
2843
      cfg_force_mps                             => cfg_force_mps ,
2844
      cfg_force_common_clock_off                => cfg_force_common_clock_off ,
2845
      cfg_force_extended_sync_on                => cfg_force_extended_sync_on ,
2846
      cfg_port_number                           => cfg_port_number ,
2847
      cfg_mgmt_rd_en_n                          => cfg_mgmt_rd_en_n ,
2848
      cfg_trn_pending_n                         => cfg_trn_pending_n ,
2849
      cfg_mgmt_wr_en_n                          => cfg_mgmt_wr_en_n ,
2850
      cfg_mgmt_wr_readonly_n                    => cfg_mgmt_wr_readonly_n ,
2851
      cfg_mgmt_wr_rw1c_as_rw_n                  => cfg_mgmt_wr_rw1c_as_rw_n ,
2852
 
2853
      pl_initial_link_width                     => pl_initial_link_width ,
2854
      pl_lane_reversal_mode                     => pl_lane_reversal_mode ,
2855
      pl_link_gen2_cap                          => pl_link_gen2_cap ,
2856
      pl_link_partner_gen2_supported            => pl_link_partner_gen2_supported ,
2857
      pl_link_upcfg_cap                         => pl_link_upcfg_cap ,
2858
      pl_ltssm_state                            => pl_ltssm_state_int ,
2859
      pl_phy_lnk_up_n                           => pl_phy_lnk_up_n ,
2860
      pl_received_hot_rst                       => pl_received_hot_rst ,
2861
      pl_rx_pm_state                            => pl_rx_pm_state ,
2862
      pl_sel_lnk_rate                           => pl_sel_lnk_rate,
2863
      pl_sel_lnk_width                          => pl_sel_lnk_width ,
2864
      pl_tx_pm_state                            => pl_tx_pm_state ,
2865
      pl_directed_link_auton                    => pl_directed_link_auton ,
2866
      pl_directed_link_change                   => pl_directed_link_change ,
2867
      pl_directed_link_speed                    => pl_directed_link_speed ,
2868
      pl_directed_link_width                    => pl_directed_link_width ,
2869
      pl_downstream_deemph_source               => pl_downstream_deemph_source ,
2870
      pl_upstream_prefer_deemph                 => pl_upstream_prefer_deemph ,
2871
      pl_transmit_hot_rst                       => pl_transmit_hot_rst ,
2872
      pl_directed_ltssm_new_vld                 => pl_directed_ltssm_new_vld ,
2873
      pl_directed_ltssm_new                     => pl_directed_ltssm_new ,
2874
      pl_directed_ltssm_stall                   => pl_directed_ltssm_stall ,
2875
      pl_directed_change_done                   => pl_directed_change_done ,
2876
 
2877
      dbg_sclr_a                                => dbg_sclr_a ,
2878
      dbg_sclr_b                                => dbg_sclr_b ,
2879
      dbg_sclr_c                                => dbg_sclr_c ,
2880
      dbg_sclr_d                                => dbg_sclr_d ,
2881
      dbg_sclr_e                                => dbg_sclr_e ,
2882
      dbg_sclr_f                                => dbg_sclr_f ,
2883
      dbg_sclr_g                                => dbg_sclr_g ,
2884
      dbg_sclr_h                                => dbg_sclr_h ,
2885
      dbg_sclr_i                                => dbg_sclr_i ,
2886
      dbg_sclr_j                                => dbg_sclr_j ,
2887
      dbg_sclr_k                                => dbg_sclr_k ,
2888
 
2889
      dbg_vec_a                                 => dbg_vec_a ,
2890
      dbg_vec_b                                 => dbg_vec_b ,
2891
      dbg_vec_c                                 => dbg_vec_c ,
2892
      pl_dbg_vec                                => pl_dbg_vec ,
2893
      dbg_mode                                  => dbg_mode ,
2894
      dbg_sub_mode                              => dbg_sub_mode ,
2895
      pl_dbg_mode                               => pl_dbg_mode ,
2896
 
2897
      drp_clk                                   => drp_clk ,
2898
      drp_addr                                  => drp_addr ,
2899
      drp_en                                    => drp_en ,
2900
      drp_di                                    => drp_di ,
2901
      drp_we                                    => drp_we ,
2902
      drp_do                                    => drp_do ,
2903
      drp_rdy                                   => drp_rdy ,
2904
 
2905
      ll2_tlp_rcv                               => '0' ,
2906
      ll2_send_enter_l1                         => '0' ,
2907
      ll2_send_enter_l23                        => '0' ,
2908
      ll2_send_as_req_l1                        => '0' ,
2909
      ll2_send_pm_ack                           => '0' ,
2910
      ll2_suspend_now                           => '0' ,
2911
      ll2_tfc_init1_seq                         => open ,
2912
      ll2_tfc_init2_seq                         => open ,
2913
      ll2_suspend_ok                            => open ,
2914
      ll2_tx_idle                               => open ,
2915
      ll2_link_status                           => open ,
2916
      ll2_receiver_err                          => open ,
2917
      ll2_protocol_err                          => open ,
2918
      ll2_bad_tlp_err                           => open ,
2919
      ll2_bad_dllp_err                          => open ,
2920
      ll2_replay_ro_err                         => open ,
2921
      ll2_replay_to_err                         => open ,
2922
      tl2_ppm_suspend_req                       => '0' ,
2923
      tl2_aspm_suspend_credit_check             => '0' ,
2924
      tl2_ppm_suspend_ok                        => open ,
2925
      tl2_aspm_suspend_req                      => open ,
2926
      tl2_aspm_suspend_credit_check_ok          => open ,
2927
      tl2_err_hdr                               => open ,
2928
      tl2_err_malformed                         => open ,
2929
      tl2_err_rxoverflow                        => open ,
2930
      tl2_err_fcpe                              => open ,
2931
      pl2_directed_lstate                       => "00000" ,
2932
      pl2_suspend_ok                            => open ,
2933
      pl2_recovery                              => open ,
2934
      pl2_rx_elec_idle                          => open ,
2935
      pl2_rx_pm_state                           => open ,
2936
      pl2_l0_req                                => open ,
2937
      pl2_link_up                               => open ,
2938
      pl2_receiver_err                          => open ,
2939
 
2940
      trn_rdllp_data                            =>trn_rdllp_data ,
2941
      trn_rdllp_src_rdy                         =>trn_rdllp_src_rdy ,
2942
 
2943
      pipe_clk                                  => pipe_clk ,
2944
      user_clk2                                 => user_clk2 ,
2945
      user_clk                                  => user_clk ,
2946
      user_clk_prebuf                           => '0' ,
2947
      user_clk_prebuf_en                        => '0' ,
2948
 
2949
      pipe_rx0_polarity                         => pipe_rx0_polarity ,
2950
      pipe_rx1_polarity                         => pipe_rx1_polarity ,
2951
      pipe_rx2_polarity                         => pipe_rx2_polarity ,
2952
      pipe_rx3_polarity                         => pipe_rx3_polarity ,
2953
      pipe_rx4_polarity                         => pipe_rx4_polarity ,
2954
      pipe_rx5_polarity                         => pipe_rx5_polarity ,
2955
      pipe_rx6_polarity                         => pipe_rx6_polarity ,
2956
      pipe_rx7_polarity                         => pipe_rx7_polarity ,
2957
      pipe_tx0_compliance                       => pipe_tx0_compliance ,
2958
      pipe_tx1_compliance                       => pipe_tx1_compliance ,
2959
      pipe_tx2_compliance                       => pipe_tx2_compliance ,
2960
      pipe_tx3_compliance                       => pipe_tx3_compliance ,
2961
      pipe_tx4_compliance                       => pipe_tx4_compliance ,
2962
      pipe_tx5_compliance                       => pipe_tx5_compliance ,
2963
      pipe_tx6_compliance                       => pipe_tx6_compliance ,
2964
      pipe_tx7_compliance                       => pipe_tx7_compliance ,
2965
      pipe_tx0_char_is_k                        => pipe_tx0_char_is_k ,
2966
      pipe_tx1_char_is_k                        => pipe_tx1_char_is_k ,
2967
      pipe_tx2_char_is_k                        => pipe_tx2_char_is_k ,
2968
      pipe_tx3_char_is_k                        => pipe_tx3_char_is_k ,
2969
      pipe_tx4_char_is_k                        => pipe_tx4_char_is_k ,
2970
      pipe_tx5_char_is_k                        => pipe_tx5_char_is_k ,
2971
      pipe_tx6_char_is_k                        => pipe_tx6_char_is_k ,
2972
      pipe_tx7_char_is_k                        => pipe_tx7_char_is_k ,
2973
      pipe_tx0_data                             => pipe_tx0_data ,
2974
      pipe_tx1_data                             => pipe_tx1_data ,
2975
      pipe_tx2_data                             => pipe_tx2_data ,
2976
      pipe_tx3_data                             => pipe_tx3_data ,
2977
      pipe_tx4_data                             => pipe_tx4_data ,
2978
      pipe_tx5_data                             => pipe_tx5_data ,
2979
      pipe_tx6_data                             => pipe_tx6_data ,
2980
      pipe_tx7_data                             => pipe_tx7_data ,
2981
      pipe_tx0_elec_idle                        => pipe_tx0_elec_idle ,
2982
      pipe_tx1_elec_idle                        => pipe_tx1_elec_idle ,
2983
      pipe_tx2_elec_idle                        => pipe_tx2_elec_idle ,
2984
      pipe_tx3_elec_idle                        => pipe_tx3_elec_idle ,
2985
      pipe_tx4_elec_idle                        => pipe_tx4_elec_idle ,
2986
      pipe_tx5_elec_idle                        => pipe_tx5_elec_idle ,
2987
      pipe_tx6_elec_idle                        => pipe_tx6_elec_idle ,
2988
      pipe_tx7_elec_idle                        => pipe_tx7_elec_idle ,
2989
      pipe_tx0_powerdown                        => pipe_tx0_powerdown ,
2990
      pipe_tx1_powerdown                        => pipe_tx1_powerdown ,
2991
      pipe_tx2_powerdown                        => pipe_tx2_powerdown ,
2992
      pipe_tx3_powerdown                        => pipe_tx3_powerdown ,
2993
      pipe_tx4_powerdown                        => pipe_tx4_powerdown ,
2994
      pipe_tx5_powerdown                        => pipe_tx5_powerdown ,
2995
      pipe_tx6_powerdown                        => pipe_tx6_powerdown ,
2996
      pipe_tx7_powerdown                        => pipe_tx7_powerdown ,
2997
 
2998
      pipe_rx0_char_is_k                        => pipe_rx0_char_is_k ,
2999
      pipe_rx1_char_is_k                        => pipe_rx1_char_is_k ,
3000
      pipe_rx2_char_is_k                        => pipe_rx2_char_is_k ,
3001
      pipe_rx3_char_is_k                        => pipe_rx3_char_is_k ,
3002
      pipe_rx4_char_is_k                        => pipe_rx4_char_is_k ,
3003
      pipe_rx5_char_is_k                        => pipe_rx5_char_is_k ,
3004
      pipe_rx6_char_is_k                        => pipe_rx6_char_is_k ,
3005
      pipe_rx7_char_is_k                        => pipe_rx7_char_is_k ,
3006
      pipe_rx0_valid                            => pipe_rx0_valid ,
3007
      pipe_rx1_valid                            => pipe_rx1_valid ,
3008
      pipe_rx2_valid                            => pipe_rx2_valid ,
3009
      pipe_rx3_valid                            => pipe_rx3_valid ,
3010
      pipe_rx4_valid                            => pipe_rx4_valid ,
3011
      pipe_rx5_valid                            => pipe_rx5_valid ,
3012
      pipe_rx6_valid                            => pipe_rx6_valid ,
3013
      pipe_rx7_valid                            => pipe_rx7_valid ,
3014
      pipe_rx0_data                             => pipe_rx0_data ,
3015
      pipe_rx1_data                             => pipe_rx1_data ,
3016
      pipe_rx2_data                             => pipe_rx2_data ,
3017
      pipe_rx3_data                             => pipe_rx3_data ,
3018
      pipe_rx4_data                             => pipe_rx4_data ,
3019
      pipe_rx5_data                             => pipe_rx5_data ,
3020
      pipe_rx6_data                             => pipe_rx6_data ,
3021
      pipe_rx7_data                             => pipe_rx7_data ,
3022
      pipe_rx0_chanisaligned                    => pipe_rx0_chanisaligned ,
3023
      pipe_rx1_chanisaligned                    => pipe_rx1_chanisaligned ,
3024
      pipe_rx2_chanisaligned                    => pipe_rx2_chanisaligned ,
3025
      pipe_rx3_chanisaligned                    => pipe_rx3_chanisaligned ,
3026
      pipe_rx4_chanisaligned                    => pipe_rx4_chanisaligned ,
3027
      pipe_rx5_chanisaligned                    => pipe_rx5_chanisaligned ,
3028
      pipe_rx6_chanisaligned                    => pipe_rx6_chanisaligned ,
3029
      pipe_rx7_chanisaligned                    => pipe_rx7_chanisaligned ,
3030
      pipe_rx0_status                           => pipe_rx0_status ,
3031
      pipe_rx1_status                           => pipe_rx1_status ,
3032
      pipe_rx2_status                           => pipe_rx2_status ,
3033
      pipe_rx3_status                           => pipe_rx3_status ,
3034
      pipe_rx4_status                           => pipe_rx4_status ,
3035
      pipe_rx5_status                           => pipe_rx5_status ,
3036
      pipe_rx6_status                           => pipe_rx6_status ,
3037
      pipe_rx7_status                           => pipe_rx7_status ,
3038
      pipe_rx0_phy_status                       => pipe_rx0_phy_status ,
3039
      pipe_rx1_phy_status                       => pipe_rx1_phy_status ,
3040
      pipe_rx2_phy_status                       => pipe_rx2_phy_status ,
3041
      pipe_rx3_phy_status                       => pipe_rx3_phy_status ,
3042
      pipe_rx4_phy_status                       => pipe_rx4_phy_status ,
3043
      pipe_rx5_phy_status                       => pipe_rx5_phy_status ,
3044
      pipe_rx6_phy_status                       => pipe_rx6_phy_status ,
3045
      pipe_rx7_phy_status                       => pipe_rx7_phy_status ,
3046
      pipe_tx_deemph                            => pipe_tx_deemph ,
3047
      pipe_tx_margin                            => pipe_tx_margin ,
3048
      pipe_tx_reset                             => pipe_tx_reset ,
3049
      pipe_tx_rcvr_det                          => pipe_tx_rcvr_det ,
3050
      pipe_tx_rate                              => pipe_tx_rate ,
3051
 
3052
      pipe_rx0_elec_idle                        => pipe_rx0_elec_idle ,
3053
      pipe_rx1_elec_idle                        => pipe_rx1_elec_idle ,
3054
      pipe_rx2_elec_idle                        => pipe_rx2_elec_idle ,
3055
      pipe_rx3_elec_idle                        => pipe_rx3_elec_idle ,
3056
      pipe_rx4_elec_idle                        => pipe_rx4_elec_idle ,
3057
      pipe_rx5_elec_idle                        => pipe_rx5_elec_idle ,
3058
      pipe_rx6_elec_idle                        => pipe_rx6_elec_idle ,
3059
      pipe_rx7_elec_idle                        => pipe_rx7_elec_idle,
3060
 
3061
      scanmode_n                                => '1',
3062
      scanenable_n                              => '1',
3063
      edt_clk                                   => '0',
3064
      edt_bypass                                => '0',
3065
      edt_update                                => '0',
3066
      edt_configuration                         => '0',
3067
      edt_single_bypass_chain                   => '0',
3068
      edt_channels_in1                          => '0',
3069
      edt_channels_in2                          => '0',
3070
      edt_channels_in3                          => '0',
3071
      edt_channels_in4                          => '0',
3072
      edt_channels_in5                          => '0',
3073
      edt_channels_in6                          => '0',
3074
      edt_channels_in7                          => '0',
3075
      edt_channels_in8                          => '0',
3076
      pmv_enable_n                              => '0',
3077
      pmv_select                                => "000",
3078
      pmv_divide                                => "00",
3079
      cfg_reset                                 => '0',
3080
      gwe                                       => '0',
3081
      grestore                                  => '0',
3082
      ghigh                                     => '0'
3083
    );
3084
 
3085
  ----------------------------------------------------------------------------------------------------------------------
3086
  -- PIPE Interface PIPELINE Module                                                                                   --
3087
  ----------------------------------------------------------------------------------------------------------------------
3088
  pcie_pipe_pipeline_i : cl_a7pcie_x4_pcie_pipe_pipeline
3089
    generic map (
3090
      LINK_CAP_MAX_LINK_WIDTH_int => LINK_CAP_MAX_LINK_WIDTH_int ,
3091
      PIPE_PIPELINE_STAGES        => PIPE_PIPELINE_STAGES
3092
    )
3093
    port map (
3094
 
3095
      -- Pipe Per-Link Signals
3096
      pipe_tx_rcvr_det_i       => pipe_tx_rcvr_det,
3097
      pipe_tx_reset_i          => '0',
3098
      pipe_tx_rate_i           => pipe_tx_rate,
3099
      pipe_tx_deemph_i         => pipe_tx_deemph,
3100
      pipe_tx_margin_i         => pipe_tx_margin,
3101
      pipe_tx_swing_i          => '0',
3102
 
3103
      pipe_tx_rcvr_det_o       => pipe_tx_rcvr_det_gt,
3104
      pipe_tx_reset_o          => open ,
3105
      pipe_tx_rate_o           => pipe_tx_rate_gt,
3106
      pipe_tx_deemph_o         => pipe_tx_deemph_gt,
3107
      pipe_tx_margin_o         => pipe_tx_margin_gt,
3108
      pipe_tx_swing_o          => open ,
3109
 
3110
      -- Pipe Per-Lane Signals - Lane 0
3111
 
3112
      pipe_rx0_char_is_k_o     => pipe_rx0_char_is_k     ,
3113
      pipe_rx0_data_o          => pipe_rx0_data          ,
3114
      pipe_rx0_valid_o         => pipe_rx0_valid         ,
3115
      pipe_rx0_chanisaligned_o => pipe_rx0_chanisaligned ,
3116
      pipe_rx0_status_o        => pipe_rx0_status        ,
3117
      pipe_rx0_phy_status_o    => pipe_rx0_phy_status    ,
3118
      pipe_rx0_elec_idle_i     => pipe_rx0_elec_idle_gt  ,
3119
      pipe_rx0_polarity_i      => pipe_rx0_polarity      ,
3120
      pipe_tx0_compliance_i    => pipe_tx0_compliance    ,
3121
      pipe_tx0_char_is_k_i     => pipe_tx0_char_is_k     ,
3122
      pipe_tx0_data_i          => pipe_tx0_data          ,
3123
      pipe_tx0_elec_idle_i     => pipe_tx0_elec_idle     ,
3124
      pipe_tx0_powerdown_i     => pipe_tx0_powerdown     ,
3125
 
3126
      pipe_rx0_char_is_k_i     => pipe_rx0_char_is_k_gt  ,
3127
      pipe_rx0_data_i          => pipe_rx0_data_gt       ,
3128
      pipe_rx0_valid_i         => pipe_rx0_valid_gt      ,
3129
      pipe_rx0_chanisaligned_i => pipe_rx0_chanisaligned_gt,
3130
      pipe_rx0_status_i        => pipe_rx0_status_gt     ,
3131
      pipe_rx0_phy_status_i    => pipe_rx0_phy_status_gt ,
3132
      pipe_rx0_elec_idle_o     => pipe_rx0_elec_idle     ,
3133
      pipe_rx0_polarity_o      => pipe_rx0_polarity_gt   ,
3134
      pipe_tx0_compliance_o    => pipe_tx0_compliance_gt ,
3135
      pipe_tx0_char_is_k_o     => pipe_tx0_char_is_k_gt  ,
3136
      pipe_tx0_data_o          => pipe_tx0_data_gt       ,
3137
      pipe_tx0_elec_idle_o     => pipe_tx0_elec_idle_gt  ,
3138
      pipe_tx0_powerdown_o     => pipe_tx0_powerdown_gt  ,
3139
 
3140
      -- Pipe Per-Lane Signals - Lane 1
3141
 
3142
      pipe_rx1_char_is_k_o     => pipe_rx1_char_is_k     ,
3143
      pipe_rx1_data_o          => pipe_rx1_data          ,
3144
      pipe_rx1_valid_o         => pipe_rx1_valid         ,
3145
      pipe_rx1_chanisaligned_o => pipe_rx1_chanisaligned ,
3146
      pipe_rx1_status_o        => pipe_rx1_status        ,
3147
      pipe_rx1_phy_status_o    => pipe_rx1_phy_status    ,
3148
      pipe_rx1_elec_idle_i     => pipe_rx1_elec_idle_gt  ,
3149
      pipe_rx1_polarity_i      => pipe_rx1_polarity      ,
3150
      pipe_tx1_compliance_i    => pipe_tx1_compliance    ,
3151
      pipe_tx1_char_is_k_i     => pipe_tx1_char_is_k     ,
3152
      pipe_tx1_data_i          => pipe_tx1_data          ,
3153
      pipe_tx1_elec_idle_i     => pipe_tx1_elec_idle     ,
3154
      pipe_tx1_powerdown_i     => pipe_tx1_powerdown     ,
3155
 
3156
      pipe_rx1_char_is_k_i     => pipe_rx1_char_is_k_gt  ,
3157
      pipe_rx1_data_i          => pipe_rx1_data_gt       ,
3158
      pipe_rx1_valid_i         => pipe_rx1_valid_gt      ,
3159
      pipe_rx1_chanisaligned_i => pipe_rx1_chanisaligned_gt,
3160
      pipe_rx1_status_i        => pipe_rx1_status_gt     ,
3161
      pipe_rx1_phy_status_i    => pipe_rx1_phy_status_gt ,
3162
      pipe_rx1_elec_idle_o     => pipe_rx1_elec_idle     ,
3163
      pipe_rx1_polarity_o      => pipe_rx1_polarity_gt   ,
3164
      pipe_tx1_compliance_o    => pipe_tx1_compliance_gt ,
3165
      pipe_tx1_char_is_k_o     => pipe_tx1_char_is_k_gt  ,
3166
      pipe_tx1_data_o          => pipe_tx1_data_gt       ,
3167
      pipe_tx1_elec_idle_o     => pipe_tx1_elec_idle_gt  ,
3168
      pipe_tx1_powerdown_o     => pipe_tx1_powerdown_gt  ,
3169
 
3170
      -- Pipe Per-Lane Signals - Lane 2
3171
 
3172
      pipe_rx2_char_is_k_o     => pipe_rx2_char_is_k     ,
3173
      pipe_rx2_data_o          => pipe_rx2_data          ,
3174
      pipe_rx2_valid_o         => pipe_rx2_valid         ,
3175
      pipe_rx2_chanisaligned_o => pipe_rx2_chanisaligned ,
3176
      pipe_rx2_status_o        => pipe_rx2_status        ,
3177
      pipe_rx2_phy_status_o    => pipe_rx2_phy_status    ,
3178
      pipe_rx2_elec_idle_i     => pipe_rx2_elec_idle_gt  ,
3179
      pipe_rx2_polarity_i      => pipe_rx2_polarity      ,
3180
      pipe_tx2_compliance_i    => pipe_tx2_compliance    ,
3181
      pipe_tx2_char_is_k_i     => pipe_tx2_char_is_k     ,
3182
      pipe_tx2_data_i          => pipe_tx2_data          ,
3183
      pipe_tx2_elec_idle_i     => pipe_tx2_elec_idle     ,
3184
      pipe_tx2_powerdown_i     => pipe_tx2_powerdown     ,
3185
 
3186
      pipe_rx2_char_is_k_i     => pipe_rx2_char_is_k_gt  ,
3187
      pipe_rx2_data_i          => pipe_rx2_data_gt       ,
3188
      pipe_rx2_valid_i         => pipe_rx2_valid_gt      ,
3189
      pipe_rx2_chanisaligned_i => pipe_rx2_chanisaligned_gt,
3190
      pipe_rx2_status_i        => pipe_rx2_status_gt     ,
3191
      pipe_rx2_phy_status_i    => pipe_rx2_phy_status_gt ,
3192
      pipe_rx2_elec_idle_o     => pipe_rx2_elec_idle     ,
3193
      pipe_rx2_polarity_o      => pipe_rx2_polarity_gt   ,
3194
      pipe_tx2_compliance_o    => pipe_tx2_compliance_gt ,
3195
      pipe_tx2_char_is_k_o     => pipe_tx2_char_is_k_gt  ,
3196
      pipe_tx2_data_o          => pipe_tx2_data_gt       ,
3197
      pipe_tx2_elec_idle_o     => pipe_tx2_elec_idle_gt  ,
3198
      pipe_tx2_powerdown_o     => pipe_tx2_powerdown_gt  ,
3199
 
3200
      -- Pipe Per-Lane Signals - Lane 3
3201
 
3202
      pipe_rx3_char_is_k_o     => pipe_rx3_char_is_k     ,
3203
      pipe_rx3_data_o          => pipe_rx3_data          ,
3204
      pipe_rx3_valid_o         => pipe_rx3_valid         ,
3205
      pipe_rx3_chanisaligned_o => pipe_rx3_chanisaligned ,
3206
      pipe_rx3_status_o        => pipe_rx3_status        ,
3207
      pipe_rx3_phy_status_o    => pipe_rx3_phy_status    ,
3208
      pipe_rx3_elec_idle_i     => pipe_rx3_elec_idle_gt  ,
3209
      pipe_rx3_polarity_i      => pipe_rx3_polarity      ,
3210
      pipe_tx3_compliance_i    => pipe_tx3_compliance    ,
3211
      pipe_tx3_char_is_k_i     => pipe_tx3_char_is_k     ,
3212
      pipe_tx3_data_i          => pipe_tx3_data          ,
3213
      pipe_tx3_elec_idle_i     => pipe_tx3_elec_idle     ,
3214
      pipe_tx3_powerdown_i     => pipe_tx3_powerdown     ,
3215
 
3216
      pipe_rx3_char_is_k_i     => pipe_rx3_char_is_k_gt  ,
3217
      pipe_rx3_data_i          => pipe_rx3_data_gt       ,
3218
      pipe_rx3_valid_i         => pipe_rx3_valid_gt      ,
3219
      pipe_rx3_chanisaligned_i => pipe_rx3_chanisaligned_gt,
3220
      pipe_rx3_status_i        => pipe_rx3_status_gt     ,
3221
      pipe_rx3_phy_status_i    => pipe_rx3_phy_status_gt ,
3222
      pipe_rx3_elec_idle_o     => pipe_rx3_elec_idle     ,
3223
      pipe_rx3_polarity_o      => pipe_rx3_polarity_gt   ,
3224
      pipe_tx3_compliance_o    => pipe_tx3_compliance_gt ,
3225
      pipe_tx3_char_is_k_o     => pipe_tx3_char_is_k_gt  ,
3226
      pipe_tx3_data_o          => pipe_tx3_data_gt       ,
3227
      pipe_tx3_elec_idle_o     => pipe_tx3_elec_idle_gt  ,
3228
      pipe_tx3_powerdown_o     => pipe_tx3_powerdown_gt  ,
3229
 
3230
      -- Pipe Per-Lane Signals - Lane 4
3231
 
3232
      pipe_rx4_char_is_k_o     => pipe_rx4_char_is_k     ,
3233
      pipe_rx4_data_o          => pipe_rx4_data          ,
3234
      pipe_rx4_valid_o         => pipe_rx4_valid         ,
3235
      pipe_rx4_chanisaligned_o => pipe_rx4_chanisaligned ,
3236
      pipe_rx4_status_o        => pipe_rx4_status        ,
3237
      pipe_rx4_phy_status_o    => pipe_rx4_phy_status    ,
3238
      pipe_rx4_elec_idle_i     => pipe_rx4_elec_idle_gt  ,
3239
      pipe_rx4_polarity_i      => pipe_rx4_polarity      ,
3240
      pipe_tx4_compliance_i    => pipe_tx4_compliance    ,
3241
      pipe_tx4_char_is_k_i     => pipe_tx4_char_is_k     ,
3242
      pipe_tx4_data_i          => pipe_tx4_data          ,
3243
      pipe_tx4_elec_idle_i     => pipe_tx4_elec_idle     ,
3244
      pipe_tx4_powerdown_i     => pipe_tx4_powerdown     ,
3245
      pipe_rx4_char_is_k_i     => pipe_rx4_char_is_k_gt  ,
3246
      pipe_rx4_data_i          => pipe_rx4_data_gt       ,
3247
      pipe_rx4_valid_i         => pipe_rx4_valid_gt      ,
3248
      pipe_rx4_chanisaligned_i => pipe_rx4_chanisaligned_gt,
3249
      pipe_rx4_status_i        => pipe_rx4_status_gt     ,
3250
      pipe_rx4_phy_status_i    => pipe_rx4_phy_status_gt ,
3251
      pipe_rx4_elec_idle_o     => pipe_rx4_elec_idle     ,
3252
      pipe_rx4_polarity_o      => pipe_rx4_polarity_gt   ,
3253
      pipe_tx4_compliance_o    => pipe_tx4_compliance_gt ,
3254
      pipe_tx4_char_is_k_o     => pipe_tx4_char_is_k_gt  ,
3255
      pipe_tx4_data_o          => pipe_tx4_data_gt       ,
3256
      pipe_tx4_elec_idle_o     => pipe_tx4_elec_idle_gt  ,
3257
      pipe_tx4_powerdown_o     => pipe_tx4_powerdown_gt  ,
3258
 
3259
      -- Pipe Per-Lane Signals - Lane 5
3260
 
3261
      pipe_rx5_char_is_k_o     => pipe_rx5_char_is_k     ,
3262
      pipe_rx5_data_o          => pipe_rx5_data          ,
3263
      pipe_rx5_valid_o         => pipe_rx5_valid         ,
3264
      pipe_rx5_chanisaligned_o => pipe_rx5_chanisaligned ,
3265
      pipe_rx5_status_o        => pipe_rx5_status        ,
3266
      pipe_rx5_phy_status_o    => pipe_rx5_phy_status    ,
3267
      pipe_rx5_elec_idle_i     => pipe_rx5_elec_idle_gt  ,
3268
      pipe_rx5_polarity_i      => pipe_rx5_polarity      ,
3269
      pipe_tx5_compliance_i    => pipe_tx5_compliance    ,
3270
      pipe_tx5_char_is_k_i     => pipe_tx5_char_is_k     ,
3271
      pipe_tx5_data_i          => pipe_tx5_data          ,
3272
      pipe_tx5_elec_idle_i     => pipe_tx5_elec_idle     ,
3273
      pipe_tx5_powerdown_i     => pipe_tx5_powerdown     ,
3274
      pipe_rx5_char_is_k_i     => pipe_rx5_char_is_k_gt  ,
3275
      pipe_rx5_data_i          => pipe_rx5_data_gt       ,
3276
      pipe_rx5_valid_i         => pipe_rx5_valid_gt      ,
3277
      pipe_rx5_chanisaligned_i => pipe_rx5_chanisaligned_gt,
3278
      pipe_rx5_status_i        => pipe_rx5_status_gt     ,
3279
      pipe_rx5_phy_status_i    => pipe_rx5_phy_status_gt ,
3280
      pipe_rx5_elec_idle_o     => pipe_rx5_elec_idle     ,
3281
      pipe_rx5_polarity_o      => pipe_rx5_polarity_gt   ,
3282
      pipe_tx5_compliance_o    => pipe_tx5_compliance_gt ,
3283
      pipe_tx5_char_is_k_o     => pipe_tx5_char_is_k_gt  ,
3284
      pipe_tx5_data_o          => pipe_tx5_data_gt       ,
3285
      pipe_tx5_elec_idle_o     => pipe_tx5_elec_idle_gt  ,
3286
      pipe_tx5_powerdown_o     => pipe_tx5_powerdown_gt  ,
3287
 
3288
      -- Pipe Per-Lane Signals - Lane 6
3289
 
3290
      pipe_rx6_char_is_k_o     => pipe_rx6_char_is_k     ,
3291
      pipe_rx6_data_o          => pipe_rx6_data          ,
3292
      pipe_rx6_valid_o         => pipe_rx6_valid         ,
3293
      pipe_rx6_chanisaligned_o => pipe_rx6_chanisaligned ,
3294
      pipe_rx6_status_o        => pipe_rx6_status        ,
3295
      pipe_rx6_phy_status_o    => pipe_rx6_phy_status    ,
3296
      pipe_rx6_elec_idle_i     => pipe_rx6_elec_idle_gt  ,
3297
      pipe_rx6_polarity_i      => pipe_rx6_polarity      ,
3298
      pipe_tx6_compliance_i    => pipe_tx6_compliance    ,
3299
      pipe_tx6_char_is_k_i     => pipe_tx6_char_is_k     ,
3300
      pipe_tx6_data_i          => pipe_tx6_data          ,
3301
      pipe_tx6_elec_idle_i     => pipe_tx6_elec_idle     ,
3302
      pipe_tx6_powerdown_i     => pipe_tx6_powerdown     ,
3303
      pipe_rx6_char_is_k_i     => pipe_rx6_char_is_k_gt  ,
3304
      pipe_rx6_data_i          => pipe_rx6_data_gt       ,
3305
      pipe_rx6_valid_i         => pipe_rx6_valid_gt      ,
3306
      pipe_rx6_chanisaligned_i => pipe_rx6_chanisaligned_gt,
3307
      pipe_rx6_status_i        => pipe_rx6_status_gt     ,
3308
      pipe_rx6_phy_status_i    => pipe_rx6_phy_status_gt ,
3309
      pipe_rx6_elec_idle_o     => pipe_rx6_elec_idle     ,
3310
      pipe_rx6_polarity_o      => pipe_rx6_polarity_gt   ,
3311
      pipe_tx6_compliance_o    => pipe_tx6_compliance_gt ,
3312
      pipe_tx6_char_is_k_o     => pipe_tx6_char_is_k_gt  ,
3313
      pipe_tx6_data_o          => pipe_tx6_data_gt       ,
3314
      pipe_tx6_elec_idle_o     => pipe_tx6_elec_idle_gt  ,
3315
      pipe_tx6_powerdown_o     => pipe_tx6_powerdown_gt  ,
3316
 
3317
      -- Pipe Per-Lane Signals - Lane 7
3318
 
3319
      pipe_rx7_char_is_k_o     => pipe_rx7_char_is_k     ,
3320
      pipe_rx7_data_o          => pipe_rx7_data          ,
3321
      pipe_rx7_valid_o         => pipe_rx7_valid         ,
3322
      pipe_rx7_chanisaligned_o => pipe_rx7_chanisaligned ,
3323
      pipe_rx7_status_o        => pipe_rx7_status        ,
3324
      pipe_rx7_phy_status_o    => pipe_rx7_phy_status    ,
3325
      pipe_rx7_elec_idle_i     => pipe_rx7_elec_idle_gt  ,
3326
      pipe_rx7_polarity_i      => pipe_rx7_polarity      ,
3327
      pipe_tx7_compliance_i    => pipe_tx7_compliance    ,
3328
      pipe_tx7_char_is_k_i     => pipe_tx7_char_is_k     ,
3329
      pipe_tx7_data_i          => pipe_tx7_data          ,
3330
      pipe_tx7_elec_idle_i     => pipe_tx7_elec_idle     ,
3331
      pipe_tx7_powerdown_i     => pipe_tx7_powerdown     ,
3332
      pipe_rx7_char_is_k_i     => pipe_rx7_char_is_k_gt  ,
3333
      pipe_rx7_data_i          => pipe_rx7_data_gt       ,
3334
      pipe_rx7_valid_i         => pipe_rx7_valid_gt      ,
3335
      pipe_rx7_chanisaligned_i => pipe_rx7_chanisaligned_gt,
3336
      pipe_rx7_status_i        => pipe_rx7_status_gt     ,
3337
      pipe_rx7_phy_status_i    => pipe_rx7_phy_status_gt ,
3338
      pipe_rx7_elec_idle_o     => pipe_rx7_elec_idle     ,
3339
      pipe_rx7_polarity_o      => pipe_rx7_polarity_gt   ,
3340
      pipe_tx7_compliance_o    => pipe_tx7_compliance_gt ,
3341
      pipe_tx7_char_is_k_o     => pipe_tx7_char_is_k_gt  ,
3342
      pipe_tx7_data_o          => pipe_tx7_data_gt       ,
3343
      pipe_tx7_elec_idle_o     => pipe_tx7_elec_idle_gt  ,
3344
      pipe_tx7_powerdown_o     => pipe_tx7_powerdown_gt  ,
3345
 
3346
      -- Non PIPE signals
3347
      pipe_clk                 => pipe_clk               ,
3348
      rst_n                    => phy_rdy_n              ,
3349
      pl_ltssm_state           => pl_ltssm_state_int
3350
    );
3351
 
3352
 
3353
 
3354
end pcie_7x;
3355
 

powered by: WebSVN 2.1.0

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