1 --------------------------------------------------------------------------------
4 -- /___/ \ / Vendor: Xilinx
5 -- \ \ \/ Version : 3.
6
6 -- \ \ Application : 7 Series FPGAs Transceivers Wizard
7 -- / / Filename : amc_gtx5gpd_common_reset.vhd
13 -- Description : This module performs TX reset and initialization.
17 -- Module amc_gtx5Gpd_common_reset
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 --*****************************************************************************
70 use ieee.std_logic_1164.
all;
71 use ieee.numeric_std.
all;
72 use ieee.std_logic_unsigned.
all;
74 use ieee.std_logic_textio.
all;
76 use UNISIM.VCOMPONENTS.
ALL;
81 STABLE_CLOCK_PERIOD : := 8 -- Period of the stable clock driving this state-machine, unit is [ns]
85 STABLE_CLOCK : in ;
--Stable Clock, either a stable clock from the PCB
86 SOFT_RESET : in ;
--User Reset, can be pulled any
87 COMMON_RESET : out := '0' --Reset QPLL
89 end amc_gtx5Gpd_common_reset;
94 constant STARTUP_DELAY : := 500;
--AR43482: Transceiver needs to wait for 500 ns
after configuration
95 constant WAIT_CYCLES : := STARTUP_DELAY / STABLE_CLOCK_PERIOD;
-- Number of Clock-Cycles to wait after configuration
96 constant WAIT_MAX : := WAIT_CYCLES + 10;
-- 500 ns plus some additional margin
99 signal init_wait_count : (7 downto 0) :=(others => '0');
100 signal init_wait_done : :='0';
101 signal common_reset_asserted : :='0';
102 signal common_reset_i : ;
105 INIT, ASSERT_COMMON_RESET);
107 signal state : rst_type := INIT;
110 process(STABLE_CLOCK)
112 if rising_edge(STABLE_CLOCK) then
113 -- The counter starts running when configuration has finished and
114 -- the clock is stable. When its maximum count-value has been reached,
115 -- the 500 ns from Answer
Record 43482 have been passed.
116 if init_wait_count = WAIT_MAX then
117 init_wait_done <= '1';
119 init_wait_count <= init_wait_count + 1;
124 process(STABLE_CLOCK)
126 if rising_edge(STABLE_CLOCK) then
127 if(SOFT_RESET = '1') then
129 common_reset_asserted <= '0';
135 if init_wait_done = '1' then
136 state <= ASSERT_COMMON_RESET;
139 when ASSERT_COMMON_RESET =>
140 if common_reset_asserted = '0' then
142 common_reset_asserted <= '1';