diff --git a/.hgsubstate b/.hgsubstate --- a/.hgsubstate +++ b/.hgsubstate @@ -1,1 +1,1 @@ -294fc10efc0eadddaba53149ef6dd1e60a0587c6 src/basic_parameters +b0a4fa20a3c7bd7e9ca1a1c4fda85d3269653bc8 src/basic_parameters 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.5) on: Tue Apr 29 14:02:09 2014 +# Generated by qmake (2.01a) (Qt 4.8.5) on: Fri May 2 15:40:46 2014 # Project: fsw-qt.pro # Template: app # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro @@ -10,7 +10,7 @@ CC = sparc-rtems-gcc CXX = sparc-rtems-g++ -DEFINES = -DSW_VERSION_N1=1 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=6 -DPRINT_MESSAGES_ON_CONSOLE -DPRINT_TASK_STATISTICS +DEFINES = -DSW_VERSION_N1=1 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=6 -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/basic_parameters 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 @@ -1,7 +1,7 @@ TEMPLATE = app # CONFIG += console v8 sim # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** vhdl_dev *** debug_tch -CONFIG += console verbose cpu_usage_report +CONFIG += console verbose CONFIG -= qt include(./sparc.pri) 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 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/header/processing/avf0_prc0.h b/header/processing/avf0_prc0.h --- a/header/processing/avf0_prc0.h +++ b/header/processing/avf0_prc0.h @@ -2,6 +2,7 @@ #define AVF0_PRC0_H_INCLUDED #include "fsw_processing.h" +#include "basic_parameters.h" typedef struct { unsigned int norm_bp1; diff --git a/src/fsw_misc.c b/src/fsw_misc.c --- a/src/fsw_misc.c +++ b/src/fsw_misc.c @@ -197,7 +197,8 @@ rtems_task hous_task(rtems_task_argument else { status = rtems_rate_monotonic_get_status( HK_id, &period_status ); - sched_yield(); +// sched_yield(); + status = rtems_task_wake_after( 10 ); // wait SY_LFR_DPU_CONNECT_TIMEOUT 100 ms = 10 * 10 ms } } status = rtems_rate_monotonic_cancel(HK_id); @@ -328,7 +329,7 @@ void increment_seq_counter( unsigned cha unsigned short segmentation_grouping_flag; unsigned short new_packet_sequence_control; - segmentation_grouping_flag = (unsigned short) ( (packet_sequence_control[0] & 0xc0) << 8 ); // keep bits 7 downto 6 + segmentation_grouping_flag = TM_PACKET_SEQ_CTRL_STANDALONE << 8; // keep bits 7 downto 6 sequence_cnt = (unsigned short) ( ( (packet_sequence_control[0] & 0x3f) << 8 ) // keep bits 5 downto 0 + packet_sequence_control[1] diff --git a/src/processing/avf0_prc0.c b/src/processing/avf0_prc0.c --- a/src/processing/avf0_prc0.c +++ b/src/processing/avf0_prc0.c @@ -21,6 +21,8 @@ float asm_f0_reorganized [ TOTAL_SIZE_ char asm_f0_char [ TIME_OFFSET_IN_BYTES + (TOTAL_SIZE_SM * 2) ]; float compressed_sm_norm_f0[ TOTAL_SIZE_COMPRESSED_ASM_NORM_F0]; float compressed_sm_sbm_f0 [ TOTAL_SIZE_COMPRESSED_ASM_SBM_F0 ]; +unsigned char bp1_norm_f0 [ TOTAL_SIZE_BP1_NORM_F0 ]; +unsigned char bp1_sbm_f0 [ TOTAL_SIZE_BP1_SBM_F0 ]; //************ // RTEMS TASKS @@ -259,7 +261,7 @@ rtems_task prc0_task( rtems_task_argumen NB_BINS_COMPRESSED_SM_SBM_F0, NB_BINS_TO_AVERAGE_ASM_SBM_F0, ASM_F0_INDICE_START); // 2) compute the BP1 set - +// BP1_set( compressed_sm_norm_f0, NB_BINS_COMPRESSED_SM_SBM_F0, bp1_sbm_f0 ); // 3) send the BP1 set set_time( packet_sbm_bp1_f0.header.time, (unsigned char *) &incomingMsg->coarseTime ); set_time( packet_sbm_bp1_f0.header.acquisitionTime, (unsigned char *) &incomingMsg->fineTime ); @@ -291,7 +293,7 @@ rtems_task prc0_task( rtems_task_argumen NB_BINS_COMPRESSED_SM_F0, NB_BINS_TO_AVERAGE_ASM_F0, ASM_F0_INDICE_START ); // 2) compute the BP1 set - +// BP1_set( compressed_sm_norm_f0, NB_BINS_COMPRESSED_SM_F0, bp1_norm_f0 ); // 3) send the BP1 set set_time( packet_norm_bp1_f0.header.time, (unsigned char *) &incomingMsg->coarseTime ); set_time( packet_norm_bp1_f0.header.acquisitionTime, (unsigned char *) &incomingMsg->fineTime ); diff --git a/src/wf_handler.c b/src/wf_handler.c --- a/src/wf_handler.c +++ b/src/wf_handler.c @@ -1304,29 +1304,21 @@ void increment_seq_counter_source_id( un if ( (sid ==SID_NORM_SWF_F0) || (sid ==SID_NORM_SWF_F1) || (sid ==SID_NORM_SWF_F2) || (sid ==SID_NORM_CWF_F3) || (sid==SID_NORM_CWF_LONG_F3) || (sid ==SID_BURST_CWF_F2) ) { - sequence_cnt = &sequenceCounters_SCIENCE_NORMAL_BURST; + sequence_cnt = (unsigned short *) &sequenceCounters_SCIENCE_NORMAL_BURST; } else if ( (sid ==SID_SBM1_CWF_F1) || (sid ==SID_SBM2_CWF_F2) ) { - sequence_cnt = &sequenceCounters_SCIENCE_SBM1_SBM2; + sequence_cnt = (unsigned short *) &sequenceCounters_SCIENCE_SBM1_SBM2; } else { - sequence_cnt = NULL; + sequence_cnt = (unsigned short *) NULL; PRINTF1("in increment_seq_counter_source_id *** ERR apid_destid %d not known\n", sid) } if (sequence_cnt != NULL) { - segmentation_grouping_flag = (packet_sequence_control[ 0 ] & 0xc0) << 8; - *sequence_cnt = (*sequence_cnt) & 0x3fff; - - new_packet_sequence_control = segmentation_grouping_flag | *sequence_cnt ; - - packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8); - packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control ); - - // increment the sequence counter for the next packet + // increment the sequence counter if ( *sequence_cnt < SEQ_CNT_MAX) { *sequence_cnt = *sequence_cnt + 1; @@ -1335,5 +1327,12 @@ void increment_seq_counter_source_id( un { *sequence_cnt = 0; } + segmentation_grouping_flag = TM_PACKET_SEQ_CTRL_STANDALONE << 8; + *sequence_cnt = (*sequence_cnt) & 0x3fff; + + new_packet_sequence_control = segmentation_grouping_flag | (*sequence_cnt) ; + + packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8); + packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control ); } }