SourcePoint AMD Help

Table of Contents

msgdata

Retrieve the return data of all scans in a JTAG message previously scanned to the target device(s).

Syntax

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

Where:

result

is a boolean variable that contains the return value of this command. TRUE indicates the command was successful. FALSE indicates an error occurred (e.g., the specified 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 command was created.

return-array

is the 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 msgdata command to retrieve the data that was generated by the msgscan command. The scan data is associated with the JTAG message specified by handle. The return array used to store the scan data can be of type ord1, ord2 or ord4. An error is returned if the msgscan command has not been run on the JTAG message specified by handle.

If multiple read scans are done and more than one set of scan data is expected, the sets of scan data are packed bit-aligned (not separated by any bits). For example, if two read scans are performed and a 5-bit data set containing 10001 and a 7-bit data set containing 0111110 are expected, then an ord1 return array of size 2 (two bytes) would contain all 12 bits next to each other with the four extra bits set to zero as follows. Note that the actual data is in bold and the filler 0 bits are normal.

ย ย ย ย ย MSB ย ย 1000101111100000 ย ย ย LSB

ย ย ย ย ย data [0]=E0H ย ย ย ย "."

ย ย ย ย ย data [1]=8BH ย ย ย ย "."

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: