GET_JTAG_DEVICE_COUNT
The GET_JTAG_DEVICE_COUNT function returns the number of JTAG devices on a given chain. The JTAG chain indexes are defined on the JTAG Chain screen and they are 1-based.
This function is designed to be used in conjunction with GET_JTAG_DEVICE to provide a way to walk through all expected JTAG devices available in a test programatically at runtime.
In dynamic chain projects only devices on subchains that are part of the current profile will be counted. If the chain index given is not included in the current profile then zero is returned. When called within a subchain test reset sequence only devices in that subchain will be counted.
In legacy non-dynamic projects GET_JTAG_DEVICE_COUNT will always count every JTAG device on every chain. This is also true in the specific case where Check Chain has failed on the Pin Mapping screen when it falls back to test one chain at a time, GET_JTAG_DEVICE_COUNT will still return the full count for all chains in the test reset sequence for every chain.
Syntax
GET_JTAG_DEVICE_COUNT( INT chainIndex )
Parameters
- chainIndex
- The index of the JTAG chain, as defined on the JTAG Chain screen.
Return value
An INT value indicating the number of JTAG devices in the chain. If the chain index is invalid or is not included in the current profile then zero is returned.Errors
A chainIndex of zero can never be a valid index so will return an error.
Example
INT deviceCount := GET_JTAG_DEVICE_COUNT(1);
See also
XJTAG v4.1.100