synthesis algorithms for 2-level mosnetworks transactions on computers) vol. c-24, no. 1, january...

8
IEEE TRANSACTIONS ON COMPUTERS) VOL. c-24, NO. 1, JANUARY 1975 Synthesis Algorithms for 2-level MOS Networks TSO-KAI LIU, MEMBER, IEEE Abstract-Due to the considerable progresses during the past few VDD years, metal oxide semiconductor (MOS) has become one of the most important technologies for large-scale integration (LSI). LOAD_ Since a fairly complex function can be realized by a single MOS cell, ABvC(I most of the conventional algorithms which use NOR, NAND, AND, and A ci OR gates as the basic building blocks are not suitable to synthesize DRIVER MOS networks. This paper presents two simple efficient algorithms B4 Di E-i to synthesize 2-level MOS networks with a minimum number of cells. a' Index Terms-Boolean expression, MOS complex cell, negative function, optimal 2-level network, true vector. I. INTRODUCTION DUE to the considerable progress during the past few years, metal oxide semiconductor (MOS) has become one of the most important technologies for large scale integration (LSI). Since a fairly complex function can be realized by a single MOS cell, most of the conventional algorithms (algorithms using NOR, NAND, AND, and OR gates as basic building blocks) are not suitable to syn- thesize MOS networks. The synthesis problem of a 2-level MOS network with a minimum number of cells was first brought up and solved with a truth table method by Ibaraki and Muroga [3]. Since the power consumption of the cells in a network is fairly uniform in both static and dynamic MOS cases, the minimization of the number of cells in a network is roughly equivalent to the minimization of its power con- sumption. Ibaraki then extended the algorithm in [3] to obtain, among all 2-level networks with a minimum number of cells, the ones with a minimum number of interconnec- tions [4]. Markov [7] and Muller [8] solved the problem of minimizing the number of NOT gates in a network for a given function. (Akers [1] showed a threshold network implementation of their ideas.) Nakamura, Tokura, and Kasami pointed out that the problem of synthesizing a multilevel MOS network with a minimum number of cells is essentially identical to this classical problem'with minor differences [9]. Elaborating the idea of Markov, they presented their algorithms. They also obtained a necessary and sufficient condition for synthesizing a multilevel net- Manuscript received January 11, 1974; revised August 9, 1974. This work, part of the author's Ph.D. dissertation, was supported in part by the National Science Foundation under Grant NSF-GJ-503 and also by the Department of Computer Science, University of Illinois, Urbana, Ill. The author was with the Department of Computer Science, Uni- versity of Illinois, Urbana, Ill. He is now with Bell Laboratories, Naperville, Ill. VDD AVBvC (b) VDD | ABC AA B-' c i (c) Fig. 1. (a)-(c) MOS complex cells. work with a minimum number of cells. Since the optimal network for a given function is not unique, algorithms were presented in [9] to obtain one of them. The algorithms were also extended to synthesize networks with a specified number of levels. The basic building block in a MOS network is the complex cell which consists of a field effect transistor (FET) as the load, and several FET's as the driver. Like the contacts in a relay-contact network, the parallel con- nection of two FET's in the driver realizes an OR operation and the series connection of two FET realizes an AND operation [11]. The output of a complex cell is the com- plement of the logic function represented by the driver. Fig. 1 (a) shows a typical example of a MOS complex cell. The logic function represented by the driver is AB v C(D v E) and the output of the cell is AB v C(D v E). Fig. 1(b) and (c) show the realization of NOR and NAND functions by the MOS cells. Generally, the output of a MOS cell is always a negative function of its inputs, and conversely any negative function can be realized by a single MOS cell. Since any Boolean function of x1,x2, ,xn can be ex- pressed as a negative function in terms of x1x2, -xn and 91yT2) ,x11, it is obvious that any Boolean function can be realized by a single MOS cell if the complements of DvE) 72

Upload: dinhhanh

Post on 21-May-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

IEEE TRANSACTIONS ON COMPUTERS) VOL. c-24, NO. 1, JANUARY 1975

Synthesis Algorithms for 2-level MOS NetworksTSO-KAI LIU, MEMBER, IEEE

Abstract-Due to the considerable progresses during the past few VDDyears, metal oxide semiconductor (MOS) has become one of themost important technologies for large-scale integration (LSI). LOAD_Since a fairly complex function can be realized by a single MOS cell, ABvC(Imost of the conventional algorithms which use NOR, NAND, AND, and A ciOR gates as the basic building blocks are not suitable to synthesize DRIVERMOS networks. This paper presents two simple efficient algorithms B4 Di E-ito synthesize 2-level MOS networks with a minimum number ofcells. a'

Index Terms-Boolean expression, MOS complex cell, negativefunction, optimal 2-level network, true vector.

I. INTRODUCTION

DUE to the considerable progress during the past fewyears, metal oxide semiconductor (MOS) has become

one of the most important technologies for large scaleintegration (LSI). Since a fairly complex function can berealized by a single MOS cell, most of the conventionalalgorithms (algorithms using NOR, NAND, AND, and OR

gates as basic building blocks) are not suitable to syn-

thesize MOS networks.The synthesis problem of a 2-level MOS network with

a minimum number of cells was first brought up and solvedwith a truth table method by Ibaraki and Muroga [3].Since the power consumption of the cells in a network isfairly uniform in both static and dynamic MOS cases,the minimization of the number of cells in a network isroughly equivalent to the minimization of its power con-

sumption.Ibaraki then extended the algorithm in [3] to obtain,

among all 2-level networks with a minimum number ofcells, the ones with a minimum number of interconnec-tions [4].Markov [7] and Muller [8] solved the problem of

minimizing the number of NOT gates in a network for a

given function. (Akers [1] showed a threshold networkimplementation of their ideas.) Nakamura, Tokura, andKasami pointed out that the problem of synthesizing a

multilevel MOS network with a minimum number of cellsis essentially identical to this classical problem'with minordifferences [9]. Elaborating the idea of Markov, theypresented their algorithms. They also obtained a necessaryand sufficient condition for synthesizing a multilevel net-

Manuscript received January 11, 1974; revised August 9, 1974.This work, part of the author's Ph.D. dissertation, was supported inpart by the National Science Foundation under Grant NSF-GJ-503and also by the Department of Computer Science, University ofIllinois, Urbana, Ill.

The author was with the Department of Computer Science, Uni-versity of Illinois, Urbana, Ill. He is now with Bell Laboratories,Naperville, Ill.

VDD

AVBvC

(b)

VDD

| ABC

AA

B-'

ci

(c)

Fig. 1. (a)-(c) MOS complex cells.

work with a minimum number of cells. Since the optimalnetwork for a given function is not unique, algorithmswere presented in [9] to obtain one of them. The algorithmswere also extended to synthesize networks with a specifiednumber of levels.The basic building block in a MOS network is the

complex cell which consists of a field effect transistor(FET) as the load, and several FET's as the driver. Likethe contacts in a relay-contact network, the parallel con-nection of two FET's in the driver realizes an OR operationand the series connection of two FET realizes an ANDoperation [11]. The output of a complex cell is the com-plement of the logic function represented by the driver.Fig. 1 (a) shows a typical example of a MOS complex cell.The logic function represented by the driver is AB v

C(D v E) and the output of the cell is AB v C(D v E).Fig. 1(b) and (c) show the realization of NOR and NANDfunctions by the MOS cells. Generally, the output of aMOS cell is always a negative function of its inputs, andconversely any negative function can be realized by a singleMOS cell.

Since any Boolean function of x1,x2, ,xn can be ex-pressed as a negative function in terms of x1x2, -xn and91yT2) ,x11, it is obvious that any Boolean function canbe realized by a single MOS cell if the complements of

DvE)

72

LIU: SYNTHESIS ALGORITHMS FOR 2-LEVEL MOS NETWORKS

inputs are available. When the complements of inputsare not available, all xljx2, ,Xi can be obtained with ncells realizing the NOT function. Then, the function can berealized by using one additional cell. Therefore, anyBoolean function of n variables can be realized by a 2-levelnetwork with at most n + 1 cells. References [3] and [9]have shown that fewer cells are generally required.Assuming that the complements of inputs are not

available, this paper presents a different approach fromthe ones in [3] and [9] to synthesize 2-level MOS net-works with a minimum number of cells. The algorithms in[3] and [9] can be divided into two parts. First, the out-puts of each cell in the network are generated and rep-resented in a truth table form. Then, a negative expression(an expression contains only complemented literals) isobtained from the truth table for each output function.Based on the negative expressions, the MOS cells in thenetwork can be constructed. The algorithms in this papercreate the negative expressions for all cells in the networkdirectly from a special structure, the stratified structure,of the function being synthesized.

II. THE STRATIFIED STRUCTUREOF A BOOLEAN FUNCTION

Let an input vector a of a Boolean function f be calleda true or false input vector depending on whether f(a)equals 1 or 0, respectively. In this section, all the trueinput vectors of a Boolean function are grouped into trueclusters. From the true clusters a structure, stratifiedstructure, is constructed which is not only useful in syn-thesizing 2-level MOS networks but also very useful insynthesizing multilevel networks [5].

Definition 1: Two true vectors a1 and a2 of a Booleanfunction f are said to be separated if there is a false vector bsuch that a1 > b > a2.1 This relation is denoted witha1/a2.

Similarly, "separated" is defined for two false vectors.Lemma 1: If a1/a2 and a2/a3, then al/a3.Definition 2: Let aj be a true vector of f. Suppose that

there are e true vectors of f, aj1,ah2, ... ,aj, which satisfythe relation

ailahlah2/ ..* aj,. 1

And suppose that it is impossible to find more than e truevectors satisfying relation (1). Then e is called thedegree of aj. The set of all true vectors with degree e iscalled the true cluster of degree e.Example 1: A four variable function is shown in Fig. 2.

There are no false vectors smaller than any of I (1100),(0100), (1000), (0001), (0000) }. Therefore, they cannot beseparated from any other smaller vectors. Hence, theirdegree is zero. For each of (0011), (1010) and (1011), wecan find at most one smaller true vector, which satisfies(1). Hence, their degree is one. For vector (1111), there

1The comparison of input vectors is component-wise.

*: FALSE VECTOR

o: TRUE VECTOR

Fig. 2. A four-variable function.

are two true vectors (0011) and (0000) satisfying (1111)!(0011)/(0000), but no more. Hence, the degree of (1111)is two. Consequently, we have the following.

True cluster of degree 0 = -{ (1100),(0100),(1000),(0001),(0000) }

True cluster of degree 1 = { (1011), (0011), (1010) },and

True cluster of degree 2 = 1(1111) }.

Definition 3: Let f be a Boolean function with r trueclusters. The stratified structure of f is a sequence ofsubsets of input vectors, (Mof,M1f,.-. ,M2f), defined as:

Rule 1: M2i+1f for i = 0,1,,r - 1, is the true clusterof degree i.

Rule 2: M2if for i = 1,2,*r -1*, is the set of all inputvectors each of which satisfies the following conditions:

a) greater than at least one input vector in M2i- i;b) not greater than (i.e., less than, equal to, or not

comparable to) any input vector in M2i+i';c) neither in M2i-1f nor in M2i+1J.

Rule 3: Mof is the set of all input vectors which areneither greater than nor equal to any input vector in MVf.

Rule 4: M2rf is the set of all input vectors which aregreater than at least one vector, but not equal to anyinput vector in M2r- if.

It is clear from the above definition that MofM'f,-..M2rf are disjoint, all true vectors are contained in M2i+if(i = 0,1, ,r-1), and all false vectors are containedin M2if, (i 0,1,j.. ,r) [5]. Hence, M2if is called a falsecluster. Both true and false clusters are called clusters.Example 2: The function in Fig. 3 has two true clusters.

Hence:

Mf= True cluster of degree 0 = (1100),(0100),(1000), (0001), (0000) I .

M3f = True cluster of degree 1- { (1011), (0011),(1010) }.

73

IEEE TRANSACTIONS ON COMPUTERS, JANUARY 1975

Mf0 = 0

Fig. 3. Example of the stratified structure.

Then M2f can be obtained, from Mif and M3f, accordingto Rule 2 in Definition 3:

M2f = {(1101),(0101),(1001),(0110),(0010)}.

From a) and b) of Rule 2 in Definition 3, we know thatall the vectors in M2f are greater than at least one vectorin M1f but none of them (e.g., 1101) are greater than anyvector in Msf. Input vector (1110) is greater than vector(1100) in M1f. However, (1110) is not included in M2fbecause it is also greater than vector (1010) in M3f. Inputvector (0100) is greater than vector (0000) in Mif and notgreater than any vector in M3f. However, (0100) isexcluded from M2f by c) of Rule 2 in Definition 3 becauseit is in M1f. Since there is no input vector smaller than(0000), and since (0000) is in M1f, the set Mof is emptyby Rule 3 of Definition 3. Finally, M4f is generated fromM3f according to Rule 4 of Definition 3. We have

M4f- {(1111),(0111),(1110)}.

Theorem 1: Let (Mof,M1f,...*,M2rf) be the stratifiedstructure of a Boolean function f. No pair of vectors inM/ (j = 01,2,- ,2r) is separated from each other.

Proof: Let a, and a2 be two vectors in M2i+lf (i=0,1,2,* . .,r - 1). Then a, and a2 are true vectors ofdegree i. Suppose that

a1/a2- (2)

Since a2 is of degree i, there are i true vectors, b1,b2, ...* ,bisuch that

a2/bi/b2/ .. bi.-(3

By (2) and (3), a1/a2/bi/b2/.. ./b1. Thus the degree of a,is at least i + 1, a1 cannot be in M2i+±f. This is a contradic-tion. Hence, a1 cannot be separated from a2.

Since M2if (i = 0,1,2,-.,r) is a true cluster of f, asimilar argument as above can be applied to prove thatany two vectors in M27f are not separated from eachother. Q.E.D.A few other properties of the stratified structure of a

Boolean function can be found in [5].

III. SYNTHESIS ALGORITHMSA model of a 2-level MOS network is shown in Fig. 4.

Two algorithms to synthesize such a network for a givenBoolean function are presented in this section.

Definition 4: Assume a is a true vector of a Booleanfunction f. Then a is detached (i.e., detached from vector0) if there is a false vector of f, b, such that a > b. a issaid to be attached if it is not detached.Lemma 2: Let (Mof,M1f,..-,M2rf) be the stratified

structure of a Boolean function f. Then:

a) all the input vectors in M3V,MV, .',M2r_lf aredetached true vectors and

b) the vectors in Mif are detached if and only ifMof is not empty.

The proof of this lemma is obvious from Definition 3.Definition 5: a-term of an input vector is the product of

complemented literals corresponding to the 0's in theinput vector, and /3-term of an input vector is the productof uncomplemented literals corresponding to the l's inthe input vector. As two special cases, the a-term of 1 andthe A-term of 0 are defined as 1. a /30 is called the mintermof the input vector.Example 3: Let a = (110100) be an input vector.,Then

the a-term of a is x3x5x6 and the d-term of a is xlx2x4.a-# = Cx3x5x6X12x4 is the minterm of a.Lemma 3: Let a and A be the a-term and /3-term of an

input vector a. Then:

a) a = 1 for an input vector b if and only if a > b.b) / = 1 for an input vector b if and only if b > a.

Theorem 2: Let SA = {al,a2, ..,ak} be a subset of allthe attached true vectors of a Boolean function f. Leta1,a2,** ,ak be the a-terms, and A1,A2,.* *,Ak be theminterms of aj,a2,...,a,. Then we have

AivA2v ... vAk C alva2v *', vak Cf.Proof: Since A1,A2, ... ,Ak are minterms of al,a2,* ak,

all the true vectors of A, v A2 v * v Ak are obviouslyal,a2, - ,ak. By part a) of Lemma 3 aj = 1 for a1, i.e.,

74

M:f'

LIU: SYNTHESIS ALGORITHMS FOR 2-LEVEL MOS NETWORKS

xi'

xnX2

Xn

Fl

Fuf(xp,x2, .xn)

gk

IRST LEVEL SECOND LEVEL

F(x1. x2. *Xn 91, 92 I gk) = f(xl, X2,- xn) AND

91. 92 gkl F ARE NEGATIVE FUNCTIONS

Fig. 4. 2-level MOS network.

(al v a2 V V Ckk) = 1 for aj. In other words, all the truevectors of A, v A2v ... v Ak are also true vectors ofalva2v ... v ak. HenceA,vA2v * vAAh a,lva2 * V ak.Assume b to be a true vector of (al v a2 V .*. .V ak).

Then there must be an a, (1 < j < k) such that ca, = 1for b. By part a) of Lemma 3, we have aj 2 b. Since aj isan attached true vector of f, b must also be a true vectoroff. Hence a, v a2 ... V aOk Cf. Q.E.D.By Definition 3 MOf,M2f,M4f, *,M2rf consist of all the

false vectors of f, i.e., all the true vectors of f. By consider-ing M0',M2f,. ',M2rf as sets of true vectors of f, thefollowing corollary can be obtained.

Corollary 1: Let a2,,1,a2r,2, - ,, a2r,q2, be all the vectors inM2rf of f. Let 12r,i and A2r,j be the fl-term and the mintermof a2r,i (1 < i < q2r), respectively. Then A2r,1 v A2r,2 V VVA2r,92, C 2r,1 V 132r,2 V . . . V 132r,q2r C f

Theorem 3: Let S = {a1,a2, ... aka be a set of truevectors of a Boolean function f. Let aj, fj, and Aj be thea-term, ,B-term and minterm of aj (1 < j < k), respec-tively. If no pairs of vectors in S are separated from eachother, then

AlvA2v * vvAk

C (a va v *V Vyk) (v1V2v*0*2 * v k) C f.

Proof: Since aifl is the minterm of aj,aj = 1 andflj = 1 for aj. Since al,a2, * * *,ak are all the true vectors ofAl v A2 v *. v Ak, we have A1 v A2 ... v Ak C (al v al v

V ak) (iV f2 V *--V fk).Let b be a true vector of (al v a2 ... vYak) (B1 vf2 v . . . V

3k). Then there must be an ak, and a fk2 (1 < k, < k,1 < k2 < k) such that akx = 1 and fk2 = 1 for b.

If ki = k2, then b is one of the vectors in S, i.e., b is atrue vector of f.

If ki 5 k2, then, from Lemma 3, aki < b < a7k2. Sinceak, and ak2 are not separated from each other, b must be

a true vector of f. Hence (al v a2 V Ya* a7k) (f1 V f2 V ... V07k) C f. Q.E.D.Example 4: Let us consider function f in Fig. 5. We have

Mof = { (0000), (0010), (0100)}

Mif = {(OO01),(1000),(0101),(1001),(011O),(1O1O)}

M2f = {(OOM11),(11O),(1011),(1101)}M3f = {(0111),(1110)}

M4f = {(1111)}.

By Theorem 1, no pair of vectors in M1f or M3f is separatedfrom each other. Then by Theorem 3, we have

(X1X2h3 V X2X3X4 V XlX3 V X2X3 V x1x4 V X2X4)

* (X4 V XI V X2X4 V XlX4 V X2X3 V XlX3) C ffor set Mif and

(Xl V X4) (X2X3X4 V Xlx2X3) C f

(4)

(5)

for set Al3f.Eliminating the redundant terms or terms which sub-

sume others in (4) (this is equivalent to keeping in (4)only a-terms of the maximal vectors of M1f, and f-termsof the minimal vectors of Mlf), we get

(XlX3 V X2X3 V X1X4 V X2x4) (X1 V X4 V X2X3) C f. (6)By taking the disjunction of (5) and (6), the followingrelation is obtained:

(Xl V X4) (X2X3X4 V X1X2X3) V (XuC3 V X2X3 V X1X4 V

X2X4) (Xl V X4 V X2X3) C (7)

The disjunction of the minterms which correspond to allvectors in Mlf O M3f implies the left-hand side of (7)because of Theorem 3. Since Mlf U M3f includes all truevectors of f, (7) can be changed to equality, i.e.,

75

IEEE TRANSACTIONS ON COMPUTERS, JANUARY 1975

Fig. 5. Boolean function for Example 4.

f = (X1V *4) (X2X3X4 V XlX23) V (XI93 V X2X3 V XiX4 V

X2X4) (x1 V X4 V X2X3). (8)

Using expressions

VDD

91 = X2X8X4 V XlX2XS

92 = Xl v x4v x2x3,

(9)

(10)

then (8) may be rewritten as

f = (x V X4)g91 V (X1X3 V X2X V X1X4 V X2*4)22

= (xlx4 v91) ( (xlv X3) (X2 VX3) (Xl V X4) (X2v X4) V 92). (11)

From (9)-(11) we find that gl,g2 are negative functionsof xi, x2, x3, and x4; and f is a negative function of xi, X2,X8) X4, gi, and g2. Therefore, a 2-level network realizing fcan be constructed according to, (9)-(11) as shown inFig. 6, where there is a cell in the first level for each ofM1f and Msf (i.e., the cell for generating g2 and gi, respec-tively). However, if the vectors in Mif are attached truevectors, which is the case in the next example then thereis no need for a cell in the first level for M1f.Example 5: Let us consider function f in Fig. 7. We have

Mif = {(0000), (0001), (1000)}

MI2 = {(0010),(0100), (0011), (1001), (1100)}Mf = {(0101),(0110),(1010),(0111),(1110)}M4f = {(1011),(1101)}

Msf = {(1111) }

Since Mof is empty, all vectors in M1f are attached truevectors of f.By Theorem 2, we have for set MVf

tl92x3x4 v xlx2x3 V x2x3x4) C f. (12)Since Theorem 2 instead of Theorem 3 is used, ,8-terms arenot included in the left-hand side of (12). Eliminating theredundant terms in (12), we get

(Clj28 vx2Vx2x4) C f. (13)

By Theorems 1 and 3, we have for M3f and M6f aftereliminating the redundant terms

Fig. 6. 2-level network for Example 4.

Fig. 7. Boolean function for Example 5.

(X1 V X4) (X2X4 VX2za VXIX) C f

1 - (xIxxSX4) C f.

(14)

(15)

For the same reason as in Example 4, we have from(13)-(15)

76

LIU: SYNTHESIS ALGORITHMS FOR 2-LEVEL MOS NETWORKS

VD

Fig. 8. 2-level network for Example 5.

f = X1X2X3 V X2X3X4 V (X1 V X4) (X2X4 V X2X3 V X1X3) V XlX2X3X4.(16)

Using expressions

g1 = x2X4 v x2x3 v X1x3 and g2 = XlX2X3X4,

then (16) can be rewritten as

f = X1X2X3 V X2X3X4 V (X1 V X4)91 V U2

-(X V X2 V X3) (X2 VX3 V X4) (g1 V X1X4)g2.

Thus a 2-level MOS network for f can be constructedaccordingly as shown in Fig. 8. There is a cell in the firstlevel for each of M3f and M5f (i.e., cell for generating g2and gi, respectively). However, because d-terms are notincluded in the left-hand side of (12), there is no cell inthe first level for the attached true vectors, i.e., Mlf.As illustrated in Examples 4 and 5, we can have the

following algorithm to synthesize a 2-level network fora given function.

Algorithm 1

Step 1: Obtain the stratified structure (Mof,M'f,.,M2/) of a given Boolean function f.

Step 2: Check whether Mof is empty. If it is, then markMif as the set of attached true vectors and M3',M5',..,M2r,f, the sets of detached true vectors. Otherwise, allMlf,M3 , ... XM2r- f are sets of detached true vectors.

Step 3: For each set of detached true vectors M2i lf,construct a first-level cell whose output is specified as

g = (Ai, V 1i,2 V ... v $i,ti)

where lAt,,13 2, i.* - ti are the d-terms of all the minimumvectors in M2i-if.

Step 4: Construct the output cell (second-level cell)according to the following expression of f.

r

f =(V (ati,l v ati,2 v*** v azwiq)9i) v Qi-2

where ai1,ai,2, *,ai,qi are a-termsvectors in M2i-if, and

of all the maximum

a,,,1 V al,2 v V* avCl,qi if the vectors inM1f are attached.

|(a,l V al,2 v ** v alq,,)91 if the vectors inM1f are detached.

Theorem 4: The 2-level network obtained by Algorithm 1realizes Boolean function f.

Proof: As illustrated in Examples 4 and 5, thistheorem is obvious by Theorems 1-3. Q.E.D.

Theorem 5: Assume al,a2, * * * a.e are detached true vectorsof f, and al/a2/.. /al,. Then there are at least e cells inthe first level of any 2-level network that realizes f.

Proof: Suppose that f is realized by a 2-level networkas in Fig. 4. Then f can be written as

f = PO V P1911912. *1qj V P2921922... g922 V . . .

v Pz#11#12. g9q, (17)

where gji E { {g1,g2,-**,gkI and Pj is a product of com-plemented literals. (Note that Po,P1,P - - ,PI, 919,2, . ,g arenegative functions.)

Since al,a2, -. ae are detached and al/a2/.../ae, thereare false vectors bi,b2'- ,be such that a, > bi > a2 >b2 > ... > ae > be. Since a, is a true vector of f, theremust be a term, Pi1lyl ij2 ... gil which equals 1 for al,in (17). Consequently,

Pil = Oil = giI2 = - = = 1 for a1. (18)

Since Pi, is a negative function and a1 > bi, Pi, = 1 for b1.However, b, is a false vector of f. Therefore, there is atleast one function, gild, such that gild = 0 for bi in orderto assure that Pigyilgi2...g7lql = 0 for bi. Since gild is apositive function and bi > a2 > a3 > ... > ae, we have

gild = 0 for a2,a3, * *,a,. (19)

77

IEEE TRANSACTIONS ON COMPUTERS, JANUARY 1975

Summarizing (18) and (19), gild= 1 for a, and q1ld = 0for a2,a3,.* -,a,.

Similarly, we can prove that for any a, there existsa function gi,d such that jd=1 for a, and 9gid = 0 forat+1,at+2,..*,ae. Since gi,id,gi2,.* ,gid are all different andnot trivial functions2 (because each of them is 1 for biand 0 for ai), there are at least e cells in the first level ofthe network. Q.E.D.

Theorem 6: Given a Boolean function f, the 2-levelnetwork obtained by Algorithm 1 consists of a minimumnumber of cells.

Proof: Let us divide the proof into two cases.Case 1-When Mof is empty: Then M1f is the set of

attached true vectors, and M34,MV,. ',M2,-lf are sets ofdetached true vectors. Then there are detached truevectors, ai,a2,- . ,ar1 such that ai E M2i+lf for each i andar l/ar_2/... /a,. By Theorem 5, there are at least r - 1cells in the first level of any 2-level network realizing f.Algorithm 1 yields exactly r - 1 cells in the first level

of the constructed network. Hence the network consistsof a minimum number of cells.

Case 2-When Mof is nonempty: Then Mlf,M3f, *M2r_lf are sets of detached true vectors. Then there aredetached true vectors a0,ao,2..,ar1 such that ai E M2i+lfand ar-1/ar-2/... /ao. By Theorem 5, there are at least rcells in the first level of any 2-level network realizing f.The network generated by Algorithm 1 consists of

exactly r cells. Hence the network consists of a minimumnumber of cells. Q.E.D.Theorem 4 and 6 assert that the 2-level network gen-

erated by Algorithm 1 is an optimal network. Further-more, the following corollary can be derived directly fromAlgorithm 1.

Corollary 2: Let (Mof,M1f,.- 0,M2rf) be the stratifiedstructure of a Boolean function f. Any optimal 2-level-network for f consists of r - 1 cells in the first level, ifMof is empty; and r cells, if Mof is not empty.

In the following, an alternative algorithm to synthesizea 2-level network will be presented based on the com-plement of a given Boolean function.Example 6: Let us consider the same function as that

in Example 4, i.e., the function in Fig. 5. In this example,a 2-level MOS network is constructed for f based on thefalse clusters of f instead of the true clusters.By Corollary 1, we get from M4f

1 (xlx2xaX4) Cf. (20)

By Theorems 1 and 3, the following relations are generatedfrom M2f and Mof after eliminating redundant terms:

(X2 V X3) (X3X4 v X1X2) Cf (21)

(xlx2xQ v xCxCx4)* Cf. (22)Taking the disjunction of (20) -(22), we get from Theorem3 and Corollary 1

2 Functions xl,x2, * x, 0, and 1 are considered here as trivalfunctions.

f = X1X2X3X4 V (X2 v X3) (X3X4 V X1X2) V XlX2X3 V XlX3X.4 (23)

Using expressions

91 = X2 V X3 and 92 = x1x2x4 V x3x34,

then (23) can be rewritten as

f = X1X2X3X4 V g1(X3X4 V X1X2) V 92.

Hence, according to the expressions of f, g1, and g2, a 2-levelMOS network is constructed as shown in Fig. 9.By Corollary 2, an optimal 2-level network of f should

consist of two cells in the first level. This is exactly thecase of the network in Fig. 9. Therefore, the network inFig. 9 is an optimal 2-level MOS network for f.

For function f considered in Examples 4 and 6, thenetwork in Fig. 9 consists of less FET's than the one inFig. 6. However, for other functions networks produced byAlgorithm 1 may consist of less FET's than those pro-duced by the algorithm illustrated in Example 6, i.e., thefollowing Algorithm 2.The network in Fig. 9 consists of a first-level cell for

each of the set MOf M2f ,v*M2f(7.i) No first-level cellfor M2f is necessary. With this fact in mind, we candevelop the following algorithm for the synthesis of op-timal 2-level networks.

Algorithm 2

Step 1: Obtain the stratified structure (Mof,Mlf ...

M2rf) for a given Boolean function f.Step 2: For each nonempty set of Mof M2fM4f

M2 (r-1)f, construct a first-level cell3 whose output functionis specified by

gi = aiv,lVai2 V ... V aigi

where aOfi,l,ai,2,. ,ai,i are the a-terms of all the maximumvectors in M2 f.

Step 3: Construct the output cell according to thefollowing expression of f:

f = ((V (Oti V,Oi,2 V * *Vi,ti) gi) Vi=O

(132r,1 V 02r,2 V *.. V (32r, t) (24)

where 1i1,13i,2, , li,ti are the 3-terms of all the minimalvectors in M2if. If Mof, or M2/, is empty, the correspondingterm does not appear in (24).

Theorem 7: Given a Boolean function f, the 2-levelnetwork obtained by Algorithm 2 realizes f and consists ofa minimum number of cells.

Proof: As illustrated in Example 7, (24) is true.Hence, 2-level network obtained by Algorithm 2 realizes f.By Step 2 of Algorithm 2, there are r - 1 cells in the

first level if Mof is empty, and r cells if Mof is not empty.

3 Since only Mof may be empty, there are r - 1 or r cells in thefirst level depending on whether Mof is empty or not.

78

LIU: SYNTHESIS ALGORITHMS FOR 2-LEVEL MOS NETWORKS

XI A X 2 q X4I

Fig. 9. 2-level net,

By Corollary 2, the network obtained by Algorithm 2 isan optimal network. Q.E.D.

IV. CONCLUSION

Two algorithms for synthesizing 2-level MOS networksare presented in this paper. Since these algorithms arealgebraic, they are especially suitable for hand computa-tion for functions of a small number of variables. Althoughcompletely specified functions are used in the examples forthe sake of simplicity, all definitions and theorems inthis paper are also true for incompletely specified functionsby simply disregarding all the DON'T CARE input vectors.(Only specified input vectors are included in Mif's.)Hence, the algorithms can be generalized to incompletelyspecified functions as well.

In practice, the number of FET's in a network is asimportant as the number of cells in a network. Therefore,the common literals in the negative expressions generatedby the algorithms should be factored out in order to reducethe number of FET's in each cell.

Although any Boolean function can be theoreticallyrealized by a single MOS cell, there are practical limits onthe number of FET's in series and the number of FET'sin parallel for each MOS cell. Therefore, it is desirable toobtain MOS networks which contain cells of reasonablecomplexity. Synthesis algorithms which take into con-sideration of the complexity of cells are discussed in [5].

ACKNOWLEDGMENT

The author wishes to thank his advisor, Prof. S. Muroga,for his encouragement and invaluable guidance during thiswork, and also for his careful reading and constructivecriticism of the original manuscript. The author alsowishes to thank Dr. Y. Kambayashi and T. Shinozaki fortheir helpful comments.

work for Example 6.

REFERENCES[1] S. B. Akers, Jr., "On maximum inversions with minimum in-

verters," IEEE Trans. Comput., vol. C-17, pp. 134-135, Feb.1968.

[2] E. N. Gilbert, "Lattice theoretic properties of frontal switch-ing functions," J. Math. Phys., vol. 33, pp. 47-67, Apr. 1954.

[3] T. Ibaraki and S. Muroga, "Synthesis of networks with aminimum number of negative gates," IEEE Trans. Comput.,vol. C-20, pp. 49-58, Jan. 1971.

[41 T. Ibaraki, "Gate interconnection mnimization of switchingnetworks using negative gates," IEEE Trans. Comput. (ShortNotes), vol. C-20, pp.. 698-706, June 1971.

[5] T. K. Liu, "Synthesis of logic networks with MOS complexcells," Ph.D. dissertation, Dep. Comput. Sci., Univ. Illinois,Urbana, Rep. UIUCDCS-R-72,517, May 1972.

[6] T. K. Liu, T. Nakagana, and S. Muroga, "Synthesis networksof MOS cells by integer programming," Internal Memo, Dep.Comput. Sci., Univ. Illinois, Urbana, 1970.

[7] A. A. Markov, "On inversion complexity of a system of func-tions," J. Ass. Comput. Mach., vol. 5, pp. 331-334, Oct. 1958.

[8] D. E. Muller, "Minimization the number of NOT elements incombinational circuits," Memo, Bell Telephone Laboratories,1958.

[91 K. Nakanmura, N. Tokura, and T. Kasami, "Minimal negativegate networks," IEEE Trans. Comput., vol. C-21, pp. 5-11,Jan. 1972.

[10] T. Shinozaki, "Computer program for designing optimal net-works with MOS gates," Dep. Comput. Sci., Univ. Illinois,Urbana, Rep. UIUDCS-R-72-502, Apr. 1972.

[11] R. F. Spencer, Jr., "Complex gates in digital systems design,"IEEE Comput. Group News, vol. 2, pp. 47-56, Sept. 1969.

Tso-Kai Liu (S'71-M'72) was born in Hupei,China, on January 19, 1944. He received theB.S. degree in electrical engineering fromNational Taiwan University, Taipei, in 1966,and the M.S. and Ph.D. degrees in computerscience from the University of Illinois, Ur-bana, in 1969 and 1972, respectively.He is now with Bell Laboratories, Naper-

ville, Ill., and is involved in the developmentof small electronic switching systems.

Dr. Liu is a member of Sigma Xi, PhiKappa Phi, and the Association for Computing Machinery.

79