SourcePoint Intel Help

Table of Contents

devicelist

Display names and other device information of currently attached or configured devices.

Syntax

devicelist

[result =] devicelist[expr]

[result =] devicelist[expr].fieldname

Where:

expr

is an expression evaluating to an ordinal value specifying the device ID (DID)  (may also be a device alias; brackets are required punctuation).

fieldname 

is the specific devicelist field to be returned (see table below for details).

result

specifies a debug variable to which the function return value is assigned. If result is not specified, the return value is displayed on the next line of the screen.

Discussion

The devicelist command displays a summary of the current configuration of all the devices that are known to SourcePoint.  Devices are listed in order by DID.

If a device ID (DID) is specified for expr, the devicelist command will only display data for the specified DID.

Use the devicelist[expr].<fieldname> commands to display or retrieve individual fields of the devicelist data described in the table below.

Fieldname

Description

Data Type

debugport

debug port

Ordinal

cp

chain position

Ordinal

did

device id

Ordinal

tapport

Tap port id

Ordinal

scanchain

scan chain

Ordinal

threadid

thread/core ID of this device

Ordinal

device

device name

String

alias

alias for this device

String

idcode

idcode for JTAG device only

Ordinal

stepping

device stepping

String

devicetype

device type

String

isenabled

thread/device's enabled status

Boolean

bustype

bus type used by the device

String

 

Each JTAG device has an associated idcode value, from which a stepping number (stepping) and device type (type) are derived. For devices that contain multiple threads or cores, each thread or core will be listed as a separate device with a zero-based thread/core ID distinguishing them. If a thread/core device can be disabled, the Enabled column will show its current state; otherwise it will always be enabled.

For all non-JTAG devices, Tap Port ID (TP), Scan Chain (SC), Stepping (Step), Idcode, and Thread/Core ID (T/C) of each device are not applicable so they are not displayed. Attempting to access these fields using fieldname will cause an error.

Example 1

To display output of devicelist for a two debug port (DP) target system with two physical processors, each with two enabled threads, note that the Device ID (DID) value is always displayed as hexadecimal regardless of the base control variable setting:

Command input:

devicelist

Result:

DID  DP  TP  SC  Alias   Type    Step   Idcode    BusType  T/C  Enabled

-----------------------------------------------------------------------

 0   0   0   0    P0     YONAH    A0   0005d013    JTAG     0     Yes

 1   0   0   0    P1     YONAH    A0   0005d013    JTAG     1     Yes

 2   0   1   1    P2     YONAH    A0   0005d013    JTAG     0     Yes

 3   0   1   1    P3     YONAH    A0   0005D013    JTAG     1     Yes

Example 2

To display devicelist data for a single device:

Command input :

devicelist[P2]

Result:

DID  DP  TP  SC  Alias   Type    Step   Idcode    BusType  T/C  Enabled

-----------------------------------------------------------------------

 2   0   1   1    P2     YONAH    A0   0005D013    JTAG     0     Yes

Example 3

To display the idcode of a single device:  

Command input:

devicelist[P2].idcode

Result:

08303013H

Example 4

To get the idcode of a single device and assign it to a debug variable:

Command input:

define ord4 o4MyIdCode

o4MyIdCode = devicelist[P2].idcode

o4MyIdCode

Result:

0005D013H

Example 5

To display just the aliases of all JTAG devices:

Command input:

define ord4 o4ID

for (o4ID = first_jtag_device; o4ID < num_jtag_devices; o4ID++)

{

  devicelist[o4ID].alias

}

Result:

P0

P1

P2

P3

Example 6

To create a custom-format devicelist command:

Command input:

define proc devlist()

{

  define ord4 o4ID

  for (o4ID=first_jtag_device; o4ID < num_jtag_devices; 04ID++)

  {

    printf("%2x %8s (%-11s) port %d\n",

      devicelist[o4ID].did,

      devicelist[o4ID].alias,

      devicelist[o4ID].devicetype,

      devicelist[o4ID].debugport)

  }

}

devlist

Result:

 0    P0 (YONAH      ) port 0

 1    P1 (YONAH      ) port 0

 2    P2 (YONAH      ) port 0

 3    P3 (YONAH      ) port 0

Related Topics