From: Your Name Date: Wed, 30 May 2018 20:25:57 +0000 (+0200) Subject: gk:trigger type taken from FEE stream instead of CTS_READOUT_TYPE X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=b50600dd02db9cd698a0cb37d6998933b8e14867;p=trbnet.git gk:trigger type taken from FEE stream instead of CTS_READOUT_TYPE --- diff --git a/gbe_trb/base/trb_net16_gbe_ipu_interface.vhd b/gbe_trb/base/trb_net16_gbe_ipu_interface.vhd index 91309de..b17a7fe 100644 --- a/gbe_trb/base/trb_net16_gbe_ipu_interface.vhd +++ b/gbe_trb/base/trb_net16_gbe_ipu_interface.vhd @@ -116,9 +116,11 @@ architecture RTL of trb_net16_gbe_ipu_interface is signal eos_ctr : std_logic_vector(3 downto 0); signal fee_dataready, fee_dataready_q, fee_dataready_qq, fee_dataready_qqq, fee_dataready_qqqq, fee_dataready_qqqqq : std_logic; - signal temp_data_store : std_logic_vector(6 * 16 - 1 downto 0) := (others => '0'); + signal temp_data_store : std_logic_vector(8 * 16 - 1 downto 0) := (others => '0'); signal local_read, local_read_q, local_read_qq, local_read_qqq, local_read_qqqq, local_read_qqqqq, local_read_qqqqqq, local_read_qqqqqqq, local_read_qqqqqqqq, local_read_qqqqqqqqq : std_logic := '0'; + signal fee_t_type : std_logic_vector(3 downto 0); + begin --********* @@ -329,17 +331,33 @@ begin end if; end process; + + process(CLK_IPU) + begin + if rising_edge(CLK_IPU) then + if (save_current_state = IDLE) then + fee_t_type <= x"0"; + elsif (save_current_state = PRE_SAVE_DATA and size_check_ctr = 1 and FEE_DATAREADY_IN = '1') then + fee_t_type <= FEE_DATA_IN(11 downto 8); + else + fee_t_type <= fee_t_type; + end if; + end if; + end process; process(CLK_IPU) begin if rising_edge(CLK_IPU) then if (save_current_state = SAVE_EVT_ADDR) then - temp_data_store(15 downto 0) <= x"ab" & CTS_READOUT_TYPE_IN & CTS_INFORMATION_IN(3 downto 0); + -- middle place is for the trigger type, extracted from FEE stream or from the CTS_READOUT_TYPE_IN + temp_data_store(15 downto 0) <= x"ab" & x"0" & CTS_INFORMATION_IN(3 downto 0); elsif (save_current_state = PRE_SAVE_DATA and FEE_DATAREADY_IN = '1') then temp_data_store( (size_check_ctr + 2) * 16 - 1 downto (size_check_ctr + 1) * 16) <= FEE_DATA_IN; else temp_data_store <= temp_data_store; end if; + + temp_data_store(7 downto 4) <= fee_t_type; end if; end process;