Main Content

Model AUTOSAR Adaptive Persistent Memory

To model adaptive persistent memory in Simulink®, you can:

  • Create AUTOSAR persistency provided-required ports, persistency key value interfaces, and key value interface data elements.

  • Create data stores and map them to AUTOSAR persistency ports and data elements.

If you have Simulink Coder™ and Embedded Coder® software, you can generate C++ code and ARXML descriptions for AUTOSAR persistent memory artifacts.

To implement adaptive persistent memory in Simulink:

  1. Open a model configured for the AUTOSAR Adaptive Platform.

  2. Open the AUTOSAR Dictionary and select Persistency Key Value Interfaces. To create an AUTOSAR persistency key value interface, click the Add button . In the Add Interfaces dialog box, specify the interface name and the number of associated data elements.

  3. Expand the Persistency Key Value Interfaces node. Expand the new key value interface and select DataElements. In the data elements view, select each data element and configure its name.

  4. At the top level of the AUTOSAR Dictionary, expand AdaptiveApplications and expand the adaptive software component. Use the PersistencyProvidedRequiredPorts view to add AUTOSAR persistency provided-required ports that you want to associate with the new persistency key value interface.

  5. In the model window, to model AUTOSAR adaptive persistency, add data store memory blocks.

  6. Open the Code Mappings editor. Use the Data Stores tab to map Simulink data store memory blocks to Persistency.

  7. For each data store memory, select an AUTOSAR persistency provided-required port and an AUTOSAR persistency key value interface data element.

  8. To programmatically map a data store and select port and data element for the data store, you can use the mapDataStore function.

  9. After validating the adaptive component model configuration, you can simulate or generate code for AUTOSAR adaptive persistent memory.

See Also

|

Related Topics