To add breakpoints based on a condition and output a diagnostic message, use the following commands:
add_condition <condition> <message>
Using the Vivado IDE BFT example design, to stop when the wbClk
signal and the reset
are both active-High, issue the following command at start of simulation to print a diagnostic message and pause simulation when reset goes to 1 and wbClk goes to 1:
add_condition {reset == 1 && wbClk == 1} {puts "Reset went to high"; stop}
In the BFT example, the added condition causes the simulation to pause at 5 ns
when the condition is met and "Reset went to high"
is
printed to the console. The simulator waits for the next step or run command to resume
the simulation.
-notrace Option
Normally, when you execute the add_condition
command, the specified
Tcl commands also echo to the console, log file, and journal file. The
-notrace
switch causes those commands to execute silently,
suppressing the commands (but not their output) from appearing in those three
places.
For example, if you execute the following example command:
puts 'Hello'
the normal behavior of the above command would be to emit the following output in the console, log file, and journal file:
# puts ‘Hello’
Hello
When you execute -notrace
switch, it
produces only the following output:
Hello