4 ------------------------------------------------------------------------------
7 -- /___/ \ / Vendor: Xilinx
8 -- \ \ \/ Version : 1.12
9 -- \ \ Application : Virtex-6 FPGA GTX Transceiver Wizard
10 -- / / Filename : rx_sync.vhd
16 -- Module gtx_txrx_rx_sync
17 -- Generated by Xilinx Virtex-6 FPGA GTX Transceiver Wizard
20 -- (c) Copyright 2009-2011 Xilinx, Inc. All rights reserved.
22 -- This file contains confidential and proprietary information
23 -- of Xilinx, Inc. and is protected under U.S. and
24 -- international copyright and other intellectual property
28 -- This disclaimer is not a license and does not grant any
29 -- rights to the materials distributed herewith. Except as
30 -- otherwise provided in a valid license issued to you by
31 -- Xilinx, and to the maximum extent permitted by applicable
32 -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
33 -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
34 -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
35 -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
36 -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
37 -- (2) Xilinx shall not be liable (whether in contract or tort,
38 -- including negligence, or under any other theory of
39 -- liability) for any loss or damage of any kind or nature
40 -- related to, arising under or in connection with these
41 -- materials, including for any direct, or any indirect,
42 -- special, incidental, or consequential loss or damage
43 -- (including loss of data, profits, goodwill, or any type of
44 -- loss or damage suffered as a result of any action brought
45 -- by a third party) even if such damage or loss was
46 -- reasonably foreseeable or Xilinx had been advised of the
47 -- possibility of the same.
49 -- CRITICAL APPLICATIONS
50 -- Xilinx products are not designed or intended to be fail-
51 -- safe, or for use in any application requiring fail-safe
52 -- performance, such as life-support or safety devices or
53 -- systems, Class III medical devices, nuclear facilities,
54 -- applications related to the deployment of airbags, or any
55 -- other applications that could lead to death, personal
56 -- injury, or severe property or environmental damage
57 -- (individually and collectively, "Critical
58 -- Applications"). Customer assumes the sole risk and
59 -- liability of any use of Xilinx products in Critical
60 -- Applications, subject only to applicable laws and
61 -- regulations governing limitations on product liability.
63 -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
64 -- PART OF THIS FILE AT ALL TIMES.
68 use ieee.std_logic_1164.
all;
71 use UNISIM.VCOMPONENTS.
ALL;
90 --***********************************Parameter Declarations********************
92 constant DLY : := 1 ns;
94 --*******************************Register Declarations************************
107 --*******************************Wire Declarations****************************
123 --*******************************Main Body of Code****************************
125 --________________________________ State machine __________________________
126 -- This state machine manages the phase alingment procedure of the GTX on the
127 -- receive side. The module is held in reset till the usrclk source is stable
128 -- and RXRESETDONE is asserted. In the case that a MMCM is used to generate
129 -- rxusrclk, the mmcm_locked signal is used to indicate a stable usrclk source.
130 -- Once RXRESETDONE and mmcm_locked are asserted, the state machine goes
131 -- into the align_reset_r state where RXDLYALIGNRESET is asserted for 20 cycles.
132 -- After this, it goes into the wait_before_setphase_r state for 32 cycles.
133 -- After asserting RXENPMAPHASEALIGN and waiting 32 cycles, it enters the
134 -- phase_align_r state where RXPMASETPHASE is asserted for 32 clock cycles.
135 -- After the port is deasserted, the state machine goes into a wait state for
136 -- 32 cycles. This procedure is repeated 32 times.
143 begin_r <= '1' after DLY;
150 begin_r <= '0' after DLY;
177 --______ Counter for holding RXDLYALIGNRESET for 20 RXUSRCLK2 cycles ______
192 --_______Counter for waiting 32 clock cycles before RXPMASETPHASE _________
206 --_______________ Counter for holding SYNC for SYNC_CYCLES ________________
220 --__________ Counter for counting number of times sync is done ____________
234 --_______________ Assign the phase align ports into the GTX _______________
242 --_______________________ Assign the sync_done port _______________________
std_logic next_phase_align_c
out RXPMASETPHASEstd_logic
std_logic count_32_setphase_complete_r
std_logic count_32_wait_complete_r
out RXDLYALIGNDISABLEstd_logic
std_logic count_align_reset_complete_r
unsigned (4 downto 0) align_reset_counter_r
unsigned (5 downto 0) sync_done_count_r
std_logic next_wait_before_setphase_c
std_logic wait_before_setphase_r
std_logic next_wait_after_sync_c
out RXENPMAPHASEALIGNstd_logic
out RXDLYALIGNOVERRIDEstd_logic
std_logic sync_32_times_done_r
unsigned (5 downto 0) wait_before_setphase_counter_r
unsigned (5 downto 0) sync_counter_r
std_logic next_align_reset_c
out RXDLYALIGNRESETstd_logic
std_logic wait_after_sync_r