From 2e4b41ab312e45e57ac87da7499910239872a671 Mon Sep 17 00:00:00 2001 From: hadeshyp Date: Thu, 6 Aug 2009 10:57:37 +0000 Subject: [PATCH] *** empty log message *** --- trb_net16_api_base.vhd | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/trb_net16_api_base.vhd b/trb_net16_api_base.vhd index f66b8a1..0ce8287 100644 --- a/trb_net16_api_base.vhd +++ b/trb_net16_api_base.vhd @@ -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 => -- 2.43.0