]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Thu, 6 Aug 2009 10:57:37 +0000 (10:57 +0000)
committerhadeshyp <hadeshyp>
Thu, 6 Aug 2009 10:57:37 +0000 (10:57 +0000)
trb_net16_api_base.vhd

index f66b8a1c693b57388a0b6c5ab9afc2d983eefe74..0ce828743f522070a5f1825dcc8f82e458af8f8b 100644 (file)
@@ -182,6 +182,9 @@ architecture trb_net16_api_base_arch of trb_net16_api_base is
   signal sbuf_status : std_logic_vector(2 downto 0);
   signal buf_APL_RUN_OUT : std_logic;
 
+  signal apl_send_in_down_timeout : std_logic;
+  signal apl_send_in_timeout_counter : std_logic_vector(3 downto 0);
+
 begin
 ---------------------------------------
 -- termination for active api
@@ -570,6 +573,18 @@ INT_MASTER_DATAREADY_OUT  <= buf_INT_MASTER_DATAREADY_OUT;
       end if;
     end process;
 
+  process(CLK)
+    begin
+      if rising_edge(CLK) then
+        if APL_SEND_IN = '1' then
+          apl_send_in_timeout_counter <= (others => '0');
+        elsif apl_send_in_timeout_counter(3) = '0' then
+          apl_send_in_timeout_counter <= apl_send_in_timeout_counter + 1;
+        end if;
+      end if;
+    end process;
+  apl_send_in_down_timeout <= apl_send_in_timeout_counter;
+
 ---------------------------------------
 --regenerate long packet numbers
 ---------------------------------------
@@ -694,7 +709,7 @@ INT_MASTER_DATAREADY_OUT  <= buf_INT_MASTER_DATAREADY_OUT;
         fifo_to_int_read <= '0';
         master_start <= '0';
         master_end <= '0';
-        next_fifo_was_not_empty <= fifo_was_not_empty or not fifo_to_int_empty;
+        next_fifo_was_not_empty <= fifo_was_not_empty or not fifo_to_int_empty or apl_send_in_down_timeout;
 
         case state_to_int is
           when INACTIVE =>