Using the BYPASS Instruction

There are many misconceptions about the BYPASS instruction—most are related to
what happens with the boundary-scan device IO pins after a device is placed in
BYPASS. Often BYPASS is one of the first options that test developers look at
when debugging projects, but the consequences of putting a device in BYPASS are
misunderstood or overlooked. To help build up our understanding of debug
techniques, let’s look at what the BYPASS instruction does and when we can use

What is the BYPASS Instruction?

Let’s begin by looking at our
JTAG Tutorial’s description of the BYPASS

BYPASS Instruction
Using the BYPASS instruction, a device’s boundary scan chain can be skipped,
allowing the data to pass through the bypass register. This allows efficient
testing of a selected device without incurring the overhead of traversing
through other devices. The BYPASS instruction allows an IEEE 1149.1 compliant
device to remain in a functional mode and selects the bypass register to be
connected between the TDI and TDO pins. Serial data is allowed to be transferred
through a device from the TDI pin to the TDO pin without affecting the operation
of the device.

The BYPASS instruction bypasses the boundary-scan register and, at the same
time, causes the device to perform its system function. In other words, a device
in BYPASS is in functional mode and will continue to do whatever it is that it
normally does.

Consider the simplified diagram below, with the active sections highlighted in

Boundary-scan device in BYPASS mode.

Figure 1: Boundary-scan device in BYPASS mode.

The system logic will act on device inputs and control device outputs.
Boundary-scan chain operations will only see the bypass register, shortening the
effective scan chain and speeding up overall test execution speed for those
steps that do not require the bypassed device.

Applications – Why use BYPASS?

Debugging Scan Chain Problems
One of the first steps in debugging a scan chain is BYPASSing an offending
device or what looks like it may be an offending device. By placing certain
devices in BYPASS, we can isolate problems with the scan chain.

For example:
Every time we run boundary-scan tests, the board powers down. After placing a
particular CPLD in BYPASS, we notice that the board stays powered up. After
further investigation into the system design, we realize that the CPLD is
enabling power to certain sections of the board.

When debugging a scan chain and putting devices in BYPASS, always remember that
the BYPASSed device will be performing its system function—for example, a CPU
will be executing instructions. This is useful for spotting problems or perhaps
identifying a boundary-scan device that needs to be in functional mode to enable
power to the system.

Debugging Boundary-scan IO Problems
If instead you want to isolate the IO pin behavior of the device, see if the
device supports the HIGHZ instruction. This will cause the device to enter test
mode and tri-state its output pins. The HIGHZ instruction is useful for
identifying bus contention where two devices may be driving the same net. By
causing one device to tri-state, it can often be identified as a source of
contention when the contention problem goes away, or eliminated as a suspect
when it does not.

As we covered in our Flash Programming Time series, devices can be placed in
BYPASS to shorten the effective scan chain.
ScanExpress TPG will automatically
BYPASS, HIGHZ, or CLAMP as many devices possible when creating Flash test steps.
Note that for the same reasons we’ve discussed, HIGHZ and CLAMP may be
preferable to BYPASS to prevent contention by tri-stating the output pins (HIGHZ)
or by holding a constraint without having to scan the entire BSR (CLAMP).

Note: We talk about BYPASS and the bypass register and while they are related,
it should be noted that the bypass register is used for more than just the
BYPASS instruction. CLAMP and HIGHZ instructions also select the bypass register
and shorten the effective scan chain length.

Functional Cluster Test
Putting a device in functional mode allows you to test its functional behavior
with boundary-scan. For example, you may have memory attached to the scan chain.
For both optimum structural test coverage and some low-speed functional testing,
the memory can be placed in BYPASS and tested as a memory cluster in addition to
the standard interconnect, buswire, and pu/pd tests.

BYPASS is a useful tool as long as we consider the consequences of keeping the
device in functional mode. Don’t underestimate the usefulness of CLAMP and HIGHZ
when they’re available—these instructions can be just as useful as BYPASS,
especially for optimization purposes. Have any stories about using the BYPASS
mode of a device to help debug a project? Let us know!

Published On: January 6, 2011Categories: Corelis Boundary-Scan Blog, JTAG Boundary-Scan

Share This Story, Choose Your Platform!