ID: Title | hisl_0013: Usage of data store blocks | ||
---|---|---|---|
Description | To support deterministic behavior across different sample times or models when using data store blocks, including Data Store Memory, Data Store Read, and Data Store Write: | ||
A | In the Configuration Parameters dialog box, on the Diagnostics > Data Validity pane, set the Data Store Memory block
parameters to
| ||
B | Avoid data store reads and writes that occur across model and atomic subsystem boundaries. | ||
C | Avoid using data stores to write and read data at different rates, because different rates can result in inconsistent exchanges of data. To provide deterministic data coupling in multirate systems, use Rate Transition blocks before Data Store Write blocks, or after Data Store Read blocks. | ||
Notes | The sorting algorithm in Simulink® does not take into account data coupling between models and atomic subsystems. Using data store memory blocks can have significant impact on your software verification effort. Models and subsystems that use only inports and outports to pass data provide a directly traceable interface, simplifying the verification process. | ||
Rationale | A, B, C | Support consistent data values across different sample times or models. | |
Model Advisor Checks |
For more details, see Check safety-related diagnostic settings for data store memory (Simulink Check). | ||
References |
| ||
Last Changed | R2017b | ||
Examples | The following examples use Rate Transition blocks to provide deterministic data coupling in multirate systems
|
ID: Title | hisl_0015: Usage of Merge blocks | ||
---|---|---|---|
Description | To support unambiguous behavior from Merge blocks, | ||
A | Use Merge blocks only with conditionally executed subsystems. | ||
B | Specify execution of the conditionally executed subsystems such that only one subsystem executes during a time step. | ||
C | Clear block parameter Allow unequal port widths. | ||
D | Set the Outport block parameter
Output when disabled to
held for each conditionally executed
subsystem being merged. | ||
Notes | Simulink combines the inputs of the Merge block into a single output. The output value at any time is equal to the most recently computed output of the blocks that drive the Merge block. Therefore, the Merge block output is dependent upon the execution order of the input computations. To provide predictable behavior of the Merge block output, you must have mutual exclusion between the conditionally executed subsystems feeding a Merge block. Merge block
parameter Allow unequal port widths is only
available when configuration parameter Underspecified
initialization detection is set to
| ||
Prerequisites | hisl_0303: Configuration Parameters > Diagnostics > Merge block hisl_0304: Configuration Parameters > Diagnostics > Model initialization | ||
Rationale | A, B, C, D | Avoid unambiguous behavior. | |
Model Advisor Checks |
For check details, see Check usage of Merge blocks (Simulink Check). | ||
References |
| ||
See Also | Merge block in the Simulink documentation | ||
Last Changed | R2018b | ||
Examples | Recommended | ||
Not Recommended |
ID: Title | hisl_0021: Consistent vector indexing method | ||
---|---|---|---|
Description | Within a model, use: | ||
A | Consistent vector indexing method. Supports configurable indexing:
Support only one-based indexing:
Supports only zero-based indexing:
| ||
Rationale | A | Reduce the risk of introducing errors due to inconsistent indexing. | |
Model Advisor Checks |
For check details, see Check for inconsistent vector indexing methods (Simulink Check). | ||
References |
| ||
See Also | cgsl_0101: Zero-based indexing | ||
Last Changed | R2019a |
ID: Title | hisl_0022: Data type selection for index signals | ||
---|---|---|---|
Description | For index signals, use: | ||
A | An integer or enumerated data type | ||
B | A data type that covers the range of indexed values. | ||
Blocks that use a signal index include:
| |||
Rationale | A | Prevent unexpected results that can occur with rounding operations for floating-point data types. | |
B | Enable access to data in a vector. | ||
Model Advisor Checks |
For check details, see Check data types for blocks with index signals (Simulink Check). | ||
References |
| ||
Last Changed | R2018b |
ID: Title | hisl_0023: Verification of model and subsystem variants | ||
---|---|---|---|
Description | When verifying that a model is consistent with generated code, do the following: | ||
A | For each Model Variant block, clear block parameter Generate preprocessor conditionals. | ||
B | For each Variant Subsystem block, clear block parameter Analyze all choices during update diagram and generate preprocessor conditionals. | ||
C | Verify combinations of model variants that might be active in the generated code. | ||
Rationale | A,B | Simplify consistency testing between the model and generated code by restricting the code base to a single variant. | |
C | Verify that consistency testing between the model and generated code is complete for variants. | ||
Model Advisor Checks |
For check details, see Check for variant blocks with 'Generate preprocessor conditionals' active (Simulink Check). | ||
References |
| ||
Last Changed | R2017b |
ID: Title | hisl_0034: Usage of Signal Routing blocks | |
---|---|---|
Description | When using Switch blocks, avoid
comparisons using the | |
Note | Due to floating-point
precision issues, do not test floating-point expressions for inequality
( When the model contains a Switch block
computing a relational operator with the | |
Rationale | Improve model robustness. | |
Model Advisor Checks |
For check details, see Check usage of Signal Routing blocks (Simulink Check). | |
References |
| |
Last Changed | R2017b |