From 1adceb73271fa15d9ab97aaa5b6f056066b2f08d Mon Sep 17 00:00:00 2001 From: Thomas Gessler Date: Wed, 7 Oct 2020 18:03:01 +0200 Subject: [PATCH] media_interfaces: Reset RX on wrong wa_position --- media_interfaces/med_ecp3_sfp_sync.vhd | 6 +++--- media_interfaces/sync/med_sync_control.vhd | 24 +++++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/media_interfaces/med_ecp3_sfp_sync.vhd b/media_interfaces/med_ecp3_sfp_sync.vhd index 308f518..b375dfa 100644 --- a/media_interfaces/med_ecp3_sfp_sync.vhd +++ b/media_interfaces/med_ecp3_sfp_sync.vhd @@ -222,9 +222,9 @@ end generate; tx_serdes_rst <= '0'; --no function serdes_rst_qd <= '0'; --included in rst_qd - wa_position_sel <= x"0"; --- wa_position_sel <= wa_position(3 downto 0) when SERDES_NUM = 0 --- else wa_position(15 downto 12) when SERDES_NUM = 3; +-- wa_position_sel <= x"0"; + wa_position_sel <= wa_position(3 downto 0) when SERDES_NUM = 0 + else wa_position(15 downto 12) when SERDES_NUM = 3; THE_MED_CONTROL : entity work.med_sync_control generic map( diff --git a/media_interfaces/sync/med_sync_control.vhd b/media_interfaces/sync/med_sync_control.vhd index aded4e7..1074d8f 100644 --- a/media_interfaces/sync/med_sync_control.vhd +++ b/media_interfaces/sync/med_sync_control.vhd @@ -197,18 +197,18 @@ THE_TX_FSM : tx_reset_fsm TX_PCS_RST <= tx_pcs_rst_i; QUAD_RST <= quad_rst_i; -wa_position_rx <= x"0"; - ---SYNC_WA_POSITION_PROC: process( CLK_REF ) ---begin --- if( rising_edge(CLK_REF) ) then --- if IS_SYNC_SLAVE = 1 then --- wa_position_rx <= WA_POSITION; --- else --- wa_position_rx <= x"0"; --- end if; --- end if; ---end process SYNC_WA_POSITION_PROC; +-- wa_position_rx <= x"0"; + +SYNC_WA_POSITION_PROC: process( CLK_REF ) +begin + if( rising_edge(CLK_REF) ) then + if IS_SYNC_SLAVE = 1 then + wa_position_rx <= WA_POSITION; + else + wa_position_rx <= x"0"; + end if; + end if; +end process SYNC_WA_POSITION_PROC; ------------------------------------------------- -- RX & TX allow -- 2.43.0