Main Content

Check for usage of Data Store Memory blocks

Check ID: mathworks.jmaab.jc_0161

Guideline: jc_0161: Definition of Data Store Memory blocks

Description

Checks if the Data Store Memory block adheres to the following guideline standards.

  • Data Store Memory blocks must be used only if the block data is used for code generation or execution.

  • Data Store Memory blocks must be defined at smallest scope level.

    For example, consider a model that contains subsystem A, which contains two subsystems, B and C. If you add a Data Store Read block to subsystem B and a Data Store Write block to subsystem C, you must add a Data Store Memory block to subsystem A, which is the smallest common scope for both blocks, and not at the model level.

Note

To access the Data Store Memory block, you can place the Data Store Read and Data Store Write blocks in the same subsystem or levels below in the model hierarchy. The models that violate this are not in the scope of this check.

This check requires a Simulink® Check™ license.

Check Parameterization

This check contains sub-checks that correspond to sub IDs specified in the MAB and JMAAB modeling guidelines. You can use the Model Advisor Configuration Editor to specify which sub IDs (one or multiple) to execute.

For reference, the MAB guideline sub ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:

  • NA-MAAB — No recommendations

  • JMAAB — a, b

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0161_a: Check Data Store Memory block definitionOne or more Data Store Memory blocks in the model are not defined at smallest scope level.Move the Data Store Memory blocks to smallest scope level.
jc_0161_b: Check usage of data in Data Store Memory blockData in some Data Store Memory blocks in the model are not used for execution and code generation.Use Data Store Memory blocks only if its data is used for code generation or execution.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Allows exclusions.

See Also