Using Breakpoints - 2021.2 English

Vivado Design Suite User Guide: Logic Simulation (UG900)

Document ID
UG900
Release Date
2021-10-22
Version
2021.2 English

A breakpoint is a user-determined stopping point in the source code that you can use for debugging the design.

Tip: Breakpoints are particularly helpful when debugging larger designs for which debugging with the Step command (stopping the simulation for every line of code) might be too cumbersome and time consuming.

You can set breakpoints in executable lines in your HDL file so you can run your code continuously until the simulator encounters the breakpoint.

Note: You can set breakpoints on lines with executable code only. If you place a breakpoint on a line of code that is not executable, the breakpoint is not added.
  1. Run a simulation.
  2. Go to your source file and click the hollow circle to the left of the source line of interest. A red dot confirms the breakpoint is set correctly.

    After the procedure completes, a simulation breakpoint button opens next to the line of code.

    Type the Tcl Command: add_bp <file_name> <line_number>

    This command adds a breakpoint at <line_number> of <file_name>. See the Vivado Design Suite help or the Vivado Design Suite Tcl Command Reference Guide (UG835) for command usage.

    Open the HDL source file.

  3. Set breakpoints on executable lines in the HDL source file.
  4. Repeat steps 1 and 2 until all breakpoints are set.
  5. Run the simulation, using a Run option:
    • To run from the beginning, use the Run > Restart command.
    • Use the Run > Run All or Run > Run For command.

    The simulation runs until a breakpoint is reached, then stops.

    The HDL source file displays an arrow, indicating the breakpoint stopping point.

  6. Repeat Step 4 to advance the simulation, breakpoint by breakpoint, until you are satisfied with the results.

    A controlled simulation runs, stopping at each breakpoint set in your HDL source files.

    During design debugging, you can also run the Run > Step command to advance the simulation line by line to debug the design at a more detailed level.

You can delete a single breakpoint or all breakpoints from your HDL source code.

To delete a single breakpoint, click the Breakpoint button .

To remove all breakpoints, either select Run> Delete All Breakpoints or click the Delete All Breakpoints button .

To delete all breakpoints:

  • Type the Tcl command remove_bps -all.

To get breakpoint information on the specified list of breakpoint objects:

  • Type the Tcl command report_bps