Device_virtual_dr_shift, Usage, Options – Altera Quartus II Scripting User Manual

Page 283: Description, Example, Device_virtual_dr_shift –153

Advertising
background image

Chapter 3: Tcl Packages & Commands

3–153

jtag

© July 2013

Altera Corporation

Quartus II Scripting Reference Manual

device_virtual_dr_shift

Usage

device_virtual_dr_shift [-dr_value <data register value>] -instance_index <instance
index> -length <data register length> [-no_captured_dr_value]
[-show_equivalent_device_ir_dr_shift] [-value_in_hex]

Options

-dr_value <data register value>: Value of string oprand type in either default binary or
hexadecimal format to be written into the data register in this instance

-instance_index <instance index>: The index of the virtual JTAG instance

-length <data register length>: Length of the data register in this instance

-no_captured_dr_value: Option to not return the data instruction register value

-show_equivalent_device_ir_dr_shift: Option to show equivalent device ir dr shifts
performed by this command

-value_in_hex: Option to specify that the value string is represented in hexadecimal
format

Description

Writes the specified value into the data register of the JTAG tap controller of the open device. Returns the
captured data register value. The captured value return can be disabled to improve the JTAG
communication speed by packing multiple IR or DR scans together.

The value is specified using either a binary string or a hexadecimal string. The bit on the left most side is
the first bit shifted in. For example, using the binary string "010001", the first bit shifted into the dr register
is 1; the last bit is 0. The same string can be represented in hexadecimal as "11".

The device must be locked first, and the target instance must be activated using the device_virtual_ir_shift
command before this operation. Moreover, the device should be locked before the virtual IR shift
operation to prevent another application from activating another instance.

Example

# List all available programming hardware, and select the USB-Blaster.
# (Note: this example assumes only one USB-Blaster is connected.)
puts "Programming Hardware:"
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

Advertising