Why does Per Instance Memory not create an <INIT-VALUE> section in the generated ARXML?

3 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 Jun 2019
The behavior of data store memory PIM Initialization depends on the "NeedsNVRAMAccess" flag (you can set this property in the Property Inspector when you click on the data store entry in the Code mapping spreadsheet as seen in the following doc page for PIMs):
NeedsNVRAMAccess = false
  • We will just do normal Simulink initialization behavior for the data store memory block. This means that if there is a non-zero initial value we will write the initial value to the PIM in the model_initialize function.
"NeedsNVRAMAccess" is set to true (meaning the PIM is really a NVRAM mirror)
  • We will eliminate initialization code for this even if it is a non-zero value, since this would mistakenly overwrite a value read from NVRAM by the system on startup.
We don't write the <INIT-VALUE> parameter into the generated ARXML for either case, since in the first case we are explicitly doing the initialization and the second case presumably the NVRAM service is handling the initialization.

More Answers (0)

Categories

Find more on Component-Based Modeling in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!