Check safety-related code generation settings for comments
Check ID:
mathworks.hism.hisl_0038
Check model configuration for code generation settings that can impact safety.
Description
This check verifies that model configuration parameters for code generation are set optimally for a safety-related application.
This check requires Simulink® Check™ license.
Results and Recommended Actions
Condition | Recommended Action |
---|---|
The option to include comments in the generated code is cleared. Comments provide good traceability between the code and the model. | Select configuration parameter Include comments (Simulink Coder). |
The option to include comments that describe the code for blocks is cleared. Comments provide good traceability between the code and the model. | Select configuration parameter Simulink block comments (Simulink Coder). |
The option to include comments that describe the code for blocks eliminated from a model is cleared. Comments provide good traceability between the code and the model. | Select configuration parameter Show eliminated blocks (Simulink Coder). |
The option to include the names of parameter variables and source
blocks as comments in the model parameter structure declaration in
is
cleared. Comments provide good traceability between the code and the
model. | Select configuration parameter Verbose comments for 'Model default' storage class (Simulink Coder). |
The option to include requirement descriptions assigned to Simulink blocks as comments is cleared. Comments provide good traceability between the code and the model. | Select configuration parameter Requirements in block comments (Embedded Coder). |
The option to include Stateflow® object comments is cleared. Comments provide good traceability between the code and the model. Requires Stateflow license. | Select configuration parameter Stateflow object comments (Simulink Coder). |
The option to include MATLAB® source code as comments is cleared. Comments provide good traceability between the code and the model. Requires Stateflow license. | Select configuration parameter MATLAB source code as comments (Simulink Coder) |
Capabilities and Limitations
Does not run on library models.
Does not allow exclusions of blocks or charts.
Provides auto fix option.
Does not highlight parameter names in report without Embedded Coder®.
Revision History
R2024a - Added configuration parameters Stateflow object comments (Simulink Coder) and MATLAB source code as comments (Simulink Coder).
See Also
hisl_0038: Configuration Parameters > Code Generation > Comments
Model Configuration Parameters: Comments (Simulink Coder)
Model Configuration Parameters: Code Generation Identifiers (Simulink Coder)
Model Configuration Parameters: Code Generation Interface (Simulink Coder)
Model Configuration Parameters: Code Style (Embedded Coder)