Testing and Programming PCBA’s
during Design and in Production
Hogeschool van Arnhem en Nijmegen
6 June 2013
Rob Staals
JTAG Technologies
The importance of Testing
juni ’13 Copyright 2013, JTAG Technologies ©
2
• Don’t ship bad boards to your customers, find problems before your
customers do.
• DOA’s (Death On Arrival) lead to huge costs (rule of ten)
The "rule of ten" specifies that it costs 10 times more
to find and repair a defect at the next stage of assembly.
the part itself
1 €
at sub-assembly
10 €
at final assembly
100 €
at the dealer/distributor
1.000 €
at the customer
10.000 €
•
Important to find defects in an early stage.
What are you testing
Simplified statement:
If all components are correctly soldered
- the board should work
Assuming:
Design is right
Components are OK (1ppm - .1ppm)
Conclusion:
Testing the interconnections should be sufficient to
Error analysis based on real PCBA production data
juni ’13 Copyright 2013, JTAG Technologies ©
4
26%
17%
12%
9%
10%
7%
6%
13%
Shorts incl.
SA1/SA0
Opens
Not placed
Upside
down
Careless
placement
Component
defect
Tombstoning
Others
Commonly used Testmethods
Commonly used Testmethods
juni ’13 Copyright 2013, JTAG Technologies ©
6
Commonly used Testmethods
Commonly used Testmethods
juni ’13 Copyright 2013, JTAG Technologies ©
8
Commonly used Testmethods
Functional vs Structural Test
juni ’13 Copyright 2013, JTAG Technologies ©
10
Functional Test
• Checks every function of the board
(interconnects are implicitly tested) - Manual creation of the tests
- Very difficult to diagnose, doesn’t pinpoint to the exact location of the problem - Requires highly skilled engineers
- Time consuming - Expensive
+ @Speed test, very good as final test to check specifications
Structural Test (AOI, AXI, FP and ICT)
• Checks the structure of the board
(interconnects, device orientation, device values etc.) - No @Speed test
+ Automatic generation based on the Netlist + Low cost
+ Pinpoints to the exact location of the problem
FP and ICT interconnection test
The probes of a Flying Prober and In Circuit Tester are connected to a measurement system.
Compare this with the probes of a multimeter.
Moving around with the probes will pinpoint to the exact location of the interconnection problem.
How to perform a Structural Test on a board
containing Hi-density devices like BGA’s
juni ’13 Copyright 2013, JTAG Technologies ©
12
The probes of a Flying Prober or In Circuit Tester require a minimum clearance and have no access to the BGA pins
Boundary-scan
is the solution to the access problem
juni ’13 Copyright 2013, JTAG Technologies ©
14
What is Boundary-scan and how does it work
Official standard:
IEEE Std. 1149.1-1990
Boundary-scan architecture
Core
The Boundary-scan architecture is a standard implementation in many devices, such as µControllers, DSPs, FPGAs etc..
I/0 I/0 I/0
I/0 I/0 I/0
I/0 I/0
Boundary-scan architecture
juni ’13 Copyright 2013, JTAG Technologies ©
16 Controller Instruction register Bypass TDI TMS TCK TRST Optional TDO Core Boundary-Scan Register BSR
TDI Test Data In
TDO Test Data Out
TMS Test Mode Select
TCK Test Clock
TRST Test Reset
Additional Testlogic and pins have been added
I/0 I/0 I/0
I/0 I/0 I/0
I/0 I/0
Via TDI a Testvectors is shifted into the BSR
Instruction register Bypass TDI TDO Core 110011110 TestvectorShift-in Testvector via TDI
juni ’13 Copyright 2013, JTAG Technologies ©
18 0 Controller Instruction register Bypass TDI TMS TCK TRST Optional TDO Core →11001111 Shift
Shift-in Testvector via TDI
0 1 Instruction register Bypass TDI TDO Core→
1100111 ShiftShift-in Testvector via TDI
juni ’13 Copyright 2013, JTAG Technologies ©
20 0 1 1 Controller Instruction register Bypass TDI TMS TCK TRST Optional TDO Core →110011 Shift
Shift-in Testvector via TDI
1 1 1 0 Instruction register Bypass TDI TDO Core →→11001 ShiftShift-in Testvector via TDI
juni ’13 Copyright 2013, JTAG Technologies ©
22 1 1 1 1 0 Controller Instruction register Bypass TDI TMS TCK TRST Optional TDO Core →→1100 Shift
Shift-in Testvector via TDI
1 1 0 1 1 0 Instruction register Bypass TDI TDO Core →→→110 ShiftShift-in Testvector via TDI
juni ’13 Copyright 2013, JTAG Technologies ©
24 1 0 0 0 1 1 1 Controller Instruction register Bypass TDI TMS TCK TRST Optional TDO Core →→→→11 Shift
Shift-in Testvector via TDI
0 0 1 1 0 1 1 1 Instruction register Bypass TDI TDO Core→→→
1 ShiftShift-in Testvector via TDI
juni ’13 Copyright 2013, JTAG Technologies ©
26 0 1 1 1 1 0 0 1 1 Controller Instruction register Bypass TDI TMS TCK TRST Optional TDO Core Shift →→→→
UPDATE drives the BSR data
onto all pins simultaneously
0 1 1 1 1 0 0 1 1 Instruction register Bypass TDI TDO Core Update
0
1
1
0
1
1
1
1
1
UPDATE command
juni ’13 Copyright 2013, JTAG Technologies ©
28
The UPDATE command can be compared with one probe of the multimeter, but than for all Bscan I/O pins
simultaneously (hundreds – thousands pins).
However for a proper interconnection measurement a second probe is required.
CAPTURE simultaneously senses
the values on the pins and stores it in the BSR
Instruction register Bypass TDI TDO Core
1
1
0
1
0
1
0
1
0
The nets are at a certain logic level.
CAPTURE simultaneously senses
the values on the pins and stores it in the BSR
juni ’13 Copyright 2013, JTAG Technologies ©
30 1 1 0 0 1 0 1 0 1 Controller Instruction register Bypass TDI TMS TCK TRST Optional TDO Core Capture
1
1
0
1
0
1
0
1
0
CAPTURE command
The Capture command can be compared with the second probe of the multimeter, but than for all Bscan I/O pins simultaneously.
The UPDATE and CAPTURE commands provides direct access to hundreds or thousands I/O pins.
Shift-out captured data
juni ’13 Copyright 2013, JTAG Technologies ©
32
After the values on the pins have been captured into the BSR the result is shifted out via TDO. The result can be compared with the expected data. Any difference pin-points to the error location.
Shift-out Captured data via TDO
1 0 1 1 0 1 1 1 0 Instruction register Bypass TDI TDO Core Shift 0 ResultShift-out Captured data via TDO
juni ’13 Copyright 2013, JTAG Technologies ©
34 0 1 1 0 1 0 1 1 1 Controller Instruction register Bypass TDI TMS TCK TRST Optional TDO Core Shift 10 Result
Shift-out Captured data via TDO
1 1 1 1 0 1 0 1 1 Instruction register Bypass TDI TDO Core Shift 010 ResultShift-out Captured data via TDO
juni ’13 Copyright 2013, JTAG Technologies ©
36 1 1 1 1 1 0 1 0 1 Controller Instruction register Bypass TDI TMS TCK TRST Optional TDO Core Shift 1010 Result
Shift-out Captured data via TDO
1 1 1 1 1 1 1 1 0 Instruction register Bypass TDI TDO Core Shift 01010 ResultShift-out Captured data via TDO
juni ’13 Copyright 2013, JTAG Technologies ©
38 1 1 1 0 1 1 1 1 1 Controller Instruction register Bypass TDI TMS TCK TRST Optional TDO Core Shift 101010 Result
Shift-out Captured data via TDO
1 1 1 1 0 1 1 1 1 Instruction register Bypass TDI TDO Core Shift 1101010 ResultShift-out Captured data via TDO
juni ’13 Copyright 2013, JTAG Technologies ©
40 1 1 1 1 1 0 1 1 1 Controller Instruction register Bypass TDI TMS TCK TRST Optional TDO Core Shift 11101010 Result
Compare Captured data
with expected result
1 1 1 1 1 1 1 1 1 Instruction register Bypass TDI TDO Core 010001010 Result 011101010 Expected
Example 1
juni ’13 Copyright 2013, JTAG Technologies ©
42
Test interconnections between Bscan devices
Core BP IR Controller Core BP IR Controller TDI TDO TMS TCK TDO TDI IC1 IC2Calculate the required Testvector
juni ’13 Copyright 2013, JTAG Technologies ©
44 Core BP IR Controller Core BP IR Controller TDI TDO TMS TCK TDO TDI IC1 IC2
1. Calculate Testvector for testing the interconnects xx11111xx
Shift-in testvector via TDI
Core BP IR Controller Core BP IR Controller TDI TDO TMS TCK TDO TDI IC1 IC2 SHIFT 1 1 1 1 1 xx11111xx TestvectorUPDATE
juni ’13 Copyright 2013, JTAG Technologies ©
46 Core BP IR Controller Core BP IR Controller TDI TDO TMS TCK TDO TDI IC1 IC2
3. The UPDATE command drives the testvector onto the pins of IC1 and thus on the corresponding nets.
UPDATE 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 xx11111xx Testvector
CAPTURE
Core BP IR Controller Core BP IR Controller TDI TDO TMS TCK TDO TDI IC1 IC2 CAPTURE 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 xx11111xx TestvectorShift-out result and compare with expected
juni ’13 Copyright 2013, JTAG Technologies ©
48 Core BP IR Controller Core BP IR Controller TDI TDO TMS TCK TDO TDI IC1 IC2
5. The Captured result is shifted-out on TDO and compared with the expected value.
Any mismatch pin-points to the location of the failure. SHIFT 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 Mismatch xx11111xx Testvector xx10111xx Result Caused by an open underneath this pin
Compare Result with Expected
and Diagnose
Errors are shown in inverse video. In this case the result was a 0 however a 1 was expected.
The diagnostics pin-points to the exact error location
Faultdetection
juni ’13 Copyright 2013, JTAG Technologies ©
50
With the aid of Intelligent testvectors
Opens
Shorts
SA1 and SA0
problems are easily detected
The Intelligent testvectors are based on an Enhanced Binary Search principle.
Bscan Bscan
Testing connectivity of
Non-Bscan components
TDI Boundary-scan chain Non-BscanBscan Bscan
Testing connectivity
NAND Gate
juni ’13 Copyright 2013, JTAG Technologies ©
52 TDI TDO Boundary-scan chain
&
Use Truthtable to stimulate the inputs and sense the outputs of the NAND using the Bscan cells.
A model contains information about the Truthtable. A B Y A B Y 0 0 1 0 1 1 1 0 1 1 1 0
Bscan Bscan
Testing connectivity
MEMORY
TDI Boundary-scan chainRAM
ADD Ctrl DATABscan Bscan
Testing connectivity
FLASH
juni ’13 Copyright 2013, JTAG Technologies ©
54 TDI TDO Boundary-scan chain
FLASH
A model contains all the information on how to get access to the FLASH. ADD
Ctrl
Bscan Bscan
Testing connectivity
I/O plus Connector (1)
TDI Boundary-scan chain I/O C on ne ct or Loo p Ba ck C on n ec tor
Bscan Bscan
Testing connectivity
I/O plus Connector (2)
juni ’13 Copyright 2013, JTAG Technologies ©
56 TDI TDO
Boundary-scan chain
Use an external Bscan board with required # of I/O pins to get full access.
I/O C on ne ct or Ex ter n al Bs ca n b oa rd
Bscan Bscan
Testing connectivity
serial devices like I2C, SPI etc.
TDI Boundary-scan chain
I2C
SDA SLCUsing the JTAG interface for
Programming
juni ’13 Copyright 2013, JTAG Technologies ©
58
Programming
CPLD and FPGA
JTAG Logic
Programming
CPLD and FPGA
juni ’13 Copyright 2013, JTAG Technologies ©
60
JTAG Interface
Programming
CPLD and FPGA
Bscan Bscan
Programming
external FLASH
juni ’13 Copyright 2013, JTAG Technologies ©
62 TDI TDO Boundary-scan chain
FLASH
The Image file gets integrated in the Bscan Addr-Data-Ctrl patterns to program the FLASH. ADD
Ctrl
Programming
Embedded Flash
JTAG Internal FLASH µController CoreDemonstration
juni ’13 Copyright 2013, JTAG Technologies ©
Full access through the TAP
juni ’13 Copyright 2013, JTAG Technologies ©
66
Software tools
JTAG Live Buzz
Supported controllers
juni ’13 Copyright 2013, JTAG Technologies ©