1 |
4 |
DFC |
-------------------------------------------------------------------------------
|
2 |
|
|
-- Title : Example Design Resets
|
3 |
|
|
-- Project : RXAUI
|
4 |
|
|
-------------------------------------------------------------------------------
|
5 |
|
|
-- File : rxaui_0_support_resets.vhd
|
6 |
|
|
-------------------------------------------------------------------------------
|
7 |
|
|
-- Description: This file constains the resets used by the example design
|
8 |
|
|
-------------------------------------------------------------------------------
|
9 |
|
|
-- (c) Copyright 2009 - 2013 Xilinx, Inc. All rights reserved.
|
10 |
|
|
--
|
11 |
|
|
-- This file contains confidential and proprietary information
|
12 |
|
|
-- of Xilinx, Inc. and is protected under U.S. and
|
13 |
|
|
-- international copyright and other intellectual property
|
14 |
|
|
-- laws.
|
15 |
|
|
--
|
16 |
|
|
-- DISCLAIMER
|
17 |
|
|
-- This disclaimer is not a license and does not grant any
|
18 |
|
|
-- rights to the materials distributed herewith. Except as
|
19 |
|
|
-- otherwise provided in a valid license issued to you by
|
20 |
|
|
-- Xilinx, and to the maximum extent permitted by applicable
|
21 |
|
|
-- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
|
22 |
|
|
-- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
|
23 |
|
|
-- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
|
24 |
|
|
-- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
|
25 |
|
|
-- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
|
26 |
|
|
-- (2) Xilinx shall not be liable (whether in contract or tort,
|
27 |
|
|
-- including negligence, or under any other theory of
|
28 |
|
|
-- liability) for any loss or damage of any kind or nature
|
29 |
|
|
-- related to, arising under or in connection with these
|
30 |
|
|
-- materials, including for any direct, or any indirect,
|
31 |
|
|
-- special, incidental, or consequential loss or damage
|
32 |
|
|
-- (including loss of data, profits, goodwill, or any type of
|
33 |
|
|
-- loss or damage suffered as a result of any action brought
|
34 |
|
|
-- by a third party) even if such damage or loss was
|
35 |
|
|
-- reasonably foreseeable or Xilinx had been advised of the
|
36 |
|
|
-- possibility of the same.
|
37 |
|
|
--
|
38 |
|
|
-- CRITICAL APPLICATIONS
|
39 |
|
|
-- Xilinx products are not designed or intended to be fail-
|
40 |
|
|
-- safe, or for use in any application requiring fail-safe
|
41 |
|
|
-- performance, such as life-support or safety devices or
|
42 |
|
|
-- systems, Class III medical devices, nuclear facilities,
|
43 |
|
|
-- applications related to the deployment of airbags, or any
|
44 |
|
|
-- other applications that could lead to death, personal
|
45 |
|
|
-- injury, or severe property or environmental damage
|
46 |
|
|
-- (individually and collectively, "Critical
|
47 |
|
|
-- Applications"). Customer assumes the sole risk and
|
48 |
|
|
-- liability of any use of Xilinx products in Critical
|
49 |
|
|
-- Applications, subject only to applicable laws and
|
50 |
|
|
-- regulations governing limitations on product liability.
|
51 |
|
|
--
|
52 |
|
|
-- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
|
53 |
|
|
-- PART OF THIS FILE AT ALL TIMES.
|
54 |
|
|
-------------------------------------------------------------------------------
|
55 |
|
|
|
56 |
|
|
library ieee;
|
57 |
|
|
use ieee.std_logic_1164.all;
|
58 |
|
|
use ieee.numeric_std.all;
|
59 |
|
|
|
60 |
|
|
entity rxaui_0_support_resets is
|
61 |
|
|
port (
|
62 |
|
|
reset : in std_logic;
|
63 |
|
|
dclk : in std_logic;
|
64 |
|
|
common_pll_reset : out std_logic
|
65 |
|
|
);
|
66 |
|
|
end rxaui_0_support_resets;
|
67 |
|
|
|
68 |
|
|
architecture rtl of rxaui_0_support_resets is
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
constant COUNT_WIDTH : integer := 8;
|
72 |
|
|
signal counter : unsigned (COUNT_WIDTH-1 downto 0) := (others => '0');
|
73 |
|
|
signal count_d1 : std_logic;
|
74 |
|
|
|
75 |
|
|
attribute ASYNC_REG : string;
|
76 |
|
|
attribute shreg_extract : string;
|
77 |
|
|
|
78 |
|
|
signal reset_count_done : std_logic := '0';
|
79 |
|
|
signal initial_reset : std_logic := '0';
|
80 |
|
|
|
81 |
|
|
begin
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
-- reset logic - Implement counter to hold resets for a minimum of 500 ns after GSR
|
85 |
|
|
-- This counter is based on worst case 200MHz DCLK
|
86 |
|
|
process(dclk) begin
|
87 |
|
|
if rising_edge(dclk) then
|
88 |
|
|
if (counter(COUNT_WIDTH-1) = '0') then
|
89 |
|
|
counter <= counter + 1;
|
90 |
|
|
end if;
|
91 |
|
|
end if;
|
92 |
|
|
end process;
|
93 |
|
|
|
94 |
|
|
process(dclk) begin
|
95 |
|
|
if rising_edge(dclk) then
|
96 |
|
|
count_d1 <= std_logic(counter(COUNT_WIDTH -1));
|
97 |
|
|
end if;
|
98 |
|
|
end process;
|
99 |
|
|
|
100 |
|
|
process(dclk) begin
|
101 |
|
|
if rising_edge(dclk) then
|
102 |
|
|
if ((count_d1 = '0') and (std_logic(counter(COUNT_WIDTH-1)) = '1')) then
|
103 |
|
|
initial_reset <= std_logic(counter(COUNT_WIDTH -1));
|
104 |
|
|
else
|
105 |
|
|
initial_reset <= '0';
|
106 |
|
|
end if;
|
107 |
|
|
end if;
|
108 |
|
|
end process;
|
109 |
|
|
reset_count_done <= std_logic(counter(COUNT_WIDTH -1));
|
110 |
|
|
|
111 |
|
|
-- Reset the common PLL on startup, and every reset (after 500ns has elapsed)
|
112 |
|
|
common_pll_reset <= (reset and reset_count_done) or initial_reset;
|
113 |
|
|
|
114 |
|
|
end rtl;
|