CMS 3D CMS Logo

tau_parameters.h
Go to the documentation of this file.
1 #ifndef PARAMETERS_H_
2 #define PARAMETERS_H_
3 
4 #include <complex>
5 #include "ap_int.h"
6 #include "ap_fixed.h"
10 
11 //hls-fpga-machine-learning insert numbers
12 #define N_INPUTS 80
13 #define N_LAYER_1 25
14 #define N_LAYER_2 10
15 #define N_LAYER_3 10
16 #define N_OUTPUTS 1
17 
18 //hls-fpga-machine-learning insert layer-precision
19 
20 typedef ap_fixed<24, 12> input2_t;
21 typedef ap_fixed<16, 8> input_t;
22 typedef ap_fixed<16, 8> layer1_t;
23 typedef ap_fixed<16, 8> layer2_t;
24 typedef ap_fixed<16, 8> layer3_t;
25 typedef ap_fixed<16, 8> result_t;
26 typedef ap_fixed<16, 8> accum_default_t;
27 typedef ap_fixed<16, 8> weight_default_t;
28 typedef ap_fixed<16, 8> bias_default_t;
29 
30 //hls-fpga-machine-learning insert layer-config
32  static const unsigned n_in = N_INPUTS;
33  static const unsigned n_out = N_LAYER_1;
34  static const unsigned io_type = nnet::io_parallel;
35  static const unsigned reuse_factor = 1;
36  //static const unsigned reuse_factor = 6;
37  static const unsigned n_zeros = 0;
38  static const bool store_weights_in_bram = false;
42 };
44  static const unsigned n_in = N_LAYER_1;
45  static const unsigned table_size = 1024;
46  static const unsigned io_type = nnet::io_parallel;
47 };
49  static const unsigned n_in = N_LAYER_1;
50  static const unsigned n_out = N_LAYER_2;
51  static const unsigned io_type = nnet::io_parallel;
52  static const unsigned reuse_factor = 1;
53  //static const unsigned reuse_factor = 6;
54  static const unsigned n_zeros = 0;
55  static const bool store_weights_in_bram = false;
59 };
61  static const unsigned n_in = N_LAYER_2;
62  static const unsigned table_size = 1024;
63  static const unsigned io_type = nnet::io_parallel;
64 };
66  static const unsigned n_in = N_LAYER_2;
67  static const unsigned n_out = N_LAYER_3;
68  static const unsigned io_type = nnet::io_parallel;
69  static const unsigned reuse_factor = 1;
70  //static const unsigned reuse_factor = 6;
71  static const unsigned n_zeros = 0;
72  static const bool store_weights_in_bram = false;
76 };
78  static const unsigned n_in = N_LAYER_3;
79  static const unsigned table_size = 1024;
80  static const unsigned io_type = nnet::io_parallel;
81 };
83  static const unsigned n_in = N_LAYER_3;
84  static const unsigned n_out = N_OUTPUTS;
85  static const unsigned io_type = nnet::io_parallel;
86  static const unsigned reuse_factor = 1;
87  //static const unsigned reuse_factor = 6;
88  static const unsigned n_zeros = 0;
89  static const bool store_weights_in_bram = false;
93 };
95  static const unsigned n_in = N_OUTPUTS;
96  static const unsigned table_size = 1024;
97  static const unsigned io_type = nnet::io_parallel;
98 };
99 
100 #endif
static const unsigned n_out
static const unsigned n_out
#define N_LAYER_1
static const unsigned n_in
static const unsigned n_in
static const unsigned n_zeros
static const unsigned n_zeros
#define N_INPUTS
static const bool store_weights_in_bram
bias_default_t bias_t
static const unsigned reuse_factor
static const unsigned n_in
static const unsigned table_size
static const unsigned n_out
weight_default_t weight_t
static const unsigned table_size
bias_default_t bias_t
static const unsigned io_type
ap_fixed< 16, 8 > input_t
accum_default_t accum_t
static const bool store_weights_in_bram
static const bool store_weights_in_bram
ap_fixed< 16, 8 > weight_default_t
static const unsigned io_type
weight_default_t weight_t
static const unsigned n_in
ap_fixed< 16, 8 > layer2_t
static const unsigned n_out
weight_default_t weight_t
weight_default_t weight_t
accum_default_t accum_t
static const unsigned io_type
static const unsigned table_size
static const unsigned io_type
static const unsigned io_type
ap_fixed< 16, 8 > accum_default_t
#define N_LAYER_3
ap_fixed< 16, 8 > bias_default_t
static const unsigned n_in
ap_fixed< 16, 8 > layer3_t
static const bool store_weights_in_bram
bias_default_t bias_t
static const unsigned io_type
#define N_LAYER_2
static const unsigned n_in
static const unsigned table_size
ap_fixed< 24, 12 > input2_t
accum_default_t accum_t
#define N_OUTPUTS
ap_fixed< 16, 8 > result_t
static const unsigned reuse_factor
static const unsigned reuse_factor
static const unsigned n_in
static const unsigned n_in
static const unsigned n_zeros
static const unsigned io_type
static const unsigned n_zeros
bias_default_t bias_t
ap_fixed< 16, 8 > layer1_t
static const unsigned reuse_factor
accum_default_t accum_t
static const unsigned io_type