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

Subversion Repositories pcie_mini

[/] [pcie_mini/] [trunk/] [example_design/] [gtpa1_dual_wrapper_top.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 buenos
-------------------------------------------------------------------------------
2
--
3
-- (c) Copyright 2008, 2009 Xilinx, Inc. All rights reserved.
4
--
5
-- This file contains confidential and proprietary information of Xilinx, Inc.
6
-- and is protected under U.S. and international copyright and other
7
-- intellectual property laws.
8
--
9
-- DISCLAIMER
10
--
11
-- This disclaimer is not a license and does not grant any rights to the
12
-- materials distributed herewith. Except as otherwise provided in a valid
13
-- license issued to you by Xilinx, and to the maximum extent permitted by
14
-- applicable law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND WITH ALL
15
-- FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS,
16
-- IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
17
-- MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE;
18
-- and (2) Xilinx shall not be liable (whether in contract or tort, including
19
-- negligence, or under any other theory of liability) for any loss or damage
20
-- of any kind or nature related to, arising under or in connection with these
21
-- materials, including for any direct, or any indirect, special, incidental,
22
-- or consequential loss or damage (including loss of data, profits, goodwill,
23
-- or any type of loss or damage suffered as a result of any action brought by
24
-- a third party) even if such damage or loss was reasonably foreseeable or
25
-- Xilinx had been advised of the possibility of the same.
26
--
27
-- CRITICAL APPLICATIONS
28
--
29
-- Xilinx products are not designed or intended to be fail-safe, or for use in
30
-- any application requiring fail-safe performance, such as life-support or
31
-- safety devices or systems, Class III medical devices, nuclear facilities,
32
-- applications related to the deployment of airbags, or any other
33
-- applications that could lead to death, personal injury, or severe property
34
-- or environmental damage (individually and collectively, "Critical
35
-- Applications"). Customer assumes the sole risk and liability of any use of
36
-- Xilinx products in Critical Applications, subject only to applicable laws
37
-- and regulations governing limitations on product liability.
38
--
39
-- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS PART OF THIS FILE
40
-- AT ALL TIMES.
41
--
42
-------------------------------------------------------------------------------
43
-- Project    : Spartan-6 Integrated Block for PCI Express
44
-- File       : gtpa1_dual_wrapper_top.vhd
45
-- Description: PCI Express Wrapper for GTPA1_DUAL
46
--
47
-------------------------------------------------------------------------------
48
 
49
library ieee;
50
use ieee.std_logic_1164.all;
51
use ieee.std_logic_arith.all;
52
use ieee.std_logic_unsigned.all;
53
use ieee.numeric_bit.all;
54
library unisim;
55
use unisim.vcomponents.all;
56
--synthesis translate_off
57
use unisim.vpkg.all;
58
library secureip;
59
use secureip.all;
60
--synthesis translate_on
61
 
62
entity gtpa1_dual_wrapper_top is
63
  generic (
64
    SIMULATION   : boolean := FALSE
65
  );
66
  port (
67
    -- Clock and reset
68
    sys_rst_n         : in  std_logic;
69
    sys_clk           : in  std_logic;
70
    gt_usrclk         : in  std_logic;
71
    gt_usrclk2x       : in  std_logic;
72
    gt_refclk_out     : out std_logic;
73
    gt_reset_done     : out std_logic;
74
    rxreset           : in  std_logic;
75
 
76
    -- RX and TX path GTP <-> PCIe
77
    rx_char_is_k      : out std_logic_vector(1 downto 0);
78
    rx_data           : out std_logic_vector(15 downto 0);
79
    rx_enter_elecidle : out std_logic;
80
    rx_status         : out std_logic_vector(2 downto 0);
81
    rx_polarity       : in  std_logic;
82
    tx_char_disp_mode : in  std_logic_vector(1 downto 0);
83
    tx_char_is_k      : in  std_logic_vector(1 downto 0);
84
    tx_rcvr_det       : in  std_logic;
85
    tx_data           : in  std_logic_vector(15 downto 0);
86
 
87
    -- Status and control path GTP <-> PCIe
88
    phystatus         : out  std_logic;
89
    gt_rx_valid       : out std_logic;
90
    gt_plllkdet_out   : out std_logic;
91
    gt_tx_elec_idle   : in  std_logic;
92
    gt_power_down     : in  std_logic_vector(1 downto 0);
93
 
94
    -- PCIe serial datapath
95
    arp_txp           : out std_logic;
96
    arp_txn           : out std_logic;
97
    arp_rxp           : in  std_logic;
98
    arp_rxn           : in  std_logic
99
  );
100
end gtpa1_dual_wrapper_top;
101
 
102
architecture rtl of gtpa1_dual_wrapper_top is
103
 
104
  ------------------------
105
  -- Function Declarations
106
  ------------------------
107
  function SIM_INT(SIMULATION : boolean) return integer is
108
  begin
109
    if SIMULATION then
110
      return 1;
111
    else
112
      return 0;
113
    end if;
114
  end SIM_INT;
115
 
116
  component GTPA1_DUAL_WRAPPER is
117
  generic
118
  (
119
    -- Simulation attributes
120
    WRAPPER_SIM_GTPRESET_SPEEDUP    : integer   := 0; -- Set to 1 to speed up sim reset
121
    WRAPPER_SIMULATION              : integer   := 0  -- Set to 1 for simulation
122
  );
123
  port
124
  (
125
 
126
    --_________________________________________________________________________
127
    --_________________________________________________________________________
128
    --TILE0  (X0_Y0)
129
 
130
    ------------------------ Loopback and Powerdown Ports ----------------------
131
    TILE0_RXPOWERDOWN0_IN                   : in   std_logic_vector(1 downto 0);
132
    TILE0_RXPOWERDOWN1_IN                   : in   std_logic_vector(1 downto 0);
133
    TILE0_TXPOWERDOWN0_IN                   : in   std_logic_vector(1 downto 0);
134
    TILE0_TXPOWERDOWN1_IN                   : in   std_logic_vector(1 downto 0);
135
    --------------------------------- PLL Ports --------------------------------
136
    TILE0_CLK00_IN                          : in   std_logic;
137
    TILE0_CLK01_IN                          : in   std_logic;
138
    TILE0_GTPRESET0_IN                      : in   std_logic;
139
    TILE0_GTPRESET1_IN                      : in   std_logic;
140
    TILE0_PLLLKDET0_OUT                     : out  std_logic;
141
    TILE0_PLLLKDET1_OUT                     : out  std_logic;
142
    TILE0_RESETDONE0_OUT                    : out  std_logic;
143
    TILE0_RESETDONE1_OUT                    : out  std_logic;
144
    ----------------------- Receive Ports - 8b10b Decoder ----------------------
145
    TILE0_RXCHARISK0_OUT                    : out  std_logic_vector(1 downto 0);
146
    TILE0_RXCHARISK1_OUT                    : out  std_logic_vector(1 downto 0);
147
    TILE0_RXDISPERR0_OUT                    : out  std_logic_vector(1 downto 0);
148
    TILE0_RXDISPERR1_OUT                    : out  std_logic_vector(1 downto 0);
149
    TILE0_RXNOTINTABLE0_OUT                 : out  std_logic_vector(1 downto 0);
150
    TILE0_RXNOTINTABLE1_OUT                 : out  std_logic_vector(1 downto 0);
151
    ---------------------- Receive Ports - Clock Correction --------------------
152
    TILE0_RXCLKCORCNT0_OUT                  : out  std_logic_vector(2 downto 0);
153
    TILE0_RXCLKCORCNT1_OUT                  : out  std_logic_vector(2 downto 0);
154
    --------------- Receive Ports - Comma Detection and Alignment --------------
155
    TILE0_RXENMCOMMAALIGN0_IN               : in   std_logic;
156
    TILE0_RXENMCOMMAALIGN1_IN               : in   std_logic;
157
    TILE0_RXENPCOMMAALIGN0_IN               : in   std_logic;
158
    TILE0_RXENPCOMMAALIGN1_IN               : in   std_logic;
159
    ------------------- Receive Ports - RX Data Path interface -----------------
160
    TILE0_RXDATA0_OUT                       : out  std_logic_vector(15 downto 0);
161
    TILE0_RXDATA1_OUT                       : out  std_logic_vector(15 downto 0);
162
    TILE0_RXRESET0_IN                       : in   std_logic;
163
    TILE0_RXRESET1_IN                       : in   std_logic;
164
    TILE0_RXUSRCLK0_IN                      : in   std_logic;
165
    TILE0_RXUSRCLK1_IN                      : in   std_logic;
166
    TILE0_RXUSRCLK20_IN                     : in   std_logic;
167
    TILE0_RXUSRCLK21_IN                     : in   std_logic;
168
    ------- Receive Ports - RX Driver,OOB signalling,Coupling and Eq.,CDR ------
169
    TILE0_GATERXELECIDLE0_IN                : in   std_logic;
170
    TILE0_GATERXELECIDLE1_IN                : in   std_logic;
171
    TILE0_IGNORESIGDET0_IN                  : in   std_logic;
172
    TILE0_IGNORESIGDET1_IN                  : in   std_logic;
173
    TILE0_RXELECIDLE0_OUT                   : out  std_logic;
174
    TILE0_RXELECIDLE1_OUT                   : out  std_logic;
175
    TILE0_RXN0_IN                           : in   std_logic;
176
    TILE0_RXN1_IN                           : in   std_logic;
177
    TILE0_RXP0_IN                           : in   std_logic;
178
    TILE0_RXP1_IN                           : in   std_logic;
179
    ----------- Receive Ports - RX Elastic Buffer and Phase Alignment ----------
180
    TILE0_RXSTATUS0_OUT                     : out  std_logic_vector(2 downto 0);
181
    TILE0_RXSTATUS1_OUT                     : out  std_logic_vector(2 downto 0);
182
    -------------- Receive Ports - RX Pipe Control for PCI Express -------------
183
    TILE0_PHYSTATUS0_OUT                    : out  std_logic;
184
    TILE0_PHYSTATUS1_OUT                    : out  std_logic;
185
    TILE0_RXVALID0_OUT                      : out  std_logic;
186
    TILE0_RXVALID1_OUT                      : out  std_logic;
187
    -------------------- Receive Ports - RX Polarity Control -------------------
188
    TILE0_RXPOLARITY0_IN                    : in   std_logic;
189
    TILE0_RXPOLARITY1_IN                    : in   std_logic;
190
    ---------------------------- TX/RX Datapath Ports --------------------------
191
    TILE0_GTPCLKOUT0_OUT                    : out  std_logic_vector(1 downto 0);
192
    TILE0_GTPCLKOUT1_OUT                    : out  std_logic_vector(1 downto 0);
193
    ------------------- Transmit Ports - 8b10b Encoder Control -----------------
194
    TILE0_TXCHARDISPMODE0_IN                : in   std_logic_vector(1 downto 0);
195
    TILE0_TXCHARDISPMODE1_IN                : in   std_logic_vector(1 downto 0);
196
    TILE0_TXCHARISK0_IN                     : in   std_logic_vector(1 downto 0);
197
    TILE0_TXCHARISK1_IN                     : in   std_logic_vector(1 downto 0);
198
    ------------------ Transmit Ports - TX Data Path interface -----------------
199
    TILE0_TXDATA0_IN                        : in   std_logic_vector(15 downto 0);
200
    TILE0_TXDATA1_IN                        : in   std_logic_vector(15 downto 0);
201
    TILE0_TXUSRCLK0_IN                      : in   std_logic;
202
    TILE0_TXUSRCLK1_IN                      : in   std_logic;
203
    TILE0_TXUSRCLK20_IN                     : in   std_logic;
204
    TILE0_TXUSRCLK21_IN                     : in   std_logic;
205
    --------------- Transmit Ports - TX Driver and OOB signalling --------------
206
    TILE0_TXN0_OUT                          : out  std_logic;
207
    TILE0_TXN1_OUT                          : out  std_logic;
208
    TILE0_TXP0_OUT                          : out  std_logic;
209
    TILE0_TXP1_OUT                          : out  std_logic;
210
    ----------------- Transmit Ports - TX Ports for PCI Express ----------------
211
    TILE0_TXDETECTRX0_IN                    : in   std_logic;
212
    TILE0_TXDETECTRX1_IN                    : in   std_logic;
213
    TILE0_TXELECIDLE0_IN                    : in   std_logic;
214
    TILE0_TXELECIDLE1_IN                    : in   std_logic
215
  );
216
  end component GTPA1_DUAL_WRAPPER;
217
 
218
  -------------------------------------
219
  -- Local signals
220
  -------------------------------------
221
 
222
  signal gt_refclk : std_logic_vector(1 downto 0);
223
  signal sys_rst   : std_logic;
224
 
225
begin
226
 
227
  GT_i : GTPA1_DUAL_WRAPPER
228
  generic map (
229
    -- Simulation attributes
230
    WRAPPER_SIM_GTPRESET_SPEEDUP => 1,
231
    WRAPPER_SIMULATION           => SIM_INT(SIMULATION)
232
  )
233
  port map (
234
 
235
    ------------------------ Loopback and Powerdown Ports ----------------------
236
    TILE0_RXPOWERDOWN0_IN => gt_power_down,
237
    TILE0_RXPOWERDOWN1_IN => "10",
238
    TILE0_TXPOWERDOWN0_IN => gt_power_down,
239
    TILE0_TXPOWERDOWN1_IN => "10",
240
    --------------------------------- PLL Ports --------------------------------
241
    TILE0_CLK00_IN       => sys_clk,
242
    TILE0_CLK01_IN       => '0',
243
    TILE0_GTPRESET0_IN   => sys_rst,
244
    TILE0_GTPRESET1_IN   => '1',
245
    TILE0_PLLLKDET0_OUT  => gt_plllkdet_out,
246
    TILE0_PLLLKDET1_OUT  => OPEN,
247
    TILE0_RESETDONE0_OUT => gt_reset_done,
248
    TILE0_RESETDONE1_OUT => OPEN,
249
    ----------------------- Receive Ports - 8b10b Decoder ----------------------
250
    TILE0_RXCHARISK0_OUT(1) => rx_char_is_k(0),
251
    TILE0_RXCHARISK0_OUT(0) => rx_char_is_k(1),
252
    TILE0_RXCHARISK1_OUT    => OPEN,
253
    TILE0_RXDISPERR0_OUT    => OPEN,
254
    TILE0_RXDISPERR1_OUT    => OPEN,
255
    TILE0_RXNOTINTABLE0_OUT => OPEN,
256
    TILE0_RXNOTINTABLE1_OUT => OPEN,
257
    ---------------------- Receive Ports - Clock Correction --------------------
258
    TILE0_RXCLKCORCNT0_OUT => OPEN,
259
    TILE0_RXCLKCORCNT1_OUT => OPEN,
260
    --------------- Receive Ports - Comma Detection and Alignment --------------
261
    TILE0_RXENMCOMMAALIGN0_IN => '1',
262
    TILE0_RXENMCOMMAALIGN1_IN => '1',
263
    TILE0_RXENPCOMMAALIGN0_IN => '1',
264
    TILE0_RXENPCOMMAALIGN1_IN => '1',
265
    ------------------- Receive Ports - RX Data Path interface -----------------
266
    TILE0_RXDATA0_OUT(15 downto 8) => rx_data(7 downto 0),
267
    TILE0_RXDATA0_OUT(7 downto 0)  => rx_data(15 downto 8),
268
    TILE0_RXDATA1_OUT              => OPEN,
269
    TILE0_RXRESET0_IN              => rxreset,
270
    TILE0_RXRESET1_IN              => '1',
271
    TILE0_RXUSRCLK0_IN             => gt_usrclk2x,
272
    TILE0_RXUSRCLK1_IN             => '0',
273
    TILE0_RXUSRCLK20_IN            => gt_usrclk,
274
    TILE0_RXUSRCLK21_IN            => '0',
275
    ------- Receive Ports - RX Driver,OOB signalling,Coupling and Eq.,CDR ------
276
    TILE0_GATERXELECIDLE0_IN => '0',
277
    TILE0_GATERXELECIDLE1_IN => '0',
278
    TILE0_IGNORESIGDET0_IN   => '0',
279
    TILE0_IGNORESIGDET1_IN   => '0',
280
    TILE0_RXELECIDLE0_OUT    => rx_enter_elecidle,
281
    TILE0_RXELECIDLE1_OUT    => OPEN,
282
    TILE0_RXN0_IN            => arp_rxn,
283
    TILE0_RXN1_IN            => '0',
284
    TILE0_RXP0_IN            => arp_rxp,
285
    TILE0_RXP1_IN            => '0',
286
    ----------- Receive Ports - RX Elastic Buffer and Phase Alignment ----------
287
    TILE0_RXSTATUS0_OUT => rx_status,
288
    TILE0_RXSTATUS1_OUT => OPEN,
289
    -------------- Receive Ports - RX Pipe Control for PCI Express -------------
290
    TILE0_PHYSTATUS0_OUT => phystatus,
291
    TILE0_PHYSTATUS1_OUT => OPEN,
292
    TILE0_RXVALID0_OUT   => gt_rx_valid,
293
    TILE0_RXVALID1_OUT   => OPEN,
294
    -------------------- Receive Ports - RX Polarity Control -------------------
295
    TILE0_RXPOLARITY0_IN => rx_polarity,
296
    TILE0_RXPOLARITY1_IN => '0',
297
    ---------------------------- TX/RX Datapath Ports --------------------------
298
    TILE0_GTPCLKOUT0_OUT => gt_refclk,
299
    TILE0_GTPCLKOUT1_OUT => OPEN,
300
    ------------------- Transmit Ports - 8b10b Encoder Control -----------------
301
    TILE0_TXCHARDISPMODE0_IN(1) => tx_char_disp_mode(0),
302
    TILE0_TXCHARDISPMODE0_IN(0) => tx_char_disp_mode(1),
303
    TILE0_TXCHARDISPMODE1_IN(1) => '0',
304
    TILE0_TXCHARDISPMODE1_IN(0) => '0',
305
    TILE0_TXCHARISK0_IN(1)   => tx_char_is_k(0),
306
    TILE0_TXCHARISK0_IN(0)   => tx_char_is_k(1),
307
    TILE0_TXCHARISK1_IN(1)   => '0',
308
    TILE0_TXCHARISK1_IN(0)   => '0',
309
    ------------------ Transmit Ports - TX Data Path interface -----------------
310
    TILE0_TXDATA0_IN(15 downto 8) => tx_data(7 downto 0),
311
    TILE0_TXDATA0_IN(7 downto 0)  => tx_data(15 downto 8),
312
    TILE0_TXDATA1_IN(15 downto 8) => x"00",
313
    TILE0_TXDATA1_IN(7 downto 0)  => x"00",
314
    TILE0_TXUSRCLK0_IN            => gt_usrclk2x,
315
    TILE0_TXUSRCLK1_IN            => '0',
316
    TILE0_TXUSRCLK20_IN           => gt_usrclk,
317
    TILE0_TXUSRCLK21_IN           => '0',
318
    --------------- Transmit Ports - TX Driver and OOB signalling --------------
319
    TILE0_TXN0_OUT => arp_txn,
320
    TILE0_TXN1_OUT => OPEN,
321
    TILE0_TXP0_OUT => arp_txp,
322
    TILE0_TXP1_OUT => OPEN,
323
    ----------------- Transmit Ports - TX Ports for PCI Express ----------------
324
    TILE0_TXDETECTRX0_IN => tx_rcvr_det,
325
    TILE0_TXDETECTRX1_IN => '0',
326
    TILE0_TXELECIDLE0_IN => gt_tx_elec_idle,
327
    TILE0_TXELECIDLE1_IN => '0'  );
328
 
329
  sys_rst       <= not sys_rst_n;
330
  gt_refclk_out <= gt_refclk(0);
331
 
332
end rtl;
333
 

powered by: WebSVN 2.1.0

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