eFEX firmware
1.7.3
ATLAS l1-calo - electron and tau feature extraction firmware for eFEX boards
Back to eFEX documentation
Algorithm
hdl
TauBDT
TauConditionsBDT.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
8
entity
TauConditionsBDT
is
9
port
(
10
CLK
:
in
std_logic
;
11
IN_BDTScore
:
in
std_logic_vector
(
BDT_SCORE_WIDTH
-
1
downto
0
)
;
12
IN_BDT_Thr
:
in
AlgoParameters
(
2
downto
0
)
;
13
IN_Max_BDT_E_threshold
:
in
DataWord
;
14
IN_Min_BDT_E_threshold
:
in
DataWord
;
15
IN_Total_Energy
:
in
DataWord
;
16
IN_Total_Energy_of
:
in
std_logic
;
17
OUT_BDTCondition
:
out
std_logic_vector
(
1
downto
0
)
;
18
OUT_BDTScore
:
out
std_logic_vector
(
BDT_SCORE_WIDTH
-
1
downto
0
)
19
)
;
20
21
end
TauConditionsBDT
;
22
23
architecture
Behavioral
of
TauConditionsBDT
is
24
begin
25
CONDITIONS :
process
(
CLK
)
26
variable
BDTScore_MSB
:
std_logic_vector
(
PAR_WIDTH
-
1
downto
0
)
;
27
begin
28
if
rising_edge
(
CLK
)
then
29
BDTScore_MSB
:=
IN_BDTScore
(
BDT_SCORE_WIDTH
-
1
downto
BDT_SCORE_WIDTH
-
PAR_WIDTH
)
;
30
31
if
IN_Total_Energy_of
=
'
0
'
and
IN_Total_Energy
<
IN_Max_BDT_E_threshold
then
32
if
IN_Total_Energy
<
IN_Min_BDT_E_threshold
then
33
OUT_BDTCondition
<=
"11"
;
34
else
35
if
(
BDTScore_MSB
<
IN_BDT_Thr
(
0
)
)
then
36
OUT_BDTCondition
<=
"00"
;
37
elsif
(
BDTScore_MSB
<
IN_BDT_Thr
(
1
)
)
then
38
OUT_BDTCondition
<=
"01"
;
39
elsif
(
BDTScore_MSB
<
IN_BDT_Thr
(
2
)
)
then
40
OUT_BDTCondition
<=
"10"
;
41
else
42
OUT_BDTCondition
<=
"11"
;
43
end
if
;
44
end
if
;
45
else
46
OUT_BDTCondition
<=
"11"
;
47
end
if
;
48
49
OUT_BDTScore
<=
IN_BDTScore
;
50
end
if
;
51
end
process
;
52
end
Behavioral;
53
DataTypes
Definition:
DataTypes.vhd:6
TauConditionsBDT.Behavioral
Definition:
TauConditionsBDT.vhd:23
TauConditionsBDT
Definition:
TauConditionsBDT.vhd:8
TauConditionsBDT.CLK
in CLK std_logic
200 MHz clock
Definition:
TauConditionsBDT.vhd:10
Generated on Tue Nov 11 2025 09:44:32 for eFEX firmware by
1.9.1