# HG changeset patch
# User paul
# Date 2015-11-02 08:55:09
# Node ID 5379af5b0bd49b98ea03050d3b77592d9ff50d48
# Parent 5b172495b580d79ad6cd92deaa60d022ae0c6704
3.0.0.12
the frequency masks are implemented now
diff --git a/.hgsubstate b/.hgsubstate
--- a/.hgsubstate
+++ b/.hgsubstate
@@ -1,2 +1,2 @@
3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters
-82603593a3f6185e68418200fe1fee7d81fe6e3d header/lfr_common_headers
+07e22c5c44daa84954a10db557a74b8c8dd2d014 header/lfr_common_headers
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
@@ -2,7 +2,7 @@ TEMPLATE = app
# CONFIG += console v8 sim
# CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** vhdl_dev *** debug_tch
# lpp_dpu_destid
-CONFIG += console verbose lpp_dpu_destid
+CONFIG += console verbose lpp_dpu_destid cpu_usage_report
CONFIG -= qt
include(./sparc.pri)
@@ -12,11 +12,11 @@ SWVERSION=-1-0
DEFINES += SW_VERSION_N1=3 # major
DEFINES += SW_VERSION_N2=0 # minor
DEFINES += SW_VERSION_N3=0 # patch
-DEFINES += SW_VERSION_N4=11 # internal
+DEFINES += SW_VERSION_N4=12 # internal
#
-QMAKE_CFLAGS_RELEASE += -fprofile-arcs -ftest-coverage
-LIBS += -lgcov /opt/GCOV/01A/lib/overload.o -lc
+#QMAKE_CFLAGS_RELEASE += -fprofile-arcs -ftest-coverage
+#LIBS += -lgcov /opt/GCOV/01A/lib/overload.o -lc
#
#
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
@@ -320,9 +320,9 @@ void ASM_convert( volatile float *input_
void ASM_compress_reorganize_and_divide_mask(float *averaged_spec_mat, float *compressed_spec_mat,
float divider,
- unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage , unsigned char ASMIndexStart);
+ unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage , unsigned char ASMIndexStart, unsigned char channel);
-int getFBinMask(int k);
+int getFBinMask(int k, unsigned char channel);
void init_kcoeff_sbm_from_kcoeff_norm( float *input_kcoeff, float *output_kcoeff, unsigned char nb_bins_norm);
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
@@ -274,10 +274,10 @@ rtems_task prc0_task( rtems_task_argumen
{
sid = getSID( incomingMsg->event );
// 1) compress the matrix for Basic Parameters calculation
- ASM_compress_reorganize_and_divide( asm_f0_patched_burst_sbm, compressed_sm_sbm_f0,
+ ASM_compress_reorganize_and_divide_mask( asm_f0_patched_burst_sbm, compressed_sm_sbm_f0,
nb_sm_before_f0.burst_sbm_bp1,
NB_BINS_COMPRESSED_SM_SBM_F0, NB_BINS_TO_AVERAGE_ASM_SBM_F0,
- ASM_F0_INDICE_START);
+ ASM_F0_INDICE_START, CHANNELF0);
// 2) compute the BP1 set
BP1_set( compressed_sm_sbm_f0, k_coeff_intercalib_f0_sbm, NB_BINS_COMPRESSED_SM_SBM_F0, packet_sbm_bp1.data );
// 3) send the BP1 set
@@ -312,10 +312,10 @@ rtems_task prc0_task( rtems_task_argumen
if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F0)
{
// 1) compress the matrix for Basic Parameters calculation
- ASM_compress_reorganize_and_divide( asm_f0_patched_norm, compressed_sm_norm_f0,
+ ASM_compress_reorganize_and_divide_mask( asm_f0_patched_norm, compressed_sm_norm_f0,
nb_sm_before_f0.norm_bp1,
NB_BINS_COMPRESSED_SM_F0, NB_BINS_TO_AVERAGE_ASM_F0,
- ASM_F0_INDICE_START );
+ ASM_F0_INDICE_START, CHANNELF0 );
// 2) compute the BP1 set
BP1_set( compressed_sm_norm_f0, k_coeff_intercalib_f0_norm, NB_BINS_COMPRESSED_SM_F0, packet_norm_bp1.data );
// 3) send the BP1 set
diff --git a/src/processing/avf1_prc1.c b/src/processing/avf1_prc1.c
--- a/src/processing/avf1_prc1.c
+++ b/src/processing/avf1_prc1.c
@@ -269,10 +269,10 @@ rtems_task prc1_task( rtems_task_argumen
{
sid = getSID( incomingMsg->event );
// 1) compress the matrix for Basic Parameters calculation
- ASM_compress_reorganize_and_divide( asm_f1_patched_burst_sbm, compressed_sm_sbm_f1,
+ ASM_compress_reorganize_and_divide_mask( asm_f1_patched_burst_sbm, compressed_sm_sbm_f1,
nb_sm_before_f1.burst_sbm_bp1,
NB_BINS_COMPRESSED_SM_SBM_F1, NB_BINS_TO_AVERAGE_ASM_SBM_F1,
- ASM_F1_INDICE_START);
+ ASM_F1_INDICE_START, CHANNELF1);
// 2) compute the BP1 set
BP1_set( compressed_sm_sbm_f1, k_coeff_intercalib_f1_sbm, NB_BINS_COMPRESSED_SM_SBM_F1, packet_sbm_bp1.data );
// 3) send the BP1 set
@@ -307,10 +307,10 @@ rtems_task prc1_task( rtems_task_argumen
if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F1)
{
// 1) compress the matrix for Basic Parameters calculation
- ASM_compress_reorganize_and_divide( asm_f1_patched_norm, compressed_sm_norm_f1,
+ ASM_compress_reorganize_and_divide_mask( asm_f1_patched_norm, compressed_sm_norm_f1,
nb_sm_before_f1.norm_bp1,
NB_BINS_COMPRESSED_SM_F1, NB_BINS_TO_AVERAGE_ASM_F1,
- ASM_F1_INDICE_START );
+ ASM_F1_INDICE_START, CHANNELF1 );
// 2) compute the BP1 set
BP1_set( compressed_sm_norm_f1, k_coeff_intercalib_f1_norm, NB_BINS_COMPRESSED_SM_F1, packet_norm_bp1.data );
// 3) send the BP1 set
diff --git a/src/processing/avf2_prc2.c b/src/processing/avf2_prc2.c
--- a/src/processing/avf2_prc2.c
+++ b/src/processing/avf2_prc2.c
@@ -188,10 +188,10 @@ rtems_task prc2_task( rtems_task_argumen
//*****
//*****
// 1) compress the matrix for Basic Parameters calculation
- ASM_compress_reorganize_and_divide( asm_f2_patched_norm, compressed_sm_norm_f2,
+ ASM_compress_reorganize_and_divide_mask( asm_f2_patched_norm, compressed_sm_norm_f2,
nb_sm_before_f2.norm_bp1,
NB_BINS_COMPRESSED_SM_F2, NB_BINS_TO_AVERAGE_ASM_F2,
- ASM_F2_INDICE_START );
+ ASM_F2_INDICE_START, CHANNELF2 );
// BP1_F2
if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F2)
{
diff --git a/src/processing/fsw_processing.c b/src/processing/fsw_processing.c
--- a/src/processing/fsw_processing.c
+++ b/src/processing/fsw_processing.c
@@ -589,7 +589,9 @@ void ASM_patch( float *inputASM, float *
}
void ASM_compress_reorganize_and_divide_mask(float *averaged_spec_mat, float *compressed_spec_mat , float divider,
- unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage, unsigned char ASMIndexStart )
+ unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage,
+ unsigned char ASMIndexStart,
+ unsigned char channel )
{
//*************
// input format
@@ -627,7 +629,7 @@ void ASM_compress_reorganize_and_divide_
compressed_spec_mat[ offsetCompressed ] = 0;
for ( k = 0; k < nbBinsToAverage; k++ )
{
- fBinMask = getFBinMask( offsetFBin + k );
+ fBinMask = getFBinMask( offsetFBin + k, channel );
compressed_spec_mat[offsetCompressed ] =
( compressed_spec_mat[ offsetCompressed ]
+ averaged_spec_mat[ offsetASM + k ] * fBinMask );
@@ -639,16 +641,34 @@ void ASM_compress_reorganize_and_divide_
}
-int getFBinMask( int index )
+int getFBinMask( int index, unsigned char channel )
{
unsigned int indexInChar;
unsigned int indexInTheChar;
int fbin;
+ unsigned char *sy_lfr_fbins_fx_word1;
+
+ sy_lfr_fbins_fx_word1 = parameter_dump_packet.sy_lfr_fbins_f0_word1;
+
+ switch(channel)
+ {
+ case 0:
+ sy_lfr_fbins_fx_word1 = parameter_dump_packet.sy_lfr_fbins_f0_word1;
+ break;
+ case 1:
+ sy_lfr_fbins_fx_word1 = parameter_dump_packet.sy_lfr_fbins_f1_word1;
+ break;
+ case 2:
+ sy_lfr_fbins_fx_word1 = parameter_dump_packet.sy_lfr_fbins_f2_word1;
+ break;
+ default:
+ PRINTF("ERR *** in getFBinMask, wrong frequency channel")
+ }
indexInChar = index >> 3;
indexInTheChar = index - indexInChar * 8;
- fbin = (int) ((parameter_dump_packet.sy_lfr_fbins_f0_word1[ NB_BYTES_PER_FREQ_MASK - 1 - indexInChar] >> indexInTheChar) & 0x1);
+ fbin = (int) ((sy_lfr_fbins_fx_word1[ NB_BYTES_PER_FREQ_MASK - 1 - indexInChar] >> indexInTheChar) & 0x1);
return fbin;
}