The Best Time to Find a Testability Problem Is Before the PCB Exists
Last week, we looked at some of the design decisions that can significantly increase Boundary Scan test coverage.
Accessible resets.
Controllable enables.
Flexible mode pins.
A well-considered JTAG architecture.
Individually, these can seem like relatively small details.
But there is an important question that comes before all of them:
When should you actually check whether your board is testable?
The answer is simple.
Before the design is finished.
Because once the PCB has been laid out, manufactured and assembled, many of the decisions that determine testability have already been made.
Testability Should Be Reviewed Like Any Other Design Requirement
Engineering teams routinely review a design for things such as:
- Signal integrity
- Power integrity
- Component availability
- Thermal performance
- EMC
- Manufacturability
Testability deserves the same consideration.
Yet it is still common for the question:
“How are we going to test this?”
to be asked only after the design is complete.
At that point, the answer may be constrained by decisions made months earlier.
A much better approach is to make testability part of the design review itself.
Start with the JTAG Chain
The obvious place to begin is the JTAG architecture.
Are all the intended devices present in the chain?
Are TDI, TDO, TMS and TCK connected correctly?
How will the test system connect to the JTAG signals? Are there sufficient ground connections nearby?
Are appropriate pull-up,pull-down and signal termination options available where required?
Can every device in the chain be powered when JTAG access is needed?
Could one unpowered or optional device prevent access to everything else?
And on a more complex PCB, would separating devices into several chains provide greater flexibility?
These are much easier questions to answer while looking at a schematic than while diagnosing a board that will not respond to JTAG.
Then Look Beyond JTAG
The JTAG chain is only the beginning.
The greater opportunity is to look at what the Boundary Scan-enabled devices can reach.
Take an FPGA, processor or SoC and examine the circuitry around it.
What memories are connected?
What peripherals?
What control signals?
What analogue interfaces?
What external connectors?
Each accessible pin potentially provides another route into the hardware.
The objective is not simply to confirm that Boundary Scan is present.
It is to understand how far that access can extend into the rest of the design.
Ask What Can Be Controlled
For every important area of the PCB, ask whether the signals required to operate it can be controlled.
That might include:
- Chip selects
- Resets
- Enables
- Multiplexer controls
- Mode-selection pins
- Power-enable signals
Consider a peripheral that is connected perfectly to a Boundary Scan-enabled FPGA.
If the peripheral’s reset signal is controlled elsewhere and cannot be released without application software, much of that potential test access may be lost.
The connection is there.
The opportunity to test it is there.
But one control signal has effectively closed the door.
Ask What Can Be Observed
Control is only half of the story.
You also need to consider what can be observed.
If you drive a signal, how will you know whether the expected result occurred?
Sometimes another Boundary Scan device provides the observation point.
Sometimes it may be a non-JTAG component whose behaviour can be read back.
An ADC may allow a voltage to be measured.
An Ethernet PHY may provide status information.
A memory can return data that has previously been written.
The more opportunities you have to both control and observe the hardware, the more confidence your tests can provide.
Think About the Board in Its Test State
One useful exercise is to stop thinking about the PCB in normal operation for a moment.
Instead, imagine the board while it is being tested.
Which power rails are active?
Which devices are in reset?
What state are the buffers in?
Are level translators enabled?
Is the watchdog running?
Which boot mode has been selected?
Can the processor or FPGA inadvertently interfere with the test?
The board may need to occupy a very different state during structural testing from the state it uses in normal operation.
Designing so that this state can be achieved deliberately can make testing much simpler.
Look for the Small Changes with the Biggest Impact
One of the reasons to perform this review early is that improvements are often surprisingly inexpensive.
You may discover that adding:
- A resistor option
- A zero-ohm link
- An accessible enable
- An alternative mode selection
- A way of disabling a watchdog
- A different JTAG chain arrangement
could unlock test access to an entire section of the board.
During schematic design, that change might take minutes.
After manufacture, it might require soldering modifications, a PCB re-spin or simply accepting that the area cannot easily be tested.
Bring the Test Engineer into the Conversation
There is another benefit to doing this review early.
It gives the people who will eventually test the product an opportunity to influence the design while changes are still possible.
A test engineer looking at a schematic may ask very different questions from a hardware designer.
How will I isolate this section?
Can I force that device into the state I need?
How will I determine whether this interface is working?
What happens if this device is not fitted?
Can I access this signal without application software?
Those questions can reveal opportunities that are easy to miss when the design is considered purely from a functional perspective.
The Question You Don’t Want to Hear Too Late
There is a familiar moment in many product developments.
After months of design, layout, prototype manufacture and board bring-up, the first working system is finally ready.
The design works.
The software runs.
Everyone is pleased with the result.
Then the design is handed to the contract manufacturer and someone asks:
“How are we going to test these boards?”
It sounds like a simple question, but by this stage many of the answers have already been designed into or out of the PCB.
The test engineer can only work with the access, control and observation that the finished design provides.
A coverage review earlier in the project changes that conversation completely.
Instead of asking how to test a finished product, the team can ask while the schematic is still being developed:
Which areas can we test already?
Where are the gaps?
What additional access would make the test engineer’s job easier?
And what small changes could make those areas accessible?
Those are much easier questions to answer before the first PCB exists.
And the benefits aren’t limited to production testing.
The same additional access can help the development team during initial board bring-up, give manufacturing engineers better diagnostics when individual boards fail and provide service teams with more options later in the product’s life.
Don’t Wait Until the Test Development Phase
If the first time a test engineer sees the board is after the design has been released, their options are already limited.
They can develop tests around the access that exists.
They cannot easily create access that was never designed in.
This is why Design for Test isn’t simply about making the test engineer’s job easier.
It is about giving the organisation more options.
More options during bring-up.
More options during manufacturing.
More options when diagnosing failures.
And more options when products eventually return from the field.
Closing Thought
There will always be parts of a complex PCB that require different test techniques.
The objective isn’t necessarily to achieve 100% Boundary Scan coverage.
The objective is to understand the testability you have, identify opportunities to improve it and make those decisions while the design can still be changed.
A board shouldn’t simply be designed to work.
It should also be designed so that engineers can establish why it works or why it doesn’t.
Because the difference between discovering a testability problem on the schematic and discovering it on an assembled PCB can be enormous.
The cheapest testability problem you’ll ever fix is the one you find before the board is built.
Board Design Tip of the Week
Before your next schematic is released for layout, invite someone responsible for bring-up or production test to review it.
Don’t simply ask:
“Does the JTAG chain look right?”
Ask:
“If this board doesn’t work, what will you need access to in order to find out why?”
And:
“When we hand this design to manufacturing, have we given the test engineer enough control and visibility to build an effective test?”
Those questions can uncover small design changes that make life considerably easier for everyone who has to bring up, test, manufacture or support the product later.
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:
