Main Content

SS_OPTION_USE_TLC_WITH_ACCELERATOR

Use TLC file when simulating in accelerated mode

Description

Forces the accelerator mode to use the Target Language Compiler (TLC) inlining code for the S-function, which speeds up execution of the S-function. If this option is not set, the accelerator mode uses the MEX version of the S-function even if a TLC file for the S-function exists. This option should not be set for device driver blocks (A/D) or when there is an incompatibility between running the MEX mdlStart or mdlInitializeConditions functions together with the TLC Outputs, Update, or Derivatives functions. Also, this option indicates that the TLC inlining code should be used when generating a simulation target for a referenced model that contains this S-function.

Note

The accelerator mode does not require the Simulink® Coder™ product to run an inlined S-function. However, to ensure that the inlined S-function can run in accelerated mode in current and future Simulink releases, the TLC file for the S-function must use documented TLC functions to access the CompiledModel structure.

Example

See the S-function timestwo.c used in the Simulink model sfcndemo_timestwo for an example.

Version History

Introduced in R2007b