From 9dfe8ba34f8e3061681d7027bf207a071d9b30e8 Mon Sep 17 00:00:00 2001 From: hadeshyp Date: Tue, 5 Oct 2010 16:05:25 +0000 Subject: [PATCH] *** empty log message *** --- .../trb_net16_rx_comma_handler.vhd | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/media_interfaces/trb_net16_rx_comma_handler.vhd b/media_interfaces/trb_net16_rx_comma_handler.vhd index 02079d0..0f5d267 100644 --- a/media_interfaces/trb_net16_rx_comma_handler.vhd +++ b/media_interfaces/trb_net16_rx_comma_handler.vhd @@ -27,6 +27,7 @@ port( LD_START_POSITION_OUT : out std_logic; --restart sending from given position START_POSITION_OUT : out std_logic_vector(7 downto 0); START_GONE_WRONG_IN : in std_logic; + START_TIMEOUT_OUT : out std_logic; -- gk 05.10.10 -- Check COMMA_LOCKED_OUT : out std_logic; -- reset handling @@ -116,6 +117,10 @@ signal crc_active : std_logic; signal crc_match : std_logic; signal crc_reset : std_logic; +-- gk 05.10.10 +signal start_toc : std_logic_vector(7 downto 0); +signal start_toc_c : std_logic; + begin ---------------------------------------------------------------------- @@ -269,7 +274,7 @@ fifo_wr_x <= comma_toggle and data_valid_x and not fifo_inhibit; THE_FIFO_INHIBIT_PROC: process( CLK_IN ) begin if( rising_edge(CLK_IN) ) then - if ( (RESET_IN = '1') or (comma_stx = '1') or ENABLE_CORRECTION_IN = '0') then + if ( (RESET_IN = '1') or (comma_stx = '1') or (ENABLE_CORRECTION_IN = '0') or (start_toc_c = '1') )then -- gk 05.10.10 fifo_inhibit <= '0'; elsif( (comma_locked = '1') and (comma_toggle = '1') and (comma_valid_x = '0') and (data_valid_x = '0') and c_reset_x = '0' ) or (crc_match = '0' and comma_crc_x = '1' and crc_active = '1') @@ -280,6 +285,28 @@ begin end if; end process THE_FIFO_INHIBIT_PROC; +-- gk 05.10.10 +START_TOC_PROC : process(CLK_IN) +begin + if rising_edge(CLK_IN) then + if (RESET_IN = '1') or (fifo_inhibit = '0') then + start_toc <= (others => '0'); + elsif (fifo_inhibit = '1') and (comma_stx = '0') then + start_toc <= start_toc + x"1"; + end if; + end if; +end process START_TOC_PROC; + +-- gk 05.10.10 +start_toc_c <= '1' when (start_toc >= x"c8") else '0'; + +-- gk 05.10.10 +START_TOC_OUT_PROC : process(CLK_IN) +begin + if rising_edge(CLK_IN) then + START_TIMEOUT_OUT <= start_toc_c; + end if; +end process START_TOC_OUT_PROC; -- 2.43.0