SourcePoint AMD Help

Table of Contents

msgir

Add an IR scan into and existing JTAG message.

Syntax

[result =] msgir(msg-handle, ir-length, write-array, [irscan-option])

[result =] msgir(msg-handle, ir-length, write-value, [irscan-option])

Where irscan-option is:

[irscan-option] = [, readwrite, [scan-chain, [0, [stop-state, [0]]]]]

Where:

result

is a boolean variable that contains the return value of this command. TRUE indicates the IR scan was successfully added to the JTAG message. FALSE indicates an error occurred, such as the JTAG message was not found.

msg-handle

is the name of a previously defined debug variable of type handle. This is the variable that was passed in to msgopen when the JTAG message was created.

ir-length

is an ord4 that contains the number of bits to be scanned to an instruction register (IR).

write-array

is an array of type ord1, ord2, or ord4, of bits to scan to the instruction register. If no write-array is specified, then zeros are scanned.

write-value

is an ord1, ord2, or ord4 value to scan to the instruction register. If no write-value is specified, then zeros are scanned.

readwrite

is an ord1 that specifies the type of IR scan. See valid readwrite values below.

scan-chain

is an ord1 that specifies which scan chain to select on the debug port. This may only be either 0 or 1. If scan-chain is not specified, then scan chain 0 is used.

stop-state

is an ord1 that specifies the TAP state in which to stop at the end of the scan. If stop-state is not specified, then 0 (RTI) is used.

Discussion

Use the msgir command to add an instruction register (IR) scan to the open JTAG message. The IR length must be specified. The additional section of parameters, irscan-option, is optional. This command returns an error if the JTAG message has been closed.

The legal readwrite values for IR scans are:

0

write-only

1

readwrite

The legal stop-state values are:

0

RTI: default

1

CAPTURE-PAUSE: stop in the IR pause state, no data are shifted

2

PAUSE: stop in the IR pause state

3

CAPTURE-RTI: force through the IR capture state, no data are shifted and stop in RTI

4

RTI-DUAL: go to RTI from the IR PAUSE, clocks both time bases, no data are shifted

5

CAPTURE-PAUSE-DUAL: stop in the IR pause state, clocks both time bases, no data are shifted

ย Example

Command input:

// Read JTAG ID from processor
define handle h
define ord2 device = 0
msgopen(h)
msgir(h, 8, 2) ย ย ย ย // 8=ir length, 2=idcode
msgdr(h, 0n32, 2)

msgclose(h)
msgscan(h, device)
define ord4 count = 0
msgreturndatasize(h, count, device)
define ord1 data[count]
msgdata(h, data)
data
msgdelete(h)

Related Topics: