]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
optimized multiplexer and arbiter, Jan
authorhadeshyp <hadeshyp>
Tue, 15 Jul 2008 15:20:21 +0000 (15:20 +0000)
committerhadeshyp <hadeshyp>
Tue, 15 Jul 2008 15:20:21 +0000 (15:20 +0000)
trb_net16_io_multiplexer.vhd
trb_net16_med_tlk.vhd
trb_net16_obuf.vhd
trb_net_priority_arbiter.vhd
trb_net_sbuf.vhd

index 4dff34872093f6a9828212b700571174761ce659..c1ed64191876dd0948e1efc1d6e368bbe92fba93 100644 (file)
@@ -207,7 +207,7 @@ architecture trb_net16_io_multiplexer_arch of trb_net16_io_multiplexer is
 
 -------------------------------------------------------------------------------
 -- MUX part with arbitration scheme
--------------------------------------------------------------------------------    
+-------------------------------------------------------------------------------
 ARBITER: trb_net_priority_arbiter 
   generic map (
     WIDTH => 2**c_MUX_WIDTH
index a6d0bfc6cd3de1fec61df0b2463a40b72b5f450d..97de445216d9090d79e484bf0c2f162eee311757 100644 (file)
@@ -319,12 +319,6 @@ U1_BUFG: BUFG  port map (I => CLK_FB_Out, O => FB_CLK);
       end if;
     end process;
 
---   process(TLK_CLK_neg)
---     begin
---       if rising_edge(TLK_CLK_neg) then
---         
---       end if;
---     end process;
 
 -------------
 --Medium states
index 43edb4fb46d964bd87fbe0b45e6f666ad56752d1..38e99b1ad9f7e5cb34241c3ab8e9c6007915e8c7 100644 (file)
@@ -383,10 +383,11 @@ begin
       process(CLK)
         begin
          if rising_edge(CLK) then
-            case REC_BUFFER_SIZE_IN is
-              when "-010" => max_DATA_COUNT_minus_one <= conv_std_logic_vector(3, DATA_COUNT_WIDTH);
-              when "-011" => max_DATA_COUNT_minus_one <= conv_std_logic_vector(7, DATA_COUNT_WIDTH);
-              when "-11-" => max_DATA_COUNT_minus_one <= conv_std_logic_vector(127, DATA_COUNT_WIDTH);
+            case REC_BUFFER_SIZE_IN(2 downto 0) is
+              when "010" => max_DATA_COUNT_minus_one <= conv_std_logic_vector(3, DATA_COUNT_WIDTH);
+              when "011" => max_DATA_COUNT_minus_one <= conv_std_logic_vector(7, DATA_COUNT_WIDTH);
+              when "110" => max_DATA_COUNT_minus_one <= conv_std_logic_vector(127, DATA_COUNT_WIDTH);
+              when "111" => max_DATA_COUNT_minus_one <= conv_std_logic_vector(127, DATA_COUNT_WIDTH);
               when others => max_DATA_COUNT_minus_one <= conv_std_logic_vector(1, DATA_COUNT_WIDTH);
             end case;
          end if;
index 8e7f6dc4a004f697f1d0d7989a71e7bbe0a87b13..a3595868fc0b19464f6c770dd5f619f321122b24 100755 (executable)
@@ -99,7 +99,7 @@ architecture trb_net_priority_arbiter_arch of trb_net_priority_arbiter is
     use_rr <= current_rr_mask(0) and CTRL(9);  --rol_mask is on
     RESULT_OUT <= current_final_pattern;
       
-    comb_rr : process(current_p1_pattern, current_p2_pattern,use_rr,
+    comb_rr : process(current_p1_pattern, current_p2_pattern,use_rr, current_final_pattern,
                       sampled_rr_pattern1, sampled_rr_pattern2, proposed_rr_pattern1,
                       proposed_rr_pattern2, leading_rr_pattern1, leading_rr_pattern2,
                       current_rr_mask, CTRL, next_fixed_pattern, next_rr_pattern,
@@ -149,7 +149,9 @@ architecture trb_net_priority_arbiter_arch of trb_net_priority_arbiter is
       elsif ENABLE  = '1' then
         next_final_pattern <= next_rr_pattern;
       end if;
-      
+      if  or_all(INPUT_IN) = '0' then
+        next_final_pattern <= current_final_pattern;
+      end if;
   end process;
 
   sync_rr : process(CLK)
index 3e55e157042175bf48e288f9dcb8fd53e101ad48..b3ce134957d7fe0da600f45b3488b08ecf4f1b4c 100644 (file)
@@ -100,11 +100,11 @@ begin
     next_next_READ_OUT <= '1';
     if VERSION = 0 then
       next_b1_buffer <= COMB_DATA_IN;
-      move_b1_buffer <= '0';    
+      move_b1_buffer <= '0';
     end if;
     use_current_b1_buffer <= '0';          --by default COMB_DATA_IN;
     move_b2_buffer <= '0';
-    
+
     next_SYN_DATAREADY_OUT <= current_SYN_DATAREADY_OUT;
     next_got_overflow <= current_got_overflow;
 
@@ -160,6 +160,7 @@ begin
         next_got_overflow <= '1';
       elsif SYN_READ_IN = '1' then
         next_buffer_state <= BUFFER_B2_FULL;
+        next_next_READ_OUT <= '1'; --?
         use_current_b1_buffer <= '1';
         move_b1_buffer <= '1';
         move_b2_buffer <= '1';
@@ -198,7 +199,7 @@ begin
       if SYN_READ_IN = '0' and current_SYN_DATAREADY_OUT = '1'
         and current_buffer_state = BUFFER_B2_FULL then
         COMB_next_READ_OUT <= '0';
-      end if;  
+      end if;
     end if;
   end process EM_STOP;