Friday, September 24, 2010

Model Based Design – VIP Appln -03

Model-Based Design to Develop and Deploy a
Video Processing Application

03 Generating Automatic Code using Real Time Workshop

During simulation, the flexibility and generality provided by fixed-point operators as they check for overflows and perform scaling and saturations can cause a fixed-point model to run slower than a floating-point model. To speed up the simulation, we can run the fixed-point model in Accelerator mode. The Simulink Accelerator can substantially improve performance for larger Simulink models by generating C code for the model, compiling the code, and generating a single executable for the model that is customized to a model's particular configuration. In Accelerator mode, the simulation for the fixed-point model runs at the speed of compiled C code.

Code is generated using Real-Time Workshop in the folder named: modelfilename_mode_rtw (ex. MBD_LineDetection_CodeGen_accel_rtw), like below-

Figure 6: Generated Code with RTW

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.