From 94231d8b37be54f0bec823f0f8e79053c714d44c Mon Sep 17 00:00:00 2001 From: hadeshyp Date: Mon, 23 Jan 2012 11:06:14 +0000 Subject: [PATCH] *** empty log message *** --- gbe_ecp2m/trb_net16_gbe_packet_constr.vhd | 6 ++++-- gbe_ecp2m/trb_net16_ipu2gbe.vhd | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/gbe_ecp2m/trb_net16_gbe_packet_constr.vhd b/gbe_ecp2m/trb_net16_gbe_packet_constr.vhd index ba2f4da..c37ad00 100755 --- a/gbe_ecp2m/trb_net16_gbe_packet_constr.vhd +++ b/gbe_ecp2m/trb_net16_gbe_packet_constr.vhd @@ -69,7 +69,8 @@ end component; -- FIFO for SubEventHeader information -- gk 06.12.10 component fifo_2048x8 is -component fifo_16kx8 is +--component fifo_16kx8 is +component fifo_2048x8 is port ( Data : in std_logic_vector(7 downto 0); WrClock : in std_logic; @@ -895,7 +896,8 @@ end process fcUDPSizeProc; -- SUBEVENT HEADERS WRITE AND READ --*********************** -SUBEVENT_HEADERS_FIFO : fifo_16kx8 -- gk 06.12.10 fifo_2048x8 +--SUBEVENT_HEADERS_FIFO : fifo_16kx8 -- gk 06.12.10 fifo_2048x8 +SUBEVENT_HEADERS_FIFO : fifo_2048x8 port map( Data => shf_data, WrClock => CLK, diff --git a/gbe_ecp2m/trb_net16_ipu2gbe.vhd b/gbe_ecp2m/trb_net16_ipu2gbe.vhd index e1b3035..4a1506f 100755 --- a/gbe_ecp2m/trb_net16_ipu2gbe.vhd +++ b/gbe_ecp2m/trb_net16_ipu2gbe.vhd @@ -260,6 +260,10 @@ signal message_size : std_logic_vector(31 downto 0); signal prev_bank_select : std_logic_vector(3 downto 0); signal first_event : std_logic; +-- gk 29.07.11 +signal trg_type : std_logic_vector(3 downto 0); +signal prev_trg_type : std_logic_vector(3 downto 0); + begin BANK_SELECT_OUT <= bank_select; -- gk 27.03.10 @@ -309,8 +313,10 @@ begin if (RESET = '1') then -- gk 31.05.10 sf_data <= (others => '0'); elsif( save_addr = '1' ) then + -- gk 29.07.11 added to this data word the trigger type in order to close multi events sf_data(3 downto 0) <= CTS_INFORMATION_IN(3 downto 0); -- only last 4 bits are the evt builder address - sf_data(15 downto 4) <= x"abc"; + sf_data(11 downto 4) <= x"bc"; + sf_data(15 downto 12) <= CTS_READOUT_TYPE_IN; -- gk 29.03.10 four entries to save the fee_status into sf for the subsubevent elsif( (add_sub_state = '1') and (add_sub_ctr = x"0") ) then sf_data <= x"0001"; -- gk 11.06.10 @@ -769,6 +775,9 @@ begin -- gk 07.12.10 if (first_event = '0') and (prev_bank_select /= bank_select) then -- check if event builder address changed, if so close the current packet loadNextState <= WAIT_PC; + -- gk 29.07.11 + elsif (first_event = '0') and (prev_trg_type /= trg_type) then -- check if the trigger type has changed, if so close the current packet + loadNextState <= WAIT_PC; else loadNextState <= WAIT_TO_REMOVE; end if; @@ -994,6 +1003,7 @@ end process READOUT_CTR_PROC; -- SELECTION OF EVENT BUILDER --****** +-- gk 29.07.11 added trigger type -- gk 27.03.10 bank_select_proc : process( CLK ) begin @@ -1001,9 +1011,12 @@ begin -- gk 29.03.10 if ((RESET = '1') or (rst_regs = '1')) then bank_select <= "0000"; + trg_type <= "0000"; -- gk 01.06.10 THERE WAS A BUG, IT SHOUDL BE TAKEN FROM SF_Q elsif ((sf_rd_en = '1') and (rem_ctr = x"2")) then bank_select <= pc_data(3 downto 0); --CTS_INFORMATION_IN(3 downto 0); + elsif ((sf_rd_en = '1') and (rem_ctr = x"1")) then + trg_type <= pc_data(7 downto 4); end if; end if; end process bank_select_proc; @@ -1020,13 +1033,16 @@ begin end if; end process first_event_proc; +-- gk 29.07.11 added trigger type -- gk 07.12.10 prev_bank_proc : process(CLK) begin if (RESET = '1') or (loadCurrentState = WAIT_PC) then prev_bank_select <= "0000"; + prev_trg_type <= "0000"; elsif ((sf_rd_en = '1') and (rem_ctr = x"3") and (first_event = '1')) then prev_bank_select <= bank_select; + prev_trg_type <= trg_type; end if; end process prev_bank_proc; -- 2.43.0