C7 · Lesson 32 · Testing and fault models
Finding the chips that came out of the factory broken
Every wafer has defects: a speck of dust, a short between wires, a missing contact. Some chips come out broken, and the only way to find them is to apply inputs and compare the outputs with what a good chip would give. A chip with millions of gates can't be tested exhaustively, so test engineers use a model of what goes wrong, choose inputs that would expose each modeled fault, and design the chip so those inputs can reach deep inside.
Play
- The circuit computes . Switch F on to break it: the AND gate's output becomes stuck at 0.
- With the fault on, compare y with the fault-free output y0 in the table. Which input rows show a difference?
- Only those rows are tests for this fault. Find the one input that exposes it.
Predict
In , the AND gate's output is stuck at 0. Which input exposes the fault?
A = 1, B = 1, C = 0. The test must do two things: excite the fault, by making the good AND output 1 so that stuck-at-0 differs from it (A = B = 1), and propagate the difference to the output, by holding the OR's other input at 0 (C = 0) so the OR passes it through. With C = 1 the output is 1 either way and the fault hides.
Name it
The stuck-at model
Each node of the circuit might be stuck at 0 or stuck at 1: two faults per node. Real defects (shorts, opens, slow transitions) are more varied, but tests that catch every stuck-at fault catch most of them too. A test vector detects a fault if the faulty circuit's output differs from the good one's; finding it means exciting the fault (driving the node to the opposite value) and propagating the difference to an output (setting the other inputs of every gate on the way so they pass it).
Coverage and defect level
Fault coverage is the fraction of modeled faults the test set detects. Untested faults let some bad chips escape. With a manufacturing yield Y (the fraction of good chips) and coverage FC, the fraction of shipped chips that are bad is about
the Williams–Brown defect level, usually quoted in parts per million.
Design for test
- Scan: every flip-flop gets a multiplexer that, in test mode, links them into a long shift register. Patterns are shifted in, one clock captures the logic's response, and the result is shifted out. Sequential logic becomes combinational logic for testing.
- Built-in self-test (BIST): an LFSR (lesson 31) generates pseudorandom patterns on the chip, and a multiple-input signature register compresses the responses into one word to compare with the good chip's signature.
Worked example
Find a minimal test set for all ten single stuck-at faults of (A, B, C, the AND output n, and y).
Show the solution
- Vector 110. It excites n stuck-at-0 and also exposes A and B stuck-at-0 and y stuck-at-0: four faults, 40% coverage.
- Vector 010. The good output is 0, so it exposes A stuck-at-1 (n becomes 1), n stuck-at-1, C stuck-at-1 and y stuck-at-1.
- Vector 100. It exposes B stuck-at-1.
- Vector 001. It exposes C stuck-at-0.
- Put them together. {110, 010, 100, 001} detect all ten: four vectors instead of all eight.
Answer {110, 010, 100, 001}, four vectors.
Worked example
A chip has a yield of 90%. What defect level ships with 95% fault coverage, and with 99%?
Show the solution
- At 95% coverage. or 5250 parts per million.
- At 99% coverage. or 1050 ppm.
- Why the last percent matters. Each extra percent of coverage near the top removes a large share of the escapes, which is why automotive parts, which aim at a few ppm, push coverage close to 100%.
- At a lower yield. At 50% yield, the same 95% coverage would ship 3.4% bad parts.
Answer 0.53% (5250 ppm) at 95% coverage, and 0.11% (1050 ppm) at 99%.
Worked example
A chip has 10,000 scan flip-flops in 10 chains of 1000, and needs 2000 patterns. At a 50 MHz scan clock, how long does the test take?
Show the solution
- Clocks per pattern. Each pattern shifts 1000 bits into every chain at once (the next pattern's shift-in overlaps the last one's shift-out), so about 1000 clocks per pattern.
- Total clocks.
- Time.
- Why it matters. Test time is money on an expensive tester, so designs use many short chains and compress the patterns on the chip.
Answer about 40 ms.
Check
A chip yields 0.8 and is tested with 0.9 fault coverage.
(a)
What defect level ships?
(b)
How many bad parts per million would ship with no testing at all?
Check
A chip has 2000 scan flip-flops in 10 equal chains and needs 5000 patterns, shifted at 100 MHz.
(a)
How long is each chain?
(b)
About how long does the test take?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
Check
A netlist has 1000 nodes. How many single stuck-at faults does the model list?
Check
A test for a stuck-at-1 fault on input A of a two-input AND gate must set:
Check
A chip yields Y and is tested with fault coverage F.
Step 1
What fraction of shipped chips is bad?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What coverage achieves a defect level D?
Check
Write coverage(tests) for the circuit : each test is a 3-bit integer ABC (A the top bit); consider the ten single stuck-at faults on A, B, C, n = AB and y, and return the fraction detected.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Explain why
Why does a test vector for a fault have to both excite the fault and propagate it?
A fault only matters if it makes the circuit compute something different. To see a stuck-at-0 fault on a node, the test must drive that node to 1 in the good circuit, otherwise the good and faulty circuits agree there and nothing is different to see. Then the difference has to reach an output: every gate between the node and the output must have its other inputs set so it passes the change through, like a 1 on the other input of an AND or a 0 on the other input of an OR. If any gate on the way masks it, the outputs agree and the fault stays hidden, so a test must do both at once.
Practice
Keep practicing
4 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.