From: hadeshyp Date: Thu, 6 Sep 2007 14:01:55 +0000 (+0000) Subject: temporarily switched off buffer check in iobuf, Jan X-Git-Tag: oldGBE~710 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=7c614c198fbd619efdc524848ddaa169f5fbd40c;p=trbnet.git temporarily switched off buffer check in iobuf, Jan --- diff --git a/trb_net_ibuf.vhd b/trb_net_ibuf.vhd index c4195dd..0e61fbc 100644 --- a/trb_net_ibuf.vhd +++ b/trb_net_ibuf.vhd @@ -160,7 +160,7 @@ signal next_rec_buffer_size_out, current_rec_buffer_size_out end process; MED_READ_OUT <= reg_read_out; - + reg_buffer: process(CLK) begin if rising_edge(CLK) then @@ -214,7 +214,7 @@ reg_buffer: process(CLK) fifo_read <= '0'; got_locked <= is_locked; next_last_header <= current_last_header; - + if fifo_empty = '0' then if sbuf_free = '1' and fifo_data_out(TYPE_POSITION) = TYPE_DAT then -- next data word can be registered @@ -243,11 +243,11 @@ reg_buffer: process(CLK) end process; --BUGBUG HDR retransmit needed - + release_locked <= CTRL_LOCKED(0); STAT_LOCKED(0) <= is_locked; STAT_LOCKED(15 downto 1) <= (others => '0'); - + reg_locked: process(CLK) begin if rising_edge(CLK) then diff --git a/trb_net_iobuf.vhd b/trb_net_iobuf.vhd index c90ea91..e42132b 100644 --- a/trb_net_iobuf.vhd +++ b/trb_net_iobuf.vhd @@ -13,7 +13,9 @@ use work.trb_net_std.all; entity trb_net_iobuf is generic ( --- INIT_DEPTH : integer := 0; + SWITCH_OFF_BUFFER_CHECK : integer := 0; + --switching off erroneous output buffer counter. MUST ONLY be + --used for short transfers!!!! INIT_DEPTH : integer := 3; -- Depth of the FIFO, 2^(n+1), if -- the initibuf REPLY_DEPTH : integer := 3); -- or the replyibuf @@ -135,7 +137,11 @@ architecture trb_net_iobuf_arch of trb_net_iobuf is component trb_net_obuf is generic ( - DATA_COUNT_WIDTH : integer := 4); + DATA_COUNT_WIDTH : integer := 4; + SWITCH_OFF_BUFFER_CHECK : integer := 0 + --switching off erroneous output buffer counter. MUST ONLY be + --used for short transfers!!!! + ); port( -- Misc CLK : in std_logic; @@ -271,7 +277,11 @@ architecture trb_net_iobuf_arch of trb_net_iobuf is INITOBUF : trb_net_obuf generic map ( - DATA_COUNT_WIDTH => 16) + DATA_COUNT_WIDTH => 16, + SWITCH_OFF_BUFFER_CHECK => SWITCH_OFF_BUFFER_CHECK + --switching off erroneous output buffer counter. MUST ONLY be + --used for short transfers!!!! + ) port map ( CLK => CLK, RESET => RESET, @@ -290,7 +300,11 @@ architecture trb_net_iobuf_arch of trb_net_iobuf is REPLYOBUF : trb_net_obuf generic map ( - DATA_COUNT_WIDTH => 16) + DATA_COUNT_WIDTH => 16, + SWITCH_OFF_BUFFER_CHECK => SWITCH_OFF_BUFFER_CHECK + --switching off erroneous output buffer counter. MUST ONLY be + --used for short transfers!!!! + ) port map ( CLK => CLK, RESET => RESET, diff --git a/trb_net_obuf.vhd b/trb_net_obuf.vhd index e71c3bb..d4bc67e 100644 --- a/trb_net_obuf.vhd +++ b/trb_net_obuf.vhd @@ -11,8 +11,11 @@ use work.trb_net_std.all; --Entity decalaration for clock generator entity trb_net_obuf is generic ( - DATA_COUNT_WIDTH : integer := 4); - + DATA_COUNT_WIDTH : integer := 4; + SWITCH_OFF_BUFFER_CHECK : integer := 0 + --switching off erroneous output buffer counter. MUST ONLY be + --used for short transfers!!!! + ); port( -- Misc CLK : in std_logic; @@ -158,9 +161,9 @@ architecture trb_net_obuf_arch of trb_net_obuf is --finally, block data read if the rec buffer is full if sent_data = '0' or - (next_DATA_COUNT(DATA_COUNT_WIDTH-1 downto 0) = max_DATA_COUNT_minus_one(DATA_COUNT_WIDTH-1 downto 0)) or - next_TRANSMITTED_BUFFERS(1) = '1' - then + (next_DATA_COUNT(DATA_COUNT_WIDTH-1 downto 0) = max_DATA_COUNT_minus_one(DATA_COUNT_WIDTH-1 downto 0)) + or (next_TRANSMITTED_BUFFERS(1) = '1' and SWITCH_OFF_BUFFER_CHECK = 0) + then next_INT_READ_OUT <= '0'; end if; --In any case: if sbuf not free, then we stop data taking @@ -221,7 +224,7 @@ architecture trb_net_obuf_arch of trb_net_obuf is current_NOP_word(47 downto 0) <= (others => '0'); current_DATA_word(50 downto 0) <= INT_DATA_IN; - sent_DATA <= not TRANSMITTED_BUFFERS(1); + sent_DATA <= '1' when (TRANSMITTED_BUFFERS(1) = '0' or SWITCH_OFF_BUFFER_CHECK = 1) else '0'; -- generate max_DATA_COUNT, comb. operation which should be registered -- next_max_DATA_COUNT <= "0000000000000100" when REC_BUFFER_SIZE_IN="0001" else diff --git a/trb_net_passive_apimbuf.vhd b/trb_net_passive_apimbuf.vhd index 9f8baaa..f56f710 100644 --- a/trb_net_passive_apimbuf.vhd +++ b/trb_net_passive_apimbuf.vhd @@ -82,7 +82,10 @@ architecture trb_net_passive_apimbuf_arch of trb_net_passive_apimbuf is component trb_net_iobuf is - generic (INIT_DEPTH : integer := 3; -- Depth of the FIFO, 2^(n+1), if + generic (SWITCH_OFF_BUFFER_CHECK : integer := 0; + --switching off erroneous output buffer counter. MUST ONLY be + --used for short transfers!!!! + INIT_DEPTH : integer := 3; -- Depth of the FIFO, 2^(n+1), if -- the initibuf REPLY_DEPTH : integer := 3); -- or the replyibuf @@ -377,7 +380,10 @@ STAT_api_control_signals(31 downto 13) <= (others => '0'); IOBUF: trb_net_iobuf - generic map (INIT_DEPTH => INIT_DEPTH, + generic map (SWITCH_OFF_BUFFER_CHECK => 0, + --switching off erroneous output buffer counter. MUST ONLY be + --used for short transfers!!!! + INIT_DEPTH => INIT_DEPTH, REPLY_DEPTH => REPLY_DEPTH) port map ( diff --git a/trb_net_trigger_reader.vhd b/trb_net_trigger_reader.vhd index ee9fc5d..df697a4 100644 --- a/trb_net_trigger_reader.vhd +++ b/trb_net_trigger_reader.vhd @@ -190,7 +190,7 @@ STAT_TRIGGER_READER <= buf_STAT_TRIGGER_READER; if trigger_num_is_read = '1' and trigger_time_is_read = '1' then next_trigger_num_is_read <= '0'; next_trigger_time_is_read <= '0'; - next_fifo_read <= '1'; + fifo_read <= '1'; next_TRB_TRIGGER_READ_ERROR <= buf_TRB_TRIGGER_READ_ERROR; end if;