@@ -1,6 +1,6 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: bin/fsw |
|
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 | # Project: fsw-qt.pro |
|
4 | # Project: fsw-qt.pro | |
5 | # Template: app |
|
5 | # Template: app | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
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 | CC = sparc-rtems-gcc |
|
11 | CC = sparc-rtems-gcc | |
12 | CXX = sparc-rtems-g++ |
|
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 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) | |
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) | |
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header -I../header/processing -I../src/LFR_basic-parameters |
|
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 | include(./sparc.pri) |
|
7 | include(./sparc.pri) | |
8 |
|
8 | |||
9 | # flight software version |
|
9 | # flight software version | |
10 |
SWVERSION=- |
|
10 | SWVERSION=-2-0 | |
11 |
DEFINES += SW_VERSION_N1= |
|
11 | DEFINES += SW_VERSION_N1=2 # major | |
12 | DEFINES += SW_VERSION_N2=0 # minor |
|
12 | DEFINES += SW_VERSION_N2=0 # minor | |
13 | DEFINES += SW_VERSION_N3=0 # patch |
|
13 | DEFINES += SW_VERSION_N3=0 # patch | |
14 |
DEFINES += SW_VERSION_N4=1 |
|
14 | DEFINES += SW_VERSION_N4=1 # internal | |
15 |
|
15 | |||
16 | contains( CONFIG, debug_tch ) { |
|
16 | contains( CONFIG, debug_tch ) { | |
17 | DEFINES += DEBUG_TCH |
|
17 | DEFINES += DEBUG_TCH |
@@ -1,6 +1,6 | |||||
1 | <?xml version="1.0" encoding="UTF-8"?> |
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
2 | <!DOCTYPE QtCreatorProject> |
|
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 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -22,19 +22,22 | |||||
22 | #define NB_BINS_PER_ASM_F0 88 |
|
22 | #define NB_BINS_PER_ASM_F0 88 | |
23 | #define NB_BINS_PER_PKT_ASM_F0 44 |
|
23 | #define NB_BINS_PER_PKT_ASM_F0 44 | |
24 | #define TOTAL_SIZE_ASM_F0_IN_BYTES 4400 // 25 * 88 * 2 |
|
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 | #define ASM_F0_INDICE_STOP 104 // 2 packets of 44 bins |
|
27 | #define ASM_F0_INDICE_STOP 104 // 2 packets of 44 bins | |
27 | // |
|
28 | // | |
28 | #define NB_BINS_PER_ASM_F1 104 |
|
29 | #define NB_BINS_PER_ASM_F1 104 | |
29 | #define NB_BINS_PER_PKT_ASM_F1 52 |
|
30 | #define NB_BINS_PER_PKT_ASM_F1 52 | |
30 | #define TOTAL_SIZE_ASM_F1_IN_BYTES 5200 // 25 * 104 * 2 |
|
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 | #define ASM_F1_INDICE_STOP 109 // 2 packets of 52 bins |
|
34 | #define ASM_F1_INDICE_STOP 109 // 2 packets of 52 bins | |
33 | // |
|
35 | // | |
34 | #define NB_BINS_PER_ASM_F2 96 |
|
36 | #define NB_BINS_PER_ASM_F2 96 | |
35 | #define NB_BINS_PER_PKT_ASM_F2 48 |
|
37 | #define NB_BINS_PER_PKT_ASM_F2 48 | |
36 | #define TOTAL_SIZE_ASM_F2_IN_BYTES 4800 // 25 * 96 * 2 |
|
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 | #define ASM_F2_INDICE_STOP 102 // 2 packets of 48 bins |
|
41 | #define ASM_F2_INDICE_STOP 102 // 2 packets of 48 bins | |
39 | // |
|
42 | // | |
40 | #define NB_BINS_COMPRESSED_SM_F0 11 |
|
43 | #define NB_BINS_COMPRESSED_SM_F0 11 |
@@ -19,6 +19,7 rtems_task prc2_task( rtems_task_argumen | |||||
19 |
|
19 | |||
20 | void reset_nb_sm_f2( void ); |
|
20 | void reset_nb_sm_f2( void ); | |
21 | void SM_average_f2( float *averaged_spec_mat_f2, ring_node_sm *ring_node, unsigned int nbAverageNormF2 ); |
|
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 | // EXTERN |
|
25 | // EXTERN |
@@ -109,8 +109,11 extern rtems_status_code get_message_que | |||||
109 | //*************************************** |
|
109 | //*************************************** | |
110 | // DEFINITIONS OF STATIC INLINE FUNCTIONS |
|
110 | // DEFINITIONS OF STATIC INLINE FUNCTIONS | |
111 | static inline void SM_average( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM, |
|
111 | static inline void SM_average( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM, | |
112 | ring_node_sm *ring_node_tab[], |
|
112 | ring_node_sm *ring_node_tab[], | |
113 | unsigned int nbAverageNORM, unsigned int nbAverageSBM ); |
|
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 | static inline void ASM_reorganize_and_divide(float *averaged_spec_mat, float *averaged_spec_mat_reorganized, |
|
117 | static inline void ASM_reorganize_and_divide(float *averaged_spec_mat, float *averaged_spec_mat_reorganized, | |
115 | float divider ); |
|
118 | float divider ); | |
116 | static inline void ASM_compress_reorganize_and_divide(float *averaged_spec_mat, float *compressed_spec_mat, |
|
119 | static inline void ASM_compress_reorganize_and_divide(float *averaged_spec_mat, float *compressed_spec_mat, | |
@@ -158,11 +161,25 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 | void ASM_reorganize_and_divide( float *averaged_spec_mat, float *averaged_spec_mat_reorganized, float divider ) |
|
178 | void ASM_reorganize_and_divide( float *averaged_spec_mat, float *averaged_spec_mat_reorganized, float divider ) | |
162 | { |
|
179 | { | |
163 |
// reorganize the data to have a matrix in the |
|
180 | // reorganize the data to have a matrix in the ICD format | |
164 | // INPUT (VHDL format) |
|
181 | // INPUT (VHDL format) | |
165 | // component_0[0 .. 127] component_1[0 .. 127] .. component_24[0 .. 127] |
|
182 | // component_0[0 .. 127] component_1_re[0 .. 127] component_1_im[0 .. 127] .. component_24[0 .. 127] | |
166 | // OUTPUT (ICD format) |
|
183 | // OUTPUT (ICD format) | |
167 | // matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24] |
|
184 | // matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24] | |
168 |
|
185 |
@@ -86,7 +86,7 rtems_task avf0_task( rtems_task_argumen | |||||
86 | } |
|
86 | } | |
87 |
|
87 | |||
88 | // compute the average and store it in the averaged_sm_f1 buffer |
|
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 | current_ring_node_asm_burst_sbm_f0->matrix, |
|
90 | current_ring_node_asm_burst_sbm_f0->matrix, | |
91 | ring_node_tab, |
|
91 | ring_node_tab, | |
92 | nb_norm_bp1, nb_sbm_bp1 ); |
|
92 | nb_norm_bp1, nb_sbm_bp1 ); |
@@ -83,7 +83,7 rtems_task avf1_task( rtems_task_argumen | |||||
83 | } |
|
83 | } | |
84 |
|
84 | |||
85 | // compute the average and store it in the averaged_sm_f1 buffer |
|
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 | current_ring_node_asm_burst_sbm_f1->matrix, |
|
87 | current_ring_node_asm_burst_sbm_f1->matrix, | |
88 | ring_node_tab, |
|
88 | ring_node_tab, | |
89 | nb_norm_bp1, nb_sbm_bp1 ); |
|
89 | nb_norm_bp1, nb_sbm_bp1 ); |
@@ -68,7 +68,7 rtems_task avf2_task( rtems_task_argumen | |||||
68 | //**************************************** |
|
68 | //**************************************** | |
69 |
|
69 | |||
70 | // compute the average and store it in the averaged_sm_f2 buffer |
|
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 | ring_node_for_averaging_sm_f2, |
|
72 | ring_node_for_averaging_sm_f2, | |
73 | nb_norm_bp1 ); |
|
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 | } |
General Comments 0
You need to be logged in to leave comments.
Login now