A breakpoint is a user-determined stopping point in the source code that you can use for debugging the design.
You can set breakpoints in executable lines in your HDL file so you can run your code continuously until the simulator encounters the breakpoint.
- Run a simulation.
- 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.
- Set breakpoints on executable lines in the HDL source file.
- Repeat steps 1 and 2 until all breakpoints are set.
- Run the simulation, using a Run option:
- To run from the beginning, use the command.
- Use the or command.
The simulation runs until a breakpoint is reached, then stops.
The HDL source file displays an arrow, indicating the breakpoint stopping point.
- 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