Once the programming file has been associated with the hardware device,
you can program the hardware device using by right-clicking on the device in the
Hardware window and selecting the Program Device menu option. You can also use the
program_hw_device
Tcl command. For instance, to
program the first device in the JTAG chain, use the following Tcl command:
program_hw_devices [lindex [get_hw_devices] 0]
Once the progress dialog has indicated that the programming is 100% complete, you can check that the hardware device has been programmed successfully by examining the DONE status in the Hardware Device Properties view.
You can also use the get_property
Tcl
command to check the DONE status. For instance, to check the DONE status of a
Kintex®-7 device that is the first device in the JTAG
chain, use the following Tcl command:
get_property REGISTER.IR.BIT5_DONE [lindex [get_hw_devices] 0]
On Versal devices, the command
differs slightly because the DONE status register is different. Index 1 must be read as
the first device returned by get_hw_devices
, and will
be the arm_dap
in a single device use case.
get_property REGISTER.JTAG_STATUS.BIT[34]_DONE [lindex [get_hw_devices] 1]
If you use another means to program the hardware device (for instance, a
flash device or external device programmer), you can also refresh the status of a
hardware device by right-clicking the Refresh Device menu option or by running the
refresh_hw_device
Tcl command. This refreshes the
various properties for the device, including but not limited to the DONE status.
To determine the user scan chain setting, for non-Versal architectures, open the implemented design and use:
get_property C_USER_SCAN_CHAIN [get_debug_cores dbg_hub]
You can change the user scan chain used in the Vivado
Hardware Manager. Note that the BSCAN_SWITCH_USER_MASK
is a bit mask value. See the following figure.
Alternatively you can specify the user scan chain value as an option to
hw_server
start-up.
hw_server -e "set bscan-switch-user-mask <user-bit-mask>"
hw_server
with -e
"set xsdb-user-bscan <C_USER_SCAN_CHAIN
scan_chain_number>"
to detect the debug hub at User Scan Chain of 2 or
4.