1 --////////////////////////////////////////////////////////////////////////////////     4 --// /___/  \  /    Vendor: Xilinx      5 --// \   \   \/     Version : 2.5     6 --//  \   \         Application : 7 Series FPGAs Transceivers Wizard      7 --//  /   /         Filename : gtwizard_v2_5_auto_phase_align.vhd    13 --  Description : The logic below implements the procedure to do automatic phase-alignment     14 --                on the 7-series GTX as described in ug476pdf, version 1.3,    15 --                Chapters "Using the TX Phase Alignment to Bypass the TX Buffer"    16 --                and "Using the RX Phase Alignment to Bypass the RX Elastic Buffer"    17 --                Should the logic below differ from what is described in a later version      18 --                of the user-guide, you are using an auto-alignment block, which is     19 --                out of date and needs to be updated for safe operation.    23 -- Module gtwizard_v2_5_AUTO_PHASE_ALIGN    24 -- Generated by Xilinx 7 Series FPGAs Transceivers Wizard    27 -- (c) Copyright 2010-2012 Xilinx, Inc. All rights reserved.    29 -- This file contains confidential and proprietary information    30 -- of Xilinx, Inc. and is protected under U.S. and    31 -- international copyright and other intellectual property    35 -- This disclaimer is not a license and does not grant any    36 -- rights to the materials distributed herewith. Except as    37 -- otherwise provided in a valid license issued to you by    38 -- Xilinx, and to the maximum extent permitted by applicable    39 -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND    40 -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES    41 -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING    42 -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-    43 -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and    44 -- (2) Xilinx shall not be liable (whether in contract or tort,    45 -- including negligence, or under any other theory of    46 -- liability) for any loss or damage of any kind or nature    47 -- related to, arising under or in connection with these    48 -- materials, including for any direct, or any indirect,    49 -- special, incidental, or consequential loss or damage    50 -- (including loss of data, profits, goodwill, or any type of    51 -- loss or damage suffered as a result of any action brought    52 -- by a third party) even if such damage or loss was    53 -- reasonably foreseeable or Xilinx had been advised of the    54 -- possibility of the same.    56 -- CRITICAL APPLICATIONS    57 -- Xilinx products are not designed or intended to be fail-    58 -- safe, or for use in any application requiring fail-safe    59 -- performance, such as life-support or safety devices or    60 -- systems, Class III medical devices, nuclear facilities,    61 -- applications related to the deployment of airbags, or any    62 -- other applications that could lead to death, personal    63 -- injury, or severe property or environmental damage    64 -- (individually and collectively, "Critical    65 -- Applications"). Customer assumes the sole risk and    66 -- liability of any use of Xilinx products in Critical    67 -- Applications, subject only to applicable laws and    68 -- regulations governing limitations on product liability.    70 -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS    71 -- PART OF THIS FILE AT ALL TIMES.     74 --*****************************************************************************    77 use IEEE.STD_LOGIC_1164.
ALL;
    81  --! @ingroup xilinx_7Series_gth7    87     Port ( STABLE_CLOCK             : in  ;
              --Stable Clock, either a stable clock from the PCB    88                                                                   --or reference-clock present at startup.    89            RUN_PHALIGNMENT          : in  ;
              --Signal from the main Reset-FSM to run the auto phase-alignment procedure    91            PHALIGNDONE              : in  ;
              --\ Phase-alignment signals from and to the    97 end Gth7AutoPhaseAligner;
   101 --  component gtwizard_v2_5_sync_block   103 --     INITIALISE : bit_vector(1 downto 0) := "00"   106 --             clk           : in  std_logic;   107 --             data_in       : in  std_logic;   108 --             data_out      : out std_logic   113     INIT, WAIT_PHRST_DONE, COUNT_PHALIGN_DONE, PHALIGN_DONE   127       sync_DLYSRESETDONE : label is "TRUE";
   177               --DLYSRESET is toggled to '1'   182           when WAIT_PHRST_DONE =>   186             --No timeout-check here as that is done in the main FSM   188           when COUNT_PHALIGN_DONE =>   190               --For GTX: Only on the second edge of the PHALIGNDONE-signal the    191               --         phase-alignment is completed   192               --For GTH, GTP: TXSYNCDONE indicates the completion of Phase Alignment out PHASE_ALIGNMENT_DONESTD_LOGIC  := '0'
 
std_logic   phaligndone_ris_edge
 
std_logic  := '0' dlysresetdone_sync
 
std_logic  := '0' phaligndone_sync
 
in DLYSRESETDONESTD_LOGIC  
 
in RUN_PHALIGNMENTSTD_LOGIC  
 
integer   range  0 to  3:= 0 count_phalign_edges
 
phase_align_auto_fsm  :=   INIT phalign_state
 
std_logic  := '0' phaligndone_prev
 
(INIT,WAIT_PHRST_DONE,COUNT_PHALIGN_DONE,PHALIGN_DONE) phase_align_auto_fsm