Project

General

Profile

User story #127

Updated by André Neto over 9 years ago

Implement requirement MARTe-EX-F-1.1.13 based on the original MARTe implementation

Note: One of the most portable ways to measure time with high accuracy is to use the high resolution timer counter.

h1. Source code files modified

* Source/Core/L0Portability/HighResolutionTimer.h
* Source/Core/L0Portability/HighResolutionTimer.cpp
* Source/Core/L0Portability/OperatingSystem/Linux/HighResolutionTimerOS.h
* Source/Core/L0Portability/OperatingSystem/Windows/HighResolutionTimerOS.h
* Source/Core/L0Portability/OperatingSystem/Linux/HighResolutionTimerCalibratorOS.h
* Source/Core/L0Portability/OperatingSystem/Linux/HighResolutionTimerCalibratorOS.cpp
* Source/Core/L0Portability/OperatingSystem/Windows/HighResolutionTimerCalibratorOS.h
* Source/Core/L0Portability/OperatingSystem/Windows/HighResolutionTimerCalibratorOS.cpp
* Source/Core/L0Portability/Architecture/x86_gcc/HighResolutionTimerA.h
* Source/Core/L0Portability/Architecture/x86_cl/HighResolutionTimerA.h

h1. Architecture & design review

*Date of the review:* 12/06/2015

*Person who did the review:* André Neto

*Version of architecture & design document:* N/A. As per the original MARTe implementation, this is a support function and does not require formal design in UML.

*Result of review:* N/A

*List of non-conformities:* N/A

h1. Code and documentation review

*Date of the review:* 01/07/2015

*Person who did the review:* Ivan Herrero

*Result of review:* PASS

*List of non-conformities:* N/A

h1. Unit test review

*Date of the review:* 23/07/2015

*Person who did the review:* Ivan Herrero

*Result of coverage tests review:* PASS

*Result of functional tests review:* PASS

*Result of review:* PASS

*List of non-conformities:* N/A

Notes: The class HighResolutionTimerCalibratorOS does not have a counterpart on L0, so it is not directly tested because the target of the unit tests are only the classes on L0. Nevertheless, all its methods has been tested indirectly through HighResolutionTimer, except GetInitialTime and GetInitialTicks.

Note: The tests for TestCounter, TestCounter32, and TestGetTimeStamp, sometimes pass and sometimes fail. The reason There is that the operating system dynamically changes the CPU frequency (for power-saving reasons). For this reason, the frequency retrieved by MARTe when the test start might not be the same as when the test executed, generating false errors. This can be resolved by issuing the following command in CentOS: @cpupower frequency-set -g performance@ no obvious pattern for it.

Note: The static declaration/definition of calibratedHighResolutionTimer (of type HighResolutionTimerCalibratorOS) will be refactored in next sprints.

Back