Fix #266, psp module to implement timebase#285
Merged
jphickey merged 1 commit intonasa:integration-candidatefrom Apr 7, 2021
Merged
Fix #266, psp module to implement timebase#285jphickey merged 1 commit intonasa:integration-candidatefrom
jphickey merged 1 commit intonasa:integration-candidatefrom
Conversation
7526dfd to
0dc1cf0
Compare
Contributor
Author
|
The build failure here is because it depends on a fix currently in #282. Once merged together it builds fine. |
Clarifies the use case for CFE_PSP_GetTime and CFE_PSP_GetTimeBase. Moves the implementation of these to separate PSP modules, so MCP750 on VxWorks can use the optimized vxTimeBaseGet() routine while Linux and RTEMS can use the generic posix CLOCK_MONOTONIC.
0dc1cf0 to
fc6e9b2
Compare
Contributor
Author
|
Update to remove some leftover commented code. |
Contributor
|
@jphickey can you fix the conflicts here? |
jphickey
added a commit
that referenced
this pull request
Apr 7, 2021
Fix #266, psp module to implement timebase
Contributor
Author
Fixed! |
astrogeco
added a commit
to nasa/cFS
that referenced
this pull request
Apr 8, 2021
Combines: nasa/cFE#1284 nasa/osal#951 nasa/PSP#289 Including: nasa/cFE#1251 - ES Info API Functional test nasa/osal#931 - Scrub include guards nasa/osal#937 - Switch to use CLOCK_REALTIME nasa/osal#938 - specify shell name in ShellOutputToFile nasa/PSP#286 - use OSAL timebase for CFE timers nasa/PSP#282 - modularize the ram, port, and eenasa/psp#om access nasa/PSP#285 - add psp module to implement timebase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the contribution
Implements two PSP modules to provide CFE_PSP_GetTime and CFE_PSP_GetTimeBase, one for POSIX-compliant RTOS using
clock_gettime()and the other specifically for PowerPC processors on VxWorks that have thevxTimeBaseGet()routine.This also clarifies and documents the difference/use cases for CFE_PSP_GetTime and CFE_PSP_GetTimeBase.
Finally this includes a coverage test for the VxWorks PSP timebase module, providing an example of how this can be implemented for other modules.
Fixes #266
Testing performed
Build and sanity check CFE, run all unit tests
Confirmed timebase operation on MCP750
Expected behavior changes
No impact to behavior
System(s) tested on
Ubuntu 20.04
MCP750 / vxworks 6.9
Additional context
This included a fair bit of investigation as to what the CFE_PSP_GetTime and CFE_PSP_Get_Timebase functions actually do on MCP750, and why they both exist to begin with.
For compatibility, this keeps things mostly as they were as far as API goes (i.e. neither function is removed/deprecated at this time). However now that it is documented what the difference between these functions is, CFE should probably focus on using only CFE_PSP_GetTime() since it is more platform-agnostic. Once existing use cases of CFE_PSP_Get_Timebase() have been transitioned away, it would be a good idea to deprecate it.
When using this implementation the time reported by CFE_PSP_GetTime() is sourced by the same underlying function as CFE_PSP_Get_Timebase() uses. It no longer uses the separate countdown timer within the Raven PCI device on the MCP750.
This should be more efficient because vxTimeBaseGet() simply reads a local CPU register, whereas reading the Raven register requires PCI access and obscure conversion logic. The other benefit is that it does not wrap every 27 seconds, thereby allowing CFE time to be simplified at a future date, too.
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.