Answer
4Yes,
it is possible to count the number of devices in a JTAG
chain without knowing the individual instruction register
lengths.
First,
the software puts all of the devices into Instruction
Register mode, which connects all of their instruction
registers in series. It then clocks a zero followed by
a long string of ones through the chain, which allows
it to count the total number of instruction register bits
across all of the devices.
All
ones is the standard instruction for device bypass, which
means that in Data Register mode, each device will introduce
only a single bit of delay in the JTAG chain. So the software
next puts all of the devices into Data Register mode and
once again counts the total number of bits in the chain,
which now corresponds to the number of devices in the
chain.
Contributor: David Tweed
Published
March 2004