1 |
2 |
dsmv |
//-----------------------------------------------------------------------------
|
2 |
|
|
//
|
3 |
|
|
// (c) Copyright 2009-2010 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 : V5-Block Plus for PCI Express
|
51 |
|
|
// File : pcie_ep.v
|
52 |
|
|
//--------------------------------------------------------------------------------
|
53 |
|
|
//--------------------------------------------------------------------------------
|
54 |
|
|
//--
|
55 |
|
|
//-- Description: PCIe Endpoint Wrapper
|
56 |
|
|
//--
|
57 |
|
|
//--
|
58 |
|
|
//--
|
59 |
|
|
//--------------------------------------------------------------------------------
|
60 |
|
|
|
61 |
|
|
`timescale 1 ns/1 ns
|
62 |
|
|
|
63 |
|
|
`define BAR_MASK_WIDTH_CALC(BAR) BAR[63] ? (6'h3f) : \
|
64 |
|
|
BAR[62] ? (6'h3e) : \
|
65 |
|
|
BAR[61] ? (6'h3d) : \
|
66 |
|
|
BAR[60] ? (6'h3c) : \
|
67 |
|
|
BAR[59] ? (6'h3b) : \
|
68 |
|
|
BAR[58] ? (6'h3a) : \
|
69 |
|
|
BAR[57] ? (6'h39) : \
|
70 |
|
|
BAR[56] ? (6'h38) : \
|
71 |
|
|
BAR[55] ? (6'h37) : \
|
72 |
|
|
BAR[54] ? (6'h36) : \
|
73 |
|
|
BAR[53] ? (6'h35) : \
|
74 |
|
|
BAR[52] ? (6'h34) : \
|
75 |
|
|
BAR[51] ? (6'h33) : \
|
76 |
|
|
BAR[50] ? (6'h32) : \
|
77 |
|
|
BAR[49] ? (6'h31) : \
|
78 |
|
|
BAR[48] ? (6'h30) : \
|
79 |
|
|
BAR[47] ? (6'h2f) : \
|
80 |
|
|
BAR[46] ? (6'h2e) : \
|
81 |
|
|
BAR[45] ? (6'h2d) : \
|
82 |
|
|
BAR[44] ? (6'h2c) : \
|
83 |
|
|
BAR[43] ? (6'h2b) : \
|
84 |
|
|
BAR[42] ? (6'h2a) : \
|
85 |
|
|
BAR[41] ? (6'h29) : \
|
86 |
|
|
BAR[40] ? (6'h28) : \
|
87 |
|
|
BAR[39] ? (6'h27) : \
|
88 |
|
|
BAR[38] ? (6'h26) : \
|
89 |
|
|
BAR[37] ? (6'h25) : \
|
90 |
|
|
BAR[36] ? (6'h24) : \
|
91 |
|
|
BAR[35] ? (6'h23) : \
|
92 |
|
|
BAR[34] ? (6'h22) : \
|
93 |
|
|
BAR[33] ? (6'h21) : \
|
94 |
|
|
BAR[32] ? (6'h20) : \
|
95 |
|
|
BAR[31] ? (6'h1f) : \
|
96 |
|
|
BAR[30] ? (6'h1e) : \
|
97 |
|
|
BAR[29] ? (6'h1d) : \
|
98 |
|
|
BAR[28] ? (6'h1c) : \
|
99 |
|
|
BAR[27] ? (6'h1b) : \
|
100 |
|
|
BAR[26] ? (6'h1a) : \
|
101 |
|
|
BAR[25] ? (6'h19) : \
|
102 |
|
|
BAR[24] ? (6'h18) : \
|
103 |
|
|
BAR[23] ? (6'h17) : \
|
104 |
|
|
BAR[22] ? (6'h16) : \
|
105 |
|
|
BAR[21] ? (6'h15) : \
|
106 |
|
|
BAR[20] ? (6'h14) : \
|
107 |
|
|
BAR[19] ? (6'h13) : \
|
108 |
|
|
BAR[18] ? (6'h12) : \
|
109 |
|
|
BAR[17] ? (6'h11) : \
|
110 |
|
|
BAR[16] ? (6'h10) : \
|
111 |
|
|
BAR[15] ? (6'h0f) : \
|
112 |
|
|
BAR[14] ? (6'h0e) : \
|
113 |
|
|
BAR[13] ? (6'h0d) : \
|
114 |
|
|
BAR[12] ? (6'h0c) : \
|
115 |
|
|
BAR[11] ? (6'h0b) : \
|
116 |
|
|
BAR[10] ? (6'h0a) : \
|
117 |
|
|
BAR[9] ? (6'h09) : \
|
118 |
|
|
BAR[8] ? (6'h08) : \
|
119 |
|
|
BAR[7] ? (6'h07) : \
|
120 |
|
|
BAR[6] ? (6'h06) : \
|
121 |
|
|
BAR[5] ? (6'h05) : (6'h04)
|
122 |
|
|
module pcie_ep_top #
|
123 |
|
|
(
|
124 |
|
|
parameter G_USER_RESETS = 0,
|
125 |
|
|
parameter G_SIM = 0, // This is for simulation (1) or not (0)
|
126 |
|
|
parameter G_CHIPSCOPE = 0, // Use Chipscope (1) or not (0)
|
127 |
|
|
|
128 |
|
|
parameter INTF_CLK_FREQ = 0, // interface clock frequency (0=62.5, 1=100, 2=250)
|
129 |
|
|
parameter REF_CLK_FREQ = 1, // reference clock frequency (0=100, 1=250)
|
130 |
|
|
parameter USE_V5FXT = 0, // V5FXT Product (0=V5LXT/V5SXT, 1=V5FXT)
|
131 |
|
|
|
132 |
|
|
parameter VEN_ID = 16'h10ee, // vendor id cfg[ 15: 0]
|
133 |
|
|
parameter DEV_ID = 16'h0007, // device id cfg[ 31: 16]
|
134 |
|
|
parameter REV_ID = 8'h00, // revision id cfg[ 39: 32]
|
135 |
|
|
parameter CLASS_CODE = 24'h00_00_00, // class code cfg[ 63: 40]
|
136 |
|
|
parameter BAR0 = 32'hffff_0001, // base address cfg[ 95: 64]
|
137 |
|
|
parameter BAR1 = 32'hffff_0000, // base address cfg[127: 96]
|
138 |
|
|
parameter BAR2 = 32'hffff_0004, // base address cfg[159:128]
|
139 |
|
|
parameter BAR3 = 32'hffff_ffff, // base address cfg[191:160]
|
140 |
|
|
parameter BAR4 = 32'h0000_0000, // base address cfg[223:192]
|
141 |
|
|
parameter BAR5 = 32'h0000_0000, // base address cfg[255:224]
|
142 |
|
|
parameter CARDBUS_CIS_PTR = 32'h0000_0000, // cardbus cis pointer cfg[287:256]
|
143 |
|
|
parameter SUBSYS_VEN_ID = 16'h10ee, // subsystem vendor id cfg[303:288]
|
144 |
|
|
parameter SUBSYS_ID = 16'h0007, // subsystem id cfg[319:304]
|
145 |
|
|
parameter XROM_BAR = 32'hfff0_0001, // expansion rom bar cfg[351:320]
|
146 |
|
|
|
147 |
|
|
// Express Capabilities (byte offset 03H-02H), cfg[367:352]
|
148 |
|
|
parameter INTR_MSG_NUM = 5'b00000, // Interrupt Msg No. cfg[365:361]
|
149 |
|
|
parameter SLT_IMPL = 1'b0, // Slot Implemented cfg[360:360]
|
150 |
|
|
parameter DEV_PORT_TYPE = 4'b0000, // Dev/Port Type cfg[359:356]
|
151 |
|
|
parameter CAP_VER = 4'b0001, // Capability Version cfg[355:352]
|
152 |
|
|
|
153 |
|
|
// Express Device Capabilities (byte offset 07H-04H), cfg[399:368]
|
154 |
|
|
parameter CAPT_SLT_PWR_LIM_SC = 2'b00, // Capt Slt Pwr Lim Sc cfg[395:394]
|
155 |
|
|
parameter CAPT_SLT_PWR_LIM_VA = 8'h00, // Capt Slt Pwr Lim Va cfg[393:386]
|
156 |
|
|
parameter PWR_INDI_PRSNT = 1'b0, // Power Indi Prsnt cfg[382:382]
|
157 |
|
|
parameter ATTN_INDI_PRSNT = 1'b0, // Attn Indi Prsnt cfg[381:381]
|
158 |
|
|
parameter ATTN_BUTN_PRSNT = 1'b0, // Attn Butn Prsnt cfg[380:380]
|
159 |
|
|
parameter EP_L1_ACCPT_LAT = 3'b111, // EP L1 Accpt Lat cfg[379:377]
|
160 |
|
|
parameter EP_L0s_ACCPT_LAT = 3'b111, // EP L0s Accpt Lat cfg[376:374]
|
161 |
|
|
parameter EXT_TAG_FLD_SUP = 1'b0, // Ext Tag Fld Sup cfg[373:373]
|
162 |
|
|
parameter PHANTM_FUNC_SUP = 2'b00, // Phantm Func Sup cfg[372:371]
|
163 |
|
|
parameter MPS = 3'b101, // Max Payload Size cfg[370:368]
|
164 |
|
|
|
165 |
|
|
// Express Link Capabilities (byte offset 00H && 0CH-0FH), cfg[431:400]
|
166 |
|
|
parameter L1_EXIT_LAT = 3'b111, // L1 Exit Lat cfg[417:415]
|
167 |
|
|
parameter L0s_EXIT_LAT = 3'b111, // L0s Exit Lat cfg[414:412]
|
168 |
|
|
parameter ASPM_SUP = 2'b01, // ASPM Supported cfg[411:410]
|
169 |
|
|
parameter MAX_LNK_WDT = 6'b000001, // Max Link Width cfg[409:404]
|
170 |
|
|
parameter MAX_LNK_SPD = 4'b0001, // Max Link Speed cfg[403:400]
|
171 |
|
|
|
172 |
|
|
parameter TRM_TLP_DGST_ECRC = 1'b0, // Trim ECRC cfg[508]
|
173 |
|
|
parameter FRCE_NOSCRMBL = 1'b0, // Force No Scrambling cfg[510]
|
174 |
|
|
parameter INFINITECOMPLETIONS = "TRUE", // Completion credits are infinite
|
175 |
|
|
parameter VC0_CREDITS_PH = 8, // Num Posted Headers
|
176 |
|
|
parameter VC0_CREDITS_NPH = 8, // Num Non-Posted Headers
|
177 |
|
|
parameter CPL_STREAMING_PRIORITIZE_P_NP = 0,// arb priority to P/NP during cpl stream
|
178 |
|
|
|
179 |
|
|
parameter SLOT_CLOCK_CONFIG = "FALSE",
|
180 |
|
|
|
181 |
|
|
parameter C_CALENDAR_LEN = (DEV_PORT_TYPE==4'b0000)? 16: 15,
|
182 |
|
|
// RSt Tc RSt TP1 RSt Tc RSt TC1 RSt TP2 RSt Tc Rst TC2 RSt F
|
183 |
|
|
parameter C_CALENDAR_SEQ = (DEV_PORT_TYPE==4'b0000)? 128'h68__08__68__2C__68__08__68__34__68__0C__68__08__68__14__68__FF:
|
184 |
|
|
// RSt Tc TP1 RSt TN1 Tc RSt TC1 TP2 RSt TN2 Tc RSt TC2 X
|
185 |
|
|
120'h68__08__2C__68__30__08__68__34__0C__68__10__08__68__14__FF,
|
186 |
|
|
parameter C_CALENDAR_SUB_LEN = 12,
|
187 |
|
|
// PHal PHco NPHal NPHco PDal PDco PHli NPHli CHli PDli PHli CDli
|
188 |
|
|
parameter C_CALENDAR_SUB_SEQ = 96'h40____60____44____64____4C____6C____20____24____28____2C____30____34,
|
189 |
|
|
parameter TX_DATACREDIT_FIX_EN = 1,
|
190 |
|
|
parameter TX_DATACREDIT_FIX_1DWONLY= 1,
|
191 |
|
|
parameter TX_DATACREDIT_FIX_MARGIN = 6,
|
192 |
|
|
parameter TX_CPL_STALL_THRESHOLD = 6,
|
193 |
|
|
|
194 |
|
|
// PM CAP REGISTER (byte offset 03-02H), cfg[527:512]
|
195 |
|
|
parameter PME_SUP = 5'b01111, // PME Support cfg[527:523]
|
196 |
|
|
parameter D2_SUP = 1'b1, // D2 Support cfg[522:522]
|
197 |
|
|
parameter D1_SUP = 1'b1, // D1 Support cfg[521:521]
|
198 |
|
|
parameter AUX_CT = 3'b000, // AUX Current cfg[520:518]
|
199 |
|
|
parameter DSI = 1'b0, // Dev Specific Initialisation cfg[517:517]
|
200 |
|
|
parameter PME_CLK = 1'b0, // PME Clock cfg[515:515]
|
201 |
|
|
parameter PM_CAP_VER = 3'b010, // Version cfg[514:512]
|
202 |
|
|
|
203 |
|
|
parameter MSI_VECTOR = 3'b000, // MSI Vector Capability
|
204 |
|
|
parameter MSI_8BIT_EN = 1'b0, // Enable 8-bit MSI Vectors
|
205 |
|
|
parameter PWR_CON_D0_STATE = 8'h1E, // Power consumed in D0 state cfg[535:528]
|
206 |
|
|
parameter CON_SCL_FCTR_D0_STATE = 8'h01, // Scale Factor for power consumed in D0 state cfg[543:536]
|
207 |
|
|
parameter PWR_CON_D1_STATE = 8'h1E, // Power consumed in D1 state cfg[551:544]
|
208 |
|
|
parameter CON_SCL_FCTR_D1_STATE = 8'h01, // Scale Factor for power consumed in D1 state cfg[559:552]
|
209 |
|
|
parameter PWR_CON_D2_STATE = 8'h1E, // Power consumed in D2 state cfg[567:560]
|
210 |
|
|
parameter CON_SCL_FCTR_D2_STATE = 8'h01, // Scale Factor for power consumed in D2 state cfg[575:568]
|
211 |
|
|
parameter PWR_CON_D3_STATE = 8'h1E, // Power consumed in D3 state cfg[583:576]
|
212 |
|
|
parameter CON_SCL_FCTR_D3_STATE = 8'h01, // Scale Factor for power consumed in D3 state cfg[591:584]
|
213 |
|
|
|
214 |
|
|
parameter PWR_DIS_D0_STATE = 8'h1E, // Power dissipated in D0 state cfg[599:592]
|
215 |
|
|
parameter DIS_SCL_FCTR_D0_STATE = 8'h01, // Scale Factor for power dissipated in D0 state cfg[607:600]
|
216 |
|
|
parameter PWR_DIS_D1_STATE = 8'h1E, // Power dissipated in D1 state cfg[615:608]
|
217 |
|
|
parameter DIS_SCL_FCTR_D1_STATE = 8'h01, // Scale Factor for power dissipated in D1 state cfg[623:616]
|
218 |
|
|
parameter PWR_DIS_D2_STATE = 8'h1E, // Power dissipated in D2 state cfg[631:624]
|
219 |
|
|
parameter DIS_SCL_FCTR_D2_STATE = 8'h01, // Scale Factor for power dissipated in D2 state cfg[639:632]
|
220 |
|
|
parameter PWR_DIS_D3_STATE = 8'h1E, // Power dissipated in D3 state cfg[647:640]
|
221 |
|
|
parameter DIS_SCL_FCTR_D3_STATE = 8'h01, // Scale Factor for power dissipated in D3 state cfg[655:648]
|
222 |
|
|
parameter TXDIFFBOOST = "FALSE",
|
223 |
|
|
parameter GTDEBUGPORTS = 0
|
224 |
|
|
|
225 |
|
|
)
|
226 |
|
|
|
227 |
|
|
(
|
228 |
|
|
// System Interface
|
229 |
|
|
|
230 |
|
|
input wire sys_clk,
|
231 |
|
|
input wire sys_reset_n,
|
232 |
|
|
|
233 |
|
|
// PCIe Interface
|
234 |
|
|
|
235 |
|
|
input wire [MAX_LNK_WDT - 1: 0] pci_exp_rxn,
|
236 |
|
|
input wire [MAX_LNK_WDT - 1: 0] pci_exp_rxp,
|
237 |
|
|
output wire [MAX_LNK_WDT - 1: 0] pci_exp_txn,
|
238 |
|
|
output wire [MAX_LNK_WDT - 1: 0] pci_exp_txp,
|
239 |
|
|
|
240 |
|
|
// Configuration Interface
|
241 |
|
|
|
242 |
|
|
output [31:0] cfg_do,
|
243 |
|
|
input wire [31:0] cfg_di,
|
244 |
|
|
input wire [3:0] cfg_byte_en_n,
|
245 |
|
|
input wire [9:0] cfg_dwaddr,
|
246 |
|
|
output cfg_rd_wr_done_n,
|
247 |
|
|
input wire cfg_wr_en_n,
|
248 |
|
|
input wire cfg_rd_en_n,
|
249 |
|
|
input wire cfg_err_cor_n,
|
250 |
|
|
input wire cfg_err_ur_n,
|
251 |
|
|
input wire cfg_err_ecrc_n,
|
252 |
|
|
input wire cfg_err_cpl_timeout_n,
|
253 |
|
|
input wire cfg_err_cpl_abort_n,
|
254 |
|
|
input wire cfg_err_cpl_unexpect_n,
|
255 |
|
|
input wire cfg_err_posted_n,
|
256 |
|
|
input wire cfg_err_locked_n,
|
257 |
|
|
input wire cfg_interrupt_n,
|
258 |
|
|
output cfg_interrupt_rdy_n,
|
259 |
|
|
input wire cfg_interrupt_assert_n,
|
260 |
|
|
input [7:0] cfg_interrupt_di,
|
261 |
|
|
output [7:0] cfg_interrupt_do,
|
262 |
|
|
output [2:0] cfg_interrupt_mmenable,
|
263 |
|
|
output cfg_interrupt_msienable,
|
264 |
|
|
input wire cfg_turnoff_ok_n,
|
265 |
|
|
output cfg_to_turnoff_n,
|
266 |
|
|
input wire cfg_pm_wake_n,
|
267 |
|
|
input wire [47:0] cfg_err_tlp_cpl_header,
|
268 |
|
|
output cfg_err_cpl_rdy_n,
|
269 |
|
|
input [63:0] cfg_dsn,
|
270 |
|
|
input wire cfg_trn_pending_n,
|
271 |
|
|
output [15:0] cfg_status,
|
272 |
|
|
output [15:0] cfg_command,
|
273 |
|
|
output [15:0] cfg_dstatus,
|
274 |
|
|
output [15:0] cfg_dcommand,
|
275 |
|
|
output [15:0] cfg_lstatus,
|
276 |
|
|
output [15:0] cfg_lcommand,
|
277 |
|
|
output [7:0] cfg_bus_number,
|
278 |
|
|
output [4:0] cfg_device_number,
|
279 |
|
|
output [2:0] cfg_function_number,
|
280 |
|
|
output [2:0] cfg_pcie_link_state_n,
|
281 |
|
|
|
282 |
|
|
// Transaction Tx Interface
|
283 |
|
|
|
284 |
|
|
input wire [63:0] trn_td,
|
285 |
|
|
input wire [7:0] trn_trem_n,
|
286 |
|
|
input wire trn_tsof_n,
|
287 |
|
|
input trn_teof_n,
|
288 |
|
|
input trn_tsrc_rdy_n,
|
289 |
|
|
input trn_tsrc_dsc_n,
|
290 |
|
|
input trn_terrfwd_n,
|
291 |
|
|
|
292 |
|
|
output trn_tdst_rdy_n,
|
293 |
|
|
output trn_tdst_dsc_n,
|
294 |
|
|
output [3:0] trn_tbuf_av,
|
295 |
|
|
|
296 |
|
|
`ifdef PFC_CISCO_DEBUG
|
297 |
|
|
output [7:0] trn_pfc_nph_cl,
|
298 |
|
|
output [11:0] trn_pfc_npd_cl,
|
299 |
|
|
output [7:0] trn_pfc_ph_cl,
|
300 |
|
|
output [11:0] trn_pfc_pd_cl,
|
301 |
|
|
output [7:0] trn_pfc_cplh_cl,
|
302 |
|
|
output [11:0] trn_pfc_cpld_cl,
|
303 |
|
|
`endif
|
304 |
|
|
|
305 |
|
|
// Transaction Rx Interface
|
306 |
|
|
|
307 |
|
|
input wire trn_rnp_ok_n,
|
308 |
|
|
input wire trn_rdst_rdy_n,
|
309 |
|
|
|
310 |
|
|
output [63:0] trn_rd,
|
311 |
|
|
output [7:0] trn_rrem_n,
|
312 |
|
|
output trn_rsof_n,
|
313 |
|
|
output trn_reof_n,
|
314 |
|
|
output trn_rsrc_rdy_n,
|
315 |
|
|
output trn_rsrc_dsc_n,
|
316 |
|
|
output trn_rerrfwd_n,
|
317 |
|
|
output [6:0] trn_rbar_hit_n,
|
318 |
|
|
output [7:0] trn_rfc_nph_av,
|
319 |
|
|
output [11:0] trn_rfc_npd_av,
|
320 |
|
|
output [7:0] trn_rfc_ph_av,
|
321 |
|
|
output [11:0] trn_rfc_pd_av,
|
322 |
|
|
output [7:0] trn_rfc_cplh_av,
|
323 |
|
|
output [11:0] trn_rfc_cpld_av,
|
324 |
|
|
input trn_rcpl_streaming_n,
|
325 |
|
|
|
326 |
|
|
`ifdef GTP_DEBUG
|
327 |
|
|
//Debugging Ports
|
328 |
|
|
output GTPCLK_bufg,
|
329 |
|
|
output REFCLK_OUT_bufg,
|
330 |
|
|
output LINK_UP,
|
331 |
|
|
output clock_lock,
|
332 |
|
|
output pll_lock,
|
333 |
|
|
output core_clk,
|
334 |
|
|
output user_clk,
|
335 |
|
|
`endif
|
336 |
|
|
|
337 |
|
|
output refclkout,
|
338 |
|
|
|
339 |
|
|
input gt_dclk,
|
340 |
|
|
input [MAX_LNK_WDT*7-1:0] gt_daddr,
|
341 |
|
|
input [MAX_LNK_WDT-1:0] gt_den,
|
342 |
|
|
input [MAX_LNK_WDT-1:0] gt_dwen,
|
343 |
|
|
input [MAX_LNK_WDT*16-1:0] gt_di,
|
344 |
|
|
output [MAX_LNK_WDT*16-1:0] gt_do,
|
345 |
|
|
output [MAX_LNK_WDT-1:0] gt_drdy,
|
346 |
|
|
|
347 |
|
|
input [2:0] gt_txdiffctrl_0,
|
348 |
|
|
input [2:0] gt_txdiffctrl_1,
|
349 |
|
|
input [2:0] gt_txbuffctrl_0,
|
350 |
|
|
input [2:0] gt_txbuffctrl_1,
|
351 |
|
|
input [2:0] gt_txpreemphesis_0,
|
352 |
|
|
input [2:0] gt_txpreemphesis_1,
|
353 |
|
|
|
354 |
|
|
// Transaction Common Interface
|
355 |
|
|
output trn_clk,
|
356 |
|
|
output trn_reset_n,
|
357 |
|
|
output trn_lnk_up_n,
|
358 |
|
|
input fast_train_simulation_only
|
359 |
|
|
|
360 |
|
|
);
|
361 |
|
|
|
362 |
|
|
// Reset wire
|
363 |
|
|
wire fe_fundamental_reset_n;
|
364 |
|
|
|
365 |
|
|
// Inputs to the pcie core
|
366 |
|
|
|
367 |
|
|
wire fe_compliance_avoid = 1'b0;
|
368 |
|
|
wire fe_l0_cfg_loopback_master = 1'b0;
|
369 |
|
|
wire fe_l0_transactions_pending;
|
370 |
|
|
wire fe_l0_set_completer_abort_error = 1'b0;
|
371 |
|
|
wire fe_l0_set_detected_corr_error;
|
372 |
|
|
wire fe_l0_set_detected_fatal_error;
|
373 |
|
|
wire fe_l0_set_detected_nonfatal_error;
|
374 |
|
|
wire fe_l0_set_link_detected_parity_error = 1'b0;
|
375 |
|
|
wire fe_l0_set_link_master_data_parity = 1'b0;
|
376 |
|
|
wire fe_l0_set_link_received_master_abort = 1'b0;
|
377 |
|
|
wire fe_l0_set_link_received_target_abort = 1'b0;
|
378 |
|
|
wire fe_l0_set_link_system_error = 1'b0;
|
379 |
|
|
wire fe_l0_set_link_signalled_target_abort = 1'b0;
|
380 |
|
|
wire fe_l0_set_user_detected_parity_error;
|
381 |
|
|
wire fe_l0_set_user_master_data_parity;
|
382 |
|
|
wire fe_l0_set_user_received_master_abort;
|
383 |
|
|
wire fe_l0_set_user_received_target_abort;
|
384 |
|
|
wire fe_l0_set_user_system_error;
|
385 |
|
|
wire fe_l0_set_user_signalled_target_abort;
|
386 |
|
|
wire fe_l0_set_unexpected_completion_uncorr_error = 1'b0;
|
387 |
|
|
wire fe_l0_set_unexpected_completion_corr_error = 1'b0;
|
388 |
|
|
wire fe_l0_set_unsupported_request_nonposted_error = 1'b0;
|
389 |
|
|
wire fe_l0_set_unsupported_request_other_error;
|
390 |
|
|
wire [127:0] fe_l0_packet_header_from_user = 128'b0;
|
391 |
|
|
|
392 |
|
|
|
393 |
|
|
wire fe_main_power = 1'b1;
|
394 |
|
|
|
395 |
|
|
wire fe_l0_set_completion_timeout_uncorr_error = 1'b0;
|
396 |
|
|
wire fe_l0_set_completion_timeout_corr_error = 1'b0;
|
397 |
|
|
|
398 |
|
|
wire [3:0] fe_l0_msi_request0; // = 4'h0;
|
399 |
|
|
wire fe_l0_legacy_int_funct0; // = 1'b0;
|
400 |
|
|
|
401 |
|
|
wire [10:0] mgmt_addr;
|
402 |
|
|
wire mgmt_rden;
|
403 |
|
|
|
404 |
|
|
// Outputs from the pcie core
|
405 |
|
|
|
406 |
|
|
|
407 |
|
|
wire [12:0] fe_l0_completer_id;
|
408 |
|
|
wire [2:0] maxp;
|
409 |
|
|
wire fe_l0_rx_dll_tlp_ecrc_ok;
|
410 |
|
|
wire fe_l0_dll_tx_pm_dllp_outstanding;
|
411 |
|
|
wire fe_l0_first_cfg_write_occurred;
|
412 |
|
|
wire fe_l0_cfg_loopback_ack;
|
413 |
|
|
wire fe_l0_mac_upstream_downstream;
|
414 |
|
|
wire [1:0] fe_l0_rx_mac_link_error;
|
415 |
|
|
wire [1:0] fe_l0_rx_mac_link_error_ext;
|
416 |
|
|
wire fe_l0_mac_link_up;
|
417 |
|
|
wire [3:0] fe_l0_mac_negotiated_link_width;
|
418 |
|
|
wire fe_l0_mac_link_training;
|
419 |
|
|
wire [3:0] fe_l0_ltssm_state;
|
420 |
|
|
wire [7:0] fe_l0_dll_vc_status;
|
421 |
|
|
wire [7:0] fe_l0_dl_up_down;
|
422 |
|
|
wire [6:0] fe_l0_dll_error_vector;
|
423 |
|
|
wire [6:0] fe_l0_dll_error_vector_ext;
|
424 |
|
|
wire [1:0] fe_l0_dll_as_rx_state;
|
425 |
|
|
wire fe_l0_dll_as_tx_state;
|
426 |
|
|
wire fe_l0_as_autonomous_init_completed;
|
427 |
|
|
|
428 |
|
|
wire fe_l0_unlock_received;
|
429 |
|
|
wire fe_l0_corr_err_msg_rcvd;
|
430 |
|
|
wire fe_l0_fatal_err_msg_rcvd;
|
431 |
|
|
wire fe_l0_nonfatal_err_msg_rcvd;
|
432 |
|
|
wire [15:0] fe_l0_err_msg_req_id;
|
433 |
|
|
wire fe_l0_fwd_corr_err_out;
|
434 |
|
|
wire fe_l0_fwd_fatal_err_out;
|
435 |
|
|
wire fe_l0_fwd_nonfatal_err_out;
|
436 |
|
|
|
437 |
|
|
wire fe_l0_received_assert_inta_legacy_int;
|
438 |
|
|
wire fe_l0_received_assert_intb_legacy_int;
|
439 |
|
|
wire fe_l0_received_assert_intc_legacy_int;
|
440 |
|
|
wire fe_l0_received_assert_intd_legacy_int;
|
441 |
|
|
wire fe_l0_received_deassert_inta_legacy_int;
|
442 |
|
|
wire fe_l0_received_deassert_intb_legacy_int;
|
443 |
|
|
wire fe_l0_received_deassert_intc_legacy_int;
|
444 |
|
|
wire fe_l0_received_deassert_intd_legacy_int;
|
445 |
|
|
|
446 |
|
|
wire fe_l0_msi_enable0;
|
447 |
|
|
wire [2:0] fe_l0_multi_msg_en0;
|
448 |
|
|
wire fe_l0_stats_dllp_received;
|
449 |
|
|
wire fe_l0_stats_dllp_transmitted;
|
450 |
|
|
wire fe_l0_stats_os_received;
|
451 |
|
|
wire fe_l0_stats_os_transmitted;
|
452 |
|
|
wire fe_l0_stats_tlp_received;
|
453 |
|
|
wire fe_l0_stats_tlp_transmitted;
|
454 |
|
|
wire fe_l0_stats_cfg_received;
|
455 |
|
|
wire fe_l0_stats_cfg_transmitted;
|
456 |
|
|
wire fe_l0_stats_cfg_other_received;
|
457 |
|
|
wire fe_l0_stats_cfg_other_transmitted;
|
458 |
|
|
|
459 |
|
|
wire [1:0] fe_l0_attention_indicator_control;
|
460 |
|
|
wire [1:0] fe_l0_power_indicator_control;
|
461 |
|
|
wire fe_l0_power_controller_control;
|
462 |
|
|
wire fe_l0_toggle_electromechanical_interlock;
|
463 |
|
|
wire fe_l0_rx_beacon;
|
464 |
|
|
wire [1:0] fe_l0_pwr_state0;
|
465 |
|
|
wire fe_l0_pme_req_in;
|
466 |
|
|
wire fe_l0_pme_ack;
|
467 |
|
|
wire fe_l0_pme_req_out;
|
468 |
|
|
wire fe_l0_pme_en;
|
469 |
|
|
wire fe_l0_pwr_inhibit_transfers;
|
470 |
|
|
wire fe_l0_pwr_l1_state;
|
471 |
|
|
wire fe_l0_pwr_l23_ready_device;
|
472 |
|
|
wire fe_l0_pwr_l23_ready_state;
|
473 |
|
|
wire fe_l0_pwr_tx_l0s_state;
|
474 |
|
|
wire fe_l0_pwr_turn_off_req;
|
475 |
|
|
wire fe_l0_rx_dll_pm;
|
476 |
|
|
wire [2:0] fe_l0_rx_dll_pm_type;
|
477 |
|
|
wire fe_l0_tx_dll_pm_updated;
|
478 |
|
|
wire fe_l0_mac_new_state_ack;
|
479 |
|
|
wire fe_l0_mac_rx_l0s_state;
|
480 |
|
|
wire fe_l0_mac_entered_l0;
|
481 |
|
|
wire fe_l0_dll_rx_ack_outstanding;
|
482 |
|
|
wire fe_l0_dll_tx_outstanding;
|
483 |
|
|
wire fe_l0_dll_tx_non_fc_outstanding;
|
484 |
|
|
wire [1:0] fe_l0_rx_dll_tlp_end;
|
485 |
|
|
wire fe_l0_tx_dll_sbfc_updated;
|
486 |
|
|
wire [18:0] fe_l0_rx_dll_sbfc_data;
|
487 |
|
|
wire fe_l0_rx_dll_sbfc_update;
|
488 |
|
|
wire [7:0] fe_l0_tx_dll_fc_npost_byp_updated;
|
489 |
|
|
wire [7:0] fe_l0_tx_dll_fc_post_ord_updated;
|
490 |
|
|
wire [7:0] fe_l0_tx_dll_fc_cmpl_mc_updated;
|
491 |
|
|
wire [19:0] fe_l0_rx_dll_fc_npost_byp_cred;
|
492 |
|
|
wire [7:0] fe_l0_rx_dll_fc_npost_byp_update;
|
493 |
|
|
wire [23:0] fe_l0_rx_dll_fc_post_ord_cred;
|
494 |
|
|
wire [7:0] fe_l0_rx_dll_fc_post_ord_update;
|
495 |
|
|
wire [23:0] fe_l0_rx_dll_fc_cmpl_mc_cred;
|
496 |
|
|
wire [7:0] fe_l0_rx_dll_fc_cmpl_mc_update;
|
497 |
|
|
wire [3:0] fe_l0_uc_byp_found;
|
498 |
|
|
wire [3:0] fe_l0_uc_ord_found;
|
499 |
|
|
wire [2:0] fe_l0_mc_found;
|
500 |
|
|
wire [2:0] fe_l0_transformed_vc;
|
501 |
|
|
|
502 |
|
|
wire [2:0] mem_tx_tc_select;
|
503 |
|
|
wire [1:0] mem_tx_fifo_select;
|
504 |
|
|
wire [1:0] mem_tx_enable;
|
505 |
|
|
wire mem_tx_header;
|
506 |
|
|
wire mem_tx_first;
|
507 |
|
|
wire mem_tx_last;
|
508 |
|
|
|
509 |
|
|
wire mem_tx_discard;
|
510 |
|
|
wire [63:0] mem_tx_data;
|
511 |
|
|
wire mem_tx_complete;
|
512 |
|
|
wire [2:0] mem_rx_tc_select;
|
513 |
|
|
wire [1:0] mem_rx_fifo_select;
|
514 |
|
|
wire mem_rx_request;
|
515 |
|
|
wire [31:0] mem_debug;
|
516 |
|
|
|
517 |
|
|
|
518 |
|
|
wire [7:0] fe_rx_posted_available;
|
519 |
|
|
wire [7:0] fe_rx_non_posted_available;
|
520 |
|
|
wire [7:0] fe_rx_completion_available;
|
521 |
|
|
wire fe_rx_config_available;
|
522 |
|
|
|
523 |
|
|
wire [7:0] fe_rx_posted_partial;
|
524 |
|
|
wire [7:0] fe_rx_non_posted_partial;
|
525 |
|
|
wire [7:0] fe_rx_completion_partial;
|
526 |
|
|
wire fe_rx_config_partial;
|
527 |
|
|
|
528 |
|
|
wire fe_rx_request_end;
|
529 |
|
|
wire [1:0] fe_rx_valid;
|
530 |
|
|
wire fe_rx_header;
|
531 |
|
|
wire fe_rx_first;
|
532 |
|
|
wire fe_rx_last;
|
533 |
|
|
wire fe_rx_discard;
|
534 |
|
|
wire [63:0] fe_rx_data;
|
535 |
|
|
wire [7:0] fe_tc_status;
|
536 |
|
|
|
537 |
|
|
wire [7:0] fe_tx_posted_ready;
|
538 |
|
|
wire [7:0] fe_tx_non_posted_ready;
|
539 |
|
|
wire [7:0] fe_tx_completion_ready;
|
540 |
|
|
wire fe_tx_config_ready;
|
541 |
|
|
wire [7:0] fe_leds_out;
|
542 |
|
|
|
543 |
|
|
wire fe_io_space_enable;
|
544 |
|
|
wire fe_mem_space_enable;
|
545 |
|
|
wire fe_bus_master_enable;
|
546 |
|
|
wire fe_parity_error_response;
|
547 |
|
|
wire fe_serr_enable;
|
548 |
|
|
wire fe_interrupt_disable;
|
549 |
|
|
wire fe_ur_reporting_enable;
|
550 |
|
|
|
551 |
|
|
wire [2:0] fe_max_payload_size;
|
552 |
|
|
wire [2:0] fe_max_read_request_size;
|
553 |
|
|
|
554 |
|
|
wire [31:0] mgmt_rdata;
|
555 |
|
|
wire [31:0] mgmt_wdata;
|
556 |
|
|
wire [3:0] mgmt_bwren;
|
557 |
|
|
wire [16:0] mgmt_pso;
|
558 |
|
|
wire [6:0] mgmt_stats_credit_sel;
|
559 |
|
|
wire [11:0] mgmt_stats_credit;
|
560 |
|
|
|
561 |
|
|
// Local Link Transmit
|
562 |
|
|
|
563 |
|
|
wire [7:0] llk_tc_status;
|
564 |
|
|
wire [63:0] llk_tx_data;
|
565 |
|
|
wire [9:0] llk_tx_chan_space;
|
566 |
|
|
wire [1:0] llk_tx_enable_n;
|
567 |
|
|
wire [2:0] llk_tx_ch_tc;
|
568 |
|
|
wire [1:0] llk_tx_ch_fifo;
|
569 |
|
|
wire [7:0] llk_tx_ch_posted_ready_n;
|
570 |
|
|
wire [7:0] llk_tx_ch_non_posted_ready_n;
|
571 |
|
|
wire [7:0] llk_tx_ch_completion_ready_n;
|
572 |
|
|
wire llk_rx_src_last_req_n;
|
573 |
|
|
wire llk_rx_dst_req_n;
|
574 |
|
|
wire llk_rx_dst_cont_req_n;
|
575 |
|
|
|
576 |
|
|
// Local Link Receive
|
577 |
|
|
|
578 |
|
|
wire [63:0] llk_rx_data;
|
579 |
|
|
wire [1:0] llk_rx_valid_n;
|
580 |
|
|
wire [2:0] llk_rx_ch_tc;
|
581 |
|
|
wire [1:0] llk_rx_ch_fifo;
|
582 |
|
|
wire [15:0] llk_rx_preferred_type;
|
583 |
|
|
wire [7:0] llk_rx_ch_posted_available_n;
|
584 |
|
|
wire [7:0] llk_rx_ch_non_posted_available_n;
|
585 |
|
|
wire [7:0] llk_rx_ch_completion_available_n;
|
586 |
|
|
wire [7:0] llk_rx_ch_posted_partial_n;
|
587 |
|
|
wire [7:0] llk_rx_ch_non_posted_partial_n;
|
588 |
|
|
wire [7:0] llk_rx_ch_completion_partial_n;
|
589 |
|
|
|
590 |
|
|
// Misc wires and regs
|
591 |
|
|
|
592 |
|
|
wire cfg_reset_b;
|
593 |
|
|
wire grestore_b;
|
594 |
|
|
wire gwe_b;
|
595 |
|
|
wire ghigh_b;
|
596 |
|
|
|
597 |
|
|
wire GTPCLK_bufg;
|
598 |
|
|
wire REFCLK_OUT_bufg;
|
599 |
|
|
wire core_clk;
|
600 |
|
|
wire [3:0] PLLLKDET_OUT;
|
601 |
|
|
|
602 |
|
|
wire GTPRESET;
|
603 |
|
|
|
604 |
|
|
wire [24:0] ILA_DATA;
|
605 |
|
|
|
606 |
|
|
wire user_clk;
|
607 |
|
|
|
608 |
|
|
wire GSR;
|
609 |
|
|
|
610 |
|
|
wire clk0;
|
611 |
|
|
wire clkfb;
|
612 |
|
|
wire clkdv;
|
613 |
|
|
wire [15:0] not_connected;
|
614 |
|
|
|
615 |
|
|
wire [7:0] RESETDONE;
|
616 |
|
|
reg app_reset_n = 0;
|
617 |
|
|
reg app_reset_n_flt_reg = 0;
|
618 |
|
|
reg trn_lnk_up_n_reg = 1;
|
619 |
|
|
reg trn_lnk_up_n_flt_reg = 1;
|
620 |
|
|
reg mgt_reset_n_flt_reg = 0;
|
621 |
|
|
wire mgt_reset_n;
|
622 |
|
|
wire mgmt_rst;
|
623 |
|
|
wire clock_lock;
|
624 |
|
|
|
625 |
|
|
`ifdef MANAGEMENT_WRITE
|
626 |
|
|
wire [10:0] bridge_mgmt_addr;
|
627 |
|
|
wire bridge_mgmt_rden;
|
628 |
|
|
wire bridge_mgmt_wren;
|
629 |
|
|
wire [31:0] bridge_mgmt_wdata;
|
630 |
|
|
wire [3:0] bridge_mgmt_bwren;
|
631 |
|
|
|
632 |
|
|
wire trn_rst_n;
|
633 |
|
|
wire mgmt_rdy;
|
634 |
|
|
|
635 |
|
|
wire mgmt_rst_delay_n;
|
636 |
|
|
wire mgmt_reset_delay_n;
|
637 |
|
|
`endif
|
638 |
|
|
|
639 |
|
|
generate
|
640 |
|
|
if (G_SIM == 1) begin : sim_resets
|
641 |
|
|
assign GSR = glbl.GSR;
|
642 |
|
|
end else begin : imp_resets
|
643 |
|
|
assign GSR = 1'b0;
|
644 |
|
|
end
|
645 |
|
|
endgenerate
|
646 |
|
|
|
647 |
|
|
assign fe_fundamental_reset_n = sys_reset_n;
|
648 |
|
|
assign GTPRESET = !sys_reset_n;
|
649 |
|
|
assign mgmt_rst = ~sys_reset_n;
|
650 |
|
|
assign refclkout = REFCLK_OUT_bufg;
|
651 |
|
|
`ifdef MANAGEMENT_WRITE
|
652 |
|
|
assign mgmt_rst_delay_n = mgmt_reset_delay_n;
|
653 |
|
|
`endif
|
654 |
|
|
|
655 |
|
|
wire LINK_UP;
|
656 |
|
|
assign LINK_UP = llk_tc_status[0];
|
657 |
|
|
wire pll_lock;
|
658 |
|
|
assign pll_lock = PLLLKDET_OUT[0];
|
659 |
|
|
|
660 |
|
|
|
661 |
|
|
// Orphaned signals
|
662 |
|
|
wire [338:0] DEBUG;
|
663 |
|
|
wire mgmt_wren;
|
664 |
|
|
|
665 |
|
|
assign llk_rx_src_dsc_n = 1'b1;
|
666 |
|
|
|
667 |
|
|
/*******************************************************
|
668 |
|
|
Convert parameters passed in. Check requirements on
|
669 |
|
|
parameters - strings, integers etc from the
|
670 |
|
|
pcie blk model and convert appropriately.
|
671 |
|
|
********************************************************/
|
672 |
|
|
|
673 |
|
|
// RATIO = 1 if USERCLK = 250 MHz; RATIO = 2 if USERCLK = 125 MHz; RATIO = 4 if USERCLK = 62.5 MHz
|
674 |
|
|
// 0: INTF_CLK_FREQ = 62.5 MHz; 1: INTF_CLK_FREQ = 125 MHz; 2: INTF_CLK_FREQ = 250 MHz
|
675 |
|
|
localparam integer INTF_CLK_RATIO = (MAX_LNK_WDT == 1) ? ((INTF_CLK_FREQ == 1) ? 2 : 4) :
|
676 |
|
|
((MAX_LNK_WDT == 4) ? ((INTF_CLK_FREQ == 1) ? 2 : 1) :
|
677 |
|
|
((INTF_CLK_FREQ == 2) ? 1 : 2));
|
678 |
|
|
|
679 |
|
|
`define INTF_CLK_DIVIDED ((INTF_CLK_RATIO > 1) ? ("TRUE") : ("FALSE"))
|
680 |
|
|
|
681 |
|
|
localparam BAR0_ENABLED = BAR0[2] ? |{BAR1,BAR0} : |BAR0;
|
682 |
|
|
`define BAR0_EXIST ((BAR0_ENABLED) ? ("TRUE") : ("FALSE"))
|
683 |
|
|
localparam BAR0_IO_OR_MEM = BAR0[0];
|
684 |
|
|
localparam BAR0_32_OR_64 = BAR0[2];
|
685 |
|
|
localparam [63:0] BAR0_LOG2_EP = ({(BAR0[2] ? ~{BAR1,BAR0[31:6]} : {32'h0,~BAR0[31:6]}), 6'b111111} + 64'h1);
|
686 |
|
|
localparam [63:0] BAR0_LOG2_LEGACY = ({(BAR0[2] ? ~{BAR1,BAR0[31:4]} : {32'h0,~BAR0[31:4]}), 4'b1111} + 64'h1);
|
687 |
|
|
localparam [63:0] BAR0_LOG2 = (DEV_PORT_TYPE == 4'b0000) ? BAR0_LOG2_EP : BAR0_LOG2_LEGACY;
|
688 |
|
|
localparam [5:0] BAR0_MASKWIDTH = `BAR_MASK_WIDTH_CALC(BAR0_LOG2);
|
689 |
|
|
`define BAR0_PREFETCHABLE ((BAR0[3]) ? ("TRUE") : ("FALSE"))
|
690 |
|
|
|
691 |
|
|
localparam BAR1_ENABLED = BAR0[2] ? 0 : |BAR1;
|
692 |
|
|
`define BAR1_EXIST ((BAR1_ENABLED) ? ("TRUE") : ("FALSE"))
|
693 |
|
|
localparam BAR1_IO_OR_MEM = BAR1[0];
|
694 |
|
|
localparam [63:0] BAR1_LOG2_EP = ({32'h0,~BAR1[31:6], 6'b111111} + 64'h1);
|
695 |
|
|
localparam [63:0] BAR1_LOG2_LEGACY = ({32'h0,~BAR1[31:4], 4'b1111} + 64'h1);
|
696 |
|
|
localparam [63:0] BAR1_LOG2 = (DEV_PORT_TYPE == 4'b0000) ? BAR1_LOG2_EP : BAR1_LOG2_LEGACY;
|
697 |
|
|
localparam [5:0] BAR1_MASKWIDTH = `BAR_MASK_WIDTH_CALC(BAR1_LOG2);
|
698 |
|
|
`define BAR1_PREFETCHABLE ((BAR1[3]) ? ("TRUE") : ("FALSE"))
|
699 |
|
|
|
700 |
|
|
localparam BAR2_ENABLED = BAR2[2] ? |{BAR3,BAR2} : |BAR2;
|
701 |
|
|
`define BAR2_EXIST ((BAR2_ENABLED) ? ("TRUE") : ("FALSE"))
|
702 |
|
|
localparam BAR2_IO_OR_MEM = BAR2[0];
|
703 |
|
|
localparam BAR2_32_OR_64 = BAR2[2];
|
704 |
|
|
localparam [63:0] BAR2_LOG2_EP = ({(BAR2[2] ? ~{BAR3,BAR2[31:6]} : {32'h0,~BAR2[31:6]}), 6'b111111} + 64'h1);
|
705 |
|
|
localparam [63:0] BAR2_LOG2_LEGACY = ({(BAR2[2] ? ~{BAR3,BAR2[31:4]} : {32'h0,~BAR2[31:4]}), 4'b1111} + 64'h1);
|
706 |
|
|
localparam [63:0] BAR2_LOG2 = (DEV_PORT_TYPE == 4'b0000) ? BAR2_LOG2_EP : BAR2_LOG2_LEGACY;
|
707 |
|
|
localparam [5:0] BAR2_MASKWIDTH = `BAR_MASK_WIDTH_CALC(BAR2_LOG2);
|
708 |
|
|
`define BAR2_PREFETCHABLE ((BAR2[3]) ? ("TRUE") : ("FALSE"))
|
709 |
|
|
|
710 |
|
|
localparam BAR3_ENABLED = BAR2[2] ? 0 : |BAR3;
|
711 |
|
|
`define BAR3_EXIST ((BAR3_ENABLED) ? ("TRUE") : ("FALSE"))
|
712 |
|
|
localparam BAR3_IO_OR_MEM = BAR3[0];
|
713 |
|
|
localparam [63:0] BAR3_LOG2_EP = ({32'h0,~BAR3[31:6], 6'b111111} + 64'h1);
|
714 |
|
|
localparam [63:0] BAR3_LOG2_LEGACY = ({32'h0,~BAR3[31:4], 4'b1111} + 64'h1);
|
715 |
|
|
localparam [63:0] BAR3_LOG2 = (DEV_PORT_TYPE == 4'b0000) ? BAR3_LOG2_EP : BAR3_LOG2_LEGACY;
|
716 |
|
|
localparam [5:0] BAR3_MASKWIDTH = `BAR_MASK_WIDTH_CALC(BAR3_LOG2);
|
717 |
|
|
`define BAR3_PREFETCHABLE ((BAR3[3]) ? ("TRUE") : ("FALSE"))
|
718 |
|
|
|
719 |
|
|
localparam BAR4_ENABLED = BAR4[2] ? |{BAR5,BAR4} : |BAR4;
|
720 |
|
|
`define BAR4_EXIST ((BAR4_ENABLED) ? ("TRUE") : ("FALSE"))
|
721 |
|
|
localparam BAR4_IO_OR_MEM = BAR4[0];
|
722 |
|
|
localparam BAR4_32_OR_64 = BAR4[2];
|
723 |
|
|
localparam [63:0] BAR4_LOG2_EP = ({(BAR4[2] ? ~{BAR5,BAR4[31:6]} : {32'h0,~BAR4[31:6]}), 6'b111111} + 64'h1);
|
724 |
|
|
localparam [63:0] BAR4_LOG2_LEGACY = ({(BAR4[2] ? ~{BAR5,BAR4[31:4]} : {32'h0,~BAR4[31:4]}), 4'b1111} + 64'h1);
|
725 |
|
|
localparam [63:0] BAR4_LOG2 = (DEV_PORT_TYPE == 4'b0000) ? BAR4_LOG2_EP : BAR4_LOG2_LEGACY;
|
726 |
|
|
localparam [5:0] BAR4_MASKWIDTH = `BAR_MASK_WIDTH_CALC(BAR4_LOG2);
|
727 |
|
|
`define BAR4_PREFETCHABLE ((BAR4[3]) ? ("TRUE") : ("FALSE"))
|
728 |
|
|
|
729 |
|
|
localparam BAR5_ENABLED = BAR4[2] ? 0 : |BAR5;
|
730 |
|
|
`define BAR5_EXIST ((BAR5_ENABLED) ? ("TRUE") : ("FALSE"))
|
731 |
|
|
localparam BAR5_IO_OR_MEM = BAR5[0];
|
732 |
|
|
localparam [63:0] BAR5_LOG2_EP = ({32'h0,~BAR5[31:6], 6'b111111} + 64'h1);
|
733 |
|
|
localparam [63:0] BAR5_LOG2_LEGACY = ({32'h0,~BAR5[31:4], 4'b1111} + 64'h1);
|
734 |
|
|
localparam [63:0] BAR5_LOG2 = (DEV_PORT_TYPE == 4'b0000) ? BAR5_LOG2_EP : BAR5_LOG2_LEGACY;
|
735 |
|
|
localparam [5:0] BAR5_MASKWIDTH = `BAR_MASK_WIDTH_CALC(BAR5_LOG2);
|
736 |
|
|
`define BAR5_PREFETCHABLE ((BAR5[3]) ? ("TRUE") : ("FALSE"))
|
737 |
|
|
|
738 |
|
|
localparam FEATURE_ENABLE = 1;
|
739 |
|
|
localparam FEATURE_DISABLE = 0;
|
740 |
|
|
|
741 |
|
|
`define DSI_x ((DSI) ? ("TRUE") : ("FALSE"))
|
742 |
|
|
|
743 |
|
|
//* Program the PCIe Block Advertised NFTS
|
744 |
|
|
// ---------------------------------------
|
745 |
|
|
localparam TX_NFTS = 255;
|
746 |
|
|
|
747 |
|
|
//* Program the PCIe Block Retry Buffer Size
|
748 |
|
|
// ----------------------------------------
|
749 |
|
|
// 9 = 4096B Space (1 Retry BRAM)
|
750 |
|
|
localparam RETRY_RAM = 9;
|
751 |
|
|
|
752 |
|
|
//* Program the PCIe Block Reveiver
|
753 |
|
|
// -------------------------------
|
754 |
|
|
// Space for:
|
755 |
|
|
// Posted = 2048 B (4 MPS TLPs)
|
756 |
|
|
// Non-Posted = 192 B (~12 NP TLPs??)
|
757 |
|
|
// Completion = 2048 B (4 MPS TLPs)
|
758 |
|
|
|
759 |
|
|
localparam VC0_RXFIFO_P = 8*(24+256);
|
760 |
|
|
// | | |
|
761 |
|
|
// | | |____PAYLOAD
|
762 |
|
|
// | |________HEADER
|
763 |
|
|
// |________Max. Number of Packets in TX Buffer
|
764 |
|
|
localparam VC0_RXFIFO_NP = 8*24;
|
765 |
|
|
localparam VC0_RXFIFO_CPL = 9*(24+256); //8*(16+256);
|
766 |
|
|
// | | |
|
767 |
|
|
// | | |____PAYLOAD
|
768 |
|
|
// | |________HEADER
|
769 |
|
|
// |________Max. Number of Packets in TX Buffer
|
770 |
|
|
|
771 |
|
|
//* Program the PCIe Block Transmitter
|
772 |
|
|
// -----------------------------------
|
773 |
|
|
// Space for:
|
774 |
|
|
// Posted = 2048 B (4 MPS TLPs)
|
775 |
|
|
// Non-Posted = 192 B (~12 NP TLPs??)
|
776 |
|
|
// Completion = 2048 B (4 MPS TLPs)
|
777 |
|
|
|
778 |
|
|
localparam VC0_TXFIFO_P = 2048;
|
779 |
|
|
localparam VC0_TXFIFO_NP = 192;
|
780 |
|
|
localparam VC0_TXFIFO_CPL = 2048;
|
781 |
|
|
|
782 |
|
|
|
783 |
|
|
pcie_top_wrapper #
|
784 |
|
|
(
|
785 |
|
|
.COMPONENTTYPE(DEV_PORT_TYPE),
|
786 |
|
|
.NO_OF_LANES(MAX_LNK_WDT),
|
787 |
|
|
.G_SIM(G_SIM),
|
788 |
|
|
.REF_CLK_FREQ(REF_CLK_FREQ),
|
789 |
|
|
.USE_V5FXT(USE_V5FXT),
|
790 |
|
|
|
791 |
|
|
.CLKRATIO(INTF_CLK_RATIO),
|
792 |
|
|
.CLKDIVIDED(`INTF_CLK_DIVIDED),
|
793 |
|
|
.G_USER_RESETS(G_USER_RESETS),
|
794 |
|
|
|
795 |
|
|
.VENDORID(VEN_ID),
|
796 |
|
|
.DEVICEID(DEV_ID),
|
797 |
|
|
.REVISIONID(REV_ID),
|
798 |
|
|
.SUBSYSTEMVENDORID(SUBSYS_VEN_ID),
|
799 |
|
|
.SUBSYSTEMID(SUBSYS_ID),
|
800 |
|
|
.CLASSCODE(CLASS_CODE),
|
801 |
|
|
.CARDBUSCISPOINTER(CARDBUS_CIS_PTR),
|
802 |
|
|
.INTERRUPTPIN(1),
|
803 |
|
|
.BAR0EXIST(`BAR0_EXIST),
|
804 |
|
|
.BAR0IOMEMN(BAR0_IO_OR_MEM),
|
805 |
|
|
.BAR064(BAR0_32_OR_64),
|
806 |
|
|
.BAR0PREFETCHABLE(`BAR0_PREFETCHABLE),
|
807 |
|
|
.BAR0MASKWIDTH(BAR0_MASKWIDTH),
|
808 |
|
|
.BAR1EXIST(`BAR1_EXIST),
|
809 |
|
|
.BAR1IOMEMN(BAR1_IO_OR_MEM),
|
810 |
|
|
.BAR1PREFETCHABLE(`BAR1_PREFETCHABLE),
|
811 |
|
|
.BAR1MASKWIDTH(BAR1_MASKWIDTH),
|
812 |
|
|
.BAR2EXIST(`BAR2_EXIST),
|
813 |
|
|
.BAR2IOMEMN(BAR2_IO_OR_MEM),
|
814 |
|
|
.BAR264(BAR2_32_OR_64),
|
815 |
|
|
.BAR2PREFETCHABLE(`BAR2_PREFETCHABLE),
|
816 |
|
|
.BAR2MASKWIDTH(BAR2_MASKWIDTH),
|
817 |
|
|
.BAR3EXIST(`BAR3_EXIST),
|
818 |
|
|
.BAR3IOMEMN(BAR3_IO_OR_MEM),
|
819 |
|
|
.BAR3PREFETCHABLE(`BAR3_PREFETCHABLE),
|
820 |
|
|
.BAR3MASKWIDTH(BAR3_MASKWIDTH),
|
821 |
|
|
.BAR4EXIST(`BAR4_EXIST),
|
822 |
|
|
.BAR4IOMEMN(BAR4_IO_OR_MEM),
|
823 |
|
|
.BAR464(BAR4_32_OR_64),
|
824 |
|
|
.BAR4PREFETCHABLE(`BAR4_PREFETCHABLE),
|
825 |
|
|
.BAR4MASKWIDTH(BAR4_MASKWIDTH),
|
826 |
|
|
.BAR5EXIST(`BAR5_EXIST),
|
827 |
|
|
.BAR5IOMEMN(BAR5_IO_OR_MEM),
|
828 |
|
|
.BAR5PREFETCHABLE(`BAR5_PREFETCHABLE),
|
829 |
|
|
.BAR5MASKWIDTH(BAR5_MASKWIDTH),
|
830 |
|
|
.MAXPAYLOADSIZE(MPS),
|
831 |
|
|
.DEVICECAPABILITYENDPOINTL0SLATENCY(EP_L0s_ACCPT_LAT),
|
832 |
|
|
.DEVICECAPABILITYENDPOINTL1LATENCY(EP_L1_ACCPT_LAT),
|
833 |
|
|
.LINKCAPABILITYASPMSUPPORTEN(ASPM_SUP[1]),
|
834 |
|
|
.L0SEXITLATENCY(L0s_EXIT_LAT),
|
835 |
|
|
.L0SEXITLATENCYCOMCLK(L0s_EXIT_LAT),
|
836 |
|
|
.L1EXITLATENCY(L1_EXIT_LAT),
|
837 |
|
|
.L1EXITLATENCYCOMCLK(L1_EXIT_LAT),
|
838 |
|
|
.MSIENABLE(FEATURE_ENABLE),
|
839 |
|
|
.DSNENABLE(FEATURE_ENABLE),
|
840 |
|
|
.VCENABLE(FEATURE_DISABLE),
|
841 |
|
|
.MSICAPABILITYMULTIMSGCAP(MSI_VECTOR),
|
842 |
|
|
.PMCAPABILITYDSI(`DSI_x),
|
843 |
|
|
.PMCAPABILITYPMESUPPORT(PME_SUP),
|
844 |
|
|
.PORTVCCAPABILITYEXTENDEDVCCOUNT(FEATURE_DISABLE),
|
845 |
|
|
.PORTVCCAPABILITYVCARBCAP(FEATURE_DISABLE),
|
846 |
|
|
.LOWPRIORITYVCCOUNT(FEATURE_DISABLE),
|
847 |
|
|
.DEVICESERIALNUMBER(64'h0000_0000_0000_0000),
|
848 |
|
|
.FORCENOSCRAMBLING(FRCE_NOSCRMBL),
|
849 |
|
|
.INFINITECOMPLETIONS(INFINITECOMPLETIONS),
|
850 |
|
|
.VC0_CREDITS_PH(VC0_CREDITS_PH),
|
851 |
|
|
.VC0_CREDITS_NPH(VC0_CREDITS_NPH),
|
852 |
|
|
.LINKSTATUSSLOTCLOCKCONFIG(SLOT_CLOCK_CONFIG),
|
853 |
|
|
.TXTSNFTS(TX_NFTS),
|
854 |
|
|
.TXTSNFTSCOMCLK(TX_NFTS),
|
855 |
|
|
.RESETMODE("TRUE"),
|
856 |
|
|
.RETRYRAMSIZE(RETRY_RAM),
|
857 |
|
|
.VC0RXFIFOSIZEP(VC0_RXFIFO_P),
|
858 |
|
|
.VC0RXFIFOSIZENP(VC0_RXFIFO_NP),
|
859 |
|
|
.VC0RXFIFOSIZEC(VC0_RXFIFO_CPL),
|
860 |
|
|
.VC1RXFIFOSIZEP(FEATURE_DISABLE),
|
861 |
|
|
.VC1RXFIFOSIZENP(FEATURE_DISABLE),
|
862 |
|
|
.VC1RXFIFOSIZEC(FEATURE_DISABLE),
|
863 |
|
|
.VC0TXFIFOSIZEP(VC0_TXFIFO_P),
|
864 |
|
|
.VC0TXFIFOSIZENP(VC0_TXFIFO_NP),
|
865 |
|
|
.VC0TXFIFOSIZEC(VC0_TXFIFO_CPL),
|
866 |
|
|
.VC1TXFIFOSIZEP(FEATURE_DISABLE),
|
867 |
|
|
.VC1TXFIFOSIZENP(FEATURE_DISABLE),
|
868 |
|
|
.VC1TXFIFOSIZEC(FEATURE_DISABLE),
|
869 |
|
|
.TXDIFFBOOST(TXDIFFBOOST),
|
870 |
|
|
.GTDEBUGPORTS(GTDEBUGPORTS)
|
871 |
|
|
|
872 |
|
|
)
|
873 |
|
|
pcie_blk
|
874 |
|
|
|
875 |
|
|
(
|
876 |
|
|
|
877 |
|
|
.user_reset_n (fe_fundamental_reset_n),
|
878 |
|
|
|
879 |
|
|
.core_clk (core_clk),
|
880 |
|
|
.user_clk (user_clk),
|
881 |
|
|
.clock_lock (clock_lock),
|
882 |
|
|
|
883 |
|
|
.gsr (GSR),
|
884 |
|
|
|
885 |
|
|
.crm_urst_n (fe_fundamental_reset_n),
|
886 |
|
|
.crm_nvrst_n (fe_fundamental_reset_n),
|
887 |
|
|
.crm_mgmt_rst_n (fe_fundamental_reset_n),
|
888 |
|
|
.crm_user_cfg_rst_n (fe_fundamental_reset_n),
|
889 |
|
|
.crm_mac_rst_n (fe_fundamental_reset_n),
|
890 |
|
|
.crm_link_rst_n (fe_fundamental_reset_n),
|
891 |
|
|
|
892 |
|
|
.compliance_avoid (fe_compliance_avoid),
|
893 |
|
|
.l0_cfg_loopback_master (fe_l0_cfg_loopback_master),
|
894 |
|
|
.l0_transactions_pending (fe_l0_transactions_pending),
|
895 |
|
|
|
896 |
|
|
|
897 |
|
|
.l0_set_completer_abort_error (fe_l0_set_completer_abort_error),
|
898 |
|
|
.l0_set_detected_corr_error (fe_l0_set_detected_corr_error),
|
899 |
|
|
.l0_set_detected_fatal_error (fe_l0_set_detected_fatal_error),
|
900 |
|
|
.l0_set_detected_nonfatal_error (fe_l0_set_detected_nonfatal_error),
|
901 |
|
|
.l0_set_user_detected_parity_error (fe_l0_set_user_detected_parity_error),
|
902 |
|
|
.l0_set_user_master_data_parity (fe_l0_set_user_master_data_parity),
|
903 |
|
|
.l0_set_user_received_master_abort (fe_l0_set_user_received_master_abort),
|
904 |
|
|
.l0_set_user_received_target_abort (fe_l0_set_user_received_target_abort),
|
905 |
|
|
.l0_set_user_system_error (fe_l0_set_user_system_error),
|
906 |
|
|
.l0_set_user_signalled_target_abort (fe_l0_set_user_signalled_target_abort),
|
907 |
|
|
.l0_set_completion_timeout_uncorr_error (fe_l0_set_completion_timeout_uncorr_error),
|
908 |
|
|
.l0_set_completion_timeout_corr_error (fe_l0_set_completion_timeout_corr_error),
|
909 |
|
|
.l0_set_unexpected_completion_uncorr_error (fe_l0_set_unexpected_completion_uncorr_error),
|
910 |
|
|
.l0_set_unexpected_completion_corr_error (fe_l0_set_unexpected_completion_corr_error),
|
911 |
|
|
.l0_set_unsupported_request_nonposted_error (fe_l0_set_unsupported_request_nonposted_error),
|
912 |
|
|
.l0_set_unsupported_request_other_error (fe_l0_set_unsupported_request_other_error),
|
913 |
|
|
.l0_legacy_int_funct0 (fe_l0_legacy_int_funct0),
|
914 |
|
|
.l0_msi_request0 (fe_l0_msi_request0),
|
915 |
|
|
|
916 |
|
|
.mgmt_wdata (mgmt_wdata),
|
917 |
|
|
.mgmt_bwren (mgmt_bwren),
|
918 |
|
|
.mgmt_wren (mgmt_wren),
|
919 |
|
|
.mgmt_addr (mgmt_addr),
|
920 |
|
|
.mgmt_rden (mgmt_rden),
|
921 |
|
|
|
922 |
|
|
.mgmt_stats_credit_sel (mgmt_stats_credit_sel),
|
923 |
|
|
|
924 |
|
|
.crm_do_hot_reset_n (),
|
925 |
|
|
.crm_pwr_soft_reset_n (),
|
926 |
|
|
|
927 |
|
|
.mgmt_rdata (mgmt_rdata),
|
928 |
|
|
.mgmt_pso (mgmt_pso),
|
929 |
|
|
.mgmt_stats_credit (mgmt_stats_credit),
|
930 |
|
|
|
931 |
|
|
.l0_first_cfg_write_occurred (fe_l0_first_cfg_write_occurred),
|
932 |
|
|
.l0_cfg_loopback_ack (fe_l0_cfg_loopback_ack),
|
933 |
|
|
.l0_rx_mac_link_error (fe_l0_rx_mac_link_error),
|
934 |
|
|
.l0_mac_link_up (fe_l0_mac_link_up),
|
935 |
|
|
.l0_mac_negotiated_link_width (fe_l0_mac_negotiated_link_width),
|
936 |
|
|
.l0_mac_link_training (fe_l0_mac_link_training),
|
937 |
|
|
.l0_ltssm_state (fe_l0_ltssm_state),
|
938 |
|
|
|
939 |
|
|
.l0_mac_new_state_ack (fe_l0_mac_new_state_ack),
|
940 |
|
|
.l0_mac_rx_l0s_state (fe_l0_mac_rx_l0s_state),
|
941 |
|
|
.l0_mac_entered_l0 (fe_l0_mac_entered_l0),
|
942 |
|
|
|
943 |
|
|
.l0_dl_up_down (fe_l0_dl_up_down),
|
944 |
|
|
.l0_dll_error_vector (fe_l0_dll_error_vector),
|
945 |
|
|
|
946 |
|
|
.l0_completer_id (fe_l0_completer_id),
|
947 |
|
|
|
948 |
|
|
.l0_msi_enable0 (fe_l0_msi_enable0),
|
949 |
|
|
.l0_multi_msg_en0 (fe_l0_multi_msg_en0),
|
950 |
|
|
.l0_stats_dllp_received (fe_l0_stats_dllp_received),
|
951 |
|
|
.l0_stats_dllp_transmitted (fe_l0_stats_dllp_transmitted),
|
952 |
|
|
.l0_stats_os_received (fe_l0_stats_os_received),
|
953 |
|
|
.l0_stats_os_transmitted (fe_l0_stats_os_transmitted),
|
954 |
|
|
.l0_stats_tlp_received (fe_l0_stats_tlp_received),
|
955 |
|
|
.l0_stats_tlp_transmitted (fe_l0_stats_tlp_transmitted),
|
956 |
|
|
.l0_stats_cfg_received (fe_l0_stats_cfg_received),
|
957 |
|
|
.l0_stats_cfg_transmitted (fe_l0_stats_cfg_transmitted),
|
958 |
|
|
.l0_stats_cfg_other_received (fe_l0_stats_cfg_other_received),
|
959 |
|
|
.l0_stats_cfg_other_transmitted (fe_l0_stats_cfg_other_transmitted),
|
960 |
|
|
|
961 |
|
|
.l0_pwr_state0 (fe_l0_pwr_state0),
|
962 |
|
|
.l0_pwr_l23_ready_state (fe_l0_pwr_l23_ready_state),
|
963 |
|
|
.l0_pwr_tx_l0s_state (fe_l0_pwr_tx_l0s_state),
|
964 |
|
|
.l0_pwr_turn_off_req (fe_l0_pwr_turn_off_req),
|
965 |
|
|
.l0_pme_req_in (fe_l0_pme_req_in),
|
966 |
|
|
.l0_pme_ack (fe_l0_pme_ack),
|
967 |
|
|
|
968 |
|
|
|
969 |
|
|
.io_space_enable (fe_io_space_enable),
|
970 |
|
|
.mem_space_enable (fe_mem_space_enable),
|
971 |
|
|
.bus_master_enable (fe_bus_master_enable),
|
972 |
|
|
.parity_error_response (fe_parity_error_response),
|
973 |
|
|
.serr_enable (fe_serr_enable),
|
974 |
|
|
.interrupt_disable (fe_interrupt_disable),
|
975 |
|
|
.ur_reporting_enable (fe_ur_reporting_enable),
|
976 |
|
|
|
977 |
|
|
//Local Link Interface ports
|
978 |
|
|
|
979 |
|
|
// TX ports
|
980 |
|
|
.llk_tx_data (llk_tx_data),
|
981 |
|
|
.llk_tx_src_rdy_n (llk_tx_src_rdy_n),
|
982 |
|
|
.llk_tx_sof_n (llk_tx_sof_n),
|
983 |
|
|
.llk_tx_eof_n (llk_tx_eof_n),
|
984 |
|
|
.llk_tx_sop_n (1'b1),
|
985 |
|
|
.llk_tx_eop_n (1'b1),
|
986 |
|
|
.llk_tx_enable_n (llk_tx_enable_n),
|
987 |
|
|
.llk_tx_ch_tc (llk_tx_ch_tc),
|
988 |
|
|
.llk_tx_ch_fifo (llk_tx_ch_fifo),
|
989 |
|
|
.llk_tx_dst_rdy_n (llk_tx_dst_rdy_n),
|
990 |
|
|
.llk_tx_chan_space (llk_tx_chan_space),
|
991 |
|
|
.llk_tx_ch_posted_ready_n (llk_tx_ch_posted_ready_n),
|
992 |
|
|
.llk_tx_ch_non_posted_ready_n (llk_tx_ch_non_posted_ready_n),
|
993 |
|
|
.llk_tx_ch_completion_ready_n (llk_tx_ch_completion_ready_n),
|
994 |
|
|
|
995 |
|
|
// (07/11) Added for compatibility
|
996 |
|
|
.llk_tx_src_dsc_n(llk_tx_src_dsc_n),
|
997 |
|
|
|
998 |
|
|
//RX Ports
|
999 |
|
|
.llk_rx_dst_req_n (llk_rx_dst_req_n),
|
1000 |
|
|
.llk_rx_dst_cont_req_n (llk_rx_dst_cont_req_n),
|
1001 |
|
|
.llk_rx_ch_tc (llk_rx_ch_tc),
|
1002 |
|
|
.llk_rx_ch_fifo (llk_rx_ch_fifo),
|
1003 |
|
|
.llk_tc_status (llk_tc_status),
|
1004 |
|
|
.llk_rx_data (llk_rx_data),
|
1005 |
|
|
.llk_rx_src_rdy_n (llk_rx_src_rdy_n),
|
1006 |
|
|
.llk_rx_src_last_req_n (llk_rx_src_last_req_n),
|
1007 |
|
|
.llk_rx_sof_n (llk_rx_sof_n),
|
1008 |
|
|
.llk_rx_eof_n (llk_rx_eof_n),
|
1009 |
|
|
.llk_rx_sop_n (),
|
1010 |
|
|
.llk_rx_eop_n (),
|
1011 |
|
|
.llk_rx_valid_n (llk_rx_valid_n),
|
1012 |
|
|
.llk_rx_ch_posted_available_n (llk_rx_ch_posted_available_n),
|
1013 |
|
|
.llk_rx_ch_non_posted_available_n (llk_rx_ch_non_posted_available_n),
|
1014 |
|
|
.llk_rx_ch_completion_available_n (llk_rx_ch_completion_available_n),
|
1015 |
|
|
.llk_rx_preferred_type (llk_rx_preferred_type),
|
1016 |
|
|
|
1017 |
|
|
|
1018 |
|
|
.TXN (pci_exp_txn),
|
1019 |
|
|
.TXP (pci_exp_txp),
|
1020 |
|
|
.RXN (pci_exp_rxn),
|
1021 |
|
|
.RXP (pci_exp_rxp),
|
1022 |
|
|
.GTPCLK_bufg (GTPCLK_bufg),
|
1023 |
|
|
.REFCLKOUT_bufg (REFCLK_OUT_bufg),
|
1024 |
|
|
.PLLLKDET_OUT (PLLLKDET_OUT),
|
1025 |
|
|
.RESETDONE (RESETDONE),
|
1026 |
|
|
.DEBUG (DEBUG),
|
1027 |
|
|
.GTPRESET (GTPRESET),
|
1028 |
|
|
.REFCLK (sys_clk),
|
1029 |
|
|
|
1030 |
|
|
.gt_rx_present (8'b11111111),
|
1031 |
|
|
|
1032 |
|
|
.gt_dclk (gt_dclk),
|
1033 |
|
|
.gt_daddr (gt_daddr),
|
1034 |
|
|
.gt_den (gt_den),
|
1035 |
|
|
.gt_dwen (gt_dwen),
|
1036 |
|
|
.gt_di (gt_di),
|
1037 |
|
|
.gt_do (gt_do),
|
1038 |
|
|
.gt_drdy (gt_drdy),
|
1039 |
|
|
|
1040 |
|
|
.gt_txdiffctrl_0 (gt_txdiffctrl_0),
|
1041 |
|
|
.gt_txdiffctrl_1 (gt_txdiffctrl_1),
|
1042 |
|
|
.gt_txbuffctrl_0 (gt_txbuffctrl_0),
|
1043 |
|
|
.gt_txbuffctrl_1 (gt_txbuffctrl_1),
|
1044 |
|
|
.gt_txpreemphesis_0 (gt_txpreemphesis_0),
|
1045 |
|
|
.gt_txpreemphesis_1 (gt_txpreemphesis_1),
|
1046 |
|
|
.trn_lnk_up_n (trn_lnk_up_n_reg),
|
1047 |
|
|
|
1048 |
|
|
.max_payload_size (fe_max_payload_size),
|
1049 |
|
|
.max_read_request_size (fe_max_read_request_size),
|
1050 |
|
|
`ifdef MANAGEMENT_WRITE
|
1051 |
|
|
.mgmt_reset_delay_n(mgmt_rst_delay_n),
|
1052 |
|
|
.mgmt_rdy(mgmt_rdy),
|
1053 |
|
|
`endif
|
1054 |
|
|
.fast_train_simulation_only(fast_train_simulation_only)
|
1055 |
|
|
);
|
1056 |
|
|
|
1057 |
|
|
assign mgt_reset_n = PLLLKDET_OUT[0] && clock_lock && fe_fundamental_reset_n;
|
1058 |
|
|
|
1059 |
|
|
always @(posedge trn_clk) begin
|
1060 |
|
|
mgt_reset_n_flt_reg <= #1 mgt_reset_n;
|
1061 |
|
|
trn_lnk_up_n_flt_reg <= #1 trn_lnk_up_n;
|
1062 |
|
|
trn_lnk_up_n_reg <= #1 trn_lnk_up_n_flt_reg;
|
1063 |
|
|
app_reset_n_flt_reg <= #1 mgt_reset_n_flt_reg && ~trn_lnk_up_n_reg;
|
1064 |
|
|
app_reset_n <= #1 app_reset_n_flt_reg;
|
1065 |
|
|
end
|
1066 |
|
|
|
1067 |
|
|
`ifdef MANAGEMENT_WRITE
|
1068 |
|
|
assign trn_reset_n = trn_rst_n && mgmt_rdy;
|
1069 |
|
|
|
1070 |
|
|
assign mgmt_addr = ((!trn_lnk_up_n) || (cfg_wr_en_n)) ? {bridge_mgmt_addr[9], 1'b0, bridge_mgmt_addr[8:0]} : {cfg_dwaddr[9], 1'b0, cfg_dwaddr[8:0]};
|
1071 |
|
|
assign mgmt_rden = ((!trn_lnk_up_n) || (cfg_wr_en_n)) ? bridge_mgmt_rden : 1'b1;
|
1072 |
|
|
assign mgmt_wren = ((!trn_lnk_up_n) || (cfg_wr_en_n)) ? bridge_mgmt_wren : (~&cfg_byte_en_n);
|
1073 |
|
|
assign mgmt_wdata = ((!trn_lnk_up_n) || (cfg_wr_en_n)) ? bridge_mgmt_wdata : cfg_di[31:0];
|
1074 |
|
|
assign mgmt_bwren = ((!trn_lnk_up_n) || (cfg_wr_en_n)) ? bridge_mgmt_bwren : (~cfg_byte_en_n);
|
1075 |
|
|
assign mgmt_reset_delay_n = ((!trn_lnk_up_n) || (cfg_wr_en_n)) ? 1'b1 : cfg_wr_en_n;
|
1076 |
|
|
`endif
|
1077 |
|
|
|
1078 |
|
|
//------------------------------------------------------------------------------
|
1079 |
|
|
// PCIe Block Interface
|
1080 |
|
|
//------------------------------------------------------------------------------
|
1081 |
|
|
|
1082 |
|
|
pcie_blk_if #
|
1083 |
|
|
( .BAR0( BAR0 ),
|
1084 |
|
|
.BAR1( BAR1 ),
|
1085 |
|
|
.BAR2( BAR2 ),
|
1086 |
|
|
.BAR3( BAR3 ),
|
1087 |
|
|
.BAR4( BAR4 ),
|
1088 |
|
|
.BAR5( BAR5 ),
|
1089 |
|
|
.XROM_BAR( XROM_BAR ),
|
1090 |
|
|
.MPS( MPS ),
|
1091 |
|
|
.LEGACY_EP( DEV_PORT_TYPE == 4'b0001 ),
|
1092 |
|
|
.TRIM_ECRC( TRM_TLP_DGST_ECRC ),
|
1093 |
|
|
.CPL_STREAMING_PRIORITIZE_P_NP(CPL_STREAMING_PRIORITIZE_P_NP),
|
1094 |
|
|
.C_CALENDAR_LEN (C_CALENDAR_LEN),
|
1095 |
|
|
.C_CALENDAR_SEQ (C_CALENDAR_SEQ),
|
1096 |
|
|
.C_CALENDAR_SUB_LEN (C_CALENDAR_SUB_LEN),
|
1097 |
|
|
.C_CALENDAR_SUB_SEQ (C_CALENDAR_SUB_SEQ),
|
1098 |
|
|
.TX_DATACREDIT_FIX_EN (TX_DATACREDIT_FIX_EN),
|
1099 |
|
|
.TX_DATACREDIT_FIX_1DWONLY (TX_DATACREDIT_FIX_1DWONLY),
|
1100 |
|
|
.TX_DATACREDIT_FIX_MARGIN (TX_DATACREDIT_FIX_MARGIN),
|
1101 |
|
|
.TX_CPL_STALL_THRESHOLD (TX_CPL_STALL_THRESHOLD)
|
1102 |
|
|
|
1103 |
|
|
) pcie_blk_if (
|
1104 |
|
|
|
1105 |
|
|
.mgt_reset_n (mgt_reset_n_flt_reg),
|
1106 |
|
|
|
1107 |
|
|
.clk(user_clk),
|
1108 |
|
|
.rst_n(app_reset_n),
|
1109 |
|
|
|
1110 |
|
|
// PCIe Block Misc Inputs
|
1111 |
|
|
|
1112 |
|
|
.mac_link_up (fe_l0_mac_link_up),
|
1113 |
|
|
.mac_negotiated_link_width (fe_l0_mac_negotiated_link_width),
|
1114 |
|
|
|
1115 |
|
|
// PCIe Block Cfg Interface
|
1116 |
|
|
//-------------------------
|
1117 |
|
|
|
1118 |
|
|
// Inputs
|
1119 |
|
|
|
1120 |
|
|
.io_space_enable (fe_io_space_enable),
|
1121 |
|
|
.mem_space_enable (fe_mem_space_enable),
|
1122 |
|
|
.bus_master_enable (fe_bus_master_enable),
|
1123 |
|
|
.parity_error_response (fe_parity_error_response),
|
1124 |
|
|
.serr_enable (fe_serr_enable),
|
1125 |
|
|
.completer_id (fe_l0_completer_id),
|
1126 |
|
|
.max_read_request_size ( fe_max_read_request_size ),
|
1127 |
|
|
.max_payload_size ( fe_max_payload_size ),
|
1128 |
|
|
.msi_enable (fe_l0_msi_enable0),
|
1129 |
|
|
|
1130 |
|
|
// Outputs
|
1131 |
|
|
|
1132 |
|
|
.legacy_int_request (fe_l0_legacy_int_funct0),
|
1133 |
|
|
.transactions_pending (fe_l0_transactions_pending),
|
1134 |
|
|
|
1135 |
|
|
.msi_request (fe_l0_msi_request0),
|
1136 |
|
|
|
1137 |
|
|
.cfg_interrupt_assert_n(cfg_interrupt_assert_n), // I
|
1138 |
|
|
.cfg_interrupt_di(cfg_interrupt_di), // I[7:0]
|
1139 |
|
|
.cfg_interrupt_mmenable(cfg_interrupt_mmenable),
|
1140 |
|
|
.cfg_interrupt_msienable(cfg_interrupt_msienable), // O
|
1141 |
|
|
.cfg_interrupt_do(cfg_interrupt_do), // O[7:0]
|
1142 |
|
|
.msi_8bit_en(MSI_8BIT_EN), // I
|
1143 |
|
|
|
1144 |
|
|
// PCIe Block Management Interface
|
1145 |
|
|
|
1146 |
|
|
`ifdef MANAGEMENT_WRITE
|
1147 |
|
|
.mgmt_addr ( bridge_mgmt_addr ),
|
1148 |
|
|
.mgmt_wren ( bridge_mgmt_wren ),
|
1149 |
|
|
.mgmt_rden ( bridge_mgmt_rden ),
|
1150 |
|
|
.mgmt_wdata ( bridge_mgmt_wdata ),
|
1151 |
|
|
.mgmt_bwren ( bridge_mgmt_bwren ),
|
1152 |
|
|
`else
|
1153 |
|
|
.mgmt_addr ( mgmt_addr ),
|
1154 |
|
|
.mgmt_wren ( mgmt_wren ),
|
1155 |
|
|
.mgmt_rden ( mgmt_rden ),
|
1156 |
|
|
.mgmt_wdata ( mgmt_wdata ),
|
1157 |
|
|
.mgmt_bwren ( mgmt_bwren ),
|
1158 |
|
|
`endif
|
1159 |
|
|
.mgmt_rdata ( mgmt_rdata ),
|
1160 |
|
|
.mgmt_pso ( mgmt_pso ),
|
1161 |
|
|
.mgmt_stats_credit_sel (mgmt_stats_credit_sel),
|
1162 |
|
|
.mgmt_stats_credit (mgmt_stats_credit),
|
1163 |
|
|
|
1164 |
|
|
// PCIe Soft Macro Cfg Interface
|
1165 |
|
|
//------------------------------
|
1166 |
|
|
|
1167 |
|
|
.cfg_do (cfg_do),
|
1168 |
|
|
.cfg_di (cfg_di),
|
1169 |
|
|
.cfg_dsn (cfg_dsn),
|
1170 |
|
|
.cfg_byte_en_n (cfg_byte_en_n),
|
1171 |
|
|
.cfg_dwaddr ({2'b00, cfg_dwaddr}),
|
1172 |
|
|
.cfg_rd_wr_done_n (cfg_rd_wr_done_n),
|
1173 |
|
|
.cfg_wr_en_n (cfg_wr_en_n),
|
1174 |
|
|
.cfg_rd_en_n (cfg_rd_en_n),
|
1175 |
|
|
.cfg_err_cor_n (cfg_err_cor_n),
|
1176 |
|
|
.cfg_err_ur_n (cfg_err_ur_n),
|
1177 |
|
|
.cfg_err_ecrc_n (cfg_err_ecrc_n),
|
1178 |
|
|
.cfg_err_cpl_timeout_n (cfg_err_cpl_timeout_n),
|
1179 |
|
|
.cfg_err_cpl_abort_n (cfg_err_cpl_abort_n),
|
1180 |
|
|
.cfg_err_cpl_unexpect_n (cfg_err_cpl_unexpect_n),
|
1181 |
|
|
.cfg_err_posted_n (cfg_err_posted_n),
|
1182 |
|
|
.cfg_err_locked_n (cfg_err_locked_n),
|
1183 |
|
|
.cfg_interrupt_n (cfg_interrupt_n),
|
1184 |
|
|
.cfg_interrupt_rdy_n (cfg_interrupt_rdy_n),
|
1185 |
|
|
.cfg_turnoff_ok_n (cfg_turnoff_ok_n),
|
1186 |
|
|
.cfg_to_turnoff_n (cfg_to_turnoff_n),
|
1187 |
|
|
.cfg_pm_wake_n (cfg_pm_wake_n),
|
1188 |
|
|
.cfg_err_tlp_cpl_header (cfg_err_tlp_cpl_header),
|
1189 |
|
|
.cfg_err_cpl_rdy_n (cfg_err_cpl_rdy_n),
|
1190 |
|
|
.cfg_trn_pending_n (cfg_trn_pending_n),
|
1191 |
|
|
.cfg_status (cfg_status),
|
1192 |
|
|
.cfg_command (cfg_command),
|
1193 |
|
|
.cfg_dstatus (cfg_dstatus),
|
1194 |
|
|
.cfg_dcommand (cfg_dcommand),
|
1195 |
|
|
.cfg_lstatus (cfg_lstatus),
|
1196 |
|
|
.cfg_lcommand (cfg_lcommand),
|
1197 |
|
|
.cfg_bus_number (cfg_bus_number),
|
1198 |
|
|
.cfg_device_number (cfg_device_number),
|
1199 |
|
|
.cfg_function_number (cfg_function_number),
|
1200 |
|
|
.cfg_pcie_link_state_n (cfg_pcie_link_state_n),
|
1201 |
|
|
|
1202 |
|
|
// PCIe Block Tx Ports
|
1203 |
|
|
//--------------------
|
1204 |
|
|
|
1205 |
|
|
.llk_tx_data (llk_tx_data),
|
1206 |
|
|
.llk_tx_src_rdy_n (llk_tx_src_rdy_n),
|
1207 |
|
|
.llk_tx_src_dsc_n (llk_tx_src_dsc_n),
|
1208 |
|
|
.llk_tx_sof_n (llk_tx_sof_n),
|
1209 |
|
|
.llk_tx_eof_n (llk_tx_eof_n),
|
1210 |
|
|
.llk_tx_sop_n (llk_tx_sop_n), // O: Unused
|
1211 |
|
|
.llk_tx_eop_n (llk_tx_eop_n), // O: Unused
|
1212 |
|
|
.llk_tx_enable_n (llk_tx_enable_n),
|
1213 |
|
|
.llk_tx_ch_tc (llk_tx_ch_tc),
|
1214 |
|
|
.llk_tx_ch_fifo (llk_tx_ch_fifo),
|
1215 |
|
|
|
1216 |
|
|
.llk_tx_dst_rdy_n (llk_tx_dst_rdy_n),
|
1217 |
|
|
.llk_tx_chan_space (llk_tx_chan_space),
|
1218 |
|
|
.llk_tx_ch_posted_ready_n (llk_tx_ch_posted_ready_n),
|
1219 |
|
|
.llk_tx_ch_non_posted_ready_n (llk_tx_ch_non_posted_ready_n),
|
1220 |
|
|
.llk_tx_ch_completion_ready_n (llk_tx_ch_completion_ready_n),
|
1221 |
|
|
|
1222 |
|
|
// PCIe Block Rx Ports
|
1223 |
|
|
//--------------------
|
1224 |
|
|
|
1225 |
|
|
.llk_rx_dst_req_n (llk_rx_dst_req_n),
|
1226 |
|
|
.llk_rx_dst_cont_req_n(llk_rx_dst_cont_req_n), // O : Unused
|
1227 |
|
|
.llk_rx_ch_tc (llk_rx_ch_tc),
|
1228 |
|
|
.llk_rx_ch_fifo (llk_rx_ch_fifo),
|
1229 |
|
|
|
1230 |
|
|
.llk_tc_status (llk_tc_status),
|
1231 |
|
|
.llk_rx_data (llk_rx_data),
|
1232 |
|
|
.llk_rx_src_rdy_n (llk_rx_src_rdy_n),
|
1233 |
|
|
.llk_rx_src_last_req_n (llk_rx_src_last_req_n),
|
1234 |
|
|
.llk_rx_src_dsc_n (llk_rx_src_dsc_n),
|
1235 |
|
|
.llk_rx_sof_n (llk_rx_sof_n),
|
1236 |
|
|
.llk_rx_eof_n (llk_rx_eof_n),
|
1237 |
|
|
.llk_rx_valid_n (llk_rx_valid_n),
|
1238 |
|
|
.llk_rx_ch_posted_available_n (llk_rx_ch_posted_available_n),
|
1239 |
|
|
.llk_rx_ch_non_posted_available_n (llk_rx_ch_non_posted_available_n),
|
1240 |
|
|
.llk_rx_ch_completion_available_n (llk_rx_ch_completion_available_n),
|
1241 |
|
|
.llk_rx_preferred_type (llk_rx_preferred_type),
|
1242 |
|
|
|
1243 |
|
|
// PCIe Block Status
|
1244 |
|
|
//-----------------
|
1245 |
|
|
|
1246 |
|
|
.l0_dll_error_vector ( fe_l0_dll_error_vector_ext ),
|
1247 |
|
|
.l0_rx_mac_link_error ( fe_l0_rx_mac_link_error_ext ),
|
1248 |
|
|
.l0_set_unsupported_request_other_error( fe_l0_set_unsupported_request_other_error ),
|
1249 |
|
|
.l0_set_detected_fatal_error ( fe_l0_set_detected_fatal_error ),
|
1250 |
|
|
.l0_set_detected_nonfatal_error ( fe_l0_set_detected_nonfatal_error ),
|
1251 |
|
|
.l0_set_detected_corr_error ( fe_l0_set_detected_corr_error ),
|
1252 |
|
|
.l0_set_user_system_error ( fe_l0_set_user_system_error ),
|
1253 |
|
|
.l0_set_user_master_data_parity ( fe_l0_set_user_master_data_parity ),
|
1254 |
|
|
.l0_set_user_signaled_target_abort ( fe_l0_set_user_signalled_target_abort ),
|
1255 |
|
|
.l0_set_user_received_target_abort ( fe_l0_set_user_received_target_abort ),
|
1256 |
|
|
.l0_set_user_received_master_abort ( fe_l0_set_user_received_master_abort ),
|
1257 |
|
|
.l0_set_user_detected_parity_error ( fe_l0_set_user_detected_parity_error ),
|
1258 |
|
|
.l0_ltssm_state ( fe_l0_ltssm_state ),
|
1259 |
|
|
.l0_stats_tlp_received ( fe_l0_stats_tlp_received ),
|
1260 |
|
|
.l0_stats_cfg_received ( fe_l0_stats_cfg_received ),
|
1261 |
|
|
.l0_stats_cfg_transmitted ( fe_l0_stats_cfg_transmitted ),
|
1262 |
|
|
|
1263 |
|
|
.l0_pwr_turn_off_req ( fe_l0_pwr_turn_off_req ),
|
1264 |
|
|
.l0_pme_req_in ( fe_l0_pme_req_in ),
|
1265 |
|
|
.l0_pme_ack ( fe_l0_pme_ack ),
|
1266 |
|
|
|
1267 |
|
|
// LocalLink Common
|
1268 |
|
|
//-----------------
|
1269 |
|
|
|
1270 |
|
|
.trn_clk (trn_clk),
|
1271 |
|
|
`ifdef MANAGEMENT_WRITE
|
1272 |
|
|
.trn_reset_n (trn_rst_n),
|
1273 |
|
|
`else
|
1274 |
|
|
.trn_reset_n (trn_reset_n),
|
1275 |
|
|
`endif
|
1276 |
|
|
.trn_lnk_up_n (trn_lnk_up_n),
|
1277 |
|
|
|
1278 |
|
|
// LocalLink Tx Ports
|
1279 |
|
|
//-------------------
|
1280 |
|
|
|
1281 |
|
|
.trn_td (trn_td),
|
1282 |
|
|
.trn_trem_n (trn_trem_n),
|
1283 |
|
|
.trn_tsof_n (trn_tsof_n),
|
1284 |
|
|
.trn_teof_n (trn_teof_n),
|
1285 |
|
|
.trn_tsrc_rdy_n (trn_tsrc_rdy_n),
|
1286 |
|
|
.trn_tsrc_dsc_n (trn_tsrc_dsc_n),
|
1287 |
|
|
.trn_terrfwd_n (trn_terrfwd_n),
|
1288 |
|
|
|
1289 |
|
|
.trn_tdst_rdy_n (trn_tdst_rdy_n),
|
1290 |
|
|
.trn_tdst_dsc_n (trn_tdst_dsc_n),
|
1291 |
|
|
.trn_tbuf_av (trn_tbuf_av),
|
1292 |
|
|
|
1293 |
|
|
`ifdef PFC_CISCO_DEBUG
|
1294 |
|
|
.trn_pfc_nph_cl (trn_pfc_nph_cl),
|
1295 |
|
|
.trn_pfc_npd_cl (trn_pfc_npd_cl),
|
1296 |
|
|
.trn_pfc_ph_cl (trn_pfc_ph_cl),
|
1297 |
|
|
.trn_pfc_pd_cl (trn_pfc_pd_cl),
|
1298 |
|
|
.trn_pfc_cplh_cl (trn_pfc_cplh_cl),
|
1299 |
|
|
.trn_pfc_cpld_cl (trn_pfc_cpld_cl),
|
1300 |
|
|
`endif
|
1301 |
|
|
|
1302 |
|
|
// LocalLink Rx Ports
|
1303 |
|
|
//-------------------
|
1304 |
|
|
|
1305 |
|
|
.trn_rd (trn_rd),
|
1306 |
|
|
.trn_rrem_n (trn_rrem_n),
|
1307 |
|
|
.trn_rsof_n (trn_rsof_n),
|
1308 |
|
|
.trn_reof_n (trn_reof_n),
|
1309 |
|
|
.trn_rsrc_rdy_n (trn_rsrc_rdy_n),
|
1310 |
|
|
.trn_rsrc_dsc_n (trn_rsrc_dsc_n),
|
1311 |
|
|
.trn_rerrfwd_n (trn_rerrfwd_n),
|
1312 |
|
|
.trn_rbar_hit_n (trn_rbar_hit_n),
|
1313 |
|
|
.trn_rfc_nph_av (trn_rfc_nph_av),
|
1314 |
|
|
.trn_rfc_npd_av (trn_rfc_npd_av),
|
1315 |
|
|
.trn_rfc_ph_av (trn_rfc_ph_av),
|
1316 |
|
|
.trn_rfc_pd_av (trn_rfc_pd_av),
|
1317 |
|
|
.trn_rfc_cplh_av (trn_rfc_cplh_av),
|
1318 |
|
|
.trn_rfc_cpld_av (trn_rfc_cpld_av),
|
1319 |
|
|
.trn_rcpl_streaming_n (trn_rcpl_streaming_n),
|
1320 |
|
|
|
1321 |
|
|
.trn_rnp_ok_n (trn_rnp_ok_n),
|
1322 |
|
|
.trn_rdst_rdy_n (trn_rdst_rdy_n) );
|
1323 |
|
|
|
1324 |
|
|
|
1325 |
|
|
|
1326 |
|
|
|
1327 |
|
|
|
1328 |
|
|
// RATIO = 1 if USERCLK = 250 MHz; RATIO = 2 if USERCLK = 125 MHz; RATIO = 4 if USERCLK = 62.5 MHz
|
1329 |
|
|
|
1330 |
|
|
|
1331 |
|
|
extend_clk # (
|
1332 |
|
|
.CLKRATIO(INTF_CLK_RATIO)
|
1333 |
|
|
)
|
1334 |
|
|
extend_clk
|
1335 |
|
|
(
|
1336 |
|
|
.clk(core_clk),
|
1337 |
|
|
.rst_n(fe_fundamental_reset_n),
|
1338 |
|
|
.l0_dll_error_vector(fe_l0_dll_error_vector), // [6:0] I
|
1339 |
|
|
.l0_rx_mac_link_error(fe_l0_rx_mac_link_error), // [1:0] I
|
1340 |
|
|
|
1341 |
|
|
.l0_dll_error_vector_retime(fe_l0_dll_error_vector_ext), // [6:0] O
|
1342 |
|
|
.l0_rx_mac_link_error_retime(fe_l0_rx_mac_link_error_ext) // [1:0] O
|
1343 |
|
|
);
|
1344 |
|
|
|
1345 |
|
|
|
1346 |
|
|
|
1347 |
|
|
|
1348 |
|
|
|
1349 |
|
|
|
1350 |
|
|
endmodule // ep_init_if
|
1351 |
|
|
|
1352 |
|
|
|