1 --////////////////////////////////////////////////////////////////////////////////
4 --// /___/ \ / Vendor: Xilinx
5 --// \ \ \/ Version : 2.
5
6 --// \ \ Application : 7 Series FPGAs Transceivers Wizard
7 --// / / Filename :s6link_adapt_top_lpm.vhd
13 -- Description : This module performs TX reset and initialization.
17 -- Module S6Link_adapt_top_lpm
18 -- Generated by Xilinx 7 Series FPGAs Transceivers Wizard
21 -- (c) Copyright 2010-2012 Xilinx, Inc. All rights reserved.
23 -- This file contains confidential and proprietary information
24 -- of Xilinx, Inc. and is protected under U.S. and
25 -- international copyright and other intellectual property
29 -- This disclaimer is not a license and does not grant any
30 -- rights to the materials distributed herewith. Except as
31 -- otherwise provided in a valid license issued to you by
32 -- Xilinx, and to the maximum extent permitted by applicable
33 -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS"
AND
34 -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
35 -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
36 -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
37 -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
38 -- (2) Xilinx shall
not be liable (whether
in contract
or tort,
39 -- including negligence, or under any other theory of
40 -- liability) for any loss or damage of any kind or nature
41 -- related to, arising under or in connection with these
42 -- materials, including for any direct, or any indirect,
43 -- special, incidental, or consequential loss or damage
44 -- (including loss of data, profits, goodwill, or any type of
45 -- loss or damage suffered as a result of any action brought
46 -- by a third party) even if such damage or loss was
47 -- reasonably foreseeable or Xilinx had been advised of the
48 -- possibility of the same.
50 -- CRITICAL APPLICATIONS
51 -- Xilinx products are not designed or intended to be fail-
52 -- safe, or for use in any application requiring fail-safe
53 -- performance, such as life-support or safety devices or
54 -- systems, Class III medical devices, nuclear facilities,
55 -- applications related to the deployment of airbags, or any
56 -- other applications that could lead to death, personal
57 -- injury, or severe property or environmental damage
58 -- (individually and collectively, "Critical
59 -- Applications"). Customer assumes the sole risk and
60 -- liability of any use of Xilinx products in Critical
61 -- Applications, subject only to applicable laws and
62 -- regulations governing limitations on product liability.
64 -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
65 -- PART OF THIS FILE AT ALL TIMES.
68 --*****************************************************************************
71 use IEEE.STD_LOGIC_1164.
ALL;
72 use IEEE.STD_LOGIC_UNSIGNED.
ALL;
73 use IEEE.STD_LOGIC_ARITH.
ALL;
74 use IEEE.NUMERIC_STD.
ALL;
78 TIMER : range 0 to 4095:= 150
88 DO : in (15 downto 0);
90 DADDR : out (8 downto 0);
91 DI : out (15 downto 0);
100 DEBUG : out (53 downto 0)
102 end S6Link_ADAPT_TOP_LPM;
108 WAIT_CYC :
range 0 to 16 :=
10
113 DO :
in (
15 downto 0);
115 DADDR :
out (
8 downto 0);
119 curr_state_debug :
out (
3 downto 0);
120 counter_debug :
out (
2 downto 0);
127 usr_clk:
range 0 to 4095 :=
3
133 DO :
in (
15 downto 0);
134 holds :
out (
1 downto 0);
135 DI :
out (
15 downto 0);
136 DADDR :
out (
8 downto 0);
137 DWE,DEN,kill3 :
out ;
138 state :
out (
4 downto 0);
139 count_lock_out :
out (
31 downto 0);
140 store_di0 :
out (
15 downto 0);
141 start,enable,kill0,kill1,kill2,lock0,lock1,lock2,lock3 :
out
146 signal start_done : ;
152 signal daddr_starter : (8 downto 0);
153 signal den_starter : ;
154 signal dwe_starter : ;
156 signal daddr_lock : (8 downto 0);
159 signal di_lock : (15 downto 0);
160 signal holds : (1 downto 0);
162 signal lock_done_r, lock_done_r2 : ;
165 signal lock_statek : (4 downto 0);
166 signal lock_countk : (31 downto 0);
167 signal lock0, lock1, lock2, lock3 : ;
168 signal starter_state : (3 downto 0);
169 signal starter_count : (2 downto 0);
170 signal starter_rst_int : ;
171 signal lock_done_rise : ;
172 signal store_di0k : (15 downto 0);
173 signal lock_state : (4 downto 0);
174 signal lock_count : (31 downto 0);
175 signal store_di0 : (15 downto 0);
176 signal start, enable, kill0, kill1, kill2 : ;
179 ------------------------------------------------------------/
180 rst <= ((GTRXRESET or RXPMARESET or RXDFELPMRESET) and EN);
182 rst_lock <= not(start_done);
183 done_pre <= lock_done;
184 DONE <= done_pre and start_done;
--So that DONE goes low immediately after any of RESET's is asserted
189 if rising_edge(DCLK) then
190 lock_done_r <= lock_done;
191 lock_done_r2 <= lock_done_r;
195 lock_done_rise <=
not(lock_done_r2)
and lock_done_r;
197 DEBUG <= lock_state(4 downto 0) & lock_count(31 downto 9) & store_di0(15 downto 0) & lock0 & lock1 & lock2 & lock3 & start & enable & kill0 & kill1 & kill2 & rst_lock;
202 --When a block is not active, it will hold DADDR,DI,DEN,DWE low
203 DADDR <= (others => '0') when (en_b='1') else (daddr_starter or daddr_lock);
204 DI <= (others => '0') when (en_b='1') else di_lock;
205 DEN <= '0' when (en_b='1') else (den_starter or den_lock);
206 DWE <= '0' when (en_b='1') else (dwe_starter or dwe_lock);
208 ----/***************************************
209 ---- Sequence of operation:
210 ---- -adapt_starter -> triggered by any of above resets to deassert then waits for DFE LPM reset to complete
211 ---- -agc_loop_fsm -> triggered by adapt_starter completion then waits for all loops to lock
212 ----***************************************/
223 DADDR => daddr_starter,
227 curr_state_debug => starter_state
(3 downto 0),
228 counter_debug => starter_count
(2 downto 0),
229 rst_int_debug => starter_rst_int
242 holds => holds ,
--KLHOLD,KHHOLD
248 state => lock_state
(4 downto 0),
249 count_lock_out => lock_count
(31 downto 0),
250 store_di0 => store_di0,