■■H UU| WMUlMlMsafliluiOTlJ mm HgBfl] Aral mK lira HHUIHI BBSr ImifHlmlHHI HHhiIIHIUIBSSh JSmM m ■ Kraft Wnftf 111 ■i nvsD ■■HfinH fflHll ■wV : Hn Ran f5 BmiHS B LIBRARY OF THE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN o.op. 2. Digitized by the Internet Archive in 2013 http://archive.org/details/synthesisoflogic517liut O ' Report No. UIUCDCS-R-72-517 SYNTHESIS OF LOGIC NETWORKS WITH MOS COMPLEX CELLS by Tso-kai Liu May 1972 JUL 5 1972 UNIVERSITY OF ILLINOIS m URPAHMJHAMPAIOK UIUCDCS-R-72-517 SYNTHESIS OF LOGIC NETWORKS WITH MOS COMPLEX CELLS by TSO-KAI LIU May 10, 1972 Department of Computer Science University of Illinois at Urbana-Champaign Urbana, Illinois 6l801 This work was supported in part by the National Science Foundation under Grant No. NSF GJ-503 and was submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science, May, 1972 . 6/0. $ f . ACKNOWLEDGEMENT The author wishes to thank his advisor, Professor S. Muroga, for his encouragement and invaluable guidance during the preparation of this thesis, and also for his careful reading and constructive criticism of the original manuscript. The author also wishes to thank Dr. Y. Kambayashi and Mr. T. Shinozaki for their helpful comments. The help of Mrs. C. Hohulin who typed this thesis is sincerely appreciated. The financial support of the Department of Computer Science and National Science Foundation is also acknowledged. IV TABLE OF CONTENTS CHAPTER 1. INTRODUCTION 1 1.1. An Introduction to the MOS Technology . . 1 1.2. MOS Complex Cells 2 1.3. Flexibility and Versatility of MOS Networks 4 1.4. Problem of Synthesizing MOS Networks 6 2. BASIC DEFINITIONS 12 2.1. True Clusters of Input Vectors 12 2.2. Stratified Structure of a Boolean Function 17 2.3« Fundamental Functions of a Boolean Function 32 3. SYNTHESIS OF OPTIMAL TWO-LEVEL MOS NETWORKS ........ 39 3.1. Formulation of the Two-level MOS Network Synthesis Problem 39 3.2 Synthesis Algorithms 47 3.3. Upper Bound on the Number of Cells Required in a Two-level MOS Network 64 4. SYNTHESIS OF OPTIMAL FEED-FORWARD MOS NETWORKS 66 4.1. Introduction 66 4.2. Stratified Functions of a Boolean Function 68 4.3. Construction of an Optimal Realizable Stratified Truth Table 75 4.4. Synthesis of a Feed-forward MOS Network from a Realizable Stratified Truth Table 85 4.5. Comments on Algorithms 4.3.1 and 4.4.1 100 4.6. Some Ideas in Synthesizing Optimal MOS Networks with Fewer FET's 106 4.7^ Upper Bound on the Number of Cells Required in a Feed-forward MOS Network 114 4.8. Lower Bound on the Number of Levels in an Optimal Feed-forward MOS Network 114 5. SYNTHESIS OF FEED-FORWARD MOS NETWORKS WITH CELLS OF SIMILAR COMPLEXITIES 118 5.1. Complexities of Cells in an MOS Network 118 5.2. Best Distribution Vector . . .„ 123 5.3* Construction of a Simple RSTT with a Given Distribution Vector I33 5.4. Synthesis Algorithm 144 6. SYNTHESIS OF FEED-NEXT MOS NETWORKS 157 6.1. Significance of Feed-next MOS Networks 157 6.2. Type 1 Feed-next MOS Networks l6l 6.2.1. Type 1 Feed-next MOS Networks without Any Delay Elements 163 6.2.2. Type 1 Feed-next MOS Networks with All Delay Elements in One Level 165 6.3. Type 2 Feed-next MOS Networks 180 6. 3.1- Lower Bound on the Capability of a Configuration Vector ... l8l 6.3.2. Synthesis of Type 2 Feed-next MOS Networks . 202 6.3.3. The Optimality of the Networks Synthesized by Algorithm 6.3.2.1 217 7. CONCLUSION , 222 LIST OF REFERENCES 22^ VITA co 227 CHAPTER 1. INTRODUCTION 1.1. An Introduction to the MPS Technology Due to the considerable progress during the past few years, Metal Oxide Semiconductor (MOS) has become one of the most important tech- nologies for Large Scale Integration (LSI). Not only shift registers and memories are available as standard off-the-shelf MOS LSI packages from most semiconductor manufacturers, many custom-made MOS LSI random logic networks are also available. Furthermore, some semi- custom-made packages are beginning to show up recently, such as Texas Instrument's entire eight-bit arithematic unit on a single chip and MOSTEK's single chip for an entire calculator. MOS LSI packages are being widely used in desk calculators and some mini- computers. For example, the D-200 computer of North American Rockwell Corporation and the FOUR PHASE IV/70 computer of Four Phase Systems, Inc. are both build entirely based on MOS LSI packages. A more recent example is Bunker Ramo's BR-1018, a military general-purpose mini- computer. One of the main reasons preventing MOS from being used in large- scale, high-speed computers is, of course, its slow speed. However, the speed of MOS has been recently improved by various technqiues, such as silicon gate, ion implantation, and silicon on saphire (SOS). For example, an experimental MOS Random Access Memory (RAM) with a kO [2] nsec. access txme is obtained by using the SOS technique. Although the SOS technique is not well established at this moment, the gap in speed between MOS and bipolar devices seems to narrow down. MOS has a number of attractive properties. For example, based on the current technology, the size of a Field Effect Transistor (FET) is about one square mil compared with the k<2 to 50 square mils for a bi- polar transistor; the power consumption of a NOR or NMD gate is usually a few milli-watts for the p-channel MOS, and 10 to 50 nano-watts for the complementary MOS, whereas it is 12 to 22 milli-watts for bipolar TTL; the complexity of manufacturing processes for MOS FET's is about [39] seventy percent of that for bipolsr devices. In addition to all these properties, MOS, as a logic device, is very flexible and versatile, which will be discussed in Section 1.3* Because of their different features, MOS and bipolar devices are applied in different areas, and dominate different sections of the market . 1.2. MOS Complex Cells An MOS complex cell (referred to as "cell" henceforth) is a basic building block in an MOS logic network. A cell consists of an FET as the load, and several FET's as the driver where the FET's are connected in the same way as the relays do in a relay-contact network (i.e., parallel, series and bridge connections of FET's are permissible in the driver.) The FET's in the driver performs a logic function. The output of the cell is always the complement of the logic function expressed by the driver. Figure 1.2.1(a) shows a typical example of an MOS cell. Like the case of a relay contact network, the series connection of two FET's in a driver realizes an AND operation, and the parallel connection of two FET's realizes an OR operation. Therefore, the logic function of the driver in Figure 1.2.1(a) is AB vC(D vE). Then, the output of o v. DD Load Driver < * H[ A HI -O AB ^ C(D v/ E) C HI D i[ (a) Q V DD H[ BH i (b) 9 V DD Ei[ -0 A ^ B v C CHI -O ABC AH 1 BHC cH i (c) FIGURE 1.2.1 MOS COMPLEX CELLS the cell in Figure 1.2.1(a) is AB s/ C(D ^ E). Figures 1.2.1(b) and 1.2.1(c) show the realization of conventional NOR and NAND functions by MOS complex cells, respectively. 1.3. Flexibility and Versatility of MPS Networks In this section, some examples are presented to show the flexibility and versatility of MOS networks. As shown in Section 1.2., a cell can realize not only conventional NOR and NAND functions but also some very complex ones. Therefore, a network with complex cells usually consists of fewer cells than a network with only NOR and NAND gates. Two one-bit full adder networks are shown in Figure I.3.I. The network in Figure 1.3.1(a) consists of only NOR and NAND gates. It is obtained and proven to be a network with a minimum number of NOR and NAND gates by the integer programming approach. The network in Figure 1.3.1(b) consists of some complex cells. Table 1.3*1 sum- marizes the comparison of these two networks. Apparently, the network with complex cells is much better in every aspect as shown in Table 1.3.1. Implementa- tion No. of No. of No. of No. of Inter- Power Con- FET's Cells Levels connections sumption NOR and NAND Complex Cells 25 8 5 19 2 18 k 3 H 1 TABLE 1.3-1 COMPARISON OF THE TWO ONE- BIT FULL ADDER NETWORKS IN FIGURE 1.3-1 * R. F. Spencer Jr. first made such a comparison in [37] where a non- optimal network with only NOR and NAND gates was used. Q DD qf E Q \ A T V h< i d V. DD C I ' ,V si DD A z ^ B lH[ V DD HC < C I-1 H QV. DD < < V. U DD -0 C. V. DD < -OS. (a) One-bit Full Adder Network with Only NOR and NAND Gates V V. Q DD DD — B o ir — o icf (e) 1 FIGURE 1.3.2 THE VERSATILITY OF AN MOS CELL 8 c X B < V Q DD v 9 DD HC ^d -0 ABC v ABC v ABC v ABC C it "V/ b € a -if -o ABC v ABC v ABC v ABC CHL c < "V/" H BHC AHC FIGURE 1.3.3 THE SHAKING OF FET'S BETWEEN TWO CELLS The synthesis problem of a two-level MOS network with a minimum number of cells was first brought up and solved with a truth table No] method by T. Ibaraki and S. Muroga. Since the power consumption of the cells in a network is quite uniform in both static and dynamic MOS cases, the minimization of the number of cells in a network is equivalent to the minimization of its power consumption. T. Ibaraki then extended the algorithm in [l8] to obtain, among all two-level networks with a minimum number of cells, the ones with a mini- mum number of interconnections. D. E. Muller and A. A. Markov solved the problem of minimizing the number of NOT gates in a network for a given function. r i T (S. B. Akers showed a threshold network implementation of their ideas. ) K. Nakamura, N. Tokura and T. Kasami pointed out that the pro- blem of synthesizing a multi-level MOS network with a minimum number of cells is essentially identical to this classical problem with minor [32] differences. J Elaborating the ideas of Markov, they presented their algorithms. They also obtained a necessary and sufficient con- dition for synthesizing a multi-level network with a minimum number [32] of cells. Since the optimal network for a given function is not unique, algorithms were presented in [32] to obtain one of them. The algorithms were also extended to syntehsize networks with a specified number of levels. Some of E. N. Gilbert's results in [lk] can be applied to synthesize MOS networks. However the optimality of the networks is not guaranteed. Although the minimization of the number of FET's in an MOS network is also a very important problem in the application of MOS LSI's, to the best knowledge of the author, no paper has been published to deal 10 with this problem mainly because it is a much more difficult one. T. K. Liu, T. Nakagawa and S. Muroga have a preliminary work of formu- [25] lating this problem into an integer programming problem. The com- putational results are encouraging, at least for small-size networks. In ths thesis, the problem of synthesizing MOS networks with a minimum number of cells (optimal MOS networks) is treated with a different approach, by using the necessary and sufficient condition in [32]. A special structure, "stratified structure," of the input vectors of a given Boolean function is constructed in Chapter 2. Based on this structure, a special class of functions, "stratified functions," is defined. Then, optimal MOS networks are synthesized based on these functions only. Synthesis algorithms for both optimal two-level and optimal multi- level feed-forward MOS networks are presented in Chapters 3 and h, respectively. The computational efficiency of these algorithms is better than that of the algorithms in [l8] and [32], although it is somewhat difficult to compare the networks produced by them in terms of the number of FET's. An early version of the algorithm described in Chapter h was implemented with a FORTRAN program by T. Shinozaki. Optimal feed-forward MOS networks were listed in [36] for all represen- tative functions of four or less variables. Lower bounds on the number of levels in optimal feed- forward MOS networks are also discussed in Chapter k. The problem of synthesizing optimal MOS networks with cells of similar complexities is discussed in Chapter 5. When we want to process a series of input data instead of a single set of input data, a feed-next MOS network is usually more desirable 11 than a feed-forward MOS network. Hence, the feed-next MOS networks are discussed in Chapter 6, which includes the following results: If external variables are available only for the cells in the first level, feed-next MOS networks can not realize all of the Boolean func- tions. Thus, delay elements must be included in the network in order to realize any given function. Then an upper bound on the number of delay elements required to realize a given function is obtained. If external variables are available for cells in any level, feed-next MOS networks are capable of realizing any Boolean function. Then an algorithm is presented to synthesize optimal feed-next MOS networks for functions of up through 16 variables. 12 CHAPTER 2. BASIC DEFINITIONS The main objective of this chapter is to set up some ground work for the discussion in the later chapters. First, all the true input vectors of a Boolean function are grouped into true clusters. From the true clusters, a structure — stratified structure — of all input vectors (both true and false vectors) is constructed. Important properties of this structure, which will be used for the synthesis of networks in later chapters, are discussed. Finally a set of functions -- fundamental functions -- is defined, based on this structure. These functions are useful for the construction of an MOS cell when the output function of the cell is specified in terms of a truth table. They are also useful in synthesizing MOS networks with cells of similar complexities, 2.1. True Clusters of Input Vectors Definition 2.1.1 : An input vector a is a true vector of a Boolean function f, if f (a) = 1. An input vector b is a false vector of f, if f(b) = 0. Input vectors may be simply called vectors. Definition 2.1.2 : Let a = (a , a , . „ ., a ) and b = (b. , b p , . . ., b ) be two input vectors. If a. > b. for all 1 < i < n and there n l—i — — exists at least an integer k (1 < k < n) such that a, > b , a is greater than b, and denoted with a > b a If a. = b. for each i (l < i - ' li — < n), a is equal to b, and denoted with a = b . If neither a > b nor b > a, a and b are said to be incomparable . Example 2.1.1 : Suppose a = (0101), b = (0001) and c = (0010) are given. Then a > b. Also a and c, as well as b and c, are incomparable. 13 Lemma 2.1.1: Given a = (a_ , a_, . . . , a ) and b = (b_ , b , . . ., b ), v 1' 2' ' n l 7 2 7 ' n 7 a and b are incomparable if and only if there exist two integers j and k (l < j, k < n) such that a. > b. and a < b . Proof ; a. > b. implies b $> a. a < b implies a > b. Hence a and b 3 3 k K are incomparable. Conversely, a and b being incomparable implies a }> b and b j> a. If a £ b, then there must be an integer k (l < k < n) such that a < b . If b i a, then there must be an integer j (l < j < n) such that a. > b.. - - - 3 3 Q.E.D. Definition 2.1.3 ; Two true vectors a^ and a of a Boolean function f are said to be separated if there is a false vector, b, of f such that a_ > b > a . This relation is denoted with a /a . Similarly, "separated" is defined for two false vectors. Note that the placement of vector a on the left side of the bar in the notation, a /a , implies that vector a is greater than vector a . Lemma 2.1.2 ; If a /a and a /a , then a /a . Proof : Since a /a and a^/a , there are two false vectors b and b such that a > b > a and a > b > a . Then a /a because a > b > a . Q.E.D. Definition 2.1.U : Let a. be a true vector of f. Suppose that there are e true vectors of f, a. , a. , . . . , a. , which satisfy the relation: J l J 2 J e a /a. /a. /. . ./a. . (2.1.1)* J J 1 J o J Note that a. > a. >a. > . . . > a. from the definition of 3 J-l 3 2 J e the relation "separated". lU And suppose that it is impossible to find more than e true vectors satisfying relation (2.1.1). Then e is called the degree of a .. The set J of all true vectors with degree e is called a true cluster of degree e . Example 2.1.2 ; A four variable function is shown in Figure 2.1.1. There are no false vectors smaller than any of {(1100), (0100), (1000), (0001), (0000)}. Therefore they cannot be separated from any other smaller vectors. Hence their degree is zero. For each of (0011), (1010) and (1011), we can find at most one smaller true vector, from which it is separated. Hence their degree is one. For vector (llll), there are two true vectors (0011) and (0000) satisfying (llll)/ ( 0011 )/ (0000), but no more. Hence the degree of (llll) is two. Consequently, we have: True cluster of degree = ((1100), (0100), (1000), (0001), (0000)}, True cluster of degree 1 = {(1011), (0011), (1010)} and True cluster of degree 2 = {(llll)} . Definition 2.1. j? : The ceiling of a real number p, denoted with r p" 1 , is the smallest integer which is not smaller than p. The floor of a real number p, denoted with L pj, is the greatest integer which is not greater than p. Example 2.1.3 : r 2.5 n = 3, l 2.5j = 2, r 5 n = 5 and l 5j = 5- Theorem 2.1.1: For functions of n variables, there are at most « +1 true clusters. Proof : Assume that there are k true clusters for a function of n variables. Let a belong to the true cluster of degree k - 1. Then, 15 1111 1110 1000 1100 0000 False Vector O * True Vector FIGURE 2.1.1 A FOUR VARIABLE FUNCTION 16 because of the definition of true clusters, there must exist k - 1 true vectors, a , a , . . . , a , such that a. /a.,J. . ./a, • From the definition of the relation "separated", there must exist k - 1 false vectors, b.. , b , . . . , b .. , such that a 1 > b 1 > a 2 > b* 2 > . . . > b k _ ! > \- (2.1.2) Since a > b , b must contain at least one 1-component less than b. . Similarly from (2.1.2), a, must contain at least 2k - 2 1-components less than a . In other words, a must have at least 2k - 2 1-components. Hence we have n > 2k- 2 . Then we get •= + 1 > k. Therefore the maximum integer value of k is — . +1. Q.E.D. Corollary 2.1.1 ; Assume that there are k true clusters for a Boolean function of n variables. If n is even and ther are k = , — +1 true clusters, then the input vectors 1 = (l, 1, . . . , l) and = (0, 0, . . ., 0) must be true vectors. Proof ; Let a be a true vector and belong to the true cluster of degree k - 1. Then there must exist k-1 different true vectors, a , a , . . ., a , such that a /a /. . ./a. . By the same argument in the proof of Theorem 2.1.1, a consists of at least 2k - 2 1-components less than ""* n a . Sxnce k = -z. +1 and n is even, 2k- 2 = 2( L |j + 1) - 2 = 2(| + 1) - 2 = n . Since a and a consist of only n components, we have a = (l, 1, . . . , 1) = 1 and a = (0, 0, . . ., 0) = . Q.E.D. IT Corollary 2.1.2 ; Assume that n is a positive odd integer. Then, there always exists a Boolean function of n variables which consists of — + 1 true clusters, and which has as its false vector. Proof: We will prove this corollary by constructing a Boolean function which has the properties stated in the corollary. Let f be a Boolean function such that r 1 if a contains an odd number of 1-components. f(a) = if a contains an even number of 1-components. Then, obviously is a false vector of f, and f consists of ,-x, + 1 true clusters, i.e., the set of all the vectors with one 1-component, the set of all the vectors with three 1-components, . . ., the set of all the vectors with n 1-components. Q.E.D. 2.2. Stratified Structure of a Boolean Function Definition 2.2.1 : Let f be a Boolean function with r true clusters. The stratified structure of f is a sequence of subsets of input vectors, f f f (M Q , M 1 , . . ., M 2r ), defined as: (i) M ^ • , -i f° r i = 0, 1, . . . , r - 1, is the true cluster of 2i +1 degree i. (ii) 'Mp. for i = 1, 2, . . . , r - 1, is the set of all input vectors each of which satisfies the following conditions: (a) greater than at least one input vector in M . ; (b) not greater than any input vector in M ; f f (c) neither in M . n nor in M.. n . 2l - ± 2l +1 18 (iii) M- is the set of all input vectors which are neither greater f than nor equal to any input vector in M . . f (iv) M is the set of all input vectors which are greater than at least one vector, but not equal to any input vector in 2r - 1 f f As we will show in the folliwing lemmas and theorems, M_ , M. , f . . . , M p are disjoint. All the true vectors are contained in M^. ., (i = 0, 1, 2, . . ., r-l), and all the false vectors are 2i+l v ' ' ' ' " f f contained in M.. (i = 0, 1, . . ., r ). Therefore M_. is called a 2i ' ' ' 2i false cluster. Both true and false clusters are called clusters. Example 2.2.1 : The function in Figure 2.2.1 has two true clusters. Hence: M^ = True cluster of degree = {(1100), (0100), (1000), (0001), (0000)} f M = True cluster of degree 1 = {(1011), (0011), (1010)} . f f f Then M p can be obtained, from M and M , according to rule (ii) in Definition 2.2.1: M^ = {(1101), (0101), (1001), (0110), (0010)} . From (a) and (b) of rule (ii) in Definition 2.2.1, we know that all f f the vectors in M are greater than at least one vector in M but f none of them (e.g., 1101) are greater than any vector in M_ •- Input vector (1110) is greater than vector (1100) in M . However, (1110) is not included in M because it is also greater than vector (1010) f f in M . Input vector (0100) is greater than vector (0000) in M. and f not greater than any vector in M . However, (0100) is excluded from 19 M f Q =P FIGURE "2. 2.1 AN EXAMPLE OF THE STRATIFIED STRUCTURE 20 f f M by (c) of rule (ii) in Definition 2.2.1 because it is in M . Since there is no input vector smaller than (0000), and since (0000) is in f f f M , the set M Q is empty by rule (iii) of Definition 2.2.1. Finally, M, is generated from M according to rule (iv) of Definition 2.2.1. We have mJ = {(1111), (0111), (1110)} . The following lemmas and theorems summarize some important properties of the stratified structure. Lemma 2.2.1 : Suppose that f is a Boolean function which has r true f f f clusters, and the stratified structure CM_ . M- , . . », M_ ). Then ' 1 ' 7 2r f f f a) M, M p ,...,Mp , are not empty. f "* b) M n is empty if and only if is a true vector. f ~* c) M is empty if and only if 1 is a true vector. Proof: Since f has r true clusters, there must be a true vector a of ' r degree r - 1. Then, there must be r - 1 true vectors in a , a , . . . , a ., , such that r - 1 a r /a r _ 1 /. . ./a^ (2.2.1) Then, a. (1 < i < r) is a true vector of degree i - 1. In other words, "* f f f f a. belongs to M_. ., . Hence M, , M. , . . . , M_ , are not empty, l 2i - 1 1 ' 3 ' 2r - 1 From (2.2.1) there are r-1 false vectors, b n , b^, . . ., b _ , such that a>b , > a n >...>b n >a n . (2.2.2) rr-lr-1 11 Now let us show b. (l < i < r- l) belongs to M p . . Suppose that b. is greater than a true vector c in M_. n (i.e., l 2i+l the true cluster of degree i). Then we have a. _ > b. > c. Since c l + l i 21 is of degree i, the degree of a. must be greater than i. However, from (2.2.1) we know that a. belongs to the cluster of degree i. This is a contradiction and therefore b. cannot be greater than any f "* "* vector in M^. n . Since b. is a false vector, b. does not belong to 2i+l l l f f "* -*■ f M^. , or M n . _ . Furthermore, b. is greater than vector a. in M.. , 2i+12i-l ' i i 2i - 1 Hence b. belongs to M~. , due to rule (ii) of Definition 2.2.1. That l ° 2i ' f f f is: M,M,,...,M p p are not empty. Therefore part (a) of the lemma has been proven. ■* f If is a false vector, then it does not belong to M ] . Further- ** f -* more, cannot be greater than any of the vectors in M. . Hence belongs to M. due to rule (ii) of Definition 2.2.1. -* f - If is a true vector, then it must belong to M. . Otherwise must be separated from a smaller vector which does not exist. Since f f is smaller than all other vectors and is in M , M _ is empty due to rule (iii) of Definition 2.2.1. Hence part (b) of this lemma has been proven. Similarly, part (c) of this lemma can be proven. Q.E.D. f f f Theorem 2.2.1 : Let (M_ , M , . . . , M ) be the stratified structure of a Boolean function f . Then f f a) Any two different M . and M . are disjoint J 2r f b) U M . includes all input vectors of f. i =0 x Proof : Let us first prove part (a). Assume i < j. Then depending on whether i and j are even or odd, we have the following four cases: 22 (i) Both i and j are odd. f f i - 1 M . and M . are the true clusters of degree — •? — •L (J w and *-x — respectively. Hence they must be disjoint, (ii) Both i and j are even. Let b be a vector in M . . By rule (ii) of Definition J "* f 2.2.1, there is a true vector, a, in M . ., such that b > a . Since a is of degree ~ — , by Definition 2.1.U there must be a vector c in M. , n such that a > c. Thus i +1 — b > a > c . From condition (b) in rule (ii) of Definition -* f f f 2.2.1, b does not belong to M . . Hence M . and M . must be disjoint. (iii) i is odd and j is even ■* f "* Let a be a true vector in M . . If i = j - 1, a does l ° ' ■p not belong to M . because of condition (c) in rule (ii) of J Definition 2.2.1. If i < j - 1, then a cannot be greater f than any of the vectors in M . . (Otherwise, the degree J — ■*■ of a is greater than — r — .) From condition (a) in rule (ii) of Definition 2.2.1, a does not belong to M . . Hence J f f M . and M . are disjoint. (iv) i is even and j is odd. _» - >» Let b be a true vector in M . . Since b is of degree J ^-^, — , there is a vector, a, in M . n such that b > a . .2 * ' ' l+l — Then, by rule (ii) of Definition 2.2.1, b does not belong f f f to M . . Hence M . and M . are disjoint, i ID Now let us prove part (b) of this theorem. It is obvious that all f f f true vectors are included in M 1 , M , . . .,M p -, i.e., they are 2r f included in U M . . i = x 23 Let b be a false vector. If there is no true vector smaller than b , then b belongs to M.. Otherwise, let a be the true vector which has the highest degree and is smaller than b . If the degree of a is r - 1, then b belongs to M . If the degree of a is i- 1 (i < r), then there does not exist any true vector of degree i smaller than b, i.e., - f -* b is not greater than any of the vectors in M _ . Furthermore, b is greater than vector a in M . Hence b is in M . by rule (ii) in Definition 2.2.1. Q.E.D. f f f Corollary 2.2.1 : Let (M,M, . . . , M )be the stratified structure f of a Boolean function. M^. ., for < i < r- 1 consists of only true 2i +1 — — f vectors and M_. for < i < r consists of only false vectors. 2i — — f Proof: Since M^. n is the cluster of true vectors of degree i, 2i +1 f M . _ consists of only true vectors because of Definition 2.2.1. f f f f f Since M n ,M_, . . . , M_ .. includes all true vectors and M„ , M n , 1 ' 3 ' 2r - 1 01' f f . . . , M ? are disjoint, M p . consists of only false vectors. Q.E.D. f f f Theorem 2.2.2: Let (M^, M. , . . . , M_ ) be the stratified structure ' 1 ' ' 2r o 2r of a Boolean function. An input vector b belongs to the set U M . i=k+l x -* -p (0 < k < 2r- l) if and only if b does not belong to M and there K. exists a vector a inM, such that b > a . k Proof : Let us consider the following two cases. (i) k is odd. 2r ■* f Suppose that b belongs to U M . . Then by part i=k+l x 2k (a) of Theorem 2.2.1, b does not belong to M . If b € M 2J7 k + 1 "* ( — 9 — < I < r- l), then b is a true vector of degree i. Since — - — < i, there is a vector a € M (i.e., a is of degree £^= ) by Definition 2.1.2 such that b>a. If b €M . k + 1 (— — < I < r), then by rule (ii) of Definition 2.2.1, there is a vector c £M.« .. such that b > c. Since c is a vector k - 1 ■* of degree I - 1, and since — = — < £- 1, there is a vector a 6 f — — — M n such that b > c > a . k — ■* f Conversely, suppose that b does not belong to M and there is a vector a inM. such that b > a . Since a is a k k - 1 ~" true vector of degree — s — , there is a vector c * of degree £ -»-»—» k - 1 such that b > a > c „ for every I such that < I < — - — . Since c« e M n _ by condition (b) in rule (ii) of Definition 2.2.1, b does not belong to M * . Since b > a, b does not belong to Mpg - (°<-^< — ^~ )• Hence b must belong to 2r ' U M . because of part (b) of Theorem 2.2.1. i = k+1 x (ii) k is even. This case can be similarly proven as case (i). Q.E.D. f f f Theorem 2.2.3: Let (M_ . M_ . . . ., M _, ) be the stratified structure of a Boolean function f, and i and j be two integers such that < i < j < 2r. Then a) Each vector in M . is either smaller than or imcomparable to f any vector in M . . 25 ~* f b) For each vector, b, in M . , there always exists at least one J vector, a, in M . such that b > a . ■"* f Proof: Let us first prove part (a). Assume a is a vector in M . and -* f is greater than a vector, b, in M . . We will show that this assumption J will lead to a contradiction. If j is odd, then b is a true vector of degree . Hence there are j - 1 vectors, a , a , . . ., a. such that b > a. > . . . > a > a . It can be shown that a. (l < k < j - l) belongs ■p to M . If j is even, then from (a) of rule (ii) in Definition 2.2.1, A. there must be a vector a. , in M. _ such that b > a. .. . Since J - 1 J-l J - 1 a. is of degree ^~ — , there must be j - 2 vectors: a , a , . . ., Q — J- c- -L <— a „ such that a. ,>a. „>...> a_ > a_. Therefore, we have J-2 j-lj-2 21 b>a. > a. > . . . > a > a no matter whether j is even or odd. Since a > b from the assumption, a > b > a. > . . . > a. > . . . > a > a . (2.2.3) Let us first consider the case of i being odd. Then (2.2.3) implies that a has higher degree than a. which is in M . . Hence a cannot be & l i f -* f in M . . This contradicts the assumption that a belongs to M . . For i i the which case of i being even, (2.2.3) implies that a is greater than a. is in M . _ . From (b) of rule (ii) of Definition 2.2.1, we get ■* f -* the same contradiction that a cannot be in M . . Therefore, vector a f f in M . cannot be greater than any of the vectors in M . . That is, each f vector in M . is either smaller than or imcomparable to any vector in M f . Part (b) of this theorem can be easily proven by Theorem 2.2.2. 2r "* f -* f Let b be a vector in M . . Then b belongs to U M B , because i < j. £ =i+l 26 ■* f Then, by Theorem 2.2.2, there exists a vector, a, in M, such that b > a. Q.E.D. Now let us introduce a pictorial representation for relationship among vectors in Figure 2.2.2, where region Q, is an arbitrary subset of input vectors. Region I represents all the vectors which are not in Q, but greater than at least one vector in Q; region II represents all the vectors which are not in Q, but smaller than at least one vector in Q; region III represents all the vectors which are incomparable to all the vectors in Q. With this representation, the stratified structure of a Boolean function can be represented as in Figure 2.2.3, where f f f M , M and M are clusters of degrees 0, 1 and 2 respectively. f f Because of part (b) of Theorem 2.2.3, M is in region I of M , and f f f M is in region I of M . From (ii) of Definition 2.2.1, M - (region f f f I of M ) H (region II of M U region III of M ) . From (iii) and f f (iv) of Definition 2.2.1, M = (region II of M ) U (region III of f f f M ) and M^- = (region I of M ). Figure 2.2.4 shows the pictorial representation of the stratified structure in Figure 2.2.1 in the format of Figure 2.2.3« Because of Corollary 2.2.1, all the vectors f f in M„. , .. and those in M~. are denoted with circles (i.e., true vectors) 2i +1 2i v ' ' and solid dots (i.e., false vectors), respectively. Definition 2.2.2 : I (a) is defined as the set of all input vectors — ____ _ _ ______ jj which are smaller than a given input vector a, and which consist of exactly one less 1-component than a. I (a) is the set of all input vectors which are greater than a and which consist of exactly one more 1-component than a. 27 Q III II FIGURE 2.2.2 A PICTORIAL REPRESENTATION FOR RELATIONSHIP AMONG INPUT VECTORS 28 A A < < «s < < FIGURE 2.2.3 A PICTORIAL REPRESENTATION OF A STRATIFIED STRUCTURE 29 M M M M FIGURE 2.2.U AN EXAMPLE OF THE PICTORIAL REPRESENTATION OF A STRATIFIED STRUCTURE IN THE FORMAT OF FIGURE 2.2.3 30 The following is an algorithm to construct the stratified structure of a Boolean function f of n variables. Algorithm 2.2.1 : Step 1 : If is a false vector of f, belongs to M ( "* f f belongs to M. , and M _ is empty. Otherwise Step 2: Step 3: Step h: Step 5: Step 6: w = w = w + 1 If w > n, stop. Otherwise go to step 5« For each input vector, a, consisting of w 1-components, obtain I_ (a) = {b , b_, . . . , b }. Let b.. , b ? , . . . , b n (l < I < k) be the vectors of the opposite type as a (i.e., b , b_, . . . , b » are false or true vectors corresponding to whether a is a true or false vector), and b„ .. , b n ^, . . . , b. be the vectors of the same type as a. "* "* "* f f Assume that b , b , . . . , b belong to M . , M. , . . f -* f M. respectively. Assign a to M, where t = Max {i +1, i k t 1 go to step 3« , . . ., i }. Then f f f Theorem 2.2.1k The sets, M_, M_ , . . . , M_ , obtained by Algorithm 2.2.1 are the stratified structure of f. Proof : First, we prove that each true vector belongs to one of M ] , f f f f M , . . . , M and each false vector belongs to one of M fl , M« , f . . ., M . We will prove the statement by mathematical induction. From step 1 of algorithm 2.2.1, this is true for . Assume that the above statement is true for vectors consisting of i 1-components. 31 Let a be a true vector of i + 1 1- components, and I (a) = (b-, b , J_i JL c. . . . , b }. As described in step 5 of Algorithm 2.2.1, b , b , . . . , h a are false vectors and b* _, b, „, . . . , b are true vectors. Then by the assumption i_, i p , . . . , i * are even integers and i« _, i. , . . , , x, are odd integers, because b , b , . . . , b consist of i 1-components. From step 6 of Algorithm 2.2.1, a belongs to M where t = Max (i+1, i+1, . . ., i* + l, i« _, i^ + 2> " * '' i ) . Since i + 1, . . ., i^ + 1, i/j , -., • • • , i- are all odd integers, t is an odd integer. Similarly, if a is a false vector of i + 1 1-components, we can "* f prove that a belongs torn, with an even t. -* f Secondly, we show that a true vector, a, belongs to M p , , if a is of degree k. Since a is of degree k, there exist true vectors a, , a^, . . . , a, and false vectors b n , b^, . . . , b, such that 12' k 12 k a > b, > a, > . . . > b > a > b > a . a does not belong to M -* -* f because a n is a true vector. Hence a., belongs to M . for i_ > 1. 1 lxl- -* f From step 6 of Algorithm 2.2.1, b belongs to M . for j_ > i +1 and °1 ■* f a belongs to M . for i p > j_ +1 > i_ +2. Repeating this argument, -" f a belongs to M for t >2k + i >2k + l. "D J- Suppose t =2k'+l>2k + l. From step 6 of Algorithm 2.2.1, "-* f there must be a false vector, a. , , belonging to M, n such that a > c , . Since c , belongs to M, , , there must be a true vector, d ,, belonging to M such that c , > d . Repeating the above argument for d ,, we find k' true vectors: d , d , . . ., d , and k' false vectors: c_ , c^, . . . , c, , such that 1 2 ' k' a > C k' > d k' > C k' - 1 > * ' * > C 2 > d 2 > C l > d l * ( 2 - 2 - 6 ) 32 From (2.2.6), a is of degree k' > k. This is a contradiction. Hence ■* f t = 2k + 1, i.e., a belongs to M - . "* f ~* Thirdly, we show that a false vector, a, belongs to M if a satisfies the conditions of rule (ii) in Definition 2.2.1. From condition (a) of rule (ii), there exists a true vector e 1 in M ? . such that a > e.. . Hence a belongs to M (t > 2i) because of step 6 of Algorithm 2.2.1. Suppose t > 2i. Then there must be a true vector e,.. in M„. , , such that a > e„. This contradicts the conditions of 2 2i+l — 2 -* * rule (ii). Therefore t must equal 2i, i.e., a belongs to M . Similarly, we can prove that the false vectors which satisfy conditions in rule (iii) and rule (iv) in Definition 2.2.1 belong f f to M_ and M _ respectively. 2r Q.E.D. 2.3. Fundamental Functions of a Boolean Function Definition 2.3.1 : Qi-term of an input vector is the product of complemented literals corresponding to the O's in the input vector, and B-term of an input vector is the product of uncomplemented literals corresponding to the l's in the input vector. As two special cases, the a-term of 1 and the B-term of are defined as 1. a • B is called the minterm of the input vector. Example 2.3.I ; Let a = (110100) be an input vector. Then the a-term of a is x„x_x^- and the 6-term of a is x.x^x, . a - B = x„x r x^x.x„X| 3 5 & 124 356124 is the minterm of a. Each of the a-term, 3-term and minterm of an input vector may be considered as a Boolean function represented by a single product. For 33 example, the oterm x x x^ is a Boolean function which equals one for (000000), (000100), ( 010000 ), ( 010100 ), ( 100000 ), ( 100100 ), ( 110000) and (110100); and equals zero for the rest of the input vectors. Lemma 2.3.1 : Let a and p be the a-term and p-term of an input vector, a. Then (a) a = 1 for an input vector b if and only if a > b. (b) P = 1 for an input vector b if and only if b > a. Proof : Let us first prove that a = 1 for b if a > b. If a > b, then all the variables which are in a (i.e., the variables correspond- ing to all the literals in a) must also be in b. Therefore a = 1 for b. Let us then prove the converse. If a = 1 for b, then the variables corresponding to all the literals in a must be in b. Therefore a > b. Hence part (a) of this lemma has been proven. Similarly, part (b) of this lemma can be proven. Q.E.D. Definition 2.3.2 : Let (Mq , M , . . . , M^ ) be the stratified structure of a Boolean function f, and a._, a._, .... a.^ (i = 0, ' ll i2' 'it. ' i f "* 1, . . ., 2r) be the vectors in M . . Let 6. . be the p-term of a. . i ij ij (i = 0, 1, . . ., 2r, j = 1, 2, . . . , t. ). Then a sequence of functions f f f f ^ ' * 1 ' ^ 2 ' * * * * £ 2r iS def ined as : f 5 i = P il V 3 i2 v ' ' * v P it. l t. = J p. . . M 3^ f f f £ , ^ . , . . . , ^ are called fundamental functions of f . Example 2.3.2 ; For the same function in Example 2.2.1, we have M =*> M^ = ((1100), (0100), (1000), (0001), (0000)} M^ = ((HOI), (0101), (1001), (0110), (0010)} M^ = ((1011), (0011), (1010)} mJ = ((1111), (0111), (1110)} . Since M = , £ does not exist. However, for M f M* , f and M. , we have f * 1 = X 1 X 2 v X 2 v X l V X U v 1 = 1 £ 2 = X 1 X 2 X ^ v X 2 X i^ v X 1 X 4 v X 2 X 3 v X 3 = X 2 X i+ v X 1 X 4 v X 3 5 3 = x l x 3 x i+ v X 3 X ^ v x l x 3 = X 3 X U v x l x 3 5 ^ - x i x 2 x 3 x i+ v X 2 X 3 X 4 v X 1 X 2 X 3 = X 2 X 3 X 4 v X 1 X 2 X 3 ' As seen in the above example, some p-terms in the definition of f f t . are redundant and can be deleted from the expression of t . . The 3 1 l f following Lemma 2.3.2 gives the irredundant disjunctive form of £ . . Definition 2.3.3 : Let S = (a , a , . . ., a.) he a set of input vectors, a. e S is a minimal vector of S if there does not exist in i S any vector smaller than a., a. e S is a maximal vector of S if J there does not exist in S any vector greater than a . . f f f Lemma 2.3.2: Let (M_ , M n , . . . , M„ ) be the stratified structure si — v q > 2_ > ' 2r of a Boolean function, and a. n , a.-, . . . , a. be all the minimal ' xl' x2' ' xq. 35 vectors of M . (i = 0, 1, . . ., 2r). Let 3. . be the B-term of a. . (i = 0, 1, . . . , 2rj j si, 2, , . ., q.), Then ? f = p.- v B. v . . . v P. . (2.3.1) b l K il K l2 K iq. l Furthermore (2.3.1) is the irredundant disjunctive form of £ . . Proof : Let us first prove that equation (2.3.1) holds. Suppose b is f f a vector in M . but not a minimal vector of M . . Then there must be l i a minimal vector, a. . , of M . such that b > a. ., Hence for every 1-component of a. ., the corresponding component of b is one. In other words, every literal in the 8-term of a. . appears in the B-term of b also. Consequently, the B-term of b subsumes the B-term of a. ., and is a redundant term in the definition of £ . . That is, (2.3.1) holds. Let us then prove that (2.3.1) is an irredundant disjunctive form, i.e., the deletion of any term or literal from the right hand side of (2.3.1) will make the remaining terms not equivalent to the original function. Suppose p. . is deleted from (2.3.I). Then the right hand side of (2.3.1) changes to B a v p i2 v . . . v p t) . _ z v, fi irj +1 v . . . v p.^ . (2.3.2) — >- —V — V — V. Since a. . is a minimal vector, a. . is not greater than any of a..,, a.^, ij ' ij J il' i2' ...,a. . ,a. ,...,a. „ Hence by Lemma 2.3.1, 1, j -1 ' 1, j +1 ' iq* p = 0, k 4 j> fo r a - •• Thus, (2.3.2) equals zero for a. .. Since l-K 1J 1J p . = 1 for a. ., t . = 1 for a. .. Therefore (2.3.2) does not equal f t . . Hence 8. . cannot be deleted from (2.3.1). b 1 ij v 36 Suppose a literal x. is deleted from a term 3 in (2.3.1). Let 81 . be the remainder. Then the right hand side of (2.3.1) changes into 3 il V P i2 V ' * * V P ij V * ' * V P iq. * (2.3.3) Let a! . he the input vector obtained from a. . by changing x from 1 to 0. Then we have a! . < a. .. Since a. . is a minimal vector of iJ 10 ij M . , a'. . cannot be greater than any of a._, a. OJ .... a. . Hence, 1 ' ij il' 12' ' iq. ' by Lemma 2.3-1, P., = (k = 1, 2, . . ., q. ) for a'.. . Thus (2.3.1) equals zero for a'. . . Since 8*. . =1 for a'. . , (2.3*3) equals one for j-j ij j-j a'.. . Therefore (2.3.3) does not equal (2.3.1). Hence x» cannot be deleted from the right hand side of (2.3.I). In other words, (2.3.1) f is an irredundant disjunctive form of t . . 3 1 Q.E.D. f f f Theorem 2.3.1 : Let (M_ , M_ , . . . , M p ) be the stratified structure f f f of a Boolean function f , and £_, £,..., (,0 be the fundamental f "* functions of f. Then £ . = 1 (i = 0, 1, . . . , 2r) for a vector b if 2r -* f and only if b belongs to U M . . 3 = 1 d f "* Proof : Assume g . = 1 for an input vector b. Then there must ba a term, 3. ., in t . such that 8. . = 1 for b. Lemma 2.3.1 asserts b > a, .. ' U 1 13 - ij If b = a. . then b belongs to M . . If b does not belong to M . and 2r •* -* - f b > a. . , then b belongs to U M . by Theorem 2.2.2. For either 1J j =1+1 J 2r -* f case, b belongs to U M . . d =i J 37 2r Conversely, assume b belongs to U M . . If b belongs to f f ""* M . , then there is a term, 8. ., in C . such that 8. . =1 for b, i.e. , 2r f -* ■* f £ . =1 for b. If b belongs to U M . , then, by Theorem 1 j=i+l J 2.2.3, there exists a vector a. . in M . such that b > a. .. Hence -* f -* p. . = 1 for b by Lemma 2.3.1. Consequently, £ . =1 for b. Q.E.D. f f f Corollary 2.3.1 ; Let (M Q , M.. , . . . , M ? ) be the stratified f f f structure of a Boolean function f , and £_,£_,...,£ be the fundamental functions of f. Let a , a , . . ., a be the vectors IX l£- 1T3 • 1 f """ f in M . , and a. . and B. . be the a-term and 6-term of a. . . Then c . i ' ij ij 10 b i+ 1 equals (8... \/ 8.~ v • • ■ v 8., ) (0!. n \/ Q!.~ v . . • v 0!., ) = ll i2 K it ll i2 it . l l £ . (a i;L v a, 2 v . . ■ v a lt ) . (2. 3.10 i "*■ f Proof ; Let b be a true vector of (2.3.10. Then both £ . and (a v a s/ . . . v a ) equals 1 for b. Since £ . =1 for b, b 2r belongs to U M . by Theorem 2.3.1. Since (a ^a v/ . . . v a ) J =i J 1J - x i = 1 for b, a = a = . . . = a = for b. By Lemma 2.3.1, b is i either greater than or incomparable to each of a._, a , . . ., a . i ~~" f -* That is, b does not belong to M . . Consequently, b belongs to 38 2r „ U M . Then by Theorem 2.3.1, £ . , = 1 for b. Hence j -i+1 *l+l - 5 i (a il~ a i2 - ' ' • ~ a it> (2 - 3 - 5 ) l Let c be a true vector of £ ... . Then, by Theorem 2.3.1, c 2r f belongs to U M . . By Theorem 2.3.1 again, 5* = 1 for c.. (2.3.6) 2r "*" f ~* f Since c belongs to U M . , c belongs to M « where I is an J -1+1 3 l "* f integer greater than i. By part (a) of Theorem 2.2.3, a. . e M . (j = 1, 2, . . „ , t. ) is either smaller than or incomparable to c. Hence a..-. = a._ = . . . = a., =0 for c . That is ll i2 it . i a v a ^ . . . v a = 1 for c . (2.3.7) 1- From (2.3.6) and (2.3-7), c is a true vector of (2.3-*0« Hence 5 1+1 E 5i (a-n ^a i2 ^ • • - vo lt ) . (2.3.8) i From (2.3.5) and (2.3.8), g* = 5* (ST 5 a i2 v . . . v 3TT ) i Q.E.D. 39 CHAPTER 3. SYNTHESIS OF OPTIMAL TWO- LEVEL MOS NETWORKS In Section 3.1, each MOS cell is formulated into an abstract model, and the problem of synthesizing a two-level network is trans- formed into a problem of searching for a Boolean expression for a given Boolean function. Then an algebraic synthesis algorithm based on the minterms of input vectors is presented in Section 3«2. Finally, in Section 3*3 the upper bound on the number of cells required in a two-level MOS network are listed for all functions of up through 20 variables. 3.1. Formulation of the Two-level MOS Network Synthesis Problem Definition 3.1.1 : A Boolean function is called a negative function if it can be represented by a Boolean expression in which every literal is complemented. Example 3.1.1 : The minterm expression of the function in Figure 3*1.1 (a) is: f 1 = *1 X 2 X 3 v X 1 X 2 X 3 v X 1 X 2 X 3 v X 1 X 2 X 3 v X l*2*3 v X 1 X 2 X 3 * However f can also be represented as: f l = x l v x 2 ' (3.1.1) Since every literal in (3.1.1) is complemented, f_ is a negative function. Function f in Figure 3.1.1 (b) cannot be represented by a Boolean expression which consists of only complemented literals. Therefore, f is not a negative function. Uo 111 110 100 000 (a) Function f 111 110 100 (b) Function f FIGURE 3.1.1 NEGATIVE FUNCTION VERSUS NON-NEGATIVE FUNCTION in Definition 3.1.2: A Boolean function is called a positive function if it can be represented by a Boolean expression in which every literal is not complemented. The following lemma was first discovered by E. N. Gilbert. Lemma 3«1'1 ' A necessary and sufficient condition for a function f to be a positive function is f (a. ) > f (a ) for every pair of vectors, a and a , such that a > a . Proof : First assume that f(a ) > f(a ) for every pair of a > a .. Express f with prime implicants and let P be a prime implicant with tl, I.e., P = P'x, . Let a be the vector whose components are l's only for the variables that are uncomplemented in P, and the rest of the components are all O's. Then f(a ) = 1. Let a, be a vector identical to a except for the component corresponding to x_ being 1. Then a, > a . Because of the assumption, we have f(a-r) = f(a, ) = !• Let b be any vector such that P'x, = 1 for b. Then b > a,. By the assumption, f(b) = f(aj.) = 1. In other words, whenever P'x =1, f = 1. Thus the addition of P'x to f by disjunction does not change f. Then P'x, v P'x = P' will be a term of f. Since P' is subsumed by P'x, f P'x cannot be a prime implicant. Therefore no prime implicant of f contains a complemented literal. That is, f is a positive function. Conversely, let f be a positive function and be represented as f = P_ v- P p v . . . v P. where P. ( j = 1, 2, . . . , k) is a product of uncomplemented literals. Let a > a . Suppose f(a p ) = 0. Then f(a ) > f (a ) no matter whether f (a ) = 1 of f (a ) = 0. Suppose f (a ) = 1. Then, there must be P» = 1 for a . Since P* is k2 a product of uncomplemented literals and since a > a_, P, = 1 for a . Hence f(a ) = 1. That is, f(a ) = f(a ) = 1. Q.E.D. The following theorem and lemma for negative functions are Tl 81 shown by Ibaraki and Muroga. Theorem 3»1»1 : A necessary and sufficient condition for a function f to be a negative function is f (a ) > f (a p ) for every pair of vectors a 1 < a 2 - Proof : Similar to the proof of Lemma 3«1»1« Q.E.D. Corollary 3.1.1 : Let f , g , g , . . . , g be Boolean functions of x, , x_,, . . ., x . Then f is a negative function of x,. x A , . . ., x 1' 2.' ' n X 2' ' a and g.. , g c , . . ., g if and only if for every pair of input vectors a and a such that a < a and f (a. ) < f (a ) there always exists g.(a ) > g.(a ) for at least one j such that 1 < j < k . Proof : Let a ± = (a^, & 12 , . . ., a^) and a p = (a^, a.^, . . ., a gn ) be two input vectors. Set d = (a , a , . . . , a , g (a ), g (a ), * ' '> g k^ a l^ and d 2 = ^ a 21' a 22' " ' '' a 2n' g i^ a 2^ S 2^2^ * " *' g k (r 2 )). Let us assume f is a negative function of x_ , x_, . . . , x and g 1 , g 2 , . . . , g n . Suppose a x < a p and f(a 1 ) < f(a 2 ). Then, by Theorem 3.1.1 and f(d ) = f(a ) < f(a ) = f(d ), we obtain d. % dp, Since a < a , there must be g.(a ) > g.(a ) (1 < j < k) in order to guarantee d_ ^ d_. k3 Conversely, assume that there always exists g.(a ) >g.(a ) if a < a and f(a ) < f(a ). Suppose d < d . Then, we have a < a , g.(a ) f(a ) = f(d ) by the assumption. Then, by Theorem 3.1.1, f is a negative function in terms of x , x , . . . , x and g_ , g , . . . , g k' Q.E.D. By the discussion in Section 1.2, the logic function of the driver of an MOS cell is always a positive function. Then, the output function of an MOS cell is always the complement of a positive function; in other words, by DeMorgan's law a negative function. Conversely, suppose that a negative function is given. We can always represent the negative function by the complement of a positive expression by DeMorgan's law. Then an MOS cell can be constructed to realize this negative function by connecting the input variables in series or in parallel according to the AND or OR operations in the positive expression. Example 3-1.2 ; Let f be a negative function represented by f = ( x t^o v x_) x, . Then by DeMorgan's law, we get f = (x.^ v x^) ic^ = (x~Txp~lc~T7~x^. (3.1.2) The MOS cell constructed according to (3.1.2) is shown in Figure 3.1.2, where x_ and x are connected in parallel corresponding to x v x in (3.1.2); x is connected in series with (x v x ) corresponding to (x v x ) x ; and x, is connected in parallel with (x v x ) x corresponding to (x v x ) x v x, . Then we can have the following theorem. kh FIGUEE 3.1.2 AN MOS CELL CONSTRUCTED FROM (3-1.2) k5 Theorem 3.1.2 : The output function of an MOS cell is always a negative function in terms of the inputs of the cell. A negative function in terms of x.. , x , . . . , x can always be realized by an MOS cell with x_ , x , . . . , x as its inputs. It is obvious that any Boolean function f can be expressed as a negative function of x.. , Xp, . . ., x , and y , y , . . ., y where y. = x , y = x , . . . , y = x . Thus, f can be realized by an MOS cell with x_ , x , . . . , x and y_ , y ? , . • . , y as the inputs of the cell. Therefore, we can conclude that f can always be realized by a single MOS cell if the complements of inputs are available. However, when the complements of inputs are not available, it is not obvious how many cells are required to realize a given Boolean function. Since each x. can be obtained by using one cell with x. as its input, the complements of all inputs can be obtained by n cells. Then, we can realize f by using one additional cell. Therefore, f can always be realized by a two-level network with at most n + 1 cells. In the next section, we will show that we need fewer cells generally, and we will discuss the minimum number of cells required to realize a function by a two-level MOS network. Also two algorithms to synthesize a two-level network with a minimum number of cells will be presented. By Theorem 3.1.2, the problem of synthesizing a two-level network for a function f means finding a set of negative functions, F(x_, x , * • •> x n > §2/ ^2' * * '' ^k ' ^l^ x l' X 2' * * " f X n ' * * * ' ^k 1* X 2' . . ., x n ) such that F^, x g , . . . , x^ g ± , gg, . . ., g fe ) = f(x 1 , Xp, . . . , x ) as illustrated in Figure 3.1.3. (The small circle in each cell indicates that the output of the cell is a negative function in terms of its inputs. ) U6 P=f(x 1 ,x 2 , . . .,xl First level Second level F(x 1} x g , . . ., x q , g 1 , g 2 , . . ., g k ) = f(x 1 , x 2 , . . ., x n ) and ; , g , . . ., g , F are negative functions. FIGURE 3.1.3 A TWO- LEVEL MOS NETWORK hi 3.2. Synthesis Algorithms Definition 3*2.1 : Assume a is a true vector of a Boolean function f. Then a is detached (i.e., detached from vector 0) if there is a false vector of f , b, such that a > b. a is said to be attached if it is not detached. Example 3*2.1 : Let us consider the function in Figure 3.1.1 (b). Input vector (Oil) is a true vector, and there is a false vector (010) smaller than (Oil). Thus (Oil) is a detached true vector. However, for true vector (001), there is no false vector smaller than it. Thus, (001) is attached. f f f Lemma 3*2.1 : Let (M,M, ...,M p )be the stratified structure of a Boolean function f. Then f f f (a) All the input vectors inM.,M r , . . .,M. , are 3 5 ' 2r - 1 detached true vectors. f f (b) The vectors in M are detached if and only if M is not empty. The proof of this lemma is obvious from Theorem 2.2.3 and Lemma 2.2.1. Theorem 3*2.1 : Let S = {a , a , . . ., a.) be a subset of all the attached true vectors of a Boolean function f . Let cl , a , . . . , a be the a-terms, and A n , A , . . . , A, be the minterms of a , a , . . ., a . Then we have: i v A. v . . . v A. c ql v a p v . . . v a c f . U8 Proof : All the true vectors of L v A. v . . . v A are obviously a -i > a o> • • •> a v* ^y P ar t ( a ) °f Lemma 2.3.1, a = 1 for a., i.e., JL c Jt (ql n/ a p v . . . ^<\) =1 for a -« Hence A ^ A p v . . . s/ A, C QL \/ QL v ... v CH, . Assume b to be a true vector of (a. v a ? v . . . v a, ). Then there must be an a. (l < j < k) such that a. = 1 for b. By part (a) J J of Lemma 2.3.1, we have a. > b. Since a. is an attached true vector J - of f , b must also be a true vector of f . Hence QL vQL vi . . v a. c f . Q.E.D. Theorem 3.2.2 : Let S = (a , a , . . ., a. ) be a set of true vectors of a Boolean function f. Let a., p. and A. be the a- term, 8-term and minterm of a. (l < j < k) respectively. If no pairs of vectors in S are separated from each other, then i^ v a 2 v . . . v i^ c (a L va 2 v...va k ) (p^v^v.-.v^Cf, Proof: We know that a. = 1 and 6. = 1 for a.. Thus, (a, v OL v . . . \s J 3 J- 2 a ) (i v p v . . . v p ) =1 for a.. Therefore, we have A- v A p v . . . v A, ^ ( QL v CI s/ • ■ ■ v Ql ) ( P_ v (3 *• ■ • • v P ) . Let b be a true vector of (ql v Q p v . . . v Ct ) (p. v p. v • . . v a ). Then there must be an ql and a & (1 < k n < k, 1 < k Q < k) IS. & ± fig - J. - - d - such that Ct =1 and p =1 for b. *1 *2 If k, = k , then b is one of the vectors in S, i.e., b is a true vector of f. If k | k , then, from Lemma 2.3.1, a, > b > a . Since a and h9 a. are not separated from each other, b must be a true vector of f. Hence (a. v OL v . . . v a ) (p v 3 v . . . v & ) 5 f. Q.E.D. f f f Theorem 3.2.3 ; Let (M Q , M- , . . . , M p ) be the stratified structure of a Boolean function f . No pair of vectors in M . ( j = 0, 1, 2, . . . , J 2r) is separated from each other. Proof: a_ and a^ be two vectors in M n . , n (i = 0, 1, 2, . . ., r- l). 1 2 23.+1 ' Then a_ and a are true vectors of degree i. Suppose that a 1 /a 2 . (3.2.1) Since a p is of degree i, there are i true vectors, b_ , b , . . . , b., such that r^/by. . ./£ . (3.2.2) By (3-2.1) and (3.2.2), a./a./b./tJ, . ./b.. Thus the degree of a. — f is at least i + 1, a n cannot be in M_. , n . This is a contradiction. ' 1 2i + 1 Hence, a cannot be separated from a . Since M (i = 0, 1, 2, . . . , r) is a true cluster of f, a similar argument as above can be applied to prove that any two vectors f in M are not separated from each other. Q.E.D. Example 3° 2. 2 : Let me consider function f in Figure 3»2.1. We have Iq = {(0000), (0010), (0100)} [?• = {(0001), (1000), (0101), (1001), (0110), (1010)} [* = {(0011), (1100), (1011), (1101)} m; M M 50 > M FIGURE 3.2.1 A BOOLEAN FUNCTION FOR EXAMPLE 3-2.2 51 M^ = {(0111), (1110)} mJ = {(1111)} f f By Theorem 3.2.3, no pair of vectors in M or M is separated from each other. Then by Theorem 3.2.2, we have (x^x v x^c x^ ^ x x x 3 v x 2 x^ v X^ v * 2 \) (x^ v ^ V x 2 x^ ss x^ v x 2 x s/ x^O 5 f (3.2.3) f for set M. and (x 2 v x^) (x^x^ v x^X^) Cf (3.2.U) f for set M . Eliminating the redundant terms in (3.2.3) (this is equivalent to keeping in (3.2.3) only a-terms of the maximal vectors of M , and p-terms of the minimal vectors of M ), we get (XjXU v x^ V x^ v x 2 x^) (x 1 s/ x^ v x^) c f (3.2.5) By taking the disjunction of (3.2.U) and (3.2.5), the following relation is obtained: (^ v X^) (X £ X X^ sy X^gX ) v/ (X^ s/ XgX s/ X^X^ N/XgX^) (x i v X^ v X^ ) C f. (3-2.6) The disjunction of the minterms which correspond to all vectors in f f M U M implies the left-hand side of (3.2.6) because of Theorem 3.2.2. f f Since M U M includes all true vectors of f, (3.2.6) can be changed to equality, i.e., f = (x 1 v x^) (x 2 x x^ v x^x ) s, ( x ! x 3 v X 2 X 3 v x i\ v x 2 x^) (x ± s/ x^ v x g x ) . (3»2.7) 52 Using expressions g l = X 2 X 3 X U v x i x 2 x 3 (3.2.8) and g 2 = X l v \ v X 2 X 3 (3-2.9) Then, (3.2.7) may be rewritten as: f = (x ± V x^ v (x^ v x 2 x 3 v x^ v x 2 x^)i 2 = (X^ v g x ) ((X x v X 3 ) (Xg v/ X ) (X x v X^) (Xg v X^) v g 2 ) (3.2.10) From (3.2.8), (3.2.9) and (3.2.10), we find that g_, g g are negative functions of x_ , x , x and x. ; and f is a negative function of x , x , x , x, , g and g p . By Theorem 3.1.2, a two-level network realizing f has been constructed according to (3.2.8), (3.2.9) and (3.2.10), as shown in Figure 3.2.2, where there is a cell in the first level f f f for each of M and M . However, if the vectors in M. are attached true vectors, which is the case in the next example, then there is f no need for a cell in the first level for M _ . Example 3.2.3 : Let us consider function f in Figure 3.2.3. We have M^ = {(0000), (0001), (1000)} m 2 = ((0010), (0100), (0011), (1001), (1100)} M = {(0101), (0110), (1010), (0111), (1110)} m£ = {(1011), (1101)} M^ = {(1111)}. f f Since M is empty, all vectors in M. are attached true vectors of f. 53 x, nr X 2 " x 3 . V Q DD Q ! Hi] * 2 H[ X 3 HC ■ i M g- FIGUBE 3.2.2 TWO-LEVEL NETWORK FOR EXAMPLE 3-2.2 5U > M 1100 => M % ^0000 FIGUEE 3.2.3 A BOOLEAN FUNCTION FOR EXAMPLE 3.2.3 55 f By Theorem 3.2.1, we have for set M , (EjXgX Jx^ v x^x ^ XgX x^) c f . (3.2.11) Since Theorem 3.2.1 instead of Theorem 3*2.2 is used, p-terms are not included in the left-hand side of (3.2.11). Eliminating the redundant terms in (3.2.U), we get (xJXgXg v x 2 x x^_) Cf, (3.2.12) f f By Theorems 3.2.2 and 3.2.3, we have for M and M after eliminating the redundant terms: (x x s/ x^) (x £ x^ v x 2 x^ ss 3CjX«) 5 f • (3.2.13) 1 • (x^x x^) C f , (3-2.1U) For the same reason as in Example 3.2.2, we have from (3.2.12), (3. 2.13) and (3.2.1k): f = X^XgiL v x 2 x 3 x i! v ( x ! v x ]+) ^ X 2 X U v X 2 X 3 v X 1 X 3^ v X 1 X 2 X 3 X ^ (3.2.15) Using expressions s l = X 2 X U v X 2 X 3 v x l x 3 and s 2 * X 1 X 2 X 3 X ^(- ' then (3.2.15) can be rewritten as: f = X 1 X 2 X 3 v x 2 X 3 X if v ^ X l v X if ^1 v ^2 = ( x -]_ v x 2 v x 3 ) ( x 2 v x 3 v X L^ (§i v X i x if^ s 2 Thus a two-level MOS network for f can be constructed accordingly as shown in Figure 3.2.J+. There is a cell in the first level for each f f of M and M . However, because p-terms are not included in the left-hand side of (3.2.11), there is no cell in the first level for f the attached true vectors, i.e., M_ . 56 x.. Xi FIGURE 3.2.U TWO- LEVEL NETWORK FOR EXAMPLE 3-2.3 57 As illustrated in Examples 3»2.2 and 3-2.3, we can have the following algorithm to synthesize a two-level network for a given function. Algorithm 3«2.1 : f f f Step 1 ; Obtain the stratified structure (M , M , . . . , M„ ), of a given Boolean function f . f f Step 2 : Check whether M is empty. If it is, then mark M as the f f f set of attached true vectors and M,, M PI . . ,. M„ n , 3 5 2r - 1 ' f f the sets of detached true vectors. Otherwise, all M , M , f . . . , M _, n are sets of detached true vectors. 7 2r - 1 f Step 3 ' For each set of detached true vectors, M_. n , construct a first level cell whose output is specified as: i (p i,l v P i,2 - • • ' - % t± ) ^re P±A , 3.^, . . ., p. , are the p-terms of all the minimum vectors in ' i Step 4 : Construct the output cell (second-level cell) according to the following expression of f. f = ( v a. , v a. « v . , . v a. ) g. ) v ft where a. .., a. _,..., a. are a-terms of all the i,l i,2 1,0^ f maximum vectors in M n _ , and 2i - 1 f CL . vOL . v ( . • v QL if the vectors in M. ±,1 i-,2 l,q 1 n = are attached. f s. (cl - v cl p v . . . v cc ) g if the vectors in M 1 are detached. 58 Theorem 3.2.4 ; The two-level network obtained by Algorithm 3.2.1 realizes Boolean function f . Proof : As illustrated in Examples 3.2.2 and 3.2.3, this theorem is obvious by Theorems 3. 2.1, 3«2.2, and 3*2. 3. Q.E.D. Theorem 3.2.5: Assume a. , a., .... a are detached true vectors - 12' ' e of f, and a. /a.J . . ./a . Then there are at least e cells in the first level of any two-level network that realizes f„ Proof ; Suppose that f is realized by a two-level network as in Figure 3-l»3« Then f can be written as: f = P v P l S ll g 12 ' ' * g l qi v P 2 g 21 g 22 * ' ' g 2q2 ^ ' ' ' v P ^ g il g i2* * * & £q £ > (3.2.16) where g.. e {g , g , . . ., g, ) and P. is a product of complemented ji ± d k j literals. (Note that P„, P_ , . . ., P., g_ , g p , . . . , g, are negative functions. ) Since a_ , a_, .... a are detached and a. /a. /. . ./a , V 2' ' e j-J j 2 ' ' e ' there are false vectors b n , b_, . . . , b such that a_ > b n > a_ > 1' 2' ' e 112 b^ > . . o > a > b . Since a., is a true vector of f , there must be 2 e e 1 ' a term, P. g. -, g. p . . . g. , which equals 1 for a , in (3.2.16) x ± i-^l 1.^ i 1 q 1 1 Consequently, X l 1 1 1 X l 2 g. =1 for a_ . X l\ 1 (3.2.17) Since P. is a negative function and a n > b_ , P. =1 for b., . However, X l 11^1' 59 t> is a false vector of f. Therefore, there is at least one function, g. ., , such that g. , = for b_ in order to assure that P. g. , g. . , , x l d \* 1 x l ^l 1 x l 2 ' g =0 for b n . Since g. , is a positive function and b_ > a,_ > \\ 1 X l d 1 2 a. > . . • > a , we have 3 e g d = for a 2 , a , . . . , a g . (3-2.18) Summarizing (3. 2.17) and (3.2.18), g d = 1 for a and g. = for 2' y ' e Similarly, we can prove that for any a , there exists a function i such that I = 1 for ^ and g = for ^, +1 fl , a t + 2 ,d' " '' a . . Since g. ,. g. ,, . . . , g. , are all different and not trivial e,d i,d' ipd 7 i d functions'* (because each of them is 1 for b. and for a.), there are at least e cells in the first level of the network. Q.E.D. Theorem 3*2.6 ; Given a Boolean function f, the two-level network obtained by Algorithm 3*2.1 consists of a minimum number of cells. Proof ; Let us divide the proof into two cases. f 1. When M Q is empty. f f f Then M.. is the set of attached true vectors, and M _ , M ,_ , . . ., f M ? .. are sets of detached true vectors. Then, by part (b) of Theorem 2.2.3, there are detached true vectors, a.,, a_, . . ., a _ such that ' ' 1' 2' ' r - 1 a. € M_. _ for each i and a _/a /. . ./a_ . By Theorem 3* 2. 5, l 21+3, r-1 r-2 7 ' 1 J " there are at least r - 1 cells in the first level of any two-level network realizing f. Functions, x , x p , . . . , x , 0, and 1 are considered here as trivial functions. 60 Algorithm 3*2.1, yields exactly r- 1 cells in the first level of the constructed network. Hence the network consists of a minimum number of cells. f 2. When M_ is non-empty. f f f Then M. , M. , . . ., M ? , are sets of detached true vectors. Ey part (b) of Theorem 2.2.3, there are detached true vectors, a , a , .... a _ such that a. € M . , n and a ./a _/• • •/ a -^ . ' r - 1 i 2i+l r - 1' r - 2 / ' By Theorem 3*2.5* there are at least r cells in the first level of any two- level network realizing f . The network generated by Algorithm 3*2.1 consists of exactly r cells. Hence the network consists of a minimum number of cells. Q.E.D. Theorems 3.2. k and 3.2.6 assert that the two-level network generated by Algorithm 3*2.1 is an optimal network. Furthermore, the following corollary can be derived directly from Algorithm 3*2.1. f f f Corollary 3° 2.1 : Let (M Q , M , . . . , M ) be the stratified structure of a Boolean function f . Any optimal two-level network for f f consists of r - 1 cells in the first level, if M. is empty; and f r cells, if M. is not empty. In the following, an alternative algorithm to synthesize a two- level network will be presented based on the complement of a given Boolean function. f f f f By Corollary 2.2.1, M_ , M p , M. , . . * , M ? consist of all the false vectors of f, i.e., all the true vectors of f. By considering f f f - M_,M, . . ., M ? as sets of true vectors of f, the following theorem can be obtained as Theorem 3*2.1. 61 Theorem 3.2.7 : Let a o > a o o' * • ' » a o be a11 " fche vectors ^r,J. c:r,£ ^r,qp^ f in M ^ of f . Let 8^ . and A_ . be the B-term and the minterm of 2r 2r,i 2r,i a . (1 < i < qp ) respectively. Then A~ n v A^ v . . . v A^ c 3o -i^Pr-, ft v • » • v B c f « 2r,l 2r,2 2r ^2r " 2r,]L r ' r ' q 2r " Example 3.2.4 : Let us consider the same function as that in Example 3.2.2, i.e., the function in Figure 3-2.1. In this example, a two- level MOS network is constructed for f based on the false clusters of f instead of the true clusters. f By Theorem 3° 2. 7, we get from M, 1 • (x^x^) Cf. (3.2.19) By Theorem 3.2.2 and 3.2.3, the following relations are generated f f from M p and M„ after eliminating redundant terms: (x 2 ss x ) (x x^ v x^) c f (3-2.20) (*lV% v *i* 3 *lP ' 1 5 f (3.2.21) Taking the disjunction of (3.2.19), (3.2.20) and (3.2.21), we get from Theorems 3.2.2 and 3-2.7 f = x^x x^ v (x 2 v/ x ) (x_x^ ^ x ! x 2 ) v Y^ v ^1*3*1+ ' (3.2.22) Using expressions g-L = x 2 v x and gp = X_XftX^ ^ x_x x^ , then (3.2.22) can be rewritten as: f = x 1 x 2 X 3 x l f v S^ 3 ^^ v x i x 2^ v s 2 Hence, according to the expressions of f, g and g , a two-level MOS network is constructed as shown in Figure 3.2.5. 62 FIGUEE 3.2.5 TWO- LEVEL NETWORK FOR EXAMPLE %.2,k 63 By Corollary 3.2.1, an optimal two-level network of f should consist of two cells in the first level. This is exactly the case of the network in Figure 3.2.5. Therefore, the network in Figure 3.2.5 is an optimal two-level MOS network for f. For function f considered in Examples 3*2.2 and $.2,k, the network in Figure 3.2.5 consists of less FET's than the one in Figure 3.2.2. However, for other functions networks produced by Algorithm 3.2.1 may consist of less FET's than those produced by the algorithm illustrated in Example 3.2.1+, i.e., the following Algorithm 3.2.2. The network in Figure 3-2.5 consists of a first-level cell for f f f each of the set M^ , M _ , . . . , M _/ n x . No first-level cell for 0' 2' ' 2(r - 1; f M is necessary. With this fact in mind, we can develop the follow- ing algorithm for the synthesis of optimal two-level networks. Algorithm 3-2.2 : f f f Step 1: Obtain the stratified structure (M« . M n , . . . , M^ ) for ' x ' 2r a given Boolean function f. f f f f Step 2 : For each non-empty set of M , M , M, , . . . , M , >., construct a first-level cell* whose output function is specified by: g. = a. .. ss a. v . . . v a. where a. n , a. ni 1 i,l i,2 i,q t 1,1' 1,2' are the a- terms of all the minimal vectors in M 2i« * « - „ „ .. , „f By Lemma 2.2.1, only M n may be empty. Therefore, there are f f r - 1 or r cells in the first level depending on whether M is empty or not. Step 3 < 6k Construct the output cell according to the following expression of f: i =0 (P 2r,l v P 2r,2 v • • • v *2r,tJ (3-2.23) where 3. .., P. Q , * . ., 3. , are the 3-terms of all the f f f minimal vectors in M„. . If M A , or M. , is empty, the 2i ' 2r ' * * ' corresponding term does not appear in (3.2.23). Theorem 3*2.8 ; Given a Boolean function f, the two-level network obtained by Algorithm 3*2.2 realizes f and consists of a minimum number of cells. Proof ; As illustrated in Example 3*2.^, (3.2.23) is true. Hence the two-level network obtained by Algorithm 3*2.2 realizes f. By step 2 of Algorithm 3*2.2, there are r- 1 cells in the first f f level if M. is empty, and r cells if M is not empty. By Corollary 3*2.1, the network obtained by Algorithm 3*2.2 is an optimal network. Q.E.D. 3*3* Upper Bound on the Number of Cells Required in a Two-level MPS Network By Corollary 3*2.1, an optimal two-level network for a given Boolean function f consists of either r - 1 or r cells in the first f level depending upon whether M_ is empty or not. Since r is the number of true clusters of function f , the upper bound on the number of cells required can be calculated if the upper bound on the number of true clusters is known. 65 By Theorem 2.1.1, a Boolean function f of n variables can have at most , — | + 1 true clusters, i.e. , r < , - . + 1. By Corollary 3.2.1, an optimal two-level network of f has at most r cells in the first level. Since there is one cell in the second level, the total number of cells is at most r + 1 < ,ri +2. However n , if n is an even number, and r = .-^ + 1, then, by Corollary 2.1.1, = (0, 0, . . . , 0) is a true vector, i.e., M is empty. Thus, there are at most r-1 cells in the first level. Consequently, the total number of cells is at most r < , - . +1. Table 3. 3.1 summarizes the above discussion and lists the upper bound on the number of cells required to realize functions of up through 20 variables. n Upper Bound on the Number of Cells Required to Realize Any Function of n Variables 1 1 2 2 3,* 3 5,6 k 7,8 5 9,10 6 11 , 12 7 13,1^ 8 15 , 16 9 17,18 10 19, 20 11 TABLE 3-3.1 UPPER BOUND ON THE NUMBER OF CELLS IN TWO- LEVEL M0S NETWORKS 66 CHAPTER 4. SYNTHESIS OF OPTIMAL FEED-FORWARD MOS NETWORKS 4.1. Introduction A model of a feed-forward MOS network is shown in Figure 4.1.1 where each cell is allowed to feed only cells to its right but not those to its left. It is well known that any network which does not contain any loops is a feed-forward network,, In this chapter, we will consider the problem of synthesizing, for a given Boolean function, a feed-forward MOS network which consists of a minimum number of cells — an optimal feed-forward MPS network . Let the output functions of cells in a feed-forward MOS network be g_ , g p , . . . , g as shown in Figure 4.1.1. "Each g. (1 < j < T) is a negative function of J x 1 , x g , . . ., x n and g^ g g , . . . , g ^ . (4.1.1) Hence, by Theorem 3-1.2, the problem of synthesizing an optimal feed- forward MOS network for a given function f is a searching for a minimum number of functions, g , g , . . . , g , such that g. (1 < j < T) satisfies (4.1.1) and g_ equals f. In Section 4.2, a special class of Boolean functions — stratified functions of a Boolean function — is introduced. We will prove that there is always an optimal feed-forward MOS network for a given function f such that all output functions of the cells are stratified functions of f . An algorithm to obtain a minimum number of stratified functions of f, which satisfies (4.1.1), is given in Section 4.3. Then, how to construct an MOS network for a set of stratified functions satisfying 67 FIGURE i+.l.l A MODEL OF FEED-FORWARD MOS NETWORKS 68 (4.1.1) is discussed in Section 4.4. Since there are usually more than one optimal feed-forward MOS network for a given function f, some ideas to obtain optimal feed-forward MOS networks with fewer FET's are given in Section 4.5. In Section 4.6, upper bounds on the number of cells required in a feed-forward MOS network are derived for functions of up through twenty variables. Finally, in Section 4.7, we will discuss how many levels are required in an optimal feed-forward MOS network. 4.2. Stratified Functions of a Boolean Function f f f Definition 4.2.1 : Let (M , M . , . . . , M ? ) be the stratified structure of a Boolean function f. A function g is called a stratified function of f if g has the same value (l or 0) for all the input vectors in the f f same M. (i = 0, 1, 2, . . . , 2r). The notation g(M . ) denotes the f value of g for the input vectors in M . . Example 4.2.1 : The stratified structure of the function f in Figure 4.2.1 (a) is (Mq, M , Mg, M^ ) where Mq = (000, 100) M^ = (001, 010, 110) Mg = (011, 101) M^ = (111) . Let the functions in Figures 4.2.1 (b), 4.2.1 (c) and 4.2.1 (d) be g.. , g , g respectively. Then g is a stratified function of f because g_ f f equals 1 for all the vectors in M and M , and for all the vectors f f in M and M . Similarly, g p is another stratified function of f . However, g is not a stratified function of f because g equals 1 for 69 no 100 (d) g. FIGURE U.2.1 STRATIFIED FUNCTIONS VERSUS NON- STRATIFIED FUNCTIONS 70 (Oil) and for (101), whereas both (Oil) and (101) are in M. . Further- more, function f is a stratified function of itself. As shown in the above example, there is more than one stratified function for a Boolean function f. They form a special class of functions which will be used to synthesize optimal feed-forward MOS networks for function f. In the following, a few of their properties are described. The following lemma is an obvious consequence of Definition 4.2.1. Lemma 4.2.1 : Let g , g , . . . , g be stratified functions of a Boolean function f, and G(x _, x , . . ., x. ) be an arbitrary Boolean function. Then G(g n , g , . . ., g, ) is a stratified function of f. Lemma kc 2. 2 ; Let g be a stratified function of f . If g(M . _ ) =}= g( M f) -g(Mj +1 ) -■• . . =g(M- +k ) t«*J +k+1 ) ' then M i U f f e M. ., U...UM. . is an M » which is a cluster in the stratified l +1 l +k Xi structure of g. ■p "P f Proof: Let us first assume that g(M . 1 ) = g(M . . n ) = and g(M . ) = 1 — 1. l + K+J - 1 - f f g(M . )=...= g(M . ) = 1. Then we will prove that the set, f f f ~~ * ~ * S = M U M U...UM. . , is a true cluster of g. Let a and b i i + 1 i + k be two input vectors of S. Then, both a and b are true vectors of g. Assume that the degrees of a and b with respect to g are d and d g respec- tively, and d > d . Since a is of degree d , there must be false vectors of g, el,, a , . . ., a 2d _ j, and true vectors of g, a g , a^, . . ., a_, , such that a > a n > a^ > . . . > a^ n . Let a. £ U n for 3=1, 2d ' 12 2d n j I. ' 1 1 J _ 2, . . . , 2d . Then, by part (a) of Theorem 2.2.3, we have i > & > 71 £ > . . . > £ (The first inequality is due to the fact that any vector in M ,, is not greater than any vector in S. ). Since g(a.) \ J equals for an odd j, and 1 for an even j, and since g is a stratified function of f, i 4 £ ± 4 & 2 k • • • 4 ^ 2 <3 > i ' e *' i > \ > ^2 > ' * * > ^2d Since b is in M . for j > i, by part (b) of Theorem 2.2.3, there exists J a vector b . for each set M „ (1 < j < 2d n ) such that b > b n > b_ > j x . — — 1 12 J . . . > b . Since b. (l< j < 2d,) and a. belong to the same set, M g , 2d.. j — — J. j so and g is a stratified function of f, b_ , b_, . . ., b rt , -, are false '13 2d, - 1 vectors of g, and b , b. , . . ., b„ are true vectors of g. Thus b is of at least degree d with respect to g. However, since we have assumed the degree of b is d which is smaller than d , we have reached a con- tradiction. That is, a and b must be of the same degree. Therefore, we have proven that all the vectors in S are of the same degree with respect to g. In order to prove S is a true cluster of g, we have to prove that all the true vectors of g, which are not in S, are not of the same degree as the vectors in S. ~* _» f Let c be a true vector of g, which is not in S. Assume c £ M t where t > i + k + 1. Then, by part (b) of Theorem 2.2.3, there must -* f -* — be a vector d € M . . , such that c > d. Furthermore, there must be i +k +1 ' a vector e € M . , . c S such that c > d > e. Since d £ M . , , , d is i +K — i +k +1 ' a false vector of g. Hence c is separated from e. In other words, c cannot be of the same degree as e. Similarly, we can show that the true f vectors in M for t < i - 1 cannot be of the same degree as the vectors in S. Hence S is a true cluster of e. 72 f f f Secondly, let us assume g(M . n ) = g(M . ) =1 and g(M, ) = X — J. l+K+J. X g(M i+1 )=...= g(M i+k )=...= g(M i+k ) = 0. Then we will prove that S is a flase cluster of g. From a discussion similar to the above, we know that there are two true clusters of g, M^ and M ^ p , f g f f such that M . . is a subset of M ^ and M . , _ is a subset of M _ . X - J. Xi X -r K + _L 10 + c. cr By Theorem 2.2.2, all the vectors whxch are not xn M^ , and greater 2r _ cr f rr than at least one vector in M ,-, are in U M . . (Because M „ is I 3 I f f f M. . UM. _ U . . . U M. for certain q . ) By Theorem 2.2.3, x-1 x-2 l-q * / * cr all the vectors which are not inM, , and not greater than any of i +k „ cr I . . the vectors in M , p are in U M . . Then, by rule (ii) of 2r f i+k „ i+k „ Definition 2.2.1, K S B = ( U M.)n( U M.)= U M . = S. U1 d=i J j=0 J j=i J That is, S is a false cluster of g. Q.E.D. f f f Example 4.2.2 ; Let (M , M , . . . , M^ ) be the stratified structure of a Boolean function f , and g be a stratified function of f such that g(M^ ) = g(M^ ) = g(Mg ) = 1, g(M^ ) = 0, g(M I ) = 1 and g(M^ ) = f g(M^- ) = 0. Then, by Lemma 4.2.2, we know that the stratified structure n/r g mo ^ t.vu^.*,^ n/r g _ n/r -*- m r/r -*- i i i/r * »/r g »«• ^ of g is (M° , M| , M° , M| ) where MJ = M^ UmJ U M^ , M| = M* g f e f f M° = M , , and Mf =M C U M 7- 3 h ' h 5 6 f Lemma 4.2.3 : Let g be a stratified function of f. If M^ = M . U M f . U . . . U M f , _ , then ^ = £ f . x +1 x +k ' b £ b i 73 f f Proof : £ . =1 for every M . for j > i be definition, and for •*- J f fa others. So does t, » . Thus £ = £^. Q.E.D. Theorem U.2.1 : There always exists a feed-forward MOS network with a minimum number of cells, realizing a given function f such that the output functions of all cells in the network are stratified functions of f. Proof : Let the minimum number of cells required to realize f by a feed-forward MOS network be T. Let h , h , . . . , h be the output functions of the cells in an optimal network realizing f . Then h . J (l < j < T) must be a negative function of x , x , . . . , x and h_ , h^, . . ., h. .. . However, h. may not be a stratified function 12' j - 1 J of f. -*■ f Let a. € M . (0 < j < 2r) such that J J - - a Q < a 1 < a 2 < . . . < a^ (U.2.1) Now let us construct T stratified functions of f as follows g.(M^) = h (a ) j = 0, 1, 2, . . ., 2r and i = 1, 2, . . ., T- 1 g T = \ = f (U.2.2) Then we will prove that there is a feed-forward MOS network with T cells such that the output functions of the cells are g , g , . . ., g . Let d|£M| and d € M such that d« > d and g. (d J = 1 > = g.(d ). Since d . > d , I > k by part (a) of Theorem 2.2.3. Hence a i > a k because of (^«2.l). Since g. (d J = g. (M » ) = h. (a*) and g i (d k ) = g i (M k ) = h i (a k ) ' We have h i (a i ) = ! > ° = h i(\) • Since h. is a negative function of x_ , x_, . . ., x and h , h , . . . , h. _, there exists h. (a J = < 1 = h (a ) by Corollary 3-1.1 where 1 < t < i - 1. Then, by (4.2.2), g t (d^) = g t (M^ ) = \(*j) = < 1 = h t^\^ = g t^ M k ^ = g t^ d k^* Therefore ^ again by Corollary 3.1.1, g i is a negative function of x , x , . . ., x and g., g , . . ., g. . Q.E.D. Theorem 4.2.2 ; There always exists a feed-forward MOS network with a minimum number of connections among cells, realizing a given function f such that the output functions of all cells are stratified functions of f. Proof : Suppose the number of cells in a network which realizes f and consists of a minimum number of connections among cells is T. Let h , h , . . . , h be the output functions of cells in the network. Then, we can replace h , h , . . . , h by g , g , . . . , g without changing interconnections in the same way as the proof of Theorem 4.2.1. Q.E.D. From Theorems 4.2.1 and 4.2.2, we can conclude that when we want to synthesize a feed-forward MOS network with a minimum number of either cells or connections among cells, only stratified functions of the function to be realized may be considered. From Definition 4.2.1, a stratified function g of f is completely specified if all the values f f f of g(M ), g(M ),..., g(M p ) are specified. Hence a simplified table as defined below may be used to represent a set of stratified functions of f. 75 Definition U.2.2 : Let g , g , . . . , g be a set of stratified functions ■* f of a given function f . A stratified truth table (abbreviated as STT ) with g. , g p , . . . , g_ is defined as the table in Figure ^.2.2 (a) f f where the entry at row M . and column j is g.(M . ). In the table, the f f rows are named M to M p upward from the bottom, and columns, 1 to T f f from left to right. M Q and M may be empty. If they are empty, then f f f row M_ and row M_ are not included in the STT . 2r Figure J+.2.2 (b) is an example of an STT in which function g_ f f equals 1 in row M . for an odd i, and in row M . for an even i. Hence g equals f according to Corollary 2.2.1. Definition k.2.3 : Let g_ , g p , . . . , g T be stratified functions of a f Boolean function f . The STT for g.. , g p , . . . , g is called a realiz - able stratified truth table (abbreviated as RSTT ) if there exists a feed-forward MOS network with T cells whose outputs are g_ , g p , . . . , g as shown in Figure ^-.1.1. The problem of synthesizing an optimal feed-forward MOS network f for a given function f now means construction of an JRSTT with a minimum number of columns where the function specified by the last f column equals f, i.e., construction of an optimal RSTT . An algorithm f for constructing such RSTT ' s will be described in the next section. k.3. Construction of an Optimal Realizable Stratified Truth Table Definition U.3.1 : Let e. . represent the entry in row M . and column f in an STT . Two adjacent entries, e. , , . and e. .in the same ' i+l, J 1, j - ^ The superscript in the notation STT indicates that the stratified truth table is constructed for f. Row M 2r Row M Row M Row M o o H hKr > Si< m o' O O H ; 2 (M^ r ) g 2 (Mg) g 2 (M^ ) g 2 (Mj) o O 3 T 'T (M 2r ) (a) Stratified Truth Table 76 % g 2 g 3 "J M 3 1 4 1 4 1 1 < 1 (b) Example FIGURE U.2.2 STRATIFIED TRUTH TABLE 77 column are called an inverse pair if e . = 1 and e. . = 0. They 1 + J-jJ i,J are called a regular pair if e. , . = and e. . = 1. — - i + l, J i,J The following lemma is an immediate consequence of the definitions of the inverse pair and regular pair. Lemma 4.3.1 : Suppose there are k inverse pairs and k regular pairs in a Boolean function f. Then |k - k | < 1. Lemma 4.3-2 : Let g be a stratified function of f . If there are k inverse pairs (or regular pairs) in column q for g in STT , then there are k inverse pairs (or regular pairs) in g in STT . Proof : The illustration by the following example would be sufficient to show this lemma. Let g be specified by the STT in Figure k. 3-1 (a) ■p In this STT , (e..-,, e ) and (e, , e ) are two regular pairs, and (e-,-,, e... ) and (e^, e ) are two inverse pairs. By Lemma 4.2.2, we have the stratified structure of g, (M!? , M^ , . . . , M^ ) where M:? = ffsffsfffff af M Q U M 2 , M | =M 2 UMM° = M jj , M £ =M^ U M^, and M° = M ^ U f g M o . Then g is specified by a column in the STT as shown in Figure 4.3.1 (b). There are two inverse and tow regular pairs in the column of the STT g . Q.E.D. Theorem 4.3.1 : Assume that an STT with g , g , . . . , g is given. f f The STT is an RSTT if and only if, for every inverse pair (e. . , e. , _ .), there exists a regular pair, (e. „ . e. -, n) such that 1 + 1,0 !,<£ 1+1,^ I < J M 8 M g 78 M' M 6 M M 1 M 1 ( K m: M M M' r M N M 1 M M g M° 1 (a) (b) FIGURE 4.3.1 AN EXAMPLE FOR LEMMA 4.3-2 79 Proof ; Let us first prove the "only if" part of this theorem. Assume f f the STT is an RSTT . Then, g. (l < j < T) is a negative function J of x^ x 2 , . . ., x n and g^ %, . . ., g . _ r Let (e_, e. + ^.) be an inverse pair. Then we have g.(a_) =0 and g.(a p ) = 1 for "* f -* f w. — a € M . and a p e M . such that a < a . By Corollary 3«1«1> there must be a g „ (l < I < j) such that g^ 3 --,) = 1 and g/?( a 2 ) = °* That is, e. fl = 1 and e. _ n = 0. Hence (e. „, e. . J is a regular ' i,l 1+1, Jo 1,1 i+l,* pair. Conversely, let us prove the "if" part of this theorem. Assume that for every inverse pair (e. . , e. , n .), there exists a regular i,y i + l,j y ' pair (e. g , e. ) such that I < j. Let a and a be two input 1,Xj1-\-1,Xj X. C- vectors such that a < a , g.(a ) = and g.(a ) = 1. Suppose a 6 f -* f "* -* M , and a^ e M . Then e_,_ . = and e . = 1. Since a_ < a n , t < q t 2 q tj qj 1 2' H by part (a) of Theorem 2.2.3. Since e. . = 0, e . = 1 and t < q, there tj" qj must be an inverse pair (e. . , e. , _ .) such that t < i_ < i, + 1 < q. * v l ,j' i +l,j' - 1 1 - H Then, by the assumption, there must be a regular pair (e. . , e. -, . ) v j i i x +1 'V such that j, < j, e. . =1 and e. _ . =0. If e, . = e . or if 1 V J 1 1 1 + 1,J 1 t > 3 l q ' J l e =0 and e = 1, there must be an inverse pair (e. . , e. _ . ) "^>^2. ^-'^l 1 2 , ^1 1 2 "*" *^1 such that t < i p < i p + l < q. Then, by repeating the above argument, there must eventually be a regular pair (e. . , e. , . ) such that vV 1 k +1 ^\ e t,j k = 2 and e q,j k =0f ° rt - ' (log 2 (D +l) )' +1 . Q.E.D. 81 f Definition U.3.2 ; Given an STT for g_ , g 2 , . . . , g T , the characteristic T f f T - i number of row M . is defined as X . = Z g.(M . ) X 2 , which is x X j =1 J X f the decimal value of the binary number represented by row M . . The following theorem and algorithm are similar to Lemma 1 and Algorighm 1 in [32]. f f Theorem lj-,3.2 ; An STT for g , gg, . . . , gj is an RSTT if and only if X. > X, for any i < k. i k Proof ; Let us first assume X. > K for any i < k. Suppose (e. ., e. ) 1 K X, J X + 1, J f is an inverse pair in column j of the STT . Since X. > X. _ , there x 1 + 1 must be a regular pair (e. , e. .) for i < j. By Theorem k.3'1, X, i/ X + X j -v f f the STT is an RSTT . f f Conversely, assume that the STT is an RSTT . Then by Theorem U.3.1, for any inverse pair (e. . , e. _ .), there exists a regular ' * i,J i+l,a pair (e. B , e. -) such that I < j. Hence X. > \. for any i. That X«AX~r_L^,C' 1 X ~r JL is, \. > X. for any i < k. Q.E.D. In the following, we will describe an algorithm, based on Theorem f U.3.2, to construct an RSTT which represents an optimal feed-forward MOS network realizing the given function f. Algorithm 4.3.1 : Assume that there are D inverse pairs in a Boolean function f. Let T = r (logg (D + l)) 1 +1. Then, an STT with g , g , . . . , g is constructed in the following way: Step 1 : Set g (M . ) (0 < i < 2r)* to 1 if i is an odd integer, and to if i is an even integer. f f If M Q orM^ is empty, then the corresponding row is deleted from the STT f 82 f f Step 2 : Assign or 1 to each g.(M . ) such that, if (g.. (M ), ^ M lt^ f f f • * '> g T-l^ M 2t^ and ^ g l^ M 2t-l^ g 2^ M 2t-l^ * ' *' g m _ (M_, _)) represent binary numbers £., L and I , T - J. dt - i. j k m then I. < L < I . J k - m Notice that step 2 will be referred to as an assignment henceforth. f f f f Example U.3.1 : Let (M , M , . . . , M,-) (i.e., M n is empty) be the stratified structure of a given function f . Let us follow Algorithm f 4.3'1 to construct an STT . From the stratified structure of f, there r . , . . 1 are two inverse pairs in f, i.e., D = 2. Hence T = (logp(D + l)) +1 = 3* Step 1: Set g^M^ ) = g (M^ ) = g^M^ ) = 1 and g^M^ ) = g (M J ) = g (M/- ) =0. Then according to Corollary 2.2.1, g = f. f f Step 2: Let (g, (M . ), g p (M . )) be assigned to I. where £. e {00, 01, 10, 11}. Then, because of the condition, we have l 1 >i 2 >£ 3 >J^>£ 5 > & 6 . (4.3.1) If we set L = l n = 10, |_ = L = 01 and I- = £s = 00, 1 2 ' 3 4 5 o then condition (4.3.1) is satisfied. The resulting RSTT is shown in Figure 4.3.2 (a). If we set I = S> 2 = 11, & = 10, L = 01 and I = s = 00, condition (4.3.1) is again satisfied. The result- ing RSTT is shown in Figure 4.3.2 (b). As shown in Example 4. 3«1- usually more than one STT can be obtained by making different assignments in step 2 of Algorithm U.S.I* All of f f these STT • s, as proved in the next theorem, are RSTT ' s which represent different optimal feed-forward M0S networks which realize f. 1 83 S l g 2 g 3 s l s 2 s 3 m5 M^ M^ 1 M^ 1 5 5 M? 10 k M^ Oil 3 Mg 10 M? 10 1 1 -5 i M ' l 1 »S l 1 -i i 1 1 » (b) FIGURE 4.3-2 EXAMPLES OF THE STT f OBTAINED BY ALGORITHM k. 3.1. 84 f f Theorem 4.3.3 : The STT obtained by Algorithm 4.3.1 is an RSTT which represents an optimal feed-forward MOS network realizing f. Proof : Let us first prove that it is always possible to construct an f f STT by Algorithm 4.3-1. Assume M n is not empty. Since there are f f D inverse pairs in f, the stratified structure of f is (M n , M - , . . . , ■f* ~P "f* ~f* "P M 2D-1' M 2D )' Su PP° se (Sl( M i )' S 2^ M i ^ ' ' '* g T-l^ M i ^ is assigned to I. in step 2 of algorithm 4.3.1. Then by the condition in step 2, we have & > \ - & 2 > Z 3 - \ > ' ' ' > £ 2D-1 - £ 2D ' (^-3.2) Because of (4.3.2), at least D + 1 different i.'s are required. Since T - 1 i.'s are binary numbers of T-l bits, there are 2 different i.'s. r , . . . i Since T = r (logg (D +l) ^ + 1, 2 T " 1 = 2 K lo S 2 {^ + l)) >D + 1# Hence f we have enough 1's. That is, it is possible to construct an STT by Algorithm 4.3.1. The case when M~ is empty can be similarly proved. f f Secondly, let us prove that the STT is an RSTT which represents an optimal feed-forward MOS network realizing f. The characteristic number of row M . (0 < i < 2r) is 1 — — \. = 2X I. + gtp (M f ). 1 1 T 1 Then we have \_. > \_. _ because iL. > iL. , ; and \_. , > \_. 2j 2j + 1 2j 2j + 1' 2j - 1 2j f f because i _ 1 > i and g T (M 2 . _ x ) = 1 > = g T (M 2 . ). Hence, we have A.. > \. for any i > j. Then, by Theorem 4.3.2, the STT is an RSTT f . Since there are D inverse pairs in f, there are at least T = (logp (D + l)) +1 cells in any feed-forward MOS network realizing 85 f f by Corollary ^.3«2. There are T columns in the RSTT which represent f the outputs of these cells. Thus, this RSTT represents an optimal feed-forward MOS network realizing f. Q.E.D. Corollary 4.3»3 « Assume that there are D inverse pairs in a Boolean function f. The number of cells in an optimal feed-forward MOS network realizing f is (logp (D + l)) 4-1. k.k. Synthesis of a Feed-forward MOS Network from a Realizable Stratified Truth Table An algorithm has been presented in the previous section to construct f an RSTT . However, in order to construct a feed-forward MOS network f for functions, g., , g p , . . ., g„, specified by an RSTT , a Boolean expression without uncomplemented literals of x , x , . . ., x and g , g , . . ., g. must be obtained for g. (1 < j < T). In this section, we will present an algorithm to generate these expressions. f Definition ^.4.1: Let e. . be a zero-entry in row M. and column j in f f an RSTT . Row M n is said to be the blocking row of e. . xf k is the k - ij largest integer smaller than, or equal to, i such that (a) e =1 and k - J-,,] (b) There exists no I < i such that e. n = 1 and e, n „ = 0. i# k - 1,£ If there is no k smaller than or equal to i, which satisfies conditions (a) and (b), the blocking row of e. . is defined as the last row of the f f RSTT , i.e., row M with the smallest integer k. f Example 4.^.1 : Figure k.k.l shows an RSTT . e, „ is a zero-entry. The only one-entries below e, are e and e . For e , e, = 1 and h g h 86 M M M M M M M H '25 110 1 1 1 1 1 ( o J FIGURE k.k.l AN RSTT FOR EXAMPI£ k.k.l 87 e = 0. Hence condition (b) in Definition k.k.l is violated. For e_ , there is no I < 3 such that e. « = 1 and e Q n = 0. Therefore, the f blocking row of e. - is row M . Consider another zero-entry e„. The only one- entry below e oc _ is f e lt -. However, row M cannot be a blocking row of e p K because e = 1 and e n =0. Therefore, there is no integer smaller than, or equal to 2 such that condition (a) and (b) are satisfied. Hence the blocking f f row of e is row M , i.e., the last row of the RSTT . Similarly, f the blocking row of e is row M . Definition k.k.2: Let e. . be a zero-entry in row M . and column j in ij i f f an RSTT , and row M be its blocking row. A product, g. g. . . . g. k J l J 2 V is called a prohibiting product of e. . if (a) j- < 3 2 < • • • < J < d (b) e. . = e. . = . . . = e. . =1 (c) For each i > k such that e*. =1, there is t £ {j_, j p , . . ., j } such that e „, = s i/t (d) If any of g. , g .,..., g . is deleted from the product, J l J 2 J s then condition (c) is no longer satisfied. f If column j has no one-entry above row M, n , then function 1 is defined k - 1 ' as the prohibiting product of e. .. Note that a prohibiting product of a zero-entry is not unique as illustrated in Example k.k.2. ■p Example k.k.2 : Let us consider the RSTT in Figure k.k.l again. As ■p shown in Example k.k.l. the blocking row of zero-entry e„ is row M~ . O 88 Then g n So is a prohibiting product of e because (a) 1 < 3 < 5 (b) e 21 = e 2 3 = ± (c) For the one-entries — e_._, e__, e_,_ and e. _ — above row M^ 75 55 35 15 (including row M_ ) in column k, we have e„_ = e.__ = e 00 = u (3 51 33 e 31 = 0. (d) If either g_ or g is deleted from the product, condition (c) is violated. Similarly, we can show that gngj, is another prohibiting product of e . However, even if conditions (a), (b) and (c) are satisfied, g-jgogj. is no "t a prohibiting product of e because condition (c) is still satisfied after deleting either g_ or g, from the product. f For zero-entry e._ , its blocking row is row M ,_ . Since column 2 52 5 f has no one-entry above row M. , function 1 is defined as the prohibiting product of e_ . 5^ f Theorem k.k.l : In an RSTT , at least one prohibiting product exists for each zero-entry. f Proof: Let e. . be a zero- entry in an RSTT . We will show that there ij exists a set of columns satisfying conditions (a), (b) and (c) in Definition k.k.2. Suppose e = 1 for some t > i. Since e. . =0, there must be a j_ such that j_ < j, e J . = and e. . =1 because of Theorem U.3.2. °1 1 ' ±3 ± iJ 1 Suppose e . = 1 for some k < s < i. Assume that the blocking sj - f row of e. . is row M. . Then there must be an 8, such that I < j, f e. = 1 and e g = 0. Otherwise row M _ should be the blocking row Xi/ Si/ S -f- _L of e. .. 13 89 Therefore, there exists a set of columns satisfying conditions (a), (b) and (c) in Definition k.k.2. In other words, the prohibiting product of e. . exists. Q.E.D. The following algorithm describes means to obtain Boolean expres- sions without complemented literals for the complements of the functions, f g.'s, specified by columns in an RSTT . Although this algorithm looks J more complicated than Algorithm 2 in [32], it is useful for the reduction of computation time as explained later. Algorithm k.k.l : Suppose that an RSTT with T columns is given. Step 1 : Set j = Step 2 : Set j = j +1. If j > T, go to step 5. Otherwise set h. = and E. =1. where I. denote the set of all indices, i, such that e. . = for each column j. Then go to step 3« Step 3 * If E. = p, go to step 2. Otherwise, obtain the smallest f index i in E.. Let row M n be the blocking row of e. .. J k ij Then form a new h . : J h, = : h v 5* g . g. . . . g, (k.k.l)* where g. g. . . . g. is a prohibiting product of e. .. J l J 2 J s 1J Step k : Find any index i in E. such that Then set E. = : E. - [£,). Repeat this step until no such J u index £ remains in E.. Then go to step 3« (J -x- The notation "=: " is used to indicate that the current h. is used 3 in the right hand side to construct a new h.. 90 Step 5 : Terminate. Expressions h_ , h p , . . . , h_ are called f basic expressions of the RSTT Example 4.4.3 : In this example, we will try to obtain expression h> for column 4 of the RSTT in Figure 4.4.2. Since we will work on column 4, let us assume j = 3 before entering step 2 of Algorithm 4.4.1. Now let us follow Algorithm k.k.l stpe by step in order to obtain h, . Step 2: Set j=j+l=3 + l=4. Since j = T = 4, h. is set to and E. = I. = {0, 2, 4, 6}. Then go to step 3. Step 3^ Since E. % 0, obtain the smallest index i in E, , i.e., f i = 0. The blocking row of e„i is row M , and gng^ is a prohibiting product of e , . Then according to (k.k.l) we set h^ = : v g Q g^ = t, Q g^ . Step k: Since e E, and e = e =s 1, we set E, = : E, - {0} = {2, 4, 6}. Furthermore, 2 € E, and e = e , = 1, we set E. = : Ei - {2} = {4, 6}. There is no more index in E. satisfying (4.4.2). Hence we go to step 3 again. Step 3: Set the smallest index i = k as found in E, . The blocking f row of e> . is row M, , and g„ is a prohibiting product of e^. Then according to (4.4.1), \ = : \ ^ ^> ^ S 2 = ,f , f 5 o SiS 3 - 5 4 g 2' Step 4: Set E^ = : E^ - {4} = (6}. Go to step 3- f Step 3: Find i = 6 in E. . The blocking row of e,-. is row M^ , and g is a prohibiting product of e^, . By (4.4.1), we have \ = : \ v C -6 g 3 = ? s l g 3 v ^l g 2 ~ ? 6 s 3 • 91 -; >2 ^2 3 ^+ M^ 1 M^ 10 m5 5 mJ 10 M f 10 1 M f 2 1 M l X X FIGURE U.U.2 M RSTT f FOR EXAMPLE U.U.I 92 Step 4 Step 3 Step 2 Step 5 Set E. = : E, - {6} = 0. Go to step 3. Since Ei = 0, go to step 2. Set j = j +1=4+1=5. Since j > T, go to step 5< Terminate. Now we have the basic expression \ = 5 g;L g 2 ^ C ^ g 2 v 5 6 § 3 for column 4. Theorem 4.4.2 : Let g , g , . . . , g be the functions specified by the columns in an RSTT , and h.. , h , . . . , h be the basic expressions of f - - . the RSTT . Then g. = h. . Furthermore, h. is a Boolean expression with- J J J out uncomplemented literals of x , x~, , x n and g x , g 2 , • > ■i-x- Proof ; From the definitions of £ . and the prohibiting products, it is obvious that h . is a Boolean expression without uncomplemented literals J of x 1 , x 2 , . . ., x n and g^ g^, 3-1' We will prove g. = h. (l < j < T) by induction. Now let us first J J prove that g_ = h_. Because of Corollary 4. 3-1, there is no inverse f pair in g . In other words, there must be a row M « such that e... = for all i > i, and e.- =1 for all i < £. The blocking row of e^- is 'il £l row M n and the prohibiting product of e is 1. If we follow Algorithm £ £1 f f 4.4.1, we will find that h_ = t, - . From Theorem 2.3-2, g „ = 1 for all 2r f f input vectors in .U»M. and £ « =0 for all other vectors. That is, g l = *£ = h l' Let us assume g. = h. for every j < t - 1. We will prove that g = h . J k, row M is the its K blocking row of e., , and g g . . . g is a prohibiting product of e , 12 s "* f f ~* If a e M for q < k, then f 1 =0 for a because of Theorem 2.3.1. Hence q * k f ~* ~* f £ g g . . . g =0 for a. If a e M for q > k, there is a 1 ? x ^ ~ one-entry e . because g, (a) = 1. Then, by condition (c) in Definition qt t 4.2.2, there must be a k„ in {k n , k^, . . ., k } such that e , =0, ' & V 2' f s qkp ' -* f i.e., g =0 for a. We have shown that every term, £ g g . . . k i k k x k 2 g , in h equals for any true vector of g, . Hence we have k x "C s g t 5\ (^-3) -* f Assume b G M be an arbitrary false vector of g . Then we know q t e . = 0, and q e I. From steps 3 and k of Algorithm k.k.l. either one qt t of the following two cases may be true for e , . qt f f (a) There is a term t, g g . . . g in h where row M is 12 s the blocking row, and g g . . . g the prohibiting 12 s product of e , . qt (b) The index q is deleted from E in step h. We will examine both cases. (i) Case (a) f Since row M. is a blocking row of e . , k < q. Hence k D qt 7 — ^ f - £; =1 for b, due to Theorem 2.3.1. Since g g . . . k ^ K 2 g is a prohibiting product of e , , we have e = e K s It qK^ qkg 9h . . . = e . =1 from condition (b) in Definition k.k.2, i.e., g k = g k = * ' * = ^ = 1 for h ' Hence ? k 8 k 8 k • • • J- t— s X. c. g = 1 for b. K. s (ii) Case (b) If index q is deleted from E in step k, then there must f be a term (; g g . . . g added to h in step 3 such k K ± k 2 k g t that k < q and e , = e , = . . . = e . =1. That is, qk x qk 2 qk g g, = g, = . . . = g =1 for b. Because k < q and b € M , k x K 2 ic s q f ~* ' f "* t , =1 for b. Hence t; g g . . . g =1 for b. 12 s We have shown that, in h , there is always a term which equals 1 for any false vector of g . Hence, we have S t EV (h.k.k) From (k.k.3) and (k.k.k) , g, =h ,. Q.E.D. f f Theorem h.k.3 : Let £ g g ... g be a term in h . Express £ 1 K. K._ i£,^ i£ "UK, 12 s f in their irredundant disjunctive form as £ = p_ v P c v . . . \/ P . & J. £. q Then, when h is expressed as the disjunction of terms p. g g, ... g, 1 <- no term in h subsumes another. Proof: Let p g^ g. ... g^ and 3 2 g k g R • • • g k he two 12 u 12 v arbitrary terms in h . And assume p_ and p are the p-terms of the input 95 -* f -* f vectors a e M . and a e M . respectively. 1 x l 2 (i) The case of i, = i p . a must be incomparable to a because the irredundant disjunctive f f form of t . (or t . ) is used. Hence there must be a literal which is l i 1 2 in p.. but not in p , and another literal which is in p but not in p . Therefore p g- g^ ... g^ and ? 2 g k g k ' ' ' S k d ° not subsume 12 u 12 v each other. (ii) The case of i > i . Because of part (a) of Theorem 2.2.3, a p is either smaller than, or incomparable to a . Hence there is a literal which is in p, , but not in p . (k.k.5) From step 3 of Algorithm k.k.l, row M . is the blocking row of X l a zero-entry e , and g* g* . . . g* is the prohibiting product of 12 u 2 e , . From condition (b) in Definition k.k.2, we have e „ = e B pt ' pi pi . . . = e p = 1. Then by condition (b) in Definition k.k.l, u V^vV^V ' ' "VMi" 1 ' (U ' U ' 6) f Furthermore, since row M . is a blocking row of e , , by condition (a) in Definition k.k.l, \-i,t m1 -' (k - k - 7) 96 f For the same reason as above, row M . is the blocking row of a 2 zero-entry e , , and g g . . . g is its prohibiting product. Because 12 v of (4.4.7) and i_ - 1 > ip, there exists d € (k.., k , . . ., k } such that e. =0 from condition (c) in Definition 4.4.2. From (4.4.6), d cannot be any of { It. , It , . . . , It } . Hence there is a literal, g,, which is in g, g. ... ' d 7 °k_ °k g but not in g « g g • . . g * . (4.4.8) v 1 2 u From (4.4.5) and (4.4.8), we know that i g» g» ... g« and 12 u 3 g g ... g do not subsume each other. 2 k n k„ k 12 v Q.E.D. Summarized in the following algorithm are the steps to synthesize an optimal feed-forward MOS network realizing a given Boolean function: Algorithm 4.4.2 : Let f be a Boolean function of n variables. f f f Step 1 : Obtain the stratified structure (M_ , M_ , . . . , M p ) f f f and the fundamental functions, [J , £ , . . ., t p of f . f Step 2 : Follow Algorithm 4.3-1 to construct an RSTT for g , g , . . . , g such that g T = f . Step 3 : Follow Algorithm 4.4.1 to obtain the basic expressions, f h , h , . . . , h , of the RSTT . f Step 4 : Use the irredundant disjunctive forms of £ . 's in h.. , h , .... h m . Then construct an MOS cell for each h. (1 < ' T j j < T) in the following way: 97 (a) Corresponding to any two terms or literals connected by an AND operation in h., connect MOSFET's in series in the driver of the MOS cell. (b) Corresponding to any two terras or literals connected by an OR operation in h., connect MOSFET's in parallel in the driver of the MOS cell. Example h.k.k: Suppose a seven-variable function is given as f = x^ v x^ v, x u x T v x 1 x 3 x 7 v, x 1 x 2 x 3 x 1+ x 5 v x 1 x 2 x 3 x^x 7 ^ Y 2 X ^^ T v X 2^3 X ^5 X T v x l x 2 x 3 x U x 5 x 7 v x i x 2 x 4 x 5 x 6 x 7 v x 2 x 3 x i + x 5 x 6 x 7 v x i x 2 x 3 x ii x 5 x 6 x 7 ' Let us follow Algorithm U.4.2 to synthesize an optimal feed-forward MOS network realizing f. Step 1: We find that the stratified structure of f consists of eight f f f non-empty clusters, i.e., M~ , M, , . . ., M . Then the irredundant disjunctive forms of the fundamental functions are: ^0 =1 *1 =X 1^ X 3" X 7 t g = X X X^ v X^X ? ^3 = VA " W7 5 ^ = x 1 x 2 x 3 x ]+ v x 2 x u x 5 x ? ,f 5 5 - x 1 x 2 x 3 x i + x 5 v X 2 X U X 5 X 6 X 7 r l =X 1 X 2 X 3 V 5 X 7 ,f q T - x i x 2 x 3 x l| X 5 x 6 x 7 ' 98 Step 2: From the stratified structure of f , we know there are four inverse pairs in f, i.e., D = 4. Then there are (log p (D-< l)) + 1 = 4 cells in any optimal feed-forward MOS network realizing f, i.e., T = 4. Figure 4.4.2 shows an RSTT obtained by an assignment in step 2 of Algorithm 4.3-1 (though other assignments are also possible). f Step 3: The basic expressions obtained by Algorithm 4.4.1 for the RSTT in Figure 4.4.2 are Step 4: h 2 = 5 2 s x - i 5 h 3 = C J g 2 - 5 * (U.U.9) h 4 = - g l g 3 v C 4 g 2 v ? 6 g 3 f The irredundant disjunctive forms of £ . ' s are substituted into (4.4.9). Then h l = x l x 2 x 4 v X 2 X 4 X 7 h 2 = (x l x 4 v x 4 x 7 )g l v x i x 2 x 3 x 4 x 5 v X 2 X 4 X 5 X 6 X 7 h 3 = ^ x l v x 3 v x 7^ g 2 v x i x 2 x 3 x 4 x 5 x 6 x 7 h 4 = g l g 3 v ^ x l x 2 x 3 x 4 v x 2 x 4 x s x 7^ g 2 v x i x 2 x 3 x 4 x 5 x 7 ' One MOS cell is constructed for each h. (l < j < 4) according to rules (a) and (b). The resulting network is shown in Figure 4.4.3. Since g, (M . ) equals 1 for an odd i, and for an even i as shown in Figure 4.4.2, the network in Figure 4.4.3 realizes Before leaving this section, a property of optimal feed-forward MOS networks is presented in the next theorem. o- tf T H H OJ CM CO T_r PO -tf X n_r -tf x -\\> t- EH i 1 o I W o -tf -tf H -tf -tf -tf H P < O CM -tf X 100 Theorem k.k.k : In a feed- forward MOS network with a minimum number of cells, all cells except the output cell must have at least one input of external variable. Proof : Suppose that there exists, in a feed-forward MOS network, a cell which is not the output cell, and which does not have any external inputs (as cell k in Figure k.k.k (a)). Then we will prove that this network does not consist of a minimum number of cells. Let us consider the partial network in Figure k.k.k (a). K.. , K and K represent all the inputs to cells 1, 2 and 3 respectively. K , K/- and K represent all inputs to cells 5, 6, and 7 except function g. . Then, since g, is a positive function of the functions in IC U L U L, function g. (5 < j < 7) is a negative function of the functions contained J in K. UL U L U L. Hence, a new cell with all functions in K. UK. U 1 2 3 ' J 1 K p U K as its inputs can be constructed to realize each g.. As shown in Figure k.k.k (b), all functions g , g , g , g , g^ and g can be realized without cell k. In other words, cell k can be deleted from the network in Figure k.k.k (a). Therefore, this network is not an optimal network. Q.E.D. k.5- Comments on Algorithms k. 3.1 and ^.^-.1 Generally speaking, there are two major steps involved in the synthesis of optimal feed-forward MOS networks: (1) Assignment of or 1 to the output functions of the cells, g , g , . . . , g , for each input vector. (2) Derivation of a Boolean expression without uncomplemented literals of x 1 , x 2 , . . ., x n and g^ g 2 , . . ., g _ 1 for each g (l < j < T). 101 K_ K, K, (a) K. K, K, (b) FIGURE i^.4.4 THE ELIMINATION OF A CELL WITHOUT ANY EXTERNAL INPUTS 102 Algorithm 4.3.1 and Algorithm 1 in [32] are for the first step; Algorithm U.U.I and Algorithm 2 in [32] are for the second step. In this section, we will compare Algorithms 4.3-1 and 4.4.1 with Algorithms 1 and 2. Let us first compare the computation time required for Algorithm 4.4.1 with that for Algorithm 2 in [32] when they are applied to obtain Boolean expressions without uncomplemented literals for functions in an f RSTT The basic expressions, h , h , . . . , h are in the format discussed in Theorem 4.4.3 if the irredundant disjunctive forms of £ . 's f are used. In order to find the irredundant disjunctive forms of £ . ' s , f we have to compare the vectors in each of M . to obtain all the minimal f input vectors in M . . Therefore we can say that the derivation of irredun- dant disjunctive forms of h... , h , . . . , h by Algorithm 4.4.1 is essentially the derivation of all the minimal input vectors in each M . (0 < i < 2r). If Algorithm 2 in [32] instead of Algorithm 4.4.1 is used to obtain expressions without uncomplemented literals for g , g , . . . , g , then the minimum input vectors (input vectors with components x.. , x , . . ., x and g , g , . . ., g. ) among all the specified false vectors of each g. (l < j < T) have to be obtained, and this is generally time- J consuming. Suppose we use Algorithm 2 in [32] to obtain the Boolean expressions without uncomplemented literals for g , g , g and g. specified by the f RSTT in Figure 4.4.2. Then the minimum vectors among vectors in {M^ 001} U (m£ 010} U {Mg 101} U (Mq 111}*, (M^ 00} U (M J 01} U {M . 101} represent all the vectors obtained by cascading 101 to all 1 f f f vectors in M . . For example, if M . = {011, 110}, then {M . 101} = i 7 l l (011101, 110101}. 103 [M^ 01} U {M^ 11}, {M^ 0} U {M^ 0} U {M^ 0} U {M f 1} and M^ Um[ U f f f M u M, UM have to be obtained for g» , g , g and g , respectively. Therefore, each input vector must be compared, not only with the other f f input vectors in the same M . , but also with those in other M . too. Therefore, we can conclude that the computation time for comparing input vectors required for Algorithm 2 in [32] is usually more than that r i£~\ for Algorithm k.k.l, as confirmed by Shinozaki. This difference in computation time gets bigger when the number of variables of a given Boolean function increases. Secondly, let us compare the number of FET's in the network obtained by Algorithm 2 in [32] with that in the network obtained by Algorithm k.k.l if they are applied to obtain expressions without uncomplemented f literals for functions in an RSTT . The comparison is based on the assumption that step k of Algorithm k.k.2 is used to construct M0S cells from Boolean expressions. f Let us consider the same RSTT as that in Example k.k.k, i.e., the RSTT in Figure k.k.2. The expressions obtained by Algorithm 2 in [32] can be expressed as follows using the notations in this paper: ~~ T F g 2 = C 5 - 5 2 «! 7T ~f ~f (^.5.1) g 3 = £ ? v 5 3 g 2 v £ x g 1 g 2 &k = ^ 6 g 3 v h g 2 v ^ 2 g l g 3 v 5 s l g 2 g 3 ' As we can see, the expressions for g and g, in (k.^.l) consist of f more t, . 's than those in expressions h and h, in (k.k.9) obtained by Algorithm k.k.l. Since £ . 's are disjunctions of products of uncomple- 10U merited literals, the MOS cells constructed for (U.5.1) consist of more FET's than those constructed for (U.U.9). The differences between (U.5.1) and (U.U • 9) are due to the following reasons. Usually, g. (1 < j < T) in an RSTT is an incompletely specified J function of x , x , . . ., x and g , g , . . ., g. . The expressions in (4.5.1) are obtained by assigning all the "don't-cares" to 1. From f f the RSTT in Figure U.U. 2, the input vectors {M 101} are "don't-cares" f for g» . If we assign to them, then the term, £ g , should be added to the expression of g, in (U.5.1). Then % = 5 6 s 3 v ' U g 2 v C 2 s l g 3 v * s l g 2 g 3 v 5 g l s 3 = 5 6 s 3 - c J g 2 - e 2 g i g 3 v - g i g 3 = ^6 g 3 v C U g 2 v ( ^2 v ^0 )g l g 3 = £ 6 S 3 v t ^ g 2 v ^ Q g x g (U.5.2) (U.5.2) is the complement of h. in (k.k. 9). Similarly, the expression of g_ in (U.5.1) can be changed to the complement of h in (k.k. 9) with one more term adder by assigning to some "don't-cares", {M 01} . Thus, this example has shown that networks with fewer FET's may be obtained through Algorithm U.U.I by properly assigning the don't- care input vectors. Let us consider another example. Suppose that the assignment in Figure U.5.1, instead of the one in Figure U.U.2, is made in step 2 of Algorithm U.3.I. Then, the expressions obtained by Algorithm U.U.I for functions g. , g p , g~ and g, in the RSTT in Figure U.5.1 are the same as the ones obtained by Algorithm 2 in [32]. They are: g-L =h 1 = £ ? r = h = t f cr '2 2 b 3 6 1 105 3 1 s 2 s 3 & h m£ 111 7 M^ 10 6 m! 1 5 M^ 10 10 M^ 10 11 M f 2 110 M^ 110 1 mJ 1110 FIGURE 4.5-1 AN RSTT f FROM WHICH SAME EXPRESSIONS ARE OBTAINED BY BOTH ALGORITHM k.k.l AND ALGORITHM 2 io6 g 3 =h 3 = ^l 8 !^ ^5 g l &k = h 4 = ^o g l g 2 g 3 v 5 2 g l g 2 v * J g l g 3 " ' 6 g l * When Algorithm 4.4.1 and Algorithm 2 in [32] are applied to obtain f expressions for functions in an RSTT , we can conclude that Algorithm 4.4.1 produces networks with no more FET's than Algorithm 2 in [32] as illustrated by the above two examples. However, if Algorithm 2 in [32] is used to obtain expressions for functions obtained by Algorithm 1 in [32], and Algorithm 4.4.1 for functions obtained by Algorithm 4.3-1, the comparison between the result- ing networks in terms of the number of FET's is difficult to make because of the following reasons: Since functions obtained by Algorithm 1 in [32] are usually not stratified functions of f, Algorithm 4.4.1 cannot be applied to obtain expressions. It is possible that, for some functions networks produced by Algorithms 1 and 2 in [32] consist of fewer FET's than those produced by Algorithms 4. 3-1 and 4.4.1, and vise versa. 4.6. Some Ideas in Synthesizing Optimal MPS Networks with Fewer FET's In the previous sections, our main objective is to synthesize feed- forward MOS networks which consist of a minimum number of cells. So far, very little attention has been paid to the reducing of the number of FET's. However, sometimes the number of FET's in the networks obtained by Algorithm 4.4.2 could be reduced very easily. In this section, some ideas are presented to synthesize optimal MOS networks with fewer FET's. (l) In Step 4 of Algorithm 4.4.2, the irredundant disjunctive forms of f f f . are used. However, actually any forms of t, . 's can be used and some of them may reduce the number of FET's in the cells. One way to reduce the number of literals (i.e., the number of FET's) 107 f in the expressions of ^ . 's is by factoring common literals in f different products by parenthesis. For example, some £ . 's in Example 4.4.4 can be expressed as: £ 2 = x l x 4 v X 4 X 7 = V X 1 v V t, = x 1 x 2 x i| v X 2 X U X 7 = X 2 X 1+^ X 1 v x 7^ 5 J = X 1 X 2 X 3 X U v X 2 X U X 5 X 7 = x 2 x U (x l X 3 v X 5 X 7 } g 5 = x i x 2 x 3 x l + x 5 v x 2 x l+ x 5 x 6 x 7 = x 2 x 4 x 5 (x i x 3 v X 6 X 7 } Of course, the similar techniques can also be applied to the expres- sions of h , h , . . . , h to factor common g.'s. f Another form of £ . , which is handy and should be considered ■P is (2.3.4) described in Corollary 2. 3.1. For certain £ . , (2.3.4) may consist of fewer literals than the irredundant disjunctive f form of t . . 1 f f (2) Let row M be the blocking row of a zero- entry, e. ., in an RSTT Then, (4.4.1) in step 3 of Algorithm k.k.l can be modified as: h. =: h. ^ Bg. g. ...g. where £ " f 3 8 3 £ f (k.6.l) J J J l J 2 3 s ~ ~ X The following two examples show how (k.6.l) can be used to simplify the expression of h.. Example 4.6.1 : Let us consider the RSTT in Figure 4.6.1. The zero- entries in column 5 are e^, e> , e pc - and e nc -. Their blocking rows f f f f are rows M, M. , M n and M_ , respectively. Then the expression of h._ obtained by Algorithm 4.4.1 is: 5 h 5 = "o s i g 3 v ^4 S 2 v ^2 S 4 * (4.6.2)* There are two prohibiting products of e , g.,g~ an< 3 SoSi,* ^^ f f f g g^_ is used, then h^ = t, Q g g^ v C ^ g 2 v C^- 108 R = f g 5 M M M M M M M FIGURE k.6.1 AN RSTT FOR EXAMPLE k.6.1 109 f f f f Since the blocking row of e^ is row M , and since £ p E? £ k E? ^ £ > f f £. can be used instead of £ _ for zero-entry e^ by (^-.6.1). Then the expression of h is: h 5 = t 8^3 - C k g 2 - ^ k g k f Since t, . is usually the disjunction of several products of uncom- plemented literals, (k.6.2>) consists of fewer literals than (k.6.2). Example k.6.2 : Let us consider the RSTT shown in Figure k.6.2. Suppose that the fundamental functions of f are: ^ =1 ?1 =x x ^x 2 .x 3 ^x k ? 2 = X 1 X 2 - X 1 X 3 V VU ? * = x^ - x 1 x J+ x 5 C h = x lX2 x 3 x k v x^x^ v x 1 x 2 x i+ x 5 ,f 5 5 - X 1 X 2 X 3 X U X 5 Ey Algorithm k.k.l, the expression of h is h 5 = C g l g 3 v l l e k = g ] _g 3 ^ (x^ v x^ s/ x 1 x J+ )g k (k.6.k)* Since the second term of (k.6.k) is generated by the zero-entry, e k , and since the blocking row of e k is row M ; by (k.6.2.) , any f f f f 8 where ^ => 5 => £ k can be used instead of £ . Since £ = Since there are three prohibiting products of e.,_, i.e., g,g_, g^g„ 05 '13 23 and gog),> "the other two possible expressions of h are: £ j" (g Q go v g^) v C 2 g k and ^ Q (g 3 g k v g^) v ^ g k . M M M M M M 110 t-f FIGURE k.6.2 AN RSTT FOR EXAMPLE k,6,2 Ill (X X X 2 V, X.^ v X^) 3 X^ £ (X 1 X 2 X 3 X J+ v X JL X 2 X 3 X 5 v X^X^) = f t i , h_ can be rewritten as: h 5 = g l S 3 v X l X 2 g V f (3) It is sometimes possible to change some one-entries in an RSTT to zero- entries in order to reduce the connections among the cells in the network. Definition 4.6.1: One-entries, e. ., e. ....... e. , ., are called i,j* 1+1,3' i+k,j' top layer one-entries of column j if there is no e*. =0 for £ > i. Theorem 4.6.1 ; Let W be an arbitrary set of columns which does not f include the last one of an RSTT . If all top layer one-entries of these f f columns are changed to zero, the new STT is still an RSTT for the same function f . f Proof : Let A be an RSTT . Then by Theorem U.3«l, there is always a f regular pair to the left of every inverse pair in A. Let B be the STT obtained by changing all the top layer one- entries of the columns in W. Then, by the definition of top layer one-entries: (i) every inverse pair in B is also an inverse pair in A. (ii) every regular pair in A is still a regular pair in B. Therefore, for every inverse pair in B, there is a regular pair to its f left. Hence B is an RSTT . Since W does not include the last column of A , the last column of B is the last column of A. Q.E.D. The following example demonstrates how Theorem 4.6.1 is used to reduce the connections among cells. 112 Example 4.6.3 : Let us get the "basic expressions for the RSTT in Figure 4.6.3 (a). They are: \ = t, g 3 g 1 v^g 1 h 3 = ^i g i s 2 v ^3 g l C^.6.5) r f h l = S There are three top layer one-entries of columns 2,3 and 4, e p , e ■p and e-. , in the RSTT in Figure k.6,3 (a). Since g. = f is the function to be realized, we will not change gi . However, if we change e^- and e to zero, the RSTT in Figure 4.6.3 (b) is obtained. The basic expressions for the RSTT in Figure 4.6.3 (b) are: K = ^0 g 3 ' " ^4 g l f f h 3 = ^ 1 g 2 v * 3 - {h.6.6) Comparing (4.6.5) and (4.6.6), we found that h! in (4.6.6) contains the same t, . ' s as h. in (4.6.5). However, some g. (l < j < i) appears in h. , but the corresponding gl does not appear in hi. For example, g appears in h but g' does not appear in h'. Hence, in the network f for the RSTT in Figure 4.6.3 (a), there is a connection from the cell for g. to the cell for g . But, in the network for the RSTT in Figure 4.6.3 (h), there is no connection from the cell for gJ to the cell for g'. Similarly, there will be no connection from the cell for g f to the cell for g' while there is in the other case. Note: It can be proven that f changing top layer one-entries in an RSTT to zero will never increase the connections among cells. (a) (b) FIGURE 4.6.3 RSTT 'S FOR EXAMPLE 4.6.3 113 '1 ^2 ^3 ^k i §2 §3 g i = f M 111 M 1 M 10 M' 10 M' 10 1 M' 10 1 M 10 10 M 10 10 m: 110 1 M 110 1 M M 110 liU k.'J Upper Bound on the Number of Cells Required in a Feed-forward MPS Network From Corollary k-.3>3y the number of cells in an optimal feed-forward MOS network realizing f is (log ? (D + l)) +1 where D is the number of inverse pairs in f . Furthermore, there are at most t— - — inverse pairs in a function of n variables. Thus, the following table can be obtained for the upper bound on the number of cells in an optimal feed-forward MOS network realizing a function of 20 or less variables. n Upper Bound on the Number of Cells Required to Realize Any Function of n variables 1 1 2 2 3 to 6 3 7 to Ik k 15 to 20 5 TABLE 1+.7.1 UPPER BOUND ON THE NUMBER OF CELLS IN A FEED-FORWARD MOS NETWORK k.Q Lower Bound on the Number of Levels in an Optimal Feed-forward MOS Network Suppose that an optimal feed- forward MOS network consists of T cells. The number of cells contained in the longest path in a network is called the number of levels of the network . Then we know immediately that there are at most T levels in this optimal network. We do not know immediately, however, how many levels are necessary in this optimal network. Let us answer this question in this section. 115 Theorem 4.8.1 : If a feed-forward MOS network with T cells is an optimal network realizing a Boolean function f, then the network consists of at least T - 2 levels . Proof : We will prove that no network with T cells and T - 3 levels can realize f . Let Q be an arbitrary feed-forward MOS network with T cells and T- 3 levels, and t.., t ? , . . . , t^ = 1 (t s= 1 because the (T- 3)-th level is the output level.) be the number of cells in the 1st, 2nd, . . . , (T- 3)-th level of Q, respectively. Then, by Proposition 5 in [32], the number of inverse pairs, K, which the output function of Q can have is restricted by: K < (^ + 1) (t g + l) . . . (t T _^ + 1) - 1 . (4.8.X) It can be proven that, under the condition T = t + t + . . . + t , + t _ (t = l)j a set of values for t_ , t , . . . , t_ . which maximize the right-hand side of (4.8.1) is t, = t~ = t„ = 2 and t, = t,_ = . . . = 12 3 h-5 t T- 4 = lm Hence > K < 3 • 3 • 3 • 2 T ' 7 - 1 = (2 + 2 3 + 2 + 1) . 2 T " 7 -l=2 T - 3 + 2 T - 4 + 2 T - 6 + 2 T - 7 -l. (4.8.2) Let D be the number of inverse pairs in f. Corollary 4. 3*3 asserts T = ^(log (D + 1))J +1. This means 2 T ~ 2 < D < 2 T_1 -1. (4.8.3) From (4.8.2) and (4.8.3), D > K. Hence f cannot be realized by Q,. Similarly, we can show f cannot be realized by any network of less than T-3 levels. Therefore, all feed-forward MOS networks which realize f, and consist of T cells, must have at least T- 2 levels. Q.E.D. 116 Theorem U.8.2 : Suppose that the optimal feed-forward MOS networks which realize a Boolean function f consist of T cells. Let D be the number of inverse pairs in f. Then (a) If 2 T " 2 < D < 2 T ~ 2 + 2 T " 5 , then f has at least one optimal feed-forward MOS network which consists of T - 2 levels. T-? T-S T-? T - "3 (b) If 2 +2 J < D < 2 +2 D , then f has at least one optimal feed-forward MOS network which consists of T - 1 levels. (c) If2 T - 2 +2 T " 3 The following example demonstrates this possibility. 119 Example 5. 1.1 : Let f be a Boolean function of five variables, whose f f f f f stratified structure is (M Q , M , M 2 , M , Mu, and the fundamental functions are: ^ f =1 5 J =X 1 -X 2 s,X 3 ^ 2 = X 2 X 4 V X 2 X 5 v X 1 X 3 ^3 =X 2 X lf X 5 ? J = X 2 X 3 V5 v x l x 2 x i+ x 5 Now let us try to synthesize an optimal feed-forward MOS network for f under the condition that in the driver of each MOS cell, both the number of FET's in parallel and the number of FET's in series can not exceed four. Algorithm k.k.2 is followed. Assume that the RSTT in Figure 5.1.1(a) is obtained by Algorithm U.3.1, then the basic expressions of f the RSTT are: f f f h 3 = ^0 g l v ^2 g 2 v ^ = g l v ( x 2 x h v X 2 X 5 v x ]_ x 3)g 2 v X 2 X 3 X 1+ X 5 v X 1 X 2 X 4 X 5 f f h 2 = * s l v 5 3 =§ i v x 2 x lf x 5 h l = ^1 = x i- x 2 ~ x 3 * The corresponding MOS network for f is shown in Figure 5.1.2 (a). Since in the driver of the cell for g , the number of FET's in parallel is six which exceeds the limit, the network in Figure 5.1.2 (a) is not acceptable. However, if a different assignment as the one in Figure 5. 1*1 (b) is selected in step 2 of Algorithm J+.3.I, then the basic expressions are: 120 6-1 Sp So — < «l Mg M l ° < (a) r g l *2 g 3 = f 4 < 1 4 1 < 1 1 < 1 1 (b) FIGURE 5.1.1 TWO RSTT f, S IN EXAMPLE 5.1.1 121 V DD -C x l A h X 2^ X 3 H V. DD Q gg x 2 H C x i^< x r J 9 V DD Q «3-f X, J J 3 J J < x !+< x 5 H h x ^ X Jh V DD < J X-.jr' X 2< X X 3H 2^ C X 5HL X MC ( a ) V O DD < x ! HL X 2 H X -ic 2H v c x, "X" 5 ( b ) v o DD * g 3 = f < x 2 ^ x i-fC X 3iL X 2H[ x, nc x Rii FIGUFE 5.1.2 TWO MOS NETWORKS OBTAINED IN EXAMPLE 5.1.1 122 h 3 = S o 4 v ^ = g 2 v V2V5 v X 2 X 3 X U X 5 h 2 = ^l g v ^3 = ( x ! ^ x 2 ^ x 3^ g l v X 2 X 4 X ' f h l = ^ 2 = X 2 X U v X 2 X 5 v x l x 3 * The corresponding network is shown in Figure 5.1.2 (b). Since in the drivers of all MOS cells in Figure 5.1.2 0b)> "the number of FET's in parallel or in series does not exceed four, the network in Figure 5.1.2 (b) is acceptable. As we can see in the above example, the output cell of the network in Figure 5.1.2 (a) is much more complex than the other two cells, whereas all the cells in the network in Figure 5.1.2 (b) are of appro- ximately the same complexity. Generally speaking, networks with cells of similar complexities are more desirable than networks with one cell much more complex than the others, because the former ones have more chances to be acceptable than the latter ones. Usually, the number of g.'s in a basic expression (i.e., h.'s) is relatively small compared with the number of x.'s which are from the fundamental functions (i.e., £ . 's). Therefore, if the basic expres- f sions of an RSTT contain an equal number of fundamental functions, the corresponding MOS cells would have approximately uniform complexi- ties. (This is only an approximation because different fundamental ex- pressions may be of different complexities.) The objective of this f chapter is to develop an algorithm to construct RSTT 's such that the f fundamental functions £ . 's are distributed among basic expressions as uniformly as possible. Definition 5.1.1 : Suppose that there are 7. (l < j < T) fundamental J 123 f functions in the basic expression h. of an RSTT of T columns. Then J ■p T = (y , 7 , . . . , r T ) is called a distribution vector of the RSTT . Let Max (r) and Min (r) be the largest and smallest components of r, f respectively. Distribution vector r of an RSTT is said to be better than distribution vector F of another RSTT if Max (F ) - Min (T ) < Max (r 2 ) - Min (r 2 ) . In Section 5.2, we will first discuss which fundamental functions f must be included in the basic expressions of an RSTT . Then, the best distribution vectors for these essential fundamental functions are obtained. A method is described in Section 5*3 to construct an f RSTT with a given distribution vector whenever it is possible. Finally, in Section 5.U, an algorithm is presented to synthesize feed- forward MOS networks with cells of similar complexities. 5.2. Best Distribution Vector Definition 5*2.1: Let (e. . e. . ) be a regular pair in column j 6 v 1,3, i+I, J & * d ■p of an RSTT . (e. . e. _ .) is called a final regular pair if there 1,3, i+I, j = * is no inverse pair to its left, i.e., no pair (e. « e. _ J such that e. « = 1, and e. » = for £ < j . -p Lemma 5.2.1: Suppose (e. . e. _ . ) is a final regular pair in an RSTT . i,J, i+l,j f Then fundamental function t . _ must exist in the basic expression h.. i+l * 3 Proof: Since (e. . e. _ .) is a final regular pair, 1,3, i+l, j & ^ ' (i) e. _ . = and e. . = 1, and i+l, j 1,3 ' (ii) there is no £ < j such that e. n « ~ 1 a nd e. n = 0. i+l, £ i,£ From (i) and (ii), row M. is a blocking row of e .. From step 3 -L ~t~ J- X. — r" A. ,, from Theorem 4.3«2, there must be a j such that: (i) e. . = 1 and e. ._ . = 0, and i,J i+l, J (ii) e ± £ = e i+1 j for every 1 < & < j. From (i) and (ii), (e. ., e. _ .) is a final regular pair. ' X,3 l+l, J Q.E.D. f Lemma 5.2.3: Suppose e , = e rt = . . . = e m = 1 in an RSTT of T ^ ^ ** q,l q,2 q,T 125 f columns. Then, fundamental function £ is not in any of the basic f expressions of the RSTT . f Proof: Row M can never be a blocking row of any zero-entry e. . for f i > q because the blocking row of zero entry e. . is defined as M — ij & with the largest integer k < i which satisfied conditions (a) and (b) in Definition k.h.l, but row M . satisfied conditions (a) and (b) q+± because ofe -, = e Q - • • • = e m = !• Consequently, from step 3 q,-L q, • • • • § T = f ' 7 j - ^^ for J * = 1} 2 > • • • « -L • f Let t be the number of essential £ . for a given Boolean function f. f Suppose that there is a simple RSTT of g. , g p , . . . , g = f . Then, by Corollalry 5*2.1, we get 1 2 T-l T o- < 1 + 2 + 2 +...+2=2-1. f Example $.2.1 : Let f be a Boolen function with 12 essential £ . . f Suppose we want to construct a simple RSTT of g , g , g , g. = f f such that the essential £ . 's are distributed among the basic expres- sions, h.. , h p , h , hi , as uniformly as possible. The ideal distribu- tion vector T = (7,, y , y , 7. ) with completely uniform distrubution, of course, is (3, 3, 3« 3). However, from Theorem 5*2.3, there are at most 2 3 ~ essential g . 's in h ., i.e. , 7. < 2 J "~ for j = 1, 2, 3, k. «*■ tj 3' S h = f . f In general, let f be a Boolen function of cr essential £ . ' s. Let T = (7 , y , . . . , 7™) be the limit for the best distribution vector f T of a simple RSTT of g , g , . . ., g = f (t < 2 - l). As seen in the above example, there is always an integer K (l < < T) such that (a) 7° = 2 J_1 for j < K, and (b) 7. equals either Q, or Q + 1 for j > K, where J Q < 2 K (5-2.1) Since 7 + 7 + . . . + 7 = t, we have K . cr - Z 2 a "- L \ _lfi = (
  • (log_( - + l)) + 1 . — 2 L 2j and 13^ Step 1 : If Mq is empty, set I = 1 and g(M* ) = g(Mg ) =1 . Otherwise, set £ = and g(M Q ) =1 . Then go to step 2. r o-' 1 Step 2 : Letq= ^ - d (q > because of (5.3.1)). If q = 0, go to step 3. Otherwise set g(M p * p . ) = and g(M 2 ^_ 2 ) = 1 for j = 1, 2, . . ., q. Then go to step 3. Step 3 : Let t = 2i + 2q. Set g(M^ j-3 ) = g(M^_ 2 ) = f f s( M t+ l + j_ 1 ) = s(M t+l| . ) - 1 *» J - If 2, . . ., etc. until the value of g for the last non-empty cluster of f f is set, i.e., until g(M p /, - ) is set. f Example 5.3«l s Let us consider function f in Figure 5. 3.1. M. f corresponds to the set of attached true vectors because M~ is empty. f f Hence t _ is not essential. Thus there are nine essential t. ' s, i.e., 1 l ' ' u = 9» Since -p- =5, let us set d = 3« Then let us show how g = G(f, 3) in Figure 5. 3.1 is obtained. f f f Step 1: Since M Q is empty, set £ ~ 1 and g(M, ) = g(M p ) = 1 . r 1 £ Step 2: q= p -d=5-3=2. Therefore, we set g(M ) = 0, g(M^) = 1, g(M^) = and g(Mg) = 1. Step 3: t = 2.1 + 2q = 6. We set gCM^ ) = g(Mg ) = and g(Mp = g(M* Q ) = 1 . As shown in Figure 5-3.1? clusters of f are grouped into cluster of a g denoted with M . . From this example, we can state three properties of g = G(f, 3), which are also true for a general G(f, d). = G(f, 3) 135 M ; M' M S I M „ 5 2i+2q M 1 M' M ! M ! { M M M M M M M M M^„ = M 10 f 9 f o 2i M FIGURE 5-3.1 AN EXAMPLE OF G(f, d) FOR d = 3 136 Property 5»3«1 : f f (a) For each inverse pair of f, (f(M i _ 1 ), f^ )), the pair (g(M f ), g(M f )) is either an inverse pair or a regular pair. f f (b) If M* is not empty, g(M ) is set to 1 in step 1. Hence M S =m!| is the cluster of attached true vectors of g. If -p f f M* is empty, g(M , ) and g(M g ) are set to 1 in step 1. Then M g =M f U mJ is the cluster of attached true vectors of g. Therefore, Mq is always empty. (c) Since g(M^ +1 ), B(M^ ), , • ., g( M 2i+2q ) are Set alter " f f f natively to and 1 in step 2, W 2 SL+1 ' M 2i+2 ' " ' *' 2i+2q •p f are also clusters of g. From g( M 2^4^+1 ) to s ^ M 2i+(J-l >' each pair of adjecent entries is set in step 3 to the same value: 1 or 0, alternatively. Therefore, each pair of adjecent clusters of f turns to be one cluster of g. From the above discussion, we know that in addition to the cluster of attached true vectors, g has 2q clusters due to step 2, and r 1 - " " — clusters due to step k. The total num- ber of essential cluster of g is r (2l+cr-l) - (2l+2q) n + 2q r a - 1 - 2q n + 2q r^i = — — + q = — — + g - d = a - d f That is, g has a - d essential £ . ' s. pa 137 Lemma 5.3»1 : When g = f is given, let g = G(g , d). If there are T- 2 f functions g-^ g 2 , • • • , g T _ 2 such tha/t "the STT of g-j_, g 2 , . . . , g .. is f f f an RSTT ' , then the STT of g , gp, . . . , g ., g is also an RSTT . f . f Proof : Since the STT of g , g , . . . , g_ _ is an RSTT . There is a regular pair to the left of each inverse pair in column 1 through column T - 1 of the STT of g , g , . . . , g , by Theorem lj-,3.1. Since g = G(g , d), from (a) of Property 5. 3*1, for each inverse pair (e i _ 1 T , e ± T ) in column T of the STT of g^ g 2 , . . . , g T , (e .., e. ) in column T - 1 is either an inverse or a regular ir. If (e. n m _, e. _ , ) is an inverse pair, then there must be i-l,T-l' i,T-l f a regular pair to its left, because the STT of g.. , g p , . . . , g _ f is an RSTT . Hence we have shown, for every inverse pair m the f STT of g_ , g p , . . ., g„, there is a regular pair to its left. f f By Theorem 4.3.1, the STT of g , gp, . . ., g is an RSTT . Q.E.D. f Theorem 5«3»1 : Le^ ^ ~ Sru loe a Boolean function with cr essential £ . 's, r i and T be a given integer such that T > log-( ~ + l) + 1 , If — d id.} T = (?', 7 p , . . ., 7 ) is a distribution vector which satisfies (a) ? 1 + 7 2 + . . . + 7 T = cr (b) 1 < 7. < 2 J_1 for j = 1, 2, . . ., T r -i (c) 7. < [ 7l+72+ 2 ' ' ' +7 j ) f °r 3 - 1, 2, . . ., T, -p then g. = G(g. -, 7. , ) exists for each j where 1 < j < T and the STT J j+J. j+J. — f J of g , g , . . . , g is an RSTT . Furtheraiore each g. has Z 7. 1 3 ±=1 X essential t . f s. 2 l 138 Proof : Since (5.3*1) is the only restriction in Definition 5.3.1, r CT T g T-1 = G(g T , 7 T ) exists, if 1 < 7^ < ^ . From conditions (b) and (c) 7 + 7 2 + . • • + 7 T of this theorem, 1 < 7 < - . Since V 7 1 + 7 2 + . . . + 7„ = o- due to conditon (a), 1 < 7_ < - . Hence g exists. From (c) of Property 5-3.1, we know g has c - 7 S T-1 , essential P . 's. From conditions (b) and (c), 1 < 7 < r i r 1 / 7 4- 7 4- . . . + 7 \ / cr - 7 \ ^ £ _ ia^ = ^_ _ij . Hence g T _ 2 = G(g T-1 , Vl } exists. Repeating the ablove argument, we know that g, , g p , . . . , g _ all exist. T g. From the above arguement g. has a - ( E 7.) essential t . ' s. i 1 1 J i=j+l T 3 From condition (a), we have cr - ( Z 7.) = !> 7. . Hence g.. has 7, i=j+l x i=l g, 7, essential £ . d 's. From Lemma 5.2.5, there are 77- inverse pairs in "1 L C J 7 1 2° g . Ey condition (b) of this theorem, — < — =0. Hence, g_ does not have any inverse pair. Consequently, g_ can be f realized by a single MOS cell. In other words, the STT of g, is f f an RSTT . Then repeating Lemma 5.3.I, we know that STT of g.. , g p , f . . . , g is an RSTT . Q.E.D. f Example 5.3*2 ; Figure 5*3.2 shows an example of the RSTT described in Theorem 5.3.1, where T = 5, cr = 8, and T = (7 7 . . ., 7 ) = (1, 1, 2, 2, 2). In Figure 5*3*2, in addition to the stratified structure of g = f , the stratified structures of g , g , g and g. are also shown. Since g. = G(g _ , 7. , ) for j = 1, 2, 3, k, the 139 §n g, 3 s ^ g c = f M 3 J M ^ 1 3 15 17 M 8 5 & 1 M i r M M 4 6 Bo \ 3 { L M Sk M ^ 1 M g 3 { 1 M 5 7 M 5 6 M 5 5 5 M 3 J M *+ ( M 5 -, 3 I U I h x " M^3 f M SJ + [ M g 5 -,_ r &k Sc M ^ M 5 -, 2 12 r m & 5 m L *s 1 M ' 1 M & 5 -l 1 1 1 FIGURE 5-3.2 AW EXAMPLE OF THE RSTT DESCRIBED IW THEOREM 5- 3-1 1U0 stratified structure of g must be used to obtain g . Let us examine how g_ = G(g~, 7„) = G(g,_, 2) is generated from g . g 3 As we can see in Figure 5>3«2, g« has four essential £ 's. 8-3 gq go Step 1: Since M Q ° is empty, we set £ = 1 and gp(M 3 ) = gp(Mp ) = 1 So 6c Set Sc 6q 8c; Since M 1 ° = M Q J UM^ UM^ and M ^ = M p , we set CT cr or C[ ^(M Q 5 ) = g 2 (M 1 5 ) = gg(M 2 5 ) = g 2 (M 3 5 ) = 1 . Step 2 Since q = s" - 2 = 0, go to step 3- Step 3: t = 2^ + 2q = 2. Set ggCM 3 ) = g^M^ 3 ) = and g^M 3 ) = 1 So Sir Bo Sir Scr 6c So Str Since M D = M ^ , M ^ = M _' u M g u M 7 and M ^ = M/, s s s s we set g 2 (M i| 5 ) = ggfM ^ ) = &2 (M 6 ' ') = g 2 (M ? 5 ) = and SotMo/) = 1 • J 6, In Theorem 5. 3«1> we found that g. has £ 7. essential £ . ' s, in J i=l X " X f J other words, column g. of the RSTT has Z 7 . - 1 transitions between J i=l 1 and 1, going upward from the lowest zero-entry. In the next theorem, we will show ttr-t expression h. contains 7. essential t . ' s. (Note that S i whereas "£ . " which g. has in Theorem 5- 3»1 means the number of transi- J f f tions, t . " which h. has in Theorem 5»3«2 means Boolean functions t . 's. ' b x .1 b 1 Theorem $.3-2 : The RSTT of g , g^, . . ., gL, = f described in f Theorem 5«3»1 is a simple RSTT , and furthermore, each basic expression h. (l < j < T) contains exactly 7. essential f . s. Proof : Le us show that basic expression h contains 7m essential £ . 's which are not contained in h , h p , . . ., h . Let us use the same notations £, q, cr in Definition 5-3-1 for function g . Om Om Firstly, let us show that if M _ is empty £ -, corresponding to the attached true vectors of g is not in any of the basic expressions. om Om Then £ and g (M p ,_, ) = g (M ) are set to 1 in step 1 of Definition orp 5.3.I. Then M is part of the attached true vectors of g . Simi- Om Om Om larly we can prove g (M . ) = § 2 (M ]L )=...= g m _ 2 (M 1 ) = 1, i.e., e l,l ■ e l,2 - • • • ■ % T = 1 • (5-3-2) f f By Lemma 5.2. 3> ^ n = L corresponding to the attached true vectors is not in any of h , h , . . . , h . f ^T Secondly, let us prove that £ « is in h no matter whether VI is ■1 a nn+\ pmn+. Om empty or not. If M n is not empty, £ is set to in step 1 of Defini- Om Om -p tion 5.3.1. Then, row M ? « = M Q is the last row of the RSTT . By ^m om Definition ^.U.l, the blocking row of zero entry e is M _ . If M. is empty, £ is set to 1. From (5. 3*2), the blocking row of e . = e Om is M . Hence, by step 3 of Algorithm k.k.l, Om % 2 ^ S ^ n ^t no ma "tter whether £ equals or 1. (5-3-3) Om Thirdly, let us prove that £ for each u where 2£ < u < 2£ + 2q is not in h m . From step 2 of Definition 5-3-l> (e , _ n , e m _ ) is an T u-l,T-l' u,T-l ■p inverse pair for each regular pair (e ^ m , e u T )- (i.e., g( M 2 i + 2i-l' ) = ° f f and g(M ? » ) = 1 for each regular pair f(M p . p . ) =1 and. f T f(M ? » p. ) =0 .) Hence, all zero-entries between rows M p * and M 1 . T . m column T hwe the same blocking row, M „. Then, from step 3 Om of Algorithm k.k.l, f for each u where 2£ < u < 2£ + 2q is not in h . 142 Fourthly, let us prove that 5 f or each regular pair (e , e ) where 21 + 2q < s < o" + 2i! - 1 is in h . From step 3 of Definition 5-3.1, e s-l,T-l " e s,T-l ' (5.3.M And furthermore, M U M is a cluster of g_ . Since g.. , g^, gm . . . , gr are stratified functions of ^ , we have g.(M ) = l^ s . 1 )> i.e., e . . = e . for every j where 1 < j < T-2 s-l,J s,j * (5.3.5) From (5«3« ^) and (5«3«5)j the (e , e ) is a final regular pair. S — 1, J. S, JL om By Lemma 5.2.1, t is in h m . s T There are cr - 2q - 1 , . ^T -^ regular pair above row M ofl _ in column T. f As shown above, there is one essential £ . m h for each regular pair Om Om above row M p ,, „ in column T. Including £ p „ , the total number of essential f . ' s in h is b 1 T u -2q - 1 cr-1 . cr-1 a ^ + 1 = —p— - q + 1 = — — - 5- + 7 + 1 = = 7 m (because - - — — = 1) I • Lcj L 2 j om Finally, let us prove that the £ . ' s in h are not in h , h p , . . ., h . From step 1 of Difinition 5-3.1* M_, is part of the T-l 2l attached true vectors of g , no matter whether I = or 1. Hence, by repeating the first argument in this proof for g^ , (i.e., the para- graph which includes (5«3.2)) t, p * is not in h , h , h T- 1" orn Next, let us show that t for a regular pair (e .. m , e m ) ' b s s-l,T" s,T where 21 + 2q < s < cr + 21 - 1 is not in h , h , . . ., h . From (5.3.^) and (5«3'5)> row M satisfies conditions (a) and (b) s+i 1^3 in Definition k.k.l for a zero-entry e , . where t > s + 1 and 1 < j < T - 1, orp whenever row M satisfied these conditions for the same e , . . Since the s tj f blocking row of e is defined as M of the largest k smaller than or tj g om equal to t, which satisfies conditions (a) and (b), row M can never s be a blocking row of any zero-entry e . where t > s + 1 and 1 < j < T - 1. om Also from (5«3-*0 an< 3 (5»3»5)> ro "W M can never be a blocking row of any zero-entry e . (l < j < t - l). Hence by step 3 of Algorithm k.k.l, 5m £ . ' s are not in any of h_ , h„, . . ., h m . Similaryly, we can show that each h. (l < j < T - l) contains om exactly 7. essential t . ' s, which are not in h_ . h_, . . . , h. _. 3 l ' 1* 2' ' j-1 &m Since 7, + 7 p + . . . + 7 m = cr, every essential £ . appears f exactly once in h_ , h , . . ., h . Therefore the RSTT is a simple RSTT V 2 J f Q.E.D. f Example 5 • 3 • 3 : We get the basic expressions of the RSTT in Figure 5.3.2 by Algorithm k.k.l h l = ^8 h 2 = ^ g l \ = ^2 s l g 3 v ? 6 g l f Every essential £ . appears exactly once in the above h- , h , . . . . . , h . Furthermore, each h. (l < j < 5) contains exactly 7. essen- f tial 5 's where r = ( y y . . . , 7 ) = ( 1, 1, 2, 2, 2) as defined Ikk in Example 5. 3. 2. Thus, the basic expressions comply with Theorem 5.3.2. Suppose that f is a Boolean function with a essential £ 's. Theorems 5«3.1 and 5«3«2 assert that as long as a distribution vector satisfies conditions (a), (b), and (c) in Theorem 5«3«1> it is always f possible to construct a simple RSTT of g.. , g p , . . ., g_ with that r c 1 « distribution vector where T > (log ( 7 + l)) + 1 . The F defined in Theorem 5.2.U satisfied conditionss(a), (b) and(c) in Theorem 5.3.1. f Therefore, these exists a simple RSTT of g, , g p , . . • , g T with distribution vector F . 5.^. Synthesis Algorithm Summarizing the discussions in Sections 5.2 and 5»3> let us propose the following algorithm. Algorithm 5«^»1 : Assume that we want to synthesize a feed-forward MOS network for a Boolean function f such that the number of cells is minimized, and at the same time the complexities of cells are made as uniform as possible. f f Step 1 : Obtain the stratified structure of f, (M Q , M- , . . ., M^ ). 2r f Step 2 ; Obtain the irredundant disjunctive form of £ . 's, f < i < 2r. Let cr be the number of essential t . 's. - - 3 1 r n- i Step 3 : Calculate T Q = (logp( - + l)) + 1 . T -1 T -1 T -2 Step h : If 2 < cj < 2 ° + 2 ° , set K = T - 2. T -1 T -2 T If 2 +2 < cr < 2 - 1, set K = T n - 1. "0 Step 5 : Obtain F = (7 y . . ., y ) according to Theorem 5.2.4 14-5 f Step 6 : Generate a simple RSTT of g. , g p , . . ., g by assigning g T = f and g = G ^, +1 , Vj+i) for 1 < j < T Q - 1 Step 7 : Obtain the basic expressions h , h , . . . , h by - 1 i Algorithm 4.4.1. Step 8 : Construct MOS cells according to step 4 of Algorithm k.k.2. (Use parathesis to factor out common literals whenever possible. ) Example 5.4.1 ; Assume that f is an eight-variable Boolean function f f f whose stratified structure is (M , M , . . ., Mn), and fundamental functions are: f t =1 p f £ 1 = X- v Xg v X v X^ p f ^ 2 = x l x 2 v X 2 X 3 v X 4 X 5 v X 6 X 7 v X 7 X 8 ^ 3 = X ! X 2 X 3 - x l+ x 5 x 6 v X 2 X 7 X 8 * f ^ 4 = x l x 2 x 3 x 4 v X 3 X 4 X 5 X 6 v x l x 2 x 7 x 8 v X 4 X 5 X 6 X 8 * f b 5 = x i x 2 x 3 x i^ x 5 v x 3 x i^ x 5 x 6 x 7 v x i x 2 x 4 x 7 x 8 v x l x 4 x 5 x 6 x 8 ,f ^ 6 - x 1 x 2 x 3 x 1+ x 5 x 6 v x 3 x^x 5 x 6 x ? x 8 v x 1 x 2 x 3 x 1+ x 7 Xg s, x 1 x 2 x i+ x 6 x 7 x 8 v x 1 x 2 x 1+ x 5 x 6 xg p f 5 7 = x l x 2 x 3 x 4 x 5 x 6 x 7 ,f ^ 8 " X 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 f . f Since M is not empty, the number of essential t . 's is 9, i.e., r n cr = 9. Then, at least (logp( — + l)) + 1=4 cells are required to realize f, i.e., T = 4. If Algorithm 4.4.2 is used, and the assignment in Figure 5.4.1 (a) is selected, the basic expression are 146 M 8 "? M f 1 M f g l g 2 g 3 g 4 = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (a) Assignment by Algorithm 4.4.2 1 g l ^ g 3 Sj 1 ■i* 1 1 < 1 *l 1 1 < 1 1 "3 1 1 4 1 1 < 1 1 1 < 1 1 1 ; = f (b) Assignment by Algorithm 5.4.1 FIGURE 5-4.1 THE TWO RSTT f .S OBTAINED IN EXAMPLE 5.4.1 1^7 \ = 5 g l g 2 g 3 v 5 2 s l g 2 v ^ g l g 3 v £ 6 g l v ^ 8 = g 1 (g 2 (g 3 V X 2 (X 1 v X 3 ) v X^ v X (Xg v Xg)) g 3 (x i X 2 (x 3 X lf v X^Xg) v/ X^X^(X v Xg)) v X U^ X 1 X 2 X 6^ X 3 X 5 v x 8^ x 5 v x 7^ v x 3 x 7 x 8^ x l x 2 v X 5 X 6^ vz x 1 x 2 x 3 x i ^x 5 x 6 x 7 Xg S'CjvavS^ = g-j_{ (x 1 v X 2 v X^ v X^)g 2 v X^(X xJx i X 2 v XgX„) v x 1 xg(x 2 x ? v x 5 x 6 ))} f h 2 = ^ 3 g l" ( x 2^ x l x 3 v ^8^ v x i+ x 5 X 6^ g l h l = ^ 7 = X 1 X 2 X 3 X 4 X 5 X 6 X 7 The corresponding MOS network is shown in Figure 5.U.2. Note ■p that h. contains five £ . 's, while h contains two, and h and h contain one each. Consequently, the cell for g, in Figure 5.^.2 is much more complicated than the rest of the cells. The complexity of each cell is shown in Table 5.U.I. Total Number Maximum No. of Maximum No. of of FET's FET's in Parallel FET's in Series Cell for g. kQ 16 8 Cell for g 20 8 6 Cell for g 2 10 3 If Cell for g 8 1 7 The Network 86 16 8 TABLE 5.^.1 THE COMPLEXITIES OF THE CELLS IN FIGURE 5.1+.2 IkQ o H ll+9 However if Algorithm 5-4.1 is used, we get distribution vector f r = (1, 2, 3, 3) and the simple RSTT in Figure 5.4.1 (b). Now, the basic expressions are: h 4 = ^0 g 3 g l ^6 g 2 v ^8 = g^ v g2( x i^( x i x 2 x 6^ x 3 x 5 v x 8^ x 5 v x 7^ v X 3 X 7 X 8^ X 5 X 6 v x i x 2^^ v x 1 x 2 x 3 x i+ x 5 x 6 x T x 8 h 3 = ^ 1 s i s 2 v ^ 3 g i v ^ 5 g 2 = g^CXjL v Xg v X^ v X^)g 2 v X 2 (X 1 X v X Xg) v X^X Xg) vz g^(x x 5 (x 1 x 2 ^ XgX ) x/ x 1 Xg(x 2 x 7 s/ X^g)) f f h 2 = ^2 g l v ^7 = g l^ x 2^ x l v x 3^ v X 4 X 5 v x 7^ x 6 v x 8^ v x 1 x 2 x 3 x i, x 5 x 6 x T h l = H = x l x 2 (x 3 x 4 v X 7 X 8 ) v x lf x 5 x 6 (x 3 v x 8 ) The corresponding network is shown in Figure 5-4.3 in which the complexities of cells are more uniform than those in Figure 5-4.2. The complexities of the cells in Figure 5-4.3 are listed in Table 5.4.2. Total No. Maximum No. of Maximum No. of of FET's FET's in Parallel FET's in Series Cell for g£ 28 7 8 Cell for g' 29 11 6 Cell for g' 17 6 7 Cell for g» 12 k 1+ The Network 86 11 8 TABLE 5.^.2 THE COMPLEXITIES OF THE CELLS IN FIGURE 5.4.3 150 -4- o M CO O O 2 CO o o K O J- H 151 The following two schemes help to further control of the complexities of the cells in a feed-forward MOS network. (1) Assume (e , e. ), (e , e ) . . ., (e , e ) 1t~- l jJ ± -ifJ J- p f " x 2>v v k f are the regular pairs in column j in the simple RSTT described in Theorem 5.3.1, where i < i < . . . < i . Then the proof of f f Theorem 5.3.2 shows that the 7. essential t . ' s in h. are t . 3 1 J x l f f f and (counting backward from £'.)£. , £ . ' X k \-7.+2 X k-7.+3 ' " ' •' J J f t, . . However, actually, we have some freedom in determining \ f which £ . f S should be in h . . From the proof of Theorem 5-3.2, we have the following two observations: (A) Suppose that (e. . , e. . ) is a regular pair in column j. i--Lj , Qou) and (e . , e^, ) are selected as the regular pair in step 2 of the modified definition of G(f, d). When we generate g. and g p , we set q = and step 2 is skipped. * Step 2 in Definition 5«3.1 is the special case of p = p = . . . = p = . q 153 g i g 2 S 3 g u = f 4 1 «; 1 1 < 1 1 < 1 1 < 1 1 < 1 1 1 4 1 1 < 1 1 1 < 1 1 1 FIGURE 5.^.1*- THE RSTT f OBTAINED IN EXAMPLE 5.1*. 2 154 The basic expressions of the RSTT in Figure 5.4.4 are: f f f \ = C 8983 v 5 2 8282 v £ 4 e 3 = g 3 (g 2 V X 1 X 2 (X 3 X 1+ v X^Xq) n, X^X 5 X 6 (X 3 vXq)) V g 1 g 2 ( x 2 ( x i v x 3^ v x i| x 5 v x 7^ x 6 v x 8^ f f f h 3 = ^ 1 g l g 2 v » 5 g l v * 7 g 2 = g 1 (g 2 ( x 1 v x 2 v x 3 v x i|) v x i+^ x 3 x 5^ x i x 2 v X 6 X 7^ v x l x 8^ x 3 x 7 v X 5 X 6^ v x i x 2 x 3 x U x 5 x 6 x 7 g 2 h 2^3 g l v5 8 = gi( x 2^ x i x 3 v X 7 X 8 ) v X 4 X 5 X 6 } v x l x 2 x 3 x i+ x 5 x 6 x 7 x 8 h l = ^6 = x i4.^ x i x 2 x 6^ x 3 x 5 v x 8^ x 5 v x 7^ v X 3 X 7 X 8^ X 1 X 2 v X 5 X 6^ The complexities of the cells in the corresponding network are shown in Table 5»4.3« Total No. Maximum No. of Maximum No. of of FET's FET's in Parallel FET's in Series Cell for g. 2k 10 5 Cell for g 28 9 8 Cell for g 18 4 8 Cell for g 17 5 6 The Network 87 10 8 TABLE 5.1k 3 THE COMPLEXITIES OF THE CELLS IN THE NETWORK -p CORFESPONDLNG TO THE RSTT IN FIGURE 5.4.4 Comparing Tables 5.4.2 and 5.4-3, we found that the com- plexities of the cells in the network of this example is a little more uniform than those in Figure 5-4.3- 155 (2) The complexities of the cells can be reduced by increasing the number of cells. The reason for this is obvious. More cells in f the network means more corresponding columns in the simple RSTT f Hence each basic expression contains less number of essential £ . 's. Since distribution vector F = (1, 1, . . . , l) satisfied conditons ■p (a), (b) and (c) in Theorem 5«3«1> there exists an RSTT such that f each basic expression contains exactly one essential £ . . Example 5«^--3 : Let f be a Boolean function with stratified -p -p -p -P P y structure (M , M , M , M,, M ). Figure 5*^.5 shows an f RSTT such that each basic expression contains exactly one f exxential £ . . The basic expressions are: \ = ^2 g 3 b t f 3 ^ 3 S 2 h 2 = ^ g l ■p Corollary 5«^--l : Let f be a Boolean function with cr essential £ . 's, f There exists an RSTT of g, , g p , . . . , g = f such that each f each basic expression contains exactly one essential £ . . f f * M~ and M^ are both empty. 2r M M M M M g- g», =f FIGUEE 5-^.5 THE RSTT IN EXAMPLE 3.k.3 156 157 CHAPTER 6. SYNTHESIS OF FEED-NEXT MOS NETWORKS 6.1. Significance of Feed-next MPS Networks An example of a four-level feed-next MOS network is shown in Figure 6.1.1. In a feed-next MOS network, the output of a cell may only be connected to the cells in the next level but not to those beyond the next. Generally speaking, a feed-next MOS network is a special case of a feed-forward MOS network and requires more cells than it. Thus, it may lead us to conclude hastily that a feed- forward MOS network is always better. Under the following circumstances, however, a feed-next MOS network is preferable. For the case of integrated circuits, the chip area occupied by interconnections is often comparable with that occupied by cells. There- fore, for the sake of high packing density, it is desirable to design networks with short interconnections. Since a cell is allowed to feed another cell several levels ahead in a feed-forward MOS network, un- desirable long interconnections may exist. One way to avoid the long interconnections is to use iterative networks where each cell is allowed to feed only neighboring cells as shown in Figure 6.1.2 (a). However, because of its strong restriction on interconnection patterns, an iterative network usually requires a large number of cells. A feed-next MOS network is a compromise between the feed-forward and iterative MOS networks. Each cell in a feed-next MOS network feeds only cells in the next level. Therefore the interconnections are relatively shorter than those in a feed-forward network. As shown in Figure 6.1.2, the inter- connection patterns of a feed-next MOS network are more complicated than those of an iterative MOS network, and this yields more flexibility in 158 1st level i 2nd level I' 3rd level j Uth level FIGURE 6.1.1 AN EXAMPLE OF A FEED -NEXT MOS NETWORK 159 (a) A SUBNETWORK OF AN ITERATIVE MOS NETWORK (b) A SUBNETWORK OF A FEED-NEXT MOS NETWORK FIGURE 6.1.2 A FEED-NEXT MOS NETWORK VERSUS AN ITERATIVE MOS NETWORK 160 logical design. Hence, the former usually requires less number of cells than the latter. For the case of dynamic MOS, all cells are synchronized by multi- |"pi I \ £.~\ phase clocks. Hence, there are certain restrictions on the interconnections among cells, which are suitable for feed-next MOS networks. A feed forward MOS network may not be, sometimes, realized by dynamic MOS. For the case of digital computers, the output values of a network for a series of combinations of input variable values are often needed instead of that for a single combination. Then, as it will be discussed in the next paragraph, a feed-next MOS network can produce correct output [31] values faster than a feed-forward MOS network. Suppose that a function is realized by a k -level feed-forward MOS network and also by a k -level feed-next MOS network where external variables are connected only to the cells in the first level. Let the delay of every cell in these networks be t. In the feed-forward network, we cannot change the value of inputs until all signals arrive at the output cell and the output of the network is formed. Since the minimum delay of signals in the feed-forward network is k_ t , we cannot change the value of input variables during a period of k t . In the feed-next network, however, we can supply the next combination of values to the inputs in the first level when the preceding combination advances to the second level. In other words, we can supply a combination of input variable values every T seconds. Therefore we can conclude that feed-next MOS networks with external variables connected to only cells in the first level have greater capacity for information processing than the feed- forward MOS networks, although the latter may require fewer cells. l6l When external variables are connected to cells in addition to those in the first level of a feed-next MOS network, the above argument is still true if previous combinations of input variables are retained by- delay elements as shown in Figure 6.1,3 where a delay element is a single input element which delivers its input at time t-T to its output at time t. In this chapter, we classify feed-next MOS networks into two types: a) Type 1 feed-next MOS networks — Feed-next MOS networks with external variables connected only to cells in the first level. b) Type 2 feed-next MOS networks -- Feed-next MOS networks with external variables connected to cells in any level. As we will see in the later sections, type 1 feed-next MOS networks (without delay elements) cannot realize all of the Boolean functions. Consequently, type 1 feed-next MOS networks with delay elements will also be considered in this chapter. However, type 2 feed-next MOS networks (without delay elements) are capable of realizing all Boolean functions. Therefore, no delay element is added in type 2 feed-next MOS network in our discussion. 6.2. Type 1 Feed-next MOS Networks In Section 6.2.1, we will discuss what type of functions can be realized by a type 1 feed-next MOS network without any delay elements. Then, by restricting all delay elements in one level placed anywhere in the network, we will discuss, in Section 6.2.2, what type of functions Some means other than delay elements which can retain the previous combinations of input variables may be used. Although delay elements cannot be realized by MOS cells, networks with a mixture of MOS cells and delay elements are still called here as MOS networks. K i : Delay element MOS cell t : Delay time in an MOS cell or a delay element x.(t), x.(t-i), x. (t-2x) : Input value of x. at time t, t-i, t-2i, respectively FIGURE 6.1.3 EMPLOYMENT OF DELAY ELEMENTS TO RETAIN PREVIOUS COMBINATION OF INPUT VARIABLES 163 can be realized by a type 1 feed-next MOS network with a specified number of delay elements. An algorithm is developed to synthesize a type 1 feed-next MOS network with a minimum number of delay elements in one level. An upper bound on the number of delay elements required to realize a given function by a type 1 feed-next MOS network is also derived. 6.2.1. Type 1 Feed-next MOS Networks without Any Delay Elements Lemma 6.2.1.1 : Let G(g 1 , gg, . . . , g fc ) and H(g 1 , g g , . . . , g ) be negative and positive functions of g- , g_, . . ., g , respectively. Then, a) If g , gp, . . . , g are negative functions of x 1 , x_, . . ., x , G and H are positive and negative functions of x , x , . . . , x , respectively. b) If g_ , g_,, . . . , g, are positive functions of x_ , x_, . . ., x , G 1 2 k 1 2 7 ' n and H are negative and positive functions of x_ , x , . . ., x , respectively. Proof : We will prove that G is a positive function of x_ , x p , . . ., x if S-, j Sr>) ' ' • » g, a ^e negative functions of x n , x_., . . . , x . The 1' 2' ' k & 1' 2' * n other cases of the lemma can be proved in the same way. Since G is a negative function of g_ , g , . . . , g , there exists JL c. K. one expression for G, in which all g.'s (i = 1, 2, . . ., k) are comple- mented. Since g. (i = 1, 2, . . ., k) is a negative function of x , x , . . ., x , there is an expression for each g. such that all x.'s in the expression are complemented. Substitute the g.'s in the expression of G by the expressions of g.'s. Then by DeMorgan's law, we obtain an 164 expression of G such that all x.'s in the expression are not complemented. Hence G is a positive function of x , x , . . . , x . Q.E.D. From the above lemma, we can state the following theorem: Theorem 6.2.1.1 : The output of a type 1 feed-next MOS network without delay elements is either a negative function or a positive function of x n , x n , .... x according to whether the number of levels is odd or 12' ' n even. Proof : Since the output of each cell in the network is a negative function of its inputs, the outputs of all first-level cells are negative functions of x , x , . . .x . Then, by Lemma 6.2.1.1, the outputs of all second- level cells are positive functions of x , x , . . ., x ; the outputs of third-level cells are negative functions of x n , x_, . . . , x : etc. & \> 2' ' n' Therefore, depending on whether the number of levels in the network is even or odd, the output of the network is either a positive or a negative function of x n , x_, . . . , x . Q.E.D. Thus, without using delay elements, a type 1 feed-next MOS network can realize either a positive or a negative function. However, a type 1 feed-next MOS network can be synthesized by at most two cells as follows: (A) If a function is negative, then it can be realized by a single MOS cell. (B) If a function is positive, then it can be realized by two MOS cells*--; the first-level cell realizes the complement of the function, which * The trivial positive function x. (i = 1, 2, . . ., n) is a special case. No cell is required to realize x.. 165 is a negative function; the second-level cell simply performs a negation which realizes the complement of the output of the first- level cell. (C) If a function is neither positive nor negative, then this function is not realizable. Obviously, the networks for positive and negative functions consist of a minimum number of cells. 6.2.2. Type 1 Feed-next MPS Networks with All Delay Elements in One Level In this section let us discuss type 1 feed-next MOS networks with all delay elements restricted in only one level. Definition 6.2.2.1 ; A cell is called a positive cell if its output is a positive function of its inputs. An example of a type 1 feed-next MOS network with delay elements in one level is shown in Figure 6.2.2.1 (a). Since there are three levels between the external variables and the functions g.. , g„ and g in Figure 6.2.2.1 (a), g , g and g are negative functions of x , x and x . Then by Lemma 6.2.1.1, g, and g are negative functions of x , x , x_; g^, g and go are positive functions of x , x and x . Since there are three levels between f and each of g^, g,-, g^> g and go, f is a negative function of g, , g,_, g^, g 7 and gp. Hence the network in Figure 6.2.2.1 (a) can be transformed into the two-level network in Figure 6.2.2.1 (b) which consists of three positive cells and two MOS cells in the first level, and a single MOS cell in the second level. Now let us consider the type 1 feed-next MOS network in Figure 6.2.2.1 (c). This network is the same as the one in Figure 6.2.2.1 (a) except that there are only two levels between f and each of g« , g,_, g^, ( a ) ( b ) : Delay- element Positive cell MOS cell FIGURE 6.2.2.1 TYPE 1 FEED-NEXT MOS NETWORKS 167 ( c ) ( d ) ( e ) FIGURE 6.2.2.1 TYPE 1 FEED-NEXT MOS NETWORKS (CONTINUED) 168 g and gg. Hence f is a positive function of g^, g , g., g and g fi . Then, the network in Figure 6.2.2.1 (c) is transformed into the one in Figure 6.2.2.1 (d). Since f is a positive function of g,, g , g^, g and gg, f is a negative function of g^, g , g^, g and gg. Therefore the two-level network in Figure 6.2.2.1 (e) is obtained, which consists of two positive cells and three MOS cells in the first level, and a single MOS cell in the second level. From the above discussion, the following theorem is an immediate consequence. Theorem 6.2.2.1 : Let K be a type 1 feed-next MOS network of t levels, in which all cells are MOS cells except that there are k_ delay elements in level I. Let the number of MOS cells in Level i be k . Then K can be transformed into a two-level network such that: (a) There is a single MOS cell without any external inputs in the second level. (b) There are k positive cells and k MOS cells in the first level if I is odd and t is even, or if both & and t are even. (c) There are k, MOS cells and k positive cells in the first level if I is even and t is odd, or if both I and t are odd. The following theorem is a restatement of Theorem 1 in [18]. Theorem 6.2.2.2 : Assume f, g.. , g p , . . . , g are Boolean functions of n variables, f is a negative function of g , g Q , . . . , g if and only if for each pair of input vectors a and a such that f(a ) > f(a ), there exists a function g. (1 < i < k) such that g. (a ) < g. (a ). 169 Proof ; Let us first prove the "only if" part of this theorem. Let d.. = (g 1 (a 1 ), g 2 (a 1 ), . . ., g k ( a -j_)) and d g = (g-^a^, g 2 (a 2 ), . . . , g k (a 2 )). Since f(a..) > f(a ), then f(d ) > f(d ). Since f is a negative function of g n , g , . . . , g, , d cannot be greater than d because of Theorem 1 2 JK JL 2 3.1.1. Hence there must be a 1-component in d p whose corresponding component in d_ is zero, i.e., there is g. (l < i < k) such that Conversely, let us prove the "if" part of this theorem. If f (d.. ) < f(d 2 ), then f(a ) < f(a 2 ) (because f(a-) = f(d.) and f(a ) = f(d 2 )). Then, because of the assumption, there must be g. (l < j < k) such that g.(a ) > g.(a ). Consequently, d, ^ d . In other words, for every pair of input vectors d.. and d such that d_ < d , f (d.. ) > f(d ). Hence, by Theorem 3«1»1> f is a negative function of g.. , g p , . . ., g, . Q.E.D. Theorem 6.2.2.3 : Assume f , g. , g , . . . , g 1 are Boolean functions of n variables such that f is a negative function of g.. , g p , . . ., g . If g , g , . . . , g are positive functions of x., , x , . . ., x and X d. X/ J- 2 n s £ + l' g H + 2' ' ' "' s k are ne S ative Unctions of x , *,..., x q , then (a) there are at most £ regular pairs in f, and (b) there are at most k- I inverse pairs in f. Proof : Let us first prove (a). Suppose f has £ + 1 regular pairs. By the definition of regular pairs, there are input vectors b.. > a > b > a> . . . > b B > a such that f(b.) =0 and f(a.) =1 for i = 1, 2, . . ., i + 1. Then, by Theorem 6.2.2.2, for each pair of f (a. ) = 1 > 170 = f(b.), there is a function g (i < j. < k) such that g (a ) = < i 1 i 1 = g. (b.). Since g. is either a negative or a positive function, and °i X J i b. > a., we know g. is a positive function by Lemma 3.1.1. Furthermore, by Lemma 3.1.1, g. =1 for b , a , b , a , . . ., b. and g. =0 for 3 ± J- i Jj. V b i + l' a i + l' ' * *' b £ + l' a i + l for every i# Hence g 1 * 8 1 ' * ' '* J i J 2 g. are all different. However, there are only I positive functions 3 £ + l (i.e., g 1 , g„, . . ., go) according to the assumption. Hence f cannot have £ + 1 regular pairs. Similarly, we can prove f cannot have more than £ + 1 regular pairs. That is, f has at most £ regular pairs. Similarly, we can prove part (b). Q.E.D. Theorem 6.2.2.4 : Suppose f is the output function of a type 1 feed-next MOS network which contains k delay elements in one level. Then the number of either regular or inverse pairs in f is less than k_ . Proof : Let the number of MOS cells in the same level as the delay elements be k . Then, by Theorem 6.2.2.1, f can be realized by a two-level network where in the second level there is a single MOS cell without any external variable and in the first level there are either k positive cells and k MOS cells, or k MOS cells and k positive cells. If in the first-level there are k positive cells and k p MOS cells, a negative function of k^ positive functions and k p Then, by Theorem 6.2.2.3, f has at most k regular pairs, f is a negative function of k.. positive functions and k p negative functions 171 If in the first-level there are k. MOS cells and k p positive cells, f is a negative function of k negative functions and k positive functions, Then, by Theorem 6.2.2.3, f can have at most k inverse pairs. Combining the above two cases, the number of regular or inverse pairs is less than k n no matter what the value of k ? is. Q.E.D. Corollary 6.2.2.1 : Let f be the output function of a type 1 feed-next MOS network which contains k delay elements in one level. Then f consists of at most 2k +2 non-empty clusters. Proof ; If f consists of more than 2k +2 non-empty clusters, then, by the definitions of inverse pair and regular pair, the number of inverse pairs of f and the number of regular pairs of f are both greater than k, . This contradicts Theorem 6.2.2.4. Hence f consists of at most 2k_ +2 non-empty clusters. Q.E.D. Suppose that a Boolean function f has S non-empty clusters. No matter whether S is an odd integer, S = 2k.. +1, or an even integer, S = 2k +2, a type 1 feed-next MOS network realizing f needs at least k.. delay elements in one level by Corollary 6.2.2.1. In the following, an algorithm is proposed, for a function of 2k.. +1 or 2k_ +2 non-empty clusters, to synthesize a type 1 feed-next MOS network with exactly k.. delay elements in one level. f f f Algorithm 6.2.2.1 : Let (M Q , M , . . . , M ) be the stratified structure f f f of a Boolean function f , and £„, (; _ , . . ., t; be the fundamental functions of f. 172 Step 1 . For each inverse pair in f, f(M„. _) and f(M ) , construct a negative function g (0 < i < r- l) such that 6i -Igi+l (6.2.2.1) f Note that if M- is empty, then g n does not exist. f f Step 2 . For each regular pair of f, f(M ) and f(M ) , construct a positive function h. (l < i < r) such that h ± = 5gi (6.2.2.2) f Note that if M. is empty, then h does not exist. 2r ' r Step 3 . Construct a negative function, G, of g_, g , . . . , g , h , h^, . . . , h such that 2' r G = g Q v g^ v g g h 2 v . . . sy g^ _ x h r _ 1 ^ h r . (6.2.2.3) f f Step ^- o If M n is non-empty and M p , empty (i.e., if there are r g.'s and r-1 h.'s), go to step 6. Otherwise go to step 5« Step 5 . Construct a type 1 feed-next MOS network for f in the following way: Construct one first-level MOS cell for each g. and each h. l l according to expressions (6.2.2.1) and (6.2.2.2). Each cell for h. feeds an MOS cell which generates the complement of h., i.e., h.. Then, construct the third-level cell (output cell) accord- ing to (6.2.2.3). (Such a network is shown in Figure 6.2.2.2 (a).) Stop. Step 6 . Construct a type 1 feed-next MOS network for f in the following way: Construct one first level MOS cell for each g. and h. according to (6.2.2.1) and (6.2.2.2). Each cell for g. feeds 173 o OJ CM VD 1 ^ C5 1 EH CU OJ OJ H 17U an MOS cell which generates g.. And each cell for h feeds a delay element. Then construct a third level MOS cell according to - ^(i-L ^ h ) (g 2 n/ h 2 ) . . . (g r _ v/ h r _ ) h . Then, construct the output cell which generates the complement of the output of the third level cell, i.e., G. (such a network is shown in Figure 6.1.2.2 (b).) Stop. Example 6.2.2.1 : Let us consider the four-variable function, f , in Figure 6.2.2.3. The fundamental functions are ^ =1 Si =x i^ x 3 x u g* = x x x 2 v x 2 x 3 x u ^3 =X 1 X 2 X 3 X U We will follow Algorithm 6.2.2.1 to synthesize a type 1 feed-next MOS network for f. Step 1. The inverse pairs in f are (f(M ), f(M )) and (f(M ), f(M )), Hence we have g = ^1 = X l v X 3\ g l = "^3 = X 1 X 2 X 3 X U " f f Step 2. The only regular pair in f is (f(M ), f(M- )). Hence h i ■ s 2 - x i x 2 - x 2 x 3 x u ; f Step 3. = g~ v g_h_ . Since M^ is empty, h does not exist. Therefore Oil 2r J r the expression of G does not include h . f f Step h. Since M is non-empty and M p , empty, we go to step 6 to construct the network. 175 % * O ' True vector False vector FIGURE 6.2.2.3 FUNCTION USED IN EXAMPLE 6.2.2.1 176 Step 6. The network thus constructed represents f and is shown in Figure 6.2.2.U (a). Example 6.2.2.2 ; Let us consider the complement of the function in T f Figure 6.2.2.3. Then M_ is empty. We have non-empty clusters M _ , f f f M p , M and M. . The fundamental functions are 6* =X 1 s,X 3 X i+ ? 3 = Y2 v X 2 X 3 X U g ^ - x i x 2 x 3 x l+ Following Algorithm 6.2.2.1, we get f 5 1 " 5 3 ■ x i x 2 ^ X 2 X 3 X U h l = 5 2 = X l " X 3^ h 2 = £ J - X 1 X 2 X 3 X 1| G . h^ v h 2 f Since M„ is empty, a type 1 feed-next MOS network is constructed accord- ing to step 5> a nd shown in Figure 6.2.2.k (b). Theorem 6.2.2.5 ; Let f he a Boolean function with 2k +1 or 2k + 2 non-empty clusters. Then the network generated by Algorithm 6.2.2.1 realizes f and contains k_ delay elements in one level. Proof : First let us prove that the network generated by Algorithm 6.2.2.1 f" f realizes function f. Since g. = t _. , and h. = t n . , by Theorem 2.3.1, i ^ 2i +1 l s 2x ' V. DD x. x 3 ,( X,.H[ d v. DD x 2 A x, iV. W h. X, x 2 i[ 2Ht X 3 HC V. DD _ x lHl V 1 V. DD *2-l[ x 3 HI DD q? V. DD 1 q? V. DD {>^ ( a ) V. qf" 1 4 ( b ) -•c H HC V. DD 177 cf» G = f i G = f JM FIGUEE 6.2. 2. k NETWORKS OBTAINED IN EXAMPLES 6.2.2.1 AND 6.2.2.2 178 we have &1 ) = h.(M* ) = i 3 for < J < 2i for 2i + 1 < j < 2r for 2i < j < 2r for < J < 2i - 1 . From (6.2.2.10 and (6.2.2.5), the following is obtained: g (M j ) = < h (Mt )"- <^ r 3 if 3 = otherwise if d = 2r otherwise and g.(M*) h (M?) = if 3 ■= 2i otherwise (6.2. 2. 4) (6.2.2.5) f f f f Consequently G equals for all vectors in M., M o > M., . . . , M f f f f and 1 otherwise. Since M n , M ^ , M, , . . ., M^ are all false clusters 024 2r of f, we get G = f . From step 5 and step 6 of Algorithm 6.2.2.1, the output of the network is G, i.e., the network realizes f. Secondly, let us prove that there are k.. delay elements in the network, if f has 2k_ + 1 or 2k +2 non-empty clusters. Depending on f f whether M or M p is empty, we have the following four cases. 179 f f (i) M^ and M^ are both empty. 2r The number of non-empty clusters is 2r - 1 = 2k + 1 where k = r - 1. The number of inverse pairs of f is r - 1. Hence, r - 1 negative functions are generated in step 1 of Algorithm 6.2.2.1. From step 5 of Algorithm 6.2.2.1, the number of delay elements in the second level equals the number of negative functions generated in step 1. Thus the number of delay elements in the second level is k. f f (ii) M is non-empty and M is empty. The number of non-empty clusters is 2r = 2k +2 where k_ = r - 1. the number of regular pairs of f is r - 1. Thus r - 1 positive functions are generated in step 2 or Algorithm 6.2.2.1. According to step 6, the number of delay elements in the second level equals the number of positive functions generated in step 2. Thus, the number of delay elements in the second level is k_ . The other two cases, f f (iii) M is empty and M is non-empty, and f f (iv) M_ and M are both non-empty, can be similarly proven. Q.E.D. The following corollary can be obtained directly from Corollary 6.2.2.1 and Theorem 6.2.2.5- Corollary 6.2.2.2 ; Type 1 feed-next MOS networks with all the k n delay elements in one livel are capable of realizing all functions with up through 2k n +2 non-empty clusters. The next theorem gives an upper bound on the number of delay elements required in a type 1 feed-next MOS network to realize any n-variable function. 180 r n - 1 1 Theorem 6.2.2.6 : At most ( — ■? — ) delay elements are required in a type 1 feed-next MOS network to realize any n-variable Boolean function. Proof ; There are at most n + 1 non-empty clusters for a Boolean function of n variables. If n + 1 is an even number, it may be expressed as r n _ i l n + 1 = 2k- +2 using k = ( — — ) . If n + 1 is an odd number, it may be n r n - 1 1 expressed as n + 1 = 2k +1 using k = - = ( — — ) . By Theorem 6.2.2.5, in either case there is a type 1 feed-next MOS network which contains r n- 1 1 k = ( — - — ) delay elements and realizes f . Q.E.D. In chapter 3, we have shown that any Boolean fanction of n variables can be realized by a two-level MOS network, provided that external variables are available in the first and second level. The external variables can be made available to cells in the second level by providing, for each external variable, a delay element in the first level of the network. Therefore, we can conclude that n delay elements are sufficient to realize any n-variable Boolean function by a type 1 feed-next MOS network. However, from the above Theorem 6.2.2.6, we know that actually r n _ i i ( — = — ) delay elements are sufficient. 6.3. Type 2 Feed-next MOS Networks Definition 6.3.1 : Let t_ , t_, . . . , t_ = 1* be the number of MOS cells — — — — — — — — — — A. d K in the 1st, 2nd, . . ., R-th levels of a type 2 feed-next MOS network which has R levels. Then, C = (t, , t p , . . . , t ) is called the configura - tion vector of the type 2 feed-next MOS network. Configuration vector * Since only single output networks are considered, t_ always equals 1. 181 C is said to be capable of realizing a Boolean function f, if f is realized by a type 2 feed-next MOS network with configuration vector C. Let f. . f„. . . . f f, be all the functions each of which can be realized 1/2' k by a type 2 feed-next MOS network with configuration vector C. Assume that there are I. (i - 1, 2, . . . , k) inverse pairs in f . . Then the capability of C is defined as the largest number among L, & , . . . , L. ■p An algorithm is developed in Section 6.3.1 to generate an RSTT for a type 2 feed-next MOS network with a given configuration vector G = (t.. , t_, . . . , t„). Then the number of inverse pairs of the output 12 K function of the network serves as a lower bound on the capability of C. Let T = t- + t p + . . . + t . In Section 6.3.2, all possible configuration vectors with T < 6 are exhausted. And the lower bounds on their capabil- ities are obtained. These lower bounds lead to a procedure to synthesize type 2 feed-next MOS networks for functions of up through l6 variables. Finally, in Section 6.3-3, the algorithm in Section 6.3-2 is proven to produce optimal type 2 feed-next MOS networks, i.e., type 2 feed-next MOS networks with a minimum number of cells. 6.3.1. Lower Bound on the Capability of a Configuration Vector In this section, when a configuration vector is given, an algorithm is developed to construct a table with entries 1 or which is then f used to produce an RSTT for a type 2 feed-next MOS network with the given configuration vector. Furthermore, an upper bound on the capability of the given configuration vector is obtained from this table. The following example outlines the algorithm. The details of the algorithm will be described later. 182 Example 6. 3 . 1*1 : When a configuration vector C = (t.. , t p , . . . , t ) is given, we will construct a sequence of R tables, i.e., a table with t columns, a table with t.. + t p columns etc. For example, suppose that a configuration vector C = (2, 3, l) is given. First, we construct a table with two columns shown as table Q_ in Figure 6.3.1.1 (a). Secondly, a table with five columns, Q_ in Figure 6.3.1.1 (b), is constructed by- expanding each row of C^ into several rows. (Under certain conditions, only one row may be generated from a row in Q_ . ) For example, rows 1, 2, 3 and k of Q^ are obtained by expanding row 1 of Q_ . Their left-most two bits are row 1 of Q_ . Let r , r , r and r, be the right-most three bits of rows 1, 2, 3 and k of Qp, respectively. Then each bit of r. is greater than or equal to the corresponding bit of r . if i > j. And which will be used f to produce an RSTT for a type 2 feed-next MOS network. The binary numbers which are cascaded to a row in Example 6. 3.1.1 (e.g., r , r , r and r. ) are formally defined in the following definitions. Definition 6.3.1.1 ? Let d and d be two non- negative integers. A binary number of t bits, denoted with (cL , d _) where < k < t, is defined as the concatenation of the k-bit binary number of d.. with the (t - k)-bit binary number of d c . If k = t, (d , d ) is the t-bit binary number of d. If k = 0, (d , d ) is the t-bit binary number of d . X. JL d k c. 183 ' 1 00 000 2 00 001 3 00 on . h 00 ni r 5 01 000 6 01 100 7 01 101 l 8 01 111 " 9 11 000 10 11 110 I u 11 111 (b) 0^ (c) Q. FIGURE 6.3-1.1 TABLE CONSTRUCTED FOR CONFIGURATION VECTOR C = (2, 3, 1) 184 Example 6. 3. 1.2 ; Suppose t = 6. Then (3, 3)l = 001 1 11 because k = 4, d, = 3 = 0011 and d„ = 3 = 11. Also (6, 10), = 000110 because k = t = 6 1 d o and d = 6 = 000110. Definition 6.3.1.2 : Let t, k and d be three integers such that t > k > and d > 0. Then ET"(t, k, d) is defined as a sequence of t-bit binary- numbers according to the following rules: 1. If d = 0, E^t, k, d) = f(d, 0) k , (d, 2 1 -l) k , (d, 2 2 -l) k , . . ., (d, 2*" k -l) kf (2 k -l, 2 t " k -l) k }. -1, ^(t, k, d) = {(0, 0)., (d, 0)., (d, 2-1)., (d, 2 2 -l) 1 2. If d = 2 k . . ., (d, 2 t - k -l) k ). 3. If < d < 2 k -l, E^t, k, d) = ((0, 0) k , (d, 0) k , (d, 2-l) k , (d, 2 2 -l) k , . . ., (d, 2 t " k -l) k , (2 k -l, 2 t - k -l) k }. 4. If d > 2 k -l, E 1 (t, k, d) = {(0, 0) k , (2 k -l, 2 t_k -l) k }. Example 6.3.1.3 : In this example Er(t, k, d) for different values of t, k, and d are demonstrated. 1. t = 5, k = 2, d = 0. Since d = 0, the first rule in Definition 6.3.1.2 is used. Hence E 1 (5, 2, 0) = {(0, o) 2 = 00000, (0, i) 2 = 00001, (0, 3) 2 = 00011, (0, 7) 2 = 00111, (3, 7) 2 = inn). 2. t = 5, k = 2, d = 3. Since d = 3 = 2 -1, the second rule in Definition 6.3.1.2 is used. Hence E X (5, 2, 3) = {(0, 0) 2 = 00000, (3, 0) 2 = 11000, (3, l)g = 11001, (3, 3) 2 = non, (3, 7) 2 = 11111}. 185 3. t = 5, k = 3, d = 2. Since 0 3 = 2 -1, the fourth rule of Definition 6.3.1.2 is used. Hence E 1 (5, 2, 5) = {(0, 0) 2 = 00000, (3, 7) 2 = Hill}. 5. t = 5, k = 5, d = 9- Since < 9 = d < 2 -1=31, the third rule of Definition 6.3.1.2 is used. Hence e 1 (5, 5, 9) = [(0, o) 5 = 00000, (9, 0) = 01001, (31, o) 5 = 11111} 1/ \ The following properties of E (t, k, d) generally hold as illustrated in the above example. Property 6. 3. 1.1 : The following statements are true for E (t, k, d): (a) All elements of E (t, k, d) are different. (b) The first element of E (t, k, d) is always 000... and the last element 111. . .1. (c) The left-most k bits are the same in all elements, except the first element and the last in each E (t, k, d). (d) Let the i-th and j-th element in E (t, k, d) be denoted with vectors e. and e., respectively. If i < i, then e. < e.. Definition 6.3.1.3 : Let t, k and d be three integers such that t > k > o and d > 0. Then E (t, k, d) is defined as a sequence of t-bit binary numbers according to the following rules: 186 1. If = d < 2 k -2, E 2 (t, k, d) = {(d, 0) k , (d, 2-l) k , (d, 2 2 -l) k , . . ., (d, 2 t_k -l) k , (d + 1, 2*- k -l) k , (2 k -l, 2 t - k -l) k }. 2. If 02 k -2, E 2 (t, k, d) = {(0, 0) k , (2 k -l, 2 t - k -l) k ). 2 k From the above definition, E (t, k, d) (0 2 - 2, rule 5 of Definition 6.3.1.3 is used. Hence E 2 (5, 2, 5) = ((0, 0) 2 = 00000, (3, 7) 2 = 11H1}. Let us introduce the following definition which is related to a configuration vector. Definition 6.3.1.^- : Let Q, be a table of T columns and K rows with entries or 1. Assume the rows of Q are labeled with ascending numbers from top to bottom. Let P = (p_ , p , . . ., p ) be a vector* such that p.. , p , . . . , p are positive integers and T = p.. + p„ + . . . + p . Then, the columns of Q are viewed as being divided into J groups by P — the j'-th group from left consists of p. consecutive columns. The notation 1 (P, i, j, k) (1 < i < K, 1 < j < J, 1 < k < p.) is defined as the entry of Q in the i-th row and the k-th column in the j-th group (i.e., column p + p + . . . + p. + k). And let i(P, i, j) denote the entries i Q (P, i, j, l), & (P, i, j, 2), . . ., i (P, i, j, p ). A configuration vector C = (t- , t_, . . . , t„ = l) with T = t- + X c. n JL t„ + . . . + t is a special case of P. 188 Example 6.3.1.5 : Let us consider the table, Q, in Figure 6.3.1.2 where the columns of Q, are divided into three groups as specified by P = (2, 3, 2). Then £ (P, 3, 2, 2) represents the entry in the 3rd row and the 2nd column in the 2nd group; £ (P, 5, 3, l) represents the entry in the 5-th row and the 1st column in the 3rd group. Also £ (P, 8, 2) represents the entries in the 8-th row and all the columns in the 2nd group as shown in Figure 6.3.1.2. Let us examine Q^ and Q^ in Figure 6. 3. 1.1 again. Some rows like rows 2 and 3 of Qp generate two rows in Q_, but some other rows like rows k and 5 of Qp generate only one row in C^. The following Definition gives conditions on rows which can generate only one row. Definition 6.3.1.5 : Using the notations in Definition 6.3.1.*+. Row i of Q is said to be non-generative with respect to P , if either (a) I (P, i, J) = 111. ..1 and I (P, i + 1, J) = 000... 0, or (b) I (P, i, J) = 000... and £ (P, 1+1, J) = 111...1. Otherwise, row i is generative with respect to P . Example 6. 3. 1.6 : In table Q of Figure 6.3.1.2 where P = (2, 3, 2), row k of Q, is non-generative with respect to P because £ (P, k, 3) =11 and Q £ (P, 5* 3) = 0°. Similarly, row 5 of Q is also non-generative with Q respect to P. Even though £ (P, 6, 3) = H, row 6 is not non-generative Q with respect to P because £ (P, 7, 3) f 00. Q Let P = (2, 5). Although rows k and 5 are non-generative with respect to P, they are generative with respect to P . Definition 6.3.1.6 : Let S = (s,, s , . . ., s } be a sequence of r-bit binary numbers (S may consist of a single binary number as a special case), and Q be a table of T columns with entries 1 or 0. Row i of Q 189 Row 9 1st Group 2nd Group 3rd Group ^ r r~ Col. 1 Col. 2 Col. 3 Col. k Col. 5 Col. 6 Col. 7 Row 1 Row 2 Row 3 Row k Row 5 Row 6 Row 7 Row 8 1 1 i Q (P, 6, 2, 2) 1 1 1(-P, 5,3,1) *i ft (P,8,2) FIGURE 6.3-1.2 AN EXAMPLE FOR NOTATION £ (P, i, j, k) 190 is said to be expanded by S if row i is replaced by k rows of r + T columns such that the first T columns of each of these k rows are row i, and the remaining r columns are s,, s ? , . . ., s,, respectively. Example 6.3.1.7 : Let S = (00, 01, 10, 11} be a sequence of binary numbers. Figure 6. 3.1. 3 (b) shows a new table obtained by expanding row 2 of table Q in Figure 6. 3. 1.3 (a) by S. Row 2 of Q is replaced by rows 2, 3, k and 5 in Figure 6.3.1-3 (b). Let us expand row 2 of Q by FT (k, 2, l) = (0000, 0100, 0101, 0111, 1111 ). The result is shown in Figure 6.3.1.3 (c). With the definitions presented in this section, we now propose an algorithm to construct a table of entries 1 or for a given configuration vector C = (t- + t 4- . . . + t_). J. d K Algorithm 6.3.1.1 : Suppose that the configuration vector C = (t , t , . . . , t_) for a type 2 feed-next M0S network is given. This algorithm R is divided into four phases: Phase 1 : In this phase, a table of \, +1 rows and t. columns is constructed. Step 1 : Construct a table Q_ where the i-th row is the i-th element of E 1 (t_, 1, 0). Step 2 : Set J = 1 and C = (t ). Phase 2 : In this phase, some parameters of the present table Q are -~ — — — — j determined. Step 3 : If J = R, stop. (J = R implies that a table, (^>, of t + t + . . . + t columns has been constructed. ) Otherwise, d. R go to step k. 191 Row 1 Row 2 10 Row 3 111 Row h 1111 (a) Q Row 1 Row 2 1 Row 3 1 1 Row h 1 1 Row 5 1 1 1 Row 6 1 1 1 Row 7 1 1 1 1 (D) Row 1 Row 2 0010 0000 Row 3 0010 0100 Row U 0010 0101 Row 5 0010 0111 Row 6 0010 1111 Row 7 111 Row 8 1111 (c) FIGURE 6.3.1-3 EXPANSION OF A ROW IN A TABLE 192 Step h : Let the number of generative rows with respect to C be J r i r i Gj. If (log 2 Gj) 2L , expand row i by E (t 1 , k, d), and set* d =: d + 1. Otherwise, expand row i by E (t T , k, d), J + J_ and set d =: d + 2. Then go to step 9» Phase k : In this phase, we check whether every row of Q, has been expanded. If so, name the new table, Q n , and update the value of J. Step 9 ; Set i =: 1 + 1. Step 10 ; If i < N where N is the number of rows in Q , go to step 6. Otherwise, all rows of Q, have been expanded. The notation "=: " is used to indicate that the new value of d is set to the old value of d plus 1. 193 Let us name the new table with t. + t n + . . . + t columns: Q J + r Set C J + 1 = (t^ tg, . . ., t J + 1 ). Then go to step 11. Step 11 : Set J =: J + l. Go to step 3. Example 6.3.1.8 : Let us construct a table for configuration vector C = (2, 3, 1) (i.e., t., = 2, t„ - 3 and t = t = l) by Algorithm 6.3.1.1. Step 1: E 1 (t 1 , 1, 0) = ^(2, 1, 0) = {00, 01, 11}. 0^ is constructed and shown in Figure 6.3.1.1 (a) where each row consists of t- = 2 entries. Step 2: Set J = 1 and C 1 = (2). Step 3: Since J < R, go to step k. Step h: All rows of Q, (J = l) are generative with respect to C . G_ = 3- J J 1 Since r log c G_ 1 = 2 < t_ ,. = t = 3, set k = 2 and L_ = 2 k - go to step 6. Step 6: Row i = 3 of Q_ is generative with respect to C . Thus go to step 8 again. Step 8: Since d = 3 > 2L = 2, row 3 of ^ is expanded by E (t T , k, d) = E (3, 2, 3) = (000, 110, 111}. Rows 9, 10 and 11 in Figure 6.3.1-1 (b) are obtained by expanding row 3 of Q_ by E (3, 2, 3). Then set d =: d+1 = k, and go to step 9. Step 9: i =: i + 1 = k. Step 10: Since i » k > M- =3, all rows of Q_ have been expanded. We have obtained a new table of t. + t p = 5 columns as shown in Figure 6. 3. 1.1 (b). Name the new table, Q - (J = l), and J + J. set C T , = (t, « t_, . . ., t_ .). Go to step 11. J + l v 1' 2' * J + l Step 11: J =: J + l = 2. Go to step 3- Step 3: Since J = 2 < R = 3, go to step k. Step k: Rows h, t J + 1 ■ t = 1, set k = t J + 1= landL 2 =0. Step 5: Set i = and d = 0. Since the procedure of expanding rows of Qp is similar to that of expanding rows of 0_ , we will just outline it. Since E 2 * (t J + 1 , k, d) = E 2 (l, 1, d) = E 1 (t J + 1 , k, d) = E X (1, 1, d) = {0, 1} for all d > 0, all generative rows of Q^ are expanded by CO, 1}. Since rows k, 5, 8 and 9 of Qp are no n- generative with respect to C p , step 7 is followed to expand them. Since 195 I (C , k, 2) = 111, row k of Q^ is expanded by 0. Then row 7 Qo 2 results as shown in Figure 6.3.1.1 (c). Since & (C , 5, 2) = 000, row 5 of Qp is expanded by 1. Then row 8 results as shown in Figure 6.3.1.1 (c). Similarly, rows 8 and 9 or Op are expanded in Figure 6.3.1.1 (c). This table is called Q^ Then we go to step 11. Step 11: J =: J + l = 3- Go to step 3- Step 3: Since J = 3 = R, stop. The following properties of the tables produced in Algorithm 6.3.1.1 generally hold as they are illustrated in the above example. Properties 6.3.1.2 : The following statements about the tables produced in Algorithm 6. 3. 1.1 for C = (t, , t , . . ., t = l) are true: A. c. K a) The last column of ^ is the alternation of and 1, starting with and ending with 1. b) If & (C , i, J) = 11. ..1 (1 < J < R), then row i of Q T is either the last row of Q and generative with respect to C T , or not the last row of Q, and non-generative with respect to C . J J c) If i (C , i, J) = 00... (1 < J < R), then row i of Q T is either Qj J - - J the first row of Q, and generative with respect to C , or not the J J first row of Q, and non-generative with respect to C . a J Definition 6. 3. 1.7 ; Table Q produced by Algorithm 6. 3. 1.1 for a configuration vector C = (t. , t , . . . , t = l) is called the master table of C . The following lemma states an important property of a master table. 196 Lemma 6. 3.1.1 : Let K be the number of rows in a master table Q^ for configuration vector C = (t- , t , . . . , t ). Assume i_ , i , j and k_ i. d K L d 1 are integers such that 1 < i, 1, then, rows I and I of Q,. are obtained by expanding some rows of Q. by Algorithm 6. 3. 1.1. Let us denote these rows with q and q , respectively. Since i < I , we have q < q . Rows q. and q p of Q. n are the left-most t + t + . . . + t. entries of rows i_ and i! , respectively. Then depending on the relation between rows q_ and q , we have the following cases: (i) q x = qg 197 According to Algorithm 6. 3. 1.1, rows £ and £ of Q,. are obtained by expanding the same row by either E (t., k, d) or J E (t., k, d). In other words, £ (C, i , j ) and £ (c, i , j) 3 ^ J- \ * 2 1 are elements of either E (t., k, d) or E (t., k, d). Thus, by J J 2 1 property of E (t., k, d) or E (t., k, d), (6.3.I.I) can never be true. Hence this lemma is always true. (ii) q 1 < q 2 and £ (C, i^ 3 - l) = 11. . .1 Then, according to (b) of Property 6. 3. 1*2, row q is either a non- generative row or the last row of Q. .. . If row q is a non-generative row, then, by step 7 of Algorithm 6. 3- 1.1, £ n (C, i j) = 00... 0. This contradicts with (6.3.I.I). Therefore, row q cannot be a non-generative row. Furthermore, row q cannot be the last row of Q. _ because there is a row q^ below it. j - 1 ^2 Consequently, this case cannot exist, (iii) q_ ± < q^ and & (C, i g , j - l) = 00. . .0 In a way similar to case (ii), we can prove that this case cannot exist either, (iv) q 1 < q 2 and £ (C, i , j - l) = 00... lrr (iii"} ¥R havp shown that, i. Since in case (iii) we have shown that £ n (C, i , j - l) ={= 00... 0, there must be an integer k p (k p < t. _) such that £ (C, ± r j-1, k 2 ) = and i (C, i g , j - 1, kg) = 1. (v) q x < q^ and i (C, i 2 , j - l) = 11... 1 R Since in case (ii) we have shown that £ (C, i , j - l) I 11... 1, there must be an integer k p (k < t. ) such that V (C ' S.' J '~ 1 > V = ° and V (C ' V 3 " 1 ' V = 1 " 198 (vi) q-L < qg and both "V^i' l l* J ~ "^ and \/ c i' i 2' * " l ) are not 11... 1 or 00... 0. If rows q n and q^ are obtained by expanding the same row in Q. _ 2 , £q( c > i 1 y J " 1 ) and ^o (°» l 2' ^"^ are elements of 2 1 either E (t . , k, d) or E (t. , k, d). Since i < i , we o know from the properties of E (t . _, k, d) or E' (t . _, k, d) that there is an integer k (k < t. ) such that i (C, i_ , j - 1, k 2 ) = and i (C, i 2 , j - 1, kg) = 1. If rows q and q are obtained by expanding different rows in Q. , then we know by Algorithm 6.3.1.1 that £ (C, i , j - l) 2 1 are elements of either E (t . , k, d_ ) or E"^(t. ,, k, d ); and j-± ± J-J- 1 o i^ (C, i_, j - l) are elements of either E (t . , , k, d^) or Q R '2' j - 1' 2 E (t . _, k, d J where d < d because of i < l . Then, by the 1 2 definitions of E (t, k, d) and E (t, k, d), there must be an int eger k g (l < k g < k < t _ ± ) such that i (C, i^ j - 1, k 2 ) =0 R and i (C, i , j - 1, k ) = 1. y R Q.E.D. According to (a) of Property 6.3.1.2, the master table of a f configuration vector can be used as an STT . The following algorithm f describes one way of generating an STT for a given function f from a master table. Algorithm 6.3.1.2 : Assume the master table with U rows, 0^, of configure tion vector C = (t. , t , . . . , t = l) is given. Let f be a Boolean 199 U c -2 function with D < — a inverse pairs and a stratified structure Construct an STT by labeling some 2r + 1 rows* in £^> with M , M , f . . . , M p in such a way that f f f (a) rows M-. , M- , . . • , M are in one to one correspondence to rows s qj S 2_f • • • 9 S 2r' ( b ) u c > s > s i > ' ' ' > s 2r - X ' (c) i (C, s., R, 1) =1 for an odd i and I (C, s., R, l) =0 for an even i, (d) eliminating the remaining rows, i.e., rows other than s , s , . . . , S 2r* V 2 Since D < — , there are enough rows in Q^ for all non-empty clusters of f in Algorithm 6.3.1.2. By (a) of Property 6.3.1.2 and the condition (c) in Algorithm 6.3.1.2, the function specified by the last f f f column of the STT equals 1 for M . of an odd i, and for M . of an f even i. Hence, the function specified by the last column of the STT is f. Example 6.3.1.9 : Suppose the master table of C = (2, 3, l) is given in Figure 6.3-1.1 (c). Then, U Q = 18. Let (M , Mg, . . . , M^) (mJ and f f M are empty) be the stratified structure of f. The STT in Figure 6.3.1.^ (a) is obtained by Algorithm 6. 3. 1.2 where s, = 18, s p = 17, s = 16, s^ = 15, s = Ik, s^ = 13 and s = 12. f f f f Row M or M p exists only if M or M p is not empty. 200 '11 g 12 g 21 g 22 S 23 g 31 f m; o i i o 7 ul 1 1 5 M? 1 1 1 1 M* 1 1 1 1 M 2 1 1 1 1 1 M* 1 1 1 1 1 1 (a) < «; < u< < "§ 1 -s 1 < 1 < 1 g ll g 12 g 21 g 22 g 23 g 31 (b) 110 11 110 110 1110 1110 f FIGUEE 6.3.1.^ STT 'S PRODUCED IN EXAMPLE 6. 3. 1.9 201 f f Suppose M and M p are not empty. Then the stratified structure f f f f of f is (M Q , M , . . . , Mg ). Then, the STT in Figure 6. 3.1.4 (b) is obtained by Algorithm 6.3.1.2 where s = 17, s - 16, s_ = 15, s = Ik, s, = 13, s a 12, Sg = 11, s a 10 and Sg = 9. f f Theorem 6.3.1.3 : The STT generated by Algorithm 6.3.1.2 is an RSTT representing a type 2 feed-next MOS network with configuration vector C = (t.,, t , . . ., t ), i.e., the functions specified by the columns 12 K f in the STT represent the outputs of cells in a type 2 feed-next MOS network. Furthermore, the output of the network is f. Proof ; Let the function specified by column t_ + t p + . . . + t . t + k (l < k < t . ) be g . We know g = f. Hence we only have to prove g (1 < j < R, 1 < k < t.) is a negative function of x_ , x , . . ., x andS 0-l, l' g j-l, 2' • • - 8 j-l, t. • J -*- f f f Let (M~ , M_ , . . . . , M,. ) be the stratified structure of f. And 1 ' 2r ■* f -" f -* •* let a n e M . and a^ € M . be two input vectors such that a., > a^ and 1 i- 2 ip 12 "* "* f f g (a ) = 1 > = g (a ). Assume that rows M . and M . are placed in jk 1 JA d 1 1 the positions of rows s. and s. of the master table, respectively in Algorithm 6.3.1.2. Since a_ > a_, i„ > i_. Then s. < s. . Since g.„ (a_) =1 and 12 12 i i D jk v 1 g jk ( ^2 ) = °> g jk (M i ) = 1 and g jk (M i ^ = °* That is > V (C ' S i ' J> k) = 1 1 2 jR 1 and I (C, s. , j, k) = 0. Then, by Lemma 6.3.1.1, there is an integer % X 2 k (1 < k < t. ) such that i (C, s. , j - 1, k ) = and I (C, s. , Y V 2 % 2 202 j - 1, k 2 ) - 1. That is, gj _ 1 k (m£ ) = and g^ _ ± k 0*J ) - 1. Consequently, g . (a ) = and g (a ) = 1. Then, by Corollary J " x > 2 ~ ' 2 3.1.1, g., is a negative function of x , x , . . ., x and g. jk ± d n j - l, 1 g j - 1, 2' ' ' •' g j - 1, t . _ 1 * Q.E.D. Ey Algorithm 6. 3- 1.1, the master table with entries or 1 is constructed for a configuration vector C = (t., , t , . . . , t = l). J- 2 R Assume the number of rows in the master table is U . Then, by Algorithm 6.3.1.2, an RSTT representing a type 2 feed-next MOS network with configuration vector C can be generated for a Boolean function of LT - 2 -* D < C inverse pairs. Consequently, the capability of c is at least 2 U - 2 C . Then, the following theorem about the lower bound on the capa- 2 bility of C is obtained although the exact value of the capability of C is still not known. Theorem 6.3.1-2: Let U_ be the total number of rows in the master table =! C U - 2 of C = (t_« t , . . . , t„ = l). Then C is the lower bound on the 1 d K — 5 — U - 2 capability of C. In other words, any function with not more than C 2 inverse pairs can be realized by a type 2 feed-next MOS network with configuration vector C. 6.3.2. Synthesis of Type 2 Feed-next MOS Networks Set T = t_ - 1 - t 4- . . . + t-. for a configuration vector C =* (t, , t , . . ., t ). Then T is the total number of MOS cells in a type 2 <— R 203 feed-next MOS network with configuration vector C. In Table 6.3.2.1, all possible configuration vectors for T < 6 with t = 1 are exhausted, the master tables and lower bounds on the capabilities of these configura- tion vectors are also listed in Table 6.3.2.1 based on Theorem 6.3.1.2. Each column in the master tables in Table 6.3.2.1 is represented by a column of hexadecimal numbers. Figure 6.3.2.1 gives an example of a ten- row master table. Each column in the table in Figure 6.3.2.1 (a) is divided into three hexadecimal digits and this table is represented as shown in Figure 6.3.2.1 (b). Hence, in Table 6.3.2.1 master tables are listed in this representation. In Table 6.3.2.1, configuration vectors (2, 3, l) and (l, 4, l) have the largest lower bound of capability, i.e., 8. In other words, any function with no more than eight inverse pairs can be realized by a configuration vector of no more than six cells. Now let us consider the problem of synthesizing a type 2 feed-next MOS network for a function of D inverse pairs. Suppose we want to use as few cells as possible. If D < 8, we can find in Table 6.3-2.1 a configuration vector whose lower bound on capability is greater than or equal to D, and which consists of as few cells as possible. Then we will synthesize a type 2 feed-next MOS network with that configuration vector for the function. Each row of Table 6.3.2.2 lists all the configuration vectors in Table 6.3.2.1, which consists of as few cells as possible, and are capable of realizing functions with D inverse pairs (1 < D < 8). Let f be a Boolean function with eight or less inverse pairs. The f following is an algorithm to construct an STT corresponding to a type 2 feed-next network whose output is f . 204 1st hexadecimal digit 1 2nd hexadecimal die it 3rd hexadecimal digit 10 10 1 10 10 110 1 110 10 1110 1 11110 11111 (a) The Master Table of C = (2, 1, 1, 1) 1 3 5 A 5 F F 7 B 5 (b) The Hexadecimal Represen- tation of the Table in (a) FIGURE 6.3.2.1 THE REPRESENTATION OF A MASTER TABLE BY HEXADECIMAL DIGITS 205 Configuration Vector Total No. of Cells (T) No. of Rows of the Master Table Master Table Lower Bound on Capability (1) 1 2 1 (1, 1) 2 k 3 5 1 (1, 1, 1) 3 6 1 7 B 5 2 (2, 1) 6 1 3 F 5 2 (1, 1, 1, 1) h 8 12 5 F 7 B 5 3 (2, 1, 1) 8 12 5 7 F B F 3 (1, 2, 1) 10 1 1 2 E 5 F F 3 5 k (3, 1) 8 3 5 3 F F 5 3 (1, l, 1, l, 1) 5 10 1 1 2 5 A 5 F F 7 B 5 k TABLE 6 .3.2.1 MAST! 3R TABLES OF CC )NFIGURATION VECTOR s OF t_. = 1 and T < 6 K — 206 Configuration Vectors Total No. of Cells (T) No. of Rows of the Master Table Master Table Lower Bound on Capability 1 (2, 1, 1, 1) 10 F 3 5 F 7 A 5 B 5 k 1 2 5 (1, 2, 1, 1) 12 3 F 5 C F 7 A 5 B 5 5 3 5 (1, 1, 2, 1) 12 3 5 A A 5 5 5 F F F 3 5 3 5 (2, 2, 1) 12 7 7 B F B 8 5 B 5 5 1 3 F 5 (1, 3, 1) Ik 7 F B 8 F 3 8 5 F 5 6 1 (3, 1, l) 10 7 1 7 F F A 5 B 5 ll TABLE 6.3.2.1 MASTER TABLES OF CONFIGURATION VECTORS OF t_ = 1 and T < 6 (continued) R 207 Configuration Vector Total No. of Cells (T) No. of Rows of the Master Table Master Table Lower Bound on Capability 1 \h, i) 5 10 3 3 F F F 5 F 5 k 1 2 5 (l, i, l, l, l, l) 12 3 5 A 5 A 5 5 F F F 7 B 5 1 2 5 (2, 1, 1, 1, 1) 12 1 7 A 5 A 5 5 F F F 7 B 5 1 [1, 2, 1, 1, 1) 6 ik 7 3 B 8 5 A 5 A 5 5 6 F F F 7 B 5 1 (1, 1, 2, 1, 1) ik 7 1 B 5 7 A k A 5 5 6 F F F 7 B 5 1 (1, 1, 1, 2, 1) ik 1 2 E 5 6 F B 5 A A 5 F F F 3 F 5 TABLE 6.3.2.1 MASTER TABLES OF CONFIGURATION VECTORS OF t„ = 1 and T < 6 (continued) K — 208 Configuration Vector Total No. of Cells (T) No. of Rows of the Master Table Master Table Lower Bound on Capability 1 (2, 2, 1, 1) 14 1 F 7 F F 7 7 A 1 A 7 B 5 5 5 6 1 3 F 5 (2, 3, 1) 18 7 B 1 F E 8 8 2 E 5 5 8 6 F F F F 3 5 1 (3, 2, 1) 14 7 7 F 7 F F 8 B B 8 B B 5 5 5 6 1 2 5 (h, l, l) 12 17 7 F F F A F B 5 5 5 1 3 F 5 (i, K i) 18 1 2 E F F F F 3 E E 3 F F 5 5 5 8 TABLE 6.3.2.1 MASTER TABLES OF CONFIGURATION VECTORS OF t R = 1 AND T < 6 (continued) 209 Configuration Vector Total No. of Cells (T) No. of Rows of the Master Table Master Table Lower Bound on Capability 3 5 (5, 1) 12 3 F F 5 5 3 F F F F 5 1 2 2 5 (1, 2, 2, 1) 16 F 1 F 7 2 E B 8 5 5 7 F F 7 B B 5 1 (2, 1, 2, 1) Ik 3 1 F 5 2 E A A 5 5 6 F F F F 3 5 6 1 2 5 (3, 1, 1, 1) 12 3 F 5 A 5 5 F F F 7 B 5 1 2 5 (1, 3, 1, 1) 16 F 1 7 7 F A 1 A 5 5 7 F F 7 F B 5 o 3' 5 (1, 1, 3, 1) 16 F 1 2 7 B E E 8 8 5 5 7 F F F F 3 5 TABLE 6.3.2.1 MASTER TABLES OF CONFIGURATION VECTORS OF t R = 1 AND T < 6 (continued) K ) No. of Inverse Pairs (D) Configuration Vectors with Fewest Cells Total No. of Cells (1) 1 1 (1, 1) 2 2 (1, 1, 1) (2, 1) 3 (1, 1, 1, 1) 3 (2, 1, 1) (1, 2, 1) (3, 1) k k (1, 2, 1) h (1, 2, 1, 1) 5 (1, 1, 2, 1) (2, 2, 1) (1, 3, 1) 5 6 (1, 3, 1) 5 (1, 2, 2, 1) (1, 3, 1, 1) 7 (1, 1, 3, 1) (2, 3, 1) (1, k, 1) 6 8 (2, 3, 1) (1, K i) 6 TABLE 6.3.2.2 SUGGESTED CONFIGURATION VECTORS FOR FUNCTIONS WITH EIGHT OR LESS INVERSE FAIRS 211 Algorithm 6.3.2.1 : Let f be a Boolean function of n variables. f f f Step 1 : Obtain the stratified structure, (M_, M , . . . , M ), of f. Let D (0 < D < 8) be the number of inverse pairs of f. Step 2 : Use Table 6.3.2.2 to find a suggested configuration vector C for function f. Step 3 : Use Table 6.3.2.1 to find the master table of C. Step h : Use Algorithm 6.3-1.2 to construct an STT representing a type 2 feed-next MOS network with configuration vector C such that the output of the network is f . Example 6.3.2.1 : Let f be a Boolean function of five variables, whose -C* -C* -O -f» -O .p stratified structure is (M, M , M p , M o * M i, > M c: )> an k), there is an £ in { £. , i_, . . ., £ } y ds v - ' a 1' 2' ' r such that e n =0. du a * Note that the first subscript of the functions in this product must be o-l. 215 '11 s 21 g 31 s 32 s hl M? 10 5 M? 10 10 I* M 3 2 ° M f 2 1 M l FIGURE 6.3.2.3 THE SST f USED IN EXAMPLES 6.3.2.2 AND 6.3.2.3 216 d) Condition (c) is not satisfied if any of g . , g . , . . . , c- -, r is deleted from the product. f If there is no one-entry above row M and in column s, then function 1 is defined as a prohibiting product of e. . is Example 6.3.2.3 : Let us assume again that the SST in Figure 6.3.2.3 represents a type 2 feed-next MOS network with configuration vector C ■ (1, 1, 2, l). Let s = t + t + t + 1 = 5, (i.e., j = h, and p = 1 in Definition 6.3.2.2). Then g _g _ (i.e., & = 1 and I = 2 in Definition 6.3.2.2) is a prohibiting product of e__. 15 Even conditions (b) and (c) are satisfied by product g p , , g _ is not a prohibiting product of e because the first subscript of g p1 does not equal j - 1. Like the case of the feed -forward MOS network case, MOS cells can be constructed from expressions without uncomplemented literals. With the new definitions of blocking row and prohibiting product, Algorithm k.k-.l can be used to obtain the expressions without uncomplemented literals f for functions specified by the columns of an RSTT representing a type 2 feed-next MOS network. Example 6.3.2.^- : Let us obtain the expressions without uncomplemented literals of functions specified in the STT produced in Example 6. 3. 2.1 (i.e., the STT in Figure 6.3.2.2 (c)). Ey applying Algorithm k.k.l with the new definitions of blocking row and prohibiting product, the following expressions are produced. 31 = ^0 g 21 g 22 ^ ? 2 g 21 =g 21 g 22^ (X 1*3 " X lV g 21 217 f '22 = ^l g U = ^ X l- X 2 jg ll f >21 = 5 3 g n - ^ 5 = V 3 x 5 g ll V X 1 X 2 X 3 X ^ X 5 g ll = h = x l x 3 X ^ X 5 v X 1 X 2 X 3 X 5 The resulting type 2 feed-next MOS network is shown in Figure 6.3-2.4. Since in Table 6.3.2.2 configuration vectors are suggested only for functions with no more than eight inverse pairs, Algorithm 6.3.2.1 f cannot be applied to construct an STT for functions with more than eight inverse pairs. Since functions of up through 16 variables can have at most eight inverse pairs, Algorithm 6.3.2.1 can be applied to all functions of up through 16 variables. Of course, Algorithm 6.3.2.1 can also be applied to a function of more than l6 variables as long as the function has no more than eight inverse pairs. Furthermore, if configura- tion vectors of more than six cells were exhausted in Table 6.3.2.1, Algorithm 6.3.2.1 could be extended to produce networks for functions with more than 8 inverse pairs. 6.3.3. The Optimality of the Networks Synthesized by Algorithm 6.3.2.1 In this section, we will prove that a network produced by Algorithm 6.3.2.1 is optimal, i.e., it is a type 2 feed-next MOS network which realizes a given function and consists of a minimum number of cells. Lemma 6.3.3.1 : Let f, g , g Q , . . . , g be Boolean functions of x , x , . . . , x . Assume f is a negative function of x, , x^, . . . , x and ' H 1 2 7 ' n g , g 2 , . . . , g . (g , g , . . . , g may not be negative functions). If the sum of the numbers of regular pairs in g , g , . . . , g is S, then there are at most S inverse pairs in f (the inverse pairs are counted by considering f as a function of x n , x„ v ) 1' 2 > • • °> A n 218 V. DD v q DD Q x '11 r 13 x 3 < : U H 1 ^ < x^C x < 3 v c HC '22 1 1 V. DD Q g 21 x J x< X 2 U x^C X 3 x,HC x a < < V o DD < xHC JT '31 2 5 -"j ^ )h FIGURE 6. 3.2. U THE TYPE 2 FEED -NEXT MOS NETWORK PRODUCED IN EXAMPLE 6.3.2.U 219 Proof : Since there must be a regular pair in g , g , . . . , g for every inverse pair of f by Theorem ^.3.1, this lemma obviously holds. Q.E.D. Lemma 6.3.3.2 : Let Q be a type 2 feed-next MOS network with configuration vector C = (t-, t , . . . , t = l). Then there are at most (. . . (((t n +l)t + l)t„ +1) . . .) t_ .. inverse pairs in the output function 12 3 K- J. of Q. Proof : Let the output functions of the cells in the j-th level of Q be g , g , . . ., g- t ( j = 1, 2, . . ., R). Since g.^, z 12 , • • •, g„ , , are negative functions of x., , x„, . . . , x , there is no inverse B lt 1' 2 } ' n 7 pair in any of them. Thus, there is at most one regular pair in each of them. Consequently, the sum of the numbers of regular pairs in g-,-,, S 12' ' " '» g lt iS at m ° St t l* since S 2 1' g 22' ' ' "' S 2t are ne S ative functions of x_ , x_, . . ., x and g n , , g, ,-., . . ., g,, , there are at 1' 2' ' n 11' 12' ' ^lt, ' most t- inverse pairs in each of g ? _ , Snot • • •> Soj. (due to Lemma 6.3. 3«l)» Consequently, there ar at most t. + 1 regular pairs in each of them. Then the sum of the numbers of regular pairs in g p _ , g nn , • • •> go+ ^ s ('tT+lHo* -^y Lemma 6.3«3«1> there are at most (t n +l)t inverse pairs in each of g ., g Q , . . ., g . J J- 3<- j"C« Repaet the above argument for each set of functions g..,, g. n) . . ., S-4. (j = ^> 5, • • «t_). And eventually we will find that there are J at most (. . . ( ( (t + l)t + l)t + . . . ) inverse pairs in g . 1 d 3 t R - 1 V Q.E.D. 220 Theorem 6. 3. 3.1 ; For a given Boolean function f with D inverse piars, the type 2 feed-next MOS network produced by Algorithm 6.3.2.1 for f, consists of a minimum number of cells if D < 8 . Proof : Suppose that Table 6.3.2.2 suggests a configuration vector of T cells for a function with D inverse pairs. In order to show the network produced by Algorithm 6.2.2.1 is optimal, we have to prove every configuration vector of less than T cells is not capable of realizing the function with D inverse pairs. Let us use D = k as an example. Table 6. 3.2. 2. suggests the con- figuration vector (l, 2, l) of four MOS cells for functions with four inverse pairs. Then, let us exhaust all configuration vectors of less than four cells. They are (l), (1, l), (l, 1, l) and (2, l). By Lemma 6.3»3«2, we can calculate the upper bounds on the capabilities of these configuration vectors. These upper bounds are shown in Table 6.3-3.1. Configuration Vector Upper Bound on Capability (1) (1, 1) 1 (1, 1, 1) 2 (2, 1) 2 TABLE 6.3.3.3 UPPER BOUND ON THE CAPABILITIES OF CONFIGURATIONS OF LESS THAN FOUR CELLS Apparently, from Table 6.3.3.1, no configuration of less than four cells is capable of realizing functions with four inverse pairs. 221 Similarly, we can prove the theorem statement for each D where D = 1, 2, . . ., 8 . Q.E.D. 222 CHAPTER 7- CONCLUSION Algorithms are presented in this thesis to synthesize optimal two-level, multi-level feed-forward and multi-level feed-next MOS networks. Since the main objective of this thesis is to minimize the number of cells, these algorithms have no control on the number of FET's in each cell. Therefore some cells synthesized may be too complex to be implemented especially for functions of a large number of variables. However, the algorithms should be practically useful for functions of a small number of variables. Table 7*1 summarizes the upped bounds on the numbers of cells required in two-level, feed-forward, and feed-next MOS networks for functions of up through l6 variables. As shown in the table, optimal two-level MOS networks are also optimal feed-forward and feed-next MOS networks for functions of four or less variables under no restriction on the number of levels. Algorithm J.k.l for synthesizing networks with cells of similar complexities shows one way to reduce the complexities of cells. However, the complexities of the synthesized cells are still not guaranteed to be simple enough for practical implementation. For further simplifi- cation of the cell complexities, more cells than the optimal network may be used. As demonstrated in Example 5 •^-•3* "t ne complexities of cells can be simplified by increasing the number of cells in the net- work to the extent that the basic expression for each cell consists of only one fundamental function. When we want to process a series of input data instead of a single set of input data, a feed-next network with external inputs available 223 Number of Upper Bounds on the Numbers of Cells Variables Feed-forward Feed-next Two -level MOS Networks MOS Networks MOS Networks 1 1 1 1 2 2 2 2 3, k 3 3 3 5, 6 3 k k 7, 8 k k 5 9, 10 k 5 6 11, 12 k 5 7 13, lh h 6 8 15, 16 5 • 6 9 TABLE 7.1 UPPER BOUNDS ON THE NUMBERS OF CELLS REQUIRED IN TWO-LEVEL, FEED-FORWARD, AND FEED-NEXT MOS NETWORKS only to the cells in the first level can generate outputs faster than a feed-forward netowrk. Since feed-next MOS networks with external inputs available only to the first level can realize only negative and positive functions by Theorem 6.2.1.1, delay elements must be used in order to realize any Boolean function. For a function of n variables, r i at most f — ^— J delay elements are required. Algorithm 6.3.2.1 for synthesizing optimal feed-next MOS networks with external inputs available to the cells in any level can be easily extended to synthesize networks for functions of more than 16 variables, Although the optimality of the networks syntehsized for functions of more than 16 variables is not guaranteed, the author believes that the networks are very close to optimal networks, if they are not. 22U LIST OF REFERENCES [I] Akers, S. B. Jr., "A Truth Table Method for the Synthesis of Combinational Logic," IRE Transactions on Electronic Computers, Vol. EC-10, No. h, pp. 60U-615, December, 1961. [2] Boleky, E. J.; Burns, J. R. ; Meyer, J. E. ; Scott, J. H. , "MOS Memory Travels in Fast Bipolar Crowd, " Electronics, Vol. 1+3, No. 15, pp. 82-85, July 20, 1970. [3] Booher, R. K. , "MOS GP Computer," Proceedings of Fall Joint Computer Conference, Vol. 33, pp. 877-889, December, 1968. [k] Boysel, L. L. , "Adder on a Chip: LSI Helps Reduce Cost of Small Machine," Electronics, Vol. kl, No. 6, pp.ll9-12U, March 18, 1968. [5] Boysel, L. L. ; Murphy, J. P., "Four-phase LSI Logic Offers New Approach to Computer Design, " Computer Design, Vol. 9, No.U, pp. 1U1-1U6, April, 1970. [6] Cohen, L. ; Rubenstein, R. ; Wanlass, F. , "MTOS Four-phase Clock Systems," Northeast Electronics and Research Engineering Meeting Record, pp. 170-171, November 1-3, 1967. [7] Crawford, R. H. , MOSFET in Circuit Design, McGraw-Hill, 1967. [8] Cur ran, L. , "Computers Make a Big Difference in MOS Design," Electronics, Vol. 1+2, No. 21, pp. 82-92, October 13, 1969. [9] Electronics, "Silicon and Saphire Getting Together for a Comeback," Electronics, Vol. 1+3, No. 12, pp. 88-9U, June 8, I97O. [10] Faggin, F.; Klein, T., "A Faster Generation of MOS Devices with Low Thresholds Is Riding the Crest of the New Wave, Silicon-gate IC's," Electronics, Vol. 1+2, No. 20, pp. 88-9I+, September 29, 1969. [II] Forsberg, R. W. , "Making Sense out of the MOS Muddle," EDN/EEE, Vol. 16, No. 17, pp. 23-3I+, September 1, 1971. [12] Forsberg, R. W. , "What's Happening in MOS," EDN/EEE, Vol. l6, No. 18, pp. 21-25, September 15, 1971. [13] Garrett, L. S., "Integrated-circuit Digital Logic Families," IEEE Spectrum, Vol. 7, No. 10, 11, 12, 36 pages, October, November, December, 1970. [ik] Gilbert, E. N., "Lattice Theoretic Properties of Frontal Switching Functions," Journal of Mathematics and Physics, Vol. 33, No. k, pp. 57-67, April, 195U. 225 [15] Goldstein, A. D., "Advanced. Packaging and MOS/LSI Used in Miniature Computer Design," Computer Design, Vol. 10, No. 12, pp. 35-UO, December, 1971. Theorey of Switching, pp. 2^^-292, April, 1957- [l6] Hamiter, L. C. Jr., "How Reliable Are MOS IC's? As Good as Bipolars, Says NASA," Electronics, Vol. k2, No. 13, pp. 106- 110, June 23, 1969. [17] Hohn, F. E.; Schissler, L. R., "Boolean Matrices and the Design of Combinational Relay Switching Circuits," The Bell System Technical Journal, Vol. 3I+, No. 1, pp. 177-203, January, 1955- [l8] Ibaraki, T. ; Muroga, So, "Synthesis of a Network with Minimum Number of Negative Gates," IEEE Transactions on Computers, Vol. C-20, No. 1, pp. U9-58, January, 1971- [19] Ibaraki, T. , "Gate-interconnection Minimization of Switching Networks Using Negative Gates, " IEEE Transactions on Computers, Vol. C-20, No. 6, pp. 698-706, June, 1971. [20] Ibaraki, T.j Liu, T. K. ; Djachan, D. ; Muroga, So, "Synthesis of Optimal Networks with NOR and NAND Gates by Integer Program- ming," Report No. U27, Department of Computer Science, Univer- sity of Illinois, 25 pages, January, 1971" [21] Karp, J., "Use Four -phase MOS IC Logic," Electronic Design, Vol. 15, No. 7, pp. 62-66, April 1, 1967. [22] Khambata, A. J., Introduction to Large-scale Integration , John Wiley and Sons, 1969. [23] Lawler, E. L. , "An Approach to Multilevel Boolean Minimization," JACM, Vol. 11, No. 3, pp. 283-295, July, I96U. [2k] Link, F. J.; Cook, R. ; Lesniewski, R. J., "Complementary MOS and Bipolar Make It Together on a Chip," Electronics, Vol. ^3, No. 18, pp. 72-76, August 31, 1970. [25] Liu, T. K. ; Nakagawa, T. ; Muroga, S., "Synthesis Networks of MOS Cells by Integer Programming, " Internal Memo, Department of Computer Science, University of Illinois, 36 pages, 1970. [26] Liu, T. K. ; Hohulin, K. ; Shiau, L. E. ; Muroga, S., "Optimal One-bit Full Adder with Different Types of Gates," IEEE Computer Society Repository, R-72-48, 11 pages, 1972. [27] McNaughton, R., "Unate Truth Functions," IRE Transactions on Electronic Computers, Vol. EC-10, No. 3, pp. 1-6, March, 1961. [28] Macdougall, J.; Manchester, K. ; Palmer, R. B., "Ion Implanta- tion Offers a Bagful of Benefits for MOS," Electronics, Vol. k3, No. 13, pp. 86-90, June 22, 1970. 226 [29] Maitland, D., "N- or P- channel MOS: Take Your Pick . ..," Electronics, Vol. U3, No. 16, pp. 79-82, August 3, 1970. [30] Markov, A. A., "On the Inversion Complexity of a System of Functions," JACM, Vol. 5, No. h, pp. 331-33^, October, I958. [31] Muroga, S., Threshold Logic and Its Applications . John Wiley and Sons, 1971. [32] Nakamura, K. ; Tokura, N. ; Kasami, T., "Minimal Negative Gate Networks, " IEEE Transactions on Computers, Vol. C-21, No. 1, pp. 5-11* January, 1972. [33] Seely, J. L, "Designing with MOS Field Effect Transitors, " Technical Report, General Instrument Corp. [3^1 Shannon, C. E. , "The Synthesis of Two-terminal Switching Circuits, " Bell System Technical Journal, Vol. 28, No. 1, PP- 59-98, January, 19^9- [35] Shiau, L. E., "Design of Optimal One-bit Adder Networks by Integer Programming," Report No. U25, Department of Computer Science, University of Illinois, 66 pages, January, 1971* [36] Shinozaki, T. , "Computer Program for Designing Optimal Networks with MOS Gates," Report No. UIUDCS-R-72-502, Department of Com- puter Science, University of Illinois, 118 pages, April, 1972. [37] Spencer, R. F. Jr., "Complex Gates in Digital Systems Design," IEEE Computer Group News, Vol. 2, No. 11, pp. U7-56, September, 1969. [38] Thomas, E.j Callan, J. D., "Slow, but Small, May Win the Race," Electronics, Vol. kO, No. k, pp. 179-182, February 20, 1967. [39] Warren, R. M. Jr., "Comparing MOS and Bipolar Integrated Cir- cuiter, " IEEE Spectrum, Vol. h, No. 6, pp. 50-58, June, 1967. [U0] Yen, Y. T., "A Mathematical Model Characterizing Four-phase MOS Circuits for Logic Simulation," LEEE Transactions on Com- puters, Vol. C-17, No. 7* PP. 822-826, September, 1968. [kl] Muller, D. E. , "Minimizing the Number of NOT Elements in Com- binational Circuits," memorandum, Bell Telephone Laboratories, 1958. [^2] Akers, S. B. , "On Maximum Inversions with Minimum Inverters," IEEE Transactions on Electronic Computers, Vol. C-17, No. 2, pp. 13^-135, February, 1968. 227 VITA Tso-kai Liu was born in Hu-pei, China in 19^4. He completed his B.S. degree in Electrical Engineering at National Taiwan University in June, 1966. From July, I966 to June, 1967, he served in Chinese Army as a second lieutenant. He began his graduate study at the University of Illinois in September, I967, and received his M.S. degree in Computer Science in February, I969. Since September, 1967, he has been a research assistant in the Department of Computer Science, University of Illinois, Urbana. He is a member of Sigma Xi, Phi Kappa Phi, the Association for Computing Machinery, and the Institute of Electrical and Electronics Engineers. LIOGRAPHIC DATA ET 1. Report No. UIUCDCS-R-72-517 3. Recipient's Accession No. itle and Subtitle NTHESIS OF LOGIC NETWORKS WITH MOS COMPLEX CELLS 5. Report Date May 10, 1972 uthor(s ) Tso-kai Liu 8. Performing Organization Rept. No UIUCDCS-R-72-517 •erforming Organization Name and Address Department of Computer Science University of Illinois at Urbana- Champaign Urbana, Illinois 6l801 10. Project/Task/Work Unit No. 11. Contract/Grant No. NSF GJ-503 Sponsoring Organization Name and Address National Science Foundation Washington, B.C. 13. Type of Report & Period Covered Ph.D. Thesis 14. Supplementary Notes Abstracts An MOS cell is modeled as a building block capable of realizing an arbitrary egative function. A "stratified structure" of a Boolean function is introduced, ased on this structure, algorithms for synthesizing optimal two-level, multi-level =ed-forward and multi-level feed-next MOS networks are presented. An algorithm 3 also developed to synthesize optimal feed-forward MOS networks with cells of Lmilar complexities. .Cey Words and Document Analysis. 17a. Descriptors wS Complex Cells, Optimal Network, Two-level Network, Feed-forward Network, led-next Network, Delay Element o- dentif iers/Open-Ended Terms 'e-'OSATI Field/Group '• 'aiiability Statement Release unlimited *MTIS-35 (10-70) 19. Security Class (This Report) UNCLASSIFIED 20. Security Class (This Page UNCLASSIFIED 21. No. of Pages 227 22. Price USCOMM-DC 40329-P71 JUL 6UT2 I ■ ■ -■ ■ ■ BH ■ --■ ■ I ■ ■ 'M*'. 1 ! ■ unn *i V'* 11 , •Ml ■ ■ HI ■ ■ > ,» « ■ • ■ i H EHM Biui ■ '■ h H H ■BIB I