DSP Builder for Intel® FPGAs (Advanced Blockset): Handbook

ID 683337
Date 9/30/2024
Public
Document Table of Contents

2.10. Generating a Fast Simulation Model

A DSP Builder fast simulation model is optimized for simulation speed. You cannot change the fast simulation model after you generate it. You must regenerate the fast simulation model whenever you change the original model.

Fast simulation models replace subsystem contents with blocks that drive a compiled software model implementing the original logic. DSP Builder designs with high block counts, where the Simulink API overhead at each block dominates the total runtime, receive the most significant speed increases with fast simulation. In such models, the speed increase is typically 10 to 100 times. Compared to using the default Simulink simulation, fast simulation models require extra steps to configure and then extra time for the compilation time of C++ code. Therefore, use a fast simulation model after you implement and debug your DSP Builder design, with the default simulations, and you then want to run longer simulations on a stable design.

You have to configure fast simulation for each model.

Procedure

  1. In your model, in the Simulation tab of the Control block:
    • On Windows, select your compiler:
      Figure 5. Select Compiler - Windows
    • On Linux, provide a path to the C and C++ compilers, otherwise DSP Builder uses the system defaults.
      Figure 6. Select Compiler - Linux
  2. Generate a fast simulation model by selecting Generate Fast Simulation Model on the DSP Builder menu:
    Figure 7. DSP Builder Menu

DSP Builder shows a progress bar shows while it generates the model and then the successfully generated fast simulation model automatically opens. The fast simulation models have a blue background and the _fastsim suffix to differentiate them from the original design. Running simulations on the fast simulation model is the same as any other model, but you can only change input stimulus, not the model logic. If you want to change the model logic, you must change the original design and regenerate the fast simulation model.

Figure 8. Fast Simulation Model with blue background and the _fastsim suffix

If the model fails to generate, check the compiler settings are compatible. Any errors appear in the MATLAB command window for debugging.