##// END OF EJS Templates
PAS filtering implemented
paul -
r289:a907a62ed869 R3_plus draft
parent child
Show More
@@ -1,2 +1,2
1 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters
1 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters
2 dad8371a5549f3395f975fddc33098b05fd829f4 header/lfr_common_headers
2 2450d4935652a4d0370245cc7fc60a4c51e6fc9b header/lfr_common_headers
@@ -1,123 +1,123
1 TEMPLATE = app
1 TEMPLATE = app
2 # CONFIG += console v8 sim
2 # CONFIG += console v8 sim
3 # CONFIG options =
3 # CONFIG options =
4 # verbose
4 # verbose
5 # boot_messages
5 # boot_messages
6 # debug_messages
6 # debug_messages
7 # cpu_usage_report
7 # cpu_usage_report
8 # stack_report
8 # stack_report
9 # vhdl_dev
9 # vhdl_dev
10 # debug_tch
10 # debug_tch
11 # lpp_dpu_destid /!\ REMOVE BEFORE DELIVERY TO LESIA /!\
11 # lpp_dpu_destid /!\ REMOVE BEFORE DELIVERY TO LESIA /!\
12 # debug_watchdog
12 # debug_watchdog
13 CONFIG += console verbose lpp_dpu_destid
13 CONFIG += console verbose lpp_dpu_destid cpu_usage_report
14 CONFIG -= qt
14 CONFIG -= qt
15
15
16 include(./sparc.pri)
16 include(./sparc.pri)
17
17
18 # flight software version
18 # flight software version
19 SWVERSION=-1-0
19 SWVERSION=-1-0
20 DEFINES += SW_VERSION_N1=3 # major
20 DEFINES += SW_VERSION_N1=3 # major
21 DEFINES += SW_VERSION_N2=1 # minor
21 DEFINES += SW_VERSION_N2=1 # minor
22 DEFINES += SW_VERSION_N3=0 # patch
22 DEFINES += SW_VERSION_N3=0 # patch
23 DEFINES += SW_VERSION_N4=0 # internal
23 DEFINES += SW_VERSION_N4=0 # internal
24
24
25 # <GCOV>
25 # <GCOV>
26 #QMAKE_CFLAGS_RELEASE += -fprofile-arcs -ftest-coverage
26 #QMAKE_CFLAGS_RELEASE += -fprofile-arcs -ftest-coverage
27 #LIBS += -lgcov /opt/GCOV/01A/lib/overload.o -lc
27 #LIBS += -lgcov /opt/GCOV/01A/lib/overload.o -lc
28 # </GCOV>
28 # </GCOV>
29
29
30 # <CHANGE BEFORE FLIGHT>
30 # <CHANGE BEFORE FLIGHT>
31 contains( CONFIG, lpp_dpu_destid ) {
31 contains( CONFIG, lpp_dpu_destid ) {
32 DEFINES += LPP_DPU_DESTID
32 DEFINES += LPP_DPU_DESTID
33 }
33 }
34 # </CHANGE BEFORE FLIGHT>
34 # </CHANGE BEFORE FLIGHT>
35
35
36 contains( CONFIG, debug_tch ) {
36 contains( CONFIG, debug_tch ) {
37 DEFINES += DEBUG_TCH
37 DEFINES += DEBUG_TCH
38 }
38 }
39 DEFINES += MSB_FIRST_TCH
39 DEFINES += MSB_FIRST_TCH
40
40
41 contains( CONFIG, vhdl_dev ) {
41 contains( CONFIG, vhdl_dev ) {
42 DEFINES += VHDL_DEV
42 DEFINES += VHDL_DEV
43 }
43 }
44
44
45 contains( CONFIG, verbose ) {
45 contains( CONFIG, verbose ) {
46 DEFINES += PRINT_MESSAGES_ON_CONSOLE
46 DEFINES += PRINT_MESSAGES_ON_CONSOLE
47 }
47 }
48
48
49 contains( CONFIG, debug_messages ) {
49 contains( CONFIG, debug_messages ) {
50 DEFINES += DEBUG_MESSAGES
50 DEFINES += DEBUG_MESSAGES
51 }
51 }
52
52
53 contains( CONFIG, cpu_usage_report ) {
53 contains( CONFIG, cpu_usage_report ) {
54 DEFINES += PRINT_TASK_STATISTICS
54 DEFINES += PRINT_TASK_STATISTICS
55 }
55 }
56
56
57 contains( CONFIG, stack_report ) {
57 contains( CONFIG, stack_report ) {
58 DEFINES += PRINT_STACK_REPORT
58 DEFINES += PRINT_STACK_REPORT
59 }
59 }
60
60
61 contains( CONFIG, boot_messages ) {
61 contains( CONFIG, boot_messages ) {
62 DEFINES += BOOT_MESSAGES
62 DEFINES += BOOT_MESSAGES
63 }
63 }
64
64
65 contains( CONFIG, debug_watchdog ) {
65 contains( CONFIG, debug_watchdog ) {
66 DEFINES += DEBUG_WATCHDOG
66 DEFINES += DEBUG_WATCHDOG
67 }
67 }
68
68
69 #doxygen.target = doxygen
69 #doxygen.target = doxygen
70 #doxygen.commands = doxygen ../doc/Doxyfile
70 #doxygen.commands = doxygen ../doc/Doxyfile
71 #QMAKE_EXTRA_TARGETS += doxygen
71 #QMAKE_EXTRA_TARGETS += doxygen
72
72
73 TARGET = fsw
73 TARGET = fsw
74
74
75 INCLUDEPATH += \
75 INCLUDEPATH += \
76 $${PWD}/../src \
76 $${PWD}/../src \
77 $${PWD}/../header \
77 $${PWD}/../header \
78 $${PWD}/../header/lfr_common_headers \
78 $${PWD}/../header/lfr_common_headers \
79 $${PWD}/../header/processing \
79 $${PWD}/../header/processing \
80 $${PWD}/../LFR_basic-parameters
80 $${PWD}/../LFR_basic-parameters
81
81
82 SOURCES += \
82 SOURCES += \
83 ../src/wf_handler.c \
83 ../src/wf_handler.c \
84 ../src/tc_handler.c \
84 ../src/tc_handler.c \
85 ../src/fsw_misc.c \
85 ../src/fsw_misc.c \
86 ../src/fsw_init.c \
86 ../src/fsw_init.c \
87 ../src/fsw_globals.c \
87 ../src/fsw_globals.c \
88 ../src/fsw_spacewire.c \
88 ../src/fsw_spacewire.c \
89 ../src/tc_load_dump_parameters.c \
89 ../src/tc_load_dump_parameters.c \
90 ../src/tm_lfr_tc_exe.c \
90 ../src/tm_lfr_tc_exe.c \
91 ../src/tc_acceptance.c \
91 ../src/tc_acceptance.c \
92 ../src/processing/fsw_processing.c \
92 ../src/processing/fsw_processing.c \
93 ../src/processing/avf0_prc0.c \
93 ../src/processing/avf0_prc0.c \
94 ../src/processing/avf1_prc1.c \
94 ../src/processing/avf1_prc1.c \
95 ../src/processing/avf2_prc2.c \
95 ../src/processing/avf2_prc2.c \
96 ../src/lfr_cpu_usage_report.c \
96 ../src/lfr_cpu_usage_report.c \
97 ../LFR_basic-parameters/basic_parameters.c
97 ../LFR_basic-parameters/basic_parameters.c
98
98
99 HEADERS += \
99 HEADERS += \
100 ../header/wf_handler.h \
100 ../header/wf_handler.h \
101 ../header/tc_handler.h \
101 ../header/tc_handler.h \
102 ../header/grlib_regs.h \
102 ../header/grlib_regs.h \
103 ../header/fsw_misc.h \
103 ../header/fsw_misc.h \
104 ../header/fsw_init.h \
104 ../header/fsw_init.h \
105 ../header/fsw_spacewire.h \
105 ../header/fsw_spacewire.h \
106 ../header/tc_load_dump_parameters.h \
106 ../header/tc_load_dump_parameters.h \
107 ../header/tm_lfr_tc_exe.h \
107 ../header/tm_lfr_tc_exe.h \
108 ../header/tc_acceptance.h \
108 ../header/tc_acceptance.h \
109 ../header/processing/fsw_processing.h \
109 ../header/processing/fsw_processing.h \
110 ../header/processing/avf0_prc0.h \
110 ../header/processing/avf0_prc0.h \
111 ../header/processing/avf1_prc1.h \
111 ../header/processing/avf1_prc1.h \
112 ../header/processing/avf2_prc2.h \
112 ../header/processing/avf2_prc2.h \
113 ../header/fsw_params_wf_handler.h \
113 ../header/fsw_params_wf_handler.h \
114 ../header/lfr_cpu_usage_report.h \
114 ../header/lfr_cpu_usage_report.h \
115 ../header/lfr_common_headers/ccsds_types.h \
115 ../header/lfr_common_headers/ccsds_types.h \
116 ../header/lfr_common_headers/fsw_params.h \
116 ../header/lfr_common_headers/fsw_params.h \
117 ../header/lfr_common_headers/fsw_params_nb_bytes.h \
117 ../header/lfr_common_headers/fsw_params_nb_bytes.h \
118 ../header/lfr_common_headers/fsw_params_processing.h \
118 ../header/lfr_common_headers/fsw_params_processing.h \
119 ../header/lfr_common_headers/tm_byte_positions.h \
119 ../header/lfr_common_headers/tm_byte_positions.h \
120 ../LFR_basic-parameters/basic_parameters.h \
120 ../LFR_basic-parameters/basic_parameters.h \
121 ../LFR_basic-parameters/basic_parameters_params.h \
121 ../LFR_basic-parameters/basic_parameters_params.h \
122 ../header/GscMemoryLPP.hpp
122 ../header/GscMemoryLPP.hpp
123
123
@@ -1,332 +1,361
1 #ifndef FSW_PROCESSING_H_INCLUDED
1 #ifndef FSW_PROCESSING_H_INCLUDED
2 #define FSW_PROCESSING_H_INCLUDED
2 #define FSW_PROCESSING_H_INCLUDED
3
3
4 #include <rtems.h>
4 #include <rtems.h>
5 #include <grspw.h>
5 #include <grspw.h>
6 #include <math.h>
6 #include <math.h>
7 #include <stdlib.h> // abs() is in the stdlib
7 #include <stdlib.h> // abs() is in the stdlib
8 #include <stdio.h>
8 #include <stdio.h>
9 #include <math.h>
9 #include <math.h>
10 #include <grlib_regs.h>
10 #include <grlib_regs.h>
11
11
12 #include "fsw_params.h"
12 #include "fsw_params.h"
13
13
14 typedef struct ring_node_asm
14 typedef struct ring_node_asm
15 {
15 {
16 struct ring_node_asm *next;
16 struct ring_node_asm *next;
17 float matrix[ TOTAL_SIZE_SM ];
17 float matrix[ TOTAL_SIZE_SM ];
18 unsigned int status;
18 unsigned int status;
19 } ring_node_asm;
19 } ring_node_asm;
20
20
21 typedef struct
21 typedef struct
22 {
22 {
23 unsigned char targetLogicalAddress;
23 unsigned char targetLogicalAddress;
24 unsigned char protocolIdentifier;
24 unsigned char protocolIdentifier;
25 unsigned char reserved;
25 unsigned char reserved;
26 unsigned char userApplication;
26 unsigned char userApplication;
27 unsigned char packetID[2];
27 unsigned char packetID[2];
28 unsigned char packetSequenceControl[2];
28 unsigned char packetSequenceControl[2];
29 unsigned char packetLength[2];
29 unsigned char packetLength[2];
30 // DATA FIELD HEADER
30 // DATA FIELD HEADER
31 unsigned char spare1_pusVersion_spare2;
31 unsigned char spare1_pusVersion_spare2;
32 unsigned char serviceType;
32 unsigned char serviceType;
33 unsigned char serviceSubType;
33 unsigned char serviceSubType;
34 unsigned char destinationID;
34 unsigned char destinationID;
35 unsigned char time[6];
35 unsigned char time[6];
36 // AUXILIARY HEADER
36 // AUXILIARY HEADER
37 unsigned char sid;
37 unsigned char sid;
38 unsigned char pa_bia_status_info;
38 unsigned char pa_bia_status_info;
39 unsigned char sy_lfr_common_parameters_spare;
39 unsigned char sy_lfr_common_parameters_spare;
40 unsigned char sy_lfr_common_parameters;
40 unsigned char sy_lfr_common_parameters;
41 unsigned char acquisitionTime[6];
41 unsigned char acquisitionTime[6];
42 unsigned char pa_lfr_bp_blk_nr[2];
42 unsigned char pa_lfr_bp_blk_nr[2];
43 // SOURCE DATA
43 // SOURCE DATA
44 unsigned char data[ 780 ]; // MAX size is 26 bins * 30 Bytes [TM_LFR_SCIENCE_BURST_BP2_F1]
44 unsigned char data[ 780 ]; // MAX size is 26 bins * 30 Bytes [TM_LFR_SCIENCE_BURST_BP2_F1]
45 } bp_packet;
45 } bp_packet;
46
46
47 typedef struct
47 typedef struct
48 {
48 {
49 unsigned char targetLogicalAddress;
49 unsigned char targetLogicalAddress;
50 unsigned char protocolIdentifier;
50 unsigned char protocolIdentifier;
51 unsigned char reserved;
51 unsigned char reserved;
52 unsigned char userApplication;
52 unsigned char userApplication;
53 unsigned char packetID[2];
53 unsigned char packetID[2];
54 unsigned char packetSequenceControl[2];
54 unsigned char packetSequenceControl[2];
55 unsigned char packetLength[2];
55 unsigned char packetLength[2];
56 // DATA FIELD HEADER
56 // DATA FIELD HEADER
57 unsigned char spare1_pusVersion_spare2;
57 unsigned char spare1_pusVersion_spare2;
58 unsigned char serviceType;
58 unsigned char serviceType;
59 unsigned char serviceSubType;
59 unsigned char serviceSubType;
60 unsigned char destinationID;
60 unsigned char destinationID;
61 unsigned char time[6];
61 unsigned char time[6];
62 // AUXILIARY HEADER
62 // AUXILIARY HEADER
63 unsigned char sid;
63 unsigned char sid;
64 unsigned char pa_bia_status_info;
64 unsigned char pa_bia_status_info;
65 unsigned char sy_lfr_common_parameters_spare;
65 unsigned char sy_lfr_common_parameters_spare;
66 unsigned char sy_lfr_common_parameters;
66 unsigned char sy_lfr_common_parameters;
67 unsigned char acquisitionTime[6];
67 unsigned char acquisitionTime[6];
68 unsigned char source_data_spare;
68 unsigned char source_data_spare;
69 unsigned char pa_lfr_bp_blk_nr[2];
69 unsigned char pa_lfr_bp_blk_nr[2];
70 // SOURCE DATA
70 // SOURCE DATA
71 unsigned char data[ 143 ]; // 13 bins * 11 Bytes
71 unsigned char data[ 143 ]; // 13 bins * 11 Bytes
72 } bp_packet_with_spare; // only for TM_LFR_SCIENCE_NORMAL_BP1_F0 and F1
72 } bp_packet_with_spare; // only for TM_LFR_SCIENCE_NORMAL_BP1_F0 and F1
73
73
74 typedef struct asm_msg
74 typedef struct asm_msg
75 {
75 {
76 ring_node_asm *norm;
76 ring_node_asm *norm;
77 ring_node_asm *burst_sbm;
77 ring_node_asm *burst_sbm;
78 rtems_event_set event;
78 rtems_event_set event;
79 unsigned int coarseTimeNORM;
79 unsigned int coarseTimeNORM;
80 unsigned int fineTimeNORM;
80 unsigned int fineTimeNORM;
81 unsigned int coarseTimeSBM;
81 unsigned int coarseTimeSBM;
82 unsigned int fineTimeSBM;
82 unsigned int fineTimeSBM;
83 unsigned int numberOfSMInASMNORM;
84 unsigned int numberOfSMInASMSBM;
83 } asm_msg;
85 } asm_msg;
84
86
85 extern unsigned char thisIsAnASMRestart;
87 extern unsigned char thisIsAnASMRestart;
86
88
87 extern volatile int sm_f0[ ];
89 extern volatile int sm_f0[ ];
88 extern volatile int sm_f1[ ];
90 extern volatile int sm_f1[ ];
89 extern volatile int sm_f2[ ];
91 extern volatile int sm_f2[ ];
92 extern unsigned int acquisitionDurations[];
90
93
91 // parameters
94 // parameters
92 extern struct param_local_str param_local;
95 extern struct param_local_str param_local;
93 extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet;
96 extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet;
94
97
95 // registers
98 // registers
96 extern time_management_regs_t *time_management_regs;
99 extern time_management_regs_t *time_management_regs;
97 extern volatile spectral_matrix_regs_t *spectral_matrix_regs;
100 extern volatile spectral_matrix_regs_t *spectral_matrix_regs;
98
101
99 extern rtems_name misc_name[5];
102 extern rtems_name misc_name[5];
100 extern rtems_id Task_id[20]; /* array of task ids */
103 extern rtems_id Task_id[20]; /* array of task ids */
101
104
102 ring_node * getRingNodeForAveraging( unsigned char frequencyChannel);
105 ring_node * getRingNodeForAveraging( unsigned char frequencyChannel);
103 // ISR
106 // ISR
104 rtems_isr spectral_matrices_isr( rtems_vector_number vector );
107 rtems_isr spectral_matrices_isr( rtems_vector_number vector );
105
108
106 //******************
109 //******************
107 // Spectral Matrices
110 // Spectral Matrices
108 void reset_nb_sm( void );
111 void reset_nb_sm( void );
109 // SM
112 // SM
110 void SM_init_rings( void );
113 void SM_init_rings( void );
111 void SM_reset_current_ring_nodes( void );
114 void SM_reset_current_ring_nodes( void );
112 // ASM
115 // ASM
113 void ASM_generic_init_ring(ring_node_asm *ring, unsigned char nbNodes );
116 void ASM_generic_init_ring(ring_node_asm *ring, unsigned char nbNodes );
114
117
115 //*****************
118 //*****************
116 // Basic Parameters
119 // Basic Parameters
117
120
118 void BP_reset_current_ring_nodes( void );
121 void BP_reset_current_ring_nodes( void );
119 void BP_init_header(bp_packet *packet,
122 void BP_init_header(bp_packet *packet,
120 unsigned int apid, unsigned char sid,
123 unsigned int apid, unsigned char sid,
121 unsigned int packetLength , unsigned char blkNr);
124 unsigned int packetLength , unsigned char blkNr);
122 void BP_init_header_with_spare(bp_packet_with_spare *packet,
125 void BP_init_header_with_spare(bp_packet_with_spare *packet,
123 unsigned int apid, unsigned char sid,
126 unsigned int apid, unsigned char sid,
124 unsigned int packetLength, unsigned char blkNr );
127 unsigned int packetLength, unsigned char blkNr );
125 void BP_send( char *data,
128 void BP_send( char *data,
126 rtems_id queue_id,
129 rtems_id queue_id,
127 unsigned int nbBytesToSend , unsigned int sid );
130 unsigned int nbBytesToSend , unsigned int sid );
128 void BP_send_s1_s2(char *data,
131 void BP_send_s1_s2(char *data,
129 rtems_id queue_id,
132 rtems_id queue_id,
130 unsigned int nbBytesToSend, unsigned int sid );
133 unsigned int nbBytesToSend, unsigned int sid );
131
134
132 //******************
135 //******************
133 // general functions
136 // general functions
134 void reset_sm_status( void );
137 void reset_sm_status( void );
135 void reset_spectral_matrix_regs( void );
138 void reset_spectral_matrix_regs( void );
136 void set_time(unsigned char *time, unsigned char *timeInBuffer );
139 void set_time(unsigned char *time, unsigned char *timeInBuffer );
137 unsigned long long int get_acquisition_time( unsigned char *timePtr );
140 unsigned long long int get_acquisition_time( unsigned char *timePtr );
138 unsigned char getSID( rtems_event_set event );
141 unsigned char getSID( rtems_event_set event );
139
142
140 extern rtems_status_code get_message_queue_id_prc1( rtems_id *queue_id );
143 extern rtems_status_code get_message_queue_id_prc1( rtems_id *queue_id );
141 extern rtems_status_code get_message_queue_id_prc2( rtems_id *queue_id );
144 extern rtems_status_code get_message_queue_id_prc2( rtems_id *queue_id );
142
145
143 //***************************************
146 //***************************************
144 // DEFINITIONS OF STATIC INLINE FUNCTIONS
147 // DEFINITIONS OF STATIC INLINE FUNCTIONS
145 static inline void SM_average(float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM,
148 static inline void SM_average(float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM,
146 ring_node *ring_node_tab[],
149 ring_node *ring_node_tab[],
147 unsigned int nbAverageNORM, unsigned int nbAverageSBM,
150 unsigned int nbAverageNORM, unsigned int nbAverageSBM,
148 asm_msg *msgForMATR );
151 asm_msg *msgForMATR , unsigned char channel);
149
150 static inline void SM_average_debug(float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM,
151 ring_node *ring_node_tab[],
152 unsigned int nbAverageNORM, unsigned int nbAverageSBM,
153 asm_msg *msgForMATR );
154
152
155 void ASM_patch( float *inputASM, float *outputASM );
153 void ASM_patch( float *inputASM, float *outputASM );
156
154
157 void extractReImVectors(float *inputASM, float *outputASM, unsigned int asmComponent );
155 void extractReImVectors(float *inputASM, float *outputASM, unsigned int asmComponent );
158
156
159 static inline void ASM_reorganize_and_divide(float *averaged_spec_mat, float *averaged_spec_mat_reorganized,
157 static inline void ASM_reorganize_and_divide(float *averaged_spec_mat, float *averaged_spec_mat_reorganized,
160 float divider );
158 float divider );
161
159
162 static inline void ASM_compress_reorganize_and_divide(float *averaged_spec_mat, float *compressed_spec_mat,
160 static inline void ASM_compress_reorganize_and_divide(float *averaged_spec_mat, float *compressed_spec_mat,
163 float divider,
161 float divider,
164 unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage , unsigned char ASMIndexStart);
162 unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage , unsigned char ASMIndexStart);
165
163
166 static inline void ASM_convert(volatile float *input_matrix, char *output_matrix);
164 static inline void ASM_convert(volatile float *input_matrix, char *output_matrix);
167
165
166 unsigned char acquisitionTimeIsValid(unsigned int coarseTime, unsigned int fineTime, unsigned char channel);
167
168 void SM_average( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM,
168 void SM_average( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM,
169 ring_node *ring_node_tab[],
169 ring_node *ring_node_tab[],
170 unsigned int nbAverageNORM, unsigned int nbAverageSBM,
170 unsigned int nbAverageNORM, unsigned int nbAverageSBM,
171 asm_msg *msgForMATR )
171 asm_msg *msgForMATR, unsigned char channel )
172 {
172 {
173 float sum;
173 float sum;
174 unsigned int i;
174 unsigned int i;
175 unsigned int k;
176 unsigned char incomingSMIsValid[8];
177 unsigned int numberOfValidSM;
178 unsigned char isValid;
175
179
180 //**************
181 // PAS FILTERING
182 // check acquisitionTime of the incoming data
183 numberOfValidSM = 0;
184 for (k=0; k<8; k++)
185 {
186 isValid = acquisitionTimeIsValid( ring_node_tab[k]->coarseTime, ring_node_tab[k]->fineTime, channel );
187 incomingSMIsValid[k] = isValid;
188 numberOfValidSM = numberOfValidSM + isValid;
189 }
190
191 //************************
192 // AVERAGE SPECTRAL MATRIX
176 for(i=0; i<TOTAL_SIZE_SM; i++)
193 for(i=0; i<TOTAL_SIZE_SM; i++)
177 {
194 {
178 sum = ( (int *) (ring_node_tab[0]->buffer_address) ) [ i ]
195 // sum = ( (int *) (ring_node_tab[0]->buffer_address) ) [ i ]
179 + ( (int *) (ring_node_tab[1]->buffer_address) ) [ i ]
196 // + ( (int *) (ring_node_tab[1]->buffer_address) ) [ i ]
180 + ( (int *) (ring_node_tab[2]->buffer_address) ) [ i ]
197 // + ( (int *) (ring_node_tab[2]->buffer_address) ) [ i ]
181 + ( (int *) (ring_node_tab[3]->buffer_address) ) [ i ]
198 // + ( (int *) (ring_node_tab[3]->buffer_address) ) [ i ]
182 + ( (int *) (ring_node_tab[4]->buffer_address) ) [ i ]
199 // + ( (int *) (ring_node_tab[4]->buffer_address) ) [ i ]
183 + ( (int *) (ring_node_tab[5]->buffer_address) ) [ i ]
200 // + ( (int *) (ring_node_tab[5]->buffer_address) ) [ i ]
184 + ( (int *) (ring_node_tab[6]->buffer_address) ) [ i ]
201 // + ( (int *) (ring_node_tab[6]->buffer_address) ) [ i ]
185 + ( (int *) (ring_node_tab[7]->buffer_address) ) [ i ];
202 // + ( (int *) (ring_node_tab[7]->buffer_address) ) [ i ];
203
204 sum = ( (incomingSMIsValid[0] == 1) ? ( (int *) (ring_node_tab[0]->buffer_address) ) [ i ] : 0.0 )
205 + ( (incomingSMIsValid[1] == 1) ? ( (int *) (ring_node_tab[1]->buffer_address) ) [ i ] : 0.0 )
206 + ( (incomingSMIsValid[2] == 1) ? ( (int *) (ring_node_tab[2]->buffer_address) ) [ i ] : 0.0 )
207 + ( (incomingSMIsValid[3] == 1) ? ( (int *) (ring_node_tab[3]->buffer_address) ) [ i ] : 0.0 )
208 + ( (incomingSMIsValid[4] == 1) ? ( (int *) (ring_node_tab[4]->buffer_address) ) [ i ] : 0.0 )
209 + ( (incomingSMIsValid[5] == 1) ? ( (int *) (ring_node_tab[5]->buffer_address) ) [ i ] : 0.0 )
210 + ( (incomingSMIsValid[6] == 1) ? ( (int *) (ring_node_tab[6]->buffer_address) ) [ i ] : 0.0 )
211 + ( (incomingSMIsValid[7] == 1) ? ( (int *) (ring_node_tab[7]->buffer_address) ) [ i ] : 0.0 );
186
212
187 if ( (nbAverageNORM == 0) && (nbAverageSBM == 0) )
213 if ( (nbAverageNORM == 0) && (nbAverageSBM == 0) )
188 {
214 {
189 averaged_spec_mat_NORM[ i ] = sum;
215 averaged_spec_mat_NORM[ i ] = sum;
190 averaged_spec_mat_SBM[ i ] = sum;
216 averaged_spec_mat_SBM[ i ] = sum;
191 msgForMATR->coarseTimeNORM = ring_node_tab[0]->coarseTime;
217 msgForMATR->coarseTimeNORM = ring_node_tab[0]->coarseTime;
192 msgForMATR->fineTimeNORM = ring_node_tab[0]->fineTime;
218 msgForMATR->fineTimeNORM = ring_node_tab[0]->fineTime;
193 msgForMATR->coarseTimeSBM = ring_node_tab[0]->coarseTime;
219 msgForMATR->coarseTimeSBM = ring_node_tab[0]->coarseTime;
194 msgForMATR->fineTimeSBM = ring_node_tab[0]->fineTime;
220 msgForMATR->fineTimeSBM = ring_node_tab[0]->fineTime;
195 }
221 }
196 else if ( (nbAverageNORM != 0) && (nbAverageSBM != 0) )
222 else if ( (nbAverageNORM != 0) && (nbAverageSBM != 0) )
197 {
223 {
198 averaged_spec_mat_NORM[ i ] = ( averaged_spec_mat_NORM[ i ] + sum );
224 averaged_spec_mat_NORM[ i ] = ( averaged_spec_mat_NORM[ i ] + sum );
199 averaged_spec_mat_SBM[ i ] = ( averaged_spec_mat_SBM[ i ] + sum );
225 averaged_spec_mat_SBM[ i ] = ( averaged_spec_mat_SBM[ i ] + sum );
200 }
226 }
201 else if ( (nbAverageNORM != 0) && (nbAverageSBM == 0) )
227 else if ( (nbAverageNORM != 0) && (nbAverageSBM == 0) )
202 {
228 {
203 averaged_spec_mat_NORM[ i ] = ( averaged_spec_mat_NORM[ i ] + sum );
229 averaged_spec_mat_NORM[ i ] = ( averaged_spec_mat_NORM[ i ] + sum );
204 averaged_spec_mat_SBM[ i ] = sum;
230 averaged_spec_mat_SBM[ i ] = sum;
205 msgForMATR->coarseTimeSBM = ring_node_tab[0]->coarseTime;
231 msgForMATR->coarseTimeSBM = ring_node_tab[0]->coarseTime;
206 msgForMATR->fineTimeSBM = ring_node_tab[0]->fineTime;
232 msgForMATR->fineTimeSBM = ring_node_tab[0]->fineTime;
207 }
233 }
208 else
234 else
209 {
235 {
210 averaged_spec_mat_NORM[ i ] = sum;
236 averaged_spec_mat_NORM[ i ] = sum;
211 averaged_spec_mat_SBM[ i ] = ( averaged_spec_mat_SBM[ i ] + sum );
237 averaged_spec_mat_SBM[ i ] = ( averaged_spec_mat_SBM[ i ] + sum );
212 msgForMATR->coarseTimeNORM = ring_node_tab[0]->coarseTime;
238 msgForMATR->coarseTimeNORM = ring_node_tab[0]->coarseTime;
213 msgForMATR->fineTimeNORM = ring_node_tab[0]->fineTime;
239 msgForMATR->fineTimeNORM = ring_node_tab[0]->fineTime;
214 // PRINTF2("ERR *** in SM_average *** unexpected parameters %d %d\n", nbAverageNORM, nbAverageSBM)
240 // PRINTF2("ERR *** in SM_average *** unexpected parameters %d %d\n", nbAverageNORM, nbAverageSBM)
215 }
241 }
216 }
242 }
217 }
218
243
219 void SM_average_debug( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM,
244 //*******************
220 ring_node *ring_node_tab[],
245 // UPDATE SM COUNTERS
221 unsigned int nbAverageNORM, unsigned int nbAverageSBM,
246 if ( (nbAverageNORM == 0) && (nbAverageSBM == 0) )
222 asm_msg *msgForMATR )
247 {
223 {
248 msgForMATR->numberOfSMInASMNORM = numberOfValidSM;
224 float sum;
249 msgForMATR->numberOfSMInASMSBM = numberOfValidSM;
225 unsigned int i;
250 }
226
251 else if ( (nbAverageNORM != 0) && (nbAverageSBM != 0) )
227 for(i=0; i<TOTAL_SIZE_SM; i++)
228 {
252 {
229 sum = ( (int *) (ring_node_tab[0]->buffer_address) ) [ i ];
253 msgForMATR->numberOfSMInASMNORM = msgForMATR->numberOfSMInASMNORM + numberOfValidSM;
230 averaged_spec_mat_NORM[ i ] = sum;
254 msgForMATR->numberOfSMInASMSBM = msgForMATR->numberOfSMInASMSBM + numberOfValidSM;
231 averaged_spec_mat_SBM[ i ] = sum;
255 }
232 msgForMATR->coarseTimeNORM = ring_node_tab[0]->coarseTime;
256 else if ( (nbAverageNORM != 0) && (nbAverageSBM == 0) )
233 msgForMATR->fineTimeNORM = ring_node_tab[0]->fineTime;
257 {
234 msgForMATR->coarseTimeSBM = ring_node_tab[0]->coarseTime;
258 msgForMATR->numberOfSMInASMNORM = msgForMATR->numberOfSMInASMNORM + numberOfValidSM;
235 msgForMATR->fineTimeSBM = ring_node_tab[0]->fineTime;
259 msgForMATR->numberOfSMInASMSBM = numberOfValidSM;
260 }
261 else
262 {
263 msgForMATR->numberOfSMInASMNORM = numberOfValidSM;
264 msgForMATR->numberOfSMInASMSBM = msgForMATR->numberOfSMInASMSBM + numberOfValidSM;
236 }
265 }
237 }
266 }
238
267
239 void ASM_reorganize_and_divide( float *averaged_spec_mat, float *averaged_spec_mat_reorganized, float divider )
268 void ASM_reorganize_and_divide( float *averaged_spec_mat, float *averaged_spec_mat_reorganized, float divider )
240 {
269 {
241 int frequencyBin;
270 int frequencyBin;
242 int asmComponent;
271 int asmComponent;
243 unsigned int offsetASM;
272 unsigned int offsetASM;
244 unsigned int offsetASMReorganized;
273 unsigned int offsetASMReorganized;
245
274
246 // BUILD DATA
275 // BUILD DATA
247 for (asmComponent = 0; asmComponent < NB_VALUES_PER_SM; asmComponent++)
276 for (asmComponent = 0; asmComponent < NB_VALUES_PER_SM; asmComponent++)
248 {
277 {
249 for( frequencyBin = 0; frequencyBin < NB_BINS_PER_SM; frequencyBin++ )
278 for( frequencyBin = 0; frequencyBin < NB_BINS_PER_SM; frequencyBin++ )
250 {
279 {
251 offsetASMReorganized =
280 offsetASMReorganized =
252 frequencyBin * NB_VALUES_PER_SM
281 frequencyBin * NB_VALUES_PER_SM
253 + asmComponent;
282 + asmComponent;
254 offsetASM =
283 offsetASM =
255 asmComponent * NB_BINS_PER_SM
284 asmComponent * NB_BINS_PER_SM
256 + frequencyBin;
285 + frequencyBin;
257 averaged_spec_mat_reorganized[offsetASMReorganized ] =
286 averaged_spec_mat_reorganized[offsetASMReorganized ] =
258 averaged_spec_mat[ offsetASM ] / divider;
287 (divider != 0.0) ? averaged_spec_mat[ offsetASM ] / divider : 0.0;
259 }
288 }
260 }
289 }
261 }
290 }
262
291
263 void ASM_compress_reorganize_and_divide(float *averaged_spec_mat, float *compressed_spec_mat , float divider,
292 void ASM_compress_reorganize_and_divide(float *averaged_spec_mat, float *compressed_spec_mat , float divider,
264 unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage, unsigned char ASMIndexStart )
293 unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage, unsigned char ASMIndexStart )
265 {
294 {
266 int frequencyBin;
295 int frequencyBin;
267 int asmComponent;
296 int asmComponent;
268 int offsetASM;
297 int offsetASM;
269 int offsetCompressed;
298 int offsetCompressed;
270 int k;
299 int k;
271
300
272 // BUILD DATA
301 // BUILD DATA
273 for (asmComponent = 0; asmComponent < NB_VALUES_PER_SM; asmComponent++)
302 for (asmComponent = 0; asmComponent < NB_VALUES_PER_SM; asmComponent++)
274 {
303 {
275 for( frequencyBin = 0; frequencyBin < nbBinsCompressedMatrix; frequencyBin++ )
304 for( frequencyBin = 0; frequencyBin < nbBinsCompressedMatrix; frequencyBin++ )
276 {
305 {
277 offsetCompressed = // NO TIME OFFSET
306 offsetCompressed = // NO TIME OFFSET
278 frequencyBin * NB_VALUES_PER_SM
307 frequencyBin * NB_VALUES_PER_SM
279 + asmComponent;
308 + asmComponent;
280 offsetASM = // NO TIME OFFSET
309 offsetASM = // NO TIME OFFSET
281 asmComponent * NB_BINS_PER_SM
310 asmComponent * NB_BINS_PER_SM
282 + ASMIndexStart
311 + ASMIndexStart
283 + frequencyBin * nbBinsToAverage;
312 + frequencyBin * nbBinsToAverage;
284 compressed_spec_mat[ offsetCompressed ] = 0;
313 compressed_spec_mat[ offsetCompressed ] = 0;
285 for ( k = 0; k < nbBinsToAverage; k++ )
314 for ( k = 0; k < nbBinsToAverage; k++ )
286 {
315 {
287 compressed_spec_mat[offsetCompressed ] =
316 compressed_spec_mat[offsetCompressed ] =
288 ( compressed_spec_mat[ offsetCompressed ]
317 ( compressed_spec_mat[ offsetCompressed ]
289 + averaged_spec_mat[ offsetASM + k ] );
318 + averaged_spec_mat[ offsetASM + k ] );
290 }
319 }
291 compressed_spec_mat[ offsetCompressed ] =
320 compressed_spec_mat[ offsetCompressed ] =
292 compressed_spec_mat[ offsetCompressed ] / (divider * nbBinsToAverage);
321 compressed_spec_mat[ offsetCompressed ] / (divider * nbBinsToAverage);
293 }
322 }
294 }
323 }
295 }
324 }
296
325
297 void ASM_convert( volatile float *input_matrix, char *output_matrix)
326 void ASM_convert( volatile float *input_matrix, char *output_matrix)
298 {
327 {
299 unsigned int frequencyBin;
328 unsigned int frequencyBin;
300 unsigned int asmComponent;
329 unsigned int asmComponent;
301 char * pt_char_input;
330 char * pt_char_input;
302 char * pt_char_output;
331 char * pt_char_output;
303 unsigned int offsetInput;
332 unsigned int offsetInput;
304 unsigned int offsetOutput;
333 unsigned int offsetOutput;
305
334
306 pt_char_input = (char*) &input_matrix;
335 pt_char_input = (char*) &input_matrix;
307 pt_char_output = (char*) &output_matrix;
336 pt_char_output = (char*) &output_matrix;
308
337
309 // convert all other data
338 // convert all other data
310 for( frequencyBin=0; frequencyBin<NB_BINS_PER_SM; frequencyBin++)
339 for( frequencyBin=0; frequencyBin<NB_BINS_PER_SM; frequencyBin++)
311 {
340 {
312 for ( asmComponent=0; asmComponent<NB_VALUES_PER_SM; asmComponent++)
341 for ( asmComponent=0; asmComponent<NB_VALUES_PER_SM; asmComponent++)
313 {
342 {
314 offsetInput = (frequencyBin*NB_VALUES_PER_SM) + asmComponent ;
343 offsetInput = (frequencyBin*NB_VALUES_PER_SM) + asmComponent ;
315 offsetOutput = 2 * ( (frequencyBin*NB_VALUES_PER_SM) + asmComponent ) ;
344 offsetOutput = 2 * ( (frequencyBin*NB_VALUES_PER_SM) + asmComponent ) ;
316 pt_char_input = (char*) &input_matrix [ offsetInput ];
345 pt_char_input = (char*) &input_matrix [ offsetInput ];
317 pt_char_output = (char*) &output_matrix[ offsetOutput ];
346 pt_char_output = (char*) &output_matrix[ offsetOutput ];
318 pt_char_output[0] = pt_char_input[0]; // bits 31 downto 24 of the float
347 pt_char_output[0] = pt_char_input[0]; // bits 31 downto 24 of the float
319 pt_char_output[1] = pt_char_input[1]; // bits 23 downto 16 of the float
348 pt_char_output[1] = pt_char_input[1]; // bits 23 downto 16 of the float
320 }
349 }
321 }
350 }
322 }
351 }
323
352
324 void ASM_compress_reorganize_and_divide_mask(float *averaged_spec_mat, float *compressed_spec_mat,
353 void ASM_compress_reorganize_and_divide_mask(float *averaged_spec_mat, float *compressed_spec_mat,
325 float divider,
354 float divider,
326 unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage , unsigned char ASMIndexStart, unsigned char channel);
355 unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage , unsigned char ASMIndexStart, unsigned char channel);
327
356
328 int getFBinMask(int k, unsigned char channel);
357 int getFBinMask(int k, unsigned char channel);
329
358
330 void init_kcoeff_sbm_from_kcoeff_norm( float *input_kcoeff, float *output_kcoeff, unsigned char nb_bins_norm);
359 void init_kcoeff_sbm_from_kcoeff_norm( float *input_kcoeff, float *output_kcoeff, unsigned char nb_bins_norm);
331
360
332 #endif // FSW_PROCESSING_H_INCLUDED
361 #endif // FSW_PROCESSING_H_INCLUDED
@@ -1,95 +1,96
1 /** Global variables of the LFR flight software.
1 /** Global variables of the LFR flight software.
2 *
2 *
3 * @file
3 * @file
4 * @author P. LEROY
4 * @author P. LEROY
5 *
5 *
6 * Among global variables, there are:
6 * Among global variables, there are:
7 * - RTEMS names and id.
7 * - RTEMS names and id.
8 * - APB configuration registers.
8 * - APB configuration registers.
9 * - waveforms global buffers, used by the waveform picker hardware module to store data.
9 * - waveforms global buffers, used by the waveform picker hardware module to store data.
10 * - spectral matrices buffesr, used by the hardware module to store data.
10 * - spectral matrices buffesr, used by the hardware module to store data.
11 * - variable related to LFR modes parameters.
11 * - variable related to LFR modes parameters.
12 * - the global HK packet buffer.
12 * - the global HK packet buffer.
13 * - the global dump parameter buffer.
13 * - the global dump parameter buffer.
14 *
14 *
15 */
15 */
16
16
17 #include <rtems.h>
17 #include <rtems.h>
18 #include <grspw.h>
18 #include <grspw.h>
19
19
20 #include "ccsds_types.h"
20 #include "ccsds_types.h"
21 #include "grlib_regs.h"
21 #include "grlib_regs.h"
22 #include "fsw_params.h"
22 #include "fsw_params.h"
23 #include "fsw_params_wf_handler.h"
23 #include "fsw_params_wf_handler.h"
24
24
25 // RTEMS GLOBAL VARIABLES
25 // RTEMS GLOBAL VARIABLES
26 rtems_name misc_name[5];
26 rtems_name misc_name[5];
27 rtems_name Task_name[20]; /* array of task names */
27 rtems_name Task_name[20]; /* array of task names */
28 rtems_id Task_id[20]; /* array of task ids */
28 rtems_id Task_id[20]; /* array of task ids */
29 rtems_name timecode_timer_name;
29 rtems_name timecode_timer_name;
30 rtems_id timecode_timer_id;
30 rtems_id timecode_timer_id;
31 int fdSPW = 0;
31 int fdSPW = 0;
32 int fdUART = 0;
32 int fdUART = 0;
33 unsigned char lfrCurrentMode;
33 unsigned char lfrCurrentMode;
34 unsigned char pa_bia_status_info;
34 unsigned char pa_bia_status_info;
35 unsigned char thisIsAnASMRestart = 0;
35 unsigned char thisIsAnASMRestart = 0;
36 unsigned char oneTcLfrUpdateTimeReceived = 0;
36 unsigned char oneTcLfrUpdateTimeReceived = 0;
37
37
38 // WAVEFORMS GLOBAL VARIABLES // 2048 * 3 * 4 + 2 * 4 = 24576 + 8 bytes = 24584
38 // WAVEFORMS GLOBAL VARIABLES // 2048 * 3 * 4 + 2 * 4 = 24576 + 8 bytes = 24584
39 // 97 * 256 = 24832 => delta = 248 bytes = 62 words
39 // 97 * 256 = 24832 => delta = 248 bytes = 62 words
40 // WAVEFORMS GLOBAL VARIABLES // 2688 * 3 * 4 + 2 * 4 = 32256 + 8 bytes = 32264
40 // WAVEFORMS GLOBAL VARIABLES // 2688 * 3 * 4 + 2 * 4 = 32256 + 8 bytes = 32264
41 // 127 * 256 = 32512 => delta = 248 bytes = 62 words
41 // 127 * 256 = 32512 => delta = 248 bytes = 62 words
42 // F0 F1 F2 F3
42 // F0 F1 F2 F3
43 volatile int wf_buffer_f0[ NB_RING_NODES_F0 * WFRM_BUFFER ] __attribute__((aligned(0x100)));
43 volatile int wf_buffer_f0[ NB_RING_NODES_F0 * WFRM_BUFFER ] __attribute__((aligned(0x100)));
44 volatile int wf_buffer_f1[ NB_RING_NODES_F1 * WFRM_BUFFER ] __attribute__((aligned(0x100)));
44 volatile int wf_buffer_f1[ NB_RING_NODES_F1 * WFRM_BUFFER ] __attribute__((aligned(0x100)));
45 volatile int wf_buffer_f2[ NB_RING_NODES_F2 * WFRM_BUFFER ] __attribute__((aligned(0x100)));
45 volatile int wf_buffer_f2[ NB_RING_NODES_F2 * WFRM_BUFFER ] __attribute__((aligned(0x100)));
46 volatile int wf_buffer_f3[ NB_RING_NODES_F3 * WFRM_BUFFER ] __attribute__((aligned(0x100)));
46 volatile int wf_buffer_f3[ NB_RING_NODES_F3 * WFRM_BUFFER ] __attribute__((aligned(0x100)));
47
47
48 //***********************************
48 //***********************************
49 // SPECTRAL MATRICES GLOBAL VARIABLES
49 // SPECTRAL MATRICES GLOBAL VARIABLES
50
50
51 // alignment constraints for the spectral matrices buffers => the first data after the time (8 bytes) shall be aligned on 0x00
51 // alignment constraints for the spectral matrices buffers => the first data after the time (8 bytes) shall be aligned on 0x00
52 volatile int sm_f0[ NB_RING_NODES_SM_F0 * TOTAL_SIZE_SM ] __attribute__((aligned(0x100)));
52 volatile int sm_f0[ NB_RING_NODES_SM_F0 * TOTAL_SIZE_SM ] __attribute__((aligned(0x100)));
53 volatile int sm_f1[ NB_RING_NODES_SM_F1 * TOTAL_SIZE_SM ] __attribute__((aligned(0x100)));
53 volatile int sm_f1[ NB_RING_NODES_SM_F1 * TOTAL_SIZE_SM ] __attribute__((aligned(0x100)));
54 volatile int sm_f2[ NB_RING_NODES_SM_F2 * TOTAL_SIZE_SM ] __attribute__((aligned(0x100)));
54 volatile int sm_f2[ NB_RING_NODES_SM_F2 * TOTAL_SIZE_SM ] __attribute__((aligned(0x100)));
55
55
56 // APB CONFIGURATION REGISTERS
56 // APB CONFIGURATION REGISTERS
57 time_management_regs_t *time_management_regs = (time_management_regs_t*) REGS_ADDR_TIME_MANAGEMENT;
57 time_management_regs_t *time_management_regs = (time_management_regs_t*) REGS_ADDR_TIME_MANAGEMENT;
58 gptimer_regs_t *gptimer_regs = (gptimer_regs_t *) REGS_ADDR_GPTIMER;
58 gptimer_regs_t *gptimer_regs = (gptimer_regs_t *) REGS_ADDR_GPTIMER;
59 waveform_picker_regs_0_1_18_t *waveform_picker_regs = (waveform_picker_regs_0_1_18_t*) REGS_ADDR_WAVEFORM_PICKER;
59 waveform_picker_regs_0_1_18_t *waveform_picker_regs = (waveform_picker_regs_0_1_18_t*) REGS_ADDR_WAVEFORM_PICKER;
60 spectral_matrix_regs_t *spectral_matrix_regs = (spectral_matrix_regs_t*) REGS_ADDR_SPECTRAL_MATRIX;
60 spectral_matrix_regs_t *spectral_matrix_regs = (spectral_matrix_regs_t*) REGS_ADDR_SPECTRAL_MATRIX;
61
61
62 // MODE PARAMETERS
62 // MODE PARAMETERS
63 Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet;
63 Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet;
64 struct param_local_str param_local;
64 struct param_local_str param_local;
65 unsigned int lastValidEnterModeTime;
65 unsigned int lastValidEnterModeTime;
66
66
67 // HK PACKETS
67 // HK PACKETS
68 Packet_TM_LFR_HK_t housekeeping_packet;
68 Packet_TM_LFR_HK_t housekeeping_packet;
69 unsigned char cp_rpw_sc_rw_f_flags;
69 unsigned char cp_rpw_sc_rw_f_flags;
70 // message queues occupancy
70 // message queues occupancy
71 unsigned char hk_lfr_q_sd_fifo_size_max;
71 unsigned char hk_lfr_q_sd_fifo_size_max;
72 unsigned char hk_lfr_q_rv_fifo_size_max;
72 unsigned char hk_lfr_q_rv_fifo_size_max;
73 unsigned char hk_lfr_q_p0_fifo_size_max;
73 unsigned char hk_lfr_q_p0_fifo_size_max;
74 unsigned char hk_lfr_q_p1_fifo_size_max;
74 unsigned char hk_lfr_q_p1_fifo_size_max;
75 unsigned char hk_lfr_q_p2_fifo_size_max;
75 unsigned char hk_lfr_q_p2_fifo_size_max;
76 // sequence counters are incremented by APID (PID + CAT) and destination ID
76 // sequence counters are incremented by APID (PID + CAT) and destination ID
77 unsigned short sequenceCounters_SCIENCE_NORMAL_BURST;
77 unsigned short sequenceCounters_SCIENCE_NORMAL_BURST;
78 unsigned short sequenceCounters_SCIENCE_SBM1_SBM2;
78 unsigned short sequenceCounters_SCIENCE_SBM1_SBM2;
79 unsigned short sequenceCounters_TC_EXE[SEQ_CNT_NB_DEST_ID];
79 unsigned short sequenceCounters_TC_EXE[SEQ_CNT_NB_DEST_ID];
80 unsigned short sequenceCounters_TM_DUMP[SEQ_CNT_NB_DEST_ID];
80 unsigned short sequenceCounters_TM_DUMP[SEQ_CNT_NB_DEST_ID];
81 unsigned short sequenceCounterHK;
81 unsigned short sequenceCounterHK;
82 spw_stats grspw_stats;
82 spw_stats grspw_stats;
83
83
84 // TC_LFR_UPDATE_INFO
84 // TC_LFR_UPDATE_INFO
85 float cp_rpw_sc_rw1_f1;