# HG changeset patch # User paul # Date 2014-12-15 11:54:01 # Node ID d2561e02408b30f4731b577ddb2d2fdbe8eb7eb8 # Parent c6546d192260c8737dc91762452a0ebb3964b15b Sync diff --git a/.hgsub b/.hgsub --- a/.hgsub +++ b/.hgsub @@ -1,2 +1,2 @@ -header/common_lfr_headers = https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/SOLO_LFR/lfr_common_headers +header/lfr_common_headers = https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/SOLO_LFR/lfr_common_headers diff --git a/.hgsubstate b/.hgsubstate --- a/.hgsubstate +++ b/.hgsubstate @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 header/common_lfr_headers +da5613aff4446e5c98b3c56bc32ce7008b3e2340 header/lfr_common_headers diff --git a/FSW-qt/Makefile b/FSW-qt/Makefile --- a/FSW-qt/Makefile +++ b/FSW-qt/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: bin/fsw -# Generated by qmake (2.01a) (Qt 4.8.6) on: Wed Nov 26 13:14:53 2014 +# Generated by qmake (2.01a) (Qt 4.8.6) on: Mon Dec 15 12:32:49 2014 # Project: fsw-qt.pro # Template: app # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro @@ -13,7 +13,7 @@ CXX = sparc-rtems-g++ DEFINES = -DSW_VERSION_N1=2 -DSW_VERSION_N2=0 -DSW_VERSION_N3=1 -DSW_VERSION_N4=1 -DLPP_DPU_DESTID -DPRINT_MESSAGES_ON_CONSOLE CFLAGS = -pipe -O3 -Wall $(DEFINES) CXXFLAGS = -pipe -O3 -Wall $(DEFINES) -INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header -I../header/processing -I../src/LFR_basic-parameters +INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header -I../header/common_lfr_headers -I../header/processing -I../src/LFR_basic-parameters LINK = sparc-rtems-g++ LFLAGS = LIBS = $(SUBLIBS) diff --git a/FSW-qt/bin/Makefile b/FSW-qt/bin/Makefile deleted file mode 100644 --- a/FSW-qt/bin/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SREC_PREFIX = RpwLfrApp -SREC_COUNTER_TEXT = 0003 -SREC_COUNTER_DATA = 0004 -SREC_FSW_REF = rev-1-0-0-7 -SREC_SUFFIX = .srec -SREC_TEXT = $(SREC_PREFIX)_$(SREC_COUNTER_TEXT)_text_$(SREC_FSW_REF)$(SREC_SUFFIX) -SREC_DATA = $(SREC_PREFIX)_$(SREC_COUNTER_DATA)_data_$(SREC_FSW_REF)$(SREC_SUFFIX) -OBJCOPY = sparc-rtems-objcopy -OBJCOPY_OPT = -g -v - -all: text data - -text: fsw - $(OBJCOPY) $(OBJCOPY_OPT) fsw $(SREC_TEXT) -O srec -j .text - -data: fsw - $(OBJCOPY) $(OBJCOPY_OPT) fsw $(SREC_DATA) -O srec -j .data - -clean: - rm *.srec - diff --git a/FSW-qt/fsw-qt.pro b/FSW-qt/fsw-qt.pro --- a/FSW-qt/fsw-qt.pro +++ b/FSW-qt/fsw-qt.pro @@ -60,10 +60,11 @@ contains( CONFIG, boot_messages ) { TARGET = fsw INCLUDEPATH += \ - ../src \ - ../header \ - ../header/processing \ - ../src/LFR_basic-parameters + $${PWD}/../src \ + $${PWD}/../header \ + $${PWD}/../header/common_lfr_headers \ + $${PWD}/../header/processing \ + $${PWD}/../src/LFR_basic-parameters SOURCES += \ ../src/wf_handler.c \ @@ -103,5 +104,6 @@ HEADERS += \ ../header/fsw_params_wf_handler.h \ ../header/lfr_cpu_usage_report.h \ ../src/LFR_basic-parameters/basic_parameters.h \ - ../src/LFR_basic-parameters/basic_parameters_params.h + ../src/LFR_basic-parameters/basic_parameters_params.h \ + ../header/tm_byte_positions.h diff --git a/FSW-qt/fsw-qt.pro.user b/FSW-qt/fsw-qt.pro.user --- a/FSW-qt/fsw-qt.pro.user +++ b/FSW-qt/fsw-qt.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/header/fsw_misc.h b/header/fsw_misc.h --- a/header/fsw_misc.h +++ b/header/fsw_misc.h @@ -4,6 +4,7 @@ #include #include #include +#include #include "fsw_params.h" #include "fsw_spacewire.h" diff --git a/header/fsw_params.h b/header/fsw_params.h deleted file mode 100644 --- a/header/fsw_params.h +++ /dev/null @@ -1,260 +0,0 @@ -#ifndef FSW_PARAMS_H_INCLUDED -#define FSW_PARAMS_H_INCLUDED - -#include "grlib_regs.h" -#include "fsw_params_processing.h" -#include "fsw_params_nb_bytes.h" -#include "tm_byte_positions.h" -#include "ccsds_types.h" - -#define GRSPW_DEVICE_NAME "/dev/grspw0" -#define UART_DEVICE_NAME "/dev/console" - -typedef struct ring_node -{ - struct ring_node *previous; - struct ring_node *next; - unsigned int sid; - unsigned int coarseTime; - unsigned int fineTime; - int buffer_address; - unsigned int status; -} ring_node; - -//************************ -// flight software version -// this parameters is handled by the Qt project options - -#define NB_PACKETS_PER_GROUP_OF_CWF 8 // 8 packets containing 336 blk -#define NB_PACKETS_PER_GROUP_OF_CWF_LIGHT 4 // 4 packets containing 672 blk -#define NB_SAMPLES_PER_SNAPSHOT 2688 // 336 * 8 = 672 * 4 = 2688 -#define TIME_OFFSET 2 -#define TIME_OFFSET_IN_BYTES 8 -//#define WAVEFORM_EXTENDED_HEADER_OFFSET 22 -#define NB_BYTES_SWF_BLK (2 * 6) -#define NB_WORDS_SWF_BLK 3 -#define NB_BYTES_CWF3_LIGHT_BLK 6 -//#define WFRM_INDEX_OF_LAST_PACKET 6 // waveforms are transmitted in groups of 2048 blocks, 6 packets of 340 and 1 of 8 -#define NB_RING_NODES_F0 3 // AT LEAST 3 -#define NB_RING_NODES_F1 5 // AT LEAST 3 -#define NB_RING_NODES_F2 5 // AT LEAST 3 -#define NB_RING_NODES_F3 3 // AT LEAST 3 - -//********** -// LFR MODES -#define LFR_MODE_STANDBY 0 -#define LFR_MODE_NORMAL 1 -#define LFR_MODE_BURST 2 -#define LFR_MODE_SBM1 3 -#define LFR_MODE_SBM2 4 - -#define TDS_MODE_LFM 5 -#define TDS_MODE_STANDBY 0 -#define TDS_MODE_NORMAL 1 -#define TDS_MODE_BURST 2 -#define TDS_MODE_SBM1 3 -#define TDS_MODE_SBM2 4 - -#define THR_MODE_STANDBY 0 -#define THR_MODE_NORMAL 1 -#define THR_MODE_BURST 2 - -#define RTEMS_EVENT_MODE_STANDBY RTEMS_EVENT_0 -#define RTEMS_EVENT_MODE_NORMAL RTEMS_EVENT_1 -#define RTEMS_EVENT_MODE_BURST RTEMS_EVENT_2 -#define RTEMS_EVENT_MODE_SBM1 RTEMS_EVENT_3 -#define RTEMS_EVENT_MODE_SBM2 RTEMS_EVENT_4 -#define RTEMS_EVENT_MODE_SBM2_WFRM RTEMS_EVENT_5 -#define RTEMS_EVENT_NORM_BP1_F0 RTEMS_EVENT_6 -#define RTEMS_EVENT_NORM_BP2_F0 RTEMS_EVENT_7 -#define RTEMS_EVENT_NORM_ASM_F0 RTEMS_EVENT_8 // ASM only in NORM mode -#define RTEMS_EVENT_NORM_BP1_F1 RTEMS_EVENT_9 -#define RTEMS_EVENT_NORM_BP2_F1 RTEMS_EVENT_10 -#define RTEMS_EVENT_NORM_ASM_F1 RTEMS_EVENT_11 // ASM only in NORM mode -#define RTEMS_EVENT_NORM_BP1_F2 RTEMS_EVENT_12 -#define RTEMS_EVENT_NORM_BP2_F2 RTEMS_EVENT_13 -#define RTEMS_EVENT_NORM_ASM_F2 RTEMS_EVENT_14 // ASM only in NORM mode -#define RTEMS_EVENT_SBM_BP1_F0 RTEMS_EVENT_15 -#define RTEMS_EVENT_SBM_BP2_F0 RTEMS_EVENT_16 -#define RTEMS_EVENT_SBM_BP1_F1 RTEMS_EVENT_17 -#define RTEMS_EVENT_SBM_BP2_F1 RTEMS_EVENT_18 -#define RTEMS_EVENT_BURST_BP1_F0 RTEMS_EVENT_19 -#define RTEMS_EVENT_BURST_BP2_F0 RTEMS_EVENT_20 -#define RTEMS_EVENT_BURST_BP1_F1 RTEMS_EVENT_21 -#define RTEMS_EVENT_BURST_BP2_F1 RTEMS_EVENT_22 - -//**************************** -// LFR DEFAULT MODE PARAMETERS -// COMMON -#define DEFAULT_SY_LFR_COMMON0 0x00 -#define DEFAULT_SY_LFR_COMMON1 0x10 // default value 0 0 0 1 0 0 0 0 -// NORM -#define DFLT_SY_LFR_N_SWF_L 2048 // nb sample -#define DFLT_SY_LFR_N_SWF_P 300 // sec -#define DFLT_SY_LFR_N_ASM_P 3600 // sec -#define DFLT_SY_LFR_N_BP_P0 4 // sec -#define DFLT_SY_LFR_N_BP_P1 20 // sec -#define DFLT_SY_LFR_N_CWF_LONG_F3 0 // 0 => production of light continuous waveforms at f3 -#define MIN_DELTA_SNAPSHOT 16 // sec -// BURST -#define DEFAULT_SY_LFR_B_BP_P0 1 // sec -#define DEFAULT_SY_LFR_B_BP_P1 5 // sec -// SBM1 -#define DEFAULT_SY_LFR_S1_BP_P0 1 // sec -#define DEFAULT_SY_LFR_S1_BP_P1 1 // sec -// SBM2 -#define DEFAULT_SY_LFR_S2_BP_P0 1 // sec -#define DEFAULT_SY_LFR_S2_BP_P1 5 // sec -// ADDITIONAL PARAMETERS -#define TIME_BETWEEN_TWO_SWF_PACKETS 30 // nb x 10 ms => 300 ms -#define TIME_BETWEEN_TWO_CWF3_PACKETS 1000 // nb x 10 ms => 10 s -// STATUS WORD -#define DEFAULT_STATUS_WORD_BYTE0 0x0d // [0000] [1] [101] mode 4 bits / SPW enabled 1 bit / state is run 3 bits -#define DEFAULT_STATUS_WORD_BYTE1 0x00 -// -#define SY_LFR_DPU_CONNECT_TIMEOUT 100 // 100 * 10 ms = 1 s -#define SY_LFR_DPU_CONNECT_ATTEMPT 3 -//**************************** - -//***************************** -// APB REGISTERS BASE ADDRESSES -#define REGS_ADDR_APBUART 0x80000100 -#define REGS_ADDR_GPTIMER 0x80000300 -#define REGS_ADDR_GRSPW 0x80000500 -#define REGS_ADDR_TIME_MANAGEMENT 0x80000600 -#define REGS_ADDR_GRGPIO 0x80000b00 - -#define REGS_ADDR_SPECTRAL_MATRIX 0x80000f00 -//#define REGS_ADDR_WAVEFORM_PICKER 0x80000f50 -#define REGS_ADDR_WAVEFORM_PICKER 0x80000f54 // PDB >= 0.1.28 -#define REGS_ADDR_VHDL_VERSION 0x80000ff0 - -#define APBUART_CTRL_REG_MASK_DB 0xfffff7ff -#define APBUART_CTRL_REG_MASK_TE 0x00000002 -// scaler value = system_clock_frequency / ( baud_rate * 8 ) - 1 -#define APBUART_SCALER_RELOAD_VALUE 0x00000050 // 25 MHz => about 38400 - -//********** -// IRQ LINES -#define IRQ_SM_SIMULATOR 9 -#define IRQ_SPARC_SM_SIMULATOR 0x19 // see sparcv8.pdf p.76 for interrupt levels -#define IRQ_WAVEFORM_PICKER 14 -#define IRQ_SPARC_WAVEFORM_PICKER 0x1e // see sparcv8.pdf p.76 for interrupt levels -#define IRQ_SPECTRAL_MATRIX 6 -#define IRQ_SPARC_SPECTRAL_MATRIX 0x16 // see sparcv8.pdf p.76 for interrupt levels - -//***** -// TIME -#define CLKDIV_SM_SIMULATOR (10416 - 1) // 10 ms => nominal is 1/96 = 0.010416667, 10417 - 1 = 10416 -#define TIMER_SM_SIMULATOR 1 -#define HK_PERIOD 100 // 100 * 10ms => 1s -#define SY_LFR_TIME_SYN_TIMEOUT_in_ms 2000 -#define SY_LFR_TIME_SYN_TIMEOUT_in_ticks 200 // 200 * 10 ms = 2 s - -//********** -// LPP CODES -#define LFR_SUCCESSFUL 0 -#define LFR_DEFAULT 1 -#define LFR_EXE_ERROR 2 - -//****** -// RTEMS -#define TASKID_RECV 1 -#define TASKID_ACTN 2 -#define TASKID_SPIQ 3 -#define TASKID_STAT 4 -#define TASKID_AVF0 5 -#define TASKID_SWBD 6 -#define TASKID_WFRM 7 -#define TASKID_DUMB 8 -#define TASKID_HOUS 9 -#define TASKID_PRC0 10 -#define TASKID_CWF3 11 -#define TASKID_CWF2 12 -#define TASKID_CWF1 13 -#define TASKID_SEND 14 -#define TASKID_WTDG 15 -#define TASKID_AVF1 16 -#define TASKID_PRC1 17 -#define TASKID_AVF2 18 -#define TASKID_PRC2 19 - -#define TASK_PRIORITY_SPIQ 5 -#define TASK_PRIORITY_WTDG 20 -#define TASK_PRIORITY_HOUS 30 -#define TASK_PRIORITY_CWF1 35 // CWF1 and CWF2 are never running together -#define TASK_PRIORITY_CWF2 35 // -#define TASK_PRIORITY_SWBD 37 // SWBD has a lower priority than WFRM, this is to extract the snapshot before sending it -#define TASK_PRIORITY_WFRM 40 -#define TASK_PRIORITY_CWF3 40 // there is a printf in this function, be careful with its priority wrt CWF1 -#define TASK_PRIORITY_SEND 45 -#define TASK_PRIORITY_RECV 50 -#define TASK_PRIORITY_ACTN 50 -#define TASK_PRIORITY_AVF0 60 -#define TASK_PRIORITY_AVF1 70 -#define TASK_PRIORITY_PRC0 100 -#define TASK_PRIORITY_PRC1 100 -#define TASK_PRIORITY_AVF2 110 -#define TASK_PRIORITY_PRC2 110 -#define TASK_PRIORITY_STAT 200 -#define TASK_PRIORITY_DUMB 200 - -#define MSG_QUEUE_COUNT_RECV 10 -#define MSG_QUEUE_COUNT_SEND 50 -#define MSG_QUEUE_COUNT_PRC0 10 -#define MSG_QUEUE_COUNT_PRC1 10 -#define MSG_QUEUE_COUNT_PRC2 5 -#define MSG_QUEUE_SIZE_SEND 810 // 806 + 4 => TM_LFR_SCIENCE_BURST_BP2_F1 -#define ACTION_MSG_SPW_IOCTL_SEND_SIZE 24 // hlen *hdr dlen *data sent options -#define MSG_QUEUE_SIZE_PRC0 20 // two pointers and one rtems_event + 2 integers -#define MSG_QUEUE_SIZE_PRC1 20 // two pointers and one rtems_event + 2 integers -#define MSG_QUEUE_SIZE_PRC2 20 // two pointers and one rtems_event + 2 integers - -#define QUEUE_RECV 0 -#define QUEUE_SEND 1 -#define QUEUE_PRC0 2 -#define QUEUE_PRC1 3 -#define QUEUE_PRC2 4 - -//******* -// MACROS -#ifdef PRINT_MESSAGES_ON_CONSOLE -#define PRINTF(x) printf(x); -#define PRINTF1(x,y) printf(x,y); -#define PRINTF2(x,y,z) printf(x,y,z); -#else -#define PRINTF(x) ; -#define PRINTF1(x,y) ; -#define PRINTF2(x,y,z) ; -#endif - -#ifdef BOOT_MESSAGES -#define BOOT_PRINTF(x) printf(x); -#define BOOT_PRINTF1(x,y) printf(x,y); -#define BOOT_PRINTF2(x,y,z) printf(x,y,z); -#else -#define BOOT_PRINTF(x) ; -#define BOOT_PRINTF1(x,y) ; -#define BOOT_PRINTF2(x,y,z) ; -#endif - -#ifdef DEBUG_MESSAGES -#define DEBUG_PRINTF(x) printf(x); -#define DEBUG_PRINTF1(x,y) printf(x,y); -#define DEBUG_PRINTF2(x,y,z) printf(x,y,z); -#else -#define DEBUG_PRINTF(x) ; -#define DEBUG_PRINTF1(x,y) ; -#define DEBUG_PRINTF2(x,y,z) ; -#endif - -#define CPU_USAGE_REPORT_PERIOD 6 // * 10 s = period - -struct param_local_str{ - unsigned int local_sbm1_nb_cwf_sent; - unsigned int local_sbm1_nb_cwf_max; - unsigned int local_sbm2_nb_cwf_sent; - unsigned int local_sbm2_nb_cwf_max; -}; - -#endif // FSW_PARAMS_H_INCLUDED diff --git a/header/fsw_params_nb_bytes.h b/header/fsw_params_nb_bytes.h deleted file mode 100644 --- a/header/fsw_params_nb_bytes.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef TM_BYTE_POSITIONS_H -#define TM_BYTE_POSITIONS_H - -// SEQUENCE_CNT -#define PACKET_POS_SEQUENCE_CNT 6 // 4 + 2 - -// TC_LFR_LOAD_COMMON_PAR - -// TC_LFR_LOAD_NORMAL_PAR -#define DATAFIELD_POS_SY_LFR_N_SWF_L 0 -#define DATAFIELD_POS_SY_LFR_N_SWF_P 2 -#define DATAFIELD_POS_SY_LFR_N_ASM_P 4 -#define DATAFIELD_POS_SY_LFR_N_BP_P0 6 -#define DATAFIELD_POS_SY_LFR_N_BP_P1 7 -#define DATAFIELD_POS_SY_LFR_N_CWF_LONG_F3 8 - -// TC_LFR_LOAD_BURST_PAR -#define DATAFIELD_POS_SY_LFR_B_BP_P0 0 -#define DATAFIELD_POS_SY_LFR_B_BP_P1 1 - -// TC_LFR_LOAD_SBM1_PAR -#define DATAFIELD_POS_SY_LFR_S1_BP_P0 0 -#define DATAFIELD_POS_SY_LFR_S1_BP_P1 1 - -// TC_LFR_LOAD_SBM2_PAR -#define DATAFIELD_POS_SY_LFR_S2_BP_P0 0 -#define DATAFIELD_POS_SY_LFR_S2_BP_P1 1 - -// TC_LFR_UPDATE_INFO -#define BYTE_POS_UPDATE_INFO_PARAMETERS_SET5 34 -#define BYTE_POS_UPDATE_INFO_PARAMETERS_SET6 35 - -// TC_LFR_ENTER_MODE -#define BYTE_POS_CP_MODE_LFR_SET 11 -#define BYTE_POS_CP_LFR_ENTER_MODE_TIME 12 - -#endif // TM_BYTE_POSITIONS_H diff --git a/header/fsw_params_processing.h b/header/fsw_params_processing.h deleted file mode 100644 --- a/header/fsw_params_processing.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef FSW_PARAMS_PROCESSING_H -#define FSW_PARAMS_PROCESSING_H - -#define NB_BINS_PER_SM 128 -#define NB_VALUES_PER_SM 25 -#define TOTAL_SIZE_SM 3200 // 25 * 128 = 0xC80 -#define TOTAL_SIZE_NORM_BP1_F0 99 // 11 * 9 = 99 -#define TOTAL_SIZE_NORM_BP1_F1 117 // 13 * 9 = 117 -#define TOTAL_SIZE_NORM_BP1_F2 108 // 12 * 9 = 108 -#define TOTAL_SIZE_SBM1_BP1_F0 198 // 22 * 9 = 198 -// -#define NB_RING_NODES_SM_F0 12 // AT LEAST 8 due to the way the averaging is done -#define NB_RING_NODES_ASM_BURST_SBM_F0 10 // AT LEAST 3 -#define NB_RING_NODES_ASM_NORM_F0 10 // AT LEAST 3 -#define NB_RING_NODES_ASM_F0 3 // AT LEAST 3 -#define NB_RING_NODES_SM_F1 12 // AT LEAST 8 due to the way the averaging is done -#define NB_RING_NODES_ASM_BURST_SBM_F1 5 // AT LEAST 3 -#define NB_RING_NODES_ASM_NORM_F1 5 // AT LEAST 3 -#define NB_RING_NODES_ASM_F1 3 // AT LEAST 3 -#define NB_RING_NODES_SM_F2 3 // AT LEAST 3 -#define NB_RING_NODES_ASM_BURST_SBM_F2 3 // AT LEAST 3 -#define NB_RING_NODES_ASM_NORM_F2 3 // AT LEAST 3 -#define NB_RING_NODES_ASM_F2 3 // AT LEAST 3 -// -#define NB_BINS_PER_ASM_F0 88 -#define NB_BINS_PER_PKT_ASM_F0 44 -#define TOTAL_SIZE_ASM_F0_IN_BYTES 4400 // 25 * 88 * 2 -#define ASM_F0_INDICE_START 17 // 88 bins -#define ASM_F0_INDICE_STOP 104 // 2 packets of 44 bins -// -#define NB_BINS_PER_ASM_F1 104 -#define NB_BINS_PER_PKT_ASM_F1 52 -#define TOTAL_SIZE_ASM_F1_IN_BYTES 5200 // 25 * 104 * 2 -#define ASM_F1_INDICE_START 6 // 104 bins -#define ASM_F1_INDICE_STOP 109 // 2 packets of 52 bins -// -#define NB_BINS_PER_ASM_F2 96 -#define NB_BINS_PER_PKT_ASM_F2 48 -#define TOTAL_SIZE_ASM_F2_IN_BYTES 4800 // 25 * 96 * 2 -#define ASM_F2_INDICE_START 7 // 96 bins -#define ASM_F2_INDICE_STOP 102 // 2 packets of 48 bins -// -#define NB_BINS_COMPRESSED_SM_F0 11 -#define NB_BINS_COMPRESSED_SM_F1 13 -#define NB_BINS_COMPRESSED_SM_F2 12 -#define NB_BINS_COMPRESSED_SM_SBM_F0 22 -#define NB_BINS_COMPRESSED_SM_SBM_F1 26 -#define NB_BINS_COMPRESSED_SM_SBM_F2 24 -// -#define NB_BYTES_PER_BP1 9 -// -#define NB_BINS_TO_AVERAGE_ASM_F0 8 -#define NB_BINS_TO_AVERAGE_ASM_F1 8 -#define NB_BINS_TO_AVERAGE_ASM_F2 8 -#define NB_BINS_TO_AVERAGE_ASM_SBM_F0 4 -#define NB_BINS_TO_AVERAGE_ASM_SBM_F1 4 -#define NB_BINS_TO_AVERAGE_ASM_SBM_F2 4 -// -#define TOTAL_SIZE_COMPRESSED_ASM_NORM_F0 275 // 11 * 25 WORDS -#define TOTAL_SIZE_COMPRESSED_ASM_NORM_F1 325 // 13 * 25 WORDS -#define TOTAL_SIZE_COMPRESSED_ASM_NORM_F2 300 // 12 * 25 WORDS -#define TOTAL_SIZE_COMPRESSED_ASM_SBM_F0 550 // 22 * 25 WORDS -#define TOTAL_SIZE_COMPRESSED_ASM_SBM_F1 650 // 26 * 25 WORDS -#define TOTAL_SIZE_COMPRESSED_ASM_SBM_F2 600 // 24 * 25 WORDS -#define TOTAL_SIZE_BP1_NORM_F0 99 // 9 * 11 UNSIGNED CHAR -#define TOTAL_SIZE_BP1_SBM_F0 198 // 9 * 22 UNSIGNED CHAR -// GENERAL -#define NB_SM_BEFORE_AVF0 8 // must be 8 due to the SM_average() function -#define NB_SM_BEFORE_AVF1 8 // must be 8 due to the SM_average() function -#define NB_SM_BEFORE_AVF2 1 // must be 1 due to the SM_average_f2() function - -#endif // FSW_PARAMS_PROCESSING_H - diff --git a/header/processing/fsw_processing.h b/header/processing/fsw_processing.h --- a/header/processing/fsw_processing.h +++ b/header/processing/fsw_processing.h @@ -7,6 +7,7 @@ #include // abs() is in the stdlib #include // printf() #include +#include #include "fsw_params.h" #include "fsw_spacewire.h" diff --git a/header/tm_byte_positions.h b/header/tm_byte_positions.h deleted file mode 100644 --- a/header/tm_byte_positions.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef TM_BYTE_POSITIONS_H -#define TM_BYTE_POSITIONS_H - -#define BYTE_POS_CP_LFR_MODE 11 - -// TC_LFR_LOAD_COMMON_PAR - -// TC_LFR_LOAD_NORMAL_PAR -#define BYTE_POS_SY_LFR_N_SWF_L 0 -#define BYTE_POS_SY_LFR_N_SWF_P 2 -#define BYTE_POS_SY_LFR_N_ASM_P 4 -#define BYTE_POS_SY_LFR_N_BP_P0 6 -#define BYTE_POS_SY_LFR_N_BP_P1 7 -#define BYTE_POS_SY_LFR_N_CWF_LONG_F3 8 - -// TC_LFR_LOAD_BURST_PAR - -// TC_LFR_LOAD_SBM1_PAR - -// TC_LFR_LOAD_SBM2_PAR - - -#endif // TM_BYTE_POSITIONS_H diff --git a/header/tm_lfr_tc_exe.h b/header/tm_lfr_tc_exe.h --- a/header/tm_lfr_tc_exe.h +++ b/header/tm_lfr_tc_exe.h @@ -3,6 +3,7 @@ #include #include +#include #include "fsw_params.h" #include "fsw_spacewire.h" diff --git a/header/wf_handler.h b/header/wf_handler.h --- a/header/wf_handler.h +++ b/header/wf_handler.h @@ -5,8 +5,8 @@ #include #include #include +#include -#include "fsw_params.h" #include "fsw_spacewire.h" #include "fsw_misc.h" #include "fsw_params_wf_handler.h" diff --git a/timegen-qt/Makefile b/timegen-qt/Makefile deleted file mode 100644 --- a/timegen-qt/Makefile +++ /dev/null @@ -1,234 +0,0 @@ -############################################################################# -# Makefile for building: bin/timegen -# Generated by qmake (2.01a) (Qt 4.8.6) on: Fri Oct 24 13:36:54 2014 -# Project: timegen-qt.pro -# Template: app -# Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ CONFIG+=debug -o Makefile timegen-qt.pro -############################################################################# - -####### Compiler, tools and options - -CC = sparc-rtems-gcc -CXX = sparc-rtems-g++ -DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=1 -DPRINT_MESSAGES_ON_CONSOLE -CFLAGS = -pipe -g -O3 -Wall $(DEFINES) -CXXFLAGS = -pipe -O3 -Wall $(DEFINES) -INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -Isrc -Iheader -Iheader/processing -Isrc/LFR_basic-parameters -LINK = sparc-rtems-g++ -LFLAGS = -g -LIBS = $(SUBLIBS) -AR = sparc-rtems-ar rcs -RANLIB = -QMAKE = /usr/bin/qmake-qt4 -TAR = tar -cf -COMPRESS = gzip -9f -COPY = cp -f -SED = sed -COPY_FILE = $(COPY) -COPY_DIR = $(COPY) -r -STRIP = sparc-rtems-strip -INSTALL_FILE = install -m 644 -p -INSTALL_DIR = $(COPY_DIR) -INSTALL_PROGRAM = install -m 755 -p -DEL_FILE = rm -f -SYMLINK = ln -f -s -DEL_DIR = rmdir -MOVE = mv -f -CHK_DIR_EXISTS= test -d -MKDIR = mkdir -p - -####### Output directory - -OBJECTS_DIR = obj/ - -####### Files - -SOURCES = src/tc_handler.c \ - src/fsw_misc.c \ - src/fsw_init.c \ - src/fsw_globals.c \ - src/fsw_spacewire.c \ - src/tc_acceptance.c \ - src/LFR_basic-parameters/basic_parameters.c -OBJECTS = obj/tc_handler.o \ - obj/fsw_misc.o \ - obj/fsw_init.o \ - obj/fsw_globals.o \ - obj/fsw_spacewire.o \ - obj/tc_acceptance.o \ - obj/basic_parameters.o -DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ - /usr/lib64/qt4/mkspecs/common/linux.conf \ - /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ - /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ - /usr/lib64/qt4/mkspecs/common/g++-base.conf \ - /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ - /usr/lib64/qt4/mkspecs/qconfig.pri \ - /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ - /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ - /usr/lib64/qt4/mkspecs/features/qt_config.prf \ - /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ - /usr/lib64/qt4/mkspecs/features/default_pre.prf \ - sparc.pri \ - /usr/lib64/qt4/mkspecs/features/debug.prf \ - /usr/lib64/qt4/mkspecs/features/default_post.prf \ - /usr/lib64/qt4/mkspecs/features/shared.prf \ - /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ - /usr/lib64/qt4/mkspecs/features/warn_on.prf \ - /usr/lib64/qt4/mkspecs/features/resources.prf \ - /usr/lib64/qt4/mkspecs/features/uic.prf \ - /usr/lib64/qt4/mkspecs/features/yacc.prf \ - /usr/lib64/qt4/mkspecs/features/lex.prf \ - /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ - timegen-qt.pro -QMAKE_TARGET = timegen -DESTDIR = bin/ -TARGET = bin/timegen - -first: all -####### Implicit rules - -.SUFFIXES: .o .c .cpp .cc .cxx .C - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" - -####### Build rules - -all: Makefile $(TARGET) - -$(TARGET): $(OBJECTS) - @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) - { test -n "$(DESTDIR)" && DESTDIR="$(DESTDIR)" || DESTDIR=.; } && test $$(gdb --version | sed -e 's,[^0-9][^0-9]*\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $$DESTDIR" -ex quit '$(TARGET)' && test -f $(TARGET).gdb-index && sparc-rtems-objcopy --add-section '.gdb_index=$(TARGET).gdb-index' --set-section-flags '.gdb_index=readonly' '$(TARGET)' '$(TARGET)' && rm -f $(TARGET).gdb-index || true - -Makefile: timegen-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ - /usr/lib64/qt4/mkspecs/common/linux.conf \ - /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ - /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ - /usr/lib64/qt4/mkspecs/common/g++-base.conf \ - /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ - /usr/lib64/qt4/mkspecs/qconfig.pri \ - /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ - /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ - /usr/lib64/qt4/mkspecs/features/qt_config.prf \ - /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ - /usr/lib64/qt4/mkspecs/features/default_pre.prf \ - sparc.pri \ - /usr/lib64/qt4/mkspecs/features/debug.prf \ - /usr/lib64/qt4/mkspecs/features/default_post.prf \ - /usr/lib64/qt4/mkspecs/features/shared.prf \ - /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ - /usr/lib64/qt4/mkspecs/features/warn_on.prf \ - /usr/lib64/qt4/mkspecs/features/resources.prf \ - /usr/lib64/qt4/mkspecs/features/uic.prf \ - /usr/lib64/qt4/mkspecs/features/yacc.prf \ - /usr/lib64/qt4/mkspecs/features/lex.prf \ - /usr/lib64/qt4/mkspecs/features/include_source_dir.prf - $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ CONFIG+=debug -o Makefile timegen-qt.pro -/usr/lib64/qt4/mkspecs/common/unix.conf: -/usr/lib64/qt4/mkspecs/common/linux.conf: -/usr/lib64/qt4/mkspecs/common/gcc-base.conf: -/usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: -/usr/lib64/qt4/mkspecs/common/g++-base.conf: -/usr/lib64/qt4/mkspecs/common/g++-unix.conf: -/usr/lib64/qt4/mkspecs/qconfig.pri: -/usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: -/usr/lib64/qt4/mkspecs/features/qt_functions.prf: -/usr/lib64/qt4/mkspecs/features/qt_config.prf: -/usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: -/usr/lib64/qt4/mkspecs/features/default_pre.prf: -sparc.pri: -/usr/lib64/qt4/mkspecs/features/debug.prf: -/usr/lib64/qt4/mkspecs/features/default_post.prf: -/usr/lib64/qt4/mkspecs/features/shared.prf: -/usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: -/usr/lib64/qt4/mkspecs/features/warn_on.prf: -/usr/lib64/qt4/mkspecs/features/resources.prf: -/usr/lib64/qt4/mkspecs/features/uic.prf: -/usr/lib64/qt4/mkspecs/features/yacc.prf: -/usr/lib64/qt4/mkspecs/features/lex.prf: -/usr/lib64/qt4/mkspecs/features/include_source_dir.prf: -qmake: FORCE - @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ CONFIG+=debug -o Makefile timegen-qt.pro - -dist: - @$(CHK_DIR_EXISTS) obj/timegen1.0.0 || $(MKDIR) obj/timegen1.0.0 - $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/timegen1.0.0/ && (cd `dirname obj/timegen1.0.0` && $(TAR) timegen1.0.0.tar timegen1.0.0 && $(COMPRESS) timegen1.0.0.tar) && $(MOVE) `dirname obj/timegen1.0.0`/timegen1.0.0.tar.gz . && $(DEL_FILE) -r obj/timegen1.0.0 - - -clean:compiler_clean - -$(DEL_FILE) $(OBJECTS) - -$(DEL_FILE) *~ core *.core - - -####### Sub-libraries - -distclean: clean - -$(DEL_FILE) $(TARGET) - -$(DEL_FILE) Makefile - - -grmon: - cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u - -check: first - -compiler_rcc_make_all: -compiler_rcc_clean: -compiler_uic_make_all: -compiler_uic_clean: -compiler_image_collection_make_all: qmake_image_collection.cpp -compiler_image_collection_clean: - -$(DEL_FILE) qmake_image_collection.cpp -compiler_yacc_decl_make_all: -compiler_yacc_decl_clean: -compiler_yacc_impl_make_all: -compiler_yacc_impl_clean: -compiler_lex_make_all: -compiler_lex_clean: -compiler_clean: - -####### Compile - -obj/tc_handler.o: src/tc_handler.c - $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o src/tc_handler.c - -obj/fsw_misc.o: src/fsw_misc.c - $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o src/fsw_misc.c - -obj/fsw_init.o: src/fsw_init.c src/fsw_config.c - $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o src/fsw_init.c - -obj/fsw_globals.o: src/fsw_globals.c - $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o src/fsw_globals.c - -obj/fsw_spacewire.o: src/fsw_spacewire.c - $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o src/fsw_spacewire.c - -obj/tc_acceptance.o: src/tc_acceptance.c - $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o src/tc_acceptance.c - -obj/basic_parameters.o: src/LFR_basic-parameters/basic_parameters.c - $(CC) -c $(CFLAGS) $(INCPATH) -o obj/basic_parameters.o src/LFR_basic-parameters/basic_parameters.c - -####### Install - -install: FORCE - -uninstall: FORCE - -FORCE: -