1 ------------------------------------------------------------------------------ 2 -- (c) Copyright 2008 Xilinx, Inc. All rights reserved. 4 -- This file contains confidential and proprietary information 5 -- of Xilinx, Inc. and is protected under U.S. and 6 -- international copyright and other intellectual property 10 -- This disclaimer is not a license and does not grant any 11 -- rights to the materials distributed herewith. Except as 12 -- otherwise provided in a valid license issued to you by 13 -- Xilinx, and to the maximum extent permitted by applicable 14 -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND 15 -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES 16 -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING 17 -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- 18 -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and 19 -- (2) Xilinx shall not be liable (whether in contract or tort, 20 -- including negligence, or under any other theory of 21 -- liability) for any loss or damage of any kind or nature 22 -- related to, arising under or in connection with these 23 -- materials, including for any direct, or any indirect, 24 -- special, incidental, or consequential loss or damage 25 -- (including loss of data, profits, goodwill, or any type of 26 -- loss or damage suffered as a result of any action brought 27 -- by a third party) even if such damage or loss was 28 -- reasonably foreseeable or Xilinx had been advised of the 29 -- possibility of the same. 31 -- CRITICAL APPLICATIONS 32 -- Xilinx products are not designed or intended to be fail- 33 -- safe, or for use in any application requiring fail-safe 34 -- performance, such as life-support or safety devices or 35 -- systems, Class III medical devices, nuclear facilities, 36 -- applications related to the deployment of airbags, or any 37 -- other applications that could lead to death, personal 38 -- injury, or severe property or environmental damage 39 -- (individually and collectively, "Critical 40 -- Applications"). Customer assumes the sole risk and 41 -- liability of any use of Xilinx products in Critical 42 -- Applications, subject only to applicable laws and 43 -- regulations governing limitations on product liability. 45 -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS 46 -- PART OF THIS FILE AT ALL TIMES. 55 -- Description: The AURORA_LANE module provides a full duplex 2-byte aurora 56 -- lane connection using a single GTP. The module handles lane 57 -- initialization, symbol generation and decoding as well as 58 -- error detection. It also decodes some of the channel bonding 59 -- indicator signals needed by the Global logic. 65 use IEEE.STD_LOGIC_1164.
all;
70 RX_DATA : in (15 downto 0);
-- 2-byte data bus from the GTP. 71 RX_NOT_IN_TABLE : in (1 downto 0);
-- Invalid 10-bit code was recieved. 72 RX_DISP_ERR : in (1 downto 0);
-- Disparity error detected on RX interface. 73 RX_CHAR_IS_K : in (1 downto 0);
-- Indicates which bytes of RX_DATA are control. 74 RX_CHAR_IS_COMMA : in (1 downto 0);
-- Comma received on given byte. 75 -- RX_STATUS : in std_logic_vector(5 downto 0); -- Part of GTP status and error bus. 76 RX_BUF_ERR : in ;
-- Overflow/Underflow of RX buffer detected. 77 TX_BUF_ERR : in ;
-- Overflow/Underflow of TX buffer detected. 78 RX_REALIGN : in ;
-- SERDES was realigned because of a new comma. 79 RX_POLARITY : out ;
-- Controls interpreted polarity of serial data inputs. 80 RX_RESET : out ;
-- Reset RX side of GTP logic. 81 TX_CHAR_IS_K : out (1 downto 0);
-- TX_DATA byte is a control character. 82 TX_DATA : out (15 downto 0);
-- 2-byte data bus to the GTP. 83 TX_RESET : out ;
-- Reset TX side of GTP logic. 84 -- Comma Detect Phase Align Interface 85 ENA_COMMA_ALIGN : out ;
-- Request comma alignment. 87 GEN_SCP : in ;
-- SCP generation request from TX_LL. 88 GEN_ECP : in ;
-- ECP generation request from TX_LL. 89 GEN_PAD : in ;
-- PAD generation request from TX_LL. 90 TX_PE_DATA : in (0 to 15);
-- Data from TX_LL to send over lane. 91 TX_PE_DATA_V : in ;
-- Indicates TX_PE_DATA is Valid. 92 GEN_CC : in ;
-- CC generation request from TX_LL. 94 RX_PAD : out ;
-- Indicates lane received PAD. 95 RX_PE_DATA : out (0 to 15);
-- RX data from lane to RX_LL. 96 RX_PE_DATA_V : out ;
-- RX_PE_DATA is data, not control symbol. 97 RX_SCP : out ;
-- Indicates lane received SCP. 98 RX_ECP : out ;
-- Indicates lane received ECP. 99 -- Global Logic Interface 100 GEN_A : in ;
-- 'A character' generation request from Global Logic. 101 GEN_K : in (0 to 1);
-- 'K character' generation request from Global Logic. 102 GEN_R : in (0 to 1);
-- 'R character' generation request from Global Logic. 103 GEN_V : in (0 to 1);
-- Verification data generation request. 104 LANE_UP : out ;
-- Lane is ready for bonding and verification. 105 SOFT_ERR : out ;
-- Soft error detected. 106 HARD_ERR : out ;
-- Hard error detected. 107 CHANNEL_BOND_LOAD : out ;
-- Channel Bonding done code received. 108 GOT_A : out (0 to 1);
-- Indicates lane recieved 'A character' bytes. 109 GOT_V : out ;
-- Verification symbols received. 111 USER_CLK : in ;
-- System clock for all non-GTP Aurora Logic. 112 RESET_SYMGEN : in ;
-- Reset the SYM_GEN module. 113 RESET : in );
-- Reset the lane. 118 -- External Register Declarations -- 120 signal RX_POLARITY_Buffer : ;
121 signal RX_RESET_Buffer : ;
122 signal TX_CHAR_IS_K_Buffer : (1 downto 0);
123 signal TX_DATA_Buffer : (15 downto 0);
124 signal TX_RESET_Buffer : ;
125 signal ENA_COMMA_ALIGN_Buffer : ;
126 signal RX_PAD_Buffer : ;
127 signal RX_PE_DATA_Buffer : (0 to 15);
128 signal RX_PE_DATA_V_Buffer : ;
129 signal RX_SCP_Buffer : ;
130 signal RX_ECP_Buffer : ;
131 signal LANE_UP_Buffer : ;
132 signal SOFT_ERR_Buffer : ;
133 signal HARD_ERR_Buffer : ;
134 -- signal CHANNEL_BOND_LOAD_Buffer : std_logic; 135 signal GOT_A_Buffer : (0 to 1);
136 signal GOT_V_Buffer : ;
138 -- Wire Declarations -- 142 signal gen_sp_data_i : (0 to 1);
143 signal gen_spa_data_i : (0 to 1);
147 signal enable_err_detect_i : ;
148 signal do_word_align_i : ;
149 signal hard_err_reset_i : ;
151 signal tx_char_is_k_i : (1 downto 0);
152 signal tx_data_buffer_i : (15 downto 0);
153 signal rx_data_i : (15 downto 0);
154 signal rx_char_is_k_i : (1 downto 0);
155 signal rx_char_is_comma_i : (1 downto 0);
156 signal rx_disp_err_i : (1 downto 0);
157 signal rx_not_in_table_i : (1 downto 0);
159 -- Component Declarations -- 167 RX_NOT_IN_TABLE :
in (
1 downto 0);
-- GTP received invalid 10b code. 168 RX_DISP_ERR :
in (
1 downto 0);
-- GTP received 10b code w/ wrong disparity. 169 RX_CHAR_IS_COMMA :
in (
1 downto 0);
-- GTP received a Comma. 170 RX_REALIGN :
in ;
-- GTP had to change alignment due to new comma. 171 RX_RESET :
out ;
-- Reset the RX side of the GTP. 172 TX_RESET :
out ;
-- Reset the TX side of the GTP. 173 RX_POLARITY :
out ;
-- Sets polarity used to interpet rx'ed symbols. 175 -- Comma Detect Phase Alignment Interface 177 ENA_COMMA_ALIGN :
out ;
-- Turn on SERDES Alignment in GTP. 179 -- Symbol Generator Interface 181 GEN_K :
out ;
-- Generate a comma on the MSByte of the Lane. 182 GEN_SP_DATA :
out (
0 to 1);
-- Generate SP data symbol on selected byte(s). 183 GEN_SPA_DATA :
out (
0 to 1);
-- Generate SPA data symbol on selected byte(s). 185 -- Symbol Decoder Interface 187 RX_SP :
in ;
-- Lane rx'ed SP sequence w/ + or - data. 188 RX_SPA :
in ;
-- Lane rx'ed SPA sequence. 189 RX_NEG :
in ;
-- Lane rx'ed inverted SP or SPA data. 190 DO_WORD_ALIGN :
out ;
-- Enable word alignment. 192 -- Error Detection Logic Interface 194 ENABLE_ERR_DETECT :
out ;
-- Turn on Soft Error detection. 195 HARD_ERR_RESET :
in ;
-- Reset lane due to hard error. 197 -- Global Logic Interface 199 LANE_UP :
out ;
-- Lane is initialized. 203 USER_CLK :
in ;
-- Clock for all non-GTP Aurora logic. 204 RESET :
in -- Reset Aurora Lane. 211 -- component CHBOND_COUNT_DEC 215 -- RX_STATUS : in std_logic_vector(5 downto 0); 216 -- CHANNEL_BOND_LOAD : out std_logic; 217 -- USER_CLK : in std_logic 228 -- TX_LL Interface -- See description for info about GEN_PAD and TX_PE_DATA_V. 230 GEN_SCP :
in ;
-- Generate SCP. 231 GEN_ECP :
in ;
-- Generate ECP. 232 GEN_PAD :
in ;
-- Replace LSB with Pad character. 233 TX_PE_DATA :
in (
0 to 15);
-- Data. Transmitted when TX_PE_DATA_V is asserted. 234 TX_PE_DATA_V :
in ;
-- Transmit data. 235 GEN_CC :
in ;
-- Generate Clock Correction symbols. 237 -- Global Logic Interface -- See description for info about GEN_K,GEN_R and GEN_A. 239 GEN_A :
in ;
-- Generate A character for selected bytes. 240 GEN_K :
in (
0 to 1);
-- Generate K character for selected bytes. 241 GEN_R :
in (
0 to 1);
-- Generate R character for selected bytes. 242 GEN_V :
in (
0 to 1);
-- Generate Ver data character on selected bytes. 244 -- Lane Init SM Interface 246 GEN_K_FSM :
in ;
-- Generate K character on byte 0. 247 GEN_SP_DATA :
in (
0 to 1);
-- Generate SP data character on selected bytes. 248 GEN_SPA_DATA :
in (
0 to 1);
-- Generate SPA data character on selected bytes. 252 TX_CHAR_IS_K :
out (
1 downto 0);
-- Transmit TX_DATA as a control character. 253 TX_DATA :
out (
15 downto 0);
-- Data to GTP for transmission to channel partner. 257 USER_CLK :
in -- Clock for all non-GTP Aurora Logic. 269 RX_PAD :
out ;
-- LSByte is PAD. 270 RX_PE_DATA :
out (
0 to 15);
-- Word aligned data from channel partner. 271 RX_PE_DATA_V :
out ;
-- Data is valid data and not a control character. 272 RX_SCP :
out ;
-- SCP symbol received. 273 RX_ECP :
out ;
-- ECP symbol received. 275 -- Lane Init SM Interface 277 DO_WORD_ALIGN :
in ;
-- Word alignment is allowed. 278 RX_SP :
out ;
-- SP sequence received with positive or negative data. 279 RX_SPA :
out ;
-- SPA sequence received. 280 RX_NEG :
out ;
-- Intverted data for SP or SPA received. 282 -- Global Logic Interface 284 GOT_A :
out (
0 to 1);
-- A character received on indicated byte(s). 285 GOT_V :
out ;
-- V sequence received. 289 RX_DATA :
in (
15 downto 0);
-- Raw RX data from GTP. 290 RX_CHAR_IS_K :
in (
1 downto 0);
-- Bits indicating which bytes are control characters. 291 RX_CHAR_IS_COMMA :
in (
1 downto 0);
-- Rx'ed a comma. 292 RX_CC :
out ;
-- CC sequence received. 296 USER_CLK :
in ;
-- System clock for all non-GTP Aurora Logic. 308 -- Lane Init SM Interface 310 ENABLE_ERR_DETECT :
in ;
311 HARD_ERR_RESET :
out ;
313 -- Global Logic Interface 320 RX_DISP_ERR :
in (
1 downto 0);
321 RX_NOT_IN_TABLE :
in (
1 downto 0);
337 RX_POLARITY <= RX_POLARITY_Buffer;
338 RX_RESET <= RX_RESET_Buffer;
339 TX_CHAR_IS_K <= TX_CHAR_IS_K_Buffer;
340 TX_DATA <= TX_DATA_Buffer;
341 TX_RESET <= TX_RESET_Buffer;
342 ENA_COMMA_ALIGN <= ENA_COMMA_ALIGN_Buffer;
343 RX_PAD <= RX_PAD_Buffer;
344 RX_PE_DATA <= RX_PE_DATA_Buffer;
345 RX_PE_DATA_V <= RX_PE_DATA_V_Buffer;
346 RX_SCP <= RX_SCP_Buffer;
347 RX_ECP <= RX_ECP_Buffer;
348 LANE_UP <= LANE_UP_Buffer;
349 SOFT_ERR <= SOFT_ERR_Buffer;
350 HARD_ERR <= HARD_ERR_Buffer;
351 -- CHANNEL_BOND_LOAD <= CHANNEL_BOND_LOAD_Buffer; 352 GOT_A <= GOT_A_Buffer;
353 GOT_V <= GOT_V_Buffer;
356 -- Main Body of Code -- 358 -- Buffers for twisting data from ProX -- 360 -- GTP GTPs order their data in the opposite direction from Pro GTPs. To reuse the 361 -- Pro Aurora logic, we twist the data to make it compatible. 363 TX_CHAR_IS_K_Buffer(0) <= tx_char_is_k_i(1);
364 TX_CHAR_IS_K_Buffer(1) <= tx_char_is_k_i(0);
365 TX_DATA_Buffer(7 downto 0) <= tx_data_buffer_i(15 downto 8);
366 TX_DATA_Buffer(15 downto 8) <= tx_data_buffer_i(7 downto 0);
368 rx_data_i <= RX_DATA(7 downto 0) & RX_DATA(15 downto 8);
369 rx_char_is_k_i <= RX_CHAR_IS_K(0) & RX_CHAR_IS_K(1);
370 rx_char_is_comma_i <= RX_CHAR_IS_COMMA(0) & RX_CHAR_IS_COMMA(1);
371 rx_disp_err_i <= RX_DISP_ERR(0) & RX_DISP_ERR(1);
372 rx_not_in_table_i <= RX_NOT_IN_TABLE(0) & RX_NOT_IN_TABLE(1);
375 -- Lane Initialization state machine 383 RX_NOT_IN_TABLE => RX_NOT_IN_TABLE,
384 RX_DISP_ERR => RX_DISP_ERR,
385 RX_CHAR_IS_COMMA => RX_CHAR_IS_COMMA,
386 RX_REALIGN => RX_REALIGN,
388 RX_RESET => RX_RESET_Buffer,
389 TX_RESET => TX_RESET_Buffer,
390 RX_POLARITY => RX_POLARITY_Buffer,
392 -- Comma Detect Phase Alignment Interface 394 ENA_COMMA_ALIGN => ENA_COMMA_ALIGN_Buffer,
396 -- Symbol Generator Interface 399 GEN_SP_DATA => gen_sp_data_i,
400 GEN_SPA_DATA => gen_spa_data_i,
402 -- Symbol Decoder Interface 408 DO_WORD_ALIGN => do_word_align_i,
410 -- Error Detection Logic Interface 412 HARD_ERR_RESET => hard_err_reset_i,
413 ENABLE_ERR_DETECT => enable_err_detect_i,
415 -- Global Logic Interface 417 LANE_UP => LANE_UP_Buffer,
421 USER_CLK => USER_CLK,
427 -- Channel Bonding Count Decode module 429 -- chbond_count_dec_i : CHBOND_COUNT_DEC 433 -- RX_STATUS => RX_STATUS, 434 -- CHANNEL_BOND_LOAD => CHANNEL_BOND_LOAD_Buffer, 435 -- USER_CLK => USER_CLK 440 -- Symbol Generation module 451 TX_PE_DATA => TX_PE_DATA,
452 TX_PE_DATA_V => TX_PE_DATA_V,
455 -- Global Logic Interface 462 -- Lane Init SM Interface 464 GEN_K_FSM => gen_k_i,
465 GEN_SP_DATA => gen_sp_data_i,
466 GEN_SPA_DATA => gen_spa_data_i,
470 TX_CHAR_IS_K => tx_char_is_k_i,
471 TX_DATA => tx_data_buffer_i,
479 -- Symbol Decode module 487 RX_PAD => RX_PAD_Buffer,
488 RX_PE_DATA => RX_PE_DATA_Buffer,
489 RX_PE_DATA_V => RX_PE_DATA_V_Buffer,
490 RX_SCP => RX_SCP_Buffer,
491 RX_ECP => RX_ECP_Buffer,
493 -- Lane Init SM Interface 495 DO_WORD_ALIGN => do_word_align_i,
500 -- Global Logic Interface 502 GOT_A => GOT_A_Buffer,
503 GOT_V => GOT_V_Buffer,
507 RX_DATA => rx_data_i,
508 RX_CHAR_IS_K => rx_char_is_k_i,
509 RX_CHAR_IS_COMMA => rx_char_is_comma_i,
514 USER_CLK => USER_CLK,
520 -- Error Detection module 526 -- Lane Init SM Interface 528 ENABLE_ERR_DETECT => enable_err_detect_i,
529 HARD_ERR_RESET => hard_err_reset_i,
531 -- Global Logic Interface 533 SOFT_ERR => SOFT_ERR_Buffer,
534 HARD_ERR => HARD_ERR_Buffer,
538 RX_DISP_ERR => rx_disp_err_i,
539 RX_NOT_IN_TABLE => rx_not_in_table_i,
540 RX_BUF_ERR => RX_BUF_ERR,
541 TX_BUF_ERR => TX_BUF_ERR,
542 RX_REALIGN => RX_REALIGN,