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

Back to eFEX documentation
BDTModel_decision_function_24.vhd
1 -- ==============================================================
2 -- Generated by Vitis HLS v2024.1.2
3 -- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
4 -- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
5 -- ==============================================================
6 
7 library IEEE;
8 use IEEE.std_logic_1164.all;
9 use IEEE.numeric_std.all;
10 
12 port (
13  ap_ready : OUT STD_LOGIC;
14  x_7_val : IN STD_LOGIC_VECTOR (15 downto 0);
15  x_8_val : IN STD_LOGIC_VECTOR (15 downto 0);
16  ap_return : OUT STD_LOGIC_VECTOR (5 downto 0) );
17 end;
18 
19 
21  constant ap_const_logic_1 : STD_LOGIC := '1';
22  constant ap_const_boolean_1 : BOOLEAN := true;
23  constant ap_const_lv16_D : STD_LOGIC_VECTOR (15 downto 0) := "0000000000001101";
24  constant ap_const_lv16_16 : STD_LOGIC_VECTOR (15 downto 0) := "0000000000010110";
25  constant ap_const_lv16_1E : STD_LOGIC_VECTOR (15 downto 0) := "0000000000011110";
26  constant ap_const_lv1_1 : STD_LOGIC_VECTOR (0 downto 0) := "1";
27  constant ap_const_lv2_2 : STD_LOGIC_VECTOR (1 downto 0) := "10";
28  constant ap_const_lv2_3 : STD_LOGIC_VECTOR (1 downto 0) := "11";
29  constant ap_const_lv6_2D : STD_LOGIC_VECTOR (5 downto 0) := "101101";
30  constant ap_const_lv6_26 : STD_LOGIC_VECTOR (5 downto 0) := "100110";
31  constant ap_const_lv6_28 : STD_LOGIC_VECTOR (5 downto 0) := "101000";
32  constant ap_const_lv6_21 : STD_LOGIC_VECTOR (5 downto 0) := "100001";
33  constant ap_const_logic_0 : STD_LOGIC := '0';
34 
35 attribute shreg_extract : string;
36  signal comparison_fu_54_p2 : STD_LOGIC_VECTOR (0 downto 0);
37  signal comparison_26_fu_60_p2 : STD_LOGIC_VECTOR (0 downto 0);
38  signal comparison_27_fu_66_p2 : STD_LOGIC_VECTOR (0 downto 0);
39  signal activation_51_fu_72_p2 : STD_LOGIC_VECTOR (0 downto 0);
40  signal activation_fu_78_p2 : STD_LOGIC_VECTOR (0 downto 0);
41  signal xor_ln170_fu_90_p2 : STD_LOGIC_VECTOR (0 downto 0);
42  signal activation_54_fu_84_p2 : STD_LOGIC_VECTOR (0 downto 0);
43  signal zext_ln170_fu_96_p1 : STD_LOGIC_VECTOR (1 downto 0);
44  signal or_ln170_fu_100_p2 : STD_LOGIC_VECTOR (0 downto 0);
45  signal select_ln170_fu_106_p3 : STD_LOGIC_VECTOR (1 downto 0);
46  signal agg_result_fu_122_p9 : STD_LOGIC_VECTOR (5 downto 0);
47  signal agg_result_fu_122_p10 : STD_LOGIC_VECTOR (1 downto 0);
48  signal agg_result_fu_122_p11 : STD_LOGIC_VECTOR (5 downto 0);
49  signal agg_result_fu_122_p1 : STD_LOGIC_VECTOR (1 downto 0);
50  signal agg_result_fu_122_p3 : STD_LOGIC_VECTOR (1 downto 0);
51  signal agg_result_fu_122_p5 : STD_LOGIC_VECTOR (1 downto 0);
52  signal agg_result_fu_122_p7 : STD_LOGIC_VECTOR (1 downto 0);
53  signal ap_ce_reg : STD_LOGIC;
54 
55  component BDTModel_sparsemux_9_2_6_1_1 IS
56  generic (
57  ID : INTEGER;
58  NUM_STAGE : INTEGER;
59  CASE0 : STD_LOGIC_VECTOR (1 downto 0);
60  din0_WIDTH : INTEGER;
61  CASE1 : STD_LOGIC_VECTOR (1 downto 0);
62  din1_WIDTH : INTEGER;
63  CASE2 : STD_LOGIC_VECTOR (1 downto 0);
64  din2_WIDTH : INTEGER;
65  CASE3 : STD_LOGIC_VECTOR (1 downto 0);
66  din3_WIDTH : INTEGER;
67  def_WIDTH : INTEGER;
68  sel_WIDTH : INTEGER;
69  dout_WIDTH : INTEGER );
70  port (
71  din0 : IN STD_LOGIC_VECTOR (5 downto 0);
72  din1 : IN STD_LOGIC_VECTOR (5 downto 0);
73  din2 : IN STD_LOGIC_VECTOR (5 downto 0);
74  din3 : IN STD_LOGIC_VECTOR (5 downto 0);
75  def : IN STD_LOGIC_VECTOR (5 downto 0);
76  sel : IN STD_LOGIC_VECTOR (1 downto 0);
77  dout : OUT STD_LOGIC_VECTOR (5 downto 0) );
78  end component;
79 
80 
81 
82 begin
83  sparsemux_9_2_6_1_1_U57 : component BDTModel_sparsemux_9_2_6_1_1
84  generic map (
85  ID => 1,
86  NUM_STAGE => 1,
87  CASE0 => "00",
88  din0_WIDTH => 6,
89  CASE1 => "01",
90  din1_WIDTH => 6,
91  CASE2 => "10",
92  din2_WIDTH => 6,
93  CASE3 => "11",
94  din3_WIDTH => 6,
95  def_WIDTH => 6,
96  sel_WIDTH => 2,
97  dout_WIDTH => 6)
98  port map (
99  din0 => ap_const_lv6_2D,
100  din1 => ap_const_lv6_26,
101  din2 => ap_const_lv6_28,
102  din3 => ap_const_lv6_21,
103  def => agg_result_fu_122_p9,
104  sel => agg_result_fu_122_p10,
105  dout => agg_result_fu_122_p11);
106 
107 
108 
109 
110  activation_51_fu_72_p2 <= (comparison_fu_54_p2 xor ap_const_lv1_1);
111  activation_54_fu_84_p2 <= (comparison_27_fu_66_p2 and activation_51_fu_72_p2);
112  activation_fu_78_p2 <= (comparison_fu_54_p2 and comparison_26_fu_60_p2);
113  agg_result_fu_122_p10 <=
114  select_ln170_fu_106_p3 when (or_ln170_fu_100_p2(0) = '1') else
115  ap_const_lv2_3;
116  agg_result_fu_122_p9 <= "XXXXXX";
117  ap_ready <= ap_const_logic_1;
118  ap_return <= agg_result_fu_122_p11;
119  comparison_26_fu_60_p2 <= "1" when (unsigned(x_8_val) < unsigned(ap_const_lv16_16)) else "0";
120  comparison_27_fu_66_p2 <= "1" when (unsigned(x_7_val) < unsigned(ap_const_lv16_1E)) else "0";
121  comparison_fu_54_p2 <= "1" when (unsigned(x_7_val) < unsigned(ap_const_lv16_D)) else "0";
122  or_ln170_fu_100_p2 <= (comparison_fu_54_p2 or activation_54_fu_84_p2);
123  select_ln170_fu_106_p3 <=
124  zext_ln170_fu_96_p1 when (comparison_fu_54_p2(0) = '1') else
125  ap_const_lv2_2;
126  xor_ln170_fu_90_p2 <= (ap_const_lv1_1 xor activation_fu_78_p2);
127  zext_ln170_fu_96_p1 <= std_logic_vector(IEEE.numeric_std.resize(unsigned(xor_ln170_fu_90_p2),2));
128 end behav;