PRINT_DEVICE_LINK

The PRINT_DEVICE_LINK function prints a hyperlink for a device in the test output that enables the device to be visualised in the application.

Multiple devices can be linked to using PRINT_DEVICES_LINK. There is also an equivalent for the test details output: TEST_DETAILS_DEVICE_LINK.

XJDeveloper and XJInvestigator

If an ODB++ netlist is available for the board, left clicking the hyperlink will launch Layout Viewer and show the device. If no ODB++ netlist is available left clicking the link will show the device in Explorer. Right clicking the link will present the following options - Open in Layout Viewer, Add to Selection in Layout Viewer, Open in Explorer and Show in Schematic Viewer. If XJAnalyser is available, any JTAG-accessible devices will also display a Show in Analyser option, which navigates to the device in the Analyser screen.

XJRunner

Links will only be highlighted and clickable if ODB++ information is available for the board. In this case left clicking will launch Layout Viewer and show the device. Right clicking the link will present the following options - Open in Layout Viewer, Add to Selection in Layout Viewer and Show in Schematic Viewer.

XJRun command line

No formatting will be applied.

Syntax

PRINT_DEVICE_LINK( STRING deviceReference )
PRINT_DEVICE_LINK( STRING text, STRING deviceReference )

Parameters

text
Optional text to print for the link. If this argument is not given the text used will be the name of the device being linked to.
deviceReference

A device reference in the form 'board.device'. The read-only built-in UNIQUE_DEVICE_REF contains this string for the current test device file. The board name is optional, but the device reference must uniquely identify the device; if there is any ambiguity, then the board name must be supplied.

Errors

An error can occur in the following circumstances:

  • The deviceReference supplied does not match any test device in the project.
  • The deviceReference supplied does not contain a board name and matches more than one device.

In both these cases, if the expressions are constant, the error will occur at compile-time. Otherwise, the error will occur at run-time, when the function is run.

Examples

// Guaranteed to be found with board qualifier
PRINT_DEVICE_LINK("XJDemo.IC3"); PRINT("\n");

// Print the device being tested (with board if necessary)
PRINT_DEVICE_LINK(UNIQUE_DEVICE_REF); PRINT("\n");

// Print the device being tested (with board)
PRINT_DEVICE_LINK(BOARD_NAME + "." + DEVICE_REF); PRINT("\n");

// Text argument
PRINT_DEVICE_LINK("This is a link to IC6\n", "XJDemo.IC6");

// Print in the middle of a line of text
PRINT("Here is a link to ");
PRINT_DEVICE_LINK("IC7", "XJDemo.IC7");
PRINT(" in the middle of a sentence.\n");

Output

XJDemo.IC3
XJDemo.IC5
XJDemo.IC5
This is a link to IC6
Here is a link to IC7 in the middle of a sentence.