Target:
Source:
Actions:
Compare was calculated based on this common ancestor commit:
e904b329ff97
Time | Author | Commit | Description | |||
---|---|---|---|---|---|---|
7 commits hidden, click expand to show them. |
@@ -1,3 +1,27 | |||
|
1 | /*------------------------------------------------------------------------------ | |
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |
|
3 | -- This file is a part of the LFR FSW | |
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |
|
5 | -- | |
|
6 | -- This program is free software; you can redistribute it and/or modify | |
|
7 | -- it under the terms of the GNU General Public License as published by | |
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |
|
9 | -- (at your option) any later version. | |
|
10 | -- | |
|
11 | -- This program is distributed in the hope that it will be useful, | |
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
14 | -- GNU General Public License for more details. | |
|
15 | -- | |
|
16 | -- You should have received a copy of the GNU General Public License | |
|
17 | -- along with this program; if not, write to the Free Software | |
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
19 | -------------------------------------------------------------------------------*/ | |
|
20 | /*-- Author : Paul Leroy | |
|
21 | -- Contact : Alexis Jeandet | |
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |
|
23 | ----------------------------------------------------------------------------*/ | |
|
24 | ||
|
1 | 25 | #ifndef CCSDS_TYPES_H_INCLUDED |
|
2 | 26 | #define CCSDS_TYPES_H_INCLUDED |
|
3 | 27 | |
@@ -18,15 +42,11 | |||
|
18 | 42 | #define CCSDS_PROTOCOLE_EXTRA_BYTES 4 |
|
19 | 43 | #define CCSDS_TC_TM_PACKET_OFFSET 7 |
|
20 | 44 | #define PROTID_RES_APP 3 |
|
21 | #define CCSDS_TELEMETRY_HEADER_LENGTH (16+4) | |
|
22 | 45 | #define CCSDS_TC_HEADER_LENGTH 10 |
|
23 | #define CCSDS_TM_PKT_MAX_SIZE 4412 | |
|
24 | #define CCSDS_TELECOMMAND_HEADER_LENGTH (10+4) | |
|
25 | 46 | #define CCSDS_TC_PKT_MAX_SIZE 232 // (228+3) with 3 for Prot ID, Reserved and User App bytes, SHALL BE A MULTIPLE OF 4 |
|
26 | 47 | #define CCSDS_TC_PKT_MIN_SIZE 16 |
|
27 | 48 | #define CCSDS_PROCESS_ID 76 |
|
28 | 49 | #define CCSDS_PACKET_CATEGORY 12 |
|
29 | #define CCSDS_NODE_ADDRESS 0xfe | |
|
30 | 50 | #define CCSDS_USER_APP 0x00 |
|
31 | 51 | |
|
32 | 52 | #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10 |
@@ -34,25 +54,13 | |||
|
34 | 54 | #define DEFAULT_HKBIA 0x1e // 0001 1110 |
|
35 | 55 | |
|
36 | 56 | // PACKET ID |
|
37 | #define TM_PACKET_PID_DEFAULT 76 | |
|
38 | #define TM_PACKET_PID_BURST_SBM1_SBM2 79 | |
|
39 | 57 | #define APID_TM_TC_EXE 0x0cc1 // PID 76 CAT 1 |
|
40 | 58 | #define APID_TM_HK 0x0cc4 // PID 76 CAT 4 |
|
41 | 59 | #define APID_TM_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12 |
|
42 | 60 | #define APID_TM_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12 |
|
43 | 61 | #define APID_TM_PARAMETER_DUMP 0x0cc6 // PID 76 CAT 6 |
|
44 | #define APID_TM_KCOEFFICIENTS_DUMP 0x0cc6 // PID 76 CAT 6 | |
|
45 | ||
|
46 | // PACKET CAT | |
|
47 | #define TM_PACKET_CAT_TC_EXE 1 | |
|
48 | #define TM_PACKET_CAT_HK 4 | |
|
49 | #define TM_PACKET_CAT_SCIENCE 12 | |
|
50 | #define TM_PACKET_CAT_DUMP 6 | |
|
51 | 62 | |
|
52 | 63 | // PACKET SEQUENCE CONTROL |
|
53 | #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000] | |
|
54 | #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000] | |
|
55 | #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000] | |
|
56 | 64 | #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000] |
|
57 | 65 | #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000] |
|
58 | 66 | #define TM_PACKET_SEQ_SHIFT 8 |
@@ -62,16 +70,6 | |||
|
62 | 70 | |
|
63 | 71 | // DESTINATION ID |
|
64 | 72 | #define TM_DESTINATION_ID_GROUND 0 |
|
65 | #define TM_DESTINATION_ID_MISSION_TIMELINE 110 | |
|
66 | #define TM_DESTINATION_ID_TC_SEQUENCES 111 | |
|
67 | #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112 | |
|
68 | #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113 | |
|
69 | #define TM_DESTINATION_ID_DIRECT_CMD 120 | |
|
70 | #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121 | |
|
71 | #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122 | |
|
72 | #define TM_DESTINATION_ID_OBCP 15 | |
|
73 | #define TM_DESTINATION_ID_SYSTEM_CONTROL 14 | |
|
74 | #define TM_DESTINATION_ID_AOCS 11 | |
|
75 | 73 | |
|
76 | 74 | //********************************************************* |
|
77 | 75 | //*** /!\ change CCSDS_DESTINATION_ID before flight /!\ *** |
@@ -85,10 +83,6 | |||
|
85 | 83 | #define CCSDS_RESERVED 0x00 |
|
86 | 84 | #define CCSDS_USER_APP 0x00 |
|
87 | 85 | |
|
88 | #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24 | |
|
89 | #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32 | |
|
90 | #define SIZE_HK_PARAMETERS 112 | |
|
91 | ||
|
92 | 86 | // TC TYPES |
|
93 | 87 | #define TC_TYPE_GEN 181 |
|
94 | 88 | #define TC_TYPE_TIME 9 |
@@ -159,7 +153,6 | |||
|
159 | 153 | #define WRONG_SRC_ID 42001 // 0xa4 0x11 |
|
160 | 154 | #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12 |
|
161 | 155 | #define FAIL_DETECTED 42003 // 0xa4 0x13 |
|
162 | #define NOT_ALLOWED 42004 // 0xa4 0x14 | |
|
163 | 156 | #define CORRUPTED 42005 // 0xa4 0x15 |
|
164 | 157 | #define CCSDS_TM_VALID 7 |
|
165 | 158 | |
@@ -251,7 +244,6 enum apid_destid{ | |||
|
251 | 244 | #define SID_K_DUMP 11 |
|
252 | 245 | |
|
253 | 246 | // HEADER_LENGTH |
|
254 | //#define TM_HEADER_LEN 16 | |
|
255 | 247 | #define HEADER_LENGTH_TM_LFR_SCIENCE_CWF 32 |
|
256 | 248 | #define HEADER_LENGTH_TM_LFR_SCIENCE_SWF 34 |
|
257 | 249 | #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 34 |
@@ -264,7 +256,6 enum apid_destid{ | |||
|
264 | 256 | #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET) |
|
265 | 257 | #define PACKET_LENGTH_HK (136 - CCSDS_TC_TM_PACKET_OFFSET) |
|
266 | 258 | #define PACKET_LENGTH_PARAMETER_DUMP (212 - CCSDS_TC_TM_PACKET_OFFSET) |
|
267 | #define PACKET_LENGTH_K_DUMP (3920 - CCSDS_TC_TM_PACKET_OFFSET) | |
|
268 | 259 | // SCIENCE ASM |
|
269 | 260 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0_1 (3230 - CCSDS_TC_TM_PACKET_OFFSET) // 32 * 25 * 4 + 30 => 32 bins (32 + 32 + 24 ), 3 packets |
|
270 | 261 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0_2 (2430 - CCSDS_TC_TM_PACKET_OFFSET) // 24 * 25 * 4 + 30 => 24 bins (32 + 32 + 24 ), 3 packets |
@@ -636,9 +627,7 typedef struct { | |||
|
636 | 627 | #define STATUS_WORD_LINK_STATE_BITS 0x07 // [0000 0111] |
|
637 | 628 | #define STATUS_WORD_LINK_STATE_MASK 0xf8 // [1111 1000] |
|
638 | 629 | #define STATUS_WORD_LFR_MODE_SHIFT 4 |
|
639 | #define STATUS_WORD_LFR_MODE_BITS 0xf0 // [1111 0000] | |
|
640 | 630 | #define STATUS_WORD_LFR_MODE_MASK 0x0f // [0000 1111] |
|
641 | #define STATUS_WORD_0_DEFAULT 0x0d // [0000 1101] | |
|
642 | 631 | |
|
643 | 632 | typedef struct { |
|
644 | 633 | unsigned char targetLogicalAddress; |
@@ -1,3 +1,27 | |||
|
1 | /*------------------------------------------------------------------------------ | |
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |
|
3 | -- This file is a part of the LFR FSW | |
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |
|
5 | -- | |
|
6 | -- This program is free software; you can redistribute it and/or modify | |
|
7 | -- it under the terms of the GNU General Public License as published by | |
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |
|
9 | -- (at your option) any later version. | |
|
10 | -- | |
|
11 | -- This program is distributed in the hope that it will be useful, | |
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
14 | -- GNU General Public License for more details. | |
|
15 | -- | |
|
16 | -- You should have received a copy of the GNU General Public License | |
|
17 | -- along with this program; if not, write to the Free Software | |
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
19 | -------------------------------------------------------------------------------*/ | |
|
20 | /*-- Author : Paul Leroy | |
|
21 | -- Contact : Alexis Jeandet | |
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |
|
23 | ----------------------------------------------------------------------------*/ | |
|
24 | ||
|
1 | 25 | #ifndef FSW_PARAMS_H_INCLUDED |
|
2 | 26 | #define FSW_PARAMS_H_INCLUDED |
|
3 | 27 | |
@@ -7,8 +31,30 | |||
|
7 | 31 | #include "ccsds_types.h" |
|
8 | 32 | #include "stdint.h" |
|
9 | 33 | |
|
34 | /* | |
|
35 | * RTEMS CONFIG | |
|
36 | * | |
|
37 | */ | |
|
10 | 38 | #define GRSPW_DEVICE_NAME "/dev/grspw0" |
|
11 | #define UART_DEVICE_NAME "/dev/console" | |
|
39 | ||
|
40 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER | |
|
41 | #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER | |
|
42 | ||
|
43 | #define CONFIGURE_MAXIMUM_TASKS 23 // number of tasks concurrently active including INIT | |
|
44 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE | |
|
45 | #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE) | |
|
46 | #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32 | |
|
47 | #define CONFIGURE_INIT_TASK_PRIORITY 1 // instead of 100 | |
|
48 | #define CONFIGURE_INIT_TASK_MODE (RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT) | |
|
49 | #define CONFIGURE_INIT_TASK_ATTRIBUTES (RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT) | |
|
50 | #define CONFIGURE_MAXIMUM_DRIVERS 16 | |
|
51 | #define CONFIGURE_MAXIMUM_PERIODS 6 // [hous] [load] [avgv] | |
|
52 | #define CONFIGURE_MAXIMUM_TIMERS 6 // [spiq] [link] [spacewire_reset_link] | |
|
53 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 5 | |
|
54 | #ifdef PRINT_STACK_REPORT | |
|
55 | #define CONFIGURE_STACK_CHECKER_ENABLED | |
|
56 | #endif | |
|
57 | ||
|
12 | 58 | |
|
13 | 59 | //******* |
|
14 | 60 | // MACROS |
@@ -46,10 +92,10 | |||
|
46 | 92 | #define CONST_2048 2048 // 2^11 |
|
47 | 93 | #define CONST_512 512 // 2^9 |
|
48 | 94 | #define CONST_256 256 // 2^8 |
|
49 | #define CONST_128 128 // 2^7 | |
|
95 | #ifndef UINT8_MAX | |
|
50 | 96 | #define UINT8_MAX 255 |
|
97 | #endif | |
|
51 | 98 | |
|
52 | #define FLOAT_MSBYTE 0 | |
|
53 | 99 | #define FLOAT_LSBYTE 3 |
|
54 | 100 | #define BITS_PER_BYTE 8 |
|
55 | 101 | #define INIT_FLOAT 0. |
@@ -68,7 +114,6 | |||
|
68 | 114 | #define SHIFT_3_BITS 3 |
|
69 | 115 | #define SHIFT_4_BITS 4 |
|
70 | 116 | #define SHIFT_5_BITS 5 |
|
71 | #define SHIFT_6_BITS 6 | |
|
72 | 117 | #define SHIFT_7_BITS 7 |
|
73 | 118 | #define BYTE_0 0 |
|
74 | 119 | #define BYTE_1 1 |
@@ -110,12 +155,9 typedef struct ring_node | |||
|
110 | 155 | #define NB_PACKETS_PER_GROUP_OF_CWF_LIGHT 4 // 4 packets containing 672 blk |
|
111 | 156 | #define NB_SAMPLES_PER_SNAPSHOT 2688 // 336 * 8 = 672 * 4 = 2688 |
|
112 | 157 | #define TIME_OFFSET 2 |
|
113 | #define TIME_OFFSET_IN_BYTES 8 | |
|
114 | //#define WAVEFORM_EXTENDED_HEADER_OFFSET 22 | |
|
115 | 158 | #define NB_BYTES_SWF_BLK (2 * 6) |
|
116 | 159 | #define NB_WORDS_SWF_BLK 3 |
|
117 | 160 | #define NB_BYTES_CWF3_LIGHT_BLK 6 |
|
118 | //#define WFRM_INDEX_OF_LAST_PACKET 6 // waveforms are transmitted in groups of 2048 blocks, 6 packets of 340 and 1 of 8 | |
|
119 | 161 | #define NB_RING_NODES_F0 3 // AT LEAST 3 |
|
120 | 162 | #define NB_RING_NODES_F1 5 // AT LEAST 3 |
|
121 | 163 | #define NB_RING_NODES_F2 5 // AT LEAST 3 |
@@ -140,10 +182,8 typedef struct ring_node | |||
|
140 | 182 | #define THR_MODE_NORMAL 1 |
|
141 | 183 | #define THR_MODE_BURST 2 |
|
142 | 184 | |
|
143 | #define RTEMS_EVENT_MODE_STANDBY RTEMS_EVENT_0 | |
|
144 | 185 | #define RTEMS_EVENT_MODE_NORMAL RTEMS_EVENT_1 |
|
145 | 186 | #define RTEMS_EVENT_MODE_BURST RTEMS_EVENT_2 |
|
146 | #define RTEMS_EVENT_MODE_SBM1 RTEMS_EVENT_3 | |
|
147 | 187 | #define RTEMS_EVENT_MODE_SBM2 RTEMS_EVENT_4 |
|
148 | 188 | #define RTEMS_EVENT_MODE_NORM_S1_S2 RTEMS_EVENT_5 |
|
149 | 189 | #define RTEMS_EVENT_NORM_BP1_F0 RTEMS_EVENT_6 |
@@ -164,6 +204,7 typedef struct ring_node | |||
|
164 | 204 | #define RTEMS_EVENT_BURST_BP1_F1 RTEMS_EVENT_21 |
|
165 | 205 | #define RTEMS_EVENT_BURST_BP2_F1 RTEMS_EVENT_22 |
|
166 | 206 | #define RTEMS_EVENT_SWF_RESYNCH RTEMS_EVENT_23 |
|
207 | #define RTEMS_EVENT_CAL_SWEEP_WAKE RTEMS_EVENT_24 | |
|
167 | 208 | |
|
168 | 209 | //******************************************** |
|
169 | 210 | //******************************************** |
@@ -183,7 +224,6 typedef struct ring_node | |||
|
183 | 224 | #define DFLT_SY_LFR_N_BP_P0 4 // sec |
|
184 | 225 | #define DFLT_SY_LFR_N_BP_P1 20 // sec |
|
185 | 226 | #define DFLT_SY_LFR_N_CWF_LONG_F3 0 // 0 => production of light continuous waveforms at f3 |
|
186 | #define MIN_DELTA_SNAPSHOT 16 // sec | |
|
187 | 227 | |
|
188 | 228 | // BURST |
|
189 | 229 | #define DEFAULT_SY_LFR_B_BP_P0 1 // sec |
@@ -198,10 +238,6 typedef struct ring_node | |||
|
198 | 238 | #define DEFAULT_SY_LFR_S2_BP_P0 1 // sec |
|
199 | 239 | #define DEFAULT_SY_LFR_S2_BP_P1 5 // sec |
|
200 | 240 | |
|
201 | // ADDITIONAL PARAMETERS | |
|
202 | #define TIME_BETWEEN_TWO_SWF_PACKETS 30 // nb x 10 ms => 300 ms | |
|
203 | #define TIME_BETWEEN_TWO_CWF3_PACKETS 1000 // nb x 10 ms => 10 s | |
|
204 | ||
|
205 | 241 | // STATUS WORD |
|
206 | 242 | #define DEFAULT_STATUS_WORD_BYTE0 0x0d // [0000] [1] [101] mode 4 bits / SPW enabled 1 bit / state is run 3 bits |
|
207 | 243 | |
@@ -216,7 +252,6 typedef struct ring_node | |||
|
216 | 252 | #define MIN_PAS_FILTER_SHIFT 0.0 |
|
217 | 253 | #define MAX_PAS_FILTER_SHIFT 1.0 |
|
218 | 254 | #define MIN_SY_LFR_SC_RW_DELTA_F 0 |
|
219 | #define MIN_SY_LFR_RW_K 0 | |
|
220 | 255 | #define MIN_SY_LFR_RW_F 0 |
|
221 | 256 | // |
|
222 | 257 | #define SY_LFR_DPU_CONNECT_TIMEOUT 100 // 100 * 10 ms = 1 s |
@@ -231,17 +266,15 typedef struct ring_node | |||
|
231 | 266 | #define APB_OFFSET_GRSPW_STATUS_REGISTER 0x04 |
|
232 | 267 | #define APB_OFFSET_GRSPW_TIME_REGISTER 0x14 |
|
233 | 268 | #define REGS_ADDR_TIME_MANAGEMENT 0x80000600 |
|
234 | #define REGS_ADDR_GRGPIO 0x80000b00 | |
|
235 | 269 | |
|
236 | 270 | #define REGS_ADDR_SPECTRAL_MATRIX 0x80000f00 |
|
237 | 271 | #define REGS_ADDR_WAVEFORM_PICKER 0x80000f54 // PDB >= 0.1.28 |
|
238 | 272 | #define APB_OFFSET_VHDL_REV 0xb0 |
|
239 | 273 | #define REGS_ADDR_VHDL_VERSION 0x80000ff0 |
|
240 | 274 | |
|
241 | #define APBUART_CTRL_REG_MASK_DB 0xfffff7ff | |
|
242 | 275 | #define APBUART_CTRL_REG_MASK_TE 0x00000002 |
|
243 | 276 | // scaler value = system_clock_frequency / ( baud_rate * 8 ) - 1 |
|
244 |
#define APBUART_SCALER_RELOAD_VALUE 0x000000 |
|
|
277 | #define APBUART_SCALER_RELOAD_VALUE 0x0000001B // 25 MHz => about 115200 | |
|
245 | 278 | |
|
246 | 279 | //********** |
|
247 | 280 | // IRQ LINES |
@@ -271,7 +304,6 typedef struct ring_node | |||
|
271 | 304 | #define LFR_SUCCESSFUL 0 |
|
272 | 305 | #define LFR_DEFAULT 1 |
|
273 | 306 | #define LFR_EXE_ERROR 2 |
|
274 | #define LFR_DEFAULT_ALT -1 | |
|
275 | 307 | |
|
276 | 308 | //****** |
|
277 | 309 | // RTEMS |
@@ -297,6 +329,8 typedef struct ring_node | |||
|
297 | 329 | #define TASKID_PRC1 17 |
|
298 | 330 | #define TASKID_AVF2 18 |
|
299 | 331 | #define TASKID_PRC2 19 |
|
332 | #define TASKID_SCRB 20 | |
|
333 | #define TASKID_CALI 21 | |
|
300 | 334 | |
|
301 | 335 | #define TASK_PRIORITY_SPIQ 5 |
|
302 | 336 | #define TASK_PRIORITY_LINK 20 |
@@ -309,6 +343,7 typedef struct ring_node | |||
|
309 | 343 | #define TASK_PRIORITY_CWF3 40 // there is a printf in this function, be careful with its priority wrt CWF1 |
|
310 | 344 | #define TASK_PRIORITY_SEND 45 |
|
311 | 345 | #define TASK_PRIORITY_RECV 50 |
|
346 | #define TASK_PRIORITY_CALI 50 | |
|
312 | 347 | #define TASK_PRIORITY_ACTN 50 |
|
313 | 348 | #define TASK_PRIORITY_AVF0 60 |
|
314 | 349 | #define TASK_PRIORITY_AVF1 70 |
@@ -318,6 +353,7 typedef struct ring_node | |||
|
318 | 353 | #define TASK_PRIORITY_PRC2 110 |
|
319 | 354 | #define TASK_PRIORITY_LOAD 190 |
|
320 | 355 | #define TASK_PRIORITY_DUMB 200 |
|
356 | #define TASK_PRIORITY_SCRB 210 | |
|
321 | 357 | |
|
322 | 358 | #define MSG_QUEUE_COUNT_RECV 10 |
|
323 | 359 | #define MSG_QUEUE_COUNT_SEND 50 |
@@ -325,7 +361,6 typedef struct ring_node | |||
|
325 | 361 | #define MSG_QUEUE_COUNT_PRC1 10 |
|
326 | 362 | #define MSG_QUEUE_COUNT_PRC2 5 |
|
327 | 363 | #define MSG_QUEUE_SIZE_SEND 812 // 808 + 4 => TM_LFR_SCIENCE_BURST_BP2_F1 |
|
328 | #define ACTION_MSG_SPW_IOCTL_SEND_SIZE 24 // hlen *hdr dlen *data sent options | |
|
329 | 364 | #define MSG_QUEUE_SIZE_PRC0 36 // two pointers, one rtems_event + 6 integers |
|
330 | 365 | #define MSG_QUEUE_SIZE_PRC1 36 // two pointers, one rtems_event + 6 integers |
|
331 | 366 | #define MSG_QUEUE_SIZE_PRC2 36 // two pointers, one rtems_event + 6 integers |
@@ -336,8 +371,6 typedef struct ring_node | |||
|
336 | 371 | #define QUEUE_PRC1 3 |
|
337 | 372 | #define QUEUE_PRC2 4 |
|
338 | 373 | |
|
339 | #define CPU_USAGE_REPORT_PERIOD 6 // * 10 s = period | |
|
340 | ||
|
341 | 374 | struct param_local_str{ |
|
342 | 375 | unsigned int local_sbm1_nb_cwf_sent; |
|
343 | 376 | unsigned int local_sbm1_nb_cwf_max; |
@@ -358,18 +391,18 typedef struct { | |||
|
358 | 391 | |
|
359 | 392 | #define DEFAULT_SY_LFR_PAS_FILTER_ENABLED 0 |
|
360 | 393 | #define DEFAULT_SY_LFR_PAS_FILTER_MODULUS 4 |
|
361 | #define DEFAULT_SY_LFR_PAS_FILTER_TBAD 1.0 | |
|
394 | #define DEFAULT_SY_LFR_PAS_FILTER_TBAD 1.0f | |
|
362 | 395 | #define DEFAULT_SY_LFR_PAS_FILTER_OFFSET 0 |
|
363 | #define DEFAULT_SY_LFR_PAS_FILTER_SHIFT 0.5 | |
|
396 | #define DEFAULT_SY_LFR_PAS_FILTER_SHIFT 0.5f | |
|
364 | 397 | #define DEFAULT_MODULUS 262144 // 65536 * 4 |
|
365 | 398 | #define DEFAULT_TBAD 65536 // 65536 |
|
366 | 399 | #define DEFAULT_OFFSET 0 // 65536 * 0 |
|
367 | 400 | #define DEFAULT_SHIFT 32768 // 65536 / 2 |
|
368 | #define DEFAULT_SY_LFR_SC_RW_DELTA_F 0.045 | |
|
369 | #define DEFAULT_SY_LFR_RW_K1 1. | |
|
370 | #define DEFAULT_SY_LFR_RW_K2 8. | |
|
371 | #define DEFAULT_SY_LFR_RW_K3 24. | |
|
372 | #define DEFAULT_SY_LFR_RW_K4 48. | |
|
401 | #define DEFAULT_SY_LFR_SC_RW_DELTA_F 0.045f | |
|
402 | #define DEFAULT_SY_LFR_RW_K1 1.f | |
|
403 | #define DEFAULT_SY_LFR_RW_K2 8.f | |
|
404 | #define DEFAULT_SY_LFR_RW_K3 24.f | |
|
405 | #define DEFAULT_SY_LFR_RW_K4 48.f | |
|
373 | 406 | |
|
374 | 407 | typedef struct{ |
|
375 | 408 | unsigned char spare_sy_lfr_pas_filter_enabled; |
@@ -1,3 +1,27 | |||
|
1 | /*------------------------------------------------------------------------------ | |
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |
|
3 | -- This file is a part of the LFR FSW | |
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |
|
5 | -- | |
|
6 | -- This program is free software; you can redistribute it and/or modify | |
|
7 | -- it under the terms of the GNU General Public License as published by | |
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |
|
9 | -- (at your option) any later version. | |
|
10 | -- | |
|
11 | -- This program is distributed in the hope that it will be useful, | |
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
14 | -- GNU General Public License for more details. | |
|
15 | -- | |
|
16 | -- You should have received a copy of the GNU General Public License | |
|
17 | -- along with this program; if not, write to the Free Software | |
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
19 | -------------------------------------------------------------------------------*/ | |
|
20 | /*-- Author : Paul Leroy | |
|
21 | -- Contact : Alexis Jeandet | |
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |
|
23 | ----------------------------------------------------------------------------*/ | |
|
24 | ||
|
1 | 25 | #ifndef FSW_PARAMS_NB_BYTES_H |
|
2 | 26 | #define FSW_PARAMS_NB_BYTES_H |
|
3 | 27 | |
@@ -71,7 +95,6 | |||
|
71 | 95 | // TC_LFR_LOAD_FILTER_PAR |
|
72 | 96 | #define NB_RW_K_COEFFS 16 |
|
73 | 97 | #define NB_BYTES_PER_RW_K_COEFF 4 |
|
74 | #define DATAFIELD_POS_PA_RPW_SPARE8_2 0 // 8 bits | |
|
75 | 98 | #define DATAFIELD_POS_SY_LFR_PAS_FILTER_ENABLED 1 // 8 bits |
|
76 | 99 | #define DATAFIELD_POS_SY_LFR_PAS_FILTER_MODULUS 2 // 8 bits |
|
77 | 100 | #define DATAFIELD_POS_SY_LFR_PAS_FILTER_TBAD 3 // 32 bits |
@@ -1,3 +1,27 | |||
|
1 | /*------------------------------------------------------------------------------ | |
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |
|
3 | -- This file is a part of the LFR FSW | |
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |
|
5 | -- | |
|
6 | -- This program is free software; you can redistribute it and/or modify | |
|
7 | -- it under the terms of the GNU General Public License as published by | |
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |
|
9 | -- (at your option) any later version. | |
|
10 | -- | |
|
11 | -- This program is distributed in the hope that it will be useful, | |
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
14 | -- GNU General Public License for more details. | |
|
15 | -- | |
|
16 | -- You should have received a copy of the GNU General Public License | |
|
17 | -- along with this program; if not, write to the Free Software | |
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
19 | -------------------------------------------------------------------------------*/ | |
|
20 | /*-- Author : Paul Leroy | |
|
21 | -- Contact : Alexis Jeandet | |
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |
|
23 | ----------------------------------------------------------------------------*/ | |
|
24 | ||
|
1 | 25 | #ifndef FSW_PARAMS_PROCESSING_H |
|
2 | 26 | #define FSW_PARAMS_PROCESSING_H |
|
3 | 27 | |
@@ -8,7 +32,6 | |||
|
8 | 32 | |
|
9 | 33 | #define NB_SM_PER_S_F0 96 |
|
10 | 34 | #define NB_SM_PER_S_F1 16 |
|
11 | #define NB_SM_PER_S_F2 1 | |
|
12 | 35 | #define NB_SM_PER_S1_BP_P0 24 |
|
13 | 36 | |
|
14 | 37 | #define ASM_COMP_B1B2 1 |
@@ -31,10 +54,6 | |||
|
31 | 54 | #define NB_BINS_PER_SM 128 |
|
32 | 55 | #define NB_VALUES_PER_SM 25 |
|
33 | 56 | #define TOTAL_SIZE_SM 3200 // 25 * 128 = 0xC80 |
|
34 | #define TOTAL_SIZE_NORM_BP1_F0 99 // 11 * 9 = 99 | |
|
35 | #define TOTAL_SIZE_NORM_BP1_F1 117 // 13 * 9 = 117 | |
|
36 | #define TOTAL_SIZE_NORM_BP1_F2 108 // 12 * 9 = 108 | |
|
37 | #define TOTAL_SIZE_SBM1_BP1_F0 198 // 22 * 9 = 198 | |
|
38 | 57 | // F0 |
|
39 | 58 | #define NB_RING_NODES_SM_F0 20 // AT LEAST 8 due to the way the averaging is done |
|
40 | 59 | #define NB_RING_NODES_ASM_BURST_SBM_F0 10 // AT LEAST 3 |
@@ -50,27 +69,21 | |||
|
50 | 69 | #define NB_RING_NODES_ASM_NORM_F2 3 // AT LEAST 3 |
|
51 | 70 | #define NB_RING_NODES_ASM_F2 3 // AT LEAST 3 |
|
52 | 71 | // |
|
53 | #define NB_BINS_PER_ASM_F0 88 | |
|
54 | 72 | #define NB_BINS_PER_PKT_ASM_F0_1 32 |
|
55 | 73 | #define NB_BINS_PER_PKT_ASM_F0_2 24 |
|
56 | 74 | #define DLEN_ASM_F0_PKT_1 3200 // 32 * 25 * 4, 25 components per matrix, 4 bytes per float |
|
57 | 75 | #define DLEN_ASM_F0_PKT_2 2400 // 24 * 25 * 4, 25 components per matrix, 4 bytes per float |
|
58 | 76 | #define ASM_F0_INDICE_START 16 // 17 - 1, (-1) due to the VHDL behaviour |
|
59 | #define ASM_F0_INDICE_STOP 103 // 104 - 1, 2 packets of 44 bins | |
|
60 | 77 | // |
|
61 | #define NB_BINS_PER_ASM_F1 104 | |
|
62 | 78 | #define NB_BINS_PER_PKT_ASM_F1_1 36 |
|
63 | 79 | #define NB_BINS_PER_PKT_ASM_F1_2 32 |
|
64 | 80 | #define DLEN_ASM_F1_PKT_1 3600 // 36 * 25 * 4, 25 components per matrix, 4 bytes per float |
|
65 | 81 | #define DLEN_ASM_F1_PKT_2 3200 // 32 * 25 * 4, 25 components per matrix, 4 bytes per float |
|
66 | 82 | #define ASM_F1_INDICE_START 5 // 6 - 1, (-1) due to the VHDL behaviour |
|
67 | #define ASM_F1_INDICE_STOP 108 // 109 - 1, 2 packets of 52 bins | |
|
68 | 83 | // |
|
69 | #define NB_BINS_PER_ASM_F2 96 | |
|
70 | 84 | #define NB_BINS_PER_PKT_ASM_F2 32 |
|
71 | 85 | #define DLEN_ASM_F2_PKT 3200 // 32 * 25 * 4, 25 components per matrix, 4 bytes per float |
|
72 | 86 | #define ASM_F2_INDICE_START 6 // 7 - 1, (-1) due to the VHDL behaviour |
|
73 | #define ASM_F2_INDICE_STOP 101 // 102 - 1, 2 packets of 48 bins | |
|
74 | 87 | // |
|
75 | 88 | #define KCOEFF_BLK_SIZE 130 |
|
76 | 89 | #define KCOEFF_FREQ 2 |
@@ -80,26 +93,18 | |||
|
80 | 93 | #define NB_BINS_COMPRESSED_SM 36 // 11 + 12 + 13 |
|
81 | 94 | #define NB_BINS_COMPRESSED_SM_SBM_F0 22 |
|
82 | 95 | #define NB_BINS_COMPRESSED_SM_SBM_F1 26 |
|
83 | #define NB_BINS_COMPRESSED_SM_SBM_F2 24 | |
|
84 | // | |
|
85 | #define NB_BYTES_PER_BP1 9 | |
|
86 | #define NB_BYTES_PER_BP2 30 | |
|
87 | 96 | // |
|
88 | 97 | #define NB_BINS_TO_AVERAGE_ASM_F0 8 |
|
89 | 98 | #define NB_BINS_TO_AVERAGE_ASM_F1 8 |
|
90 | 99 | #define NB_BINS_TO_AVERAGE_ASM_F2 8 |
|
91 | 100 | #define NB_BINS_TO_AVERAGE_ASM_SBM_F0 4 |
|
92 | 101 | #define NB_BINS_TO_AVERAGE_ASM_SBM_F1 4 |
|
93 | #define NB_BINS_TO_AVERAGE_ASM_SBM_F2 4 | |
|
94 | 102 | // |
|
95 | 103 | #define TOTAL_SIZE_COMPRESSED_ASM_NORM_F0 275 // 11 * 25 WORDS |
|
96 | 104 | #define TOTAL_SIZE_COMPRESSED_ASM_NORM_F1 325 // 13 * 25 WORDS |
|
97 | 105 | #define TOTAL_SIZE_COMPRESSED_ASM_NORM_F2 300 // 12 * 25 WORDS |
|
98 | 106 | #define TOTAL_SIZE_COMPRESSED_ASM_SBM_F0 550 // 22 * 25 WORDS |
|
99 | 107 | #define TOTAL_SIZE_COMPRESSED_ASM_SBM_F1 650 // 26 * 25 WORDS |
|
100 | #define TOTAL_SIZE_BP1_NORM_F0 99 // 9 * 11 UNSIGNED CHAR | |
|
101 | #define TOTAL_SIZE_BP2_NORM_F0 330 // 30 * 11 UNSIGNED CHAR | |
|
102 | #define TOTAL_SIZE_BP1_SBM_F0 198 // 9 * 22 UNSIGNED CHAR | |
|
103 | 108 | // GENERAL |
|
104 | 109 | #define NB_SM_BEFORE_AVF0_F1 8 // must be 8 due to the SM_average() function |
|
105 | 110 | #define NB_SM_BEFORE_AVF2 1 // must be 1 due to the SM_average_f2() function |
@@ -1,14 +1,31 | |||
|
1 | /*------------------------------------------------------------------------------ | |
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |
|
3 | -- This file is a part of the LFR FSW | |
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |
|
5 | -- | |
|
6 | -- This program is free software; you can redistribute it and/or modify | |
|
7 | -- it under the terms of the GNU General Public License as published by | |
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |
|
9 | -- (at your option) any later version. | |
|
10 | -- | |
|
11 | -- This program is distributed in the hope that it will be useful, | |
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
14 | -- GNU General Public License for more details. | |
|
15 | -- | |
|
16 | -- You should have received a copy of the GNU General Public License | |
|
17 | -- along with this program; if not, write to the Free Software | |
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
19 | -------------------------------------------------------------------------------*/ | |
|
20 | /*-- Author : Paul Leroy | |
|
21 | -- Contact : Alexis Jeandet | |
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |
|
23 | ----------------------------------------------------------------------------*/ | |
|
24 | ||
|
1 | 25 | #ifndef TM_BYTE_POSITIONS_H |
|
2 | 26 | #define TM_BYTE_POSITIONS_H |
|
3 | 27 | |
|
4 | #define BYTE_POS_CP_LFR_MODE 11 | |
|
5 | ||
|
6 | 28 | // TC_LFR_LOAD_NORMAL_PAR |
|
7 | #define BYTE_POS_SY_LFR_N_SWF_L 0 | |
|
8 | #define BYTE_POS_SY_LFR_N_SWF_P 2 | |
|
9 | #define BYTE_POS_SY_LFR_N_ASM_P 4 | |
|
10 | #define BYTE_POS_SY_LFR_N_BP_P0 6 | |
|
11 | #define BYTE_POS_SY_LFR_N_BP_P1 7 | |
|
12 | 29 | #define BYTE_POS_SY_LFR_N_CWF_LONG_F3 8 |
|
13 | 30 | |
|
14 | 31 | // TM_LFR_HK |