Main Content

Include custom code for referenced models

Description

Use custom C code for referenced model simulation (SIM) target build for accelerator mode.

Category: Model Referencing

Settings

Default: Off

Off

Ignore custom C code for model reference accelerator simulation.

On

Use custom C code with Stateflow® or with MATLAB Function blocks during model reference accelerator simulation.

Tips

  • Caution

    Using custom C code for referenced models in accelerator mode can produce different results than if you simulate the model without using the custom code. If the custom code includes declarations of structures for buses or enumerations, the SIM target generation fails if the build results in duplicate declarations of those structures. Also, if the custom code uses a structure that represents a bus or enumeration, you might get unexpected simulation results.

  • Use the Configuration Parameters > Simulation Target pane to specify the custom code file.

Command-Line Information

Parameter:SupportModelReferenceSimTargetCustomCode
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionOff