Create block
R2026bSIL or PIL block creation
Model Configuration Pane: Code Generation / Verification
Description
Generate a SIL or PIL block
Note
The SIL and PIL block approach for testing subsystem code is not recommended. Test code generated for subsystems in the context of the parent model or convert the subsystem to a Model block and apply the reference model SIL/PIL approach. For more information, see Choose a SIL or PIL Approach.
Settings
None (default) | SIL | PILDefault:
None
NoneDo not generate SIL or PIL block.
SILGenerate a SIL block that represents a top-model or subsystem.
If you select this option, the software creates and opens an untitled model with a SIL block. The SIL block contains an S-function, through which the software runs compiled object code on your development computer. With this block, you can test the source code generated from top-model or subsystem components.
If the subsystem is an export-function subsystem, the software creates a Model block with Simulation mode set to
Software-in-the-loop (SIL).PILGenerate a PIL block that represents a top-model or subsystem.
If you select this option, the software creates and opens an untitled model with a PIL block. The PIL block contains an S-function, through which the software runs cross-compiled object code on a target processor or instruction set simulator. With this block, you can test the object code generated from top-model or subsystem components.
If the subsystem is an export-function subsystem, the software creates a Model block with Simulation mode set to
Processor-in-the-loop (PIL).To control the way code compiles and executes in the target environment, use Target Connectivity API.
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | On |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Programmatic Use
Parameter:
CreateSILPILBlock |
| Type: character vector |
Value:
'None' | 'SIL' |
'PIL' |
Default:
'None' |
Version History
Introduced in R2007a