Using Simulink    

The Simulink Accelerator

The Simulink Accelerator speeds up the execution of Simulink models. The Accelerator uses portions of the Real-Time Workshop, a MathWorks product that automatically generates C code from Simulink models, and your C compiler to create an executable. Note that although the Simulink Accelerator takes advantage of Real-Time Workshop technology, the Real-Time Workshop is not required to run it. Also, if you do not have a C compiler installed on your Windows PC, you can use the lcc compiler provided by The MathWorks.

Accelerator Limitations

The accelerator does not support models with algebraic loops. If the accelerator detects an algebraic loop in your model, it halts the simulation and displays an error message.

How the Accelerator Works

The Simulink Accelerator works by creating and compiling C code that takes the place of the interpretive code that Simulink uses when in Normal mode (that is, when Simulink is not in Accelerator mode). The Accelerator generates the C code from your Simulink model, and MATLAB's mex function invokes your compiler and dynamically links the generated code to Simulink.

The Simulink Accelerator removes much of the computational overhead required by Simulink models when in Normal mode. It works by replacing blocks that are designed to handle any possible configuration in Simulink with compiled versions customized to your particular model's configuration. Through this method, the Accelerator is able to achieve substantial improvements in performance for larger Simulink models. The performance gains are tied to the size and complexity of your model. In general, as size and complexity grow, so do gains in performance. Typically, you can expect a 2X-to-6X gain in performance for models that use built-in Simulink blocks.


  Performance Tools Runnning the Simulink Accelerator