signal cs : statetype; -- current state of lsm
signal ns : statetype; -- next state of lsm
+signal rst_n_refclk_meta : std_logic := '1';
+signal rst_n_refclk : std_logic := '1';
+
signal tx_pll_lol_qd_q : std_logic;
signal rx_cdr_lol_ch_q : std_logic;
signal rx_los_low_ch_q : std_logic;
signal timer2 : std_logic;
begin
+
+process (RST_N, RX_REFCLK) is
+begin
+ if RST_N = '0' then
+ rst_n_refclk_meta <= '0';
+ rst_n_refclk <= '0';
+ elsif rising_edge(RX_REFCLK) then
+ rst_n_refclk_meta <= '1';
+ rst_n_refclk <= rst_n_refclk_meta;
+ end if;
+end process;
rx_lol_los <= rx_cdr_lol_ch_q or rx_los_low_ch_q ;
THE_FSM_PROC: process( RX_REFCLK )
begin
if rising_edge(RX_REFCLK) then
- if RST_N = '0' then
+ if rst_n_refclk = '0' then
cs <= WAIT_FOR_PLOL;
rx_lol_los_int <= '1';
rx_lol_los_del <= '1';
signal cs : statetype; -- current state of lsm
signal ns : statetype; -- next state of lsm
+signal rst_n_refclk_meta : std_logic := '1';
+signal rst_n_refclk : std_logic := '1';
+
signal tx_pll_lol_qd_s_int : std_logic;
signal tx_pcs_rst_ch_c_int : std_logic;
signal rst_qd_c_int : std_logic;
signal timer2 : std_logic;
begin
+
+process (RST_N, TX_REFCLK) is
+begin
+ if RST_N = '0' then
+ rst_n_refclk_meta <= '0';
+ rst_n_refclk <= '0';
+ elsif rising_edge(TX_REFCLK) then
+ rst_n_refclk_meta <= '1';
+ rst_n_refclk <= rst_n_refclk_meta;
+ end if;
+end process;
sync_sfp_sigs : entity work.signal_sync port map(RESET => '0',CLK0 => TX_REFCLK, CLK1 => TX_REFCLK,
D_IN(0) => TX_PLL_LOL_QD_S,
end process THE_TIMER2_PROC;
-- State machine clocked process
-THE_FSM_PROC: process( TX_REFCLK, RST_N )
+THE_FSM_PROC: process( TX_REFCLK, rst_n_refclk )
begin
- if RST_N = '0' then
+ if rst_n_refclk = '0' then
cs <= QUAD_RESET;
tx_pcs_rst_ch_c <= '1';
RST_QD_C <= '1';