- Introduced by
- J. Paul Roth
- Year
- 1966
- Type
- Automated fault-detection test vector generation
- Family
- Digital circuit testing
What does it do?
Automatic Test Pattern Generation (ATPG) is the automated creation of input vectors that detect manufacturing defects in digital circuits, usually modelled as stuck-at faults.
Roth's 1966 D-algorithm, introduced in a paper on diagnosing failures in automata, is an early method for computing such tests. ATPG is used to measure and raise test coverage before production chips are shipped, and its reports show where design-for-testability changes may be needed.
The intuition behind the method
Manufacturing defects such as a line stuck at a fixed logic value, shorts or opens cause a circuit to behave incorrectly. ATPG looks for an input vector that makes a given fault visible at an output. For a stuck-at-1 fault on a gate input, the vector must set that input to 0, which is the opposite of the faulty value, and must also propagate the resulting difference to an observable output. Working fault by fault, ATPG builds a test set, whereas random patterns give no guarantee of targeting any particular fault. The classical formulation assumes a single stuck-at fault at a time in a combinational (acyclic) circuit. Roth's D-algorithm was shown to compute a test whenever one exists for circuits built from AND, NAND, OR and NOR gates.
History
Roth's 1966 paper, 'Diagnosis of Automata Failures: A Calculus and a Method', introduced the calculus of D-cubes and the D-algorithm for computing tests to detect failures. The paper treats the work as diagnosis of logical malfunctions. For acyclic automata built from AND, NAND, OR and NOR gates, it shows that if a test exists, the D-algorithm will compute one. Design-for-testability techniques such as scan chains and built-in self-test are widely used alongside ATPG in complex designs, and ATPG is now a standard step in commercial design-for-test flows.
When to use it
Choose ATPG when the goal is manufacturing test of a gate-level digital design and the fault model is one the tool can target, typically stuck-at faults. It is standard in production test of digital integrated circuits, where its vectors are applied before shipment. It is less suited to analogue or mixed-signal blocks, whose defects are not captured by digital fault models. For designs with long sequential behaviour, plan DFT early, because the generated test sequences otherwise become difficult to construct and long to apply.
Limitations and considerations
- Search effort: deriving a test for a single fault can require exploring a very large space of input combinations. For a general combinational circuit, deciding whether a test exists for a given fault is NP-complete, so worst-case run time can grow sharply with circuit size
- Model dependence: the stuck-at model is an assumption, and defects that it does not represent may go undetected even when the coverage figure is high
- Sequential logic: tests for state-holding circuits must be built as multi-cycle sequences, which is harder than generating vectors for combinational logic
- Untestable faults: some faults cannot be detected in a given design without changing the circuit, for example by adding observation or control points
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Fault-driven: each targeted fault receives its own search for a detecting vector, rather than relying on random input patterns
- Automated generation: test vectors are produced by the tool, without writing them by hand
- Measurable coverage: the fraction of the fault list detected can be computed by simulating the vectors
- Diagnostic by-product: untestable faults show which parts of the design lack observability or controllability
Applications
- Manufacturing test: generating vectors for defect detection before chips are shipped
- Design-for-testability (DFT) assessment: using untestable faults to locate observability and controllability gaps
- Fault coverage analysis: identifying logic that is hard to test
- Production analysis: relating test failures to manufacturing process issues
How it works
How it works
Obtain the gate-level netlist and a fault model, such as stuck-at, transition or bridging faults. Specify test constraints, such as clock sequences and input and output patterns.
Build a fault list containing every potential fault in the circuit. Real designs can contain very large numbers of such faults, so this list is the basis for all later steps.
For each fault, use a backtracking or implicit search procedure to find an input vector that activates the fault and makes its effect observable at an output. Faults for which no vector is found are candidates for classification as untestable.
Simulate the generated vectors against the fault list to confirm detection, and compute fault coverage as the fraction of listed faults detected by the test set.
Report the test patterns, the fault coverage, the faults left undetected, and which untestable faults point to design-for-testability (DFT) improvements. Fault coverage is the number of detected faults divided by the total number of faults in the list. Fault efficiency is the number of detected faults divided by the total minus the faults proven untestable, so it excludes faults that no vector could detect. Classify untestable faults before judging test quality, since a low raw coverage can reflect untestable faults rather than weak vectors. No universal coverage threshold is implied; the acceptable level depends on the product and its quality requirements.
Common pitfalls
- Treating a high stuck-at coverage figure as proof of test quality; coverage is necessary but does not on its own show that real defects are caught
- Leaving untestable faults unanalysed; they often mark the design-for-testability changes that would improve test quality
- Relying only on stuck-at faults when the process is known to produce transition or bridging defects
- Introducing DFT late in the design flow, which makes test structures harder to retrofit than if they were planned from the start
Frequently asked questions
What is a stuck-at fault and why is it the standard fault model?
A stuck-at fault assumes a line is permanently 0 or 1 (stuck-at-0 or stuck-at-1). It is the standard model because it is simple to represent and many manufacturing defects produce behaviour that stuck-at tests detect. It is an approximation rather than a complete description of defects; bridging and transition fault models are used for defects that it does not represent, and they are harder to test.
Why do some faults remain untestable?
A fault may be untestable when the fault site cannot be observed at any output, when the fault cannot be activated under the circuit's logic or the imposed constraints (for example, redundant logic), or both. Design-for-testability adds observability and controllability: scan chains provide access to sequential state, and built-in self-test (BIST) applies and checks patterns on chip.
How do I improve test coverage if ATPG reports low coverage?
First check whether the missed faults are untestable, since fault efficiency separates them from weak vectors. If many detectable faults are missed, add design-for-testability (DFT): scan chains for sequential logic, test points for hard-to-access nodes, and BIST for on-chip pattern application and checking. These modifications improve observability and controllability and can raise coverage.
What is the relationship between test time and test cost?
Longer test sets can raise fault coverage but increase per-chip test time and tester cost. Techniques such as test data compression, which encodes vectors so less data must be stored and applied, and parallel testing, which tests several devices at once, help balance coverage against time and cost.
Related methods
Sources
Abramovici, M., Breuer, M. A., & Friedman, A. D. (1990). Digital Systems Testing and Testable Design. Computer Science Press.
Open publication referenceRoth, J. P. (1966). Diagnosis of automata failures: A calculus and a method. IBM Journal of Research and Development, 10(4), 278-291.
Open DOI referenceGoel, P. (1981). An implicit enumeration algorithm to generate tests for combinational circuits. IEEE Transactions on Computers, 30(3), 215-222.
Open publication reference