Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework cFE/PSP CDS interface to improve real hardware support/performance #1404

Open
skliper opened this issue Apr 21, 2021 · 0 comments
Open

Comments

@skliper
Copy link
Contributor

skliper commented Apr 21, 2021

Is your feature request related to a problem? Please describe.
Currently implementation of critical data store (CDS) includes a CFE_ES_ClearCDS function that writes uint32[4] chucks to CDS in a loop to cover the entire area. This could be very inefficient and possibly use up write cycles on the hardware, vs allowing the PSP to implement a more hardware specific clear.

Status = CFE_ES_CDS_CachePreload(&CDS->Cache, NULL, 0, sizeof(CDS->Cache.Data.Zero));
/* While there is space to write another block of zeros, then do so */
while (CDS->Cache.Offset < CDS->TotalSize)
{
RemainSize = CDS->TotalSize - CDS->Cache.Offset;
if (RemainSize < sizeof(CDS->Cache.Data.Zero))
{
/* partial size */
CDS->Cache.Size = RemainSize;
}
Status = CFE_ES_CDS_CacheFlush(&CDS->Cache);
if (Status != CFE_SUCCESS)
{
break;
}
CDS->Cache.Offset += CDS->Cache.Size;
}

Describe the solution you'd like
Design/implementation review and update of the CDS interface (especially the cache), maybe the PSP should report/provide the appropriate cache size for efficient reading/writing.

Describe alternatives you've considered
Might be less an issue and more just performance wrt modern storage, but EEPROM or similar would suffer using current scheme.

Additional context
From code review follow on discussions.

Requester Info
Jacob Hageman - NASA/GSFC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant