Main Content

Simulink Compiler Requirements and Limitations

When you deploy a script, function, or application using Simulink® Compiler™, the software generates a standalone executable for the application that you can run outside of MATLAB® and Simulink. As part of generating the standalone executable, the software builds the rapid accelerator simulation target for each model used in the deployed script, function, or application.

Because generating the rapid accelerator simulation target is required for deployment, the limitations and requirements for rapid accelerator simulations also apply to deploying applications with Simulink Compiler.

Rapid Accelerator Limitations that Affect Simulink Compiler

When you run a rapid accelerator simulation, the software builds the model to generate a simulation target used to run the simulation. The simulation target is optimized for performance in the execution phase of the simulation and provides minimal support for interacting with the model during simulation.

  • Rapid accelerator mode does not support:

    • Before R2026a: Algebraic loops.

    • Interpreted MATLAB Function blocks.

    • Noninlined MATLAB language or Fortran S-functions. You must write S-functions in C or inline them using the target language compiler (TLC) or you can also use the MEX file.

    • Debugging utilities or the Simulink Profiler.

    • Simulating models that reference protected models.

    • Tuning structure variables used to specify S-function parameters.

  • Numeric values that define model parameters, block parameters, and variables in a model must have one of these data types:

    • boolean

    • uint8 or int8

    • uint16 or int16

    • uint32 or int32

    • single or double

    • Fixed-point

    • Enumerated

  • Top-level input ports must load external input data from the base workspace.

  • Rapid accelerator simulations do not apply minimum and maximum output values specified for:

    • Top-level input ports

    • Simulink.Parameter objects used to define variable or parameter values

  • Tuning Simulink.LookupTable objects is not supported in rapid accelerator simulations that disable the up-to-date check or in applications deployed using Simulink Compiler.

  • To File and To Workspace blocks inside function-call subsystems do not generate logging files if the function-call port is unconnected or connected to a Ground block.

  • Simulink Compiler does not support the use of Scope blocks with nonvirtual buses.

  • Initialize, reset, reinitialize, and terminate event ports on Model blocks are supported only for Model blocks in the top model.

  • The function setBlockParameter is not supported for rapid accelerator simulations that disable the up-to-date check or for deployment. To modify block parameter values in a deployed application, use a variable to specify the block parameter value, and then use the setVariable function to specify the variable value.

Simulink Compiler Limitations

  • Simulink Compiler generates platform-specific executables for deployed applications. You can run an application deployed using Simulink Compiler only on the platform used to deploy the application.

  • Before R2024a: You cannot pause simulations run in applications deployed using Simulink Compiler.

See Also

Topics