SET_DEVICE_SOURCE

The SET_DEVICE_SOURCE function sets the configuration source to use for the device currently being tested. Once set, the device will use the source's configuration values. Calling SET_DEVICE_SOURCE("") with an empty string will apply the single-sourced configuration for the device. Configuration sources are defined via the multi-sourcing dialog in XJDeveloper.

SET_DEVICE_SOURCE was added in XJTAG v4.1 and is not recognised in versions prior to that.

Syntax

SET_DEVICE_SOURCE ( STRING sourceName )

Parameters

sourceName

The name of the configuration source to use.

GET_DEVICE_SOURCE_LIST can be used to obtain a list of all possible sources for the current test device.

Errors

If the given source does not exist, or is not enabled for the current test device, a runtime error occurs.

If a source name is specified but the current test device is not multi-sourced, a runtime error occurs.

Example

string[] sourceList;
sourceList := GET_DEVICE_SOURCE_LIST();

FOR i := 0 TO WIDTHOF(sourceList) -1
  SET_DEVICE_SOURCE(sourceList[i]);
		
  PRINT("\nUsing Source: ", sourceList[i], "\n");

  // Verify values read are correct
  IF (ConfigurationMatchesFittedPart) THEN
    PRINT("Part match found. Source ", sourceList[i], " selected.\n\n");
    RETURN;
  ELSE
    PRINT("Does not match expected part");
  END;
END;