Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#ifndef _PARAM_H_
#define _PARAM_H_
typedef struct{
//Original signal
int inheight;
int inwidth;
int indepth;
int outheight;
int outwidth;
int outdepth;
int kernel_size;
int pad_size;
int stride;
//wino related
int wino5x5_flag;
// 1: 3x3, 0:5x5
int wino_output_tile_size;
//input buffer related
int indepth_align_minitile_size;
int indepth_align8;
int indepth_ceildiv8;
int inwidth_ceildiv_inbufferwidth;
int inwidth_align8;
int group_indepth_offset;
int group_indepth;
int input_ddr_bytes;
int input_ddr_128bits;
int group_indepth_x_inwidth_align8_by8;
int group_indepth_offset_x_inwidth_align8_by8;
int input_load_burst_length;
int buffer_address_mid_increment_step;
int row_address_bitnumber_flag;
// ouput_buffer_related
int outwidth_align8;
int outdepth_align8;
int outheight_align4;
int outdepth_align_minitile_size;
int group_outdepth_offset;
int group_outdepth;
int output_ddr_bytes;
int output_ddr_128bits;
// Weight_related
int weightbuffer_load_indepth_number;
int weightbuffer_load_indepth_step;
int weightbuffer_load_outdepth_number;
int weightbuffer_load_outdepth_step;
int weightbuffer_indepth_minitile_number;
int weightbuffer_outdepth_minitile_number;
int weightbuffer_total_load_number;
//weight_load hardware
int weightDDR_buffer_burst_length;
int weightDDR_port_burst_length;
int weightDDR_burst_number;
int loop_outdepth_minitile_baseidx_reset_cycle_minus1;
int loop_start_output_baserowcol_reset_cycle;
int loop_weight_feed_bound;
// input buffer feeding related
int wino_out_size_by_wino_width;
int wino_tile_number_in_outwidth;
int loop_outdepth_minitile_baseidx_reset_cycle;
int loop_wino_tile_col_reset_cycle;
int loop_wino_tile_row_reset_cycle;
int buffer_address_mid_minitile_depth_step;
int input_buffer_feeding_loop_bound;
int input_transform_feeding_loop_bound;
// row_tile calculation , these parameter have to be solved after weight parameters are decided.
int out_rowstep;
int wino_tile_number_in_out_rowstep;
// wino computation
int total_input_stream_tile;
int loop_omini_base_reset_cycle;
int loop_wino_cell_bound;
int loop_wino_tile_rowcol_self_reset_cycle_min1;
int loop_iload_reset_cycle;
int outbuffer_oload_increment_step;
int outbuffer_omini_increment_step;
//output write back
int outdepth_ceildiv8;
int output_burst_length;
int write_back_flag;
int wino_col_pix_upper_bound;
int wino_tile_number_rowcol;
int out_ddr_increment_step;
}ConvDesc_t;
void process_element6x6(
int input_height,
int input_width,
int input_depth,
int output_height,
int output_width,
int output_depth,
int kernel_size,
int stride_size,
int pad_size,
int group_indepth_offset,
int group_indepth,
int group_outdepth_offset,
int group_outdepth,
ConvDesc_t &conv_desc
);
#define CEIL_DIV(x,y) ( ( (x) + (y) - 1) / (y) )
#define ALIGN(x,y) ( ( (x) + (y) - 1) / (y) * (y) )
#endif