Professional Documents
Culture Documents
Types of testing
When testing is performed? On-line (concurrent) testing, off line testing Where is the source of stimuli? Self testing, external testing (tester) What do we test for? Design verification, acceptance testing for fabrication errors, etc How are the stimuli applied? Fixed order, adaptive testing What are the observed results? Entire output patterns, some functions of the output (compact testing /signature) What lines are accessible for testing? Only I/O, I/O and internal lines Who checks the results? self checking, external testing
Nature of faults
Permanent Always present Intermitted Occurs in regular intervals Transient One time and gone
fault
error
Self-checking circuits
Fault model (model describes a nature of faults) Error detecting codes Totally Self-checking property Self-testing property Fault-secure property Self-checking checker SOM-based checker
circuit checker
4
Parity Code
The parity code is obtained by counting the number of 1s in information bits and tacking a 0 or a 1 to make the count odd or even. The odd parity is generally preferred because of ensures at least a single 1 in any code word. Parity check can detect only odd number of errors. The error detecting capability of the parity checker can be expanded by including a parity bit for each byte of information bits. More sophisticated parity oriented solutions are based on partitioning information bits into several blocks with each bit appearing in more then one block, and computing the parity for each block. Such overlapping detects not only more than 1-bit errors but in the case of a single erroneous bit the location of this bit can also be identified.
The number of bits in which two distinct binary vectors differ is known as the Hamming distance of the code d(X,Y)=N(X,Y)+N(Y,X). A word X(x1,xk) covers another word Y(y1,,yk), (X Y), if yi=1 implies xi=1 for i=1,2,k. In other words, the positions of 1 in Y are a subset of the positions of 1 in X. X=101010 and Y =101000 XY
If X does not cover Y, and Y does not cover X, then X and Y are unordered. A code in which no code word is covered by any other code word is known to be unordered code.
9
m-out-of-n Codes
In an m-out-of-n code, all valid code words have exactly m 1s and (n-m) 0s. The total number of code words is n!/(n-m)!m!. If m=k and n=2k, we have a popular k-out-of-2k code. A special case of k-out-of-2k code consisting of only 2k code words out of the possible 2k!/k!k! code words is known as k-pair two-rail code. Each code word of this code has k-information bits and k check bits, which are bit-to-bit complements of the information bits. The 2-pair two-rail code consists of the following code words: 0011, 1001, 0110, 1100. If m= n / 2 in m-out-of-n code, then the code is optimal. In other words, there is no other unordered code except n/ 2 outof n code that has more code words of length n. An important subset of m-out-of-n code is 1-out-of-n code, in which exactly 1 bit of an n-bit code word is 1 and the remaining bits are all 0s.
11
Berger Code
A Berger code of length n has k information bits and c check bits where: c = log 2 (k + 1) and n=k+c. It is the least redundant unordered code for detecting single and unidirectional multiple errors. A code word is constructed by forming a binary number corresponding to the number of 1s in the information bits, and appending the bit-by-bit complement of the binary number as check bits to the information bits. For example: if k=0101000, c = log 2 (7 + 1) = 3 and the Berger code must have a length of 10 (=7+3), c check bits are derived as follows: Number of 1s in information bits k=2 (010). The bit to bit complement of 010 is 101, which are the c check bits. Thus, 0101000 101. k c
12
Berger Code
The c check bits may be the binary number representing the number of 0s in k information bits. Thus, the check bits for the Berger code can be generated by using two different schemes. The scheme that uses the bit-to-bit complement of the binary representation of the number of 1s in the information bits is known as the B1 encoding scheme. The other scheme, which uses the binary representation of the number of 0s in the information bits as check bits, is known as the B0 scheme.
13
Smith code
In the case when some subset of codewords is unordered and another subset is ordered the Smith code can be applied. Let the set of codewords is: {11111, 11100, 00101, 00110, 10001, 11000, 00100, 00000}. The idea of the Smith encoding is to make unordered not every couple of vectors but just those that are ordered. In our example there are 4 ordered chains of Hasse diagram: 1={11111, 11100, 11000, 00000} 2={11111, 00101, 00100, 00000} 3={11111, 00110, 00100, 00000} 4={11111, 10001, 00000} Each chain can be encoded undependably. Consequently, it is possible to encode each level of the Hasse diagram as follows:
14
15
1 1 0 0 1 1 0 0
1 1 0 0 0 1 0 0
1 1 1 1 0 0 1 0
1 0 0 1 0 0 0 0
1 0 1 0 1 0 0 0
0 0 0 0 0 0 0 1
0 0 1 1 1 1 1 0
0 1 1 0 1 0 1 0
0 0 0 0 0 1 1 1
16
Principles of Self-checking
Let a circuit has m primary input lines and n primary output lines. Then 2m binary vectors of length m form the input space X of the circuit. The output space is similarly defined to be the set of 2n binary vectors of length n. During the normal (fault free) operation the circuit receives only a subset of X called input code space and produces a subset of Z called the output code space. Member of the code space called code words. A non-code word at the output indicates the presence a fault in the circuit. However, a fault may also result in an incorrect codeword at the output, rather then a non-codeword, in which case the fault is undetectable.
18
Principles of Self-checking
A circuit may be designed to be self-checking only for an assumed set of faults. Such a set usually includes single stuck-at faults and unidirectional multiple faults. A single stuck-at fault assumes that a physical defect in a logic circuit results in one of the signal lines in the circuit being fixed to either a logic 0 (stuck-at-0) or logic 1 (stuck-at-1). If more then one signal line in the circuit is stuck-at-1 or stuckat-0 at the same time, the circuit is said to have a multiple stuck-at fault. A variation of the multiple fault is the unidirectional fault. A multiple fault is unidirectional if all its constituent faults are either stuck-at-0 or stuck-at-1 but not simultaneously. Self-checking circuits must satisfy the following properties: Self-testing Fault-secure
19
Inputs
Self-checking circuit
...
...
coded output
...
checker
error signal
Self-checking circuit
20
Self-checking property
I - input code space; S is output code space; Y ( X , ) is a function of an input vector in the fault free case; Y ( X , f ) is a function of an input vector and fault f in the circuit.
Definition 1 A circuit is fault-secure for an input set I and a fault set F if for any input X in I and for any fault f in F, Y ( X , ) S , and Y ( X , f ) S implies Y (X , f ) = Y (X , ) . A circuit is fault-secure if, for every fault from a prescribed set, the circuit is never produces an incorrect code space output for code space inputs.
21
Self-checking property
Definition 2 A circuit is self-testing for an input set N and a fault set F if for every fault f in F there is an input X in N such that Y ( X , f ) S . A circuit is self-testing if, for every fault from a prescribed set, the circuit produces a non-code space output for at least one code input.
Definition 3. A totally-self-checking circuit is a circuit that is self-testing for a normal input set and a fault set F, and fault-secure for N and a fault set F.
22
23
24
Non-disjoint
Stuck at 1
Stuck at 0
y9 y11 y13
25
disjoint
memory
d 3 d2 d1
26
PLA checking
Faults:
cross-points (AND array, OR array): 0=>1; 1=>0; 0=>*; 1=>*. Stuck-at-fault : stuck-at-terms, stuck-atoutputs Using XOR is forbidden for checking Checker has to be totally self-checking (TSC) Whole system have to be TSC
27
f err =
Y ,
t t =1
28
PLA checking
Why do we need the non-concurrent property for a SOM checker? Example :
expression x1 x2 x3 x1 x2 x3 x1 1 1 x2 0 0 x3 1 1 y1 1 0 1 y2 0 1 1
Non fault secure A missing or an additional device at these points cannot be detected SOM checker (by itself) cannot help in this case
1 0 0 0 1
1 0 1 1 0
0 1 0 1 0
0 1 1 1 0
Non TSC
ferr
30
Berger code
1 0 0 0 1
1 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 1 1 0 1
0 0 0 1 1
Error 1 1 1 0 0
0 0 0 1 1
Two-rail
31
Self-checking Checkers
Self-dual Parity Checking Two-rail checker TSC checkers for m-out-of-n codes TSC Berger checkers TSC Smith checkers
32
Parity Checking
In conventional parity checking the parity bit p corresponding to the output bits of the combinational circuit is compared with the parity bit p generated independently by the parity prediction circuit.
Inputs (x1, , xn)
Combinational Circuit
Comparator
checker
y p = y1 y2 yn
33
(x)
34
or Therefore,
h ( x) = f ( x) ( x)
( x) = f ( x) h ( x)
1 = ( f ( x ) ( x )) ( f ( x ) ( x ))
35
( x0 , x1 , x2 , x3 ) = x1 x3 + x1 x3
36
x0 x3
x1 x3
x1 x3
37
+ + fp + h(x)
38
Self-dual complement of fp
Self-checking Checker
A totally self-checking checker must have two outputs, and, hence, four output combinations. Two of these combinations (for example 01 and 10) are considered as valid. A non-valid combination indicates either a non-code word at the input of the checker, or a fault in the checker itself. A checker does not need to be fault-secure because one is interested only in whether the checker circuit is a code word or not. It is not important whether 01 has changed to 10 or vice versa because the output of the checker will be 00 or 11 in presence of a fault (self-testing).
40
Two-rail checker
The two-rail checker has two groups of inputs (x1, , xn) and (y1, , yn) and two outputs f and g. f and g have to be complementary (1-out-of-2) if and only if pair xj, yj is also complementary for all j.
yn-1 xn-1 y1 x1 y0 x0
1-out-of-2
41
x1 0 0 0 0 0 0 0 0 1 1
y1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
x0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
y0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
f 0 0 0 0 0 0 1 1 0 0 1 1 0 1 1
g 0 0 0 0 0 1 0 1 0 1 0 1 0 1 1
y0
x1 g y1
1 1 1 1 1 1
1 42 1
*
f1 g1 f2
*
g2 y5 x6 y6
x5
*
f3 g3
*
f4 g4
*
43
S = M &M
n k n k
n k +1
The k-out-of-2k checker is fault-secure for a single fault because it has two subcircuits; a single fault can affect the output of only one of them. If the checker is implemented with AND-OR logic, it is TSC also for unidirectional multiple faults.
44
n Mk
4 M2
= M
j =0
m j
nm & M k j
2 & M1
2 M2
2 & M0
2 M1
2 M0
2 & M2
45
= xy + ( x + y )( z + t ) + zt
Z1 = Z2 =
i =1 i =1
k
kA Mi
kB & M k i
kA Mi
kB & M k i
k k k k k k Z 2 = M 0 & M 2 + M 2 & M 0 = 1 M 2 + M 2 1 = x3 x4 + x1 x2
A B A B B A
x1 x2 x3 x4 Z1
x1 x2 Z2 x3 x4
47