Main Content

cgsl_0411: Access nonvolatile memory by using Initialize Function and Terminate Function blocks

ID: Title0411: Access nonvolatile memory by using Initialize Function and Terminate Function blocks
DescriptionTo model the Direct Access data communication method to target platform nonvolatile memory:
AAt the root-level of the component, use the Initialize Function block to read data and the Terminate Function block to write data.
BConfigure the root-level ports to use the Direct Access data communication method.
Notes

When accessing nonvolatile memory during function execution, see guideline cgsl_0406: Data send for component deployment and cgsl_0405: Data receive for component deployment.

When you need to access nonvolatile memory by using a service provided by the target environment, use a client-server interface approach for modeling the interface. With that approach you represent the target environment service that provides access to nonvolatile memory by using a Simulink Function block and access the service by using the Function Caller block. For more information, see Nonvolatile Memory Interfaces (Embedded Coder).

Rationale
  • Robust handling of data access by functions that execute concurrently.

  • Supports multiple instances of components.

Model Advisor CheckA Model Advisor check is not provided for this guideline.
Examples

Model uses Initialize and Terminate functions for accessing non-volatile memory

void CD_initialize(void)
.
.
.
    &(get_CD_initialize_input[))[0]
.
.
.
void CD_terminate(void)
{
  memcpy[&(getref_CD_terminate_OutBus_NVM[))[0]...
}

Version History

expand all

Introduced in R2022b