0% found this document useful (0 votes)
10 views

done_DFT

The document discusses Design for Testability (DfT) in digital circuits, emphasizing the importance of testing methodologies to ensure system reliability and reduce costs. It covers various testing techniques, fault models, and the significance of controllability and observability in fault detection. Additionally, it highlights Built-In Self Test (BIST) methods and the need for efficient test pattern generation and response analysis.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

done_DFT

The document discusses Design for Testability (DfT) in digital circuits, emphasizing the importance of testing methodologies to ensure system reliability and reduce costs. It covers various testing techniques, fault models, and the significance of controllability and observability in fault detection. Additionally, it highlights Built-In Self Test (BIST) methods and the need for efficient test pattern generation and response analysis.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 95

Design for Testability (DfT)

OUTLINE
• Motivation
• Background and Definitions
• Boolean Difference and Testing of Digital Circuits
• Combinational Circuit Testing
– Path Sensitization
– D-Algorithm
How do we know that our Design
works?

x=(x0,x1,..,xn) q=(q0,q1,…qn)
f(x)

Fault!!!
System Validation Techniques
 Simulation
– Validate a model of the system.
 Emulation
– Build a prototype and validate.
 Testing
– Check the correctness of actual system.
 Formal Verification
– Mathematically show the ’Equivalence’ of the
specification and the implementation.
Definitions: Errors and Faults
• Error : Incorrect operation of the system.
• Cause of Error are Faults
– Design error, fabrication error, fabrication defect, physical
defects.
• Logical Fault: Faults which result in a change in logic
value at a point in a circuit.
• Fault Model: The effect of a fault is represented by a
model
– Stuck-at-fault
– Bridging fault
– Stuck-open fault
– Linking faults: Memories
Fault Probabilities

Dynamic Faults
49% Static Faults
Intermittent Faults

1%

50%
Fault Probabilities
• Dynamic Faults
• Timing Failures
• Components out of specification

• Static Faults
• Short-circuits
• Breaks

• Intermittent Faults (Environmental Faults)


– Single-Event Upsets - SEUs
• ESD
• Particles
• Magnetic Fields
Testing Techniques
• General Method
– The behavior (Response) of the system is observed by applying a
sequence of test inputs (Stimuli).
• Generation of Stimuli
– Test various cases
– Random Patterns: Random Testing
– Algorithmic Test Pattern Generation
• Combinational Circuit
• Sequential Circuit
• Test Time
– Time to generate tests and apply them to the circuit under test
• Fault Coverage
– Percentage of all the faults detected by a set of test patterns
Test Cost and Quality

Cost of quality
Cost

Cost of
Cost of the fault
testing

Quality
0% Optimum 100%
test
Design for Testability( DFT)
• To take into account the testing aspects during
the design process so that testing is simpler and
faster.
– Reduce test effort
– Reduce test time
– Reduce cost of test equipment
– Increase product quality
• Limitations
– Hardware overhead ( 5-30%)
– Performance degradation
– Increase in design complexity
Fault Models
• Stuck Fault Model
– Stuck-at-0 (S-a-0) & Stuck-at-1 model (S-a-1)

• Single-Stuck Fault Model


– Heuristic Model, multiple faults do occur. Model appears to be
valid most of the times

• Other Stuck Fault Models


– Variants including Stuck-at-open, Stuck-at-short
Faults Model : Assumptions

• For Combinational Circuits


– Logical faults only
– Only those faults which can be modeled as a signal
stuck-at-0 or stuck-at-1.
– Single fault
– Permanent fault
• For Sequential Circuits
– State table of the faulty sequential circuit is different
from the good circuit.
Fault-oriented Test Pattern
Generation
• Combinational circuit with n inputs

– 2n possible patterns (exhaustive test)

– Find minimum number of necessary input patterns

• Problem: Some nodes may not be testable because of


circuit structure
Fault Detection in Logic Circuits

• Number of possible faults x1 s-a-1


x1 x1 s-a-0
x2 z
Gate x2 s-a-1
x3
x2 s-a-0
N input gate may have 2(N+1) x3 s-a-1
stuck at faults x3 s-a-0
z s-a-1
z s-a-0
• Equivalent faults
 For an n-input AND gate, any input s-a-0 is equivalent
to the output s-a-0. The same test (all 1’s) is required
to test any of these faults.
Testability
• Controllability
– Can we control all nodes to establish whether there is a fault?

• Observability
– Can we observe and distinguish between the behavior of a faulty
node and a free node?
Detectable Stuck-At Fault

a
&
b e
S-a-0 1
c
1
d
1 1
0 1
Good
0 1 Circuit
0 0
0
0 0
1 1
0 0 1 0
Faulty
0 0 Circuit
0
0 0
Fault Masking and Redundant Circuit
 The fault cannot be detected because the circuit
has redundancy. Good Circuit
1
 Example: 1 1 0
0 0 1
S-a-0 0
X X
a
&
b e
1 0
1 1 1
0 1 0
0
1 X X
d
Faulty Circuit
Undetectable faults
• In general, untestable faults are due to redundancy

• Conversely, redundant circuits are not fully testable

• Fan-out may also cause untestable faults


Undetectable faults
A D

C
E Z
B

Consider Z=AC+BC - to avoid hazard we add the term AB


=> Z=AC+BC+AB
=> Impossible to test F/0
Undetectable faults’ fix
A D

C
E Z
B

Z2

Solution:
Add internal wires to propagate an internal value to a new output
Ad Hoc DFT Techniques
OP
• Test Point Insertion
C1 C2 C1 C2

CP0 CP1

Demultiplexing Control Points Multiplexing Observation points

D CP1 OP1
e CP2 OP2 M
C m u O
u CPN OPN x
x

1 2 m 1 2 m
Test Generation for Combinational
Circuits
• Truth Table and Fault Matrix
 Example:
 s-a-0 and  x1 x2 x3 z z z zz z z

x1 s-a-1
x2 &
0 0 0 0 0 0 0 0
x2 1
x3
& z 0 0 1 0 0 1 0 1
 0 1 0 0 0 0 0 0
x1
x3 & 0 1 1 1 1 1 0 0
1 0 0 0 0 0 0 0
Truth table approach not practical if 1 0 1 1 1 1 0 0
number of inputs is large. 1 1 0 1 0 1 1 0
1 1 1 1 1 1 0 0
Testing Sequential Circuits

• Testing of sequential circuits is harder than


combinational circuits
• Sequential Circuit Testing requires verification of
the state table
– Verify Reachability of all states
– Verify all transitions
• Assumption:
– Only the inputs and outputs are accessible, internal flip-
flops are not accessible
Testing Sequential Circuits

• Fortunately for us, ad-hoc testing techniques


(like scan-chains) has made the internal flip-flops
accessible, so the last assumption does not hold!

• In case access to internal flip-flops is too costly,


standard sequential test methods still have to be
applied, see Appendix.
Testing Sequential Circuits –
Scan-based Techniques
• Sequential Circuits have poor controllability and
poor observability
Comb. PO PI Comb. PO
PI Part
Part

Scanout

Scanin
Full Scan and Partial Scan
• Full Scan:
– Connect all the storage elements to form a long shift
register (scan chain)
– The storage elements can be easily tested by shifting
in a pattern and observing the output
– Testing of sequential circuit testing can be now treated
as testing of combinational circuit
– Full scan is costly and slow
• Partial Scan
– Select a subset of storage elements to be included in
the scan chain
Random Access Scan
• To achieve controllability and observability of all registers
– Access one register at a time

PI Comb. PO
Part

Memory
Scan-in Scan-out

Scan
Address
Board Level DFT: Boundary Scan
• Every input and output port of a chip is included in a
special scan chain

PI
Test Data In
Test Clock
Main Logic Test Mode
SO Test Data Out
SI

PO
Boundary Scan Cell

SO

PI M
u
PO
M x
u
x

ClockDR UpdateDR
SI
JTAG Standard (IEEE 1149.1)
Boundary Scan-path
I/O Pad Boundary-Scan cell
Summary of DfT
• Testing of complex digital systems is a hard but
very important task.
– Test Pattern Generation is most important in testing
• Testing contributes substantially to the cost and
effort required to design a new product.
• Methods are required to reduce this cost and
effort.
– Design for testability
– Reuse of proven designs
– Formal Methods
Test Pattern Generation - part I
Built-In Self Test (BIST) Methods
Testing a Circuit

Test Pattern Circuit Response


Generator Under Test Analyzer

Test Equipment
• Pulse and Function generators
• Oscilloscope
• Logic Analyzers
• Computers
• Specialized Zigs +
Test Engineer
Self-Test a Circuit –
Built-In Self Test (BIST)
Test Pattern Circuit Response
Generator Under Test Analyzer

Package the test equipment


along with the circuit!

Test Engineer
BIST: Requirements

• Generation of Test patterns for testing


– DFT is very important
– Algorithm has to be very simple and easy to implement in
hardware

• Comparing Response
– It is not possible to store the response in memory: area overhead
– Related to Test Pattern Generation

• Compression of Test Patterns and Response is essential


for BIST design
Test Generation and Response
Compression

Input Test Circuit Output Data Signature S(R)


Sequence T Under Test Response R Compression
Unit

Correct Error
Test Signature
Comparator
Indicator
Generator
Unit
General Aspects of Compression

• A simple hardware implementation


• It should not slow down normal operations
• Good Compression
– The signatures of good and faulty circuit should be
different
– Small size of signature. Signature size should be log of
data size.
• Issues:
– How to generate signatures for good circuit?
Generic Off-line BIST Architectures

• Classification
– Centralized or Distributed BIST circuitry
– Embedded or Separate BIST
• Key Elements of BIST
– Test pattern Generator (TPG)
– Output Response Analyzers (ORA)
– Circuit Under Test (CUT)
– A Distribution system for transmitting data from TPG to CUT and
from CUT to ORAs.
– A BIST Controller
Test Pattern Generation for BISTs
Exhaustive Testing
 Exhaustive Test Pattern Generators
Pseudo-Random testing
 Weighted test generator
 Adaptive Test Generator
Pseudo-Exhaustive testing
 Constant Weight Counter
 Combined LFSR and Shift Register
 Combined LFSR and XOR
 Cyclic LFSR
Exhaustive Testing

• Apply all possible 2n test patterns to a n input circuit.


• A binary counter can be used
• Or a maximum length autonomous LFSR can be used
(add special circuit to generate all zeros).
• Normally applied when number of inputs are less than 25.
Pseudorandom Testing

• Patterns are generated deterministically but have


characteristics of random patterns.
• Pseudo-random patterns without replacement can be
generated using autonomous LFSRs.
• Test length can be chosen to achieve the desired fault
coverage. This can be determined using fault simulation.
• Limitation
– LFSR tend to produce patterns with equal numbers of 1’s and 0’s
– For some circuit it is better to bias the distribution of 0’s and 1’s of
the pattern generator. For example testing of AND requires more
1’s in the test pattern.
Weighted Test Generation

• Generate Test Patterns with the desired distribution of 1’s


and 0’s.
• Such a generator can be constructed using a LFSR and a
combinational circuit.
• Different parts of the circuit may require different
distribution of 0’s and 1’s.
Adaptive Test Generation

• Also employs weighted test pattern generation.


• Fault simulation is used to determine weights for various
faults.
• Different distributions are used for different class of faults.
• A Test Pattern Generator (TPG) is designed to produce
the required distributions.
• Advantage: Small test lengths
• Disadvantage: Costly TPG hardware
Pseudo-exhaustive Testing

• Requires fewer tests but has the advantage of exhaustive


testing.
• Segments the circuit into parts and each segment is
exhaustively tested.
• Logical Segmentation
– Cone Segmentation
– Sensitized path segmentation

• Physical Segmentation
Compression Methods for BISTs
Basic Idea – Apply sequence, check signature after finishing...

Simple Analyzers
 Ones-count Compression
 Transition-count Compression
Signature Analyzers
 Single-Input Signature Response (SISR)
 Multi-Input Signature Response Analyser (MISR)
Generic BIST architectures
 BILBO
Ones-Count Compression

Assume a single output circuit C. Let the response of C to


a test sequence be R = r1, r2, ........., rm .In ones counting
the signature 1C(R) is the number of 1s appearing in R,
i.e.
 1C(R) =  ri where 0  1C(R)  m.
 11110000 x1 i
11001100 x2 & 10000000 R0
f2 s-a-0 11000000 R1
10101010 x3 X 00000000 R2
X & z
s-a-1 f1
Ones Count Compression: Analysis

x1
x2 Circuit Counter Signatures:
x3 1C(R0) = 1
1C(R1) = 2
1C(R2) = 0
Clock

Masking Probability
The probability of an erroneous output sequence having the same number
of 1’s as the correct sequence.
Theorem: The masking probability for ones-count compression for a
combinational network circuit asymptotically approaches (m)-1/2.
Transition-Count Compression

The Transition Count signature is the number of 0-1 and


1-0 transitions in the output response sequence R. Let the
response of C to a test sequence be R = r1, r2, ........., rm. In
transition counting the signature TC(R) is
 TC(R) =  (ri ri+1)
 11110000 x1 i=1
11001100 x2 & 10000000 R0 TC(R0)= 1
f2 s-a-0 11000000 R1 TC(R1)= 1
10101010 x3 X 00000000 R2 TC(R2)= 0
X & z
s-a-1 f1
Transition Count Compression: Analysis

Transition
Detector
x1
x2 Circuit D Counter
x3

D Q 

Theorem: The masking probability for transition count compression for


a combinational network circuit asymptotically approaches (m)-1/2
Signature Analysis

+ S0 0 1 1
S1 0 0 1
0 1 1 S2 1 0 0
S3 0 1 0
S4 1 0 1
S5 1 1 0
S6 1 1 1
S7 =S0 0 1 1
• Period of Linear Feed back shift register depends upon
– Feed back connections
– Intial value of register

• Masking probability is inversely related to the period


LFSR as a Single-Input Signature
Register (SISR)

Cn Cn-1 Cn-2 C1

+ D Q + D Q + +

+ : Modulo-2 addition( an ex-or gate)


: If Ci=1 then there is a connection otherwise no connection
Ci

This Circuit can be used to compress the response with


masking probability = 2-n .
Multiple-Input Signature Registers

• Method 1: Time Multiplex the signature analyzer for each


output. That is repeat the test sequence for each
output.This will require long test time.
• Method 2: Use Multiple Input Signature Register (MISR).
D1 D2 D3 Dn

+ + + +

Cn-2
Cn Cn-1 C1

Error Masking Probability = 2-n


Generic BIST Architectures

D CUT D
TPG I I ORA
S S
CUT
T T

BIST
Controller

TPG CUT ORA

TPG CUT ORA


Build-In Logic Block Observer (BILBO)

• Motivation: It is difficult to self test a circuit which has a large number


of (Inputs+Outputs+Storage Cells).
– You require PRSG for inputs, MISR for outputs PRSG and MISR for
storage cells.
– Solution: Clustering of storage cells into registers and make these
registers carry out multiple jobs.
• BILBO is one such scheme.
– Registers can be configured for :
• Normal Operation
• As PRSG
• As MISR
• As Scan Register
BILBO Registers
X1 X2 Xn-1 Xn
B1
B2
Si
D Q D Q D Q D Q So

EXO EXO
R R

B1 B2 Operation
1 1 Normal Operation
0 0 Shift Register mode
1 0 PRPG or MISR
BIST design with BILBO Registers

• Example:
R1
To Test C1
•R1 as PRPG
C1 •R2 as MISR
To Test C2
R2 •R2 as PRPG
•R3 as MISR
C2

R3
Summary of BIST

• BIST of a system requires techniques for


– Data Compression
– Test Pattern Generation
• Linear Feedback Shift Registers are good for doing both
• Important concerns
– Masking Probability
– Fault coverage
– Overhead
• Data Compression and Test Generation Functions can be
combined in one register (BILBOs)
Test Pattern Generation – part II
Automatic Test Pattern Generation
(ATPG)
Automatic Test Pattern Generation
(ATPG)
With Scan-chains available, deterministic tests are preferred.

Generic test method:

• Prepare a Fault list


• Repeat

– Write a test

– check fault cover (one test may cover more than 1 fault)

– delete covered faults from list

until fault cover target is reached or only un-testable faults remain.


ATPG Example

A E
B Z
C
D F

• To test A/0 (A stuck-at-0), set A=1.


• To propagate A/0, set B=1
• To propagate result to Z, F must be 0
• Thus, Either C=0 or D=0 or C=D=0 are solutions (3 possibilities) => (110-,11-0)
• The test pattern (1101/0) is good because it also covers E/1, D/0, F/1 and Z/1
Boolean Derivatives
Traditional algebra: speed Boolean algebra: change
y = F(x)
y y 0,1, F(X) 0,1

F ( X ) F(X) will change


1
F ( X ) xi if xi changes
0
xk
F ( X )
0
xi
F ( X ) F(X) will not
0 change
xi if xi changes
x
xi xk
Boolean Derivatives
Boolean function:
Y = F(x) = F(x1, x2, … , xn)

Boolean partial derivative:


F ( X )
F ( x1 ,...xi ,...xn )  F ( x1 ,...x i ,...xn )
xi

F ( X )
F ( x1 ,...xi 0,...xn )  F ( x1 ,...xi 1,...xn )
xi
Example: Functional Description

Example:
F( x1, x2 ,x3) = x1x2+ x2x3+ x3x1
Fault: x1 stuck-at-1
F
x x  ( x  x  x x )
x1 2 3 2 3 2 3

= x2 x3
The function F will have different output, when
x2 x3 = 1, that is x2=0 and x3 =1 OR
x2= 1 and x3 = 0
Boolean Difference: Test pattern
generation
 For a point Xi s-a-1
 The solution of the equation
F
Xi 1
Xi
 Gives all the tests for Xi stuck-at-1

 For a point Xi s-a-0


 The solution of the equation
F
Xi 1
Xi

 Gives all the tests for Xi s-a-0


Boolean derivatives
Useful properties of Boolean derivatives:
 F ( X ) F ( X ) Test generation algorithm:

xi xi Solve the differential equation
F ( X ) F ( X ) F ( X )
 1
 xi xi xi

F ( X )
0 if F(x) is independent of xi
xi
F ( X ) F(x) xi
1 if depends always on
xi
Boolean derivatives

Useful properties of Boolean derivatives


If F(x) is independent of xi

F ( X )G ( X ) G ( X )
F ( X )
xi xi
F ( X )  G ( X ) G ( X )
F ( X )
xi xi

These properties allow to simplify the Boolean differential equation


to be solved for generating test pattern for a fault at xi
Boolean derivatives
Given: y  x1 x2  x3 ( x5  x2 x6 )

Calculation of the Boolean Difference w.r.t. x5


y ( x3 ( x5  x2 x6 ))
 x1 x2
x5 x5
(( x5  x2 x6 )))
 x1 x2 x3
x5
x5
 x1 x2 x3 x2 x6
x5
 x1 x2 x3 x2 x6
A Complete Test: Intermediate circuit
points must also be tested
 Example
F BC  CA  h
A h s-a-1
B &

B & F
C & F 1  ( BC  CA)
h
C
A
& BC  CA
Test for h s-a-1  A B  C
F  AB ( A B  C ) 1
h 1
h
 ABC = 1
A = 1; B= 1; C= 0.
Example: Complete Test using
Boolean Derivatives
A E Z E  F  AB  CD
B
Z E  AB
C
D F CD
F

Z ( AB ) Z Z
CD CDB (C  D)B  A  AB (C  D) , A  AB (C  D)
A A A A
Z ( AB ) Z Z
CD CD A (C  D) A  B  AB (C  D) , B  A B (C  D)
B B B B
Z (CD) Z Z
 AB  ABD  C  ABCD , C  ABC D
C C C C
Z (CD) Z Z
 AB  ABC  D  ABCD , D  ABC D
D D D D
Z Z Z
F CD (C  D)  E ( A  B )(C  D) , E  AB (C  D)
E E E
Z Z Z
E  AB  F  ABCD , F  ABCD  AB (C  D)
F F F
Fault Cover Check
Test Pattern A B C D E F Z
Sa0 Sa1 Sa0 Sa1 Sa0 Sa1 Sa0 Sa1 Sa0 Sa1 Sa0 Sa1 Sa0 Sa1
0000 X X
0001 X X
0010 X X
0011 X
One of 1000 Redundant X X X X
these
0101 Redundant X X X X
0110 Redundant X X X X
0111 X
1000 X X
1001 X X
1010 X X
1011 X
1100 X X X X X
1101 Essential X X X X X X X
1110 X X X X X
1111 Essential X X X X
Path Sensitization
 The method consists of two steps:
– Identify a sensitized path from the fault site to output
– Check for consistency of the assignments to the inputs
 Example Circuit
1 X1 G1 7 S-a-0 G5 13
1 X2 &  1/0
10
0
G7 15
0 X3 G2 8 &
X X4 & G4 1 1/0
1 1
12 G6 14
X X5 G3 9 11

X X6 & Good value
X
Bad value
Path Sensitization
Node 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

G1 1 1 1/0

0 1/0
G5
G7 1 1/0
Gates
G4 1 1 1/0 0 0 1 1/0 1 1/0

G6 X 1 1
G3 X X X
G2 0 X 0 0 0

1 1 0 X X X 1/0 0 X 0 0 1 1/0 1 1/0


Path Sensitization: Sensitization of
multiple paths
 Example: Fault 6 s-a-0
G4 8
G1 5 1
1 9 0
X1 0 G5
1 1 0 G8 1/0
0/1 1
0 X2 2 G2 6 12
3 1 10 0
0 X3 1/0 G6
4 1 1
X4
G3 7 0
1 G7 11
1
1
Path Sensitization: Sensitization of
multiple paths
 Example (Continued)
G4 8
G1 5 1
1 0
X1 0 G5 9
1 1 G8 1/0
0/1 1
0 X2 2 G2 6 0/1 12
3 1 10 0
0 X3 1/0 G6
4 1
X4 0
G3
1 7 1 G7 11
1
0
D-Algorithm
 The ideas of Path sensitization method are
formalized.
 D-Notation
 The signal can take value from the set { 0,1,x,D,D }

Faulty Circuit
0 1

0 0 D
Good
Circuit
1 D 1
Singular Cover
 Singular Cube is a compact representation of the truth
table of a component.
 Example: 2-input AND gate
Truth Table Singular Cover
A B C A B C
0 x 0
0 0 0
x 0 0
0 1 0
1 1 1
1 0 0
1 1 1
Primitive D-Cube
 Model of the component in the presence of fault.
 Example: 2-input NOR gate

A
Fault Primitive D-Cube
A B C B 1 C

A s-a-0 1 0 D
A s-a-1 0 0 D
C s-a-0 0 0 D
C s-a-1 1 X D
X 1 D
Propagation D-Cube

• Model of a good component in a faulty circuit.


• Must propagate the fault from the inputs to one of
the outputs.
 Example: 2-input NOR gate
A B C
D 0 D
0 D D
D D D
-------------------------------
D 0 D
D
0 D
D D D
D-intersection

• This is a method to propagate fault from the


component to the output and to make consistency
check.
 Example 1 2 3 4 5
Primitive D-Cube 0 1 x D x
X1 1
G1 4
2
Propagation D-Cube x x
0 D D
X2  G2 5
3 Z 0 1 0
X3  Cube Intersection
D D

Fault Node 2 s-a-0


D-Algorithm: Forward Drive
 X1 1
G1 5 G3
X2 2  &
7
G5
9
&
X3 3
G2 G4 8
X4 & 
4 6
Primitive D-Cube
of Fault 1 2 3 4 5 6 7 8 9
G2 0 x D
G2 0 x D
G4 0 D D
 0 0 x D D
Propog. D-Cube
G5 1 D D
G4 0 D D
D
 0 0 x 1 D D
G5 1 D D
D-Algorithm: Consistency Check

1 2 3 4 5 6 7 8 9
Singular Cover
0 0 x D 1 D D
G3 0 x 1
G3 0 x 1
G1 1 x 0
 0 0 x x D 1 D D
G1 1 x 0
 1 0 0 x 0 D 1 D D
Re-convergent Fanout
• Example: Point 6 s-a-0
G4 8
G1 5 1
1
X1 G5 9
1 1 G8
1
X2 2 G2 6 12
3 1 10
X3 1/0 G6
4 1
X4
G3
1 7 G7 11
1
D-Algorithm: Sensitizing Multiple Paths
X1 X2 X3 X4 5 6 7 8 9 10 11 12

G2 0 0 D
G5&G6 0 0 D D D

G8 0 D D 0 D
 0 0 0 0 D 0 D D 0 D
G4
0 1 0
G7 0 1 0
G1 0 0 1
G3 0 0 1
D-Algorithm: Worst Case and Time
Complexity
• In the worst case the D-Algorithm will have to consider all
combinations of path.
• In a circuit with N components, the number of
combinations of paths from fault to output are: k2N.
• Worst case time complexity of D-Algorithm: O(2N).
• Fortunately, in practice average time complexity is much
smaller (N2).
– If size of circuit grows by 10, number of tests required grows by
100.
Appendix
Testing Sequential Circuits
Testing Sequential Circuits

• Testing of sequential circuits is harder than


combinational circuits
• Sequential Circuit Testing requires verification of
the state table
– Verify Reachability of all states
– Verify all transitions
• Assumption:
– Only the inputs and outputs are accessible, internal flip-
flops are not accessible
Case Study Example
 Example 1
1/0

S0
0/0
X Pattern Z S1 0/0
Detector (0110) 0/0 1/0
S2
State X= 0 X= 1 0/1 1/0
S3 1/0
S0 S1,0 S0,0
S1 S1,0 S2,0
S2 S1,0 S3,0
S3 S0,1 S0,0
Homing Sequence
 Def.: Smallest input sequence which brings the
machine to a known state.
{S0,S1,S2,S3}
0 1
{S1,S1,S1,S3} {S0,S2,S3,S0}

0 1

{S1,S1,S1,S1} {S2,S2,S2,S0}

 Therefore ‘00’ is the homing sequence for the machine


Distinguishing Sequence
 Definition: Smallest input sequence which
produces a different output for each starting state.
 Example 2: mod-4 counter

X Mod-4 counter Z
• Example 1 does not have a common
distinguishing sequence for all states.
• The common distinguishing sequence for
State X= 0 X= 1
Example 2 is ’1111’.
S0 S0,0 S1,0
S1 S1,0 S2,0 S0 Output = 0001
S2 S2,0 S3,0 S1 Output = 0010
S3 S3,0 S0,1 S2 Output = 0100

S3 Output = 1000
Transfer Sequence
 Definition: Smallest input sequence which takes
the machine from state i to state j, for all states i
and j.
 Example 1: Example 2:
i j Sequence i j Sequence
S0 S1 0 S0 S1 1
S0 S2 01 S0 S2 11
S0 S3 001 S0 S3 111
S1 S0 110 S1 S0 111
S1 S2 1 S1 S2 1
S1 S3 11 S1 S3 11
S2 S0 10 S2 S0 11
S2 S1 0 S2 S1 111
S2 S3 1 S2 S3 1
Checking Experiment: Steps

 Steps:
 1. Go to a known starting state by using a homing
sequence or a distinguishing sequence.
 2. Check reachability of all the states
 3. Check all transitions
Checking Experiment: Step 1
Known Initial State
 Example 1
 Homing Sequence: 00
 Known State : S1
 Example 2
 Distinguishing Sequence: 1 1 1 1
 Final State : If output = 0001 then S0
 else if output = 0010 then S1
 else if output = 0100 then S2
 else S3;
Checking Experiment: Step2
Check reachability of all states
 Example 2:
 Known Intial State : say S1
 Check reachability to S2
 Give transfer sequence for S1 to S2, that is, 1
 Distinguish S2 by distinguishing sequence 1111:
 Output should be 0100 and final state S2.
 Check reachability to S3
 Give transfer sequence for S2 to S3, that is, 1
 Distinguish S3 by distinguishing sequence 1111
 Output should be 1000 and final state S3
 Check reachability to S0
Checking Experiment: Step3
Check various transitions
 Example 2:
 Present State = S0
 Check transition ( S0,0)  S0/0
 Give 0 and check output to be 0
 To check next state as S0 give distinguishing sequence 1111 and
check output to be 0001.
 Check transition ( S0,1)  S1/0
 Give 1 and check output to be 0
 To check next state as S1 give distinguishing sequence 1111 and
check output to be 0010.
 Similarly all other transitions.

You might also like