Unit 5-2
Unit 5-2
Faults in Logic Circuits- Basic Concepts of Fault Detection- Design for Testability- Ad
Hoc Techniques, Level-Sensitive Scan Design, Partial Scan, Built-in Self-Test.
-----------------------------------------------------------------------------------------------------------------
A failure is said to have occurred in a logic circuit or system if it deviates from its specified
behavior. A fault , on the other hand, refers to a physical defect in a circuit. For example, a
short between two signal lines in the circuit or a break in a signal line is a physical defect.
An error is usually the manifestation of a fault in the circuit; thus a fault may change the
value of a signal in a circuit from 0(correct) to 1 (erroneous) or vice versa. However, a fault
does not always cause an error; in that case,the fault is considered to be latent . A fault is
characterized by its nature ,value ,extent , and duration . The nature of a fault can be
classified as logical or non logical .
A logical fault causes the logic value at a point in a circuit to become opposite to the
specified value. Nonlogical faults include the rest of the faults such as the malfunction of the
clock signal, power failure, etc. The value of a logical fault at a point in the circuit indicates
whether the fault creates fixed or varying erroneous logical values. The extent of a fault
specifies whether the effect of the fault is localized or distributed. A local fault affects only a
single variable, whereas a distributed fault affects more than one. A logical fault, for
example, is a local fault, whereas the malfunction of the clock is a distributed fault. The
duration of a fault refers to whether the fault is permanent or temporary.
The most common model used for logical faults is the single stuck-at fault . It assumes that
a fault in alogic gate results in one of its inputs or the output is fixed at either a logic 0
(stuck-at-0 ) or at logic 1(stuck-at-1). Stuck-at-0 and stuck-at-l faults are often abbreviated
to s-a-0 and s-a-1 , respectively.Let us assume that in Figure1.1 the A input of the NAND
gate is s-a-1. The NAND gate perceives the A input as a logic 1 irrespective of the logic
value placed on the input. For example, the output of the NAND gate is 0 for the input
pattern A =0 and B = 1, when input A is s-a-1 in. In the absence of the fault, the output will
be 1. Thus, AB =01 can be considered as the test for the A inputs-a-l, since there is a
difference between the output of the fault-free and faulty gate. The single stuck-at fault
model is often referred to as the classical fault model and offers a good representation for
the most common types of defects [e.g., shorts and opens in complementary metal oxide
semiconductor (CMOS) technology]. Figure 1.2 illustrates the CMOS realization of the two-
input NAND:
The number 1 in the figure indicates an open, whereas the numbers 2 and 3 identify
the short between the output node and the ground and the short between the output node
and the VDD,respectively. A short in a CMOS results if not enough metal is removed by the
photolithography,whereas over-removal of metal results in an open circuit . Fault 1 in
Figure 1.2 will disconnect input A from the gate of transistors T1 and T3. It has been shown
that in such a situation one transistor may conduct and the other remain nonconducting .
Thus, the fault can be represented by a stuck at value of A; if A is s-a-0, T1 will be ON and
T3 OFF, and if A is s-a-l, T1 will be OFF and T3 ON. Fault 2 forces the output node to be
shorted to VDD, that is, the fault can be considered as an s-a-l fault. Similarly, fault 3 forces
the output node to be s-a-0.
The stuck-at model is also used to represent multiple faults in circuits. In a multiple
stuck-atfault, it is assumed that more than one signal line in the circuit are stuck at logic 1
or logic 0; in other
on words, a group of stuck-at faults exist in the circuit at the same time. A variation of the
multiple fault is the unidirectional fault. A multiple fault is unidirectional if all of its
constituent faults are either s-a-0 or s-a-l but not both simultaneously. The stuck-at model
has gained wide acceptance in the past mainly because of its relative success with small
scale integration. However, it is not very effective in accounting for all faults in present day
very large scale integrated (VLSI), circuits which mainly uses CMOS technology. Faults in
CMOS circuits do not necessarily produce logical faults that can be described as stuck-at
faults . For example, in Figure 1.2, faults 3 and 4 create stuck-on transistors faults. As a
further example, we consider Figure 1.3, which represents CMOS implementation of the
Boolean function:
Two possible shorts numbered 1 and 2 and two possible opens numbered 3 and 4 are
indicated
in the diagram. Short number 1 can be modeled by s-a-1 of input E; open number 3 can be
modeled by s-a-0 of input E, input F, or both. On the other hand, short number 2 and open
number
4 cannot be modeled by any stuck-at fault because they involve a modification of the
network function.For example, in the presence of short number 2, the network function
will change to:
For this reason, a perfect short between the output of the two gates (Figure 1.4) cannot be
modeled by a stuck-at fault. Without a short, the outputs of gates Z1 and Z2 are:
A short between two lines, as indicated by the dotted line in the diagram will change the
function
of the circuit.The effect of bridging among the terminals of transistors is technology-
dependent. For example,in CMOS circuits, such faults manifest as either stuck-at or stuck-
open faults, depending on the physical location and the value of the bridging resistance.
present in the circuit. The aim of testing at the gate level is to verify that each logic gate in
the circuit is functioning properly and the interconnections are good. Henceforth, we will
deal with stuck-at faults only unless mentioned otherwise. If only a single stuck-at fault is
assumed to be present in the circuit under test, then the problem is to construct a test set
that will detect the fault by utilizing only the inputs and the outputs of the circuit.
As indicated above, a test detects a fault in a circuit if and only if the output
produced by the circuit in the presence of the fault is different from the observed output
when the fault is not present.
To illustrate, let us assume that input a of the NAND gate shown in Figure 1.8 is
stuck-at-1.The output responses of the gate to all input combinations for both fault-free
and fault-present conditions are shown in Table 1.2. It can be seen in Table 1.2 that only for
input combination ab = 0, the output is different in the presence of the fault a s-a-1 and
when the gate is fault-free.
In order to detect a fault in a circuit, the fault must first be excited; that is, a certain
input combination must be applied to the circuit so that the logic value appearing at the
fault location is opposite to the fault value. Next, the fault must be sensitized; that is, the
effect of the fault is propagated through the circuit to an observable output. For example, in
Figure 1.9, the input combination abc=111 must be applied for the excitation of the fault,
and d=1 for sensitizing the fault to output Z.
Thus, the test for the s-a-1 fault is abcd=1111. This input combination is also a test
for other faults (e.g., gate 1 s-a-0, gate 3 s-a-1, and input a s-a-0, etc.).
A test set for a circuit is derived based on the assumption that only a single fault is present
in the circuit when the tests are applied. Thus, the simultaneous presence of an
undetectable fault and a detectable fault violates this assumption. Furthermore, the
presence of an undetectable fault may prevent the detection of a detectable fault.
Because there are three equivalence fault sets for both NOR and NAND gates, it is sufficient
to derive tests for three faults only in each case, i.e., one fault from each set. In general, an
m-input gate can have a total of (m+2) logically distinct faults; however, only m+1
equivalent sets of faults need to be considered.
represents one of the outputs, and each column one of the inputs. An entry [(i, j ): i=1…m,
j=1, n]in the matrix is 1 if the output depends on input j, otherwise the entry is 0, m and n
are the number of outputs and inputs respectively.
To illustrate, the dependence matrix for the circuit of Figure 4.3a is shown in Figure
4.3b. The dependence matrix is derived by tracing paths from outputs to inputs. A
partition-dependent matrix is then formed by partitioning the columns of dependence
matrix into a minimum number of sets, with each row of a set having at most one 1-entry;
there may be a number of partition dependent matrices corresponding to a dependent
matrix. A partition-dependent matrix corresponding to the dependent matrix of Figure 4.3b
is shown in Figure 4.3c.
A verification test set is obtained by assigning same values to all inputs belonging to
the same partition of a partition-dependent matrix; any two inputs belonging to different
partitions receive distinct values. Figure 4.3d shows the verification test set for Figure 4.3a.
A reduced verification test set can be derived from a verification test set by removing all
repetitions of identical columns. The reduced verification test set for the circuit of Figure
4.3a is shown in Figure 4.3e.
The verification testing is a useful technique for combinational circuits or circuits
that can be transformed into combinational forms during testing (e.g., LSSD structure).
However, the generation of the dependence matrix, which is the most important part of this
test strategy, is a nontrivial task for circuits of VLSI complexity.
If y is chosen to be 6, the constant weight counter will generate the following 20 code
words:
The selection of any five columns from the above code words will guarantee the exhaustive
testing of the circuit associated with each output. In general, the constant weight test set is
of minimal length. However, the complexity of the constant weight counter rapidly
increases for higher x-out-of-y code.
An alternative approach for generating a pseudo exhaustive test set is to use a
combination of an LFSR and an SR . In an LFSR, the outputs of a selected number of stages
are fed back to the input of the LFSR through an EX-OR network. An n-bit LFSR can be
represented by an irreducible and primitive polynomial. If the polynomial is of degree n,
then the LFSR will generate all possible 2n−1 nonzero binary patterns in sequence; this
sequence is termed the maximal length sequence of the LFSR.
Figure 4.6 shows the general representation of an LFSR based on the primitive
polynomial:
The feedback connections needed to implement an LFSR can be derived directly from the
chosen primitive polynomial. To illustrate, let us consider the following polynomial of
degree 4:
Figure 4.7a and 4.7b shows the four-stage LFSR constructed by using this
polynomial and the corresponding maximal length sequence, respectively:
Figure 4.8a and 4.8b shows the combination of a 3-bit LFSR and a 2-bit SR and the
resulting output sequence. Two separate starting patterns are needed, one for LFSR and
the other for SR:The LFSR/SR combination of Figure 4.8 can be used to test any five-input
circuit in which no output is a function of more than two input variables. This approach
guarantees near minimal test patterns when the number of input variables on which any
output of circuit under test depends is less than half the total number of input variables.
A variation of the LFSR/SR approach uses a network of EX-OR gates instead of an SR
.
For example, the circuit of Figure 4.8a can be modified such that d is a linear sum of a and c,
and e is the linear sum of b and d. The resulting circuit and the patterns generated by it are
shown in Figure 4.9a and 4.9b, respectively. In general, the LFSR/EX-OR approach
produces test patterns that are very close to the LFSR/SR approach.
where n is the number of circuit inputs, hk (k=1, 2, 3, …, 2n) is the number of faults in the
circuit that can be detected by k input vectors, and M is the total number of faults in the
circuit under test. It will be clear from the preceding expression that hk needs to be known
a priori to evaluate E(c). The hk for the two-input circuit of Figure 4.13 are (h1, h2, h3,
h4)=(7, 0, 1, 0), as shown in Table 4.1. For complex circuits, the hk are extremely difficult to
derive, and they can only be approximated using probabilistic analysis.
A major problem associated with pseudorandom testing is that the number of
patterns needed to detect a random pattern-resistant fault may be very large. For example,
let us consider the stuckat-1 fault a at the input of a 10-input AND gate shown in Figure
4.14.
It is clear that only test pattern abcdefghij=1111110111 can detect the fault. The
probability of an LFSR generating this particular pattern is 2−10. Thus, a huge number of
pseudorandom patterns need to be applied to a circuit under test that may contain random
pattern-resistant faults to guarantee a high fault coverage. The inherent weakness of
pseudorandom patterns as far as the detection of random pattern-resistant faults is
concerned arises because each bit in such a pattern has a probability of 0.5 of being either 0
or 1. If instead of generating patterns with uniform distribution of 0s and 1s, a biased
distribution is used, there is a higher likelihood of finding test patterns for random pattern-
resistant faults.
This is the principle of the weighed test generation technique. An alternative way of
generating pseudorandom patterns is to use a cellular automation (CA). A CA consists
where yi(t) denotes the state of cell i at time t. By combining these two rules, it is possible
to generate a sequence of maximal length 2s−1, where s is the number of cells in a CA.
To illustrate, let us consider the four-cell CA shown in Figure 4.15a. Assuming the initial
state of the CA to be abcd=0101, the maximal length sequence for the CA is shown in Figure
The implementation of the CA is shown in Figure 4.15c. Note that a 4-bit LFSR
implementing a primitive polynomial of degree 3 will also generate a sequence of length
16. CAs based on rules 90 and 160 can generate all primitive and irreducible polynomials
of a given degree . Also, CAs do not require long feedback, which results in smaller delays
and efficient layouts.
counts at certain nodes in the circuit (shown by arrows). As can be seen in the diagram, the
transition count at the output node changes from 4 to 2, resulting in the detection of the
fault α s-a-0.
The main advantage of transition counting is that it is not necessary to store the
correct response sequence or the actual response sequence at any test point; only the
transition counts are needed. Clearly, this results in the reduction of data storage
requirements. However, this data compression may give rise to the fault-masking errors.
This is because most transition counts correspond to more than one sequence; for example,
the transition count 2 is generated by each of the following 6-bit sequences: 01110, 01100,
01000, 00110, 11011, and 10001. Hence, there is a possibility that a faulty sequence will
produce the same transition count as the good sequence and therefore go undetected.
However, as the sequence length increases, the hazard of fault masking diminishes.
6.2.2 Syndrome Checking
The syndrome of a Boolean function is defined as S=K/2n, where K is the number of
min-terms realized by the function and n is the number of input lines . For example, the
syndrome of a three-input AND gate is 1/8 and that of a two-input OR gate is ¾. Because
the syndrome is a functional property, various realizations of the same function have the
same syndrome.
The input–output syndrome relation of a circuit having various interconnected
blocks depends on whether the inputs to the blocks are disjoint or conjoint, as well as on
the gate in which the blocks terminate. For a circuit having two blocks with unshared
inputs, if S1 and S2 denote the syndromes of the functions realized by the blocks 1 and 2,
respectively, the input–output syndrome relation S for the circuit is:
If blocks 1 and 2 have shared inputs and realize the functions F and G, respectively, then the
following relations hold:
As an example, let us find the syndrome and the number of min-terms realized by the fan-
out-free circuit of Figure 4.17. We have S1=¾ and S2=¼. Hence, S3=1−S1S2=13/16, and
K=S⋅2n=13.Table 4.2 lists the syndrome of the fault-free circuit of Figure 4.18, and the
syndromes in the presence of fault α s-a-0 and the fault β s-a-1.
6.2.3 Signature Analysis
Signature analysis technique is pioneered by Hewlett-Packard Ltd. that detects errors in
data streams caused by hardware faults . It uses a data compaction technique to reduce
long data streams into a unique code called the signature. Signatures can be created from
the data streams by feeding the data into an n-bit LFSR. The feedback mechanism consists
of EX-ORing selected taps
of the SR with the input serial data as shown in Figure 4.19. After the data stream has been
clocked through, a residue of the serial data is left in the SR. This residue is unique to the
data stream and represents its signature. Another data stream may differ by only 1 bit from
the previous data stream, and yet its signature is radically different from the previous one.
To form the signature of a data stream, the SR is first initialized to a known state and then
shifted using the data stream; normally, the all-0 state is chosen as the initial state.
Figure 4.20a shows a simplified 4-bit signature generator. Assuming the content of
the register is all 0, if a 1 is applied to the circuit, the EX-OR gate will have output 1. The
next clock pulse will shift the gate output into the first stage of the register and 0s from the
preceding stages into the second, third, and fourth stages, which leaves the register
containing 1000, i.e., in state 8. From the state diagram of Figure 4.20b, the register
contents or signatures can be identified for any data stream.
An n-stage signature generator can generate 2n signatures. However, many input
sequence scan map into one signature. In general, if the length of an input sequence is m
and the signature generator has n stages, then 2m input sequences map into 2n signatures.
In other words, 2m−n input sequences map into each signature. Only one out of 2m
possible input sequences is error-free and produces the correct signature. However, any
one of the remaining 2m−n−1 sequences may also map into the correct signature. This
mapping gives rise to aliasing; that is, the signature generated from the faulty output
response of a circuit may be identical to the signature obtained from the fault-free
response. In other words, the presence of a fault in the circuit is masked. The probability P
that an input sequence has deteriorated into another having the same signature as itself is
calculated on the assumption that any of the possible input sequences of a given length may
be good or faulty:
Thus, the probability of aliasing will be low if a signature generator has many stages
and hence is capable of generating a large number of signatures. For example, the 16-bit
signature generator shown in Figure 4.21 can generate 66,636 signatures, and hence the
probability that two input sequences will produce the same signature is 0.002%.
The error detection properties of the signature analysis technique are as follows.
First, the probability that two identical input sequences will produce the same signature is
1.Second, the probability that input sequences will produce the same signature if they
differ precisely
by 1 bit is 0. For example, let us consider two long input sequences, one differing from the
other by only 1 bit. As the error bit gets shifted into the 16-bit register of Figure 4.21, it has
four chances to change the signature register’s input before it overflows the register (after
16 clock cycles) and disappears. The effect of the erroneous bit continues to propagate
around the feedback network, changing the signature. For a single bit error, therefore, no
other error bit comes along to cancel the feedback’s effect, and so signature analysis is
bound to catch the single bit errors. Single bit errors, incidentally, are typical of transient
errors that occur in VLSI devices.
A signature, corresponding to the output sequence produced by a circuit under test,
is usually created as discussed previously by feeding the sequence serially into the
feedback line of an LFSR via an additional EX-OR gate. A signature can also be obtained by
feeding a subset of the output sequence in parallel when a multiple-input signature register
(MISR) is used. A k-bit MISR can compact an m (>>k)-bit output sequence in m/k cycles.
Thus, an MISR can be considered as a parallel signature analyzer. Figure 4.22 shows an 8-
bit MISR.
6.3 B IST ARCHITECTURES
Several BIST architectures have been proposed by researchers in industry and
universities.
for simultaneous testing of pipeline structure. For example, in Figure 4.24c circuit, blocks A
and C can be simultaneously tested by operating BILBOs 1 and 3 in the LFSR mode and
BILBOs 2 and 4 in the MISR mode. Circuit block B can be tested individually by making
BILBOs 2 and 3 operate in the LFSR and MISR modes, respectively.