eFEX firmware  1.7.3
ATLAS l1-calo - electron and tau feature extraction firmware for eFEX boards

Back to eFEX documentation
TauConditionsEnergyAndSeed.vhd
1 library IEEE;
2 use IEEE.STD_LOGIC_1164.all;
3 use IEEE.NUMERIC_STD.all;
4 
5 library work;
6 use work.DataTypes.all;
7 
9  port (
10  CLK : in std_logic;
11  IN_TOBEnergy : in DataWord;
12  IN_TOBEnergyOverflow : in std_logic;
13  IN_ET_Thr : in DataWord;
14  IN_IsSeeded : in std_logic;
15  OUT_IsMax : out std_logic;
16  OUT_TOBEnergy : out DataWord;
17  OUT_TOBEnergyOverflow : out std_logic
18  );
20 
22 begin
23  CONDITIONS : process (CLK)
24  begin
25  if rising_edge(CLK) then
26  if IN_TOBEnergyOverflow = '1' then
27  OUT_TOBEnergy <= (others => '1');
28  OUT_TOBEnergyOverflow <= IN_TOBEnergyOverflow;
29  OUT_IsMax <= IN_IsSeeded;
30  elsif IN_TOBEnergy < IN_ET_Thr then
31  OUT_TOBEnergy <= (others => '0');
32  OUT_TOBEnergyOverflow <= '0';
33  OUT_IsMax <= '0';
34  else
35  OUT_TOBEnergy <= IN_TOBEnergy;
36  OUT_TOBEnergyOverflow <= IN_TOBEnergyOverflow;
37  OUT_IsMax <= IN_IsSeeded;
38  end if;
39  end if;
40  end process;
41 end Behavioral;
42 
in CLK std_logic
200 MHz clock