Faults, Testing & Test Generation
Faults, Testing & Test Generation
Faults, Testing & Test Generation
Test Generation
Smith Text: Chapter 14.1,14.3, 14.4
Mentor Graphics/Tessent:
“Scan and ATPG Process Guide”
“ATPG and Failure Diagnosis Tools Reference Manual”
(access via “mgcdocs”)
ASIC Design Flow
Behavioral
Verify
Model
Function
VHDL/Verilog
Synthesis
DFT/BIST Gate-Level Verify
& ATPG Netlist Function
Physical
DRC & LVS Verify
Layout
Verification Timing
Map/Place/Route
nodes p5 & p6
shorted
t4 & t5 gates
shorted
Simplified schematic
D2
Collapsed fault set = {A/1, B1/1, B2/1, C/1, D1/1, D2/1, E/1, G/1, F/1, K/1}
Test generation: D Algorithm
Select a fault on net N (ex. sa0)
Produce an error at N (ex. N=1)
“D” denotes expected 1, actual 0 values
“D*” denotes expected 0, actual 1 values
Propagate D condition to primary output
Set gate inputs to propage D
“Justify” D condition from primary inputs
Set gate inputs to create D condition
D Algorithm – tabular method
sa0
F stuck-at-0
Step A B C D E F G H J K Y
control D
observe 1 D D*
observe 1 D D* 0 D*
observe 1 D 1 D* 0 D* D*
Consistency - J 1 1 D 1 D* 0 D* D*
Consistency - G x 0 1 1 D 1 D* 0 D* D*
Consistency - F x 0 x 1 1 D 1 D* 0 D* D*
External file
or
Internally
generated
Setup mode
Flatten model
Study circuit
Perform DRC
Add to lists:
clocks*
primary inputs/outputs*
scan chains
RAMs
*Normally found automatically
Examples:
add primary input /nx131
add clock X
report primary inputs
4. Report
results
Select fault types/models
set fault type Stuck (default)
Fault model to be used for ATPG
Also: Iddq, Toggle, Transition, Path_delay, Bridge
Optionally specify “multiple detection” # to require multiple
detections of each fault
add faults –all
add faults to current fault list, discarding all patterns and setting
all faults to undetected
options for each fault model; Ex. stuck_at 01 (or 1 or 0)
set fault mode uncollapsed - include EQ faults
set fault mode collapsed (don’t report EQ faults)
load faults filename - load fault list from file
write faults filename – write fault list to file
report faults – print list of modeled faults
Select the test pattern source
set pattern source Internal
Generate and use ATPG patterns
set pattern source External filename
Load and use patterns from file
User guide defines pattern file formats
set pattern source Random
Generate and use random patterns
set pattern source Bist
BIST circuit generates patterns
create patterns –auto
Perform ATPG to create patterns (-auto for stuck-at faults)
FastScan simulation modes
Good – verify the simulation model
Use ATPG algorithm to generate test patterns
Apply patterns and capture outputs without simulating faults
Produces expected output for each test pattern
Fault – determine fault coverage of a set of patterns
User provides a set of test patterns and fault list
Perform fault simulation using these patterns and faults to
determine coverage
ATPG -
Use ATPG algorithms to generate test patterns for given faults
Perform fault simulation using generated patterns to determine
coverage of the ATPG-produced test set
Fault Simulation (Chap. 14.4)
Deliberately induce faults to determine what happens to circuit
operation
Access limited to primary inputs (PIs) & primary outputs (POs)
Apply pattern to PIs at start of test cycle
At end of test cycle, compare POs to expected values
Fault detected if POs differ from correct values
Fault coverage = detected faults/modeled faults
Fault simulation with external file selected as
“Pattern Source” (This format was discontinued*)
// FastScan test pattern file – define primary inputs and outputs
PI A
PI B
PI C
PI D
PI E
PO Y
SCAN_TEST =
pattern = 0; Pattern #
force "PI" "00010" 0; Input vector
measure "PO" "0" 1; Expected output for this pattern
pattern = 1;
force "PI" “01000" 0;
measure "PO" “0" 1;
F
H
K
J
Verilog netlist – testckt.v
// Verilog description of example circuit
module testckt ( A, B, C, D, E, Y ) ;
input A ;
input B ;
input C ;
input D ;
input E ;
output Y ;
wire F, G, H, J, K;
endmodule
Sample script to test my patterns
mypats.do
set system mode fault --do fault simulation
set pattern source external mypats.txt --use my patterns
add faults –all --put all faults in the list
run --run the simulation
write fault mypats.flt–replace --write results
exit
FastScan fault simulation results
1 RE /ix14/A1 0 DS /ix16/Y 0 DS /ix12/A1
1 RE /ix13/A0 0 DS /ix14/A1 0 DS /ix13/Y
1 DS /ix15/A1 1 DS /Y 0 DS /Y
1 DS /B 1 DS /ix11/Y 0 DS /ix11/Y
1 DS /D 0 DS /B 0 DS /ix11/A0
0 DS /D 1 DS /ix14/A0 0 DS /ix15/Y
1 DS /ix11/A1 1 DS /ix16/Y 0 DS /ix11/A1
1 DS /ix12/Y 0 DS /ix16/A1 0 DS /ix12/Y
1 DS /ix12/A1 0 DS /C 1 UO /ix16/A1
1 DS /ix13/Y 0 DS /ix16/A0 1 UO /C
0 DS /ix13/A1 0 DS /ix12/A0 1 UO /ix16/A0
0 DS /E 0 DS /ix14/Y 1 UC /ix11/A0
0 DS /ix13/A0 1 DS /ix15/A0 1 UC /ix15/Y
1 DS /ix12/A0 1 DS /A 0 UC /ix15/A0
1 DS /ix14/Y 1 DS /ix13/A1 0 UC /A
0 DS /ix14/A0 1 DS /E 0 UC /ix15/A1
Test coverage = 38 detected/48 faults = 79%
DS – fault detected in simulation UO – unobserved fault UT – untestable fault
RE – redundant fault UC – uncontrolled fault
Design individual tests for UC/UO faults
C stuck-at-1
sa1
Step A B C D E F G H J K Y
control D*
observe 1 D* D
observe 1 D D*
observe D* 0 D*
observe 1 D* D*
Consistency - J 1 1 0
Consistency - G 0 x 1
Final values 0 1 D* 1 1 D 1 D* 0 D* D*
Test vector: ABCDE = {01011} – Raised fault coverage to 80%
Sample script using ATPG
atpg.do
set system mode atpg --ATPG to produce patterns
set fault type stuck --test stuck-at faults
add faults –all --add all s-a faults to the list
set pattern source internal --fault sim with atpg patterns
create patterns –auto --create the patterns
run --run fault simulation
write fault atpg.flt -replace --write fault list
save patterns atpg.pat –replace --save the patterns
report faults > atpg.faults --report detected faults
report statistics > atpg.stats --fault coverage statistics
exit
ATPG statistics (stuck-at faults)