Intel® Quartus® Prime Pro Edition User Guide: Scripting

ID 683432
Date 6/20/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

3.1.23.9. get_device_names (::quartus::jtag)

The following table displays information for the get_device_names Tcl command:

Tcl Package and Version

Belongs to ::quartus::jtag

Syntax get_device_names [-h | -help] [-long_help] -hardware_name <hardware name>
Arguments -h | -help Short help
-long_help Long help with examples and possible return values
-hardware_name <hardware name> The name of the programming hardware that connects to the JTAG chain. The name can be obtained from command: get_hardware_names.
Description
		Retrieves a list of names of the devices on the JTAG
chain to which the specified programming hardware is
connected.

The name of the device is in the following format:
<number on circuit board>: <JTAG ID code>: <device
name>.  For example, in the device name @1:
0x082000DD: EP20K200C, @1 indicates that it is the
first device on the circuit board, 0x082000DD is the
JTAG ID code for the device, and EP20K200C is the
device name.
Example Usage
# List all available programming hardwares, and select the USBBlaster.
# (Note: this example assumes only one USBBlaster connected.)
puts "Programming Hardwares:"
foreach hardware_name [get_hardware_names] {
	puts $hardware_name
	if { [string match "USB-Blaster*" $hardware_name] } {
		set usbblaster_name $hardware_name
	}
}
puts "\nSelect JTAG chain connected to $usbblaster_name.\n";

# List all devices on the chain, and select the first device on the chain.
puts "\nDevices on the JTAG chain:"
foreach device_name [get_device_names -hardware_name $usbblaster_name] {
	puts $device_name
	if { [string match "@1*" $device_name] } {
		set test_device $device_name
	}
}
puts "\nSelect device: $test_device.\n";

# Open device 
open_device -hardware_name $usbblaster_name -device_name $test_device

# Retrieve device id code.
# IDCODE instruction value is 6; The ID code is 32 bits long.

# IR and DR shift should be locked together to ensure that other applications 
# will not change the instruction register before the id code value is shifted
# out while the instruction register is still holding the IDCODE instruction.
device_lock -timeout 10000
device_ir_shift -ir_value 6 -no_captured_ir_value
puts "IDCODE: 0x[device_dr_shift -length 32 -value_in_hex]"
device_unlock

# Close device
close_device
Return Value Code Name Code String Return
TCL_OK 0 INFO: Operation successful
TCL_ERROR 1 ERROR: No device is detected in the specified JTAG chain.
TCL_ERROR 1 ERROR: The specified hardware is not found.