Home / Learn / Chip Design / What Is ATPG?

On this pageWhat ATPG is forFault modelsHow a pattern is foundFault simulation and compactionCoverageWhat limits coverageAt-speed testingPractical concernsWhere it fits in the flowDiagnosis and yieldCommon questionsRelated guides

What Is ATPG?

ATPG, or automatic test pattern generation, is the use of software to create the input patterns that detect manufacturing defects in a chip. The tool analyzes the design, works out what values would expose each possible fault and produces a compact set of test patterns along with a measure of how many faults they catch. Together with scan, it is the basis of testing digital logic.

What ATPG is for

Every chip is tested after manufacture, because some come out with physical defects. Testing means applying inputs and comparing the outputs with those of a known-good chip.

The question is which inputs to apply. A chip has far too many possible states to try them all. ATPG answers the question methodically: for each place a defect might occur, it finds an input that would make that defect visible.

Fault models

Real defects are physical: a broken wire, an unwanted connection, a weak transistor. ATPG tools work with fault models, which are simplified logical descriptions of the effects those defects have.

Fault modelWhat it represents
Stuck-atA signal fixed permanently at 0 or 1
TransitionA signal that changes too slowly
Path delayAn entire path through the logic that is too slow
BridgingTwo signals shorted together
Cell-awareDefects inside a logic cell, derived from its transistor-level layout

The stuck-at model is the oldest and simplest. It remains useful because patterns that detect stuck-at faults also catch many other kinds of defect. Transition and delay models are added to find timing-related defects. Cell-aware models reach defects that the simpler ones miss.

How a pattern is found

Detecting a fault takes two things.

  • Activation. The inputs must drive the faulty point to the opposite value from the one it is stuck at. If a wire is stuck at 0, the test must try to set it to 1.
  • Propagation. The difference between the good and faulty behavior must be carried through the surrounding logic to somewhere it can be observed.

The tool searches for input values that achieve both. It then works backward to determine what must be loaded into the scan flip-flops to produce those values. This process relies on scan: without direct access to the flip-flops, the search would be vastly harder.

Fault simulation and compaction

Once a pattern is found for one fault, the tool simulates it to see which other faults it also detects. A single pattern usually catches many. Those faults are removed from the list, and the tool moves on to the remaining ones.

Patterns are also merged where possible. If one pattern needs only a few flip-flops set to particular values, the unused ones can be assigned to detect other faults. This compaction keeps the total number of patterns small.

Coverage

ATPG reports how well its patterns test the design. Faults fall into several classes.

  • Detected. A pattern exposes the fault.
  • Undetectable. The fault cannot affect the chip’s outputs, usually because the logic is redundant.
  • Untestable under constraints. The fault could be detected in principle, but the test setup prevents it.
  • Aborted. The tool gave up after a set effort limit.

Two figures summarize the result. Fault coverage is the percentage of all faults detected. Test coverage is the percentage of detectable faults detected. Targets are high for standard stuck-at testing and vary for other fault models and for the application. Chips for safety-critical uses face the strictest requirements.

What limits coverage

  • Design rule violations. Logic that scan cannot control or observe.
  • Uncontrolled clocks or resets.
  • Black boxes. Blocks, such as memories or analog circuits, whose internals the tool cannot see.
  • Logic between memories and scan elements, which is hard to reach.
  • Test constraints that hold certain signals at fixed values.

Engineers analyze the list of undetected faults and add test points or change the design to raise coverage.

At-speed testing

Stuck-at testing is done at low speed. Defects that only slow a circuit need tests run at the chip’s operating frequency.

For these, the tool generates a pair of patterns: the first sets up a starting state, and the second launches a transition. Two fast clock pulses, usually produced by the chip’s own clock generator, launch the transition and capture the result. If the signal arrives late, the wrong value is captured.

Practical concerns

  • Pattern count. More patterns mean more time on the tester and more cost. Compression and compaction keep this down.
  • Test power. Random-looking patterns make much more of the chip switch than normal operation does. Tools generate low-power patterns to avoid overheating or supply droop that would cause good chips to fail.
  • Unknown values. Some parts of a chip produce unpredictable outputs during test. These have to be masked so they do not corrupt the compressed results.
  • False and multi-cycle paths. Paths that are not required to work at full speed must be excluded from at-speed tests, or good chips will be rejected.
  • Run time. Generating patterns for a large chip is computationally heavy.

Where it fits in the flow

ATPG is run several times during a project.

  • Early, on the RTL or first netlist, to estimate coverage and find testability problems while they are easy to fix.
  • After scan insertion, to confirm the test structures work.
  • After layout, to produce the final patterns using the real design.
  • Pattern validation. The patterns are simulated with accurate timing before being handed to manufacturing test.

Diagnosis and yield

ATPG tools are also used in reverse. When chips fail on the tester, diagnosis software analyzes which patterns failed and identifies the likely location and type of the defect. Aggregated across many chips, this reveals systematic manufacturing problems, which helps the foundry and the design team improve yield.

Common questions

What does ATPG stand for?

Automatic test pattern generation. It refers both to the process and to the software that performs it.

Is ATPG the same as functional testing?

No. Functional tests check that the chip performs its intended operations. ATPG produces structural tests aimed at detecting physical defects, without regard to what the chip is for.

Why can coverage not reach 100 percent?

Some faults have no effect on the chip’s outputs and cannot be detected by any test. Others lie in logic that the test structures cannot reach. Design changes can reduce the second group.

Related guides