##// END OF EJS Templates
3.0.0.12...
paul -
r236:5379af5b0bd4 R3
parent child
Show More
@@ -1,2 +1,2
1 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters
1 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters
2 82603593a3f6185e68418200fe1fee7d81fe6e3d header/lfr_common_headers
2 07e22c5c44daa84954a10db557a74b8c8dd2d014 header/lfr_common_headers
@@ -2,7 +2,7 TEMPLATE = app
2 # CONFIG += console v8 sim
2 # CONFIG += console v8 sim
3 # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** vhdl_dev *** debug_tch
3 # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** vhdl_dev *** debug_tch
4 # lpp_dpu_destid
4 # lpp_dpu_destid
5 CONFIG += console verbose lpp_dpu_destid
5 CONFIG += console verbose lpp_dpu_destid cpu_usage_report
6 CONFIG -= qt
6 CONFIG -= qt
7
7
8 include(./sparc.pri)
8 include(./sparc.pri)
@@ -12,11 +12,11 SWVERSION=-1-0
12 DEFINES += SW_VERSION_N1=3 # major
12 DEFINES += SW_VERSION_N1=3 # major
13 DEFINES += SW_VERSION_N2=0 # minor
13 DEFINES += SW_VERSION_N2=0 # minor
14 DEFINES += SW_VERSION_N3=0 # patch
14 DEFINES += SW_VERSION_N3=0 # patch
15 DEFINES += SW_VERSION_N4=11 # internal
15 DEFINES += SW_VERSION_N4=12 # internal
16
16
17 # <GCOV>
17 # <GCOV>
18 QMAKE_CFLAGS_RELEASE += -fprofile-arcs -ftest-coverage
18 #QMAKE_CFLAGS_RELEASE += -fprofile-arcs -ftest-coverage
19 LIBS += -lgcov /opt/GCOV/01A/lib/overload.o -lc
19 #LIBS += -lgcov /opt/GCOV/01A/lib/overload.o -lc
20 # </GCOV>
20 # </GCOV>
21
21
22 # <CHANGE BEFORE FLIGHT>
22 # <CHANGE BEFORE FLIGHT>
@@ -320,9 +320,9 void ASM_convert( volatile float *input_
320
320
321 void ASM_compress_reorganize_and_divide_mask(float *averaged_spec_mat, float *compressed_spec_mat,
321 void ASM_compress_reorganize_and_divide_mask(float *averaged_spec_mat, float *compressed_spec_mat,
322 float divider,
322 float divider,
323 unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage , unsigned char ASMIndexStart);
323 unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage , unsigned char ASMIndexStart, unsigned char channel);
324
324
325 int getFBinMask(int k);
325 int getFBinMask(int k, unsigned char channel);
326
326
327 void init_kcoeff_sbm_from_kcoeff_norm( float *input_kcoeff, float *output_kcoeff, unsigned char nb_bins_norm);
327 void init_kcoeff_sbm_from_kcoeff_norm( float *input_kcoeff, float *output_kcoeff, unsigned char nb_bins_norm);
328
328
@@ -274,10 +274,10 rtems_task prc0_task( rtems_task_argumen
274 {
274 {
275 sid = getSID( incomingMsg->event );
275 sid = getSID( incomingMsg->event );
276 // 1) compress the matrix for Basic Parameters calculation
276 // 1) compress the matrix for Basic Parameters calculation
277 ASM_compress_reorganize_and_divide( asm_f0_patched_burst_sbm, compressed_sm_sbm_f0,
277 ASM_compress_reorganize_and_divide_mask( asm_f0_patched_burst_sbm, compressed_sm_sbm_f0,
278 nb_sm_before_f0.burst_sbm_bp1,
278 nb_sm_before_f0.burst_sbm_bp1,
279 NB_BINS_COMPRESSED_SM_SBM_F0, NB_BINS_TO_AVERAGE_ASM_SBM_F0,
279 NB_BINS_COMPRESSED_SM_SBM_F0, NB_BINS_TO_AVERAGE_ASM_SBM_F0,
280 ASM_F0_INDICE_START);
280 ASM_F0_INDICE_START, CHANNELF0);
281 // 2) compute the BP1 set
281 // 2) compute the BP1 set
282 BP1_set( compressed_sm_sbm_f0, k_coeff_intercalib_f0_sbm, NB_BINS_COMPRESSED_SM_SBM_F0, packet_sbm_bp1.data );
282 BP1_set( compressed_sm_sbm_f0, k_coeff_intercalib_f0_sbm, NB_BINS_COMPRESSED_SM_SBM_F0, packet_sbm_bp1.data );
283 // 3) send the BP1 set
283 // 3) send the BP1 set
@@ -312,10 +312,10 rtems_task prc0_task( rtems_task_argumen
312 if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F0)
312 if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F0)
313 {
313 {
314 // 1) compress the matrix for Basic Parameters calculation
314 // 1) compress the matrix for Basic Parameters calculation
315 ASM_compress_reorganize_and_divide( asm_f0_patched_norm, compressed_sm_norm_f0,
315 ASM_compress_reorganize_and_divide_mask( asm_f0_patched_norm, compressed_sm_norm_f0,
316 nb_sm_before_f0.norm_bp1,
316 nb_sm_before_f0.norm_bp1,
317 NB_BINS_COMPRESSED_SM_F0, NB_BINS_TO_AVERAGE_ASM_F0,
317 NB_BINS_COMPRESSED_SM_F0, NB_BINS_TO_AVERAGE_ASM_F0,
318 ASM_F0_INDICE_START );
318 ASM_F0_INDICE_START, CHANNELF0 );
319 // 2) compute the BP1 set
319 // 2) compute the BP1 set
320 BP1_set( compressed_sm_norm_f0, k_coeff_intercalib_f0_norm, NB_BINS_COMPRESSED_SM_F0, packet_norm_bp1.data );
320 BP1_set( compressed_sm_norm_f0, k_coeff_intercalib_f0_norm, NB_BINS_COMPRESSED_SM_F0, packet_norm_bp1.data );
321 // 3) send the BP1 set
321 // 3) send the BP1 set
@@ -269,10 +269,10 rtems_task prc1_task( rtems_task_argumen
269 {
269 {
270 sid = getSID( incomingMsg->event );
270 sid = getSID( incomingMsg->event );
271 // 1) compress the matrix for Basic Parameters calculation
271 // 1) compress the matrix for Basic Parameters calculation
272 ASM_compress_reorganize_and_divide( asm_f1_patched_burst_sbm, compressed_sm_sbm_f1,
272 ASM_compress_reorganize_and_divide_mask( asm_f1_patched_burst_sbm, compressed_sm_sbm_f1,
273 nb_sm_before_f1.burst_sbm_bp1,
273 nb_sm_before_f1.burst_sbm_bp1,
274 NB_BINS_COMPRESSED_SM_SBM_F1, NB_BINS_TO_AVERAGE_ASM_SBM_F1,
274 NB_BINS_COMPRESSED_SM_SBM_F1, NB_BINS_TO_AVERAGE_ASM_SBM_F1,
275 ASM_F1_INDICE_START);
275 ASM_F1_INDICE_START, CHANNELF1);
276 // 2) compute the BP1 set
276 // 2) compute the BP1 set
277 BP1_set( compressed_sm_sbm_f1, k_coeff_intercalib_f1_sbm, NB_BINS_COMPRESSED_SM_SBM_F1, packet_sbm_bp1.data );
277 BP1_set( compressed_sm_sbm_f1, k_coeff_intercalib_f1_sbm, NB_BINS_COMPRESSED_SM_SBM_F1, packet_sbm_bp1.data );
278 // 3) send the BP1 set
278 // 3) send the BP1 set
@@ -307,10 +307,10 rtems_task prc1_task( rtems_task_argumen
307 if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F1)
307 if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F1)
308 {
308 {
309 // 1) compress the matrix for Basic Parameters calculation
309 // 1) compress the matrix for Basic Parameters calculation
310 ASM_compress_reorganize_and_divide( asm_f1_patched_norm, compressed_sm_norm_f1,
310 ASM_compress_reorganize_and_divide_mask( asm_f1_patched_norm, compressed_sm_norm_f1,
311 nb_sm_before_f1.norm_bp1,
311 nb_sm_before_f1.norm_bp1,
312 NB_BINS_COMPRESSED_SM_F1, NB_BINS_TO_AVERAGE_ASM_F1,
312 NB_BINS_COMPRESSED_SM_F1, NB_BINS_TO_AVERAGE_ASM_F1,
313 ASM_F1_INDICE_START );
313 ASM_F1_INDICE_START, CHANNELF1 );
314 // 2) compute the BP1 set
314 // 2) compute the BP1 set
315 BP1_set( compressed_sm_norm_f1, k_coeff_intercalib_f1_norm, NB_BINS_COMPRESSED_SM_F1, packet_norm_bp1.data );
315 BP1_set( compressed_sm_norm_f1, k_coeff_intercalib_f1_norm, NB_BINS_COMPRESSED_SM_F1, packet_norm_bp1.data );
316 // 3) send the BP1 set
316 // 3) send the BP1 set
@@ -188,10 +188,10 rtems_task prc2_task( rtems_task_argumen
188 //*****
188 //*****
189 //*****
189 //*****
190 // 1) compress the matrix for Basic Parameters calculation
190 // 1) compress the matrix for Basic Parameters calculation
191 ASM_compress_reorganize_and_divide( asm_f2_patched_norm, compressed_sm_norm_f2,
191 ASM_compress_reorganize_and_divide_mask( asm_f2_patched_norm, compressed_sm_norm_f2,
192 nb_sm_before_f2.norm_bp1,
192 nb_sm_before_f2.norm_bp1,
193 NB_BINS_COMPRESSED_SM_F2, NB_BINS_TO_AVERAGE_ASM_F2,
193 NB_BINS_COMPRESSED_SM_F2, NB_BINS_TO_AVERAGE_ASM_F2,
194 ASM_F2_INDICE_START );
194 ASM_F2_INDICE_START, CHANNELF2 );
195 // BP1_F2
195 // BP1_F2
196 if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F2)
196 if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F2)
197 {
197 {
@@ -589,7 +589,9 void ASM_patch( float *inputASM, float *
589 }
589 }
590
590
591 void ASM_compress_reorganize_and_divide_mask(float *averaged_spec_mat, float *compressed_spec_mat , float divider,
591 void ASM_compress_reorganize_and_divide_mask(float *averaged_spec_mat, float *compressed_spec_mat , float divider,
592 unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage, unsigned char ASMIndexStart )
592 unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage,
593 unsigned char ASMIndexStart,
594 unsigned char channel )
593 {
595 {
594 //*************
596 //*************
595 // input format
597 // input format
@@ -627,7 +629,7 void ASM_compress_reorganize_and_divide_
627 compressed_spec_mat[ offsetCompressed ] = 0;
629 compressed_spec_mat[ offsetCompressed ] = 0;
628 for ( k = 0; k < nbBinsToAverage; k++ )
630 for ( k = 0; k < nbBinsToAverage; k++ )
629 {
631 {
630 fBinMask = getFBinMask( offsetFBin + k );
632 fBinMask = getFBinMask( offsetFBin + k, channel );
631 compressed_spec_mat[offsetCompressed ] =
633 compressed_spec_mat[offsetCompressed ] =
632 ( compressed_spec_mat[ offsetCompressed ]
634 ( compressed_spec_mat[ offsetCompressed ]
633 + averaged_spec_mat[ offsetASM + k ] * fBinMask );
635 + averaged_spec_mat[ offsetASM + k ] * fBinMask );
@@ -639,16 +641,34 void ASM_compress_reorganize_and_divide_
639
641
640 }
642 }
641
643
642 int getFBinMask( int index )
644 int getFBinMask( int index, unsigned char channel )
643 {
645 {
644 unsigned int indexInChar;
646 unsigned int indexInChar;
645 unsigned int indexInTheChar;
647 unsigned int indexInTheChar;
646 int fbin;
648 int fbin;
649 unsigned char *sy_lfr_fbins_fx_word1;
650
651 sy_lfr_fbins_fx_word1 = parameter_dump_packet.sy_lfr_fbins_f0_word1;
652
653 switch(channel)
654 {
655 case 0:
656 sy_lfr_fbins_fx_word1 = parameter_dump_packet.sy_lfr_fbins_f0_word1;
657 break;
658 case 1:
659 sy_lfr_fbins_fx_word1 = parameter_dump_packet.sy_lfr_fbins_f1_word1;
660 break;
661 case 2:
662 sy_lfr_fbins_fx_word1 = parameter_dump_packet.sy_lfr_fbins_f2_word1;
663 break;
664 default:
665 PRINTF("ERR *** in getFBinMask, wrong frequency channel")
666 }
647
667
648 indexInChar = index >> 3;
668 indexInChar = index >> 3;
649 indexInTheChar = index - indexInChar * 8;
669 indexInTheChar = index - indexInChar * 8;
650
670
651 fbin = (int) ((parameter_dump_packet.sy_lfr_fbins_f0_word1[ NB_BYTES_PER_FREQ_MASK - 1 - indexInChar] >> indexInTheChar) & 0x1);
671 fbin = (int) ((sy_lfr_fbins_fx_word1[ NB_BYTES_PER_FREQ_MASK - 1 - indexInChar] >> indexInTheChar) & 0x1);
652
672
653 return fbin;
673 return fbin;
654 }
674 }
General Comments 0
You need to be logged in to leave comments. Login now