Community
cancel
Showing results for 
Search instead for 
Did you mean: 

DSPBA Single Step Simulation

DSPBA Single Step Simulation



Breakpoint With Trigger Count (Pause Simulation)

https://www.intel.com/content/dam/altera-www/global/en_US/uploads/6/62/Pause.PNG [ Pause.PNG - click to view image ]


https://www.intel.com/content/dam/altera-www/global/en_US/uploads/c/c4/Break_with_count.PNG [ Break with count.PNG - click to view image ]


Media:Break_with_count.mdl

This block implements a ‘breakpoint with trigger count’; useful for breaking and single-stepping through Simulink simulations.

Input is a Boolean signal enabling a counter, which will count up to the parameterised count value, then pause the simulation.

You can then press 'play' to resume simulation from that point.

If the trigger count has not been increased, then the block will cause another pause. This is single stepping mode, and simulation will pause at the next cycle.

Use

This can be useful for debugging designs. For example; run to breakpoint, turn ‘Show port values when hovering’ option on at this point (NB: having this option on permanently will cause slow simulation; so only turn on when stepping through).

Using display blocks, will enable you also to see variables displayed at the paused time: much like watch variables in a software debugger.

You can change the trigger count, say adding 100, to simulate the next 100 cycles.

The color changes to bright red when the pause feature is enabled.

Within DSP Builder Advanced designs the valid signal can be used as the input, so that it counts valid steps only.

Or a different control signal, such as a writeEnable, is used as input to get the system to break when then.

You can easily add other logic blocks to generate a break signal that is used just for debug.

Look under the mask to see the Simulink blocks used and how they are parameterized. 

Version history
Revision #:
1 of 1
Last update:
‎06-25-2019 09:07 PM
Updated by:
 
Contributors