Main Content

Check safety-related diagnostic settings for data store memory

mathworks.hism.hisl_0013

Dependencies: Simulink® Check™

Usage: High-Integrity System Modeling

Guideline: hisl_0013: Usage of data store memory

Description

Use this check to verify that model diagnostic configuration parameters pertaining to data store memory are set optimally for generating code for a safety-related application.

Recommended Actions and Results

Review the violations that are flagged by the check and the recommended action for fixing the issue. After applying the changes, save the model and rerun the check analysis.

You can use the Fix button to allow the Model Advisor to fix all flagged violations. For this check, the Model Advisor configures model diagnostic settings that apply to function-call connectivity and that can impact safety.

Modeling ConditionRecommended Action
The diagnostic that detects whether the model attempts to read data from a data store in which it has not stored data in the current time step is set to a value other than Enable all as errors. Reading data before it is written can result in use of stale data or data that is not initialized.

In the Configuration Parameters dialog box, set to Detect read before write Enable all as errors or set the parameter ReadBeforeWriteMsg to "Enable all as errors".

The diagnostic that detects whether the model attempts to store data in a data store, after previously reading data from it in the current time step is set to a value other than Enable all as errors. Writing data after it is read can result in use of stale or incorrect data. In the Configuration Parameters dialog box, set Detect write after read to Enable all as errors or set the parameter WriteAfterReadMsg to "Enable all as errors".
The diagnostic that detects whether the model attempts to store data in a data store twice in succession in the current time step is set to a value other than Enable all as errors. Writing data twice in one time step can result in unpredictable data. In the Configuration Parameters dialog box, set Multitask data store to error or set the parameter MultiTaskDSMMsg to "error".
The diagnostic detects that the parameter Duplicate data store names is not set to error.In the Configuration Parameters dialog box, set Duplicate data store names to error or set the parameter UniqueDataStoreMsg to "error".

Capabilities and Limitations

  • Does not run on library models

  • Does not allow exclusions of blocks or charts

  • Does not require model compilation

Version History

Introduced in R2017b