]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Tue, 5 Oct 2010 16:05:25 +0000 (16:05 +0000)
committerhadeshyp <hadeshyp>
Tue, 5 Oct 2010 16:05:25 +0000 (16:05 +0000)
media_interfaces/trb_net16_rx_comma_handler.vhd

index 02079d06b3a609f915547e7be4cb6f703b000a03..0f5d2674debbb703ed2e6431d42c9caa90249119 100644 (file)
@@ -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;