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

Back to eFEX documentation
BDTModel_decision_function_30.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_0_val : IN STD_LOGIC_VECTOR (15 downto 0);
15  x_3_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_193 : STD_LOGIC_VECTOR (15 downto 0) := "0000000110010011";
24  constant ap_const_lv32_3 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000011";
25  constant ap_const_lv32_F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000001111";
26  constant ap_const_lv13_0 : STD_LOGIC_VECTOR (12 downto 0) := "0000000000000";
27  constant ap_const_lv16_237 : STD_LOGIC_VECTOR (15 downto 0) := "0000001000110111";
28  constant ap_const_lv1_1 : STD_LOGIC_VECTOR (0 downto 0) := "1";
29  constant ap_const_lv2_2 : STD_LOGIC_VECTOR (1 downto 0) := "10";
30  constant ap_const_lv2_3 : STD_LOGIC_VECTOR (1 downto 0) := "11";
31  constant ap_const_lv6_21 : STD_LOGIC_VECTOR (5 downto 0) := "100001";
32  constant ap_const_lv6_29 : STD_LOGIC_VECTOR (5 downto 0) := "101001";
33  constant ap_const_lv6_32 : STD_LOGIC_VECTOR (5 downto 0) := "110010";
34  constant ap_const_lv6_3C : STD_LOGIC_VECTOR (5 downto 0) := "111100";
35  constant ap_const_logic_0 : STD_LOGIC := '0';
36 
37 attribute shreg_extract : string;
38  signal tmp_fu_66_p4 : STD_LOGIC_VECTOR (12 downto 0);
39  signal comparison_fu_60_p2 : STD_LOGIC_VECTOR (0 downto 0);
40  signal comparison_14_fu_76_p2 : STD_LOGIC_VECTOR (0 downto 0);
41  signal comparison_15_fu_82_p2 : STD_LOGIC_VECTOR (0 downto 0);
42  signal activation_27_fu_88_p2 : STD_LOGIC_VECTOR (0 downto 0);
43  signal activation_fu_94_p2 : STD_LOGIC_VECTOR (0 downto 0);
44  signal xor_ln170_fu_106_p2 : STD_LOGIC_VECTOR (0 downto 0);
45  signal activation_30_fu_100_p2 : STD_LOGIC_VECTOR (0 downto 0);
46  signal zext_ln170_fu_112_p1 : STD_LOGIC_VECTOR (1 downto 0);
47  signal or_ln170_fu_116_p2 : STD_LOGIC_VECTOR (0 downto 0);
48  signal select_ln170_fu_122_p3 : STD_LOGIC_VECTOR (1 downto 0);
49  signal agg_result_fu_138_p9 : STD_LOGIC_VECTOR (5 downto 0);
50  signal agg_result_fu_138_p10 : STD_LOGIC_VECTOR (1 downto 0);
51  signal agg_result_fu_138_p11 : STD_LOGIC_VECTOR (5 downto 0);
52  signal agg_result_fu_138_p1 : STD_LOGIC_VECTOR (1 downto 0);
53  signal agg_result_fu_138_p3 : STD_LOGIC_VECTOR (1 downto 0);
54  signal agg_result_fu_138_p5 : STD_LOGIC_VECTOR (1 downto 0);
55  signal agg_result_fu_138_p7 : STD_LOGIC_VECTOR (1 downto 0);
56  signal ap_ce_reg : STD_LOGIC;
57 
58  component BDTModel_sparsemux_9_2_6_1_1 IS
59  generic (
60  ID : INTEGER;
61  NUM_STAGE : INTEGER;
62  CASE0 : STD_LOGIC_VECTOR (1 downto 0);
63  din0_WIDTH : INTEGER;
64  CASE1 : STD_LOGIC_VECTOR (1 downto 0);
65  din1_WIDTH : INTEGER;
66  CASE2 : STD_LOGIC_VECTOR (1 downto 0);
67  din2_WIDTH : INTEGER;
68  CASE3 : STD_LOGIC_VECTOR (1 downto 0);
69  din3_WIDTH : INTEGER;
70  def_WIDTH : INTEGER;
71  sel_WIDTH : INTEGER;
72  dout_WIDTH : INTEGER );
73  port (
74  din0 : IN STD_LOGIC_VECTOR (5 downto 0);
75  din1 : IN STD_LOGIC_VECTOR (5 downto 0);
76  din2 : IN STD_LOGIC_VECTOR (5 downto 0);
77  din3 : IN STD_LOGIC_VECTOR (5 downto 0);
78  def : IN STD_LOGIC_VECTOR (5 downto 0);
79  sel : IN STD_LOGIC_VECTOR (1 downto 0);
80  dout : OUT STD_LOGIC_VECTOR (5 downto 0) );
81  end component;
82 
83 
84 
85 begin
86  sparsemux_9_2_6_1_1_U5 : component BDTModel_sparsemux_9_2_6_1_1
87  generic map (
88  ID => 1,
89  NUM_STAGE => 1,
90  CASE0 => "00",
91  din0_WIDTH => 6,
92  CASE1 => "01",
93  din1_WIDTH => 6,
94  CASE2 => "10",
95  din2_WIDTH => 6,
96  CASE3 => "11",
97  din3_WIDTH => 6,
98  def_WIDTH => 6,
99  sel_WIDTH => 2,
100  dout_WIDTH => 6)
101  port map (
102  din0 => ap_const_lv6_21,
103  din1 => ap_const_lv6_29,
104  din2 => ap_const_lv6_32,
105  din3 => ap_const_lv6_3C,
106  def => agg_result_fu_138_p9,
107  sel => agg_result_fu_138_p10,
108  dout => agg_result_fu_138_p11);
109 
110 
111 
112 
113  activation_27_fu_88_p2 <= (comparison_fu_60_p2 xor ap_const_lv1_1);
114  activation_30_fu_100_p2 <= (comparison_15_fu_82_p2 and activation_27_fu_88_p2);
115  activation_fu_94_p2 <= (comparison_fu_60_p2 and comparison_14_fu_76_p2);
116  agg_result_fu_138_p10 <=
117  select_ln170_fu_122_p3 when (or_ln170_fu_116_p2(0) = '1') else
118  ap_const_lv2_3;
119  agg_result_fu_138_p9 <= "XXXXXX";
120  ap_ready <= ap_const_logic_1;
121  ap_return <= agg_result_fu_138_p11;
122  comparison_14_fu_76_p2 <= "1" when (tmp_fu_66_p4 = ap_const_lv13_0) else "0";
123  comparison_15_fu_82_p2 <= "1" when (unsigned(x_0_val) < unsigned(ap_const_lv16_237)) else "0";
124  comparison_fu_60_p2 <= "1" when (unsigned(x_0_val) < unsigned(ap_const_lv16_193)) else "0";
125  or_ln170_fu_116_p2 <= (comparison_fu_60_p2 or activation_30_fu_100_p2);
126  select_ln170_fu_122_p3 <=
127  zext_ln170_fu_112_p1 when (comparison_fu_60_p2(0) = '1') else
128  ap_const_lv2_2;
129  tmp_fu_66_p4 <= x_3_val(15 downto 3);
130  xor_ln170_fu_106_p2 <= (ap_const_lv1_1 xor activation_fu_94_p2);
131  zext_ln170_fu_112_p1 <= std_logic_vector(IEEE.numeric_std.resize(unsigned(xor_ln170_fu_106_p2),2));
132 end behav;