How Acceleration Modes Work

Overview

The Accelerator and Rapid Accelerator modes use portions of the Simulink® Coder™ product to create an executable. These modes replace the interpreted code normally used in Simulink simulations, shortening model run time.

Although the acceleration modes use some Simulink Coder code generation technology, you do not need the Simulink Coder software installed to accelerate your model.

    Note:   The code generated by the Accelerator and Rapid Accelerator modes is suitable only for speeding the simulation of your model. You must use the Simulink Coder product if you want to generate code for other purposes.

Normal Mode

In Normal mode, the MATLAB® technical computing environment is the foundation on which the Simulink software is built. Simulink controls the solver and model methods used during simulation. Model methods include such things as computation of model outputs. Normal mode runs in one process.

Accelerator Mode

The Accelerator mode generates and links code into a C-MEX S-function. Simulink uses this acceleration target code to perform the simulation, and the code remains available for use in later simulations.

Simulink checks that the acceleration target code is up to date before reusing it. As explained in Code Regeneration in Accelerated Models, the target code regenerates if it is not up to date.

In Accelerator mode, the model methods are separate from the Simulink software and are part of the Acceleration target code. A C-MEX S-function API communicates with the Simulink software, and a MEX API communicates with MATLAB. The target code executes in the same process as MATLAB and Simulink.

Rapid Accelerator Mode

The Rapid Accelerator mode creates a Rapid Accelerator standalone executable from your model. This executable includes the solver and model methods, but it resides outside of MATLAB and Simulink. It uses External mode (see Host/Target Communication) to communicate with Simulink.

MATLAB and Simulink run in one process, and if a second processing core is available, the standalone executable runs there.

Related Examples

More About

Was this topic helpful?