I I I UNIVERSITY OF ILLINOIS LIBRARY AT URBANA^HAMPAJSN Sas&t£"f ^ »*:«»< is re- which it was with l '° the iibrar y from the University. may reso " •» di smisso , from To renew call Telephone Center 333 sann L161— Q-1096 Digitized by the Internet Archive in 2013 http://archive.org/details/designofdiagnosa996laih -,. B, A < B, and A = B holds between A and B, then A and B are said to be incomparable . For convenience, let denote (0,...,0) e V and I denote (1 1) e V . n For a graphical representation, an n-dimensional cube C is de- fined as follows: (1) Each vector in V is represented as a distinct vertex in C . n n Henceforth a vertex in C may be referred to by the vector which it represents; (2) There is an edge between two vertices A and B if and only if A differs from B at exactly one component; (3) The edge between A and B is directed from A to B if A > B and is denoted by AB. Fig. 2.1 shows a three cube C„. The weight of a vertex A is defined as the number of "1" compo- nents in vector A. Let f _,..., f be completely specified switching functions of n variables. An n-cube C is referred to as a labeled n-cube with re- n spect to functions f ,,..., f when a binary integer, m m L(A) = £(A;f _,..., f ) = I f (A) 1 m i=l X m-i is attached to each vertex A of C as a label. A labeled n-cube with n respect to f ...... f is denoted by C (f,,...,f ). Fig. 2.2 shows a 1 m ■ / n v l' ' m & labeled 3-cube with respect to functions f = x. v x~ and f~ = x..x~ Vx^^x-. Fig. 2.3 shows a labeled 3-cube with respect to the function f = x x« V x«x~. The following is the definitions related to negative functions which are based on the above graphical representations. Definition 2.1 - A directed edge AB is said to be an inverse edge of a labeled n-cube C (f .,..., f ) if and only if — °— n 1 m J UA;f 1 fj > £(B;f r ...,f m ). In the labeled 3-cube shown in Fig. 2.2, the directed edge (010) (000) in the bold line is the only inverse edge. In the labeled 3-cube for the single function f = x x„ v x„x (i.e., m=l) shown in Fig. 2.3, the directed edges, (111) (101), (110) (100) , and (0l0)(000), shown in bold lines are inverse edges. Based on the definition of inverse edges, a negative function can be defined as follows. Definition 2.2 - A completely specified switching function f of n variables is a negative function if and only if there is no inverse edge in C (f ) , the labeled n-cube with respect to f. co 43 CD l X o 43 CM CO 4J O X CD 4J iH o 1 X CD 4-1 u T3 ° > •H TJ 0) CD (X m C 43 w X •H O CD iH CO M X t-i 4J CD ■u 43 II 43 CO • 4-1 e X •H CM 3 .H 0) £ y-i d CD 4-1 43 M CD XI >> CO CD 4> C m iH > 3 co cd cj C CD 00 i CO •H 43 ti col X 41 4-1 •H -d 0) ' CD CO £ 43 •H o (H iH ■u a a>l X CD w 43 CD iH CD CO II V4 O )-i rH CD )-l U rH 42 •H o CO 1 X rH IX • 0) II W> T3 4-1 0) r-l 01 o 05 >4-l u CD 0) > 43 c 3 •H o 1 o co c t3 CO 01 cd iH 42 0> 43 42 cd O iH •rH 42 •H PL, M o o> 4-1 43 rH a 0> 4J 3 43 oo O C cd £2 0) rH •H P. 0) 13 CO 42 0) (2 0) 4-> 42 O M 4-1 (X. 01 CO 42 J-. CO 01 4-1 0) •H r-l •H 42 J-J £ S 0) o o J 0J •> rH O o 43 en r-l 0) 31 X •H 42 O CJ CM 1 X O 4-1 O co 42 O O •o > CJ to 4-1 01 CM 0) T3 rH X 0) • 0) -H 0) 42 X 43 X X) CJ 01 cd •H cd 4-1 iH II CO 4-1 1-1 G 4-1 Q) Si 14-1 •H cd > CO CM (SO •H 1*4 This definition is consistent with the conventional definition of negative function as can be seen from the following lemmas and theorems which state equivalent characterizations of negative functions. These characterizations can be found in [IM 71] . Lemma 2 . 1 - If a switching function f is a negative function, then f(A) > f(B) does not hold for every pair of input vectors A, B such that A > B. Proof - We only have to prove that f(B) must be 1 when f (A) is 1. Since f is a negative function, by definition, no directed edge AB of C (f) can be an inverse edge. Therefore, f(B)=l for every B e C such that AB e C . Repeating this argument, it is obvious that f(B)=l for every B e C such that A > B. Hence, f(B)=l must hold if f(A)=l and A > B. Q.E.D. Corollary 2.1 - If a switching function f is a negative function and f(A)=l for some A e C , then f(B)=l for every B e C such that n n B < A. Similarly, if f(A)=0 for some A e C , then f(B)=0 for every n B e C such that B > A. n From Lemma 2.1, the following theorem can be easily proved. Theorem 2.1 - A function f of n variables is a negative function if and onlv if for every pair of input vectors such that f (A)=l and f(B)=0 there exists a subscript i (1 <_ i <_ n) such that a =0, b =1. Proof - First let us prove the "if" part of this theorem. Suppose that for every pair of A and B such that f(A)=l and f(B)=0 there exists an i such that a =0. b =1. We will prove that there is no inverse edge in C (f ) . Suppose this is not true, in other words, there is a directed edge AB such that f(A)=l and f(B)=0. For this particular pair of A and B, there will be no subscript i satisfying a.=0 and b.=l because AB is a directed edge, and consequently A > B. This contradicts the assumption and therefore the "if" part of the theorem must hold. Next let us prove the "only if" part of the theorem. Suppose f is a negative function and there is a pair of vectors A and B satis-, fying f(A)=l and f(B)=0. We will prove that there must exist a sub- script i such that a.=0 and b.=l. If A < B or A is not comparable with B, then there must be some i such that a.=0 and b.=l. If A > B, 1 1 then by Lemma 2.1 f(A) \ f(B) which contradicts the assumption that f(A)=l and f(B)=0. Therefore, the "only if" part of this theorem must hold. Q.E.D. Because of this characterization, it is sometimes convenient to determine whether or not a function is a negative function by checking whether or not all 0-1 combinations in the values of the function have corresponding 1-0 combinations in the values of the variables. For convenience, let us use the term 0-1 pair to refer to any combination of "0" and "1" in the values of the function, and use the term 1-0 cover to refer to the corresponding combination of "1" and "0" in the values of a particular variable of this function. From Theorem 2.1, it is clear that function f is a negative function if and only if all 0-1 pairs in f are covered by 1-0 covers in its variables. 10 Another characterization of negative functions is given by the following theorem. Theorem 2.2 - A function is a negative function if and only if it has a disjunctive form consisting of complemented variables only. This theorem can be easily proved based on a theorem in [Gil 54] which characterizes positive functions. Fig. 2.4 shows a labeled 3-cube for a negative function f = x x^ v X..X2 = x. v/ x„x_ . Obviously, this labeled 3-cube has no inverse edge (Definition 2.2), and for every 0-1 pair in f, there is a 1-0 cover. For example, the 0-1 pair, f (HO)Ef (A)=0 and f (000)Ef (B)=l, is covered by the 1-0 cover, a =1 and b =0, or a ? =l and b~=0. The above definitions and discussions are concerned with com- pletely specified functions; i.e., functions whose values are specified for every input vectors. For incompletely specified functions, i.e., functions whose values for some input vectors are not specified (don't cares), we need the following definitions and theorems. We use "*" to denote those unspecified values of a function. Definition 2.3 - A completion of an incompletely specified func- tion f is a completely specified function obtained from f by specifying each unspecified value of f to either "1" or "0." If the resulting completion is a negative function it is called a negative completion . The negativeness of an incompletely specified function of n variables is defined as follows. Definition 2.4 - An incompletely specified function f of n vari- ables is negative with respect to these n-variables if and only if it has a negative completion. 11 The following theorem gives a criterion to judge whether or not an incompletely specified function is negative with respect to its input variables. For convenience, we sometimes refer to a function which is negative with respect to its input variables simply as an incompletely specified negative function . Theorem 2.3 - An incompletely specified function f of n vari- ables is negative with respect to these n variables if and only if for each pair of specified input vectors A, B e V such that f(A)=0 and f(B)=l, there exists a subscript i (1 <_ i <_ n) such that a.=l and b.=0. i Proof - First let us prove the "if" part of the theorem. Let h denote a completely specified function obtained by setting the un- specified values of h according to the following rules. (1) h(A)=0 for every A such that f(A)=0; (2) h(A)=0 for every A such that f(A)=* and there exists an B e V satisfying B < A and f(B)=0; (3) h(A)=l for every A e V which does not satisfy any con- dition for rule (1) or (2) . Obviously, h is a completion of f, i.e., h(A)=f(A) for every A such that f(k)^*. We shall prove that h is a negative function. Suppose h is not a negative function. According to Definition 2.1 there must be an inverse edge BA in C (h) . There are the following four cases: 12 Case 1 - f (B)=l and f(A)=0 ->• Since BA is a directed edge in C . b > a, holds, contradicting ° n i — 1 the assumption that there exists an i such that a > b . Case 2 - f(B)=* and f(A)=0 According to rule (2) above, h(B)=0 must hold, contradicting that BA is an inverse edge in c (h) . Case 3 - f (B)=l and f (A)=* Since BA is an inverse edge in C (h) , h(A)=0 holds. But h(A)=0 must have been assigned according to rule (2) above. This means that there exists a D e V such that f(D)=0 and D < A. Now let us con- n sider the two vectors B and D. We have f(B)=l, f(D)=0, and B > A > D. Consequently, we have b. >_ d . for every i, contradicting the assump- tion b. < d. for some i. l l Case 4 - f (B)=* and f (A)=* Since BA is an inverse edge in C (h) , h(A)=0 holds. h(A)=0 must have been assigned according to rule (2) above. This means that there exists a D e V such that f(D)=0 and D < A. This in turn means n f(B)=* and B > A > D. Then according to rule (2), h(B) must have been -> assigned the value 0. But this contradicts the assumption that BA is an inverse edge in C (h) . The above four cases exhaust all possibilities, and consequently the "if" part of the theorem is proved. The "only if" part of this theorem is obvious from Theorem 2.1 since any negative completion h of f must satisfy h(A)=f(A) for every A such that f(A)^*. Q.E.D. 13 The proof of the above theorem also gives an algorithm to obtain one negative completion from a given incompletely specified negative function. It should be noted, however, that there are generally negative completions other than the h in the above proof for a given function f. The following corollaries are sometimes more convenient in judging whether or not an incompletely specified function is nega- tive. Corollary 2.2 - A function f of n variables is negative with respect to these n variables if and only if for every vector A e C such that f(A)=0, we have f(B)=0 or * for every vector B e C such that B > A. Corollary 2.3 - A function f of n variables is negative with respect to these n variables if and only if for every vector A e C such that f(A)=l, we have f(B)=l or * for every vector B e C such that B < A. In the above we have presented basic properties of negative functions. Next let us consider MOS cells in connection with nega- tive functions. Fig. 2.5 shows a typical MOS cell which consists of a load FET and several driver FETs . Since the load FET is always conductive, the output terminal is permanently connected to the voltage supply through the load resistance which the load FET constitutes. Each driver FET operates like a relay contact: it is conductive when its input is a logic "1" (represented by a voltage close to the supply voltage), and it is non-conductive when its input is a logic "0" 14 Loads Driver^ Voltage supply O — B _q Output terminal f = (A»/B)DVCE Fig. 2.5 A typical MOS cell 15 (represented by a voltage close to the ground voltage) . If there is no conductive path between the output terminal and ground, the output will represent a logic "1" since its voltage is almost identical to that of voltage supply. However, if there is a conductive path between the output terminal and ground, the output will represent a logic "0" because its voltage is close to ground due to the relatively high resistance in the load FET. Therefore, the MOS cell shown in Fig. 2.5 realizes the function (Av B)D V CE. In general, the driver itself can realize any positive function (i.e., any function that can be written in a disjunctive form with non-complemented variables) . The output, however, is always the complement (negation) of the function realized by the driver alone. Thus, theoretically, any negative function can be realized by a single MOS cell. (By Theorem 2.2, a negative function is a function that has a disjunctive form consisting of only complemented variables which, by the duality theorem, is equivalent to a function that is the complement of a positive func- tion.) In the following discussion, we will use the term "a network with negative gates" or "a negative gate network" to mean a network consisting of only negative gates. Each of such gates realizes a function which is negative with respect to its inputs, and we are not concerned with the structure of each gate. This will be distinguished from "a network with MOS cells " or "an MOS network " which are negative gate networks with each negative gate realized by an MOS cell. 16 3. ALGORITHMS FOR DESIGNING NETWORKS WITH A MINIMUM NUMBER OF NEGATIVE GATES This section will discuss two algorithms for the synthesis of networks with a minimum number of negative gates which are basic algorithms for the design procedure of irredundant MOS networks to be introduced in Section 6. Only feed-forward networks, i.e., loop-free networks will be considered. Definition 3.1 - A minimum negative gate network for a switching function f is a feed-forward network for f that consists of R negative gates, where R f is the minimum number of negative gates required for the realization of f with only negative gates. Our problem is to design a network for a given function using a minimum number of negative gates alone. K. Nakamura, N. Tokura, and T. Kasami solved this problem by considering the relationship between a general feed-forward negative gate network and the labeled n-cube with respect to the functions realized by the gates in this network. Fig. 3.1 shows a generalized form of a feed-forward network with R negative gates, where x_ , . . . ,x denote the n input variables, g. denotes the i-th gate from the left for i=l,...,R with g being the output gate. Let u.(x , ...,x ) denote the function realized by gate g. with respect to the input variables x. , . . . ,x . Since every gate is a negative gate, u. is negative with respect to the inputs x 1 ,...,x n , u 1 ,...,u i _ 1 of g ± . In other words, u^x-, . . . ,x n , u.. , . . . ,u ._, ) is an incompletely specified negative function of 17 x g l 1 n 1 L!d 'R-l * l R-l Fig. 3.1 Generalized form of a feed-forward network consisting of R negative gates. 18 n+i-1 variables. This network is generalized form of a feed-forward network with R negative gates, since every feed-forward network of R negative gates can be expressed in this form with some (or none of the) connections deleted. The missing connections in a particular network do not affect the generality of the generalized form since each function u (x. , . . . ,x , u, , . . . ,u ._.. ) may contain dummy variables corresponding to the missing connections to gate g.. For example, if, in a particular network, gate g. is not connected to gate g 9 , then in the generalized form u„(x..,...,x ,u..) will be a function of x. , . . . ,x while u 1 is a dummy variable. Since this generalized form of Fig. 3.1 represents all possible configurations of networks consisting of R negative gates, the problem of the synthesis of networks with a minimum number of gates for a given function f becomes the problem of finding a sequence of func- tions u.. ,u~, • • • ,u R such that (1) u 1 is a negative function of x, . . . . ,x ; (2) u . is negative with respect tox. x , u,,...,u. .. 1 ' n i ° r 1* ' n' 1' ' l-l for i=2,...,R; (3) u = f; and (4) R is minimized, i.e., R-R,. . For R r convenience, let us define the following. Definition 3.2 - A negative function sequence of length R for function f , denoted by NFS(R,f) is an ordered set of R functions in C , u. ,u , . . . ,u D , such that n i z k (1) u . is a negative function in C ; (2) u. is negative with respect to x. x , u. , . . . ,u . , for i=2, . . . ,R; and (3) u R =f. 19 Based on the above definition, our problem of designing a mini- mum negative gate network for a switching function in C can be re- stated as the problem of finding an NFS(R,f )=(u. , . . . ,u D =f ) in C such IK n that R is minimized (i.e., R=R f ) . The following lemma is due to [NTK 72] which characterizes an NFS(R,f) in terms of labeled n-cubes. Theorem 3.1 - A sequence of functions u 1 ,u~ u_ in C is an NFS(R,u ) if and only if the labeled n-cube with respect to u, u OJ K J. K i.e., C (u. , . . . ,u R ) , has no inverse edge. Proof - First let us prove by mathematical induction the "if" part of the theorem. Suppose C (u, u D ) has no inverse edge. Then n l k for every directed edge AB e C , u.. (A) <_ u. (B) must hold. Therefore, u 1 is a negative function in C , i.e., u- is an NFS(l,u 1 ). Now suppose {u. , . i . ,u . } is an NFS(i,u.). Then we will prove that {u- , . . . , u.,u. in } is an NFS(i+l,u , . n ) . In other words, we have to prove u,., i l+l i+1 i+1 is negative with respect to x , . . . ,x , u.,...,u.. Since u... is an incompletely specified function with respect to x , . . . ,x , u. , . . . , u . , we have to show that for every pair of vectors (a.,..., a , u.. (A) , . . . , u^A)) and (b 1 ,...,b n , u^B) , . . . .u^B)) such that "^(a^ . . . ,a n , u 1 (A),...,u i (A))=l and u ±+1 (b lf . . . ,b n , u^B) , . . . , Ui (B))=0, (a.,..., a , Uj^CA),. . .,u i (A)) \ (b 1 ,...,b n , u 1 (B) , . . . ,u i (B)) must hold by Theorem 2.3. If A < B or A and B are incomparable, the above con- dition is obviously satisfied. A=B need not be considered because (a,,..., a , u. (A), ...,u.(A)) and (b.,...,b . u.. (B) , . . . ,u (B) ) become Ini l in± l the same vector. Therefore we need only consider the case of A > B. Since C (u.. , . . . ,u R ) , and accordingly C (u.. , . . . ,u .) , has no inverse 20 edge, £(B; u (B) , . . . ,u (B) ) >_ £(A; u (A) , . . . ,u (A)) must hold. In other words, only the following three cases can occur: (1) (u- (A) u.(A)) is incomparable with (u (B) , . . . ,u (B) ) ; (2) (u 1 (A),...,u i (A)) < (u 1 (B),...,u.(B)); (3) (u 1 (A),...,u i (A)) = (u 1 (B),...,u i (B)). For the first two cases, (a.,..., a , u, (A) , . . . ,u . (A) ) becomes in- comparable with (b.,...,b , u 1 (B) , . . . ,u . (B)) . For the third case, u (A)=l and u _ (B)=0 can never occur because otherwise I (A; u 1 , . . . , u.,,) > MB; u.,...,u,, 1 ) holds which contradicts the assumption that C (u. , . . . ,u ) and accordingly C (u. , . . . ,u . , - ) has no inverse edge. Therefore, when u. + -(a-, . . . ,a n , u^A) , . . . ,u i (A))=l and u i+1 ( b 1 > • • • » b n » u 1 (B),...,u i (B))=0 holds, (a 1 ,...,a n , u^A) , . . . .u^A)) \ (b 1 ,...,b n , u (B) , . . . ,u . (B)) holds. Then by Theorem 2.3, u... is negative with respect to x. x , u, , . . . ,u . . Therefore, (u, , . . . ,u. .- } is an 1 n'l' ' i 1 l+l NFS(i+l, u.,.), and consequently {u. , . . . ,u_) by induction is an NFS l+l 1 K (a. u r) . Next, let us prove the "only if" part of this theorem. By definition, u, is a negative function with respect to x x , and therefore C (u n ) has no inverse edge. Assume C (u-,...,u.) has no n 1 nil inverse edge. We will prove that C (u. , . . . ,u . , - ) has no inverse edge if {u. , ...,u„} is an NFSCRjU^) . For each directed edge AB e C , one 1 R R ° n' of the following two relations must hold: (1) MA; Ul (A),...,u.(A)) < £(B; u^B) , . . . ,u ± (B)) ; (2) H(A; u 1 (A),...,u i (A)) = MB; u^B) , . . . .u^B)) . 21 In case (1), a (A; u-^A) , . . . .u^A) ,u i+1 (A)) < £(B; u^B) , . . . ,u (B) , u. -(B)) holds regardless the values of u .... (A) and u . . (B) . In case (2), u (A) = u. (B) , . . . ,u.(A) = u (B) results. Since u . is negative with respect to x. x , u, . . . . t u . , we must have u. M (A) < u.,,(B) because if u. ..(A) > u - (B) holds, Theorem 2.3 will not be satisfied. Therefore, Z(A; u^A) , . . . .u^A) ,u i+1 (A)) <_ £(B; u-^B) , . . . ,u ± (B) , u -(B)) holds. Thus C (u ,...,u. -) has no inverse edge. By in- duction C (u- , . . . ,u R ) has no inverse edge. Q.E.D. Based on Theorem 3.1, an algorithm for the synthesis of a network realizing a given function f with a minimum number of negative gates has been derived by [NTK 72] . The basic concept of this algorithm is to find a labeled n-cube C (u, , . . . ,u„) such that (1) u =f; n i K k (2) C (u. , . . . ,u„) has no inverse edge; and (3) the label for vertex A, n l k £(A; u, , . . . ,u B ) , is minimized under the above two conditions for each 1 K A e C , and therefore R, the bit length of binary numbers £ (A; u.. , . . . , u R ) , is minimized. This algorithm will be referred to as the algorithm based on minimum labeling or algorithm MNL . The symbol L (X) will be used to denote the label assigned to vertex X by this algorithm for function f. Algorithm 3.1 - Algorithm based on minimum labeling ( MNL ) . Step 1 - Assign as L (I) the value of f(I). * mn Step 2 - When L (A) is assigned to every vertex A of weight w(l < w < n) in C , assign as L (B) to each vertex B of weight w-1 — — n & mn the smallest binary integer satisfying the following two conditions: 22 (a) The least significant bit of L f (B) is f(B); v/ e. mn (b) L (B) > L (A) for every directed edge AB terminating at B. mn — mn Step 3 - Repeat Step 2 until L (0) is assigned. Step A - The number of bits in L (0) is R £ , the minimum number L — mn f of negative gates required to realize f, and the i-th significant bit of L (A) is u . (A) for each A e C and for i = 1....R-.. mn in i The validity of this algorithm is obvious from Theorem 3.1. The algorithm obtains an NFS(R f ,f) = (u.. , . . . ,u„ =f) where R^ is the number f of bits in L (0). From the definition of NFS(R, ,f), u, for i = 1,..., mn f ' ' * i R f can be realized by a negative gate network of the form of Fig. 3.1. Since the minimum possible L (A) to guarantee no inverse edge in the labeled n-cube is chosen at each vertex A e C , R r is the minimum n f number of negative gates required to realize f by a feed-forward configuration of negative gates. Example 3 . 1 - Design a minimum negative gate network for f = x x„ v x x„x~ in C~. The true vertices of C_(f) are (111), (110) and (010) as shown in Fig. 3.2(a). According to Algorithm 3.1 (MNL) , the labeled 3-cube C_(u 1 ,u«,f) is obtained as shown in Fig. 3.2(b). (u 1 ,u«,f) as an NFS(3,f) can then be realized by a network with three negative gates in the generalized form as shown in Fig. 3.2(c). Corollary 3.1 - Let NFS(R f ,f) = (u. , . . . ,u R ) be a minimum negative function sequence for f, and C (u, , . . . ,u R ) be the corresponding labeled f n-cube. Then £(A; u. , . . . ,u n ) > L (A) must hold for every vertex 1' R f — mn * A e C . n 23 no 100 100 (a) C-(f) for f = ^x.v x 7 x t (bold lines denote Inverse edges) . (b) C.(u. ,u.,f) based on minimal labeling. x l- x 2 . u. = (x.V x-) (x V x.V x.) » u.V x.x. j- » x.x.v x,x, = u \Zu 2 (x-Vx.) (c) Minimum negative gate network for f based on minimum labeling. Fig. 3.2 Example 3.1. 24 Next, let us investigate the label attached to each vertex by MNL. Theorem 3.2, to be introduced following Definitions 3.3, 3.4, and 3.5, characterizes the label attached to each vertex by algorithm MNL. Definition 3.3 - A directed path from a vertex A to another vertex A satisfying A n > A in an n-cube C is a sequence of directed P ° 1 p n n edges connecting the two vertices, A,A„, A„A_ , . . . , A -A . 12 2 3 p-1 p It is obvious that there may be more than one directed path between two vertices in C . n Definition 3.4 - In a labeled n-cube C (f) for a function f, the n number of inversions in a directed path between two vertices is the number of inverse edges included in this path. The inversion degree of a vertex A with respect to vertex I in C (f ) is the maximum number of inversions over all directed paths from vertex I to vertex A, and is denoted by D (A) . Definition 3.5 - The number of inversions of a function f is the maximum number of inversions over all directed paths from vertex I to vertex in C (f ) , i.e., D (0) . Example 3.2 - In Example 3.1, D*(lll) = D^(llO) = 0, Dj(lOO) = D^(101) = Dj(Oll) = Dj(010) = Dj(001) = 1, and D^(000) = 2 (Fig. 3.2(a)). The number of inversions of a function determines the number of negative gates required to realize this function. This relation is stated in Corollary 3.2 which is an immediate consequence of Theorem 3.2. 25 Theorem 3.2 - L (X), the label attached to vertex X by mn ' Algorithm 3.1 (MNL) for a function f has the value L f (X) = 2 D^(X) + f(X) for every X e C . Proof - According to Theorem 3.1 and also D (I) = by definition, L f (I) = f(I) = 2 D T (I) + f(I). Therefore, the theorem holds for the mn I vertex of weight n. Next, assume L(X) ■ 2 D (X) + f (X) holds for every vertex of weight w or greater, and we will prove that it holds for every vertex of weight w-1. Let us consider a vertex B of weight w-1 and select a vertex A of weight w such that L f (A) = max {L f (X) XB e C } (3.1) mn mn n Because L f (X) = 2 D^(X) + f(X) holds for every X of weight w or mn 1 greater, L*(A) = 2 D*(A) + f(A) (3.2) mn 1 holds. Since L (A) is chosen as the maximum of L (X) by (3.1) and mn mn f(A) is a constant in (3.2), Dj(A) = max (D^(X) | XB e C^ (3.3) must hold. The following cases may occur: (1) f(A)=0, i.e., L f (A) = 2 D*(A). According to Step 2 of algorithm MNL, L (B) will be assigned the value satisfying L f (B) - L f (A) + f(B) =2 D^(A) + f(B). Since AB does not constitute mn mn 1 26 an inverse edge in C (f) and (3.3) holds (the case when D T (C) = D T (A) = max {D T (X) XB e C } holds for another vertex C as II In well as for A, f(C)=l can not occur since otherwise L f (C) = 2 D^(C) + f(C) > 2 D*(A) + f (A) = L f (A) hold, contradicting mn I I mn ° (3.1)), we have D^(B) = D^(A) . Therefore, L^ n (B) = 2 D^(B) + f(B) holds. (2) f(A)=l, f(B)=l. None of XB is an inverse edge in C , so f f we have D (B) = D (A) . According to algorithm MNL, L f (B) = L f (A) = 2 D^(B) + f(B) must hold, mn mn I (3) f(A)=l, f(B)=0. AB is an inverse edge in C , so D^(B) = D^(A) + 1. According to algorithm MNL, L^ n (B) = L^ n (A) + 1 = 2 Dj(A) + f (A) + 1 - 2 Dj(B) + f(B) must hold. Consequently, L (B) = 2 D (B) + f(B) holds for every vertex B of weight w-1. By induction, L f (X) = 2 D^(X) + f (X) holds for every X e C . J n Q.E.D. Corollary 3.2 - R , the minimum number of negative gates required to realize function f is given by R f = pLog 2 (Dj(0) +1)1+1 where [Y] denotes the smallest integer not smaller than r. Proof - By Lemma 3.2, L (0) = 2 D^(0) + f(0) which requires R. mn I n f bits to be represented in binary. This means that R f is the smallest integer satisfying 27 R f f 2 - 1 > 2 D*(0) + f(0) (3.4) Therefore, R f = flog 2 (2 D*(0) + f (0) + 1)1 = Tlog 2 (Dj(0) +1)1+1 Q.E.D. From equation (3.4), it is obvious that f V 1 dJ.(0) 12 - 1 (3.5) is always satisfied. This relation will be used later. The above relations are consistent with the results obtained by A. A. Markov [Mar 58] and independently by D. E. Muller [Mul 58] as discussed in [NTK 72] . Next let us consider the labeled n-cube C (u. , . . . t u„ , ,f ) n 1' ' Rf-1 obtained by algorithm MNL for a function f . We can partition the entire set of vertices in C into disjoint subsets such that two n J vertices A and B belong to the same subset if and only if L (A) = L (B) . It is obvious that if A and B are in the same sub- mn mn set, f(A) = f(B) must hold, i.e., A and B must be both true or false vectors. Each of the above subsets is called a cluster based on MNL . In general, given any labeled n-cube C (u, ,...,u D . ,f ) that has n 1 f - -*- no inverse edges, we can partition the entire set of vertices into disjoint subsets in the same manner as above. Each of these subsets is simply called a cluster , in contrast to "a cluster based on MNL" above. A true cluster is a cluster which consists of true vectors, whereas a false cluster is a cluster which consists of false vectors. An n-cube where all vertices are partitioned into 28 clusters is called a clustered n-cube . The concept of clustered n-cube is a generalization of the concept of the stratified structure of a switching function defined in [Liu 72] . We will show later that the stratified structure of a switching function is essentially the clustered n-cube based on Algorithm 3.2 (MXL) to be introduced later. In general, the clustered n-cube based on algorithm MNL is dif- ferent from the clustered n-cube based on algorithm MXL, and accord- ingly different from the stratified structure of [Liu 72] . Nevertheless, most of the properties possessed by the stratified structure of a switching function are also possessed by the clustered n-cube based on MNL. This will be discussed in more detail later. The negative gate network for a function f produced by algorithm MNL is usually not the only minimum negative gate network for f . If f V 1 D (0) ^2 - 1, we can relabel the vertices in C according to the following. Relabeling of a clustered n-cube based on MNL (1) Arrange the clusters based on MNL in such an order that a cluster with a smaller label proceeds a cluster with a greater label (assigned by algorithm MNL) . (2) Assign to every vertex in each cluster the same label of R f bits such that: (a) the last bit of the label is "1" or "0" depending on whether this cluster is a true or false cluster, respectively; and (b) the label assigned to each cluster must be greater than those assigned to clusters preceding it. 29 Through relabeling, we can obtain a different minimum negative gate network. This way of relabeling is similar to the procedure given in [Liu 72] where a realizable stratified truth table (corre- sponding to a labeled n-cube without inverse edge) can be obtained by assigning each cluster (based on MXL to be introduced) a unique label such that the resulting labeled n-cube has no inverse edge. Example 3.3 shows how one can obtain different minimum negative gate networks from the clustered n-cube based on MNL by relabeling. Example 3.3 - For the function in Example 3.1, there are four clusters based on MNL (see Fig. 3.2(b)). 1. True cluster: (111), (110). 2. False cluster: (101), (Oil), (100), (001). 3. True cluster: (010). 4. False cluster: (000). Since D (0) = 2 , at least three negative gates are required to realize f according to Corollary 3.2. Table 3.1 shows five different - Clusters based on MNL Vertices Different NFS(3,f)'s # 1 # 2 # 3 # A # 5 u- u 2 f U l U 2 f u l u 2 f u l u 2 f u l u 2 f 1 (111), (110) 1 1 1 1 11 2 (101), (011), (100), (001) 10 10 10 10 10 3 (010) 11 11 10 1 10 1 10 1 A (000) 10 110 110 110 110 Table 3.1 Possible NFS(3,f)'s obtained from clusters based on MNL for function f = x.x„v x^x.,. 30 labelings obtained by relabeling the clustered n-cube based on MNL. All five labelings result in different NFS(3,f) (NFS(3,f) 2 and NFS(3,f), are indistinguishable as will be discussed in Section 4). It should be noted that NFS(3,f) in Table 3.1 is the one obtained by algorithm MNL. As we can see from this simple example, we may have different ways in attaching labels for a given clustered n-cube, and yet the resulting labeled n-cubes have no inverse edges. If D (0) = R f -1 2 - 1, we have only one way to label these clusters with R f f v 1 bits for each label. Even if D (0) =2 - 1, however, the way of clustering is usually not unique, and therefore the labeled n-cube (the NFS(R f ,f)) is usually not unique. One way to generate a dif- ferent clustering is to use Algorithm 3.2 to be introduced in the following. Algorithm 3.2 is based on the idea of attaching to each vertex in an n-cube a maximum possible label consisting of a minimum number of bits such that the resulting n-cube has no inverse edge. From this labeled n-cube, an NFS(R,,f) is obtained where R f = ["logg (D (0) +1)1 +1. The algorithm is called the algorithm based on maximum labeling with a minimal number of bits and will be referred to as algorithm MXL . Algorithm 3.2 - Algorithm based on maximum labeling with a minimum number of bits (MXL) . 31 Let L (A) be the label attached to each vertex A e C by this mx n J algorithm for a given function f. Let R f = flog 2 (D-r(O) + 1)"| +1 f R f Step 1 - Assign as L (0) the value of 2 - 2 + f(0). Step 2 - When L (A) is assigned to every vertex A of weight w (0 < w < n-1) in C , assign as L (B) to each vertex B of weight w+1 — — n ° mx 6 the largest binary integer satisfying the following two conditions: (a) The least significant bit of L f (B) is f(B); (b) L (B) <_ L (A) for every directed edge BA originating from B. Step 3 - Repeat Step 2 until L (I) is assigned. Step 4 - Let the i-th significant bit of L (A) be u (A) for every A e C . Then the resulting (u. , . . . ,u D ) where R f = flog (Dj(0) + lf| +1 is an NFS(R f ,f) for function f . Example 3.4 - Consider the function discussed in Example 3.1, f = x.x-v x 2 x~. Fig. 3.3(a) shows C«(f). As seen in Example 3.1, DjCO) = 2 and three negative gates are required. According to MXL, 3 f 2 - 2 + f(0) = 110 is assigned to vertex as L (0), and the labeled 3-cube is completed according to algorithm MXL as shown in Fig. 3.3(b) Fig. 3.3(c) shows the negative gate network obtained in the general form. The actual network can be obtained by deleting certain connec- tions from this network, as will be discussed in a later section. The validity of this algorithm is obvious from Theorem 3.1 and the fact that the number of inversions of function f satisfy D T (0) ^_ R f -1 2 -1 by (3.5). The following discussion gives a formal proof. 32 (a) C (f) for f ■= x^Vx^. (b) C (u ,u 2 ,f) based on MXL. i 3 - Xl x 2 vx 2 x 3 = Ul (u 2 Vx 2 x 3 ) (c) A miniraum negative gate network for f based on MXL. Fig. 3.3 Example 3.4. 33 Definition 3.6 - The Inversion degree of a vertex A with respect to vertex in C (f) is the maximum number of inversions over all n directed paths from vertex A to vertex and is denoted by D n (A) . From this definition and the definition of the number of inver- sions of a function, the following equation is obvious: d£(I) - D*<0) Similar to Theorem 3.2, we have Theorem 3.3 which characterizes the relationship between L (X) and D_(X) for X e C . r mx n Theorem 3.3 - L (X), the label attached to a vertex X e C by mx ' n 3 algorithm MXL for function f , has the value L mx°° = 2 f " 2 (°o (X) + 1} + f(X) ' Proof - By definition, D n (0) = holds. According to Algorithm R R 3.2, L f (0) = 2 f - 2 + f(0) = 2 f - 2 (D^(0) + 1) + f(0) holds, i.e., mx u f R f the theorem holds for the vertex of weight 0. Assume L (X) = 2 ' - mx 2(D (X) + 1) + f(X) holds for each vertex X of weight w or less. Con- sider an arbitrary vertex A of weight w+1. Select a vertex B of weight w such that L (B) = min U (X) I AX e C } (3.6) mx mx n f R f f Because L (X) = 2 - 2(D^(X) + 1) + f(X) holds for every X of mx u weight w or less, we have t> L mx (B) = 2 f " 2 < D o (B) + X) + f(B) (3 ' 7) 34 Since L (B) is chosen as the minimum by (3.6) and f(B) is constant in (3.7), Dq(B) = min (Dq(X) | AX e C n } (3.8) must hold. The following cases may occur: (1) f (B)-l. According to Step 2 of algorithm MXL, L (A) is HLX assigned a maximum possible value less than or equal to £ -P -P L (B) = 2 - 2(D rt (B) + 1) + f(B). Because AB does not constitute mx an inverse edge in C (f) and (3.8) holds (the case when D (C) = D n (B) min {D (X) | AX e C } holds for another vertex C and we have f(C)=0 f R f f can not occur since otherwise L (C) = 2 - 2(D rt (C) + 1) + f(C) mn R f f f < 2 - 2(Dt(B) +1) + f(B) - L (B) hold, contradicting (3.6)), we u mn have Dq(A) = D^(B) . Therefore ^(A) = 2 f - 2(D^(B) + 1) + f(A) = R f f 2 - 2(Dq(A) + 1) + f(A) holds. (2) f(B)=0, f(A)=0. None of AX is an inverse edge in C (f ) , so Dq(A) = Dq(B) holds. According to algorithm MXL, L^ n (A) = L^(B) = R R 2 f - 2(Dq(B) + 1) + f(B) = 2 f - 2(Dq(A) + 1) + f (A) holds. (3) f(B)=0, f(A)=l. AB is an inverse edge in C (f ) , so D^(A) = f f f R f D-(B) + 1. According to algorithm MXL, L (A) = L (B) - 1 = 2 ° ° mx mx R R 2(Dq(B) +l)-l = 2 f - 2(Dq(B) +2)+l = 2 f - 2(D^(A) + 1) + f (A) must hold. 35 f R f f Therefore, L^(A) =2 - 2(D Q (A) + 1) + f(A) holds for every A f R f f of weight w+1. By induction, L (X) =2 - 2(D Q (X) + 1) + f(X) holds for every X e C . J n Q.E.D. f R f f From Theorem 3.3, it is clear that L (I) = 2 - 2(D„(I) + 1) + mx f f V 1 f(I) > since D (I) « Dq(0) 1 2 - 1 holds by (3.5). This means that when we use algorithm MXL, we can continue labeling up through the vertex I. This proves the validity of algorithm MXL because the resulting labeled n-cube is indeed a labeled n-cube with a minimum number of bits in each label which has no inverse edges. Having proved the validity of algorithm MXL, now we can present Corollary 3.3 which immediately follows algorithm MXL. Corollary 3.3 - Let NFS(R f ,f) - (u.. , . . . ,u R = f) be a minimum negative function sequence for f, and C (u. , . . . ,u R ) be the corre- f sponding labeled n-cube. Then (A; u. , . . . ,u R ) f_ L (A) must hold for every A e C . n Similar to the discussion following algorithm MNL, we can parti- tion the entire set of vertices into clusters such that all vertices in each cluster have the same label based on MXL. These clusters based on MXL constitute what T. K. Liu defined as stratified struc- ture of a switching function [Liu 72] . Definition 3.7 - The stratified structure of a function of n vari- f f f ables is a sequence of subsets of input vectors, (M_, M.. , . . . ,M_ ) where r = D Q (I), defined as: 36 (i) M. . for i ■ 0,...,r<-l, contains every vector A such that fCA^l and Dq(A) = i. (ii) M_ for i = 0,...,r, contains every vector A such that f(A)=0 and Dq(A) - i. The wording of this definition is different from that in [Liu 72] , but they define the same concept, the stratified structure of a func- tion. T. K. Liu discussed various properties of the stratified structure of a function which we will not repeat here. However, it should be emphasized that the algorithm based on the maximal labeling attaches to all vertices in each cluster the same label unique to that cluster because of Theorem 3.3. He also gave several algorithms to design minimum negative gate networks for a given function. All the networks designed by his algorithms are based on the stratified structure of that function . In other words, in the labeled n-cube corresponding to a minimum negative gate network given by algorithms in [Liu 72] , all vertices in each M are assigned the same label unique to that M . It implies that, in general, the algorithms given in [Liu 72] consider only a subset of all possible NFS(R f ,f)'s for the given function f. Sometimes, these algorithms design minimum negative gate networks whose corresponding MOS networks, regardless how well each cell is designed, may contain redundant FETs and connections. This problem will be discussed in detail in Sections 5 and 6 along with illustrating examples. 37 Example 3.5 - Consider the function discussed in Examples 3.1, 3.2, 3.3, and 3.4, f = x x 2 v x 2 x~ . The stratified structure for f is: Mq={(000), (001), (100), (101)} M* = {(010), (110)} M* = {(Oil)} M* = {(111)} All possible NFS(3,f)'s based on this stratified structure for f are listed in Table 3.2. Cluster Different NFS(3,f)'s 1 2 3 4 5 u l U 2 f u l u 2 f u l u 2 f u l u 2 f u l u 2 f A 1 1 1 1 11 4 10 10 10 10 10 < 11 11 10 1 10 1 10 1 < 10 110 110 110 110 Table 3.2 NFS(3,f)'s based on the stratified structure for f = x-x. v x 2 x . 38 4. UNIQUENESS OF MINIMUM NEGATIVE GATE NETWORKS As the examples in Section 3 show, the number of different NFS(R f ,f) for a switching function f is usually more than one. In this section, the problem of when a function has a unique NFS(R f ,f), i.e., a unique minimum negative gate network will be explored. Definition 4.1 - Let NFSCR^.f), = (u. - ,u 01 , . . . ,u_ .. . ,f ) and I J. II i.L R_ — I,J. NFS(R f ,f)_ = (u. «,u«„, . . . ,u __ ~,f) be two minimum negative function sequences for a function f in C . NFS(R ,f) and NFS(R f ,f) 2 are said to be different if and only if there exist some i (1 <_ i <_ R f -1) and some vertex A e C such that u -. (A) ^ u. 2 (A). NFS(R ,f) 1 and NFS(R f ,f)„ are said to be undistinguishable if and only if (u _,..., u ,f) is a permutation of (u. .. , . . . ,u . ,,f); otherwise LZ K_- x,Z J.J. Kj- — i,I they are said to be distinguishable . According to this definition, two different NFS(R-,f)'s correspond to the essentially identical network realizations (not speaking of the internal structure of each cell) if they are indistinguishable. But if they are distinguishable, two NFSCR^-jO's correspond to different negative gate network realizations. Example 4.1 - In Example 3.3, five NFS(3,f)'s based on the clusters by algorithm MNL for function f = x.x 2 \/ x„x« were listed in Table 3.1. From this table, it is clear that NFS(3,f)_ = (u 12 = x 1 vx 2 vx 3 , u 22 = x.x 2 , f) and NFS(3,f), = (u ; ,, = x.x 2 , u 24 = x i vx 2 Vx 3 » f) are indistinguishable. All other pairs from the 39 five are distinguishable, i.e., they are representing different mini- mum negative gate networks. Definition 4.2 - An NFS(R ,f) for a switching function f is unique if and only if there exists no other distinguishable NFS(R f ,f). Lemma 4.1 gives a sufficient condition for a function not to have a unique minimum negative gate network. Lemma 4.1 - A function f has at least two distinguishable f f R f _1 NFS(R f ,f)'s if Dq(I) = D^(0) * 2 - 1 holds. Proof - Let NFS(R f ,f) 1 = (u n ,...,u R _ 1 ^f) and NFS(R f ,f) 2 - (u ,...,u .. ,f) be two NFS(R ,f)'s generated by algorithms MNL J.Z K_ — 1 , Z I and MXL, respectively. According to MNL, L (0) = 2 D (0) + f(0), f R f and according to MXL, L (0) = 2 - 2 + f(0). Since o mx f R f _1 f f D T (0) j 2 - 1 holds by assumption, L (0) = 2 D T (0) + f(0) ± 1 mn 1 R f f 2 - 2 + f(0) = L (0) holds. Furthermore, according to MXL, u l0 (0) = u oo (0) = ... = u - „ (0) = 1 holds and there exists at J-Z ci. R-- X , Z least one i (1 <_ i <_ R f -1) such that u..(0) = since L (0) i L (0). Therefore, NFS(R r ,f) can not be a permutation of mnmx f ' 2 r NFS(R £ ,f) , i.e., NFS(R ,f) 1 and NFS(R f ,f) 2 are distinguishable. Q.E.D. According to this lemma, if a function f has a unique NFS(R ,f), f v 1 D (I) =2 - 1 must hold. The following lemma presents a property f V 1 of NFS(R f ,f)'s, when Dq(I) = 2 - 1 is satisfied. 40 f f Lemma 4.2 - For a switching function f , if D (I) = D (0) = R-l 2 - 1 holds, then every pair of different NFS(R ,f)'s (if they exist) are distinguishable. f f V 1 Proof - Since D (I) = D (0) =2 - 1 holds, there must exist in C (f) a directed path from vertex I to vertex such that the n number of inversions (i.e., number of inverse edges) along this path R-l f equals 2 - 1. Let A >A_> . . .>A 2D f , v be 2D (0) vertices along such a path where f(Aj)-l, f(A 2 )=0,..., f(A 2 ^=1, f (A 2± )=0, . . . , f(A f , .)=0 hold. It is obvious that there is only one way to label these vertices with R f bits such that the resulting labeled n-cube has no inverse edge; that is, attaching to each vertex A. the value L(A ) = i for i = 1,2, . . . ,2D (0) . In other words, for every NFS(R f ,f) ■ (u.,...,u_ , u = f), u (A ) (for j=l,...,R ) for each of these f £ R f \-i A 's is uniquely determined by the equation £ 2 u (A.) = i. j=l J Now let us consider a sequence of functions (u',...,u' - ,u ) 1 R_— 1 K_ which is a permutation of (u. , . . . ,u_ , ,u ) . Let k be the smallest l K^—J. re- number satisfying u'#u . Then for a particular vertex A such that S R f"j i = I 2 , u 1 (A i ) = . ..^(A^'l and "^j^C^) 55 ' • '""iKf ) ( A ± ) =0 must hold. This means that u'(A.) must have the value 0. But this con- ic i tradicts the property proved in the previous paragraph that, for each NFS(R , f), u . (A ) for each j including j=k has the unique value determined by I 2 u (A.)=i. Therefore, no permutation of j=l j 41 (u..,...,u ) can be an NFS(R f ,f). This leads to the theorem state- ment that if f has more than one different NFS(R ,f), every pair of them are distinguishable. Q.E.D. The above two lemmas lead to the following theorem which characterizes the necessary and sufficient condition for a function f to have a unique NFS(R_,f). Theorem 4.1 - A switching function f has a unique NFS(R f ,f) if f f V 1 and only if D (A) + D T (A) =2 - 1 for every vertex A of C . 1 n Proof - The "if" part of the theorem is easy to prove. Let C (u.,...,^ = f) be the labeled n-cube corresponding to an arbi- n J. K_ trary NFS(R f ,f). According to Theorem 3.2 and Corollary 3.1, L (A) = 2D T (A) + f(A) is the minimum possible value for £ (A; u. mn I r 1 u_ ) for every vertex A e C . Similarly according to Theorem 3.3 and K- n Corollary 3.3, L f (A) = 2^ - 2(D^(A) + 1) + f(A) is the maximum possible value for £(A; u- , . . . ,u ) for every vertex A e C . Since f f f f f D^(A) + D_(A) = 2 - 1 holds for every vertex A e C , L (A) = L (A) u l n mx mn holds, and therefore l(A; u- u R ) is unique for every vertex f A e C . This proves the "if" part of the theorem. The "only if" part of the theorem can be proved, using Lemmas 4.1 and 4.2. First, let us assume Dq(0) + D^(0) = D^(I) + D^(I) = f f R f _1 D (I) = D (0) ^ 2 - 1 holds. By Lemma 4.1, f has at least two distinguishable NFS(R f ,f)'s, so f does not have a unique NFS(R f ,f). f f V 1 Therefore, if f has a unique NFS(R ,f), D (I)eD (0)=2 -1 must hold. 42 f f V 1 Next, let us assume that D (A) + D (A) * 2 - 1 does not f f V 1 hold for some vertex A e C , but D.(I) ■ D x (0) - 2 - 1 holds. n I Then from Theorems 3.2 and 3.3 L (A) t L (A) must hold, which means mn mx that there are at least two different NFS(R f ,f)'s generated by MNL and MXL. By Lemma A. 2, these two NFS(R f ,f)'s must be distinguishable. Therefore, f does not have a unique NFS(R f ,f). Summarizing the above, the theorem must hold. Q.E.D. From this theorem and the definitions of D (A) and D (A) , the following theorems can be easily proved. Theorem A. 2 - A function f has a unique NFS(R ,f) (hence a unique negative gate network) , if and only if for each vertex A in C (f) there exists a directed path from vertex I to vertex through R f -1 A such that the number of inversions along this path is 2 - 1. Proof - The "if" part can be proved as follows. By definition, D (A) + D n (A) must be greater than or equal to the number of inversions on any directed path from vertex I to vertex through vertex A. f f R f~ 1 Therefore, by assumption of the theorem, D (A) + D n (A) ^2 - 1 f f f R f~ 1 must hold. However, D (A) + D (A) <_ D (0) <_ 2 - 1 must hold from f f f R f~ 1 the definition of D (0) and (3.5), so D^(A) + D (A) =2 - 1 must hold for every A e C . By Theorem 4.1, f must have a unique solution. Next let us prove the "only if" part of the theorem. Since f has f f V 1 a unique solution, by Theorem 4.1, D (A) + D (A) =2 - 1 must hold for every A e C . From the definitions of D (A) , D Q (A) and D (0) , it 43 is obvious that there exists a directed path from I to through A R -1 such that the number of inversions along this path is 2 - 1. Q.E.D. Theorem 4.3 - A function f has a unique NFS(R f ,f) ( hence a unique minimum negative gate network) if and only if L (A) ■ L (A) mn mx holds for every A e C . n f f Proof - From Theorem 3.2, L (A) = 2D T (A) + f (A) holds for every mn I J f f f A e C . From Theorem 3.3, L (A) = 2 - 2(D^(A) + 1) + f(A) holds n mx x f f f R f for every A e C . Therefore, L (A) = L (A) implies 2D X (A) = 2 - J n mn mx r I 2(D (A) + 1) for every A e C . This is equivalent to D (A) + D Q (A) = R-l 2 - 1 for every A e C . Consequently, by Theorem 4.1, this theorem has been proved. Q.E.D. The condition for a function to have a unique minimum negative gate network is very tight. In other words, the functions which have unique minimum negative gate networks are only a small portion of all the functions of n variables when n>3 (when n=l, or 2, it may not be true) . Example 4.2 - The three-variable function f = x x^V x«x_*/ x,x„x~ shown in Fig. 4.1(a) has a unique NFS(R f ,f) (hence a unique minimum negative gate network). Fig. 4.1(b) shows the unique 2-bit labeling for function f. The corresponding NFS(R,,f) is (u 1 = x 1 Vx 2 Vx 3 , u 2 = u^^ V (x 1 */x 2 )x 3 = f ) . 44 t>0 ^3 I CM QJ 3 cr •H c 3 CO I X CM X CO ' M H II M-l n o (M CO u •H 45 Let us consider parity functions x- © x 9 . . . ©x and x. ©x.@. . . ©x 01 in regard to the uniqueness of their mini- mum negative gate networks. The following two theorems give necessary and sufficient conditions for a parity function to have a unique mini- mum negative gate network. Theorem 4.4 - The odd parity function of n variables, f = x, © o 1 x_ © . . . ©x has a unique minimum negative gate network if and only if n = 2 -2 or 2 -3 for k = 1,2,... . Proof - In C (f ) , every vertex A of weight w has a label f (A) = if w is even or a label f (A) = 1 if w is odd. Therefore, o o in every directed path from vertex I to vertex there are n/2 or (n+l)/2 inverse edges, depending on whether n is even or odd, respec- tively. This means that D (A) + D Q (A) = n/2 or (n+l)/2 for every A e C . Since R f = f"i°g 2 (Di e (0) + 1)"| + 1 = flog 2 (f +1)1+1 holds o if n is even, or R = flog (r^ + l ^\ + 1 holds if n is odd, it o k+1 k+1 follows that n = 2 - 2 or n = 2 -3 is the necessary and suffi- cient condition for f to have a unique minimum negative gate network. Q.E.D. Theorem 4.5 - The even parity function of n variables, f =x 1 ©x_©. . .©x ©1 has a unique minimum negative gate k+1 k+1 network if and only if n = 2 -2 or 2 -1 for k = 1,2,... . Proof - The proof is similar to that of Theorem 4.2. In C (f ) , r n e every vertex A of weight w has a label f (A)=l if w is even or 46 f (A)=0 if w is odd. Therefore in every directed path from vertex I to vertex there are n/2 or (n-l)/2 inverse edges, depending on whether n is even or odd, respectively. This means that f e f e D Q (A) + D (A) = n/2 or (n-l)/2 for every A e C . Since R f = |log 2 (D I e (0) + 1)1 + 1 - fl°g 2 <§ +1)1+1 holds if n is even, e or R = flog 2 ( I1 2 : ^ +1)1+1 holds if n is odd, it follows that e k+1 k+1 n = 2 ' - 2 or n = 2 -1, for k = 1,2,..., is the necessary and sufficient condition for f to have a unique minimum negative gate network. Q.E.D. Example 4.3 - 3-variable even-parity function f e = x l © x 2© x 3® 1 shown ln F1 S« 4.2(a) has a unique NFS(R f ,f) corresponding to the unique 2-bit, inverse-edge-free labeling for f as shown in Fig. 4.2(b). The corresponding NFS(R. , f ) is e i e e (u. = X-X VX 1 X VX X , U- = U.X.VU.XWUtX.VXtX.X, = f ). 1 1213232 111213123 e 47 00 0) a) a) »-i >w I a> 0) I „ — ¥ — l) ll c o •U o co ,-s H » 4-1 52 CD 3 o — » H — L_ i ► it — — ■ ■' II ■■ *■■ ■■ ! — ■ * — n S o c o m 60 •H csi o •H 4J O ct) U I o CD 4-1 4-1 M O £ 4-1 CU 55 53 Definition 5.3 - An irredundant MPS cell configuration with respect to a negative (possibly incompletely specified) function f is an MOS cell realizing f (or a completion of f) that has no re- dundant FETs. It should be noted that there are usually more than one irredundant MOS cell configuration for a given function. Definition 5.4 - An irredundant MOS network for a function f (possibly incompletely specified) is an MOS network realizing f (or any completion of f) that has no redundant FETs. According to the above definitions, it is obvious that each MOS cell in an irredundant MOS network must have an irredundant MOS cell configuration with respect to the function realized by the cell. It should be noted that even if each MOS cell in an MOS network is irredundant, the network may not be irredundant, as examples will be shown in Section 6. The following definition defines complemented irredundant dis- junctive forms and conjunctive forms, based on which irredundant MOS cell configurations can be obtained according to Algorithms 5.1 and 5.2, respectively. Definition 5.5 - A complemented irredundant disjunctive form for a negative function f (possibly incompletely specified) is the comple- ment of an irredundant disjunctive form for the complement of f, f . A complemented irredundant conjunctive form for a negative function f (possibly incompletely specified) is the complement of an irredundant conjunctive form for the complement of f, f . 54 Definition 5.6 - A complemented minimum sum-of -products form for a negative function f (possibly incompletely specified) is a complemented irredundant disjunctive form for f that has the minimum number of terms and the minimum number of literals among all comple- mented irredundant disjunctive forms for f . A complemented minimum product-of-sums form for a negative function f (possibly incompletely specified) is a complemented irredundant conjunctive form for f that has the minimum number of alterms and the minimum number of literals among all complemented irredundant conjunctive forms of f. Example 5.1 - Suppose a completely specified negative function f = x.x»v x„x. v x.x.x, is given. The MOS cells shown in Fig. 5.2 (a) -(d) are irredundant MOS cell configurations for f . The MOS cell shown in Fig. 5.2(a) is obtained from the complemented minimum sum- of-products form of f, i.e., f = x.x_V x 2 x~ v x,x_x, . Fig. 5.2(b) shows a cell obtained from the complemented minimum product-of-sums form of f, i.e., f ■ (x v x 2 ) (x ? v x~) (x 2 v x, ) (x.. v x~) . These two cells are not the simplest irredundant ones for f. Fig. 5.2(c) and (d) show two other simpler irredundant MOS cells for f which are obtained by factoring out common terms from (a) and (b) , respectively. Example 5.2 - An incompletely specified f of four variables is given in the truth table form (C, (f) with don't care components denoted with *) as shown in Fig. 5.3(a). Two complemented minimum sum-of -products forms of f, f.. = x.x. v x.x~v x 2 x~ v x 2 x, and f 2 = x^ 2 v x,x, v x ? x„ v x-|X, > are obtained by assigning f(1010)=0 and f (lOOl)-l and also by assigning f(1010)=l and f(1001)=0, 55 ■O f HL x ~ (a) An irredundant MOS cell configuration for f based on complemented minimum sum-of-products form of f . -H H H -O f r "L (b) An irredundant MOS cell con- figuration for f based on the complemented minimum product- of-sums form of f . Fig. 5.2 Example 5.1: irredundant MOS cell configurations for f = X-X_ v x x v x,x_x. • 12 2 3 13 4 56 CN CN X >— o J L CO 1 u 3, •H 4-4 • C /-» O £> CJ o-' -h a iH O 0) M O 14-1 <*> t3 O CD £ > •H 4-1 M C •H 4-1 J-i a CD rd X X) s U-l 3 X) )-i CD O >-i U-l S-i •H c o d •H > 4-l O u u •H to •HOC 4-1 CO (4-1 O co 3 -h u cu CO 3 4-» 5) 4-» o o CO >H 3 •H •H 4J 3 4-1 CO rO 4-i 3 0) 4J M O N t) 3-0 CJ -H 00 CU iH ~t4 -r\ rH CO CO 4-1 4-( rH CU CU 3 -H 0> J-i o o cj o TJ O CU 4J Cu Cfl i-t <-n iH CO O rQ rH S -3 — a> >-. 00 CJ rH 4-> 3 CO CU s o CO C/3 4-1 CO ,3 O H 3 rH 14-1 CU 3 < - tl T3 3 3 O CU O CO o V-i • •H-O C U 4-1 4J -H •rl a 3 (-1 es -a cu 3 O 3 CU ,3 < 4-1 4-1 J-I 4-1 59 T3 cu I •rl 4-t 3 O c_> co rH CO c 1 Q 1 r r . 1 1 CM rn_ Cs| CN CO cn X O H 4-1 CU XI 3 4-> O -H •H CU 4-> CO 4-1 >-i O 3 00 3 •H O •H ^! 4-1 U O J* 4-) cu 3 o o O cO u rH 4-1 rH X CU CU CJ I CU CO ,3 CO 4-1 O CU SH g oo 5 4-t 3 H 3 *H 4-1 CO CO 3 CU O 3 r3 CU O u • r- «J 4-( Pt CU « ,3 cj •H CN 00 4-1 3 •H 4-1 N O CN u •H 4-1 H CU rH rH CU a. u O rd CJ CO m oc •H 60 The following algorithm is based on the algorithm given by T. Ibaraki [Iba 71] which obtains a complemented irredundant dis- junctive form for a negative function (Definition 5.5). Algorithm 5.1 - Derivation of a complemented irredundant dis- junctive form for a given incompletely specified negative function f of n variables. (This algorithm is illustrated in Example 5.3.) Step 1 - Obtain a subset S-.. of the set V of all n-dimentional L — 0* n binary vectors such that X e S^ if and only if f (x)=0 or * holds and no y > x satisfying f(y)=l exists. Step 2 - Obtain Min [S_^] , the set of minimum vectors of S^ , such that X e Min [S_ A ] if and only if there exists no Y e S satisfying Y < X. '0* J » "^"o* Step 3 - Obtain an irredundant subset of Min[S nA ] , Irr[S nJlt ] Min[S n ^] such that, for every X satisfying f(X)=0, there exists a Y e Irr[S_J satisfying Y < X. (The term "irredundant" means that the removal of any vector from Irr[S_ A ] will cause the above condi- tion unsatisfied.) A subset Irr[S nvt ] of Min[S ^] satisfying this condition will be referred to as an irredundant cover of Min[S_.] . — — — — — ^— _ U»t (The problem of obtaining an irredundant cover is a covering problem.) Step 4 - For each A = (a..,..., a ) e Irr[S n ^], make the corre- a l a 2 a n sponding product term of input variables P. = x, x~ . . . x such a i that if a. ■ 0, x =1 (therefore x. is not included in P.) and 61 if a i a. = 1, x. = x. . The complement of the sum of these product terms, f i = a t rc^ l A » is a co m plemented irredundant disjunctive form for f. From a complemented irredundant disjunctive form, it is easy to construct an irredundant MOS cell configuration for f . For each term P in f . , make a serial connection of FETs such that correspond- ing to each literal in P. there is an FET with the input represented by the literal. Then, parallelly connect all these serially connected FETs. The resulting MOS configuration constitutes the driver part of the irredundant MOS cell configuration designed for f. Steps 1 and 2 of Algorithm 5.1 involve only simple calculations. Step 3 requires the solution of a covering problem which is relatively simple since any irredundant cover will be sufficient for our purpose. Step 3 is necessary since f is generally an incompletely specified function (see Example 5.3 to be presented later). If f is a com- pletely specified negative function, it will have only one complemented irredundant disjunctive form. In such a case Step 3 is unnecessary because Irr[S_^] = Min[S--^] . In Step 3, if a minimum cover is obtained the resulting configuration will contain a smaller number of FETs. (This may not be true, if factorization is con- sidered.) Step 4 of this algorithm is trivial. 62 The validity of this algorithm can be easily proved. First to prove that the constructed MOS cell realizes a completion of f, we need to prove that for every specified false vector, there is a path between the two terminals of the driver part of the cell. This is obvious since Step 3 guarantees that for each vector A such that f(A) - 0, there is a vector B in Irr[S..] such that B < A. Therefore, u* — when input A is applied to the cell, the serially connected FETs corresponding to B forms a conductive path. Similarly for each vector A such that f(A) ■ 1, no vector B e[Irr S n A satisfies B < A according to Steps 1 and 2. Therefore, when A is applied, there will be no path in the driver part of the constructed cell. This proves that the constructed MOS cell realizes a completion of f . Next, we need to prove that the MOS cell obtained is an irredundant MOS cell configuration for f. If it is not, there must exist one or more FETs such that the extractions of them do not affect the realization of f . Let us first consider the case where one FET is redundant. According to the manner in which the cell is constructed, the s-extraction of an FET which corresponds to literal x in a term P. means the replace- ment of A e Irr[S-^] by a vector B I Irr[S ^] such that b =0 (a =1) and b =a. for j?*i. Since B t Min[S ^] (otherwise A e Irr[S 0it ] can not hold), it is clear that there must exist a vector B' such that B' >_ B and f(B') = 1. However, when B' is applied to the cell obtained by the s-extraction of the FET, a conductive path from the output terminal to ground will appear which results in the output 63 value since B' ^ B and the s-extraction of the FET causes the replace- ment of term P. by term P in the corresponding expression. Therefore, no s-extraction of any FET can be performed without changing the output values of f corresponding to some specified inputs. On the other hand, the o-extraction of an FET corresponding to any literal in term P. from the cell means the removal of the vector A from A Irr[S-^]. Since Irr[S n ^] is, according to Step 3, an irredundant cover of Min[S n .] satisfying that for every X satisfying f(X)*0, '0* J c iv-i-rc 0* J there exists a Y e Irr[S n .] satisfying Y <_ X, the removal of term A from Irr[S..] means that for some vector B satisfying B > A and f(B)=0, there exists no Y e Irr[S..] satisfying Y < B. This, in turn, means that the resulting MOS cell after the o-extraction will produce an output "1" for input B. Consequently, the designed MOS cell by Algorithm 5.1 is an irredundant MOS cell configuration for f. Sometimes the number of FETs in an MOS cell designed by Algorithm 5.1 can be reduced by factoring out common literals in the expression obtained in Step 4. Obviously, this factorization does not change the irredundancy of the MOS cell. Example 5.3 - A switching function f is specified as shown in Fig. 5.4(a). By Step 1 of Algorithm 5.1, S f Qie = {(11111), (11110), (11101), (11011), (10111), (01111), (11100), (11010), (11001), (10110), (10101), (10011), (OHIO), (01101), (11000), (10001), (01100)}. Then Step 2 64 CO m X. Step 3 - Obtain an irredundant subset of Max[S..], IrrtS-.] £L 1* 1* Max[S. .] such that for every X satisfying f(x)=l, there exists a i x Y e IrrtS^] satisfying Y >_ X and that the deletion of any vector from Irr[S lJlf ] will cause the above condition not satisfied for some f(X)=l. (Irr[S-^] is called an irredundant cover of Max[S.^] .) Step 4 - For each A = (a.,..., a ) e Irr[S...] make the corre- * 1 n ±" sponding alterm of input variables Q. = a.x.. a o x o "*" a x su ch that if a.=0 then a.=l (therefore x. appears in Q. . Otherwise x. x i i A i is not in Q A ). The complement of the conjunction of all these A. alterms, r „f ■. , is a complemented irredundant conjunctive A£ Irr L S- ^j form for f. From the complemented irredundant conjunctive form of f , it is easy to construct an irredundant MOS cell for f. The dual procedure of the one discussed after Algorithm 5.1 can be used and is omitted here. 68 Example 5.4 - Consider the function f given in Example 5.3. f Step 1 of Algorithm 5.2 obtains S ^ = {(00000), (10000), (01000), (00100), (00010), (00001), (11000), (10100), (10010), (10001), (01100), (01010), (01001), (00110), (00101), (00011), (11010), (OHIO), (01101), (01011), (00111), (01111)}. Then Step 2 calculates Max[S^] = {(11010), (11001), (10100), (01111)}. In Step 3, Irr[S^] = {(11010), (10100), (01111)} is obtained as the only irre- dundant cover. Therefore, f = x. (x- v x-) (x„v x, v x,) = x 1 (x_(x«v x, ) v x,.) . The irredundant MOS cell corresponding to the above two expressions are shown in Fig. 5.5(a) and (b) , respectively. The second cell happens to be an MOS cell with a minimum number of FETs (since f depends on all five input variables and each variable requires at least one FET) . 69 X! l r CO CM o •o 0) •-s o -3- to o > S CM X •u s_- C CO cd X 13 \^ a iH a X 13 4-1 X rH •H > 1 £ CM ) < ' 1 r 4 r^ ► P"~ < > 1 ' CO X s X i 4-) > i— i X c cd CO X X 13 2 iH X 1 , 1 V. . VIS || u U iH T T CO CM CO X X >^^ 70 6. DESIGN OF IRREDUNDANT MOS NETWORKS This section will present an algorithm for the synthesis of ir- redundant MOS networks defined in Section 5 (Definition 5.4). First we will show, in Section 6.1, that the conventional approaches for MOS network design sometimes produce redundant MOS networks. Then an out- line of the algorithm to be introduced in Section 6.4 will be presented in Section 6.2. Some concepts necessary for better understanding of the algorithm will be introduced in Section 6.3. Some illustrative examples will be given in Section 6.5 to show the effectiveness of the algorithm. 6.1 Conventional Design Procedures of MOS Networks The algorithms given in [NTK 72] and [Liu 72] design MOS networks for a given function in two separate phases: Phase I - Design an NFS(R f ,f) (a negative gate network) in which the function to be realized by each negative gate (MOS cell) is speci- fied with respect to the external inputs. Phase II - Design an MOS cell to realize each of the functions specified by Phase I (i.e., the design of the internal configuration of each cell) . As discussed in the previous sections, algorithms MNL and MXL design networks with a minimum number of negative gates. These algo- rithms and the algorithm based on the relabeling of the clustered n-cubes obtained by algorithm MNL or MXL (as demonstrated in Examples 3.3 and 3.5) correspond to Phase I in the above two-phase design 71 procedures since the internal structure of each negative gate (MOS cell in an MOS network) is not designed by them. In order to design an MOS network, each negative gate should be realized by an MOS cell; this corresponds to Phase II of the design procedures. The design algorithms of irredundant MOS cell configurations in Section 5 can be applied for this purpose although they are different from the algorithms given by [NTK 72] and [Liu 72] which may not yield irredeundant MOS cell con- figurations for each negative function specified by algorithms of Phase I. Even if each MOS cell configuration is irredundant, the conventional design approaches with two separate phases have a disadvantage that the designed MOS network may contain redundant FETs. In other words, even if we use an irredundant MOS cell design procedure for Phase II, we may not obtain an irredundant MOS network as a whole. This is demonstrated by the following example. Example 6.1.1 - Consider the five minimum NFS(3,f)'s for f = x_x,vx 2 x_ discussed in Example 3.5 (Table 3.2). If we design an irredundant MOS cell for each negative function in each NFS(3,f), we will obtain five MOS networks for f as shown in Fig. 6.1.1(a)-(e) . Each figure shows the labeled 3-cube corresponding to each NFS(3,f) in Table 3.2, and an MOS network obtained by designing an irredundant MOS cell for each function in this NFS(3,f). For example, Fig. 6.1.1(a) shows the labeled 3-cube corresponding the NFS(3 t f)- in Table 3.2 which is obtained based on the stratified structure of f given by [Liu 72] . The clusters of the statified structure of f are enclosed in broken 72 U l =X 2 u 2 = u x v x^ u 3 = u lV u 2 x 3 = f (a) Labeled 3-cube and MOS network for NFS(3,f).. Fig. 6.1.1 Example 6.1.1: MOS networks based on stratified structure of [Liu 72] for f = x,x„v x x (see Example 3.5). 1 2 2 3 v 73 100 u l = x 2 u 2 = Xl x 2 x 3 u 3 = u 1 v^x 3 u 2 = x 2 (x 3 V X-jJ^X-) = f (b) Labeled 3-cube and MOS network for NFS(3,f), Fig. 6.1.1 (Continued) 74 110 100 U l = X 2 X 3 u 2 = ^ U 1 V x l^ x 2 XaV 2C-. XrtX« u 3 = u 2 c 1 1 , u l 4 1 ) — X (c) Label 3-cube and MOS network for NFS(3,f). Fig. 6.1.1 (Continued) 75 100 '2 "2 u 3 " U 2 V u l*3 ' x 2 < x i x 2 x 3 v x 3> (d) Labeled 3-cube for NFSO.f)^. (An MOS network for NFS(3,f) 4 can be obtained from the network shown in (b) by interchanging u. and u..) 100 u 2 ' u l x 2 " X 1 X 2 X 3 V x 2 (c) Labeled 3-cube and MOS network for NFS(3,f),. Fig. 6.1.1 (Continued) 76 C") I X CM > CM X en J — i_r -• — O 4-1 U o I- CM J-i O ■M w o S s a -a 0) a) B o o ci 77 lines in the labeled 3-cube. Figure 6.1.1(a) also shows an MOS net- work corresponding to NFS(3,f)..: the i-th MOS cell realizes the i-th function in NFSO.f).,, for i - 1, 2, and 3. Although each MOS cell is irredundant with respect to the function of NFS(3,f)., which it realizes, the MOS network as a whole has some redundant FETs. The two encircled FETs indicate redundant FETs: the s-extraction of the FET encircled in the solid line and the o-extraction of the FET encircled in the broken line will yield an MOS network shown in Fig. 6.1.1(f) which also realizes f . All other MOS networks based on the stratified structure of f in Fig. 6.1.1 are also redundant as shown by the en- circled FETs in the networks. Example 6.1.2 - An MOS network derived from the NFS(3,f) by algo- rithm MNL for function f « x x«^x ? x (Example 3.1) is shown in Fig. 6.1.2, The MOS network is redundant as indicated by the encircled FETs. The above two examples demonstrate that the design procedure of networks with a minimum number of MOS cells given by [NTK 72] and [Liu 72] are unable to design irredundant MOS networks for some func- tions. 6.2 Outline of the Design Algorithm of Irredundant MOS Networks Section 6.2 presents the outline of a procedure for the synthesis of irredundant MOS networks with a minimum number of MOS cells for a single function. This procedure also consists of two phases of design, i.e., the design of the functions realized by each negative gate (MOS cell) and the design of an irredundant MOS cell for each of these functions. However, in order to guarantee the irredundancy of the CO 78 N CM i r o — •- % i' y CO CO ft. <1> X! U o M-l T3 CD *T3 ^J o ■U CD e CO S •• CO • CM vD QJ X iH i- cO II CM ^D 00 ■H 79 designed network, the two phases are not performed separately, unlike the case of [NTK 72] and [Liu 72], but interactively. In other words, the network will not be designed by single-pass application of Phase I followed by Phase II, but iterations of application of Phase I followed by Phase II. The motivation is to allow the function realized by the gate in the remotest level from the network output be specified by Phase I as flexible as possible (containing as many unspecified compo- nents as possible. The formal definition will be given later). Phase II can then design the internal structure of an irredundant MOS cell for this function which is usually incompletely specified with respect to the set of external variables, x. , . . . , x . Only when Phase II for this gate has been completed, does this function become completely specified with respect to the set of external variables, x , . . . ,x . This process will be repeatedly applied to the gate in the next remotest level until the network output is reached. This design procedure will guarantee that the designed MOS network is irredundant because each function will be specified to contain as many don't care components as possible. By this we mean that each specified component (i.e., not a don't care) for the function for each gate is absolutely required for the realization of the network output, and therefore, any change in these specified compo- nents caused by extraction of FETs from this cell will change the network output. In order to explain the irredundancy of the designed network, let us consider an MOS network designed by this approach. Since each MOS cell g in this network is irredundant with respect to the function 80 that has been specified so as to contain as many don't cares as possible, any extraction of FETs from this cell g will cause some change in specified values, say u . (A) , of its corresponding function u . , which in turn will definitely lead to changes in the output function of the net- work. Otherwise, those changed components of the corresponding function, u . (A) , would have been specified as don't cares during the design process This means that the designed MOS network is irredundant. A formal proof will be given after the algorithm is introduced. The above is the motivation for the procedure to be introduced in Section 6.4. The outline of the procedure is given below. Let us consider the problem of synthesizing an irredundant MOS net- work with a minimum number of MOS cells for a completely specified function of n variables, f(x , ...,x ). Let NFS(R f ,f) = (u 1 , . . . ,u_ . , in r j. K-— i u =f) be the minimum negative function sequence corresponding to the R f irredundant MOS network to be designed. Outline of the design algorithm of irredundant MOS networks . Given a function f , R is the minimum number of negative gates (MOS cells) required for the realization of f. At the start of this procedure, the entire NFS except u is unspecified, i.e., NFS°(R ,f) = f f * * {u , ...,u ,f} where superscript o means that no function except J. K-— J. * u = f is specified and u. means the unspecified function for u , R- 1 1 * t i.e., all components of u are don t cares. Step - Set i=l. StejU - Specify S, in such a _ that 5, contains as ttany don't care components as possible which is negative with respect to 81 x 1 x , u. , . . . ,u._, . (This step is entered with a partially speci- i-1 * fied negative function sequence NFS (R ff f) ■ (u.. , . . . ,u . , ,u . * 3< i-1, v ^ * u R .-j^.f), and will yield NFS (R f ,f) - (u 1 u ±-1 u. t u 1+ - , . . .., V ,£)0 Step 2 - Obtain an irredundant MOS cell configuration for the in- completely specified function u . with inputs chosen from x_ , . . . ,x , u. , . . . ,u . -. (Algorithms 5.1 and 5.2 may be used). Let u. be the function realized by this MOS cell which is now completely specified with respect to x. x . (After this step NFS (R f ,f) = (u. , . . . ,u . , * * u - , . . . ,u . ,f ) is obtained.) i+J. K^-i. Step 3 - If I«R.-1, design an irredundant MOS cell configuration for f with possible inputs from x- , . . . ,x ,u. , . . . ,u R . , and terminate this procedure; otherwise set i*i+l, and go to Step 2. The nucleus of this algorithm is Steps 1 and 2. Step 2 designs an irredundant MOS cell configuration for a given incompletely specified function which has been discussed in Section 5, so we will, in Section a. 6.3, concentrate on Step 1, i.e., specifying u based on a partially i-1 * specified negative function sequence, NFS (Rc,f) = (u. , . . . ,u , ,u , , * . . . ,u ,f) so as to contain as many don t cares as possible. R f -1 6.3 Maximum Permissible Function The following definitions formally define partially specified nega- tive function sequences and u. mentioned in Section 6.2. 82 t Definition 6.3.1 - A partially specified negative function se- quence of length R f and degree i for a function f is a sequence of R f ± * * functions denoted by NFS (R f ,f) = (u.. ,... ,u. ,u ....... ,u - ,u ) such that: (i) u , . . . ,u are completely specified functions of x. , . . . ,x ; (ii) (u , ...,u ) is an NFS of length i; (iii) u ...... ,u_ _- are unspecified functions (i.e., all components are don't cares); and (iv) u_ =f. f i A partially specified NFS (R f ,f) is feasible if there exists at least one complete specification (with respect to x. , . . . ,x ) u ...... ,u _. * * of u , . . . ,u„ -, such that (u. , . . . ,u_ ,»f) which will be referred to i+1 ^•■f - ■*- -*■ •f"" as a completion of NFS 1 (R f ,f) is an NFS(R ,f); otherwise NFS x (R f ,f) is an inf easible partially specified NFS. Example 6.3.1 - Let us consider a function f of four variables as shown in Fig. 6.3.1(a). We will show some partially specified NFS for f . Fig. 6.3.1(b) shows a feasible partially specified NFS of length 3 and degree 1 for f, NFS (3,f), where u is specified as u. ■ x_ . This is a feasible partially specified NFS since a completion of this partial specification shown in Fig. 6.3.1(c) results in an NFS(3,f). On the other hand, another partially specified NFS of length 3 and degree 1 for f, (u x = x 2 , u* f), shown in Fig. 6.3.1(d) is an infeasible NFS (3,f); Although the word "partially specified" has a meaning similar to "incompletely specified," the latter is used only in conjunction with a single function, in order to avoid confusion. 83 CO V0 rH 0) ro 4) vo CO •H M CO > •H fe 84 a •H d o o CO * vO M •H Pn 85 T3 B ti -T-T 86 -(0011)-K0010) (two inverse edges along the path but only one bit can be used to cover them) . Definition 6.3.2 - The maximum permissible function u for a feasible partially specified NFS of length R_ and degree i-1 for function f, i-1 * * NFS (R f ,f) ■ (u. , . . . ,u . .. u .,..., u D ,»f), is an incompletely specified * r function for u. such that: a. (i) u. is negative with respect to x-,...,x , u- , . . . ,u . -J *\i i (ii) every negative completion u of u. yields a feasible NFS (R f ,f) ■ (^ u lt u 1+1 ,...,u R -,f); and (iii) any function u' which is not a completion of u. will make corre- al * * sponding NFS (R f ,f) = (u. , . . . ,u._,,u',u. - , . . . ,u _-i»f) infeasible. It should be noted that the condition (iii) in the above definition is necessary since we want to have a max imum permissible function that contains as many don't care components as possible. In other words, each specified value of u. is absolutely required, as expressed by condition (iii). Example 6.3.2 - Consider the function f discussed in Example 6.3.1. The maximum permissible function u.. for NFS (R f ,f) is shown In Fig. 6.3.2(a) where u-Cllll) = 0, u^lOll) = 0, 2^(0010) = 1, u^OOOD-l, and u 1 (0000)=l are the only specified values of u. . If we change any one ** * of these specified values to its complement, the resulting (u', u~ t f) will no longer be a feasible NFS (3,f). For example, if we set u£(1011)=l, we must set uj(1010)=uj(1000)=u^(0000)=l as shown in 88 Fig. 6.3.2(b) (underlined) because u' must be a negative function with respect to x. x . Then no matter how u_ is specified, there will r 1 n 2 be an inverse edge along the path (1011) -(1010) -(1000) -(0000) in the resulting labeled 4-cube. (There are two inverse edges along this path in C,(f), but only one bit (u„) is allowed to make the labeled A-cube C,(f) not have inverse edges.) It can be proved similarly that any of the other four specified values of u- cannot be changed without causing the resulting NFS (3,f) infeasible. On the other hand, every -v * 1 negative completion u. of u makes (u-,u„,f) a feasible NFS (3,f). This can be proved exhaustively, but it is omitted here. Now we are ready to present an algorithm which obtains u. based on i-1 , * * a given NFS (R_,f) = (u.,...,u. .. ,u , . . . ,u ,,f). This algorithm I i. 1— J. 1 K-— J. involves two major steps, one of which is an algorithm to obtain condi- tional minimum labeling (CMNL) and the other conditional maximum label- ing (CMXL) which are similar to algorithms MNL and MXL, respectively. Algorithm 6.3.1 - Conditional Minimum Labeling ( CMNL ) This algorithm obtains a conditional minimum labeling for a given feasible NFS 1_1 (R,,f) = (u. , . . . ,u, , ,u* . . . ,u* . ,f) . The conditional r 1 i— J. 1 K_— 1 i-1 r i -1 minimum labeling of NFS (R f ,f) is a completion NFS (R f ,f) = (u , . . . , u i _ 1 ,u_ i ,. . . .u^ _ lt £) of NFS 1 " (R f ,f) such that the label H(A;u- u. , Hb _i> f ) = L mn ^ for each A in tne corresponding labeled n-cube C (i' , . . . ,u ._, ,u_ , . . . ,u^ __ ,f ) takes the minimum possible value among all feasible completions of NFS " (R f ,f). 89 CO vO tU ! es • CO • • SO ^s rH n 0G vo •H 01 ■-I P. B 5 £ CO vO 60 •H eo 90 *-> m a. I .c (0 CO 01 JS H i iH XI T< 0) cd 01 "4-1 c o ■^ •O- /-N 111 V «-l C \ * 00 1-1 1 * C^l / 3 cr, 05 « 01 0) Tl U 01 01 •H > H-l c -H •H u CM vO 00 •H 91 f i 1 ^ Rp-k. Step 1 - Assign as i/^ (I) the value [ 2 u k (I) + f(I). k*l Step 2 - When L ' (A) is assigned to each vertex A of weight w (l L ' (A) for every directed edge AB terminating mn — mn at B. (Notice that each of the i-th through (R r -l)-st bits of L f ' i ~ 1 (B) i mn is or 1 depending on what L ' (B) is found as the smallest binary integer.) Step 3 - Repeat Step 2 until L * ~ (0) is assigned. Step 4 - The k-th most significant bit of L ' (A) is denoted by c — ° mn u,(A) for k=i, . . . ,R f -l and for each AeC , NFS (R f ,f) ■ (u. , . . . ,u._. , u. , . . . ,u^ . ,f) has been obtained as the completion of NFS (R f ,f) by CMNL. The validity of this algorithm is obvious. Since NFS " (R ,f) is a feasible partially specified NFS, it must have a feasible completion. The algorithm assigns a minimum possible value as a label to each vertex, and conditions (A) and (B) of Step 2 guarantee that the resulting labeled n-cube is a completion of NFS (R f ,f) while condition (c) of Step 2 guarantees that the labeled n-cube has no inverse edge, constituting an NFS. Similarly, algorithm MXL can be modified to obtain a conditional maximum completion of NFS (R f ,f). 92 Algorithm 6.3.2 - Conditional Maximum Labeling ( CMXL) This algorithm obtains a conditional maximum labeling based on a given i-i * * feasible NFS (R,-,f) ■ (u. , . . . ,u . , ,u u- n ,f ) for a function f. t J. 1 — 1 1 Kp— ± i-1 The conditional maximum labeling of NFS (R f ,f) is a complete specifi- cation NFS 1-1 (R r ,f) = (u- ,.. .,u. ,,u.,...,u T) ,,f) of NFS " (R r ,f) such that t l i — i 1 Kp— ± t the label £(A; u 1 , . . . ,u ,u . , . . . ,i!L . ,f ) = L ' ~ (A) for each A in the 1, i— ± l ^f~ -*- ^^ corresponding labeled n-cube C (u_, ... ,u., , NFS (R f ,f) = (u , . . . ,u i _ 1 ,u i , ...,<1 _.,f) has been obtained as the completion of NFS " (R f ,f) by CMXL. 93 The validity of this algorithm is obvious since NFS (R f ,f) is a feasible partially specified NFS which has at least one NFS(R f ,f) completion. This algorithm assigns the maximum possible label to each vertex of the labeled n-cube, and conditions in Step 2 guarantee the labeled n-cube is an NFS(R f ,f). Example 6.3.3 - Consider the function discussed in Examples 3.1 and 3.4. The function f is shown in Fig. 3.2(a) (also in Fig. 3.3 (a)), and the C-(u.. ,u ? ,f )s based on MNL and MXL are shown in Fig. 3.2(b) and Fig. 3.3(b), respectively. These two labeled 3-cubes can also be JL JL obtained by CMNL and CMXL for NFS°(R f ,f) = (u ,u 2 ,f). 1 * Now let us consider an NFS (R f ,f) = (u..,u 7 ,f) shown in Fig. 6.3.3 (a) in the form of a partially labeled 3-cube. According to algorithm CMNL, NFS 1 (3,f) is completed as NFS 1 (3,f) as shown in Fig. 6.3.3(b). Similarly, NFS (3,f) is completed by algorithm CMXL as NFS (3,f) as shown in Fig. 6.3.3(c). The following algorithm obtains the maximum permissible function ^ i-1 * u for a feasible partially specified NFS (R f ,f) = (u. , . . . ,u . - u . , * . . . ,u ,f ) . The proof of this algorithm also shows the existence of R f -1 the maximum permissible function defined by Definition 6.3.2. Algorithm 6.3.3 - Derivation of the maximum permissible function f) obtained from NFS 1 (3,f) by algorithm CMXL. Fig. 6.3.3 Example 6.3.3. 95 i-1 Step 2 - Obtain another completion NFS (R f ,f) * (u , . . . ,u ,u , &.,..,...,&_ n ,f) according to algorithm CMXL. 1+1 K-— 1 Step 3 - For each vertex A of C , do the following: (i) assign u^A^O if and only if u (A)=0 and b ± (k)=0, (ii) assign u (A)=l if and only if u.(A)»l and u (A)=l, (iii) assign u (A)=* (unspecified) if and only if u (A)=0 and u (A)=l Theorem 6.3.1 - The function obtained by algorithm MPF is the maximum permissible function for the feasible partially specified i-1 * * NFS (R f ,f) = (u 1 ,...,u i _ 1 ,u i ,...,u R ,f). Proof - To prove u is the maximum permissible function for i— 1 'Xi NFS (R ,f), we have to prove: (i) there is always a solution u. which is negative with respect to x.,...,x ,u. , . . . ,u._, if NFS (R f ,f) is a feasible partially specified NFS, (ii) changing any specified component of u , i.e., changing u (A)=0 to u'(A)=l or u (A)=l to u'(A)=0 will make the corresponding NFS (R f ,f) infeasible, and (iii) any negative completion u. of u. (with respect to x. x ,u, , . . . ,u. , ) will make * * the corresponding (u , . . . ,u ,u - , . . . ,u D . ,f) to be a feasible 1 1 i+1 K-— l partially specified NFS of length R f and degree i for function f . (i) Since the given partially specified NFS is feasible, there must exist at least one completion (u , . . . ,u._, ,u. , . . . ,u , ,f) of * * (u n , . . . ,u . .. ,u. , . . . ,u_. ,,f) such that C (u. , . . . ,u - ,f ) is a labeled i i—l i K_ — i n l K-— i n-cube without any inverse edge. Algorithm CMNL assigns the minimum possible value to each vertex of C so that the resulting labeled 96 n-cube has no inverse edge. Therefore Step 1 of algorithm MPF can always be successfully executed without any problem (e.g., the condi- tions in Step 2 of CMNL may not be simultaneously satisfied without additional bits) . Similarly, Step 2 of algorithm MPF can be success- fully executed without any problem because algorithm CMXL can be successfully executed. Besides, for every vertex A in C , L f,1_1 (A) < L f,1 ~ 1 (A), and therefore u . (A) < Q.(A). The three cases mn — mx — i — i in Step 3 of algorithm MPF exhaust all possible combinations of u_. (A) and u . (A) , so that u. can always be determined by algorithm MPF for a given NFS (R f ,f). Furthermore, there must be some vertex A such that u.(A)=0 since otherwise (i.e., if u.=l, or * for each vertex A) u.=l l l l for every A results, and (u 1 ,u , . . . ,u . , ,u , . . . ,u_ . ,f) i L 1—1 1+1 K^.— 1 1 without u.=l would be an NFS of length Rf - 1 for f which contradicts the assumption of the NFS having a minimum length R f . Similarly, there must be some vertex B such that u.(B)=l since otherwise (u. ,u , . . . ,u. , ,u . ....... l 1* 2 i-1 — l+l u„ - ,f ) would be an NFS which results in the same contradiction. This "*f _1 proves that algorithm MPF can always be successfully executed. Now we have to show that u. is negative with respect to x. , . . . ,x , U- , . . . ,u . - . According to the definition of NFS (R f ,f), (u.,...,u. .) is an NFS of length i-1, and therefore C (u. , . . . ,u . n ) has no inverse n 1 l-l edge. Assume u is not negative with respect to x_ , . . . ,x ,u. , . . . ,u . . , then by Theorem 2.3 there must exist two vertices A and B in C such n that (a) (a 1 ,...,a n ,u 1 (A),...,u i _ 1 (A)) > (1^, . . . .b^u^B) , . . . ,u ^(B)) , and (b) u.(A)=l and u.(B)=0. In order to satisfy condition (a), A>B must hold. This means that u (A)=u (B) for k=l i-1 must hold since 97 (u-,...,u .) in an NFS(i-l, u ) by Definition 6.3.2 and therefore l(k; u- , . . . ,u . - ) f_ £(B; u.,...,u .) for A > B. However, this can never occur since u (A)=l and u.(B)=0 mean that u (A)=l and u (B)=0, respectively, according to Step 3 of algorithm MPF, contradicting the fact that u.(A) and u (B) are obtained by algorithm CMXL that pro- duces a labeled n-cube C (u , . . . ,u . n , u . , . . . ,u D .. ,f) without inverse n i i—l i K_— l edge. Thus u. must be negative with respect to x, , . . . ,x , u, ,...,u. , . i 1 n 1 l-l a. (ii) Now let us prove that if any specified value of u (A) is changed from u.(A)=l to u'(A)=0, or from u (A)=0 to u'(A)=l, then the ^, * * resulting (u , . . . ,u ., u , u. .,..., u -, f) will not be feasible, 1 i— J. i i+l K-— J. i.e., no completion of (u , . . . ,u 1 , uT, u ...... ,u , f) can be 1 i— i i i+1 R_— 1 an NFS(R f ,f). This can be proved easily based on the properties of the labels obtained by CMNL and CMXL. Obviously, L ' 1_ (A) is the mn minimum possible label for A among all possible labelings correspond- ing to feasible completions of NFS (R f ,f). Similarly, L ' (A) is the maximum possible label for A. On the other hand, u (A)=0 means both u (A)=0 and u. (A)=0 which implies i-1 R.-k f . , , n i-1 R.-k R.-i I 2 f u. (A) : L ' X V) < L f ' i_1 < £ 2 f u, (A) + 2 f . krt k - mn - mx ^ k However, if u.(A)=0 is changed to u*=l, any completion of (u , . . . , ^ * * i_1 R f" k u ;j ,_ 1 , u^, u ,...,u R ,f) will assign a label L(A) >_ £ 2 u k (A) + f k=l 2 > L * (A) which contradicts the property that L ' (A) is mx mx the maximum possible label attached to A for any feasible completion * * <\, of (u , . . . ,u ., u , . . . ,u -). Consequently, u . (A) can not be 1 i—l i f — i 98 changed from to 1 without destroying the feasibility. Similarly, no u.(A)=l can be changed to u.(A)=0 because otherwise every com- -x,^ * * pletion of (u n , . . . ,u ., uT, u . , . . . ,u , f) will assign a label J. i — J. i i+i K._ — l p • i -to A which is less than L ' (A) , and thus make this sequence of mn n functions infeasible. This completes the proof for (ii) . (iii) To prove that u. is indeed the maximum permissible func- tion for NFS (R f ,f), we have to show every negative completion u (with respect to x. x , u,,...,u. ,) of u . produces a feasible 1 n' 1' ' i-1 l r NFS (R f ,f). In other words, we have to prove that (u- , . . . ,u . , * it u , . . . ,u , f) has at least one completion which is an i+i R_ — 1 NFS(R r ,f). Let us consider a labeled n-cube C (u, ,u n , . . . ,u . .v. . , , f nl2''i' i+i . . . ,v , f ) such that R f -1 v. (A) = u.(A) for j = i+l,...,R f -l if u (A)=0; and Vj (A) = Uj (A) for j = i+l,...,R f -l if u^^CA)^. Since u . is a completion of u . , u.(A)=0 means either u.(A)=0 (i.e., both u.(A) = u.(A) = 0) or u.(A) = * (i.e., u.(A)=0 and u.(A)=l). Similarly, u.(A)=l means either u . (A) = 1 (i.e., both u_.(A)=l and u.(A)=l) oru.(A) = * (i.e., u. (A)=0 and u.(A)=l). Therefore, the above labeled n-cube has the following labels: L(A) = Lf' i_1 (A), if u.(A)=0 mn 1 L(A) = L f ,1 " 1 (A), if u.(A)=l. mx l 99 Next we shall prove that C (u. ,u« t . . . ,u. , v . . , . . . ,v , f) is n l z i l+l K_— 1 an NFS(R f ,f). This will, in turn, prove that any negative completion of u. with respect to x. x , u.. , . . . ,u ... produces a feas ible i ■* NFS (R f ,f). Suppose there is an inverse edge AB in C (u.. ,u~, . . . ,u , v , . . . ,v , f ) . Since (u , . . . ,u .) is an NFS(i-l,u. .) which 1+1 K~—l 1 1—1 1—1 has no inverse edge, u (A)=u.(B) must hold for j=l,...,i-l. There- fore, the following three cases must be considered: (a) u (A) = u (B) = 0, but L(A) > L(B) . This can never occur since from the above conclusion we have L(A) = L f ,1 ~ 1 (A) and L(B) = L f ' 1_1 (B) which are produced by algorithm mn mn CMNL that guarantees the produced labeled n-cube has no inverse edge. (b) u (A) - u (B) = 1, but L(A) > L(B) . This can not occur since we have L(A) = L ' (A) and tax L(B) = L ' "(B) which are produced by algorithm CMXL that mx guarantees the produced labeled n-cube has no inverse edge. (c) Ui (A) = 1, u i (B) = 0. Since u. is a negative completion of u with respect to x 1 , . . . ,x , u , ...,u._, , there can be no inverse edges in ^ ,._, (u .) . However, (a a R , u 1 (A) , . . . ,u i _ 1 (A)) and (b 1 ,...,b n , u^CB),..., u (B)) form a directed edge in C .^-iCO with u (A)=l and u (B)=0. This contradicts the fact that C , .. (u ) has no inverse edge. Therefore, u (A)=l and u (B)=0 do not occur. 100 Summarizing (a) , (b) , and (c) , it is clear that any negative completion u. of u . will produce a feasible partially specified nega- i * * tive function sequence, NFS (R ,f) = (u , . . . ,u . , u., .,..., u , f ) . t i i i+l K_— i Consequently the theorem statement is proved. Q.E.D. 6.4 Design Algorithm of Irredundant MPS Networks Based on the algorithm for obtaining maximum permissible func- tions, we present our algorithm for the design of irredundant MOS networks as follows. Algorithm 6.4.1 - Design of irredundant MOS networks with a minimum number of MOS cells for a given function f (DIMN ) . Step 1 - Let NFS°(R f) = (u , . . . ,u , f) and set 1=1. (If R f is not known at this step, it will be obtained after NFS°(R f) is obtained by applying CMNL in Step 2). Step 2 - Use algorithm CMNL to obtain NFS 1 " (R f ,f) = ( V-» u i-r *±—-\-v f) - Step 3 - Use algorithm CMXL to obtain NFS (R. ,f) = (u 1 , . . . ,u i _ 1 , u i ,...,vi R , f ) . Step 4 - Obtain function u. by setting: u.(A)=0, if u.(A) = u.(A)=0; u i (A)=l, if u.(A) = u.(A)=l; and u i (A)=*, if u.(A)=0 and u.(A)=l. 101 ^ Step 5 - Obtain an irredundant MOS cell configuration for u. with respect to x. x , u.. u -«-i ^y an appropriate algorithm (e.g., Algorithms 5.1 and 5.2). Let u denote the function realized by this cell (u . is now a completion of u . with respect to x- , . . . ,x ) . Step 6 - If i = Rf-1, design an irredundant MOS cell configura- tion for f with respect to x. , . . . ,x , u- , . . . ,u„ - and terminate this algorithm; otherwise set i ■ i+1 and go to Step 2. The validity of this algorithm is proved by the following theorem. Theorem 6.2 - An MOS network designed by algorithm DIMN (Algorithm 6.4.1) for function f is irredundant. Proof - Let the network designed by algorithm DIMN for function f realize the following NFS: NFS(R f ,f) = (u r ... f u R _ 1 , f). Suppose that there are redundant FETs in the above network. Let g. denote a gate (MOS cell) such that g. has at least one redundant FET but every g., for j=l,...,i-l, has no redundant FETs. Let N^S(R f ,f) be the NFS realized by the MOS network after multiple extractions of these redundant FETs. Then NFS(R f ,f) = (u lt .. ,,u ± _ lt u ± u R _ lt f). where u. , . . . ,u . , are unchanged because no FETs have been extracted from gates g 1 ,...,g._ 1 of the network. Let u. be the function obtained by Step 4 of Algorithm 6.4.1 (DIMN) in the i-th iteration. 102 o ^ Clearly, u. is not a completion of u because u. was obtained by Step 5 which designs an irredundant MOS cell configuration for u. (that means that g. will not realize a completion of u . if any FET is extracted from g.). In other words u. is not a completion of u . . Since u is the maximum permissible function based on NFS (u. ,-..., * * o * u i-l* U i'"* ,U R -1* f ^ ( Theorem 6.3.1), (u 1 ,...,u i-1 ,u i , u i+1 * u_ , f ) can not be a feasible partially specified NFS for f R f -1 r o (Definition 6.3.2) contradicting the assumption that NFS(R-,f) = (u , ...,u. -, u . , . . . ,u . , f) is an NFS(R |: ,f). Consequently, the J. 1—1 1 K f — 1 I MOS network designed by algorithm DIMN must be irredundant. Q.E.D. For better understanding, steps of algorithm MPF were explicitly written as Steps 2, 3, and 4 of algorithm DIMN. Steps 1, 2, 3, 4, and 6 of algorithm DIMN involve only simple labeling and comparisons. Step 5 requires an irredundant MOS cell configuration for an in- completely specified function. This can be obtained by using Algorithm 5.1 or 5.2. As explained in Section 5, these two algorithms are relatively simple compared to algorithms for obtaining irredundant disjunctive or conjunctive forms for an arbitrary function because Algorithms 5.1 and 5.2 are specially tailored for negative functions. 6.5 Examples Two examples showing step-by-step applications of Algorithm 6.4.1 will be presented in order to help better understanding of the algorithm. 103 Example 6.5.1 - Consider the function f considered in Example 3.1. The 3-cube with respect to f, i.e., C-(f), is shown in Fig. 6.5.1(a). Step 2 of Algorithm 6.A.1 obtains NFS°(3,f) as shown in (b) which is identical to the labeled 3-cube obtained by MNL shown in Fig. 3.2(b). Similarly, Step 3 obtains NFS°(3,f) as shown in (c) . Step 4 then compares u, and u and obtains u.. and NFS (3,f) as shown in (d). The NFS 1 (3,f) 1 = (x , u 2> f) in (e) is obtained by Step 5. Step 5 also obtains other two irredundant MOS cell configurations for u and their corresponding NFS (3,f) and NFS (3,f) 3 which will be discussed later. After Step 6, the algorithm returns to Step 2 and obtains NFS 1 (3,f) 1 , NFS 1 (3,f) 1> NFS 1 (3,f) 1 , and NFS 2 (3,f) 1 as shown in (f ) , (g) , (h) , and (i), respectively. Since R = 3, 2 NFS (3,f). is a completely specified negative function sequence with respect to x.. , x 2 , and x~. To finish the design, Step 6 of the algorithm obtains an irredundant MOS cell configuration for f . The completed design is shown in (s) . As proved before, this MOS net- work has no redundant FETs. Furthermore, this network happens to consist of a minimum number of FETs since 3 load FETs and 5 driver FETs are the minimum number of FETs required by function f which can be proved as follows. Based on algorithm MNL, we know that function f requires three MOS cells which means that there are three load FETs and at least two interconnections between cells in any minimum MOS network for f. Since f is a function of exactly three variables, there are at least three connections from external variables (x-,x 2 , and x~) to the three MOS cells. Therefore, in a minimum 104 no 100 (a) C 3 (f) for f = XjX 2 v X 2 X 3' (b) NFS°(3,f) - (u lf u 2 , f), 100 (c) NFS u (3,f) = (a r 2 , f), 000( 1*0 (d) NT'S (3, f) = (u r u*, f), 100 (d) NFS'O.Oj = (Xj, u 2 , f), (f) NFS i (3,f) 1 - (x i , u 2 , f). Fig. 6.5.1 Example 6.5.1, 105 (g) NFS 1 (3.f) 1 - (x x , fl 2 , f), (h) Ni , S 1 (3,f) 1 - (x^ u 2 , f), (i) NFS (3,f) 1 = NFS(3,f) 1 = (x^.x^.f) OOOl 1*0 (j) NFS 1 (3,f) 2 - (x,,u* £) obtained from (d) , 100 (k) NFS x (3,f) 2 = (x 2 , o 2 , f), (£) NFS i (3.f) 2 - (x 2 , fl 2 , f), Fig. 6.5.1 (Continued) 106 (ib) N?S 1 (3,f) 2 = (x 2 , u 2 , f), (n) NFS (3,f) 2 = NFS(3,f) 2 = (x^x^f). (o) NFS 1 (3,f) - (x,u*,f) obtained from (d) . (p) NFS 1 (3,f)j = (x 3 , u 2 , f ) . 100 .<>,.i (q) NFS (3,f) 3 = (x 3 , u 2 , f). (r) Nf'S 1 (3,C) 3 = NFS(3,f) - (x 3> f, f ) . Fig. 6.5.1 (Continued) 107 g 1 (g 2 ) g 2 (g x ) O 8 3 Q X -of (s) Irredundant MOS network corresponding to NFS(3,f)'s in (i) and (n) . O -i 1i 1 i 9 g- -of (t) Irredundant MOS network corresponding to NFS(3,f)^ in (r) Fig. 6.5.1 (Continued) 108 MOS network for f , there are at least three MOS cells and five con- nections which means that f requires at least three load FETs and five driver FETs. As mentioned above, Step 5 of the algorithm can also obtain NFS 1 (3,f) 2 = (x 2 , u 2 , f) or NFS (3,f> 3 - (x" 3 , u 2 , f) as shown in Figs. 6.5.1(j) and (o) , respectively. From (j), the algorithm obtains NFS 1 (3,f) 2 , NFS 1 (3,f) 2 , NFS 1 (3,f) 2 , and NFS 2 (3,f) 2 as shown in (k) , (1), (m), and (n) , respectively. NFS(3,f) 2 and NFS(3,f) are in- distinguishable, since the permutation of u. and u„ in NFS(3,f)« results in NFS(3,f)... The corresponding MOS network for both NFS(3,f)'s is shown in Fig. 6.5.1(s). Similarly, from (o) , the algorithm obtains NFS 1 (3,f) , NFS 1 (3,f) , and NFS (3,f> 3 , as shown in (p) , (q) , and (r) , respectively. Since u„ in NFS (3,f)~ has no unspecified value with respect to x- , x~ , and x~ , NFS (3,f)~ = NFS(3,f) . The MOS network corresponding to NFS(3,f) 3 is shown in (t) , which also consists of a minimum number of FETs for function f as we can prove in the same manner as before. As evident from Example 6.5.1, Steps 2, 3, and 4 are deter- ministic. By this we mean that given a NFS (R f ,f) subsequent NFS 1_1 (R f ,f), NFS 1 ~ 1 (R f ,f), and NFS 1 ~ 1 (R f ,f) are uniquely deter- mined. On the other hand, Step 5 is generally non-deterministic because we may obtain more than one irredundant MOS cell configura- tions for a given u.. In our simple example, when Step 5 of the 109 algorithm is reached for the first time, three irredundant MOS cell configurations for u. can be found. If we are only interested in one irredundant MOS network design for f , any one of the three can be used. No matter which particular irredundant MOS cell configuration is chosen, the designed MOS network will be irredundant. It should be noted that this algorithm usually requires Rf-1 iterations in order to obtain NFS 1-1 (R f ,f ) , NFS i_1 (R ,f), NFS i-1 (R f ,f ) , N^S i_1 (R f ,f) and NFS i (R f ,f) in each iteration for i«l R--1. However, if NFS (R f ,f) becomes a completely specified function with respect to x , . . . ,x , for some i < R f (i.e., NFS (R f ,f) ■ NFS i_1 (R f ,f) holds), then NP < S i " 1 (R f ,f ) - NFS i (R f ,f) - NFS(R f ,f) must hold. In this case, the algorithm only requires i iterations. Even in this case, however, Step 5 of the algorithm must be executed R f -i-l additional times in order to obtain the irredundant MOS cell design for u . , . . . ,u . (the cell design for f is taken care of i+1 K_— l by Step 6). In Example 6.5.1, when we choose u- ■ x_ as the irre- dundant MOS cell configuration for u , NFS (3,f> 3 and NFS (3,f> 3 become the same. Therefore in this case, NFS (3,f)~ = NFS (3,f) 3 = NFS(3,f) 3 . Another point to be noted is that the exhaustion of all alter- natives in Step 5 may not give all irredundant MOS network designs for the given function by the following reason. First, the algorithm does not give a solution which is irredundant but consists of more cells than the minimum number required. Next, some irredundant MOS network with a minimal number of MOS cells may not be produced by this algorithm. The following example demonstrates this fact. 110 Example 6.5.2 - Consider the odd-parity function of three variables, f = x x_ @ x_ . According to Algorithm 6.4.1, NFS°(3,f), NFS°(3,f), and NFS°(3,f) are obtained as shown in Fig. 6.5.2(a), (b) , and (c) , respectively. From u inNFS°(3,f), u ■ x , x 9 , or x„ are obtained as the only irredundant MOS cell configurations for u . This means that every solution obtained by Algorithm 6.4.1 will contain an MOS cell which works as an inverter for one of the input variables. However, the MOS network shown in Fig. 6.5.2(d) realizes f and is irredundant but contains no such MOS cell. Therefore, some irredundant MOS networks with a minimum number of cells may not be produced by Algorithm 6.4.1. Ill (a) NFS°(3,f) - (Uj.Uj.f) for f - x 1 ©x 2 ©x 3 . (b) NFS°(3,f) - (flj.flj.f), (c) N>S°(3,f) - (u v u* 2 ,{) Fig. 6.5.2 Example 6.5.2 CO e II CM 3© X 112 • — <► CM CO a o — *• >r n rr CM CM "-L 4J •H U o 00 o c a o o •rl •i o >4-l a CO S cd C a) u u •H T3 s •H 4-1 o o CM ci •H Pn CM 113 7. DIAGNOSTIC PROPERTIES OF IRREDUNDANT MOS NETWORKS In the previous section, we have presented an algorithm to design irredundant MOS networks for a given completely specified function. The term "irredundant" means that no FET in the network can be extracted from the network without changing the output of the network as defined in Section 5. This property indicates that the designed network is a "diagnosable network." This section will discuss the diagnostic properties of the networks designed according to Algorithm 6.4.1 (DIMN) . Definition 7.1 - An FET is said to be in the stuck-at-short failure mode (or stuck-at-short fault) if this FET becomes permanently conductive. Definition 7.2 - An FET is said to be in the stuck-at-open failure mode (or stuck-at-open fault ) if this FET becomes permanently nonconductive. The stuck-at-short and stuck-at-open faults can be represented by the FET input permanently stuck-at-1 and stuck-at-0, respectively. This fault model has its practical justifications since it is sup- ported by an engineering analysis [SK 69] as discussed in [Pai 73] . Definition 7.3 - An MOS network is said to be diagnosable if every possible single or multiple stuck-at-short and/or stuck-at-open faults in the network can be detected by comparing the output of the faulty network with the faultless network output. 114 This definition is more convenient in practice than the one used in [Pai 73] where a network is said to be diagnosable if every single and multiple stuck-at-short and/or stuck-at-open faults can be detected by comparing the output of each faulty cell with the fault- less one. If we want to diagnose a diagnosable network defined by [Pai 73] , test terminals must be provided at every cell in the net- work in order to detect all possible stuck-at-short and/or stuck-at- open faults in all the cells in the network. On the other hand, if a network is diagnosable in the sense of Definition 7.3, all possible faults can be detected at the network output without the use of extra terminals for testing. Theorem 7 . 1 - An MOS network is diagnosable if and only if it is irredundant. Proof - From Definitions 5.1, 7.1 and 7.2, it is obvious that the stuck-at-short fault of an FET in an MOS network is equivalent to the s-extraction of the FET from the network. Similarly, the stuck-at-open fault of an FET in an MOS network is equivalent to the o-extraction of the FET from the network. From Definitions 5.2, 5.4, and 7.3, therefore, it is obvious that an MOS network is diag- nosable if and only if it is irredundant . Q.E.D. Let symbol N denote an MOS network of n variables which con- sists of k FETs D , D 9 ,...,D, . A faulty network of N will be denoted by N(F) where F is a set of faulty FETs with their respective failure s o modes expressed as D, meaning D. stuck-at-short or D. meaning D. 115 stuck-at-open. Also let f(N,A) and f(N(F),A) for Input A e V be n the function value produced by networks N and N(F) , respectively, for input A e V . f(N) and f(N(F)) may be used when we are not con- cerned with any specific input vector. Definition 7 .4 - A test , A, for a network N(F) with a single or multiple fault F is an input vector A in V such that n f(N,A) t f(N(F),A). Example 7.1 - Fig. 7.1(a) shows a network N for a four-variable — — SO function f(N) = x x^x.v x-.x 2 x . Let F = (D„ , D„) be a multiple fault of N. Fig. 7.1(b) shows network N(F) whose output realizes f(N(F)) » x x-vx ? x-. Comparing these two functions, it is clear that the input vectors (1100) and (1110) are the only tests for N(F) since f(N, (1100)) = and f(N(F), (1100)) = 1, f(N, (1110)) = and f(N(F), (1110)) = 1, and for all other input vectors B we have f(N,B) = f(N(F),B). Definition 7.4 defines tests for a particular fault (either single or multiple) in a network. If we consider a set of faults = {F-,...,F. } (the network can have only one single or multiple fault F at any given moment) , we can define a sufficient test set as follows. Definition 7.5 - A sufficient test set A for a class of faults $ in an MOS network N is a set of input vectors Afi. V such that for r n each F e $ there exists an input vector A e A satisfying f (N,A) ^ f(N(F),A), in other words, A is a test for N(F) . 116 O -1 -O f(N) D 10 O -o D 8 D 9 (a) Network N for function f (N) = x x~x, v x x«x 3 Fig. 7.1 Example 7.1, 117 Of(N(F)) = x-x 2 v x 2 x (b) Network N ({D^ , D°}) . FET stuck-at-short FET stuck-at- open Fig. 7.1 (Continued) 118 The algorithm DIMN presented in Section 6 designs irredundant MOS networks for a given function. According to Theorem 7.1, these networks are diagnosable, i.e., for every possible single or multiple fault F in such a network N, there exists a test A such that f(N,A) t f(N(F),A). This fact is stated in the following corollary. Corollary 7.1 - The set of all 2 input vectors, V , is a suf- ficient test set for all possible single or multiple stuck-at-short and/or stuck-at-open faults in a network designed by Algorithm 6.4.1 (DIMN) . Although V is a trivial sufficient test set for irredundant networks, it may not be a sufficient test set for other networks. For example, reference [Pai 73] presented a procedure to design two- t level diagnosable MOS networks which requires auxiliary test points in order to make all single and multiple faults in the network fully detectable. If a network requires auxiliary test points, the total number of tests may exceed the total number 2 of input vectors (V ) since the output cell generally has more than n inputs. In an example given in [Pai 73] the output cell of the network of three variable which is designed by the two-level diagnosable MOS network design procedure requires nine tests even though the total number of input vectors for that network is only eight. The meaning of the term "diagnosable" used in [Pai 73] is dif- ferent from the one defined in Definition 7.3 of this paper, as noted earlier in this section. 119 Next, we will present some diagnostic properties possessed by the networks designed by Algorithm 6.4.1 (DIMN) . Definition 7.6 - Set S_,(f) is the set of inverse edges in C (f ) , ~~~^~~ m ■— ~— ~— ~~ ~~ ~ t> n i.e., AB e S^f) if and only if AB e C , and f(A) - 1 and f(B) = 0. tj n Definition 7.7 - The characteristic input set S r (f) for a func- tion f is a subset of input vectors such that A e S (f) if and only if AB e S^Cf) or B~A e S^f) for some B e V . E E n Example 7 . 2 - Consider the function f = x 1 x 2 vx 2 x- in Example 6.5.1. Fig. 7.2 shows the labeled 3-cube for f where inverse edges are shown in bold lines. s E (f) = { , UibXioOT, (bib) (6067} The characteristic input set of function f is S c (f) = {(111), (101), (Oil), (110), (100), (010), (000)}. 100 Fig. 7.2 Example 7.2. 120 The following lemma is based on the definition of S (f ) . This lemma leads to an important property of irredundant networks stated in Theorem 7.2. Lemma 7 . 1 - Given two functions of n variables f and f» such that S (f.)£i S_(f ), if (u. , . . . ,u_ ., f ) is a negative function hi E 2. i K — 1 L sequence NFS(R,f„) for f„, then the sequence of functions (u , . . . , u -, f .. ) must also be a negative function sequence NFS(R,f.) for f - , K — l 1 11 where u 1( ...,u D , are the same functions as in NFS(R,f ). Proof - Let us consider the labeled n-cube with respect to (^,...,11^, f^, c n ( u i»"*» u R _i» f i> • If ( u i» u 2»* ••» u r_i» f i^ is not an NFS(R,f-), there must exist an inverse edge AB in C (u, , . . . ,u„ ,, f.) such that n 1 R-l' 1 £(A; u 1> ...,u R _ 1 , f 1 ) > £(B; u., . . ..Ug^, f ^) . (7.1) However, since (u 1 , . . . »u„ , , f~) is an NFS(R,f~), £(A; u 1 ,...,u R _ 1 , f 2 ) <_ £(B; u 1 ,...,u R _ 1> f £ ) (7.2) must hold. From these two inequalities, we have u (A) = u .(B) for i=l,...,R-l and f , (A) = 1, f - (B) = for the following reason. Assume u- (A)=u. (B) , . . . ,u . 1 (A)=u. , (B) but u . (A) ^ u.(B). Because 1 1 l-l l-l l i of (7.1), u.(A) > u.(B) must hold, contradicting (7.2). Therefore u (A) = u i (B) for 1=1,..., R-l must hold. Then from (7.1), fAk) = 1, f,(B) = must hold. 121 This means that AB is an inverse edge in C (f.), i.e., AB e S (f n ) n l El Because of the assumption that S (f 1 )S S_(f 2 ) , AB must be in S_(f 2 ) , i.e., f 2 (A) ■ 1 and f ? (B) = must hold. This results in £(A; u. , . . . , u ., f~) > £(B; u- , . . . ,u R _i, f 2 ) which contradicts (7.2). Conse- quently, (u. , . . . ,u R _ 1 , f,) must be an NFS(R,f_). Q.E.D. Lemma 7.1 asserts that for any function f such that S (f.).C S_(f 2 ) , we can obtain an MOS network for f.. by redesigning only the output cell of an MOS network for f_. Definition 7.8 - A POCF (Pure Output Cell Fault) , F , for an MOS network N is a fault which involves FET(s) only in the output cell. In other words, for every D, or D. e F , D. is an FET in the i i p l output cell of network N. Definition 7.9 - An NPOCF (Non-Pure Output Cell Fault) , F , for an MOS network N is a fault which involves at least one FET which is s o not in the output cell, i.e., there exist at least one D. or D. e F r ' ' i i n such that D is not in the output cell. Let $ denote the set of all possible POCF for network N, and $ the set of all possible NPOCF for network N. It is obvious that n $ , the set of all possible single and multiple faults for N is the union of $ and $ , i.e., p n $ = $ u $ t p n 122 Example 7 . 3 - Consider the network considered in Example 7.1. For the network N shown in Fig. 7.1(a), F ■ (D°) and F = (D^, D°) o / o are POCFs since both D and D are in the output cell. On the / o other hand, F = (D^) , F = (D®, D°) , and F = (D®, D°) are NPOCFs since D is an FET not in the output cell. Theorem 7.2 - The characteristic input set S_(f) for a function f is a sufficient test set for $ , the set of all possible non-pure output cell faults for a network N designed by Algorithm 6.4.1 for f , Proof - Suppose S_(f) is not a sufficient test set for $ for L. n N. This means that some fault F e $ for N can not be detected by n any input vectors in S (f ) . In other words, f(N(F),A) = f(N,A) for every A e S_(f), which means S_(f ) C S (f (N(F))) . Now let g. C E E i denote the cell with a smallest subscript which has faulty FETs. Since F is a NPOCF, i < R f must hold. Then the negative function sequence (u , . . . ,u , f ) realized by N changes to the negative 1 -p - i function sequence (u ,...,u. 1 , u.,...,u_ , f(N(F))) realized by N(F) . Now let us compare NFS(R f ,f (N(F)) ) = (u , . . . ,u , u.,..., u , f(N(F))) and the sequence of functions (u , ...,u. ., u ,..., k_— l 1 i—l i u_ ., f), where only the last function is changed. Since S (f ) CZ. R-— 1 b. S E (f(N(F))) holds, (u 1 ,...,u i _ 1 , u.,...,u R _^, f) must be an NFS(R,f) according to Lemma 7.1. In other words, by properly re- designing only the output cell of the faulty network N(F) , we can obtain an MOS network for f . However, since N is designed by Algorithm 6.4.1, and, more specifically, since cell g. is 123 irredundant with respect to u , u is not a completion of u with respect to x. x , where u is the maximum permissible function * i-i * * for u. in NFS (R f ,f) = (u.,...,u ,, u ., . . . ,u R , f ) . Therefore, by Definition 6.3.2 and Theorem 6.3.1, (u , . . . ,u . ,, u . , . . . ,u B ., f) 1 i — 1 i R- — 1 can not be an NFS, contradicting an earlier result that (u , . . . ,u._, , u . , . . . ,u R _. , f) is an NFS(R f ,f). Consequently, S„(f) is a sufficient test set for $ of N. C n Q.E.D. S (f) is usually a redundant test set for faults in $ for a vo n network N designed by Algorithm 6.4.1 for function f . Section 8 will give an example to illustrate that after eliminating some vectors from S (f) the remaining vectors in S_(f) is still a suffi- cient test set for all the faults in $ for N. n The test set S (f) for $ is a "universal" test set in the C n following sense. As discussed in Section 6, Algorithm 6.A.1 may give more than one irredundant MOS network for a given function. The proof of Theorem 7.2 is not restricted to one particular network but can be applied to every network designed by Algorithm 6.4.1. In this sense, S (f) is a universal test set for the set of all NPOCFs Li for all the networks designed by Algorithm 6.4.1. In other words, no matter which particular irredundant MOS cell configuration we choose in Step 5 in each iteration of Algorithm 6.4.1, S (f) is a sufficient test set for all faults in $ for the resultant network. n 124 Faults in $ may not be detected with tests in S (f) only, but P ^ finding a sufficient test set for $ is relatively easy since all faulty FETs are located in the output cell. In other words, when we want to derive a test set for faults in $ only, all inputs to the output cell are correct and then the test set can be obtained based on the configuration of the output cell only. A test generation procedure given in [Pai 73] may be applied with minor modifications. Reference [Ake 73] discusses the universal test sets for logic networks consisting of AND/OR gates. Based on the fact that AND/OR networks can realize only functions which are positive with respect to the input literals, it was proved that there exists for each function f a universal test set which can detect all single and multiple stuck-at-0 and/or stuck-at-1 faults in any AND/OR networks realizing function f. In the case of MOS networks, since each cell can realize only functions which are negative with respect to the inputs of the cell, a similar discussion can be applied here. Therefore, for the set of pure output cell faults there exists a universal test set which is determined by the given function f realized by the output cell and the functions realized by other cells which constitute the inputs of the output cell. This universal test set will be independent of the output cell configuration. t The term "universal test set" in [Ake 73] means that the test set can detect all single or multiple faults in any AND/OR networks for a given function regardless how these networks are designed. In this sense, it is different from what "universal test set" in the current thesis means. However, [Ake 73] did not discuss the irre- dundancy of the AND/OR networks. 125 Example 7.4 - Consider the function f ■ x -i x 2 v X 2 X, » ^ or wnicn Algorithm 6.4.1 designed two irredundant MOS networks shown in Fig. 6.5.1(b) and (t) in Example 6.5.1. For both networks, S c (f) = {(111), (101), (Oil), (110), (100), (010), (000)} (see Example 7.2) can detect all non-pure output cell faults. This can be demonstrated exhaustively, but is omitted here. 126 8. EXTENSION TO MOS NETWORK FOR INCOMPLETELY SPECIFIED FUNCTION In the previous sections, an algorithm for the design of irredundant MOS networks for a completely specified single-output function has been presented. In this section we will modify the algorithm to be applicable to incompletely specified functions. The extension of the algorithms to the case of incompletely specified functions is straightforward. Let r denote an incompletely specified function. For each input vector A e V , f (A) has the value of 0, 1, or * where * indicates a don't care, i.e., r(A) is not specified. Let f denote a completion of r, i.e., f satisfies f(A) = f'(A) for every AeV such that f'(A)^*, and f(A)=0 or 1 for each A such that f(A)=*. It is easy to modify algorithm MNL for an incompletely speci- fied function, as discussed in [NTK 72] . The only change necessary is to assign proper values to don't cares in f such that each vertex is assigned a minimum possible label satisfying that the labeled n-cube has no inverse edges. This can be achieved by simply modify- ing algorithm MNL (Algorithm 3.1) as follows. Algorithm 8.1 - Algorithm MNL for an incompletely specified function f . Step 1 - If f(I) = *, assign L mr ^(I) = 0; otherwise assign L* (I) = 2(1). mn mn Step 2 - When L (A) is assigned to each vertex A of weight w(l < w < n) of C , assign as L (B) to each vertex B of weight w-1 — — n inn the smallest binary integer satisfying the following two conditions: 127 (a) The least significant bit of L (B) is f"(B) if ^(B)^*; mn f" £ (b) L (B) > L (A) for every directed edge AB terminating at mn — mn ° B. Jf Step 3 - Repeat Step 2 until L (0) is assigned. mn Step 4 - The number of bits in L (0) is the minimal number of — mn negative gates required to realize f , and the i-th most significant bit of L mn (A) is u (A) for each A e C . (The least significant bit 2 -v of L (A) shows f(A) where f is the completion of t obtained by mn this algorithm.) The only difference from Algorithm 3.1 is in Step 1 and the condition (a) of Step 2. It is evident that this algorithm can be applied to completely specified functions also. The validity of this algorithm can be proved in a manner similar to that for Algorithm 3.1 (MNL) . Algorithm 3.2 (MXL) can be similarly modified for incompletely specified functions. Algorithm 8.2 - Algorithm MXL for an incompletely specified functions r. J: R £ Step 1 - If f(0)=* assign L (0) = 2 - 1; otherwise assign * mx 2 R f" * L (0) -2 - 2 + f(0), where R^ is the minimum number of negative gates required for the realization of f and may be obtained by apply- ing algorithm MNL. 128 Step 2 - When L (A) is assigned to each vertex A of weight w — mx I (0 < w < n-1) of C , assign as L (B) to each vertex B of weight — — n ° mx ° w+1 the largest binary integer satisfying the following two con- ditions: (a) The least significant bit of L (B) is f^B) if f'(B)^*; (b) L (B) < L (A) for every directed edge BA originating mx — mx J ° ° from B. Step 3 - Repeat Step 2 until L (I) is assigned. Step A - Let the i-th most significant bit of L (A) be u . (A) * mx l for every A e C . The resulting lu-,...,u } is an NFS(R f ,f), where f = u is the negative completion of f obtained by this algorithm. In order to modify Algorithm 6.4.1 to be applicable to in- completely specified functions, we have to first modify Definition 6.3.1 as follows. Definition 8.1 - A partially specified NFS of length R(=RV) and degree i for an incompletely specified function f is a sequence i / 0"/ * * of R functions denoted by NFS (R,f) = (u. , . . . , u , u .,..,..., u ., L 1 1+1 K— 1 u =f ) such that K. (i) u ,...,u. are completely specified functions with respects to x 1> . . . ,x n ; (ii) (u 1 ,...,u i ) is an NFS(i,u i ); (iii) u .-,... ,u R _, are unspecified functions; and 129 (iv) u = i is an incompletely specified function with respect to K X , . . . , x . i n An NFS (R,f) is said to be feasible if there exists at least one * * ^ complete specification (u , . . . ,u ., f) of (u , . . . ,u - , f) with i+i K — x i+1 R — 1 respect to x , . . . ,x (i.e., a completion of NFS (R,r)) such that (u , . . . ,u . , f) is an NFS(R,f); if there exists no such completion, NFS 1 (R,r') is called an infeasible partially specified NFS. The only difference between Definition 6.3.1 and Definition 8.1 is that the latter contains the last function in the partially specified NFS as an incompletely specified function. The definition of feasibility also takes into consideration the possible completions of *. Based on the modified definition, algorithms CMNL (Algorithm 6.3.1) and CMXL (Algorithm 6.3.2) can be modified accordingly. Algorithm 8.3 - Algorithm CMNL for a feasible NFS (R,£) = u , . . . ,u . ., u , . . . ,u D , »f) where f is an incompletely specified function of x, , . . . ,x . 1 n The conditional minimum labeling of NFS " (R,£) (R=R£) is a completion of NFS 1_1 (R,^) denoted by NFS i " 1 (R,^) = (u-. , . . . ,u. , , u. , . . . ,u_. ., r) such that in the corresponding labeled n-cube, — i — K — i. — C n (u 1 u i-i' iLi' •• * 'Hr_i» ±) » the !abel £(A; u 1 ,...,u i _ 1 , u^,..., y % i u_ , , r) = L ' (A) takes a minimum possible value for every A e C . — R-l' — mn r n Notice that the completion here includes the completion of f also. 130 2,i-l, T v _ 1 V 1 , R-k Step 1 - If 2(1) = *, assign L ' (I) = £ 2 u (I) ; other- mn k=Q k > i-1 wise assign L f ' i ~ 1 (I) = £ 2 R ~ k u (I) + 2(1) . k=l a, Step 2 - When L ' (A) is assigned to each vertex A of weight * mn w(l < w < n) of C , assign as L ' (B) to each vertex B of weight — — n mn w-1 the smallest binary integer satisfying the following three condi- tions: Or (a) The k-th most significant bit of L ' X ~ (B) is u, (B) , for mn k k-l,...,i-l; (b) If 2(B) j> *, the least significant bit of L^ (B) is 2(B); mn (c) L ' (B) > L ' (A) for every directed edge AB terminating mn — mn at B. Step 3 - Repeat Step 2 until L * X ~ (0) is assigned. mn Step 4 - The k-th most significant bit of L ' (A) is denoted — mn ^ by u. (A) for k=l,...,R-l, and the least significant bit of L ' (A) — k mn is denoted by 2(A) for each A e C . NFS 1 " (R,2) = (u. u. ,, u_^ , . . . ,u_ , , t) has been obtained as the completion of NFS i-1 (R,2) by CMNL. The modified algorithm CMNL differs from the original one only in Step 1 and condition (b) of Step 2. Similarly, algorithm CMXL (Algorithm 6.2) can be modified as follows. 131 Algorithm 8.4 - Algorithm CMXL for a feasible NFS i " 1 (R,f J ) = * * 'V % (u , . . . ,u . ., u . , . . . ,u_ ,,f) where f is an incompletely specified \ I— ± 1 K — 1 function of n variables. The conditional maximum labeling of NFS (R,r) is a completion of NFS " (R.f') = (u , ...,u , u , ...,u ,£) denoted by NFS(R,^) ■ (u ,...,u ,, u , . . . ,u R _, ,f ) such that, in the corresponding labeled n-cube ^(u^ . . . ,u i _ 1> u ± , . . . ,u R _ 1> f ) , the label £(A; u u i_i» i ? i-1 u.,...,u_, , ,f) = L ' (A) takes the maximal possible value for each i R-l mx r A e C . n * £ i-1 Step 1 - If f (0) - *, assign as L ' (0) the value £ 2 u, (0) + 1 2 ; otherwise assign as L ' (0) the value k=l k k-i mX T 2 R - k u k (0) + f 1 2 R - k + J(0). k=l K k-i Step 2 - When L ' (A) is assigned to each vertex A of weight ' mx i i-i w(0 < w < n-1) of C , assign as L ' (B) to each B of weight w+1 — — n ° mx the largest binary integer satisfying the following conditions: (a) The k-th most significant bit of L ' (B) is u, (B) for mx k k=l,...,i-l; (b) If £(B) + *, the least significant bit of L ,i_1 (B) is mx *J (c) L ,i-1 (B) < L '^Hk) for each directed edge BA originating mx — mx from B. Step 3 - Repeat Step 2 until L ' ~ (I) is assigned. 132 Step 4 - The k-th most significant bit of L ' (A) is denoted by u. (A) for k=i,...,R-l, and the least significant bit of L ' 1_ (A) J k ° mx is denoted by f (A) for every A z C . n Like the modifications of algorithm CMXL, only Step 1 and condi- tion (b) of Step 2 have been slightly changed. The discussion about the validity of the algorithms following Algorithms 6.3.1 and 6.3.2 is still valid. Algorithm 6.3.3 (MPF) need not be changed except for some notations. Algorithm 8.5 - Algorithm MPF to obtain u for a given feasible NFS 1 (R,f) = (u 1 ,. . . ,u i _ 1 , u i ,... ,u R _ 1 ,f). Step 1 - Obtain a completion NFS (R,f) ■ (u, , . . . ,u . ,, u, 1 i-1 — i u , h of NFS (R,f) according to Algorithm 8.3 (CMNL) . R — 1 •N i-1 y Step 2 - Obtain another completion NFS (R,f) = (u , . . . ,u , , u. ,...,u_ ., r') of NFS 1_1 (R,f) according to Algorithm 8.4 (CMXL). 1 K— i. Step 3 - For each vertex A of C do the following: (i) assign u . (A) = if and only if u_ (A)=0 and u (A)=0; (ii) assign u.(A) = 1 if and only if u_.(A)=l and li (A)=l; (iii) assign u . (A) = * (don't care) if and only if u.(A)=0 and l — l u ± (A)-l. 133 Algorithm 8.5, the modification of Algorithm 6.3.3 (MPF) does not affect the properties of u discussed in Section 6.3. Algorithm 6.4.1 (DIMN) is based on Algorithms 6.3.1 (CMNL) , 6.3.2 (CMXL) , and 6.3.3 (MPF), and need not be modified except for some symbols related to f, as follows. Algorithm 8.6 - Algorithm DIMN for an incompletely specified function f . Step 1 - Let NFS°(R,£) = (u , . . . ,u -,£) and set 1=1. (R = R£ is the minimum number of cells required for the realization of r . If it Is not known, it will be determined after NFS (R,f) is obtained in Step 2 by applying Algorithm 8.1 (MNL).) Step 2 - Apply Algorithm 8.3 (CMNL) to obtain NFS " (u , . . . ,u ,, u^, .. -.Hr.x* ±) • Step 3 - Apply Algorithm 8.4 (CMXL) to obtain NFS i ~ 1 (R,r') = 11 1 , . • • » U 4_1 » ".,... » U R_1 » ' * Step 4 - Obtain function u satisfying: u^A^O, if u^A) = a i (A)=0; u ± (A)=l, if u^A) = a t (A)-l; u\(A)=*, if u.(A)=0 and (K(A)=1. I -l i (u.(A)=l and u.(A)=0 can never occur.) — i l Step 5 - Obtain an irredundant MOS cell configuration for u with respect to x , . . . ,x , u , . . . ,u . 1 by an appropriate algorithm (e.g., Algorithm 5.1 or 5.2). Let u denote the function realized by this cell. (u is a completion of u with respect to x.,...,x . ) 134 Step 6 - If i = R-l, design an irredundant MOS cell configura- tion of r with respect to x, , . . . ,x , u, , . . . ,u_ n and terminate this 1 n 1 ' R-l algorithm; otherwise set i = i+1 and go to Step 2. Since f is an incompletely specified function, after Step 5 of the (R-l)-st iteration, we will have NFS " (R,^) ■ (u 1 , . . . ,u ., £) , where f is still incompletely specified with respect to x , . . . ,x . We need not apply Steps 2, 3, and 4 to obtain (u. , . . . ,u D , , f ) , (u n , . . . ,u D , , f ) , and (u. , . . . ,u_ , , r ) , respectively, since Step 6 will design an irredundant MOS cell configuration for r with respect to x, , . . . ,x , u, , . . . ,u n , , which determines the function f (a comple- 1 ' ' n 1 R-l tion of f) realized by the MOS network. It is not difficult to understand that Theorem 6.4.1, which proves that an MOS network designed by Algorithm 6.4.1 (DIMN) for a function f is irredundant, is still valid even if the function is an incompletely specified function f . It should be noted that an infeasible partially specified NFS (R,r) = (u ,...,u. ,, u.,...,u ,, f) means that no completion f of f can be realized by R negative gates with the first i-1 gates realizing u ,...,u._ 1 . The complete proof is omitted here. Example 8.1 - Consider the incompletely specified function f shown in Fig. 8.1(a) in the form of C (£) , where only r'(lll)-!, ^(011)=0, £(010)=1, and £(000)=0 are specified. Step 2, Step 3, and Step 4 of Algorithm 8.6 obtain NFS°(3,f y ), NFS°(3,f), and NFS°(3,f) as a. shown in Fig. 8. 1(b), (c), and (d) , respectively. For u, , three irredundant 135 (a) Incompletely specified function I. 000 ( 100 (b) NFS (3,*) - (u x , u 2 , h, 100 100 ) no 110 J 100 (c) NFS (3,?) - (fl v u 2 , h. (d) Nh°(3,b - u_ 2 , h. Fig. 8.1 Example 8.1, 136 no 100 (g) h'?S 1 (3 I ?) 1 ■= (u r u 2 , h. 100 (i) NFS 2 (3,?) 1 = (Uj, u 2 , h 110 100 (h) NJ , S 1 (3,b 1 - (u r u 2 , £), 110 100 010 (j) NFS(3,?) 1 = (u 1>U2 ,f) with f = u 2 vx 3 u x 100 (k) NFS 1 (3,1') 2 = (uj.u*,?) with Uj = x 2 . U) NTS 1 (3,b 2 - (.Uy u 2 , ?) . Fig. 8.1 (Continued) 137 (m) NFS 1 (3,?) 2 = (u r fl 2 , h. 100 (o) NFS 2 (3,?) 2 = (Uj, u 2 , b 100 010 ) no! °* io loof i* (n) Kh l O,t) 2 - (u,,, u 2 . h, 010 ) no! 001 100 (p) NFS(3,?) 2 - ( Ul ,u 2 ,f) with f «= UjV x 3 u„ ) 1101 100 100 (q) NFS 1 (3,?) 3 = (i^.u*,*) wiLh Uj = x 3> (r) NFS (3,?) 3 = (lij, u 2 , ?) Fig. 8.1 (Continued) 138 T3 C •H ■U C o o CM ■ r>-> i-H 139 © co iw n r - ^ CM bO CM 00 cu CM CM 3 r 3 o — ♦- ^L CM 00 00 CU /^\ CM •I - ) /-s *•*, C m CO •H v^ 00 C/i « Pn .H /— s 53 iH W B; (ii) £(A)=1 and £(B)=0; (iii) For every vertex X such that A>X>B, f(X)=*. As a special case an inverse edge AB is also an inverse pair where no vertex X satisfying A > X > B exists. Example 8 . 2 - In the labeled n-cube for the incompletely speci- fied function r shown in the form of C,(r) in Fig. 8.2, the following pairs of specified vectors are inverse pairs: (llll)-KlOll) , (1111)^(0110), (1101)^(1000), (0100)+(0000) , (0010)+(0000) , and (0001)^(0000). (llll)-KOllO) is an inverse pair because r'(llll)=l, ^(0110)=0, and ^(1110)=^(0111)=*. Similarly, (1101)^(1000) is an inverse pair because r'(1101)=l, ^(1000)=0, and ^(1100)=^(1001)=*. Each of the other pairs in C, (r) constitutes an inverse edge in Definition 8.3 - The characteristic input set of an incompletely specified function f denoted by S r (f) is the set of vectors each of which is in at least one inverse pair of C (f) (note that inverse edges are also included) . 143 CM oo 0) iH I CM 00 00 •H 144 Example 8.3 - Consider the function f given in Example 8.2. The characteristic input set of r is S ( ,(r') = {(1111), (1011), (1101), (0110), (1000), (0100), (0010), (0001), (0000)}. Lemma 8 . 1 - Let f. and f „ be two incompletely specified func- tions of n variables such that t (A.) = f (A) for every A e S fl (f 1 ). Let the sequence of functions (u , ...,u__ 1 , f ) be a negative function sequence for r_ (i.e., f» is a completion of f ~) , and be denoted by NFS(R,f ) = (u , ...,u R _,, f 2 ) . Then (u. , . . . ,u , , t ) with the same u , . . . ,u„ , must be a feasible partially specified NFS of length R 1 K— ± and degree R-l. Proof - Since (u 1 , . . . ,u_ . , f „) is an NFS, (u. , . . . ,u„ , ) is an NFS of length R-l. Thus to prove that (u , . . . ,u ., f ) is feasible, we only need to prove that r is negative with respect to x_ , . . . ,x , u i'-'Vr Suppose f - is not negative with respect to x , . . . ,x , u , . . . , u_ . . Then in the labeled (n+R-l)-cube C ._ ,(f n ) with respect to R-l n+R-1 1 r r , there must exist at least one pair of vertices, (a , ...,a , u 1 (A) , . . . .Uj^CA)) and (b^...^, u^B) , . . . .Uj^CB)) , such that (a 1 ,...,a n , u 1 (A),...,u R _ 1 (A)) > (b lt ...,b n , u 1 (B) , . . . ,u R _ 1 (B)) , r,(A)=l, and f..(B)=0. This means that there exists at least one pair of vectors A, B e V such that f (A)=l, f (B)=0, A>B, and u (A) >_ u (B) for i=l,...,R-l. We will consider all cases with ? (A)=l, f (B)=0, and A>B to show that u . (A) >_ u (B) can not hold for all 145 1=1,..., R-l (i.e., there exists some 1, 1 <_ i ^ R-l, such that u (A)-0 and u i (B)=l). (a) A, B E S c (f v 1 ) In this case, r^CA) = ^i^ A ) and ^ 2 ^ = ^i/ B ) must hold b ? the assumption. Since (u ,...,u ,, f_) is an NFS, f ? is negative with respect to x , . . . ,x , u- , . . . ,u__ 1 , and therefore by Theorem 2.3 there exists some 1 <_ i <_ R-l such that u (A)=0 and u (B)=l. Thus u . (A) ^_ u (B) can not hold for all i=l,...,R-l. It should be noted that £(A; u , . . . ,u .. ) < £(B; u , . . . ,u_ ,) must hold for this case. J_ K~J. I K— J. This relation will be used in (b) . (b) A { S ( ,(r' 1 ) and/or B { S^) From r* (A)=l, r* (B)=0, A>B, and Definitions 8.2 and 8.3, it is obvious that there must exist a pair of vectors X, Y e V r n such that X, Y e S (5^) , A ^ X > Y >_ B, and J,(X)-1, ^ x (Y)-0. From (a), £(X; u. , . . . ,u„ .) < £(Y; u. , . . . ,u„ ,) must hold. Since 1 K.— 1 1 K— 1 (u^. ••»u R _ 1 ) is an NFS (R-l, u R _ 1 ) , S-(A; u 1 »"«» u R _i) 1 £(X; u 1 ,...,u R _ 1 ) < i(Y; u 1 ,...,u R _ 1 ) U(B; u u r-i^ must hold. From the relation that £(A; u, , . . . ,u_ ,) < £(B; u, , . . . ,u„ , ), 1 K— 1 1 K— 1 it is evident that there exists some 1 <_i < R-l such that u (A)=0 and u (B)=l. Consequently, r. is negative with respect to x. , . . . ,x , u. , . . . , U R-1' i,e, » ( u i» * • * ,U R-1» 'l^ is a feasiDle NFS (R.ii)' Q.E.D. Based on this lemma, the following theorem corresponding to Theorem 7.2 for incompletely specified functions can be proved. 146 Theorem 8.1 - The characteristic input set S (f) for an incom- pletely specified function r is a sufficient test set for the set $ of all possible non-pure output cell faults for a network N designed by Algorithm 8.6 (DIMN) for f\ Proof - Suppose S„(f) is not a sufficient test set for of N. C n This means that some fault F e $ for N can not be detected by input vectors in S (r) . In other words, Li f(N(F),A) = f(N,A) E f"(A) for every A e S c (b . (8.1) Consider the function f defined by f (A) = f(N(F),A) for every A such that r'(A) ± *; and £ (A) = * for every A such that f(A) = *. By the above definition of i: and (8.1), S (£)C^ s c (^i) must hold. Now let cell g. be the cell with the smallest i that has faulty FETs in N(F) . Because of F e $ , i^R must hold where R=R^. Let the nega- tive function sequence realized by N be denoted by (u.. , . . . ,u R _, , f(N)) where f(N) is a completion of f. Then the negative function sequence realized by the faulty network N(F) can be written as (u 1 , . . .,u i _ 1 , u i+1 , .. •,u R _ 1 , f(N(F))) where (u-, . . . .u^) are identical to those in the NFS realized by N since there is no faulty FETs in g g. ... Due to the manner of defining f , f(N(F)) is a completion of r . . Now let us compare (u. , . . . ,u . _- , u . , . . . ,u R _ 1 , f(N(F))) and (u , ...,u. ., u , . . . ,u , f ) . Then by Lemma 8.1 i 1— x 1 R— _L (u n , . . . ,u ., u , . . . ,u , r) must be a feasible NFS (R,r) j. i— 1 i K— i because f (A) = r(A) for every A e S (f ) . J_ Li 147 However, since N is designed by Algorithm 8.6 (DIMN), cell g is irredundant with respect to u (Step 5). Therefore, u is not a negative completion of u with respect to x. x , u- , . . . ,u~ ,, where u is the maximal permissible function for u in NFS (R,f) = (u 1 ,...,u i _ 1 , u i »*"» u R _ 1 » *)• Therefore, (i^, . . . .u.^ u ± , u., .,..., u* ., f) can not be a feasible NFS i (R,f ) . This contradicts 1+1 K— 1 the result shown in the previous paragraph that (u- , . . . ,u .. , u . , . . . , u R _ , £) is a feasible NFS " (R,£) . Consequently, S (£) is a suffi- cient test set for $ of N. n Q.E.D. Although S (f) may be a redundant test set for MOS networks designed by Algorithm 8.6 (DIMN) for f , S_(r) contains a much smaller number of vectors than V when f has a large number of unspecified values (don't cares). Similarly, when r has a large number of un- specified values, the test set given by Corollary 8.1 is relatively small. Since it is a sufficient test set for all possible single and multiple stuck-at-short and/or stuck-at-open faults, it may be used as the test set in practice. Example 8.4 - Compare the results given in Example 6.5.1 for function f = x x 2 x«x^ and Example 8.1 for function f (f(lll)=l, £(011)=0, £(010)=1, £(000)=0, and £(A)=* for all other A e V 3 ) . Algorithm 8.6 (DIMN) obtains identical results for both functions as shown in Fig. 6.5.1(s), (t) , and Fig. 8.1 (w) , (x) . According to Corollary 8.1, A = {(111), (Oil), (010), (000)} is a sufficient test set for networks shown in Fig. 8.1(w), and (x) , and hence for networks shown in Fig. 6.5.1(s) and (t) also. 148 As mentioned in Section 7, S (f) is usually a redundant test set for networks designed by Algorithm 8.6 (DIMN) for function f . Example 8.4 illustrated this fact. Example 8.5 - The networks (not shown) designed by Algorithm 8.6 (DIMN) for the function £ given by Fig. 8.2 of Example 8.2 will have a sufficient test set A for $ for these networks: n A = S c (b = {(1111), (1101), (1011), (0110), (1000), (0100), (0010), (0001), (0000)}. 149 9. EXTENSION TO MULTIPLE-OUTPUT MOS NETWORKS This section will discuss the design of irredundant MOS networks for a given set of functions. As discussed in [NTK 72] , the problem of designing an MOS network with a minimum number of MOS cells (negative gates) for a set of more than one functions is, in general, a difficult problem. Let f _,..., f be a given set of completely t specified functions for which an MOS network with a minimum number of cells is to be designed. The generalized form of such a network is the same as shown in Fig. 3.1 with some gate realizing each function f for j=l,...,m. Let p , ...,p be a set of numbers which j 1 m determines the positions of output functions in such a way that p. = j if and only if the j-th gate (g ) realizes the i-th function f . Unlike the case of single output network, the difficulty of designing a multiple-output network with a minimum number of nega- tive gates lies in determining which g (1 <_ i <_ R) is to realize which f.(l i j in). So let us prefix which gate is to realize J which function. Given R and any set of p , ...,p , however, it is not difficult to obtain an irredundant MOS networks for f. ,...,f 1 m with a minimum number of MOS cells under this condition (i.e., t For the simplicity of discussion, only completely specified functions are considered in this section. The extension to incompletely specified functions is similar to that discussed in Section 8. J [NTK 72] presented an example showing how the total number of negative gates can be reduced by properly determining Pi»...,Pm« In general, it is not known how to determine p^,...,p m so as to minimize the total number of gates. The algorithm presented here, however, can be applied to any set of p-i,...,p such as pi=R-m+l, p2=R-m+2, . . . ,p m =R. 150 positions of output functions are fixed) . The required modifications to algorithm DIMN and its associated algorithms are straightforward. The detailed discussion of the algorithms with modifications required for this case (this will be referred to later as the modified algorithms ) is omitted here, but the modifications will be outlined instead along with an illustrative example. The main difference of the modified algorithm DIMN (for multiple- outputs with fixed output positions) from the original one (Algorithm 6.4.1) is that, in a partially specified negative function sequence in the former algorithm, the function in the p.-th position of the NFS, for i=l,...,m, is always completely specified, but in the latter case, only the first k functions and the output function are completely specified when the partially specified NFS is of degree k. In other words, in the beginning of the modified algorithm, NFS (R; f ...... f ; 1 m * * * Pit«««»P ) = (u, , . . . ,u„) where u = f . for i=l,...,m is completely 1 m 1 R p. i specified and NFS (R; f.,...,f ; p. ,...,p ) represents the parti ally i ml m * specified negative function sequence for output functions f.,...,f i m at output positions p.,...,p . On the other hand, NFS (R,f) = 1 m * * (u , . . . ,u 1 , f ) for a single function f has only one specified func- I R- 1 tion, f . The conditional minimum labeling or conditional maximum ±-1 * * * labeling for an NFS (u ,...,u. lf u.,...,u , u ) will assign a minimum possible or a maximum possible label L(A) to each vertex A e C satisfying n (a) The k-th bit of L(A) is u (A) for k=l,...,i-l; (b) The P k ~th bit of L(A) is f,(A) for k=l,...,m; and (c) L(A) < L(B) for every directed edge AB e C . 151 Algorithm DIMN itself need not be changed except that in the p, -th K. iteration for k=l,...,m, Steps 2, 3, and 4 are skipped since u ■ f. P k k is completely specified with respect to x x . It should be noted that if the given R is too large and the set of p ,...,p is inappropriate, the maximum permissible function u A -j — 1 ft ft for u ± of NFS (R; f^...,!^; p^...^) ■ (u^ . . . .u^, u it ...,u R ) \, may have no specified value (i.e., u.(A)** for every A e C ). In i n such a case, u is redundant, so the modified algorithm proceeds to a. the next iteration to obtain u . . The designed MOS network for this case will actually contain fewer number of gates than the specified R. It should be noted that the irredundancy of the designed network is still guaranteed. Corollary 7.1 is still valid for the networks designed by the modified algorithm DIMN for multiple output case. Theorem 7.2 needs minor modification because there are more than one outputs. Let S_(f ,,..., f ) = S_(f.) u . . . U S n (f ) be the characteristic set for the l. l m l. i l. m set of output functions f, .....£ . Then S„(f ,,..., f ) is a suffi- i m C 1 m cient test set for all non-pure output cell faults for every network designed by the modified algorithm DIMN for f ..,..., f . Example 9.1 - Functions f and f ? are given as shown in Fig. 9.1(a) in the form C (f ,f ). If f ; , and f are to be realized by gates g and g,, respectively (since one of the output functions must be realized by the last gate in the network, four is the total number of gates in the network, which is determined by applying the modified minimum labeling algorithm with f 2 (A) and f , (A) being the 152 100 (a) C 3 (f 1 ,f 2 ). (b) NFS U (4; f 1 ,f 2 ; 3,4) - (u^Uj,, f^fj). NFS°(4, f 1 ,f 2 ; 3,4) « (a i ,u 2 , f 1 .f 2 )- (c) NFS X (4; f lf f 2 ; 3,4) = (x^, u 2 , ^.fj) (d) NFS/(4; f 1 ,£ 2 ; 3,4). Nts 1 (4; fj_,f 2 i 3,4). f 2 = u.(u 2 (xvx 3 vE.) v x 2 x 3 ) (f) NFS (4; f v f 2 l 3,4) 2 = (x lX3 , u*. f^fj). (c) NF.S 1 (4; f 1 ,f 2 ; 3,4) = NFS(4; f,tf 2 » 3,4) (u 1( u 2 , f 1 ,f 2 ). Fig. 9.1 Example 9.1. 153 no i (g) NFS^; f lt f 2 ; 3,4) 2 - (Uj.Uj.fj^fj) NFS 1 (4; f 1 ,f 2 ; 3,4) 2 - (uj.^.^.fj) 111 (h) NFS*(4; f 1B f 2 ; 3,4) 2 - (iijUj, fpfj) 110 100 (i) NFS'(4; f 1 ,f 2 ; 3,4); 1 Z (j) NFS 1 (4; f 1 ,f 2 ; 3,4) 3 - (x^.u*,^,^). (u 1 ,u 2 , f x ,f 2 ). 100 (k) NFS (4; £,.f 2 ; 3,4) r NFS 1 (4; ^.fj; 3,4) 3 . f 2 - u 2 (x ] vx 3 Vf 1 ) Q) NFS (4; f 1 ,f 2 ; 3,4) 3 - NFS(4; t^.t^S 3,A) 3 Fig. 9.1 (Continued) CN 154 o i r -• — <*- >r CN I' CN J L c •H r" CO CM IW y-i c/3 fn s o 4-1 00 /— * c T> •H CO •a 3 c C o •H a, 4J (0 C -i c_> M v-^ O o »H X • u ON o S • 4-J M u •H z Fn CM 155 i r i r O -• — i> CM 3 -#— <» CO J L en H* CM CM CM CO CM «4-l M-l W fa 55 o 4-1 00 5 •H T3 c o Pi CO 01 u u o CJ ^! u o 4J ad 01 55 13 0> 3 C •H 4-J c o CJ fa H" en CM 14-1 CO 156 -* — <► H Q i r CM ♦ — * CO o — r j i_. >r co |l CM O — r- c •H CO m CO • ^ CM c/3 1*4 S3 o 4J 60 /»~\ c T) •H cu XI d a c o •H o. 4-> CO c ai o u o M V O u rH ^ • »-l ex. o s • •u 6£ cu •rl » Pm CM CO 157 least and the second least significant bits in L(A) , respectively), the modified algorithm DIMN will obtain irredundant MOS networks of four gates. Fig. 9.1(b) shows both NFS°(4; f^f^ 3,4) - (u_, u_ 2> f v f 2 ) and NFS (4; f-^i 3,4) = (u^i^, f^fg). By comparing u and u , NFS (4; f.,f 2 ; 3,4) is first obtained (not shown), and then NFS 1 (4; f 1 ,f 2 ; 3,4) r NFS 1 (4; f^; 3,4) 2 , and NFS 1 (4; f^; 3,4) 3 are obtained as shown in (c) , (f ) , and (j), respectively. Next, by Step 2 and Step 3 of the modified algorithm DIMN, NFS 1 (4; f,,f 2 ; 3,4) and NFS (4; f-pfoJ 3,4) are obtained for i=l,2,3, as shown in (d) , (g), and (k), respectively. N^S 1 (4; ^,^5 3,4) ± and NFS 2 (4; f^fji 3,4) = NFS(4; f-pf?' 3,4) are then derived by Steps 4 and 5, as shown in (e) , (h) , (i) , (£) . The irredundant networks corresponding to NFS(4; f 1 ,f 2 » 3,4) are shown in (m) , (n) , and (o) for 1-1,2,3, respectively. It should be noted that a different irredundant MOS configuration for u~ in NFS (4; f. ,f~; 3,4)~ can be chosen instead of the one shown in Fig. 9.1(A). This different choice will lead to a different MOS network which will be mentioned in Example 9.2. It is sometimes desirable to realize all the output functions in the output level. In other words, gates which realize specified output functions are not allowed to feed other gates in the network. The generalized form of such networks which realize functions f . , . . . , f and consist of R=r+m negative gates is shown in Fig. 9.2, where gates g ,,,..., g . realize desired functions f,,...,f , respectively, r+1 r+m 1 m 158 3-t Fig. 9.2 Generalized form of networks which consist of R=r+m negative gates with all m output gates in the output level. Some modifications of Algorithms 6.3.1 (CMNL) , 6.3.2 (CMXL) , and 6.4.1 (DIMN) are necessary in order to design irredundant MOS network in the form of Fig. 9.2 for a given set of functions, f -,..., f . Let us consider the subnetwork consisting of gates g.,...,g ,g .. This subnetwork is in the generalized form of networks consisting of r+1 negative gates shown in Fig. 3.1. Therefore, functions (u_,...,u , f,) constitute a negative function sequence of length 159 r+1, i.e., NFS(r+l, f-.)* Similarly, the sequence of functions (u , . . . ,u , f ) is also an NFS(r+l, f ), for i=2,...,m. Based on this property, a network with a minimum number of negative gates in the form of Fig. 9.2 can be designed by the following modified algorithm MNL. For convenience, let NFS(r; m; f ,,..., f ) ■ 1 m (u- u ; £.,..., f ) represent a network in the form of Fig. 9.2, i.e., each (u u , f ) is an NFS(r+l, f ) for i=l m. Let C (u , . . . ,u ; f ,...,f ) represent the corresponding labeled n-cube, where the label for vertex A is denoted by £(A; u u ; f,,...,f ) 1 r 1 m It should be noted that the label consists of two parts: (u_ , . . . ,u ) is considered as a binary integer of r bits and (f.. ,...,£ ) is con- sidered as a vector of m bits. For two labels in vertices A and B, £(A; u.,...,u r ; f 1 ,...,f jn ) = £(B; u lt ... f u ; f^...,^) if and only if u (A) = u (B) for 1=1 r and f (A) = f.(B) for 1=1,..., m; and £(A; u 1 u r ; f ,...,f m ) > i(B; \* 1 u f ; f 1 ,...,f m ) if and only if either £(A; U-,...,u r ) > £(B; u-,...,u ), or l(A; u 1 ,...,u r ) - £(B; u. f ...,u ) and (f (A) , . . . ,f (A)) > (f . (B) , . . . ,f (B)) . 1 r 1 m l m Algorithm 9.1 - Minimum labeling for a given set of functions, f n ,...,f (MNL). 1 m f _ , . . . , i Let L (A) denote the first part of the label to be assigned to each vertex A e C by this algorithm (i.e., L S ' ^ = l ( k > u 1t ...,u )). mn i r £,,... , t Step 1 - Assign L (I) = 0. *■ — mn 160 f l'*-" f m Step 2 - When L (A) is assigned to each vertex of weight mn L -I » • • • » L m w(l < w < n) of C , assign as L ' (B) to each vertex B of — — n mn weight w-1 the smallest binary integer satisfying the following con- ->■ dition for each directed edge AB e C : n L I' ' m (B) > L I' ' m (A) if (f.(A) f (A)) < mn — mn l m — (f 1 (B),...,f m (B)), f f f f L V ' m (B) > L V ' m (A) if (f(A),...,f (A)) V mn mn 1 m -r (f 1 (B),...,f m (B)) + . t - , . . . ,r Step 3 - Repeat Step 2 until L ' (0) is assigned. *■ — mn f l'"" f m Step 4 - The number of bits in L (0) plus m is the ' — mn minimum number of negative gates required to realize f ..,..., f in the form of Fig. 9.2. The i-th most significant bit of f l'"-' f m L (A) is denoted by u . (A) for each A e C and i=l,...,R. mn i n (u n ,...,u_; f,,...,f ) = NFS(r+m; f ,,..., f ) has been obtained as 1' ' R 1 m 1 m the negative function sequence with multiple-outputs. The validity of this algorithm can be proved based on that C (u, , . . . ,u , f.) has no inverse edge for i=l,...,m because the n 1 » » r ' i & f ' 1' ' * ' * m condition in Step 2 is satisfied and that L (A) is chosen mn f Since this is a relation between two vectors, (f - (A) , . . . , f m (A)) ^ (f (B),...,f (B)) means that either (f 1> . . . ,f^(A)) > (f .. (B) , . . . ,f (B)) or they are incomparable. 161 t ., . . . , f so that the total number of bits in L (0) is minimum and mn hence R ■ r+m is the minimum number of negative gates to realize f if ...,f in the form of Fig. 9.2. 1 m Algorithms 6.3.1 (CMNL) and 6.3.2 (CMXL) can be similarly modi- fied. Given a partially specified negative function sequence i * it NFS (r+m; f ,...,f m ) = (u 1 u i» u i+l' * * * ,u r ; f l» ,,,,f m ^' algorithm CMNL assigns to each vertex A e C a minimum possible label n f]_» • • • »^ m »* L (A) = &(A; u , ...,u., u. . , . . . ,u ) satisfying that (a) The k-th bit of L r ' m (A) is u. (A) mn k (b) £(B; u 1 ,...,u i ,u_ i+1 ,...,u r ; f^ f^) >_ £(A; t^ u ±i u. ,. u ; f. ,...,f ) for each directed edge AB e C . —1+1 — r' 1' ' m 6 n Similarly, the modified algorithm CMXL assigns a maximum possible f f M label L (A) - £(A; u, , . . . ,u . ,(i . ,,,...,>u ± _ V & ± \l f l' ,,,,f m ) ' a. Step 4 - Obtain function u. satisfying u.(A) = 0, if u.(A) = * f ,f ) = (u.,u ? ; f 1 ,f ? ) is obtained as shown in (b) . The only irre- dund ant MOS cell configuration for u- is u 1 ■ x~x (obtained by 1 * Step 5), and the corresponding NFS (4; f. ,f„) = (u-,u 2 ; f- ,f 2 ) is shown in (c) . Fig. 9.3(d) shows both NFS 1 (4; f,,f 2 ) = Cu^Ugj f 1 ,f 2 ) and NFS (4; f-i.fo) = ( u i» fl 2 ; f l' f 2^ obtained b y Steps 2 and 3, re- spectively. Since u_ 2 (A) = u_(A) for all A e C_; u ? = u_„ = u» is completely specified, and the solution NFS(4; f-i.fo) is obtained as shown in Fig. 9.3(e). The network corresponding to this solution is obtained by designing irredundant MOS cell configurations for u 2 (Step 5), f , and f ? (Step 6) and is shown in (f ) . It is interesting to see that the network in Fig. 9.3(f) con- sists of only 17 FETs while the networks shown in Fig. 9.1(m), (n) and (o) consists of 19, 20, and 18 FETs, respectively. In general, 164 100 (a) NFS U (2; f^f^ = (u^ u. 2> f^ f 2 ) , NFS (2; E lf £ 2 ) = (G^ fij, f^ f 2 > , (c) nfs x (2; f 1 ,f 2 ) - ( Ul , u 2 ; t v f 2 ). 100 f, - u. (x 2 V x 3 u ) v x.u 2 £ 2 - u 2 (e) NFS 1 (2; £,,f 2 ) - NFR 2 (2; iytjl = NFS(2; f^i 2 > • (b) NFS°(2; f r f 2 ) - (uj, u*; ^.fj). (d) HFJS^Z; f 1P £ 2 ) = ( Ul ,u 2 ; ^.fj). NFS 1 (2; C lt f 2 ) = (u 1 ,fl 2 ; t lt £ 2 ). Fig. 9.3 Example 9.2 165 (f) Network corresponding to NFS(2; ^-,^2^ of ^* Fig. 9.3 (Continued) 166 however, the networks designed by Algorithm 9.2 for designing irre- dundant MOS networks with all output gates in the output level tend to contain more FETs than those without such restrictions since they consist of no less number of MOS cells than those networks without such restrictions. Another interesting observation is that Example 9.1 can also obtain the network in Fig. 9.3(f) from NFS (4; f 1 ,foJ ^ 1 3,4) 3 and NFS (4; f 1 »f 2 ; 3 » 4 )3 of Fi 8« 9.1(k), though the network was not shown in Fig. 9.1. 167 10. CONCLUSIONS An algorithm for the design of irredundant MOS networks for single or multiple, completely or incompletely specified functions has been presented in the previous sections. For a given single function, the algorithm designs an irredundant MOS network with a minimum number of MOS cells (negative gates) . For a given set of more than one function, on the other hand, the number of MOS cells in the network designed by this algorithm may not be the minimum required. In both cases, however, the designed networks are free of redundant FETs (i.e., irredundant) and therefore diagnosable for all single and multiple stuck-at-short and/or stuck-at-open faults. The algorithm first designs the MOS cell in the network remotest from the output to be as simple as possible so that any extractions of FETs from that cell will make the rest of the network unrealizable without the addition of extra cells. Based on the first cell and the given output function(s) , the algorithm then designs the second cell to be as simple as possible and so forth until all cells are com- pletely designed. Because of the manner in which the network is designed, an MOS cell with a smaller subscript (i.e., remoter from the output cell) tends to be simpler in structure than one with a larger subscript. This means that the cells tend to have unequal complexity, making the cells close to the output cell more complex than those relatively far away from the output cell. This property is sometimes undesirable because a complex cell may create difficul- ties in the design of the layout of the cell and also may have an 168 adverse effect upon the speed of the entire network. Due to this disadvantage, other methods capable of designing MOS networks under certain restrictions, such as restrictions on the numbers of FETs in series and in parallel within an MOS cell, are more desirable in practice. This problem is left for another occasion. The diagnostic properties of the networks designed by the algorithms discussed in Part I of the thesis are very useful especially when the given function is sparsely specified (i.e., has a relatively large number of don't care components). Examples 6.5.1 and 8.1 illustrate an interesting problem. For the completely specified function f in Example 6.5.1 and the in- completely specified function f in Example 8.1, algorithm DIMN designs identical networks. Therefore, the set of input vectors specified for r is a sufficient test set of the networks designed for f. If we can find a relatively simple way to obtain an in- completely specified function r from a completely specified function f such that algorithm DIMN designs an identical network for both f and r , then we will have a simple method to obtain a sufficient test set for the network designed for f which has a fewer number of input vectors. This problem is also left for another occasion. It should be understood that the algorithms can be applied to the logical design with logical devices other than MOSFETs as long as the logical devices to be used can realize an arbitrary negative function. A good example is AOI (AND -OR- INVERT) gate which is widely used in practice. Fig. 10.1 shows the logic diagram of such a gate. 169 Fig. 10.1 An AND-OR-INVERT gate, If there Is no fan-in restriction on the number of inputs to each AND element and the NOR element, an AOI gate can realize an arbitrary negative function, and therefore algorithm DIMN can be applied to the design or irredundant networks consisting of AOI gates. In such an application, an algorithm to obtain complemented irredundant disjunc- tive forms for a given incompletely specified function (e.g., Algorithm 5.1) should be used since an AOI gate corresponds to a 170 complemented disjunctive form. A network designed by this approach is guaranteed to be irredundant — which means all single and multiple stuck-at-0 and/or stuck-at-1 faults in the network can be detected by examining the output of the network only. 171 REFERENCES [Ake 73] S. R. Akers, Jr., "Universal test sets for logic networks," IEEE Trans. Computers, vol. C-22 no. 9, pp. 835-839, Sept. 1973. [Gil 54] E. N. Gilbert, "Lattice theoretic properties of frontal switching functions," J. Math. Phys., vol. 33, pp. 57-67, April 1954. [Iba 71] J. Ibaraki, "Gate-interconnection minimization of switching networks using negative gates," IEEE Trans. Computers, vol. C-20, pp. 698-706, June 1971. [IM 71] T. Ibaraki and S. Muroga, "Synthesis of networks with a minimum number of negative gates," IEEE Trans. Computers, vol. C-20, pp. 49-58, Jan. 1971. [Law 64] E. L. Lawler, "An approach to multilevel Boolean minimiza- tion," J. ACM. vol. 11, no. 3, pp. 283-295, July 1964. [Liu 72] T. K. Liu, "Synthesis of logic networks with MOS complex cells," Report UIUCDCS-R-72-517, Dept. of Comp. Sci., Univ. of 111., Urbana, 111., May 1972. [Mar 58] A. A. Markov, "On the inversion complexity of a system of functions," J. ACM, vol. 5, pp. 331-334, Oct. 1958. [Mor 72] Y. Moriwaki, "Synthesis of minimum contact networks based on Boolean polynomials and its programming on a digital computer," Report of Institute of Industrial Science, vol. 21, no. 6, University of Tokyo, Tokyo, Japan, Mar. 1972. [Mul 58] D. E. Muller, "Minimizing the number of NOT elements in combinational circuits," Memorandum, Bell Telephone Laboratories, 1958. [NTK 72] K. Nakamura, N. Tokura, and T. Kasami, "Minimal negative gate networks," IEEE Trans. Computers, vol. C-21, pp. 5-11, Jan. 1972. [Pai 73] M. R. Paige, "Synthesis of diagnosable FET networks," IEEE Trans. Computers, vol. C-22, no. 5, May 1973. [SK 69] G. L. Schnable and R. S. Keen, Jr., "Failure mechanisms in large-scale integrated circuits," IEEE Trans. Electron Devices, vol. ED-16, pp. 322-332, April 1968. [Spe 69] R. F. Spencer, Jr., "Complex gates in digital system design," IEEE Computer Group News, pp. 47-56, Sept. 1969. BIBLIOGRAPHIC DATA SHEET I. Report No. UIUCDCS-R-79-996 I. Title ami Subt itlc )ESIGN OF DIAGNOSABLE MOS NETWORKS 3. Recipient's Accession No. 5. Report Date Dec. 1979 6. Autlior(s) Hung Chi Lai 8- Performing Orgnni/.m ion Kept. No.UIUCDCS-R-79-99f> '. Performing Organization N.imr and Address )epartment of Computer Science Iniversity of Illinois Irbana, IL 61801 10. Project/Task/Vork Unit No. 11. Contract /Grant No. NSF Grant No. DCR73- 03421 A01 2. Sponsoring Organization Name and Address lational Science Foundation .800 G. Street, N.W. fashington, D.C. 13. Type of Repott & Period Covered Technical Report 14. S. Supplementary Notes 6. Absir.icts This paper presents an algorithm designing multilevel MOS networks with a minimum umber of MOS cells and irredundant interconnections for a given switching function, his network is diagnosable. Then this algorithm is extended to the case of networks 1th incompletely specified multiple output functions, although the minimality of the umber of cells is not guaranteed. Some diagnostic properties of the designed etworks are also discussed. 7. Key Words and Document Analysis. 17o. Descriptors ogic design, minimal networks, minimum no. of MOS cells, irredundant interconnections, OS networks, diagnosis 7b. Identifiers /Open- Ended Terms 7c. C OSATI I" ic 1.1 /Group B. Availability Statement RELEASE UNLIMITED ORM NTIS-35 I 10-701 19. Security Class (This Report) UNCLASSIFIED 20. Security Class (This Page 1IN( I.ASSHII-D 21. No. of Pages 177 22. P USCOMM-DC 4032»-P71 m 3 o «w AUG 2 9 IS