How to Increase Boundary Scan Test Coverage

Image of CEO of XJTAG Simon Payne Simon Payne, CEO, XJTAG |  Subscribe to LinkedIn newsletter
XJTAG Testing Times cartoon - Guilty as charged

Last week, we looked at how much of a PCB Boundary Scan can potentially test.

The answer can be surprisingly large.

A single processor, FPGA or SoC may provide access to memories, peripherals, interfaces and other circuitry far beyond the JTAG chain itself.

But the amount of useful test coverage you achieve isn’t determined by the semiconductor devices alone.

Many of the decisions made during schematic design can significantly increase how much of the finished board can ultimately be tested.

And in many cases, relatively small design choices can make a surprisingly large difference.

Start with the Boundary Scan Capability You Already Have

The first step is to understand the Boundary Scan capability provided by the major semiconductor devices in the design.

Processors, FPGAs, SoCs, CPLDs and many other devices may already provide control and observation of a large number of their digital pins.

Those pins effectively become potential test access points into the PCB.

Rather than simply asking:

“Which devices support JTAG?”

it is more useful to ask:

“What parts of the board can I reach through those devices?”

That shift in thinking is important because the useful reach of Boundary Scan can extend considerably beyond the devices in the JTAG chain.

Maximise Control and Observation

At the heart of structural testing are two simple capabilities:

Control can a signal be driven into a known state?

Observation can the resulting state be measured somewhere else?

The more opportunities a design provides for both, the greater the potential test coverage.

A connection between two Boundary Scan devices is an obvious example. One device may drive the signal while another observes it.

But the same principle can also extend into non-JTAG circuitry.

A Boundary Scan-enabled FPGA, for example, may provide the control signals needed to interact with a memory or peripheral, allowing a much larger section of the design to be tested.

Thinking about where signals can be controlled and observed during schematic design can therefore have a significant impact later.

Make Mode Pins Work for You

Configuration, boot and mode-selection pins are often treated as something that only needs to be correct for normal operation.

But providing some flexibility around these signals can considerably improve testability.

A device may need to be placed into a particular operating mode before an interface can be exercised.

If the required mode is permanently hard-wired, the options available during bring-up and test may be limited.

Providing resistor options or other suitable configuration choices, such as switches or off-board access to such signals, can allow engineers to select alternative modes when required.

These are often very inexpensive additions during design.

Once the PCB has been manufactured, however, the same flexibility can be difficult

to add.

Keep Resets and Enables Accessible

Resets and enables can have a disproportionate effect on test coverage.

Imagine an FPGA provides excellent Boundary Scan access to a peripheral.

If that peripheral is permanently held in reset until application software releases it, much of that potential test capability may be unavailable before the application runs.

Where appropriate, providing a means of controlling important resets and enable signals through accessible circuitry can make more of the board testable independently of the application.

The same applies to:

  • Buffers
  • Multiplexers
  • Level translators
  • Peripheral enables

Making these signals controllable can open test paths into much larger sections of the PCB.

When a watchdog circuit is present also make sure that it can be completely disabled to avoid problems with unexpected resets whilst running tests.

Think About Power Domains

Designs frequently contain multiple voltage rails and independently controlled power domains.

With a little planning, these don’t need to become barriers to testing.

Consider which devices need to be powered for a particular test and how those power domains are enabled.

Where level translators or isolation devices sit between domains, consider what state they will occupy during Boundary Scan testing and whether the relevant signals can still propagate.

The objective isn’t necessarily to power the entire product for every test.

In some cases, being able to deliberately bring up individual sections of the board can actually make testing more controlled and informative.

Design the JTAG Chain for the Product

The structure of the JTAG chain itself deserves consideration.

On a simple board, placing all Boundary Scan devices in a single chain may be entirely appropriate.

On a more complex system, several chains may offer advantages.

Separating devices can provide greater flexibility when different parts of the board are powered independently, when devices are optional, or when different areas of the product need to be accessed separately.

There is no universal JTAG architecture that suits every design.

The important thing is to make the decision deliberately, based on how the board will be developed, programmed, tested, manufactured and supported.

Use Boundary Scan Devices as Gateways

One of the most effective ways of increasing coverage is to stop thinking of Boundary Scan devices as the only things being tested.

Instead, think of them as gateways into the surrounding circuitry.

If an FPGA is connected to a memory, Boundary Scan access through the FPGA may allow that memory to be exercised.

If it connects to an ADC, it may be possible to read analogue measurements.

If it controls a DAC, known output values may be generated.

If it connects to an Ethernet PHY, the device may potentially be configured and its behaviour checked.

The Boundary Scan device provides the access.

The surrounding circuitry provides additional opportunities for testing.

This is how a relatively small number of JTAG-enabled devices can potentially provide visibility across a much larger proportion of the PCB.

Combine Boundary Scan with Other Test Methods

Increasing test coverage doesn’t mean trying to make Boundary Scan test absolutely everything.

Some parts of a design are naturally better suited to functional testing, measurement equipment or other test techniques.

The stronger approach is to understand what Boundary Scan can prove and use complementary methods for the remaining areas.

Boundary Scan might establish confidence in the underlying PCB connectivity.

Functional software can then prove that the completed system behaves correctly.

Oscilloscopes and other instrumentation can investigate areas where electrical measurements are required.

Each method contributes different information.

Together, they provide much greater confidence in the finished hardware.

Analyse Coverage Before the PCB Is Built

Perhaps the greatest opportunity to improve Boundary Scan coverage exists before layout is complete.

If testability is considered while the schematic is still being developed, engineers can identify areas where small changes could provide considerably greater access.

That might mean:

  • Making a reset controllable
  • Providing access to a mode pin or an important control signal
  • Changing the way a buffer is enabled
  • Reconsidering the JTAG chain architecture
  • Selecting a device with better Boundary Scan support

At this stage, these changes may be trivial.

After manufacture, they may require modifications or another PCB revision.

Designing for Greater Confidence

Throughout this series, we’ve repeatedly returned to the idea of building confidence in the hardware.

Increasing Boundary Scan coverage helps engineers establish that confidence across a greater proportion of the board.

More accessible signals mean more connections can be verified.

More controllable devices mean more circuitry can be exercised.

And greater coverage means fewer areas of uncertainty when the first prototype arrives.

Good testability doesn’t necessarily require major changes to the design.

Often, it simply requires asking the right questions early enough.

Closing Thought

The Boundary Scan capability inside your semiconductor devices is the starting point.

The PCB design determines how far that capability can reach.

By considering control, observation, mode selection, resets, power domains and JTAG architecture during design, engineers can significantly increase the amount of hardware that can be tested.

And the best time to create that additional visibility isn’t when a board has failed.

It’s while the schematic is still open in front of you.

Don’t Hand the Test Team a Finished Problem

It is easy to think of testing as something that happens after the hardware design is complete.

But by then, many of the decisions that determine what can and cannot be tested have already been made.

If test engineers are brought into the conversation earlier, relatively small design changes can provide significantly greater control, observation and diagnostic access.

That helps during the first board bring-up and gives the test team far more freedom when developing manufacturing tests later.

Rather than handing test engineers a finished board and asking them to find a way to test it, give them the access they need while there is still time to design it in.

That means thinking about testability as part o f the design process rather than something that is added one the design is completed.


Board Design Tip of the Week

During your next schematic review, pick one important non-JTAG device, perhaps a memory, peripheral or interface and work backwards from it.

Ask:

Can I control the signals it needs?

Can I observe enough of its behaviour to know whether it is working?

Can I put the surrounding circuitry into the state required to test it?

If the answer to any of those questions is no, look at whether a small design change could turn that part of the PCB into something you can test. It may be worthwhile making that change even if the additional access is not needed during normal operation, because it could provide valuable visibility during development, manufacturing test or fault diagnosis.

Sometimes a single resistor option, enable signal or accessible control pin can unlock considerably more Boundary Scan coverage.ould boundary scan make your next board easier to test?


Could boundary scan save time on your next design?

Discover how boundary scan can help you improve test coverage, diagnose faults faster and simplify board testing:

See what you can test with XJTAG.


Discover more about your board design with the Free XJTAG Layout Viewer.

To get started find out how the Free XJTAG Layout Viewer can help you see your board connections:

Download your Free XJTAG Layout Viewer today

Your Development Board Can Do More Than You Think Accelerating product development, protecting your investment and getting a head start on testing your own hardware. Development and evaluation kits from leading semiconductor companies such as AMD and Altera have become an important part of modern product development. Rather than waiting for their own custom hardware to arrive, engineering teams can start evaluating devices, developing firmware, experimenting with interfaces and proving application concepts using an established hardware platform. But there is another opportunity that is perhaps less widely appreciated. Why not use the development board to start developing your test strategy too? Get a Head Start on Product Development One of the biggest advantages of using a development board is that several engineering activities can progress in parallel. While the hardware team is designing the custom PCB, other members of the development team can: Evaluate semiconductor devices and their capabilities Develop and debug firmware Experiment with peripheral devices Evaluate system performance Learn from established reference designs Develop programming and test procedures This can significantly reduce the amount of work that needs to be completed after the first custom PCBs arrive. And the benefits need not stop at firmware development. Development Boards Can Have a Hard Life Some of today's FPGA and SoC development platforms cost thousands of pounds, yet they can spend much of their working lives in relatively demanding environments. Expansion cards are repeatedly fitted and removed, external hardware is connected, power is cycled frequently and experimental configurations are tried. Accidental electrical overstress, connector damage and other hardware problems are all possibilities. Development boards can also have relatively short warranty periods compared with their expected useful life. Even with excellent manufacturer support, being able to independently establish whether your development hardware is still functioning correctly can be extremely valuable. When a board stops behaving as expected, how much time could you spend investigating your firmware before discovering that the problem is actually with the hardware? Look at How Much of the Board Can Be Tested The image at the top of this article illustrates something that often surprises engineers who are unfamiliar with Boundary Scan. Although many of the highlighted components do not themselves support JTAG, they can still be accessed for testing through the Boundary Scan logic within the FPGA or SoC. Using XJTAG, this can include testing connections to and exercising aspects of the functionality of: DDR and other memory devices SPI Flash and EEPROM Ethernet PHYs and CAN transceivers I²C peripherals and power-management devices SD/MMC interfaces LEDs, switches and pushbuttons Clocking devices and oscillators Importantly, the coverage can extend to many of the smaller components that form part of these circuits too. For example, a test that successfully communicates with a peripheral may also provide indirect evidence that associated series resistors, pull resistors, buffers and voltage translators are performing their intended functions. Not every component needs a dedicated test to contribute to the overall test coverage. There is, however, an important distinction between this implied coverage and directly verifying a component's functionality or electrical characteristics. Testing Without Application Firmware XJTAG uses IEEE 1149.1 and, where supported, IEEE 1149.6 Boundary Scan technology to access and test PCB interconnections. This allows engineers to identify faults such as opens, shorts and stuck-at conditions, including on connections beneath BGA devices that may be physically inaccessible. It can also provide access to surrounding non-JTAG circuitry without requiring application firmware or dedicated physical test fixtures. That gives engineers an independent means of checking accessible areas of their development hardware when an application is not behaving as expected. Faster Programming Means Faster Development Another consideration is how often engineers need to reprogram their development hardware. During firmware development, the cycle of modifying code, programming the hardware and checking the results may be repeated many times a day. Reducing programming time can therefore make a meaningful difference to engineering productivity. XJTAG's XJFlash technology uses FPGA-assisted programming to achieve speeds typically limited by the capabilities of the flash memory itself. The same programming techniques can subsequently be incorporated into custom hardware development and production programming. Take Your Tests with You Perhaps one of the greatest opportunities is what happens when you move from the development board to your own PCB. If your custom design uses similar memories, peripherals, power-management devices or communication interfaces, much of the test development work may already have been done. XJTAG's device-centric approach allows existing device tests to be reused or adapted to the new design. This means that, before your first custom PCB has even been manufactured, you could already have developed a significant proportion of the tests needed to begin verifying it. You started your firmware development before your PCB arrived. Why not start your test development too? Closing Thought Development boards are purchased primarily to accelerate product development. But with the right tools, they can also help engineers establish hardware confidence, develop reusable tests, accelerate programming and prepare for the bring-up of their own custom designs. The development board then becomes more than a platform for evaluating semiconductor technology. It becomes a starting point for your product's test strategy. Board Design Tip of the Week If you are using a semiconductor manufacturer's development board as the basis for a new product, don't just study its functional design. Look at how its JTAG interface has been implemented, how its peripherals can be accessed independently of application firmware, and which elements of its test strategy could be transferred to your own hardware. Developing that understanding before completing your schematic could significantly improve the testability of your finished product. Is XJTAG Supporting Your Development Board? We are expanding the range of development and evaluation platforms for which XJTAG provides pre-prepared test and programming projects. These include: AMD Spartan™ UltraScale+™ FPGA SCU35 Evaluation Kit AMD Versal™ AI Edge Series Gen 2 VEK385 Evaluation Kit AMD Versal™ AI Core Series VCK190 Evaluation Kit Explore the individual board test coverage, flash programming performance and available XJTAG projects. Discover which development and evaluation boards XJTAG supports. If your development board isn't currently listed, you can also use this page to request support for your platform.
When JTAG Has Further to Travel: Designing for Larger Boards and Longer Chains Last week, we looked at the basics of JTAG termination. On a relatively small PCB with short signal runs, that may be all you need. But larger boards introduce another challenge. TCK and TMS may have to travel much further across the PCB. They may need to reach devices in several different areas, pass through buffers or feed multiple sections of the design. At that point, the question becomes: How do you preserve reliable JTAG access when the board starts getting bigger? The answer is partly about good signal integrity. But just as importantly, it is about designing in options before you know whether you will need them. Long Traces Change the Problem On a compact board, a single TCK or TMS trace may pass a handful of devices without causing any difficulty. On a physically larger design, simply branching the same signal around the PCB can create long stubs and reflections. That can turn an otherwise simple JTAG interface into something considerably harder to diagnose. Getting termination right matters for two reasons. Reliability: reflections and ringing can stop JTAG working reliably, or lower the maximum TCK frequency the chain can support. Device safety: poorly terminated signals can overshoot or undershoot significantly, potentially exceeding a pin’s absolute maximum ratings and stressing or damaging the device over time. A useful rule is: If splitting TCK or TMS would create significant stubs, use buffers rather than simply branching the trace. The buffer inputs can be connected together, with each buffer output driving its own section of the board. That turns one difficult distribution network into several much simpler point-to-point, or lightly loaded, traces. Treat a Buffer Input Like a JTAG Device Input Adding buffers doesn't change the basic signal-integrity principles. The input to the buffer should effectively be treated in the same way as the input to a JTAG device. That means: Keep the stub to the buffer input short Avoid unnecessary branches If the buffer is the last load on the trace, terminate at the buffer input Treat each buffer output as a new signal path requiring the same consideration This principle works whether you use a star arrangement of buffers across a large board or place several buffers close to the JTAG connector, each feeding a separate area of the PCB. Every new branch should become a controlled trace, not another long stub. Terminate Every Branch at Its End If TCK or TMS is split into several buffered paths, each path needs to be considered independently. Last week, only TCK had RC termination. As the clock, it is edge-sensitive, so reflections or coupled noise that create an extra edge can upset the whole chain. TMS is distributed to every device in the same way as TCK, so on a larger board, long or branched TMS runs can need the same treatment, for the same reliability and device-safety reasons. The usual pull-up still applies. The RC termination should be located at the end of each trace, regardless of whether that trace finishes at: A JTAG device A buffer input Several device inputs A combination of these The important thing is to terminate the trace at its electrical end. In most cases, the RC termination at the end of the trace is all you need. But some buffers drive very fast edges, and these can still cause ringing and overshoot on a long trace. A small series resistor close to the buffer output can help, by slowing the edges slightly and damping reflections at the source. Whether it's needed can be worked out through detailed simulation, but that takes time. It's often simpler to include the footprint to be on the safe side and fit it with 0 Ω initially. That 0 Ω footprint is useful because it gives engineers somewhere to make changes during bring-up if the real board behaves differently from the simulation or expectation. TDO needs a different approach. It isn't RC terminated, but on a large board the TDO-to-TDI connections between devices, and the TDO return to the connector, can be long too. A footprint for a small series resistor - typically around 22 Ω - close to each TDO output gives you a way to control the edges on those runs if they need it. What About TCK Skew? On a large board, TCK will not necessarily reach every device at exactly the same time. Fortunately, JTAG has been designed to tolerate skew between devices in the chain. In practice, increasing skew may eventually mean that TCK has to run at a lower frequency to maintain reliable operation. If this is a concern, there is another useful design consideration. Where practical, arrange the devices in the scan chain so that TDI enters the device with the least TCK delay, and then progresses through devices in approximately increasing order of TCK delay before TDO returns to the controller. That way, any TCK delay between neighbouring devices adds to the timing margin rather than eating into it. With XJTAG hardware, XJLink's Autoskew capability can compensate for delays between TCK and TDO, helping maintain reliable communication without unnecessarily reducing the JTAG clock frequency. And because Autoskew can be applied independently to different TAPs during optimised scans, splitting a very large board into several JTAG chains can provide another useful option. One Chain Isn't Always the Best Answer There is sometimes a tendency to put every JTAG-capable device into one enormous chain. That can work perfectly well. But on a large board, several separate chains may provide advantages. Different chains can serve physically separate regions of the PCB. They can reduce the distance signals need to travel. They can simplify buffering and termination. And they can prevent one problematic section of the design from affecting access to everything else. There is no universal answer. The important thing is to consider the physical board architecture as well as the logical JTAG chain. Build Flexibility into Revision One The first revision is where flexibility matters most. Before the board exists, you don't yet know exactly how those long traces, device inputs, buffers and connectors will behave together on real hardware. Simulation and good design practice will take you a long way. But providing a few low-cost adjustment points gives engineers options if reality turns out to be slightly different. Useful provisions can include: 0 Ω series resistor positions Unfitted termination resistor and capacitor footprints Series resistor footprints on TDO outputs Test points between sections of a scan chain Links that allow sections of a chain to be isolated or bypassed Optional buffer positions where long routes or additional branches may eventually be required Individually, these are tiny design decisions. Collectively, they can turn a difficult JTAG signal-integrity problem into something that can be resolved on the bench rather than through another PCB revision. Closing Thought As boards become larger, JTAG design becomes less about simply connecting TCK, TMS, TDI and TDO and more about how those signals are distributed across the PCB. The underlying rules remain straightforward: Keep stubs short. Buffer where you need to split signals. Terminate each branch at its end. And design in adjustment points before you know you need them. The goal isn't to make the first design unnecessarily complicated. It is to make sure that if a problem appears, you still have options. For more on buffering, fan-out and termination, see the XJTAG Design & Test Guidelines. Board Design Tip of the Week Label every unfitted JTAG footprint on the schematic with its purpose. For example: "TCK RC termination - fit if ringing is seen at U12". Whoever brings up the board may not be the person who designed it. A short note tells them what each footprint is for and when to use it. A footprint nobody understands is a footprint nobody will use. Discover more about your board design with the XJTAG Layout Viewer. To get started find out how the XJTAG Layout Viewer can help you see on your board: Download your XJTAG Layout Viewer today, did I mention it's Free!
Testing Times - PCB engineers in workshop, discussing JTAG termination
You’ve Routed Out JTAG. Now Make Sure It Actually Works Last week, we looked at the importance of making the JTAG capability inside your FPGA, processor or SoC accessible on the PCB. But routing the signals out is only part of the job. Once you've provided access, you also need to make sure the JTAG interface is electrically reliable, and that means thinking about termination. “But JTAG Isn't Particularly Fast...” JTAG is not normally thought of as a high-speed interface. So it can be tempting to route TCK, TMS, TDI and TDO around the board and assume they will simply work. Often they will. But when they don't, the symptoms can be frustratingly intermittent. Devices aren't detected reliably. Programming fails occasionally. Tests work at one clock frequency but not another. Or the JTAG chain works on one PCB and behaves differently on the next. These problems can easily be mistaken for software, device or connection faults when the underlying problem is signal integrity. Pay Particular Attention to TCK TCK is the clock for the JTAG interface, so maintaining a clean clock signal is particularly important. Reflections, noise or poor routing can create unwanted transitions that corrupt communication with devices in the chain. The XJTAG Design & Test Guidelines recommend terminating TCK using a 68 Ω resistor and 100 pF capacitor in series to ground, positioned at the end of the TCK trace furthest from the JTAG connector. The exact implementation should, of course, be considered alongside the devices, PCB design, signal voltages and target TCK frequency being used. The important principle is simple: Don't assume that because JTAG is relatively slow, signal integrity doesn't matter. Give the Other TAP Signals Defined Behaviour Termination isn't only about the clock. TMS and TDI should not be allowed to float, and TDO also deserves attention. The XJTAG guidelines recommend: 10 kΩ pull-ups on TDI and TMS 10 kΩ pull-ups on the TDO of every device A 22 Ω series resistor on the TDO of the final device, close to the device pin If nTRST is used, the guidelines also recommend a pull-down to give it a defined state, and protection against noise that could cause unwanted resets. These are small components. But they can make the difference between a JTAG interface that is consistently reliable and one that produces difficult-to-reproduce problems. Design in the Options One of the most useful things you can do during schematic design is provide the footprints for the appropriate termination components, even if experience later shows that not every component is required. A resistor or capacitor footprint costs very little at the design stage. Trying to add one onto an assembled PCB is rather less convenient. It also gives engineers options during first-board bring-up. If the chain is reliable, excellent. If it isn't, there is somewhere to make controlled adjustments without immediately reaching for wire modifications and a soldering iron. Layout Still Matters Termination cannot compensate for every layout problem. The TAP signals should still be routed sensibly. In particular, avoid unnecessary interaction with noisy signals, keep skew between important TAP signals under control and consider how the JTAG signals travel through buffers or between different voltage domains. The objective isn't to turn JTAG routing into a major PCB design exercise. It is simply to give a useful diagnostic interface the same basic engineering consideration you would give any other digital interface. Larger and more complex boards, with physically long JTAG runs, many devices in the chain or buffered TAP signals, bring some extra considerations. We'll look at those next week. Closing Thought JTAG access is extremely valuable when you need it. But an accessible JTAG connector isn't much help if the signals reaching it are unreliable. The good news is that improving robustness usually doesn't require expensive circuitry. Often it comes down to sensible routing, defined signal states and a handful of inexpensive termination components. Design the access in, then make sure the signals are good enough to use it. Board Design Tip of the Week JTAG termination is only one of many small design decisions that can significantly improve the testability of a PCB. The XJTAG Design & Test Guidelines cover termination, JTAG chain design, connector layout, mode selection, watchdogs, multiple chains, FPGA configuration, test coverage and many other practical Design for Test considerations. Before releasing your next PCB design, take a few minutes to review the guidelines. Read the full XJTAG Design & Test Guidelines on the XJTAG website. Could JTAG boundary scan help you test your next design? Discover how boundary scan can help you improve test coverage, diagnose faults faster and simplify board testing: Find out more about JTAG boundary scan and how it can help you. Discover more about your board design with the XJTAG Layout Viewer. To get started find out how the XJTAG Layout Viewer can help you see on your board: Download your XJTAG Layout Viewer today, did I mention it's Free!