SourcePoint AMD Help

Table of Contents

msgscan

Send a JTAG message to the emulator and scan it to the target devices.

Syntax

[result =] msgscan(msg-handle, device-array [, return-array])

[result =] msgscan(msg-handle, device-id [, return-array])

Where:

result

is a boolean variable that contains the return value of this command. TRUE indicates the scan was successful. 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.

device-array

is the previously defined ord2 array of device IDs (so that multiple devices can be scanned simultaneously).

device-id

is the boundaryscanlist device position (ord2) for a single target system device.

return-array

is a previously defined array of ord1, ord2, or ord4 in which the data returned from the scan of target device(s) is stored.

Discussion

Use the msgscan command to send a JTAG message to the emulator. This command returns an error if the devices in the device-array are not on the same debug port; no other verification of the list is done. The command returns an error if called before the JTAG message has been closed.

If a return-array is specified, the command waits for the JTAG message to complete and copies the scan data to the array. If the command is used without a return-array, the JTAG message begins to scan. The msgdata command must be used to access the return data.

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: