D76 of 7
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

D7 · Lesson 6 · Verification and test

Making sure a design is right before it's built and each chip is good after, simulation, coverage and formal checks, stuck-at faults and fault coverage, the defect level that reaches customers, scan chains and test time, and built-in self-test

Two different questions decide whether a chip ships. Verification asks whether the design is right: does the logic do what the specification says, in every corner case, before a single wafer is made? On large chips it takes more engineers than the design itself. Test asks whether each manufactured chip matches the design: every die off the line is probed, and any with a broken wire or a shorted transistor is thrown away. Both are probability games, because neither can try every possibility, and a few untested faults let a few bad chips through.

  • The defect level, bad chips that pass test, in parts per million, against the test's fault coverage, for a process yield Y: DL=1−Y1−FC (Williams and Brown).
  • Even 99% coverage lets about a thousand bad chips per million through at 90% yield; reaching under 100 ppm takes about 99.9%.
  • Lower yields make it worse, since there are more bad chips for the gaps in coverage to miss.

Predict

A process yields 90% good dies, and the test catches 99% of possible faults. About how many shipped chips per million are defective?

Name it

Verification

  • Simulation runs the RTL against testbenches, increasingly with constrained-random stimulus and self-checking models of the expected behavior.
  • Coverage measures what's been exercised: lines of code, branches, and functional points such as every opcode with every operand type. Random tests hit the last few bins slowly: covering n equally likely bins takes about n(ln⁡n+0.577) random tests on average.
  • Formal verification proves properties mathematically for all inputs, and equivalence checking proves that the synthesized netlist matches the RTL.

Test

Manufacturing defects are modeled as faults, most simply stuck-at faults: a node stuck at 0 or 1. Fault coverage is the fraction of modeled faults a test set detects. The defect level, the fraction of shipped parts that are bad, is

DL=1−Y1−FC

for yield Y and fault coverage FC.

Scan

Testing deep sequential logic through the chip's pins is nearly impossible, so every flip-flop is joined into scan chains: in test mode they form shift registers, so a tester can load any state, run one clock, and shift the result out. Patterns are generated automatically (ATPG). Each pattern costs a shift of the chain's length, so test time is roughly

t=Npatterns×Lchainfshift

and splitting the flip-flops into many short chains in parallel shortens it.

Built-in self-test

Memories and some logic test themselves: on-chip generators produce patterns (march tests for memory, LFSR patterns for logic, C7) and compress the responses into a signature, saving tester time. Spare rows and columns let memories repair themselves.

Worked example

What coverage gets the defect level under 100 ppm at 90% yield? How long does it take to apply 10,000 scan patterns through chains 1000 flip-flops long at 50 MHz?

Show the solution
  1. Coverage for 100 ppm. Solve DL=1−Y1−FC for 1−FC: 1−FC=ln⁡(1−10−4)ln⁡0.9=0.000949 so FC ≥ 99.905%.
  2. Scan time. Each pattern shifts through 1000 flip-flops: 10000×100050MHz=0.2s per chip, which on an expensive tester is real money.

Answer a fault coverage of at least 99.905%, and 0.2 s of scan per chip.

Worked example

A random testbench must hit each of 1000 equally likely coverage bins. About how many tests does it need?

Show the solution
  1. Expected tests. 1000×(ln⁡1000+0.577)=7485tests on average, 7.5 times the number of bins.
  2. The last bins. Targeted tests for the last stubborn bins are usually cheaper.

Answer about 7485 tests on average.

Worked example

A built-in self-test uses a 16-bit maximal-length LFSR to generate patterns. How many distinct patterns does it give, and how long does a full run take at 100 MHz?

Show the solution
  1. Patterns. Every state except all zeros: 216−1=65535
  2. Run time. One pattern per clock: 65535100MHz=0.66ms
  3. What it misses. The patterns are pseudorandom, so faults that need very specific patterns may still escape, which is why BIST is combined with targeted scan tests.

Answer 65,535 distinct patterns, applied in 0.66 ms.

Check

A process yields 0.8 and testing reaches 0.95 fault coverage. What's the defect level, in parts per million?

Check

A process yields 0.8. What fault coverage, in percent, holds the defect level to 10 ppm?

Check

A chip needs 10000 scan patterns through chains 200 flip-flops long, shifted at 100 MHz. How long does the scan test take?

Write units the way you normally would: 1.5 s and 1500 ms are the same answer.

Check

About how many random tests does it take to hit all 200 equally likely coverage bins?

Check

Chips are made at yield 0.9 and tested with fault coverage 0.99.

(a)

What defect level ships, by Williams and Brown?

(b)

What coverage would bring it to 100 ppm?

Check

1000 scan patterns are shifted through chains 500 flip-flops long at 100 MHz.

(a)

How long does the test take per chip?

Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.

(b)

And with the flip-flops split into four times as many, shorter chains?

Check

A random testbench must hit each of 1000 equally likely coverage bins at least once.

(a)

About how many tests does it need on average?

(b)

How many times the number of bins is that?

Check

A built-in self-test uses a 16-bit maximal-length LFSR at 10 MHz.

(a)

How many patterns does it give before repeating?

(b)

How long does a full run take?

Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.

Explain why

Why do scan chains make a chip testable?

Practice

Keep practicing

10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.