GET_DEVICE_TYPE

The GET_DEVICE_TYPE function returns a description of a device's type given its reference. This value is a description of how the device has been categorised in the project in XJDeveloper. If the current test device is not multi-sourced, the function will return [""]. Calling SET_DEVICE_SOURCE("") with an empty string will apply the single-sourced configuration for the device.

Syntax

GET_DEVICE_TYPE( STRING deviceReference )

Parameters

deviceReference

A device reference in the form 'board.device' or 'board.device.core' for a multicore device. The read-only built-in UNIQUE_DEVICE_REF contains this string for the current test device file.

Return value

A STRING value containing a description of how the specified device is categorised. The possible returned values are:

  • JTAG Device
  • Test Device
  • Ignored Device
  • Unfitted Device
  • Excluded Device
  • Connector
  • Passive Device
  • Logic Device

A device may have a combination of types (e.g. JTAG and test). In this case a comma-separated list will be returned. If the device is uncategorised an empty string is returned.

Errors

If the supplied device reference is invalid, then an error occurs. If the string is constant, then the verification can be done at compile-time and an error is emitted then, otherwise the error will occur at run-time, when the function is run.

Example

STRING deviceR1 := "XJDemo.R1";
STRING deviceR1Type := GET_DEVICE_TYPE(deviceR1);
STRING thisDevice := GET_DEVICE_TYPE(UNIQUE_DEVICE_REF);
PRINT(deviceR1Type, "\n", thisDevice);

Output

Passive Device
Test Device