Module 10:sequential Circuit Testing and Scan Chains: Lecture 1:ATPG For Synchronous Sequential Circuits
Module 10:sequential Circuit Testing and Scan Chains: Lecture 1:ATPG For Synchronous Sequential Circuits
Module 10:sequential Circuit Testing and Scan Chains: Lecture 1:ATPG For Synchronous Sequential Circuits
1
2
3
4
5
6
7
8
9
1.Introduction
Till now we have been looking into VLSI testing, only from the context of combinational circuits. In
this module we will study ATPG for sequential circuits. In the first lecture we will see the variations
required in fault model, algebra and ATPG procedure in sequential circuits compared to
combinational ones. Also we will compare the ATPG complexity in both the cases and show that
testing sequential circuits is many folds more involved than testing combinational circuits. Following
that in the next lecture we will introduce a special scheme called scan chain which ``modifies a
sequential circuit into a virtual combinational one. So, test patterns for a sequential circuit with
scan chain can be generated with slight variation in ATPG algorithms for combinational circuits (Dalgorithm, for example).
In this lecture we will first discuss the difference between sequential and combinational circuits from
the context of ATPG and single stuck-at fault model. In this course we will concentrate only on
sequential synchronous circuits with a single clock.
2. ATPG and testing: Sequential versus combinational circuits
Let us first see the basic architecture of a sequential circuit in Figure 1. In the figure it may be noted
that there are three blocks, namely NSF, OFB and state flip-flop. The first two blocks are
combinational circuits and the state flip-flop has sequential elements. So ATPG procedure for the
NSF and OFB blocks should be similar to the ones already introduced in the previous lectures.
However, it may be noted that compared to a standard combinational circuit, in case of NSF some
inputs (state feedback) are not controllable and its outputs are not observable. Similarly, in case of
the OFB, some of its inputs are non-controllable. When a circuit powers up, the flip-flops can have
any value (0 or 1). So for ATPG of the combinational blocks in sequential circuits, we need to control
(indirectly) the values in the nets which are outputs of flip-flops and observe (indirectly) the nets
which are inputs to the flip-flops. Once indirect controllability and observability are achieved, ATPG
for these combinational blocks (in sequential circuits) can be done using D-algorithm (or any other
combinational APTG algorithm).
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
9
For ATPG of the fault, we need to indirectly control the net f to 0. Following that, we can apply the
test pattern as a =1 and b =X, which propagates D to the primary output. From the circuit it may be
noted that to make f to 0, we first need to make net d=0, which is the input to the flip-flop;
following that a clock edge can transfer the value of d to f (in the next state). The process of making
f =0 in a indirect manner (by state change) is shown in Figure 4.
Finally, a =0 ( b =X) would propagate fault effect to the primary output. Above mentioned three
steps are shown in Figure 6.
1
2
3
4
5
6
7
8
9
Now, we will see an interesting thing. If we use higher order algebra, then only one pattern can test
the fault. Let us see the case if b =0 ( a =X). Fault is sensitized as D and e=f = D. Now as the
secondary input ( c ) is not controlled, c =X. By 5 value algebra, d =X and so fault effect cannot be
propagated to the output. However, if we observe carefully at net d, we will note that if the fault is
there then d =X (as value is determined by the flip-flop at start up of circuit). However, if fault is not
there then d =0 (as e =0). So we can mark d as 0/X. Now, f = D, which in turn makes g= D;
D(=0/1) OR 0/X = 0/1 (= D). So fault can be detected using a single pattern b =0 ( a =X). All these
steps are shown in Figure 9.
require controlling the secondary inputs and propagating the fault effect to the primary output via
OFB. This example was a special case where controlling the secondary inputs were not required.
Higher order algebra will also reduce the number of lines to be controlled in ATPG of a
combinational circuit. However, it is not applied as computational complexity rises with increase in
order of the algebra and inputs are easily controllable in combinational circuits.
Table 1 illustrates a 9 value algebra which is used for ATPG of combinational blocks in sequential
circuits.
Table 1. Nine value algebra
Symbol
0
1
X
D
D
G0
G1
F0
F1
Implication
(0/0)
(1/1)
(X/X)
(1/0)
(0/1)
(0/X)
(1/X)
(X/0)
(X/1)
Normal Circuit
0
1
X
1
0
0
1
X
X
Faulty Circuit
0
1
X
0
1
X
X
0
1
1
2
3
4
5
6
7
8
9
1. Replace all the flip-flops by nets. Perform D-algorithm on the virtual combinational circuit and
find the values of primary and secondary inputs.
2. Using multiple steps (primary inputs, secondary inputs and clock pulses) to apply the required
signals to the secondary inputs (determined in Step 1).
The circuit shown in Figure 10 will be used to illustrate ATPG for sequential circuits using the time
frame expansion approach.
If the output of a flip-flop can be controlled by only primary inputs (and a clock pulse) it has
sequential depth of 1. In the circuit of Figure 10, flip-flop F1 has sequential depth of 1 as it is
controllable by primary input(s) c . A flip-flop has a sequential dept of dseq if its output is dependent
on
primary
inputs
and
at
least
one
flip-flop
of
depth
dseq-1. In the example, flip-flop F2 is dependent on primary input b and output of flip-flop F1 (via net
e ); so sequential depth of F2 is 2.
Definiation2: Non-cyclic Circuit
A sequential circuit is non-cyclic if there is no flip-flop whose input is dependent on its output. For
example, in the circuit of Figure 10, input of F1 is dependent on only primary inputs. On the other
hand, input of F2 is dependent on primary inputs (net b ) as well as the output of F1 (net d ). So the
circuit non-cyclic. An example of a cyclic sequential circuit is given in Figure 12. In this case input of
F1 is dependent on its own output (and primary input). It may be noted that in cyclic circuits we
may not be able to control the secondary inputs; this concept will be elaborated in an exercise
problem. A flip-flop whose input is dependent on its own output is called a cyclic flip-flop.
1
2
3
4
5
6
7
8
9