Perform shift DR on 'hw_jtag'.
Syntax
scan_dr_hw_jtag [‑tdi <arg>] [‑tdo <arg>] [‑mask <arg>] [‑smask <arg>]
[‑quiet] [‑verbose] <length>
Returns
Hardware TDO
Usage
Name | Description |
---|---|
[-tdi]
|
Hex value to be scanned into the target |
[-tdo]
|
Hex value to be compared against the scanned value |
[-mask]
|
Hex value mask applied when comparing TDO values |
[-smask]
|
Hex value mask applied to TDI value |
[-quiet]
|
Ignore command errors |
[-verbose]
|
Suspend message limits during command execution |
<length>
|
Number of bits to be scanned. |
Description
The scan_dr_hw_jtag
command specifies a scan pattern to be scanned into the JTAG interface target data register.
The command targets a hw_jtag object which is created when the hw_target is opened in JTAG mode through the use of the open_hw_target -jtag_mode
command.
When targeting the hw_jtag object prior to shifting the scan pattern specified in the scan_dr_hw_jtag
command, the last defined header property (HDR) will be pre-pended to the beginning of the specified data pattern, and the last defined trailer property (TDR) will be appended to the end of the data pattern.
The options can be specified in any order, but can only be specified once. The number of bits represented by the hex strings specified for -tdi
, -tdo
, -mask
, or -smask
cannot be greater than the maximum specified by <length>. Leading zeros are assumed for a hex string if the number of bits represented by the hex strings specified is less than the <length>.
scan_dr_hw_jtag
command moves the JTAG TAP from the current stable state to the DRSHIFT state according to the state transition table below:
Current State Transitions to get to DRSHIFT state
RESET IDLE -> DRSELECT -> DRCAPTURE -> DRSHIFT
IDLE DRSELECT -> DRCAPTURE -> DRSHIFT
IRPAUSE IREXIT2 -> IRUPDATE -> DRSELECT -> DRCAPTURE -> DRSHIFT
DRPAUSE DREXIT2 -> DRSHIFT
DRPAUSE* DREXIT2 -> DRUPDATE -> DRSELECT -> DRCAPTURE -> DRSHIFT
-force_update
option set.After the last data bit is shifted into the target data register, the scan_dr_hw_jtag
command moves the JTAG TAP to the IDLE state, or to the stable state defined by the run_state_hw_jtag
command.
The scan_dr_hw_jtag
command returns a hex array containing captured TDO data from the hw_jtag, or returns an error if it fails.
catch
command if TDO data from the hw_jtag does not match specified -tdo
argument.
-tdo
and -mask
arguments are specified, then the mask is applied to the -tdo
option and the hw_jtag TDO data returned before comparing the two.Arguments
-tdi <arg>
- (Optional) The value to be scanned into the target, expressed as a hex value. If this option is not specified, the -tdi
value from the last scan_dr_hw_jtag
command will be used. The -tdi
option must be explicitly specified for the first scan_dr_hw_jtag
command, and when the <length> changes.
-tdo <arg>
- (Optional) Specifies the data value, expressed as a hex string, to be compared against the actual TDO value scanned out of the hw_jtag data register. If this option is not specified no comparison will be performed. If the -tdo
option is not specified, the -mask
option will be ignored.
-mask <arg>
- (Optional) The mask to use when comparing -tdo
value against the actual TDO value scanned out of the hw_jtag. A '1' in a specific bit position indicates the bit value should be compared. A '0' indicates the value should not be used for comparison. If -mask
is not specified, the -mask
value from the last scan_dr_hw_jtag
command will be used.
-mask
option is not specified, the -mask
pattern used is all '1's.-smask <arg>
- (Optional) The mask to use with -tdi
data. A '1' in a specific bit position indicates the TDI data in that bit position is significant; a '0' indicates it is not. The -smask
option will be applied even if the -tdi
option is not specified. If -smask
is not specified, the -smask
value from the last scan_dr_hw_jtag
command will be used.
-smask
option is not specified, the -smask
pattern used is all '1's.-quiet
- (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
-verbose
- (Optional) Temporarily override any message limits and return all messages from this command.
set_msg_config
command.<length> - (Required) A 32-bit unsigned decimal integer greater than 0, specifying the number of bits to be scanned from the data register.
Example
scan_dr_hw_jtag 24
scan_dr_hw_jtag 24 -tdi 000010 -tdo 818181 -mask F3FFFF -smask 0
scan_dr_hw_jtag 24 -tdi 3f
scan_dr_hw_jtag
command to end in the DRPAUSE stable state, and then the subsequent scan_dr_hw_jtag
commands will go to DREXIT2 state before going back to DRSHIFT.
run_state_hw_jtag DRPAUSE
scan_dr_hw_jtag 16 -tdi aabb
scan_dr_hw_jtag 16 -tdi ccdd
scan_dr_hw_jtag 16 -tdi ceff
scan_ir_hw_jtag 6 -tdi 05