##// END OF EJS Templates
begin to work on:...
paul -
r353:06a7ca24f3e7 R3++ draft
parent child
Show More
@@ -1,2 +1,2
1 1 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters
2 7ee7da2ed42fbc9cd673ae7f3a865345cea0f83f header/lfr_common_headers
2 5dfc0745a617f0b14b9b4c6d6c12d01f1fb9a801 header/lfr_common_headers
@@ -720,14 +720,14 int getFBinMask( int index, unsigned cha
720 720
721 721 unsigned char acquisitionTimeIsValid( unsigned int coarseTime, unsigned int fineTime, unsigned char channel)
722 722 {
723 u_int64_t acquisitionTimeStart;
724 u_int64_t acquisitionTimeStop;
723 u_int64_t acquisitionTStart;
724 u_int64_t acquisitionTStop;
725 725 u_int64_t timecodeReference;
726 726 u_int64_t offsetInFineTime;
727 727 u_int64_t shiftInFineTime;
728 728 u_int64_t tBadInFineTime;
729 u_int64_t acquisitionTimeRangeMin;
730 u_int64_t acquisitionTimeRangeMax;
729 u_int64_t perturbationTStart;
730 u_int64_t perturbationTStop;
731 731 unsigned char pasFilteringIsEnabled;
732 732 unsigned char ret;
733 733
@@ -735,18 +735,18 unsigned char acquisitionTimeIsValid( un
735 735 ret = 1;
736 736
737 737 // compute acquisition time from caoarseTime and fineTime
738 acquisitionTimeStart = ( ((u_int64_t)coarseTime) << SHIFT_2_BYTES )
738 acquisitionTStart = ( ((u_int64_t)coarseTime) << SHIFT_2_BYTES )
739 739 + (u_int64_t) fineTime;
740 740 switch(channel)
741 741 {
742 742 case CHANNELF0:
743 acquisitionTimeStop = acquisitionTimeStart + FINETIME_PER_SM_F0;
743 acquisitionTStop = acquisitionTStart + ACQUISITION_DURATION_F0;
744 744 break;
745 745 case CHANNELF1:
746 acquisitionTimeStop = acquisitionTimeStart + FINETIME_PER_SM_F1;
746 acquisitionTStop = acquisitionTStart + ACQUISITION_DURATION_F1;
747 747 break;
748 748 case CHANNELF2:
749 acquisitionTimeStop = acquisitionTimeStart + FINETIME_PER_SM_F2;
749 acquisitionTStop = acquisitionTStart + ACQUISITION_DURATION_F2;
750 750 break;
751 751 }
752 752
@@ -759,20 +759,19 unsigned char acquisitionTimeIsValid( un
759 759 shiftInFineTime = ((double) filterPar.sy_lfr_pas_filter_shift) * CONST_65536;
760 760 tBadInFineTime = ((double) filterPar.sy_lfr_pas_filter_tbad) * CONST_65536;
761 761
762 acquisitionTimeRangeMin =
762 perturbationTStart =
763 763 timecodeReference
764 764 + offsetInFineTime
765 + shiftInFineTime
766 - acquisitionDurations[channel];
765 + shiftInFineTime;
767 766
768 acquisitionTimeRangeMax =
767 perturbationTStop =
769 768 timecodeReference
770 769 + offsetInFineTime
771 770 + shiftInFineTime
772 771 + tBadInFineTime;
773 772
774 if ( (acquisitionTimeStart >= acquisitionTimeRangeMin)
775 && (acquisitionTimeStart <= acquisitionTimeRangeMax)
773 if ( (acquisitionTStart >= perturbationTStart)
774 && (acquisitionTStart <= perturbationTStop)
776 775 && (pasFilteringIsEnabled == 1) )
777 776 {
778 777 ret = 0; // the acquisition time is INSIDE the range, the matrix shall be ignored
@@ -785,8 +784,8 unsigned char acquisitionTimeIsValid( un
785 784 // the last sample of the data used to compute the matrix shall not be INSIDE the range, test it now, it depends on the channel
786 785 if (ret == 1)
787 786 {
788 if ( (acquisitionTimeStop >= acquisitionTimeRangeMin)
789 && (acquisitionTimeStop <= acquisitionTimeRangeMax)
787 if ( (acquisitionTStop >= perturbationTStart)
788 && (acquisitionTStop <= perturbationTStop)
790 789 && (pasFilteringIsEnabled == 1) )
791 790 {
792 791 ret = 0; // the acquisition time is INSIDE the range, the matrix shall be ignored
General Comments 1
note

Voici un petit patch pour ajouter gcov:

diff -r 06a7ca24f3e7 sparc/sparc-rtems.cmake
--- a/sparc/sparc-rtems.cmake   Fri Mar 17 13:58:02 2017 +0100
+++ b/sparc/sparc-rtems.cmake   Fri Mar 17 15:48:21 2017 +0100
@@ -3,7 +3,17 @@
 set(CMAKE_C_COMPILER /opt/rtems-4.10/bin/sparc-rtems-gcc)
 set(CMAKE_CXX_COMPILER /opt/rtems-4.10/bin/sparc-rtems-g++)
 set(CMAKE_LINKER  /opt/rtems-4.10/bin/sparc-rtems-g++)
-SET(CMAKE_EXE_LINKER_FLAGS "-static")
-set(CMAKE_C_FLAGS_RELEASE "-O3 -mfix-b2bst")
+
+
+option(SPARC_RTEMS_GCOV "Enable code coverage" OFF)
+
+if(SPARC_RTEMS_GCOV)
+        set(CMAKE_C_FLAGS_RELEASE "-O3 -mfix-b2bst --coverage")
+        set(CMAKE_EXE_LINKER_FLAGS " -lgcov /opt/GCOV/01A/lib/overload.o -lc")
+else()
+        set(CMAKE_EXE_LINKER_FLAGS "-static")
+        set(CMAKE_C_FLAGS_RELEASE "-O3 -mfix-b2bst")
+endif()
+
 set(CMAKE_C_LINK_EXECUTABLE  "<CMAKE_LINKER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
 include_directories("/opt/rtems-4.10/sparc-rtems/leon3/lib/include")
You need to be logged in to leave comments. Login now