1 --////////////////////////////////////////////////////////////////////////////////
4 --// /___/ \ / Vendor: Xilinx
5 --// \ \ \/ Version : 2.
7
6 --// \ \ Application : 7 Series FPGAs Transceivers Wizard
7 --// / / Filename : uhtr_trig_rx_startup_fsm.vhd
13 -- Description : This module performs RX reset and initialization.
17 -- Module uHTR_trig_rx_startup_fsm
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.NUMERIC_STD.
ALL;
75 Generic( EXAMPLE_SIMULATION : := 0;
77 EQ_MODE : := "DFE";
--RX Equalisation Mode; set to DFE or LPM
78 STABLE_CLOCK_PERIOD : range 4 to 250 := 8;
--Period of the stable clock driving this state-machine, unit is [ns]
79 RETRY_COUNTER_BITWIDTH : range 2 to 8 := 8;
80 TX_QPLL_USED : := False;
-- the TX and RX Reset FSMs must
81 RX_QPLL_USED : := False;
-- share these two generic values
82 PHASE_ALIGNMENT_MANUAL : := True -- Decision if a manual phase-alignment is necessary or the automatic
83 -- is enough. For single-lane applications the automatic alignment is
86 Port ( STABLE_CLOCK : in ;
--Stable Clock, either a stable clock from the PCB
87 --or reference-clock present at startup.
88 RXUSERCLK : in ;
--RXUSERCLK as used in the design
89 SOFT_RESET : in ;
--User Reset, can be pulled any
90 QPLLREFCLKLOST : in ;
--QPLL Reference-clock for the GT is lost
91 CPLLREFCLKLOST : in ;
--CPLL Reference-clock for the GT is lost
92 QPLLLOCK : in ;
--Lock Detect from the QPLL of the GT
93 CPLLLOCK : in ;
--Lock Detect from the CPLL of the GT
97 RECCLK_MONITOR_RESTART : in :='0';
99 TXUSERRDY : in ;
--TXUSERRDY from GT
100 DONT_RESET_ON_DATA_ERROR : in ;
--Used to control the Auto-Reset of FSM when Data Error is detected
101 GTRXRESET : out :='0';
102 MMCM_RESET : out :='1';
103 QPLL_RESET : out :='0';
--Reset QPLL (only if RX uses QPLL)
104 CPLL_RESET : out :='0';
--Reset CPLL (only if RX uses CPLL)
105 RX_FSM_RESET_DONE : out ;
--Reset-sequence has sucessfully been finished.
106 RXUSERRDY : out :='0';
107 RUN_PHALIGNMENT : out ;
108 PHALIGNMENT_DONE : in ;
109 RESET_PHALIGNMENT : out :='0';
114 RETRY_COUNTER : out (RETRY_COUNTER_BITWIDTH-1 downto 0):=(others=>'0')-- Number of
115 -- Retries it took to get the transceiver up and running
117 end uHTR_trig_RX_STARTUP_FSM;
120 -- * Timing depends on the frequency of the stable clock. Hence counters-sizes
121 -- are calculated at design-time based on the Generics
123 -- * if either of the PLLs is reset during TX-startup, it does not need to be reset again by RX
124 -- => signal which PLL has been reset
131 component uHTR_trig_sync_block
133 INITIALISE : (
1 downto 0) := "
00"
143 type rx_rst_fsm_type is(
144 INIT, ASSERT_ALL_RESETS, RELEASE_PLL_RESET, VERIFY_RECCLK_STABLE,
145 RELEASE_MMCM_RESET, WAIT_RESET_DONE, DO_PHASE_ALIGNMENT,
146 MONITOR_DATA_VALID, FSM_DONE);
148 signal rx_state : rx_rst_fsm_type := INIT;
150 constant MMCM_LOCK_CNT_MAX : := 1024;
151 constant STARTUP_DELAY : := 500;
--AR43482: Transceiver needs to wait for 500 ns
after configuration
152 constant WAIT_CYCLES : := STARTUP_DELAY / STABLE_CLOCK_PERIOD;
-- Number of Clock-Cycles to wait after configuration
153 constant WAIT_MAX : := WAIT_CYCLES + 10;
-- 500 ns plus some additional margin
154 constant WAIT_TIMEOUT_2ms : := 2000000 / STABLE_CLOCK_PERIOD;
-- 2 ms time-out
155 constant WAIT_TLOCK_MAX : := 100000 / STABLE_CLOCK_PERIOD;
--100 us time-out
156 constant WAIT_TIMEOUT_500us : := 500000 / STABLE_CLOCK_PERIOD;
--500 us time-out
157 constant WAIT_TIMEOUT_1us : := 1000 / STABLE_CLOCK_PERIOD;
--1 us time-out
158 constant WAIT_TIMEOUT_100us : := 100000 / STABLE_CLOCK_PERIOD;
--100 us time-out
159 constant WAIT_TIME_ADAPT : := (37000000 /(1.
6))/STABLE_CLOCK_PERIOD;
161 signal init_wait_count : range 0 to WAIT_MAX:=0;
162 signal init_wait_done : := '0';
163 signal pll_reset_asserted : := '0';
164 signal rx_fsm_reset_done_int : := '0';
165 signal rx_fsm_reset_done_int_s2 : := '0';
166 signal rx_fsm_reset_done_int_s3 : := '0';
168 signal rxresetdone_s2 : := '0';
169 signal rxresetdone_s3 : := '0';
171 constant MAX_RETRIES : := 2**RETRY_COUNTER_BITWIDTH-1;
172 signal retry_counter_int : range 0 to MAX_RETRIES := 0;
173 signal time_out_counter : range 0 to WAIT_TIMEOUT_2ms := 0;
174 signal recclk_mon_restart_count : range 0 to 3:= 0;
175 signal recclk_mon_count_reset : := '0';
177 signal reset_time_out : := '0';
178 signal time_out_2ms : := '0';
--\Flags that the various time-out points
179 signal time_tlock_max : := '0';
--|have been reached.
180 signal time_out_500us : := '0';
--|
181 signal time_out_1us : := '0';
--/
182 signal time_out_100us : := '0';
--/
183 signal check_tlock_max : := '0';
185 signal mmcm_lock_count : range 0 to MMCM_LOCK_CNT_MAX-1:=0;
186 signal mmcm_lock_int : := '0';
187 signal mmcm_lock_i : := '0';
188 signal mmcm_lock_reclocked : := '0';
190 signal run_phase_alignment_int: := '0';
191 signal run_phase_alignment_int_s2 : := '0';
192 signal run_phase_alignment_int_s3 : := '0';
194 constant MAX_WAIT_BYPASS : := 5000;
--5000 RXUSRCLK cycles is the max for Multi lanes designs
195 signal wait_bypass_count : range 0 to MAX_WAIT_BYPASS-1;
196 signal time_out_wait_bypass : := '0';
197 signal time_out_wait_bypass_s2 : := '0';
198 signal time_out_wait_bypass_s3 : := '0';
200 signal refclk_lost : ;
202 signal time_out_adapt : := '0';
203 signal adapt_count_reset : := '0';
204 signal adapt_count : range 0 to WAIT_TIME_ADAPT-1;
206 signal data_valid_sync: := '0';
208 signal cplllock_sync: := '0';
209 signal qplllock_sync: := '0';
210 signal cplllock_prev: := '0';
211 signal qplllock_prev: := '0';
212 signal cplllock_ris_edge: := '0';
213 signal qplllock_ris_edge: := '0';
216 --Alias section, signals used within this module mapped to output ports:
217 RETRY_COUNTER <= (TO_UNSIGNED(retry_counter_int,RETRY_COUNTER_BITWIDTH));
218 RUN_PHALIGNMENT <= run_phase_alignment_int;
219 RX_FSM_RESET_DONE <= rx_fsm_reset_done_int;
221 process(STABLE_CLOCK)
223 if rising_edge(STABLE_CLOCK) then
224 -- The counter starts running when configuration has finished and
225 -- the clock is stable. When its maximum count-value has been reached,
226 -- the 500 ns from Answer
Record 43482 have been passed.
227 if init_wait_count = WAIT_MAX then
228 init_wait_done <= '1';
230 init_wait_count <= init_wait_count + 1;
236 adapt_wait_sim:if(EXAMPLE_SIMULATION = 1) generate
237 time_out_adapt <= '1';
240 adapt_wait_hw:if(EXAMPLE_SIMULATION = 0) generate
241 process(STABLE_CLOCK)
243 if rising_edge(STABLE_CLOCK) then
244 if(adapt_count_reset = '1') then
246 time_out_adapt <= '0';
247 elsif(adapt_count = WAIT_TIME_ADAPT -1) then
248 time_out_adapt <= '1';
250 adapt_count <= adapt_count + 1;
256 retries_recclk_monitor:
process(STABLE_CLOCK)
258 --This counter monitors, how many retries the RECCLK monitor
259 --runs. If during startup too many retries are necessary, the whole
260 --initialisation-process of the transceivers gets restarted.
261 if rising_edge(STABLE_CLOCK) then
262 if recclk_mon_count_reset = '1' then
263 recclk_mon_restart_count <= 0;
264 elsif RECCLK_MONITOR_RESTART = '1' then
265 if recclk_mon_restart_count = 3 then
266 recclk_mon_restart_count <= 0;
268 recclk_mon_restart_count <= recclk_mon_restart_count + 1;
274 timeouts:
process(STABLE_CLOCK)
276 if rising_edge(STABLE_CLOCK) then
277 -- One common large counter for generating three time-out signals.
278 -- Intermediate time-outs are derived from calculated values, based
279 -- on the period of the provided clock.
280 if reset_time_out = '1' then
281 time_out_counter <= 0;
283 time_tlock_max <= '0';
284 time_out_500us <= '0';
286 time_out_100us <= '0';
288 if time_out_counter = WAIT_TIMEOUT_2ms then
291 time_out_counter <= time_out_counter + 1;
294 if (time_out_counter > WAIT_TLOCK_MAX) and (check_tlock_max='1') then
295 time_tlock_max <= '1';
298 if time_out_counter = WAIT_TIMEOUT_500us then
299 time_out_500us <= '1';
302 if time_out_counter = WAIT_TIMEOUT_1us then
306 if time_out_counter = WAIT_TIMEOUT_100us then
307 time_out_100us <= '1';
315 mmcm_lock_wait:
process(STABLE_CLOCK)
317 --The lock-signal from the MMCM is not immediately used but
318 --enabling a counter. Only when the counter hits its maximum,
319 --the MMCM is considered as "really" locked.
320 --The counter avoids that the FSM already starts on only a
321 --coarse lock of the MMCM (=toggling of the LOCK-signal).
322 if rising_edge(STABLE_CLOCK) then
323 if mmcm_lock_i = '0' then
324 mmcm_lock_count <= 0;
325 mmcm_lock_reclocked <= '0';
327 if mmcm_lock_count < MMCM_LOCK_CNT_MAX - 1 then
328 mmcm_lock_count <= mmcm_lock_count + 1;
330 mmcm_lock_reclocked <= '1';
337 -- Clock Domain Crossing
339 sync_run_phase_alignment_int : uHTR_trig_sync_block
343 data_in => run_phase_alignment_int ,
344 data_out => run_phase_alignment_int_s2
347 sync_rx_fsm_reset_done_int : uHTR_trig_sync_block
351 data_in => rx_fsm_reset_done_int,
352 data_out => rx_fsm_reset_done_int_s2
357 if rising_edge(RXUSERCLK) then
358 run_phase_alignment_int_s3 <= run_phase_alignment_int_s2;
360 rx_fsm_reset_done_int_s3 <= rx_fsm_reset_done_int_s2;
364 sync_RXRESETDONE : uHTR_trig_sync_block
368 data_in => RXRESETDONE,
369 data_out => rxresetdone_s2
372 sync_time_out_wait_bypass : uHTR_trig_sync_block
376 data_in => time_out_wait_bypass,
377 data_out => time_out_wait_bypass_s2
380 sync_mmcm_lock_reclocked : uHTR_trig_sync_block
384 data_in => MMCM_LOCK,
385 data_out => mmcm_lock_i
388 sync_data_valid : uHTR_trig_sync_block
392 data_in => DATA_VALID,
393 data_out => data_valid_sync
397 process(STABLE_CLOCK)
399 if rising_edge(STABLE_CLOCK) then
400 rxresetdone_s3 <= rxresetdone_s2;
402 time_out_wait_bypass_s3 <= time_out_wait_bypass_s2;
403 cplllock_prev <= cplllock_sync;
404 qplllock_prev <= qplllock_sync;
408 sync_CPLLLOCK : uHTR_trig_sync_block
413 data_out => cplllock_sync
416 sync_QPLLLOCK : uHTR_trig_sync_block
421 data_out => qplllock_sync
425 process (STABLE_CLOCK)
427 if rising_edge(STABLE_CLOCK) then
428 if(SOFT_RESET = '1' ) then
429 cplllock_ris_edge <= '0';
430 elsif((cplllock_prev = '0') and (cplllock_sync = '1')) then
431 cplllock_ris_edge <= '1';
432 elsif(rx_state = ASSERT_ALL_RESETS or rx_state = RELEASE_PLL_RESET) then
433 cplllock_ris_edge <= cplllock_ris_edge;
435 cplllock_ris_edge <= '0';
440 process (STABLE_CLOCK)
442 if rising_edge(STABLE_CLOCK) then
443 if(SOFT_RESET = '1' ) then
444 qplllock_ris_edge <= '0';
445 elsif((qplllock_prev = '0') and (qplllock_sync = '1')) then
446 qplllock_ris_edge <= '1';
447 elsif(rx_state = ASSERT_ALL_RESETS or rx_state = RELEASE_PLL_RESET) then
448 qplllock_ris_edge <= qplllock_ris_edge;
450 qplllock_ris_edge <= '0';
457 timeout_buffer_bypass:
process(RXUSERCLK)
459 if rising_edge(RXUSERCLK) then
460 if run_phase_alignment_int_s3 = '0' then
461 wait_bypass_count <= 0;
462 time_out_wait_bypass <= '0';
463 elsif (run_phase_alignment_int_s3 = '1') and (rx_fsm_reset_done_int_s3 = '0') then
464 if wait_bypass_count = MAX_WAIT_BYPASS - 1 then
465 time_out_wait_bypass <= '1';
467 wait_bypass_count <= wait_bypass_count + 1;
473 refclk_lost <= '1' when ((RX_QPLL_USED and QPLLREFCLKLOST='1') or (not RX_QPLL_USED and CPLLREFCLKLOST='1')) else '0';
477 --FSM for resetting the GTX/GTH/GTP in the 7-series.
478 --~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
480 -- Following steps are performed:
481 -- 1)
After configuration wait for approximately
500 ns as specified
in
482 -- answer-record 43482
483 -- 2)
Assert all resets
on the GT
and on an MMCM potentially connected.
484 -- After that wait until a reference-clock has been detected.
485 -- 3)
Release the reset
to the GT
and wait until the GT-PLL has locked.
486 -- 4)
Release the MMCM-reset
and wait until the MMCM has signalled lock.
487 -- Also get info from the TX-side which PLL has been reset.
488 -- 5)
Wait for the RESET_DONE-signal from the GT.
489 -- 6)
Signal to start the phase-alignment
procedure and wait for it
to
491 -- 7) Reset-sequence has successfully run through.
Signal this
to the
492 -- rest of the design by asserting RX_FSM_RESET_DONE.
494 reset_fsm:
process(STABLE_CLOCK)
496 if rising_edge(STABLE_CLOCK) then
497 if (SOFT_RESET = '1' or (not(rx_state = INIT) and not(rx_state = ASSERT_ALL_RESETS) and refclk_lost = '1')) then
502 rx_fsm_reset_done_int <= '0';
505 pll_reset_asserted <= '0';
506 reset_time_out <= '1';
507 retry_counter_int <= 0;
508 run_phase_alignment_int <= '0';
509 check_tlock_max <= '0';
510 RESET_PHALIGNMENT <= '1';
511 recclk_mon_count_reset <= '1';
512 adapt_count_reset <= '1';
522 --Initial state after configuration. This state will be left after
523 --approx. 500 ns
and not be re-entered.
524 if init_wait_done = '1' then
525 rx_state <= ASSERT_ALL_RESETS;
528 when ASSERT_ALL_RESETS =>
529 --This is the state into which the FSM will always jump back if any
530 --time-outs will occur.
531 --The number of retries is reported on the output RETRY_COUNTER. In
532 --case the transceiver never comes up for some reason, this machine
533 --will still continue its best and rerun until the FPGA is turned off
534 --or the transceivers come up correctly.
535 if RX_QPLL_USED and not TX_QPLL_USED then
536 if pll_reset_asserted = '0' then
538 pll_reset_asserted <= '1';
542 elsif not RX_QPLL_USED and TX_QPLL_USED then
543 if pll_reset_asserted = '0' then
545 pll_reset_asserted <= '1';
554 run_phase_alignment_int <= '0';
555 RESET_PHALIGNMENT <= '1';
556 check_tlock_max <= '0';
557 recclk_mon_count_reset <= '1';
558 adapt_count_reset <= '1';
561 if (RX_QPLL_USED and not TX_QPLL_USED and (QPLLREFCLKLOST = '0') and pll_reset_asserted = '1') or
562 (not RX_QPLL_USED and TX_QPLL_USED and (CPLLREFCLKLOST = '0') and pll_reset_asserted = '1') or
563 (not RX_QPLL_USED and not TX_QPLL_USED and (CPLLREFCLKLOST = '0') ) or
564 (RX_QPLL_USED and TX_QPLL_USED and (QPLLREFCLKLOST = '0') ) then
565 rx_state <= RELEASE_PLL_RESET;
566 reset_time_out <= '1';
569 when RELEASE_PLL_RESET =>
570 --PLL-Reset of the GTX gets released and the time-out counter
572 pll_reset_asserted <= '0';
573 reset_time_out <= '0';
576 if (RX_QPLL_USED and not TX_QPLL_USED and (qplllock_ris_edge = '1')) or
577 (not RX_QPLL_USED and TX_QPLL_USED and (cplllock_ris_edge = '1')) then
578 rx_state <= VERIFY_RECCLK_STABLE;
579 reset_time_out <= '1';
580 recclk_mon_count_reset <= '0';
581 adapt_count_reset <= '0';
583 elsif (RX_QPLL_USED and (qplllock_sync = '1')) or
584 (not RX_QPLL_USED and (cplllock_sync = '1')) then
585 rx_state <= VERIFY_RECCLK_STABLE;
586 reset_time_out <= '1';
587 recclk_mon_count_reset <= '0';
588 adapt_count_reset <= '0';
591 if time_out_2ms = '1' then
592 if retry_counter_int = MAX_RETRIES then
593 -- If too many retries are performed compared to what is specified in
594 -- the generic, the counter simply wraps around.
595 retry_counter_int <= 0;
597 retry_counter_int <= retry_counter_int + 1;
599 rx_state <= ASSERT_ALL_RESETS;
602 when VERIFY_RECCLK_STABLE =>
603 --reset_time_out <= '0';
604 --Time-out counter is not released in this state as here the FSM
605 --does not wait for a certain period of but checks on the number
606 --of retries in the RECCLK monitor
608 if RECCLK_STABLE = '1' then
609 rx_state <= RELEASE_MMCM_RESET;
610 reset_time_out <= '1';
614 if recclk_mon_restart_count = 2 then
615 --If two retries are performed in the RECCLK monitor
616 --the whole initialisation-sequence gets restarted.
617 if retry_counter_int = MAX_RETRIES then
618 -- If too many retries are performed compared to what is specified in
619 -- the generic, the counter simply wraps around.
620 retry_counter_int <= 0;
622 retry_counter_int <= retry_counter_int + 1;
624 rx_state <= ASSERT_ALL_RESETS;
627 when RELEASE_MMCM_RESET =>
628 --Release of the MMCM-reset. Waiting for the MMCM to lock.
629 reset_time_out <= '0';
630 check_tlock_max <= '1';
633 if mmcm_lock_reclocked = '1' then
634 rx_state <= WAIT_RESET_DONE;
635 reset_time_out <= '1';
638 if time_tlock_max = '1' and reset_time_out = '0' then
639 if retry_counter_int = MAX_RETRIES then
640 -- If too many retries are performed compared to what is specified in
641 -- the generic, the counter simply wraps around.
642 retry_counter_int <= 0;
644 retry_counter_int <= retry_counter_int + 1;
646 rx_state <= ASSERT_ALL_RESETS;
649 when WAIT_RESET_DONE =>
650 --When TXOUTCLK is the source for RXUSRCLK, RXUSERRDY depends on TXUSERRDY
651 --If RXOUTCLK is the source for RXUSRCLK, TXUSERRDY can be tied to '1'
652 if TXUSERRDY = '1' then
655 reset_time_out <= '0';
656 if rxresetdone_s3 = '1' then
657 rx_state <= DO_PHASE_ALIGNMENT;
658 reset_time_out <= '1';
661 if time_out_2ms = '1' and reset_time_out = '0' then
662 if retry_counter_int = MAX_RETRIES then
663 -- If too many retries are performed compared to what is specified in
664 -- the generic, the counter simply wraps around.
665 retry_counter_int <= 0;
667 retry_counter_int <= retry_counter_int + 1;
669 rx_state <= ASSERT_ALL_RESETS;
672 when DO_PHASE_ALIGNMENT =>
673 --The direct handling of the signals for the Phase Alignment is done outside
674 --this state-machine.
675 RESET_PHALIGNMENT <= '0';
676 run_phase_alignment_int <= '1';
677 reset_time_out <= '0';
679 if PHALIGNMENT_DONE = '1' then
680 rx_state <= MONITOR_DATA_VALID;
681 reset_time_out <= '1';
684 if time_out_wait_bypass_s3 = '1' then
685 if retry_counter_int = MAX_RETRIES then
686 -- If too many retries are performed compared to what is specified in
687 -- the generic, the counter simply wraps around.
688 retry_counter_int <= 0;
690 retry_counter_int <= retry_counter_int + 1;
692 rx_state <= ASSERT_ALL_RESETS;
695 when MONITOR_DATA_VALID =>
696 reset_time_out <= '0';
698 if(time_out_100us = '1' and data_valid_sync ='0' and DONT_RESET_ON_DATA_ERROR = '0' and reset_time_out = '0') then
699 rx_state <= ASSERT_ALL_RESETS;
700 rx_fsm_reset_done_int <= '0';
701 elsif (data_valid_sync = '1') then
702 rx_state <= FSM_DONE;
703 rx_fsm_reset_done_int <= '0';
704 reset_time_out <= '1';
708 reset_time_out <= '0';
709 if data_valid_sync = '0' then
710 rx_fsm_reset_done_int <= '0';
711 reset_time_out <= '1';
712 rx_state <= MONITOR_DATA_VALID;
713 elsif(time_out_1us = '1' and reset_time_out = '0') then
714 rx_fsm_reset_done_int <= '1';
717 if(time_out_adapt = '1') then
718 if((GT_TYPE = "GTX" ) and EQ_MODE = "DFE") then