| Using Simulink | ![]() |
The Simulink Accelerator speeds up the execution of Simulink models. The Accelerator uses portions of 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 the Real-Time Workshop technology, 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 Simulink Accelerator has the following limitations.
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 invokes the MATLAB mex function to compile and dynamically link the generated code to Simulink.
Note
The MATLAB mex function uses the lcc compiler by default to compile the code generated by the Accelerator. An optimizing compiler, such as Microsoft Visual C/C++ 7.1, can produce faster compiled code and hence accelerate simulation still further. If you have such a compiler, you can configure the mex command to use it. See the online help for mex for more information.
|
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.
| Simulink Accelerator | Running the Simulink Accelerator | ![]() |
© 1994-2005 The MathWorks, Inc.