Lecture 08 Testing of Sequential Circuits
Lecture 08 Testing of Sequential Circuits
Lecture 08:
Testing of Sequential Circuits
Clk
pseudo-primary inputs (PPIs) or present state (PS)
9/10/2023 2
OS
NS
Clk
9/10/2023 3
1. The circuit contains internal memory whose state is not known at the beginning of the
test. The test must, therefore, initialize the circuit to a known state.
2. After test inputs are applied, the final state of the internal memories must be inferred
only indirectly from primary outputs. Only in special cases can the internal memory be
made controllable and observable for testing, sometimes at the cost of extra hardware
Thus, the test of a fault may be a sequence of several vectors that must be applied in the
specified order.
9/10/2023 4
9/10/2023 5
9/10/2023 6
9/10/2023 7
Assumptions
9/10/2023 8
OB
NS
Test vector to detect sa0 at a ? (1,X) puts “D with f2=1 it gets propagated to Z
9/10/2023 9
OS
NS
9/10/2023 10
OB
NS
9/10/2023 11
Definitions
1. Sequential Depth of FF
(a) Sequential Depth is one if O/P of FF controlled by Primary I/Ps
(b) Sequential Depth is n if O/P of FF controlled by Primary I/Ps and also by at least one
Sequential Depth n-1 FF
2. Sequential Circuit is Non-Cyclic there are no FFs whose I/P is dependant on its O/P
Cyclic
9/10/2023 12
Sa0
a b c F1 F2
T=0 X 0 1 X 1
9/10/2023 13
Sa0
D
a b c F1 F2
T=0 X 0 1 X 1
T=-1 X 1 X 1 X
9/10/2023
T=-2 1 X X X X 14
Sa0
b=1
a b c d e F1 F2
T=0 X 1 1 1 0 1 1
T=-1 1 1 X X X 1 X
T=-2 1 X X X X X X
9/10/2023 15
Sa0
9/10/2023 16
Test vector to detect sa1 at A ? A=0 puts D’ at A, But cannot initialise FF1 to 0
9/10/2023 18
Sa0
After Initialising FF to 0
Sa0
9/10/2023 20
Sa0
9/10/2023 21
Consider the fault Z s-a-0. For any input, the output will be X/0.
9/10/2023 22
Requires
FF1=1 and
FF2=1 as
initial state
the CLR input will set the circuit in state. Since the state is set on the application of
the clock after CLR becomes 1, this operation is called synchronous initialization
9/10/2023 23
Our discussion so far has focused on single-clock circuits. All flip-flops were
controlled by one clock, which was a primary input to the circuit. For test generation
this clock was modeled only implicitly. That is why many of our circuit diagrams
show flip-flops without clock signals. It was assumed that one input vector is applied
per clock cycle This approach provides simplicity to test generation. However, there is a loss
of generality.
9/10/2023 24
The logic in the shaded region in Figure is used for modeling the function of the
flipflop. Faults inside this logic are usually not modeled.
9/10/2023 25
In Phase 1 initialization vectors are generated. The purpose of these vectors is to bring
flipflops in the circuit to known states irrespective of their starting state.
Phase 2 begins with vectors that are either supplied by the designer or generated in Phase 1.
A fault list is generated in the conventional manner. For example, this list may
contain all single stuck faults or a subset of such faults. These faults are simulated
using a fault simulator. If the coverage is adequate, the test generation would stop.
Otherwise, tests are generated with all undetected faults as targets. In the initial
stages of test generation, the fault list is usually long and the objective of this phase
is to generate tests by concurrently targeting all undetected faults.
Phase 2, if the fault coverage has not reached the required level then Phase 3 is
initiated. In this phase, test vectors are generated for single faults targeted one at
a time.
9/10/2023 26
0
1
After simulation of a trial vector, the “trial cost” is computed as the number of flip-flops that are in the
unknown state. If the trial cost is lower than the current cost, then the trial vector is saved. If the trial cost
is zero, then the initialization phase is complete
9/10/2023 27
Phase 2: Concurrent fault detection. The initialization vectors may already have detected
some faults. Some others may have been activated but not detected. As a result, effects of
active faults will be present at internal nodes of the circuit. a suitable cost function is the
shortest distance to a primary output from any fault effect caused by the fault.
9/10/2023 28
Phase 2: Concurrent fault detection. The initialization vectors may already have detected
some faults. Some others may have been activated but not detected. As a result, effects of
active faults will be present at internal nodes of the circuit. a suitable cost function is the
shortest distance to a primary output from any fault effect caused by the fault.
Phase 2: Concurrent fault detection. The initialization vectors may already have detected
some faults. Some others may have been activated but not detected. As a result, effects of
active faults will be present at internal nodes of the circuit. a suitable cost function is the
shortest distance to a primary output from any fault effect caused by the fault.
When there are several undetected faults, cost is computed for each fault i for some
input vector and internal state. Similarly, the cost is obtained for a candidate trial
vector. A comparison of and determines whether to accept the candidate vector or
reject it. Since there can be several undetected faults, there are two lists of cost
functions instead of just two numbers. The search for tests should be guided by a
group of faults instead of a single target fault. One can devise simple rules to
determine the acceptance of a vector. For example, if the combined cost of
10% of the lowest-cost undetected faults is found to decrease, then the new vector
may be accepted.
9/10/2023 30
Dynamic Controllability
9/10/2023 31
Dynamic Controllability
9/10/2023 32
Dynamic Observability
9/10/2023 33
9/10/2023 34
3. NPTEL Lectures
https://www.youtube.com/watch?v=M8VEEaYwlQ&list=PLbMVogVj5nJTClnafWQ9F
K2nt3cGG8kCF&index=31
35