]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
media_interfaces: Reset RX on wrong wa_position
authorThomas Gessler <Thomas.Gessler@exp2.physik.uni-giessen.de>
Wed, 7 Oct 2020 16:03:01 +0000 (18:03 +0200)
committerThomas Gessler <Thomas.Gessler@exp2.physik.uni-giessen.de>
Mon, 12 Oct 2020 07:52:14 +0000 (09:52 +0200)
media_interfaces/med_ecp3_sfp_sync.vhd
media_interfaces/sync/med_sync_control.vhd

index 308f518430de1ddc2595dc0fd6e51931945b88b6..b375dfafaa5acb4e46dc7c0d0dde5cecd63abbfa 100644 (file)
@@ -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(
index aded4e7d554bac1edc4dd39de2ba3350ffad430e..1074d8f48cc7a54f18789f4acf74684fc09ece65 100644 (file)
@@ -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