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/] [pcie_blk_if.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dsmv
 
2
//-----------------------------------------------------------------------------
3
//
4
// (c) Copyright 2009-2010 Xilinx, Inc. All rights reserved.
5
//
6
// This file contains confidential and proprietary information
7
// of Xilinx, Inc. and is protected under U.S. and
8
// international copyright and other intellectual property
9
// laws.
10
//
11
// DISCLAIMER
12
// This disclaimer is not a license and does not grant any
13
// rights to the materials distributed herewith. Except as
14
// otherwise provided in a valid license issued to you by
15
// Xilinx, and to the maximum extent permitted by applicable
16
// law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
17
// WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
18
// AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
19
// BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
20
// INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
21
// (2) Xilinx shall not be liable (whether in contract or tort,
22
// including negligence, or under any other theory of
23
// liability) for any loss or damage of any kind or nature
24
// related to, arising under or in connection with these
25
// materials, including for any direct, or any indirect,
26
// special, incidental, or consequential loss or damage
27
// (including loss of data, profits, goodwill, or any type of
28
// loss or damage suffered as a result of any action brought
29
// by a third party) even if such damage or loss was
30
// reasonably foreseeable or Xilinx had been advised of the
31
// possibility of the same.
32
//
33
// CRITICAL APPLICATIONS
34
// Xilinx products are not designed or intended to be fail-
35
// safe, or for use in any application requiring fail-safe
36
// performance, such as life-support or safety devices or
37
// systems, Class III medical devices, nuclear facilities,
38
// applications related to the deployment of airbags, or any
39
// other applications that could lead to death, personal
40
// injury, or severe property or environmental damage
41
// (individually and collectively, "Critical
42
// Applications"). Customer assumes the sole risk and
43
// liability of any use of Xilinx products in Critical
44
// Applications, subject only to applicable laws and
45
// regulations governing limitations on product liability.
46
//
47
// THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
48
// PART OF THIS FILE AT ALL TIMES.
49
//
50
//-----------------------------------------------------------------------------
51
// Project    : V5-Block Plus for PCI Express
52
// File       : pcie_blk_if.v
53
//--------------------------------------------------------------------------------
54
//--------------------------------------------------------------------------------
55
//--
56
//-- Description: PCIe Block Interface
57
//--
58
//--             
59
//--
60
//--------------------------------------------------------------------------------
61
 
62
`timescale 1ns/1ns
63
 
64
module pcie_blk_if #
65
(
66
   parameter   BAR0 = 32'hffff_0001,               // base address             cfg[ 95: 64]
67
   parameter   BAR1 = 32'hffff_0000,               // base address             cfg[127: 96]
68
   parameter   BAR2 = 32'hffff_0004,               // base address             cfg[159:128]
69
   parameter   BAR3 = 32'hffff_ffff,               // base address             cfg[191:160]
70
   parameter   BAR4 = 32'h0000_0000,               // base address             cfg[223:192]
71
   parameter   BAR5 = 32'h0000_0000,               // base address             cfg[255:224]
72
   parameter   XROM_BAR = 32'hffff_f001,           // expansion rom bar        cfg[351:320]
73
   parameter   MPS = 3'b101,                       // Max Payload Size         cfg[370:368]
74
   parameter   LEGACY_EP = 1'b0,                   // Legacy PCI endpoint?
75
   parameter   TRIM_ECRC = 1'b0,                   // Trim ECRC from rx TLPs   cfg[508]
76
   parameter   CPL_STREAMING_PRIORITIZE_P_NP = 0,  // arb priority to P/NP during cpl strm
77
   parameter   C_CALENDAR_LEN     = 9,
78
   parameter   C_CALENDAR_SUB_LEN = 12,
79
   parameter   C_CALENDAR_SEQ     = 72'h68_08_68_2C_68_08_68_0C_FF, //S Tc S T1 S Tc S T2 F
80
   parameter   C_CALENDAR_SUB_SEQ = 96'h40_60_44_64_4C_6C_20_24_28_2C_30_34,
81
   parameter   TX_CPL_STALL_THRESHOLD   = 6,
82
   parameter   TX_DATACREDIT_FIX_EN     = 1,
83
   parameter   TX_DATACREDIT_FIX_1DWONLY= 1,
84
   parameter   TX_DATACREDIT_FIX_MARGIN = 6
85
)
86
(
87
       // MGT Reset
88
       input wire        mgt_reset_n,
89
 
90
       // PCIe Block clock and reset
91
 
92
       input wire         clk,
93
       input wire         rst_n,
94
 
95
       // PCIe Block Misc Inputs
96
 
97
       input wire         mac_link_up,
98
       input wire   [3:0] mac_negotiated_link_width,
99
 
100
       // PCIe Block Cfg Interface
101
 
102
       input wire         io_space_enable,
103
       input wire         mem_space_enable,
104
       input wire         bus_master_enable,
105
       input wire         parity_error_response,
106
       input wire         serr_enable,
107
       input wire         msi_enable,
108
       input wire  [12:0] completer_id,
109
       input wire   [2:0] max_read_request_size,
110
       input wire   [2:0] max_payload_size,
111
 
112
       output             legacy_int_request,
113
       output             transactions_pending,
114
 
115
       output       [3:0] msi_request,
116
       input              cfg_interrupt_assert_n,
117
       input        [7:0] cfg_interrupt_di,
118
       output       [2:0] cfg_interrupt_mmenable,
119
       output             cfg_interrupt_msienable,
120
       output       [7:0] cfg_interrupt_do,
121
       input              msi_8bit_en,
122
 
123
       // PCIe Block Management Interface
124
 
125
       output wire [10:0] mgmt_addr,
126
       output wire        mgmt_wren,
127
       output wire        mgmt_rden,
128
       output wire [31:0] mgmt_wdata,
129
       output wire [3:0]  mgmt_bwren,
130
       input  wire [31:0] mgmt_rdata,
131
       input  wire [16:0] mgmt_pso,
132
 
133
       // PCIe Soft Macro Cfg Interface
134
 
135
       output      [31:0] cfg_do,
136
       input wire  [31:0] cfg_di,
137
       input wire  [63:0] cfg_dsn,
138
       input wire   [3:0] cfg_byte_en_n,
139
       input wire  [11:0] cfg_dwaddr,
140
       output             cfg_rd_wr_done_n,
141
       input wire         cfg_wr_en_n,
142
       input wire         cfg_rd_en_n,
143
       input wire         cfg_err_cor_n,
144
       input wire         cfg_err_ur_n,
145
       input wire         cfg_err_ecrc_n,
146
       input wire         cfg_err_cpl_timeout_n,
147
       input wire         cfg_err_cpl_abort_n,
148
       input wire         cfg_err_cpl_unexpect_n,
149
       input wire         cfg_err_posted_n,
150
       input wire         cfg_err_locked_n,
151
       input wire         cfg_interrupt_n,
152
       output             cfg_interrupt_rdy_n,
153
       input wire         cfg_turnoff_ok_n,
154
       output             cfg_to_turnoff_n,
155
       input wire         cfg_pm_wake_n,
156
       input wire  [47:0] cfg_err_tlp_cpl_header,
157
       output wire        cfg_err_cpl_rdy_n,
158
       input wire         cfg_trn_pending_n,
159
       output      [15:0] cfg_status,
160
       output      [15:0] cfg_command,
161
       output      [15:0] cfg_dstatus,
162
       output      [15:0] cfg_dcommand,
163
       output      [15:0] cfg_lstatus,
164
       output      [15:0] cfg_lcommand,
165
       output       [7:0] cfg_bus_number,
166
       output       [4:0] cfg_device_number,
167
       output       [2:0] cfg_function_number,
168
       output       [2:0] cfg_pcie_link_state_n,
169
 
170
       // PCIe Block Tx Ports
171
 
172
       output      [63:0] llk_tx_data,
173
       output             llk_tx_src_rdy_n,
174
       output             llk_tx_src_dsc_n,
175
       output             llk_tx_sof_n,
176
       output             llk_tx_eof_n,
177
       output             llk_tx_sop_n,
178
       output             llk_tx_eop_n,
179
       output      [1:0]  llk_tx_enable_n,
180
       output      [2:0]  llk_tx_ch_tc,
181
       output      [1:0]  llk_tx_ch_fifo,
182
 
183
       input  wire        llk_tx_dst_rdy_n,
184
       input  wire [9:0]  llk_tx_chan_space,
185
       input  wire [7:0]  llk_tx_ch_posted_ready_n,
186
       input  wire [7:0]  llk_tx_ch_non_posted_ready_n,
187
       input  wire [7:0]  llk_tx_ch_completion_ready_n,
188
 
189
       // PCIe Block Rx Ports
190
 
191
       output             llk_rx_dst_req_n,
192
       output             llk_rx_dst_cont_req_n,
193
       output [2:0]       llk_rx_ch_tc,
194
       output [1:0]       llk_rx_ch_fifo,
195
 
196
       input  wire [7:0]  llk_tc_status,
197
       input  wire [63:0] llk_rx_data,
198
       input  wire        llk_rx_src_rdy_n,
199
       input  wire        llk_rx_src_last_req_n,
200
       input  wire        llk_rx_src_dsc_n,
201
       input  wire        llk_rx_sof_n,
202
       input  wire        llk_rx_eof_n,
203
       input  wire [1:0]  llk_rx_valid_n,
204
       input  wire [7:0]  llk_rx_ch_posted_available_n,
205
       input  wire [7:0]  llk_rx_ch_non_posted_available_n,
206
       input  wire [7:0]  llk_rx_ch_completion_available_n,
207
       input  wire [15:0] llk_rx_preferred_type,
208
       output wire [6:0]  mgmt_stats_credit_sel,
209
       input  wire [11:0] mgmt_stats_credit,
210
 
211
       // LocalLink Common
212
 
213
       output             trn_clk,
214
       output             trn_reset_n,
215
       output             trn_lnk_up_n,
216
 
217
       // LocalLink Tx Ports
218
 
219
       input  wire [63:0] trn_td,
220
       input  wire [7:0]  trn_trem_n,
221
       input  wire        trn_tsof_n,
222
       input  wire        trn_teof_n,
223
       input  wire        trn_tsrc_rdy_n,
224
       input  wire        trn_tsrc_dsc_n,
225
       input  wire        trn_terrfwd_n,
226
 
227
       output             trn_tdst_rdy_n,
228
       output             trn_tdst_dsc_n,
229
       output      [3:0]  trn_tbuf_av,
230
 
231
       `ifdef PFC_CISCO_DEBUG
232
       output      [7:0]  trn_pfc_nph_cl,
233
       output      [11:0] trn_pfc_npd_cl,
234
       output      [7:0]  trn_pfc_ph_cl,
235
       output      [11:0] trn_pfc_pd_cl,
236
       output      [7:0]  trn_pfc_cplh_cl,
237
       output      [11:0] trn_pfc_cpld_cl,
238
       `endif
239
 
240
       // LocalLink Rx Ports
241
 
242
       output      [63:0] trn_rd,
243
       output      [7:0]  trn_rrem_n,
244
       output             trn_rsof_n,
245
       output             trn_reof_n,
246
       output             trn_rsrc_rdy_n,
247
       output             trn_rsrc_dsc_n,
248
       output             trn_rerrfwd_n,
249
       output      [6:0]  trn_rbar_hit_n,
250
       output      [7:0]  trn_rfc_nph_av,
251
       output      [11:0] trn_rfc_npd_av,
252
       output      [7:0]  trn_rfc_ph_av,
253
       output      [11:0] trn_rfc_pd_av,
254
       output      [7:0]  trn_rfc_cplh_av,
255
       output      [11:0] trn_rfc_cpld_av,
256
       input  wire        trn_rcpl_streaming_n,
257
 
258
       input  wire        trn_rnp_ok_n,
259
       input  wire        trn_rdst_rdy_n,
260
 
261
       input  wire  [6:0] l0_dll_error_vector,
262
       input  wire  [1:0] l0_rx_mac_link_error,
263
       output wire        l0_set_unsupported_request_other_error,
264
       output wire        l0_set_detected_fatal_error,
265
       output wire        l0_set_detected_nonfatal_error,
266
       output wire        l0_set_detected_corr_error,
267
       output wire        l0_set_user_system_error,
268
       output wire        l0_set_user_master_data_parity,
269
       output wire        l0_set_user_signaled_target_abort,
270
       output wire        l0_set_user_received_target_abort,
271
       output wire        l0_set_user_received_master_abort,
272
       output wire        l0_set_user_detected_parity_error,
273
       input  wire        l0_stats_tlp_received,
274
       input  wire        l0_stats_cfg_received,
275
       input  wire        l0_stats_cfg_transmitted,
276
       input  wire  [3:0] l0_ltssm_state,
277
       input  wire        l0_pwr_turn_off_req,
278
       output wire        l0_pme_req_in,
279
       input  wire        l0_pme_ack
280
 
281
); // synthesis syn_hier = "hard"
282
 
283
 
284
wire [31:0] cfg_rx_bar0;
285
wire [31:0] cfg_rx_bar1;
286
wire [31:0] cfg_rx_bar2;
287
wire [31:0] cfg_rx_bar3;
288
wire [31:0] cfg_rx_bar4;
289
wire [31:0] cfg_rx_bar5;
290
wire [31:0] cfg_rx_xrom;
291
 
292
wire [63:0] cfg_arb_td;
293
wire  [7:0] cfg_arb_trem_n;
294
wire        cfg_arb_tsof_n;
295
wire        cfg_arb_teof_n;
296
wire        cfg_arb_tsrc_rdy_n;
297
wire        cfg_arb_tdst_rdy_n;
298
wire        rx_err_cpl_abort_n;
299
wire        rx_err_cpl_ep_n;
300
wire        tx_err_wr_ep_n;
301
wire        rx_err_ep_n;
302
wire        rx_err_tlp_poisoned_n = 1;
303
wire        rx_err_cpl_ur_n;
304
wire        rx_err_tlp_ur;
305
wire        rx_err_tlp_ur_lock;
306
wire [47:0] rx_err_tlp_hdr;
307
wire [31:0] cfg_pmcsr;
308
wire [31:0] cfg_dcap;
309
wire [63:0] llk_rx_data_d;
310
 
311
wire        rx_err_tlp_ur_n      = ~rx_err_tlp_ur;
312
wire        rx_err_tlp_ur_lock_n = ~rx_err_tlp_ur_lock;
313
wire        rx_err_tlp_p_cpl;
314
wire        rx_err_tlp_p_cpl_n = ~rx_err_tlp_p_cpl;
315
 
316
wire        err_tlp_malformed;
317
wire        rx_err_tlp_malformed_n  = ~err_tlp_malformed;
318
 
319
pcie_blk_ll #
320
(      .BAR0      (BAR0),
321
       .BAR1      (BAR1),
322
       .BAR2      (BAR2),
323
       .BAR3      (BAR3),
324
       .BAR4      (BAR4),
325
       .BAR5      (BAR5),
326
       .XROM_BAR  (XROM_BAR),
327
       .MPS       (MPS),
328
       .LEGACY_EP (LEGACY_EP),
329
       .TRIM_ECRC (TRIM_ECRC),
330
       .C_CALENDAR_LEN         (C_CALENDAR_LEN),
331
       .C_CALENDAR_SEQ         (C_CALENDAR_SEQ),
332
       .C_CALENDAR_SUB_LEN     (C_CALENDAR_SUB_LEN),
333
       .C_CALENDAR_SUB_SEQ     (C_CALENDAR_SUB_SEQ),
334
       .TX_CPL_STALL_THRESHOLD       (TX_CPL_STALL_THRESHOLD),
335
       .TX_DATACREDIT_FIX_EN         (TX_DATACREDIT_FIX_EN),
336
       .TX_DATACREDIT_FIX_1DWONLY    (TX_DATACREDIT_FIX_1DWONLY),
337
       .TX_DATACREDIT_FIX_MARGIN     (TX_DATACREDIT_FIX_MARGIN),
338
       .CPL_STREAMING_PRIORITIZE_P_NP(CPL_STREAMING_PRIORITIZE_P_NP)
339
)
340
ll_bridge
341
(
342
       // Clock & Reset
343
 
344
       .clk( clk ),                                               // I
345
       .rst_n( rst_n ),                                           // I
346
 
347
       // Transaction Link Up
348
 
349
       .trn_lnk_up_n( trn_lnk_up_n ),                             // I
350
 
351
       // PCIe Block Tx Ports
352
 
353
       .llk_tx_data( llk_tx_data ),                               // O[63:0] 
354
       .llk_tx_src_rdy_n( llk_tx_src_rdy_n ),                     // O
355
       .llk_tx_src_dsc_n( llk_tx_src_dsc_n ),                     // O
356
       .llk_tx_sof_n( llk_tx_sof_n ),                             // O
357
       .llk_tx_eof_n( llk_tx_eof_n ),                             // O
358
       .llk_tx_sop_n( llk_tx_sop_n ),                             // O
359
       .llk_tx_eop_n( llk_tx_eop_n ),                             // O
360
       .llk_tx_enable_n( llk_tx_enable_n ),                       // O[1:0]
361
       .llk_tx_ch_tc( llk_tx_ch_tc ),                             // O[2:0]
362
       .llk_tx_ch_fifo( llk_tx_ch_fifo ),                         // O[1:0]
363
 
364
       .llk_tx_dst_rdy_n( llk_tx_dst_rdy_n ),                     // I
365
       .llk_tx_chan_space( llk_tx_chan_space ),                   // I[9:0]
366
       .llk_tx_ch_posted_ready_n( llk_tx_ch_posted_ready_n ),     // I[7:0]
367
       .llk_tx_ch_non_posted_ready_n( llk_tx_ch_non_posted_ready_n ), // I[7:0]
368
       .llk_tx_ch_completion_ready_n( llk_tx_ch_completion_ready_n ), // I[7:0]
369
 
370
       // LocalLink Tx Ports (User input)
371
 
372
       .trn_td( trn_td ),                                         // I[63:0]
373
       .trn_trem_n( trn_trem_n ),                                 // I[7:0]
374
       .trn_tsof_n( trn_tsof_n ),                                 // I
375
       .trn_teof_n( trn_teof_n ),                                 // I
376
       .trn_tsrc_rdy_n( trn_tsrc_rdy_n ),                         // I
377
       .trn_tsrc_dsc_n( trn_tsrc_dsc_n ),                         // I
378
       .trn_terrfwd_n( trn_terrfwd_n ),                           // I
379
 
380
       .trn_tdst_rdy_n( trn_tdst_rdy_n ),                         // O
381
       .trn_tdst_dsc_n( trn_tdst_dsc_n ),                         // O
382
       .trn_tbuf_av( trn_tbuf_av),                                // O[2:0]
383
 
384
       `ifdef PFC_CISCO_DEBUG
385
       .trn_pfc_nph_cl( trn_pfc_nph_cl),
386
       .trn_pfc_npd_cl( trn_pfc_npd_cl),
387
       .trn_pfc_ph_cl( trn_pfc_ph_cl),
388
       .trn_pfc_pd_cl( trn_pfc_pd_cl),
389
       .trn_pfc_cplh_cl( trn_pfc_cplh_cl),
390
       .trn_pfc_cpld_cl( trn_pfc_cpld_cl),
391
       `endif
392
 
393
       // Config Tx Ports
394
 
395
       .cfg_tx_td( cfg_arb_td ),                                  // I[63:0]
396
       .cfg_tx_rem_n( cfg_arb_trem_n[0] ),                        // I
397
       .cfg_tx_sof_n( cfg_arb_tsof_n ),                           // I
398
       .cfg_tx_eof_n( cfg_arb_teof_n ),                           // I
399
       .cfg_tx_src_rdy_n( cfg_arb_tsrc_rdy_n ),                   // I
400
       .cfg_tx_dst_rdy_n( cfg_arb_tdst_rdy_n ),                   // O
401
 
402
       // PCIe Block Rx Ports
403
 
404
       .llk_rx_dst_req_n( llk_rx_dst_req_n ),                     // O
405
       .llk_rx_dst_cont_req_n( llk_rx_dst_cont_req_n ),           // O
406
       .llk_rx_ch_tc( llk_rx_ch_tc ),                             // O[2:0]
407
       .llk_rx_ch_fifo( llk_rx_ch_fifo ),                         // O[1:0]
408
 
409
       .llk_tc_status( llk_tc_status ),                           // I[7:0]
410
       .llk_rx_data  ( llk_rx_data ),                             // I[63:0]
411
       .llk_rx_data_d( llk_rx_data_d ),                           // O[63:0]
412
       .llk_rx_src_rdy_n( llk_rx_src_rdy_n ),                     // I
413
       .llk_rx_src_last_req_n( llk_rx_src_last_req_n ),           // I
414
       .llk_rx_src_dsc_n( llk_rx_src_dsc_n ),                     // I
415
       .llk_rx_sof_n( llk_rx_sof_n ),                             // I
416
       .llk_rx_eof_n( llk_rx_eof_n ),                             // I
417
       .llk_rx_valid_n( llk_rx_valid_n ),                         // I[1:0]
418
.llk_rx_ch_posted_available_n( llk_rx_ch_posted_available_n ),         // I[7:0]
419
.llk_rx_ch_non_posted_available_n( llk_rx_ch_non_posted_available_n ), // I[7:0]
420
.llk_rx_ch_completion_available_n( llk_rx_ch_completion_available_n ), // I[7:0]
421
       .llk_rx_preferred_type( llk_rx_preferred_type ),           // I[15:0]
422
       .mgmt_stats_credit_sel (mgmt_stats_credit_sel),
423
       .mgmt_stats_credit     (mgmt_stats_credit),
424
 
425
       // LocalLink Rx Ports
426
 
427
       .trn_rd( trn_rd ),                                         // O[63:0]
428
       .trn_rrem_n( trn_rrem_n ),                                 // O[7:0]
429
       .trn_rsof_n( trn_rsof_n ),                                 // O
430
       .trn_reof_n( trn_reof_n ),                                 // O
431
       .trn_rsrc_rdy_n( trn_rsrc_rdy_n ),                         // O
432
       .trn_rsrc_dsc_n( trn_rsrc_dsc_n ),                         // O
433
       .trn_rerrfwd_n( trn_rerrfwd_n ),                           // O
434
       .trn_rbar_hit_n( trn_rbar_hit_n ),                         // O[6:0]
435
       .trn_rfc_nph_av( trn_rfc_nph_av ),                         // O[7:0]
436
       .trn_rfc_npd_av( trn_rfc_npd_av ),                         // O[11:0]
437
       .trn_rfc_ph_av( trn_rfc_ph_av ),                           // O[7:0]
438
       .trn_rfc_pd_av( trn_rfc_pd_av ),                           // O[11:0]
439
       .trn_rfc_cplh_av( trn_rfc_cplh_av ),                       // O[7:0]
440
       .trn_rfc_cpld_av( trn_rfc_cpld_av ),                       // O[11:0]
441
 
442
       .trn_rnp_ok_n( trn_rnp_ok_n ),                             // I
443
       .trn_rdst_rdy_n( trn_rdst_rdy_n ),                         // I
444
       .trn_rcpl_streaming_n( trn_rcpl_streaming_n ),             // I
445
 
446
       // Sideband signals to control operation
447
 
448
       .cfg_rx_bar0( cfg_rx_bar0 ),                               // I[31:0]
449
       .cfg_rx_bar1( cfg_rx_bar1 ),                               // I[31:0]
450
       .cfg_rx_bar2( cfg_rx_bar2 ),                               // I[31:0]
451
       .cfg_rx_bar3( cfg_rx_bar3 ),                               // I[31:0]
452
       .cfg_rx_bar4( cfg_rx_bar4 ),                               // I[31:0]
453
       .cfg_rx_bar5( cfg_rx_bar5 ),                               // I[31:0]
454
       .cfg_rx_xrom( cfg_rx_xrom ),                               // I[31:0]
455
       .cfg_bus_number( cfg_bus_number ),                         // I[7:0]
456
       .cfg_device_number( cfg_device_number ),                   // I[4:0]
457
       .cfg_function_number( cfg_function_number ),               // I[2:0]
458
       .cfg_dcommand( cfg_dcommand ),                             // I[15:0]
459
       .cfg_pmcsr( cfg_pmcsr[15:0] ),                             // I[15:0]
460
       //.io_space_enable( io_space_enable ),                       // I
461
       .io_space_enable( cfg_command[0] ),                        // I
462
       //.mem_space_enable( mem_space_enable ),                     // I
463
       .mem_space_enable( cfg_command[1] ),                       // I
464
       //.max_payload_size( max_payload_size ),                     // I[2:0]
465
       .max_payload_size( cfg_dcap[2:0] ),                        // I[2:0]
466
 
467
       // Error reporting
468
       .rx_err_cpl_abort_n( rx_err_cpl_abort_n ),                 // O
469
       .rx_err_cpl_ur_n( rx_err_cpl_ur_n ),                       // O
470
       .rx_err_cpl_ep_n( rx_err_cpl_ep_n ),                       // O
471
       .rx_err_ep_n    ( rx_err_ep_n ),                           // O
472
       .err_tlp_cpl_header( rx_err_tlp_hdr ),                     // O[47:0]
473
       .err_tlp_p  ( rx_err_tlp_p_cpl ),
474
       .err_tlp_ur ( rx_err_tlp_ur ),
475
       .err_tlp_ur_lock ( rx_err_tlp_ur_lock ),
476
       .err_tlp_uc ( ),
477
       .err_tlp_malformed( err_tlp_malformed ),                   // O
478
       .tx_err_wr_ep_n  (tx_err_wr_ep_n),                         // O
479
 
480
       .l0_stats_tlp_received (l0_stats_tlp_received),
481
       .l0_stats_cfg_transmitted (l0_stats_cfg_transmitted)
482
);
483
 
484
pcie_blk_cf cf_bridge  (
485
 
486
       // Clock & Reset
487
 
488
       .clk( clk ),                                               // I
489
       .rst_n( rst_n ),                                           // I
490
 
491
       // Transcation Link Up
492
 
493
       .trn_lnk_up_n( trn_lnk_up_n ),                             // 0
494
 
495
       // PCIe Block Misc Inputs
496
 
497
       .mac_link_up (mac_link_up),                                // I
498
       .mac_negotiated_link_width (mac_negotiated_link_width),    // I[3:0]
499
       .llk_tc_status( llk_tc_status ),                           // I[7:0]
500
 
501
       // PCIe Block Cfg Interface
502
 
503
       .io_space_enable (io_space_enable),
504
       .mem_space_enable (mem_space_enable),
505
       .bus_master_enable (bus_master_enable),
506
       .parity_error_response (parity_error_response),
507
       .serr_enable (serr_enable),
508
       .msi_enable (msi_enable),
509
       .completer_id (completer_id),
510
       .max_read_request_size (),                                // NEW
511
       .max_payload_size (),                                     // NEW
512
 
513
       .legacy_int_request(legacy_int_request),
514
       .transactions_pending(transactions_pending),
515
       .msi_request(msi_request),
516
 
517
       .cfg_interrupt_assert_n(cfg_interrupt_assert_n),  // I
518
       .cfg_interrupt_di(cfg_interrupt_di),              // I[7:0]
519
       .cfg_interrupt_mmenable(cfg_interrupt_mmenable),  // O[2:0]
520
       .cfg_interrupt_msienable(cfg_interrupt_msienable),  // O
521
       .cfg_interrupt_do(cfg_interrupt_do),              // O[7:0]
522
       .msi_8bit_en(msi_8bit_en),                        // I
523
 
524
       // PCIe Block Management Interface
525
 
526
       .mgmt_addr           (mgmt_addr),
527
       .mgmt_wren           (mgmt_wren),
528
       .mgmt_rden           (mgmt_rden),
529
       .mgmt_wdata          (mgmt_wdata),
530
       .mgmt_bwren          (mgmt_bwren),
531
       .mgmt_rdata          (mgmt_rdata),
532
       .mgmt_pso            (mgmt_pso),
533
       //// These signals go to mgmt block to implement a workaround
534
       .llk_rx_data_d            (llk_rx_data_d),
535
       .llk_rx_src_rdy_n         (llk_rx_src_rdy_n),
536
       .l0_stats_cfg_received    (l0_stats_cfg_received),
537
       .l0_stats_cfg_transmitted (l0_stats_cfg_transmitted),
538
 
539
       // PCIe Soft Macro Cfg Interface
540
 
541
       .cfg_do (cfg_do),
542
       .cfg_di (cfg_di),
543
       .cfg_dsn (cfg_dsn),
544
       .cfg_byte_en_n (cfg_byte_en_n),
545
       .cfg_dwaddr (cfg_dwaddr),
546
       .cfg_rd_wr_done_n (cfg_rd_wr_done_n),
547
       .cfg_wr_en_n (cfg_wr_en_n),
548
       .cfg_rd_en_n (cfg_rd_en_n),
549
       .cfg_err_cor_n (cfg_err_cor_n),
550
       .cfg_err_ur_n (cfg_err_ur_n),
551
       .cfg_err_ecrc_n (cfg_err_ecrc_n),
552
       .cfg_err_cpl_timeout_n (cfg_err_cpl_timeout_n),
553
       .cfg_err_cpl_abort_n (cfg_err_cpl_abort_n),
554
       .cfg_err_cpl_unexpect_n (cfg_err_cpl_unexpect_n),
555
       .cfg_err_posted_n (cfg_err_posted_n),
556
       .cfg_err_locked_n (cfg_err_locked_n),
557
       .cfg_interrupt_n (cfg_interrupt_n),
558
       .cfg_interrupt_rdy_n (cfg_interrupt_rdy_n),
559
       .cfg_turnoff_ok_n (cfg_turnoff_ok_n),
560
       .cfg_to_turnoff_n (cfg_to_turnoff_n),
561
       .cfg_pm_wake_n (cfg_pm_wake_n),
562
       .cfg_err_tlp_cpl_header (cfg_err_tlp_cpl_header),
563
       .cfg_err_cpl_rdy_n (cfg_err_cpl_rdy_n),
564
       .cfg_trn_pending_n (cfg_trn_pending_n),
565
       .cfg_rx_bar0 (cfg_rx_bar0),
566
       .cfg_rx_bar1 (cfg_rx_bar1),
567
       .cfg_rx_bar2 (cfg_rx_bar2),
568
       .cfg_rx_bar3 (cfg_rx_bar3),
569
       .cfg_rx_bar4 (cfg_rx_bar4),
570
       .cfg_rx_bar5 (cfg_rx_bar5),
571
       .cfg_rx_xrom (cfg_rx_xrom),
572
       .cfg_status (cfg_status),
573
       .cfg_command (cfg_command),
574
       .cfg_dstatus (cfg_dstatus),
575
       .cfg_dcommand (cfg_dcommand),
576
       .cfg_lstatus (cfg_lstatus),
577
       .cfg_lcommand (cfg_lcommand),
578
       .cfg_pmcsr    (cfg_pmcsr),
579
       .cfg_dcap     (cfg_dcap),
580
       .cfg_bus_number (cfg_bus_number),
581
       .cfg_device_number (cfg_device_number),
582
       .cfg_function_number (cfg_function_number),
583
       .cfg_pcie_link_state_n (cfg_pcie_link_state_n),
584
       .cfg_arb_td             ( cfg_arb_td ),
585
       .cfg_arb_trem_n         ( cfg_arb_trem_n ),
586
       .cfg_arb_tsof_n         ( cfg_arb_tsof_n ),
587
       .cfg_arb_teof_n         ( cfg_arb_teof_n ),
588
       .cfg_arb_tsrc_rdy_n     ( cfg_arb_tsrc_rdy_n ),
589
       .cfg_arb_tdst_rdy_n     ( cfg_arb_tdst_rdy_n ),
590
       .rx_err_cpl_ep_n        ( rx_err_cpl_ep_n ),
591
       .tx_err_wr_ep_n         ( tx_err_wr_ep_n ),
592
       .rx_err_ep_n            ( rx_err_ep_n ),
593
       .rx_err_tlp_poisoned_n  ( rx_err_tlp_poisoned_n ),
594
       .rx_err_cpl_abort_n     ( rx_err_cpl_abort_n ),
595
       .rx_err_cpl_ur_n        ( rx_err_cpl_ur_n ),
596
       .rx_err_tlp_ur_n        ( rx_err_tlp_ur_n ),
597
       .rx_err_tlp_ur_lock_n   ( rx_err_tlp_ur_lock_n ),
598
       .rx_err_tlp_p_cpl_n     ( rx_err_tlp_p_cpl_n ),
599
       .rx_err_tlp_malformed_n ( rx_err_tlp_malformed_n ),
600
       .rx_err_tlp_hdr         ( rx_err_tlp_hdr ),
601
       .l0_dll_error_vector               ( l0_dll_error_vector ),
602
       .l0_rx_mac_link_error              ( l0_rx_mac_link_error ),
603
       .l0_set_unsupported_request_other_error( l0_set_unsupported_request_other_error ),
604
       .l0_set_detected_fatal_error       ( l0_set_detected_fatal_error ),
605
       .l0_set_detected_nonfatal_error    ( l0_set_detected_nonfatal_error ),
606
       .l0_set_detected_corr_error        ( l0_set_detected_corr_error ),
607
       .l0_set_user_system_error          ( l0_set_user_system_error ),
608
       .l0_set_user_master_data_parity    ( l0_set_user_master_data_parity ),
609
       .l0_set_user_signaled_target_abort ( l0_set_user_signaled_target_abort ),
610
       .l0_set_user_received_target_abort ( l0_set_user_received_target_abort ),
611
       .l0_set_user_received_master_abort ( l0_set_user_received_master_abort ),
612
       .l0_set_user_detected_parity_error ( l0_set_user_detected_parity_error ),
613
       .l0_ltssm_state                    ( l0_ltssm_state ),
614
       .l0_pwr_turn_off_req               ( l0_pwr_turn_off_req ),
615
       .l0_pme_req_in                     ( l0_pme_req_in ),
616
       .l0_pme_ack                        ( l0_pme_ack )
617
);
618
 
619
assign trn_clk = clk;
620
assign trn_reset_n = mgt_reset_n;
621
 
622
endmodule // pcie_blk_if
623
 
624
 

powered by: WebSVN 2.1.0

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