Attribute | Constraint | FATAL / Nonfatal | Compatibility Check |
---|---|---|---|
Unconnected objects | There must not be unconnected lines, input ports, or output ports in the model or subsystem. This helps prevent dead code and hidden ground blocks. | Nonfatal | Check for unconnected objects in the model |
Function specifications | The model cannot specify custom model entry function prototypes. The Configure arguments for Step function prototype setting in the Configure C Step Function Interface dialog box must be cleared. | Nonfatal | Check C Step Function Interface setting |
Conditional input branch execution | When the configuration parameter Conditional input branch execution is selected:
| Nonfatal | Check conditional input branch execution setting |
Unsupported blocks | There must not be blocks in the model that are not supported by Simulink® Code Inspector™. | Nonfatal | Check for unsupported blocks |
Storage classes for workspace variables |
The model cannot reference workspace variables that are not supported for either of these reasons:
| Nonfatal | Check storage class for workspace variables |
GetSet custom storage classes for workspace variables |
For workspace variables that use a
| Nonfatal | Check GetSet storage class for workspace variables |
Usage of sample times | The model cannot use continuous, asynchronous, explicit discrete partition, data driven, union, exported discrete, or variable sample times. | FATAL | Check for sample times in the model >Check sample times |
Explicit partitions | The model must not contain explicit partitions. | FATAL | Check for sample times in the model > Check for explicit partitions |
Automatic insertion of Signal Conversion blocks on signals entering block inports | Automatic insertion of a Signal Conversion block on a signal entering a block inport is not supported for code inspection. It creates a hidden Signal Conversion block, which is not supported for code inspection. | Nonfatal | Check for Signal Conversion blocks automatically inserted on signals entering block input ports > Verify no Signal Conversion blocks are automatically inserted on signals entering block inports |
Fixed-point instrumentation and block reduction both selected | Simultaneous use of fixed-point instrumentation and block reduction is not supported for code inspection. | Nonfatal | Check for usage of fixed-point instrumentation > Verify usage of fixed-point instrumentation |
Root Outport block sample times | Root Outport blocks must not be constant. This constraint prevents the root outport assignment from being moved to the model initialize function, which would cause the model functions to fail validation. | Nonfatal | Check usage of root Outport blocks > Verify sample times |
Root Output block bus passing method | A root Outport block that passes a bus to a parent model must
pass the bus as a structure. Otherwise, Simulink software might
insert a hidden Signal Conversion block in the parent model, which
is not supported for code inspection. For each instance, the Outport
block parameter Output as nonvirtual bus in parent model (BusOutputAsStruct )
must be selected. | Nonfatal | Check usage of root Outport blocks > Verify root Outports pass buses to parent models as structures |
Automatic virtual to nonvirtual bus conversion | Automatic conversion between virtual and nonvirtual buses is not supported for code inspection. It creates a hidden Signal Conversion block, which is not supported for code inspection. | FATAL | Check usage of buses > Check for automatic conversion between virtual to nonvirtual buses |
Block operations on a bus | A non-virtual block must not operate on a virtual bus and a Bus Assignment block must not operate on a non-virtual bus. This constraint simplifies bus processing to promote traceability and readability of generated code. | FATAL | Check usage of buses > Verify that blocks in the model do not perform unsupported operations on a bus |
Data type replacement | Replacement names in a Data Type Replacement table must be of type Simulink.AliasType. | Nonfatal | Check data type replacement names |
Sample times for model used as model reference target | Model used as model reference target must not have multiple sample times. | Nonfatal | Check for sample times in model used as model reference target |
Commented-out blocks | Model must not contain blocks that are commented out. | Nonfatal | Check model for commented out blocks |
Instrumented signals connect to automatically inserted blocks | Model must not contain instrumented signals that connect to automatically inserted blocks. | Nonfatal | Check model for instrumented signals that connect to automatically inserted blocks |
Function names for noninlined subsystems with void-void function call interfaces | In a model, noninlined subsystems with void-void function call interfaces must use unique function names. | FATAL | Check model for void_void subsystems that use the same function name |
Shared synthesized local data stores |
You must not use signal objects in the model workspace that are referenced as synthesized local data stores by Data Store Read or Data Store Write blocks. | Nonfatal | Check for usage of synthesized local data stores |
Reusable subsystems | Reusable subsystems with the same function interface must come from the same library blocks. | Nonfatal | Check model for reusable subsystems that use the same function interfaces |
Code Mapping settings | In the Code Mapping Editor, on the Data
Defaults tab under Code Mappings-C,
each model element category must use the | Nonfatal | Check for unsupported Code Mapping settings |
Code generation folder structure setting | In Simulink Preferences, on the General pane,
the Code generation folder structure option must be
set to | FATAL | Check the code generation folder structure for the model |
Graphical sorted order | The compiled block list of a model must match the graphical block sorted order. | Nonfatal | Check model for compiled and graphical block sorted order |
Code generation symbols settings for shared utilities | For inspection of shared utilities, Local temporary
variables (Embedded Coder) must be set to default value
$N$M and Shared utilities identifier
format (Embedded Coder) must be set to default value
$N$C . | Nonfatal | Check usage of shared utilities > Check code generation symbols settings for shared utils inspection |
Standard math library setting for shared utilities | For inspection of shared utilities, Standard math library (Simulink Coder) must
be set to C89/C90 (ANSI) or C99
(ISO) . | Nonfatal | Check usage of shared utilities > Check standard math library settings for shared utils inspection |
Code style settings for shared utilities | For inspection of shared utilities:
| Nonfatal | Check usage of shared utilities > Check code style settings for shared utils inspection |
Model arguments | Model arguments must not have a storage class. | Nonfatal | Check model arguments for storage classes |