Target:
Source:
Actions:
Compare was calculated based on this common ancestor commit:
e0676cd8b3cd
Time | Author | Commit | Description | |
---|---|---|---|---|
paul
|
r162:32d2a1c32a62
|
|
||
paul
|
r163:397b59567aca
|
|
@@ -1,6 +1,6 | |||
|
1 | 1 | ############################################################################# |
|
2 | 2 | # Makefile for building: bin/fsw |
|
3 |
# Generated by qmake (2.01a) (Qt 4.8.6) on: |
|
|
3 | # Generated by qmake (2.01a) (Qt 4.8.6) on: Fri Jun 27 09:11:27 2014 | |
|
4 | 4 | # Project: fsw-qt.pro |
|
5 | 5 | # Template: app |
|
6 | 6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
@@ -10,7 +10,7 | |||
|
10 | 10 | |
|
11 | 11 | CC = sparc-rtems-gcc |
|
12 | 12 | CXX = sparc-rtems-g++ |
|
13 |
DEFINES = -DSW_VERSION_N1= |
|
|
13 | DEFINES = -DSW_VERSION_N1=2 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=1 -DPRINT_MESSAGES_ON_CONSOLE | |
|
14 | 14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | 15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
16 | 16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header -I../header/processing -I../src/LFR_basic-parameters |
@@ -7,11 +7,11 CONFIG -= qt | |||
|
7 | 7 | include(./sparc.pri) |
|
8 | 8 | |
|
9 | 9 | # flight software version |
|
10 |
SWVERSION=- |
|
|
11 |
DEFINES += SW_VERSION_N1= |
|
|
10 | SWVERSION=-2-0 | |
|
11 | DEFINES += SW_VERSION_N1=2 # major | |
|
12 | 12 | DEFINES += SW_VERSION_N2=0 # minor |
|
13 | 13 | DEFINES += SW_VERSION_N3=0 # patch |
|
14 |
DEFINES += SW_VERSION_N4=1 |
|
|
14 | DEFINES += SW_VERSION_N4=1 # internal | |
|
15 | 15 | |
|
16 | 16 | contains( CONFIG, debug_tch ) { |
|
17 | 17 | DEFINES += DEBUG_TCH |
@@ -1,6 +1,6 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <!DOCTYPE QtCreatorProject> |
|
3 |
<!-- Written by QtCreator 3.0.1, 2014-06-2 |
|
|
3 | <!-- Written by QtCreator 3.0.1, 2014-06-27T15:54:25. --> | |
|
4 | 4 | <qtcreator> |
|
5 | 5 | <data> |
|
6 | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -22,19 +22,22 | |||
|
22 | 22 | #define NB_BINS_PER_ASM_F0 88 |
|
23 | 23 | #define NB_BINS_PER_PKT_ASM_F0 44 |
|
24 | 24 | #define TOTAL_SIZE_ASM_F0_IN_BYTES 4400 // 25 * 88 * 2 |
|
25 | #define ASM_F0_INDICE_START 17 // 88 bins | |
|
25 | //#define ASM_F0_INDICE_START 17 // 88 bins | |
|
26 | #define ASM_F0_INDICE_START 0 | |
|
26 | 27 | #define ASM_F0_INDICE_STOP 104 // 2 packets of 44 bins |
|
27 | 28 | // |
|
28 | 29 | #define NB_BINS_PER_ASM_F1 104 |
|
29 | 30 | #define NB_BINS_PER_PKT_ASM_F1 52 |
|
30 | 31 | #define TOTAL_SIZE_ASM_F1_IN_BYTES 5200 // 25 * 104 * 2 |
|
31 | #define ASM_F1_INDICE_START 6 // 104 bins | |
|
32 | //#define ASM_F1_INDICE_START 6 // 104 bins | |
|
33 | #define ASM_F1_INDICE_START 0 | |
|
32 | 34 | #define ASM_F1_INDICE_STOP 109 // 2 packets of 52 bins |
|
33 | 35 | // |
|
34 | 36 | #define NB_BINS_PER_ASM_F2 96 |
|
35 | 37 | #define NB_BINS_PER_PKT_ASM_F2 48 |
|
36 | 38 | #define TOTAL_SIZE_ASM_F2_IN_BYTES 4800 // 25 * 96 * 2 |
|
37 | #define ASM_F2_INDICE_START 7 // 96 bins | |
|
39 | //#define ASM_F2_INDICE_START 7 // 96 bins | |
|
40 | #define ASM_F2_INDICE_START 0 | |
|
38 | 41 | #define ASM_F2_INDICE_STOP 102 // 2 packets of 48 bins |
|
39 | 42 | // |
|
40 | 43 | #define NB_BINS_COMPRESSED_SM_F0 11 |
@@ -19,6 +19,7 rtems_task prc2_task( rtems_task_argumen | |||
|
19 | 19 | |
|
20 | 20 | void reset_nb_sm_f2( void ); |
|
21 | 21 | void SM_average_f2( float *averaged_spec_mat_f2, ring_node_sm *ring_node, unsigned int nbAverageNormF2 ); |
|
22 | void SM_average_f2_alt( float *averaged_spec_mat_f2, ring_node_sm *ring_node, unsigned int nbAverageNormF2 ); | |
|
22 | 23 | |
|
23 | 24 | //******* |
|
24 | 25 | // EXTERN |
@@ -109,8 +109,11 extern rtems_status_code get_message_que | |||
|
109 | 109 | //*************************************** |
|
110 | 110 | // DEFINITIONS OF STATIC INLINE FUNCTIONS |
|
111 | 111 | static inline void SM_average( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM, |
|
112 | ring_node_sm *ring_node_tab[], | |
|
113 | unsigned int nbAverageNORM, unsigned int nbAverageSBM ); | |
|
112 | ring_node_sm *ring_node_tab[], | |
|
113 | unsigned int nbAverageNORM, unsigned int nbAverageSBM ); | |
|
114 | static inline void SM_average_alt( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM, | |
|
115 | ring_node_sm *ring_node_tab[], | |
|
116 | unsigned int nbAverageNORM, unsigned int nbAverageSBM ); | |
|
114 | 117 | static inline void ASM_reorganize_and_divide(float *averaged_spec_mat, float *averaged_spec_mat_reorganized, |
|
115 | 118 | float divider ); |
|
116 | 119 | static inline void ASM_compress_reorganize_and_divide(float *averaged_spec_mat, float *compressed_spec_mat, |
@@ -158,25 +161,45 void SM_average( float *averaged_spec_ma | |||
|
158 | 161 | } |
|
159 | 162 | } |
|
160 | 163 | |
|
164 | void SM_average_alt( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM, | |
|
165 | ring_node_sm *ring_node_tab[], unsigned int nbAverageNORM, unsigned int nbAverageSBM ) | |
|
166 | { | |
|
167 | float sum; | |
|
168 | unsigned int i; | |
|
169 | ||
|
170 | for(i=0; i<TOTAL_SIZE_SM; i++) | |
|
171 | { | |
|
172 | sum = ( (int *) (ring_node_tab[0]->buffer_address) ) [ i ]; | |
|
173 | averaged_spec_mat_NORM[ i ] = sum; | |
|
174 | averaged_spec_mat_SBM[ i ] = sum; | |
|
175 | } | |
|
176 | } | |
|
177 | ||
|
161 | 178 | void ASM_reorganize_and_divide( float *averaged_spec_mat, float *averaged_spec_mat_reorganized, float divider ) |
|
162 | 179 | { |
|
180 | // reorganize the data to have a matrix in the ICD format | |
|
181 | // INPUT (VHDL format) | |
|
182 | // component_0[0 .. 127] component_1_re[0 .. 127] component_1_im[0 .. 127] .. component_24[0 .. 127] | |
|
183 | // OUTPUT (ICD format) | |
|
184 | // matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24] | |
|
185 | ||
|
163 | 186 | int frequencyBin; |
|
164 | 187 | int asmComponent; |
|
165 |
unsigned int offsetA |
|
|
166 |
unsigned int offsetA |
|
|
188 | unsigned int offsetASMReorganized; | |
|
189 | unsigned int offsetASM; | |
|
167 | 190 | |
|
168 | 191 | for (asmComponent = 0; asmComponent < NB_VALUES_PER_SM; asmComponent++) |
|
169 | 192 | { |
|
170 | 193 | for( frequencyBin = 0; frequencyBin < NB_BINS_PER_SM; frequencyBin++ ) |
|
171 | 194 | { |
|
172 |
offsetA |
|
|
195 | offsetASM = | |
|
196 | asmComponent * NB_BINS_PER_SM | |
|
197 | + frequencyBin; | |
|
198 | offsetASMReorganized = | |
|
173 | 199 | frequencyBin * NB_VALUES_PER_SM |
|
174 | 200 | + asmComponent; |
|
175 | offsetAveragedSpecMat = | |
|
176 | asmComponent * NB_BINS_PER_SM | |
|
177 | + frequencyBin; | |
|
178 | averaged_spec_mat_reorganized[offsetAveragedSpecMatReorganized ] = | |
|
179 | averaged_spec_mat[ offsetAveragedSpecMat ] / divider; | |
|
201 | averaged_spec_mat_reorganized[ offsetASMReorganized ] = | |
|
202 | averaged_spec_mat[ offsetASM ] / divider; | |
|
180 | 203 | } |
|
181 | 204 | } |
|
182 | 205 | } |
@@ -215,6 +238,12 void ASM_compress_reorganize_and_divide( | |||
|
215 | 238 | |
|
216 | 239 | void ASM_convert( volatile float *input_matrix, char *output_matrix) |
|
217 | 240 | { |
|
241 | // convert the data to have a matrix in compressed float, 16 bits = [sign 1 bit *** exp 8 bits *** fraction 7 bits] | |
|
242 | // INTPUT (ICD format) | |
|
243 | // matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24] | |
|
244 | // OUTPUT (ICD format) | |
|
245 | // matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24] | |
|
246 | ||
|
218 | 247 | unsigned int frequencyBin; |
|
219 | 248 | unsigned int asmComponent; |
|
220 | 249 | char * pt_char_input; |
@@ -86,7 +86,7 rtems_task avf0_task( rtems_task_argumen | |||
|
86 | 86 | } |
|
87 | 87 | |
|
88 | 88 | // compute the average and store it in the averaged_sm_f1 buffer |
|
89 | SM_average( current_ring_node_asm_norm_f0->matrix, | |
|
89 | SM_average_alt( current_ring_node_asm_norm_f0->matrix, | |
|
90 | 90 | current_ring_node_asm_burst_sbm_f0->matrix, |
|
91 | 91 | ring_node_tab, |
|
92 | 92 | nb_norm_bp1, nb_sbm_bp1 ); |
@@ -83,7 +83,7 rtems_task avf1_task( rtems_task_argumen | |||
|
83 | 83 | } |
|
84 | 84 | |
|
85 | 85 | // compute the average and store it in the averaged_sm_f1 buffer |
|
86 | SM_average( current_ring_node_asm_norm_f1->matrix, | |
|
86 | SM_average_alt( current_ring_node_asm_norm_f1->matrix, | |
|
87 | 87 | current_ring_node_asm_burst_sbm_f1->matrix, |
|
88 | 88 | ring_node_tab, |
|
89 | 89 | nb_norm_bp1, nb_sbm_bp1 ); |
@@ -68,7 +68,7 rtems_task avf2_task( rtems_task_argumen | |||
|
68 | 68 | //**************************************** |
|
69 | 69 | |
|
70 | 70 | // compute the average and store it in the averaged_sm_f2 buffer |
|
71 | SM_average_f2( current_ring_node_asm_norm_f2->matrix, | |
|
71 | SM_average_f2_alt( current_ring_node_asm_norm_f2->matrix, | |
|
72 | 72 | ring_node_for_averaging_sm_f2, |
|
73 | 73 | nb_norm_bp1 ); |
|
74 | 74 | |
@@ -251,3 +251,17 void SM_average_f2( float *averaged_spec | |||
|
251 | 251 | } |
|
252 | 252 | } |
|
253 | 253 | } |
|
254 | ||
|
255 | void SM_average_f2_alt( float *averaged_spec_mat_f2, | |
|
256 | ring_node_sm *ring_node, | |
|
257 | unsigned int nbAverageNormF2 ) | |
|
258 | { | |
|
259 | float sum; | |
|
260 | unsigned int i; | |
|
261 | ||
|
262 | for(i=0; i<TOTAL_SIZE_SM; i++) | |
|
263 | { | |
|
264 | sum = ( (int *) (ring_node->buffer_address) ) [ i ]; | |
|
265 | averaged_spec_mat_f2[ i ] = sum; | |
|
266 | } | |
|
267 | } |