From: hadeshyp Date: Tue, 15 Jul 2008 15:20:21 +0000 (+0000) Subject: optimized multiplexer and arbiter, Jan X-Git-Tag: oldGBE~544 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=832ee70a2fab314b711b7d599c028da4b8da7a26;p=trbnet.git optimized multiplexer and arbiter, Jan --- diff --git a/trb_net16_io_multiplexer.vhd b/trb_net16_io_multiplexer.vhd index 4dff348..c1ed641 100644 --- a/trb_net16_io_multiplexer.vhd +++ b/trb_net16_io_multiplexer.vhd @@ -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 diff --git a/trb_net16_med_tlk.vhd b/trb_net16_med_tlk.vhd index a6d0bfc..97de445 100644 --- a/trb_net16_med_tlk.vhd +++ b/trb_net16_med_tlk.vhd @@ -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 diff --git a/trb_net16_obuf.vhd b/trb_net16_obuf.vhd index 43edb4f..38e99b1 100644 --- a/trb_net16_obuf.vhd +++ b/trb_net16_obuf.vhd @@ -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; diff --git a/trb_net_priority_arbiter.vhd b/trb_net_priority_arbiter.vhd index 8e7f6dc..a359586 100755 --- a/trb_net_priority_arbiter.vhd +++ b/trb_net_priority_arbiter.vhd @@ -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) diff --git a/trb_net_sbuf.vhd b/trb_net_sbuf.vhd index 3e55e15..b3ce134 100644 --- a/trb_net_sbuf.vhd +++ b/trb_net_sbuf.vhd @@ -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;