Breakpoints pause the simulation at a particular source code line, simulation time, or activity on a particular variable. The Report window displays the list of breakpoints in the Breakpoints tab. Each break point can be also be temporally made inactive without having to remove the breakpoint from the project.
Add Source Code Breakpoints through the Editor Windows:
Source code breakpoints stop the simulator each time a particular line of code is executed.
•In an Editor window, click on the gray line on the left side of the window, to add a breakpoint, indicated by the red circle on the line. |
|
•During simulation, a source code breakpoint can turn grey to indicate that it is on an invalid line of code. |
Breakpoints can also be added by right clicking and choosing one of the Breakpoint context menus.
•Insert Breakpoint adds a line breakpoint at the current cursor position. •Add Breakpoint opens the breakpoint dialog, allowing you to create time and condition breakpoints. |
Add Time Breakpoints through the Report Window Breakpoint Tab:
Time based breakpoints stop the simulator at a particular simulation time.
•Right-click anywhere in the Breakpoints tab window and select the Add Breakpoint option from the pop-up menu to the Add/edit Breakpoint dialog. |
•Select the Time radio button to change the dialog to the time configuration. •Enter a time and a time unit, then press Ok to close the dialog. |
Add Condition Breakpoints through the Project window:
Condition breakpoints will break every time a particular variable/signal changes or every time it reaches a specific value.
•The easiest way to add a Condition breakpoint is to find the variable in the Project tree and right click and choose choose Add/Toggle Condition Breakpoint menu. This will open the Add/Edit Breakpoint dialog with the Expr box filled. |
•If the Event condition type is chosen, then the simulation will break on any change in the expression listed in the Expr box. •If the Value condition type is chosen, then the simulation will break only when the expression matches the value in the Value edit box. |
•Most simulators only accept a hierarchical signal name for the Expr in a condition breakpoint, but some simulators accept more complicated expressions. Graphical breakpoints generate simulator stop console commands, so these condition breakpoints should have the same functionality as that command. Below is an example of a console command for a value based on a bit slice of the variable. In the breakpoint GUI, you would enter testbed.A1.sum[2:1] into the Expr box, and 2'b11 into the value box. |
Turn Breakpoints ON and OFF using the Breakpoint Tab window:
•Each breakpoint, regardless of how or where it is added, will be listed in the Break points tab in the Report window. |
•Clicking on a red breakpoint button will toggle it between active and inactive states. An inactive breakpoint is displayed as a small red circle and is ignored in a simulation. •Double-clicking on a source code breakpoint will open an editor starting at that line in the source code. •Right-clicking anywhere in the tab window will open a menu allowing you to add, edit, or delete breakpoints. |