]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
fixed two bugs with timer ticks in Hub and Hub with CTS
authorJan Michel <j.michel@gsi.de>
Mon, 29 Apr 2013 14:49:10 +0000 (16:49 +0200)
committerJan Michel <j.michel@gsi.de>
Mon, 29 Apr 2013 14:49:10 +0000 (16:49 +0200)
media_interfaces/med_ecp3_sfp_sync.vhd
trb_net16_hub_base.vhd
trb_net16_hub_streaming_port_sctrl_cts.vhd

index 9c4a5c1359f276f5115b1f5f66c9a729e0428bbb..3f016cf5f32eba23d8e931952ebdd3314e934baa 100644 (file)
@@ -273,8 +273,17 @@ THE_TX_FSM : tx_reset_fsm
     STATE_OUT       => tx_fsm_state
     );
 
--- Master does not do bit-locking    
-wa_position_rx <= wa_position when (IS_SYNC_SLAVE = 1) else x"0000";
+    
+    
+-- Master does not do bit-locking  
+SYNC_WA_POSITION : process begin
+  wait until rising_edge(clk_200_i);
+  if IS_SYNC_SLAVE = 1 then
+    wa_position_rx <= wa_position;
+  else
+    wa_position_rx <= x"0000";
+  end if;
+end process;
 
 
 --Slave enables RX/TX when sync is done, Master waits additional time to make sure link is stable
@@ -486,7 +495,8 @@ end process;
 -------------------------------------------------      
 -- Debug Registers
 -------------------------------------------------            
-debug_reg(3 downto 0)   <= rx_fsm_state;
+debug_reg(2 downto 0)   <= rx_fsm_state(2 downto 0);
+debug_reg(3)            <= rx_serdes_rst;
 debug_reg(4)            <= CLEAR;
 debug_reg(5)            <= tx_allow_q;
 debug_reg(6)            <= rx_los_low;
@@ -498,7 +508,7 @@ debug_reg(10)           <= rx_allow_q;
 debug_reg(11)           <= CTRL_OP(15);
 debug_reg(12)           <= make_link_reset_i;
 debug_reg(13)           <= send_link_reset_i;
-debug_reg(14)           <= rst_qd;
+debug_reg(14)           <= sd_los_i;
 debug_reg(15)           <= rx_pcs_rst;
 -- debug_reg(31 downto 24) <= tx_data;
 
index 01067fcd73014d3ca32e222d04dbebc138c69c3d..d3548a8f51d4ae5645af4a6768b22e85bdbac945 100644 (file)
@@ -1751,6 +1751,6 @@ HUB_MED_CONNECTED(31 downto MII_NUMBER) <= (others => '1');
   HUB_STAT_GEN(31 downto 4) <= (others => '0');
 
   TIMER_TICKS_OUT(0) <= timer_us_tick;
-  TIMER_TICKS_OUT(1) <= timer_us_tick;
+  TIMER_TICKS_OUT(1) <= timer_ms_tick;
 
 end architecture;
index b9208c18c1df177ca34d4dd1adb4a1094fa9c7aa..49387c6ec6d7e9236e0b405d8d31eb0cc9984679 100644 (file)
@@ -1127,6 +1127,7 @@ COMMON_STAT_REGS <= common_stat;
   last_write_enable <= write_enable when rising_edge(CLK);
   last_read_enable  <= read_enable when rising_edge(CLK);
   
+  TIMER_TICKS_OUT <= timer_ticks;
   
 ---------------------------------------------------------------------
 -- Debug