ICTEST3
ICTEST3
Testing
Fault Simulation
Course outline
• Simulation
– Compiled-code algorithm
– Event-driven algorithm
• Fault simulation
– Introductory topics
– Serial algorithm
– Parallel fault simulation
– Deductive fault simulation
– Concurrent fault simulation
Simulation
• Simulation modeling of a design, verifying its function and
assessing its performance
• simulation is run using a software simulator, a software program run on a
computer
Specification
Synthesis
Transistor level provides very accurate simulation, but also excessively long
simulation times
Compiled-code algorithm
The circuit is described in a language that can be compiled and executed on
a computer.
Generally, VHDL or Verilog are used for functional circuit description, which is
transformed into a machine programming language (eg. assembly).
• Features
• Used for zero-delay combinational logic; timing is not considered
• Applied in the functional validation of synchronous circuits
• All nodes states are reevaluated for every input vectors
• Advantages
• Good in the case of two-level simulation, high-level simulations
• Since all nodes are reevaluated, its performance is optimized for high-activity circuits
• Higher-abstraction levels of modelization can be used (C)
• Fast
• Drawbacks
• Recompilation is required for every new design
• All nodes states are reevaluated, including those with steady-state values. Typically 1-
10% of the gates actually change their state
• Cannot model glitches, racing conditions, i.e. timing problem
Compiled-code algorithm (2)
• Step 1: Perform logic optimization, levelize combinational logic and encode
in a compilable programming language
A G4
G6
Signals are treated as variables, and
F gates are treated as program statements
(instructions)
H G9
• Label each gate with the maximum number of logic levels from primary
inputs (or with the maximum number of logic levels from primary output)
Step 2
PIs fanout gates are queued in: 0
G2
G1, G2 queued for processing 0 G3
Step 3
processing G1: have all input of G1 been assigned a level ?
NO, G2 which is driving the input of G1 has not been assigned a level
NO, THEN, place G2 back into the queue for further processing
Step 4
pop out next element form the queue: G2: have all inputs of G2 been assigned a
level ?
YES, THEN if l is the maximum of the driving levels of G1 (l=0), assign to
G1 l+1 as level, ie. l+1= 1
Levelization example (2)
Step 5
Place all fanouts of G1 into the 0
G1
queue
ie. G2, G3 placed in the queue
0
G2
0 G3
1
Step 6
processing G2: have all input of G2 been assigned a level ?
YES, THEN if l is the maximum of the driving levels of G2 (l=1, through
G1), assign to G2 l+1 as level, ie. l+1= 2
Levelization example (3)
0
G1
0
G2
0 G3
Step 7 1
0
G1
Step 8 0
G2
queue is empty 0 G3
1
2
end
Event-driven algorithm (1)
Every event is caused by other events that have occurred earlier in
time and in lower levels
• The change of a signal from a value to another is called an event
• ONLY gates which have a change in any input go to the activity list
• Every gate which is on the activity list is simulated
• If the gate output change, gate at fanout are placed in turn into the activity
list
0 1 initial condition
a
b
3 e
c
1 0
0
3 g
d f
2 0
logic 1
g
logic 0
1 2 3 4 5 6 7
time, t
Event-driven algorithm (2)
• Very efficient for discrete-event simulations, and low-activity circuits
• Event scheduling procedure of distributing activities caused by
events over time according to specified delays allows accurate
simulation of arbitrary delays
• Ten time (or more) speedup with respect to compiled-code
• only active gates (with an event on one or all inputs) are simulated
A G4
B 1 G7
1 G1
C
1
G3
D G2 G8
1 1 G5
E
G
G6
F
1 G9
H
• Assumption
– the functionality of the circuit is assumed to be correct, ie. the designer has not
made any error, however, the circuit may not operate correctly due to
manufacturing-induced defects
• Motivation
– Determine test quality and in turn product quality
– Find undetected fault targets to improve tests
… and also …
– Guide the test pattern generation process (for ATPG)
– Create faults dictionaries: list of output responses to test T for each injected fault
• Results
– Fault coverage fraction (or percentage) of modeled faults detected by test
vectors
– Set of undetected faults
Fault simulator (1)
• A fault simulator is used in the development of manufacturing tests
– Performed after design has be verified/validated
– e.g. TetraMAX fault simulation facility
Modeled Remove
fault list tested faults Test Delete
compactor vectors
Stop
Fault simulator (3)
• Fault-dropping a fault once detected is dropped from
consideration as more vectors are simulated
– fault-dropping should be suppressed for diagnosis purposes
Remarks:
• expensive in computation
• fault dropping is applied, i.e. simulation is stopped after a specific fault fn
has been detected for the first time
Types of fault simulators
• Serial
• Parallel
– Simulation of w faults in parallel
• Deductive
– Predicts faulty responses from fault-free
• Concurrent
– Interleave faulty and true-value simulation
Serial fault simulation
• Algorithm:
Simulate fault-free circuit and save responses for further comparison
• Advantages
– Easy to implement: a regular logic simulator is used, plus a mechanism for
injecting faults
– A wide range of fault models are supported
• Drawback
– Low performance: simulation time can be prohibitively high for large fault lists
e.g. for n faults, n time the simulation time of a true-value will be needed
Parallel fault simulation (1)
• Modern computer process 32-bit or 64-bit operands in one pass;
this wide word size is used to store several copies of a signal and
process all in one parallel pass
Rx
• Compiled-code method
Parallel fault simulation (2)
• Multi-pass simulation
Each pass simulates w-1 new faults, where w is the machine word
length (16-bit, 32-bit, …)
• All faults causing word bits of value at the circuit output that differ
from the fault free circuit are declare detected
Parallel simulation example (2)
f s-a-0 can not be detected
Bit 0: fault-free circuit using this specific vector
Bit 1: circuit with c s-a-1
Bit 2: circuit with f s-a-0 c s-a-1 detected
0 0 0
0 1 0
a
s-a-1
b e
c
0 0 0 0 1 0 0 1 0
d f s-a-0
1 1 1 1 1 0
Actual implementation in the simulator
• Faults are modeled by superimposing logic gates into the circuit
– s-a-0 AND2 gate (2-input AND gate)
all other input bits set to 1, except a 0 at the bit-location of the fault
– s-a-1 OR2 gate
all other input bits set to 0, except a 1 at the bit-location of the fault
0 0 0
0 1 0
a
s-a-1
b e
c
0 0 0 0 1 0 0 1 0
g
0 1 0 1 1 1
d f
1 1 0
s-a-0
1 1 0
Deductive fault simulation (1)
• One-pass simulation of the fault-free circuit
– a mathematical analysis is performed, rather than a simulation, stricto-senso
– all node values in the circuit are determined for each input vector
– if the circuit has feedback though, more than one pass may be needed
a fault is said to be detected if the value implied by the current input vector at the
primary output of the circuit is the complement of that implied in absence of the
considered fault
Deductive fault simulation (2)
• Following true-value simulation of each vector, fault lists of all gate output
lines are updated using mathematical rules, signal values, and gate input
fault lists
– the fault list of a signal contains the names of all faults in the circuit that can
change the state of that line
• PO fault lists provides the list of faults that can be detected, using currently
applied vector
Short reminder
• for classical Boolean gates, it is possible to determine a list of input
values which either mask the other input (control the output)
follow: output follows other input, invert: output inverts other input
Fault list propagation rules
propagation rules for main Boolean gates in a deductive fault simulator
• In order for a fault to propagate through, it must switch the state of line a,
while guaranteeing that the state of lines b and c do not change, or switch
the state of line d
La=[a0] Ld= (La (Lb Lc )) d0
a=1
Lb=[b1]
b=0 d=1
Lc=[c1]
c=0
Understanding the rules, more examples
• AND2 gate with a fanout of 2
Ld=[a1, c1, d1]
La=[a1]
Lc=[a1, c1] d=0
a=0
b=1
c=0 e=0
Lb=[b0]
Le=[a1, c1, e1]
output stuck at
Loutput Linput
controlled ouput
non controlling inputs
g=1
d f=0
[b0, d0] [b0, d0, f1]
• The second input-to-output pass generates the fault lists and generation,
resulting in Lg. Lg holds the list of four faults that are detected applying the
input vector a=1, b=1, which are: a s-a-0, c s-a-0, e s-a-0, g s-a-0
• Notice that b0 are present on lines e and f, and consequently cancel out of
Lg. b0 forces e=0 and f=1 which is not detected on line g.
Concurrent fault simulation (1)
based on the observation that stimulating a fault free network, and
the same network where one fault has been injected produces an almost
identical activity sequence:
bad-gates in grey
bad-gate: one I/O is different from a
good-gate
a linked set of bad gates forms the
fault list
a fault is detected when the output g is different from that of the good
gate, i.e. following faults are detected: b 0, d0, f1, a1, e1, g1
Fault sampling
• Goal: reduce the effort on fault simulation (CPU time and memory)
by picking a random sample from the set of all faults