]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Tue, 15 Jan 2008 18:09:44 +0000 (18:09 +0000)
committerhadeshyp <hadeshyp>
Tue, 15 Jan 2008 18:09:44 +0000 (18:09 +0000)
trb_net16_obuf.vhd

index 94db7e49647e87d2c049cc2b7f13abbd47b934dc..046ee8dad698d1eb91ca1649a30f3021c8b7c841 100644 (file)
@@ -93,6 +93,9 @@ architecture trb_net16_obuf_arch of trb_net16_obuf is
   signal saved_packet_type   : std_logic_vector(2 downto 0);
   signal reg_SEND_ACK_IN_2,next_SEND_ACK_IN_2  : std_logic;
 
+  type sending_state_t is (idle, sending_ack);
+  signal next_sending_state, sending_state : sending_state_t;
+  
 begin
 
   SBUF: trb_net16_sbuf
@@ -231,33 +234,41 @@ begin
           else
             next_DATA_COUNT <= CURRENT_DATA_COUNT +1;
           end if;
-          if (send_ACK = '1') then
+          if send_ACK = '1' then
               next_INT_READ_OUT       <= '0';
           end if;
         end if;
-      elsif (send_ACK = '1') then
+      end if;
+      if sending_state = sending_ack  then
         next_INT_READ_OUT <= '0';
         current_output_data_buffer <= current_ACK_word;
         if sbuf_free = '1' then
           comb_dataready <= '1';
           if (transfer_counter = "11") then
             next_SEND_ACK_IN <= '0';
+            next_sending_state <= idle;
           end if;
         end if;
       end if;
+      if send_ACK = '1' and transfer_counter = "00" then
+        next_sending_state <= sending_ack;
+        next_INT_READ_OUT <= '0';
+      end if;
       if  sbuf_free = '0' or send_DATA = '0' then
         next_INT_READ_OUT <= '0';
       end if;
-
     end process;
 
+
   REG1 : process(CLK)
     begin
       if rising_edge(CLK) then
         if RESET = '1' then
           reg_INT_READ_OUT      <= '0';
+          sending_state <= idle;
         elsif CLK_EN = '1' then
           reg_INT_READ_OUT      <= next_INT_READ_OUT;
+          sending_state <= next_sending_state;
         end if;
       end if;
     end process;