Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Multilevel Logic Minimization Using Implicit Don''t Cares

1996

723 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. 7, NO. 6, JUNE 1988 Multilevel Logic Minimization Using Implicit Don’t Cares zyxwvutsrqp KAREN A. BARTLETT, ROBERT K. BRAYTON, FELLOW,IEEE, GARY D. HACHTEL, FELLOW,IEEE, REILY M. JACOBY, CHRISTOPHER R. MORRISON, RICHARD L. RUDELL, ALBERT0 SANGIOVANNI-VINCENTELLI, FELLOW,IEEE, AND ALBERT R. WANG Abstract-This paper describes a new approach for the minimization of multilevel logic circuits. We define a multilevel representation of a block of combinational logic called a Boolean network. We propose a procedure, ESPRESSO-MLD, to transform a given Boolean network into a prime, irredundant, and “R-minimal” form. This procedure rests on the extension of the notions of primality and irredundancy, previously used only for two-level logic minimization, to combinational multilevel logic circuits. We introduce the new concept of R-minimality, which implies minimality with respect to cube reshaping, and demonstrate the crucial role played by this concept in multilevel minimization. We give theorems which prove the correctness of the proposed procedure. Finally, we show that prime and irredundant multilevel logic circuits are 100-percent testable for input and output single stuck faults, and that these tests are provided as a by-product of the minimization. I. INTRODUCTION N THIS PAPER an “efficient” procedures is presented for obtaining high-quality heuristic multilevel logic minimization results for a given logic network and making it much more testable than merely 100-percent testable for the conventional input and output single stuck faults. The approach is based on determining the complete don’t care set for each 2-level function embedded in a network of such functions. Once this is done, a 2-level minimizer can be used to minimize the subfunction. The high degree of testability achieved by this approach requires no separate test generation processing, since all tests are produced as a by-product of well-known 2-level minimization procedures. We use the term “efficient” advisedly. It is clear that all procedures for reducing either two-level or multilevel Boolean networks into prime and irredundant form must I Manuscript received December 8, 1986; revised November 17, 1987. This work was supported in part by the National Science Foundation under Grant NSF DMC-8419744, by the General Electric Company, and by the IBM Corporation. The review of this paper was arranged by A. J. Strojwas, Editor. K. A. Bartlett was with the University of Colorado at Boulder, Boulder, CO. She is now at Seattle Silicon Technology, Inc., Bellevue, WA 98005. R. K . Brayton was with IBM T. J. Watson Research Center, Yorktown Heights, NY. He is now with the Department of Electrical Engineering and Computer Sciences, University of California, Berkeley, CA 94720. G. D. Hachtel, R. M. Jacoby, and C. R. Morrison are with the Departments of Electrical and Computer Engineering and Computer Science, University of Colorado at Boulder, Campus Box 425, Boulder, CO 80309. R. L. Rudell, A. Sangiovanni-Vincentelli, and A. Wang are with the Department of Electrical Engineering and Computer Sciences, University of California, Berkeley, CA 94720 IEEE Log Number 8719390. be NP-complete or co-NP-complete (i.e., all procedures have O ( 2 “ ) complexity). But given this ominous sign of intractability, fairly large Boolean networks may yet be minimized (up to 60 inputs at the time of this writing) on available workstation size computers. In this context we use “efficient” only in comparison to the trivial approach of iteratively calling an automatic test generation tool and modifying the network by hand each time a nontestable fault is discovered (cf. Section VI-B below). Here the “efficiency” of the presented procedures is derived from the application of two-level logic minimization procedures of proven efficiency to the multilevel case (cf. the discussion at the beginning of Section 111). We expect that these procedures will excel in applications where individual nodes of the Boolean may have large sum-of-products representations. The subject of 2-level logic minimization is well developed and well understood [5]. We know exact techniques which provide minimum representations of the given logic (cf. [23], [ l l ] , [28]). We also have seen two generations of programs for generating near minimum logic representations (cf. SHRINK [25], MINI [20], ESPRESSO-I1 [7], ESPRESSO-IIC [28], ESPRESSO-MV [29]). We also know how to determine if two functions are equivalent and when we have irredundant logic (cf. [25], [30], [lS]). These notions have been extended to multi-output functions, and functions of multi-valued variables [20], [29]. Significant progress has been made on the state-assignment problem and other encoding problems using two-level logic [13]. In short, this is a welldeveloped science. In contrast, multilevel minimization is less structured, more difficult, and relatively new. A worthwhile longterm goal is to bring understanding of this subject up to the level of science currently established for two-level minimization. Multilevel minimization as a science suffers from the same things that make it attractive for implementing logic, namely, it is very flexible. Hence, the problems are not so well defined. In contrast, for twolevel minimization, we often have in mind a PLA implementation and, therefore, the minimization problem (i.e., minimize the number of product terms) can be abstracted and made largely independent of the technology of the implementation. Multilevel synthesis has the advantage over PLA syn- zyxwvutsrqpon 0278-0070/88/0600-0723$01.OO I -- -- - zy zyxwvut O 1988 IEEE ~~ 1 I 124 zyxwvutsrqponmlkj zyxw IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN. VOL. 7 . NO. 6. JUNE 1988 thesis in that it is good for representing and implementing any type of logic. Typically, logic has been divided into two groups, control and data-flow logic, with control logic perceived as suitable for PLA implementation while dataflow usually requires multilevel logic (sometimes called random logic). This sometimes forces an unnatural decomposition, with the control logic made by PLA generators and the data-flow hand designed or obtained from parameterized libraries. Multilevel logic is suitable for all types of logic, and automatic and optimal multilevel logic synthesis forces no such dichotomy on the user. In many applications it is more suitable in fact to mix the two types of logic, for example, for more optimal logic (i.e., by capturing mutual don’t care situations), because of layout considerations, or for easier specification at the functional level. Historically, the literature on multilevel minimization consists mainly of results on factoring (i.e., decomposing) a single Boolean function [22], [9], [4]. Emphasis in the present paper is on optimizing a given (i.e., already decomposed) structure. Since multilevel logic is more difficult to optimize, most of the designs involving multilevel logic have been carried out by hand, using a “bag of tricks.” Recently, several approaches to automatic multilevel logic optimization have been proposed and have found application in a variety of technologies [12], [6], [17], [14], [21]. In all these approaches, emphasis has been placed on efficient decomposition and factorization techniques which create a certain multilevel logic structure, which in this paper we call a Boolean network. Creation of this structure establishes the overall architecture of the logic to be implemented, and roughly establishes the final point to be reached on the area-delay tradeoff curve; it has been shown in [2] that this process alone seldom comes close to realizing the full benefits of minimization. However, two major tasks still need to be accomplished before the full potential of a given decomposition may be reached: a) making the Boolean network minimal with respect to its own intrinsic structure (i.e., finding an optimal point on the area/delay tradeoff curve) and b) making it testable. Fortunately these objectives are not mutually exclusive, and in fact are profoundly related and can be simultaneously realized. The connection between logic minimization and test generation is well known [27], [3 I], [26], but has not been systematically investigated. Even modem books on multilevel circuit design [15] and on test generation and design for testability [16] contain no mention of this relationship. The connection rests on the simple observation that the absence of a test is associated with redundancy in the Boolean network. In 2-level logic the sources of redundancy are well understood and efficient algorithms are available for making a 2-level representation of an incompletely specified logic function prime and irredundant. However, the equivalent concepts for multilevel representations have not been fully developed, and only the Dalgorithm and its variants [16], [24], [3] have been used to identify and remove redundancy. These algorithms often incur great computational expense. An efficient algorithm is badly needed since none of the factorization and decomposition techniques yet proposed is guaranteed to produce irredundant logic. Such an algorithm is the objective of our research, and would have great potential impact because of the testability requirement. We propose in this paper a don’t care algorithm for making a Boolean network prime, irredundant, and Rminimal (this last property is explained below). Further, among different possible prime and irredundant Boolean network representations of a given logic function, the proposed approach utilizes two techniques to choose a superior one. These techniques are: 1) utilization of the EXPAND and IRREDUNDANT-COVER heuristics of the ESPRESSO-I1 2-level logic minimizer, and 2) development of ESPRESSO’S REDUCE algorithm (which is a limited form of the powerful but expensive decomposition technique known as Boolean division [6]) to make the Boolean network R-minimal. Further, we shall show that primality can be regarded as a special type of irredundancy, and that prime and irredundant Boolean networks are 100-percent testable for the usual single stuck faults, as well as for other types of “internal” stuck faults. Thus we believe that the networks produced by our procedures are the first to be synthesized with guaranteed 100-percent testability, as well as minimality comparable to that available with state-of-the-art 2-level minimizers. For example, the work of [26], although based on the D-algorithm, did not claim complete testability, and was designed for the 2-level case. Even if that approach were extended to the multilevel case, it would not be able to promote a general Boolean network to prime, irredundant, and R-minimal status. Briefly stated, R-minimality means that no one of the individual 2-level functions in the Boolean network can be reexpressed in terms of one or more of the others to map the given prime and irredundant Boolean network into another one with less logic cost. This important point is illustrated in Fig. 1, which shows 4 equivalent Boolean networks. The network of Fig. ](a) has 3 nodes (gates, functions), and is neither prime nor irredundant. Node F3 does not have tests for the following input stuck-at faults: xI,and x 2 stuck-at-1 and y 2 stuck-at 0 (at the inputs of F3). The equivalent Boolean network of Fig. l(b) is prime, irredundant, and 100-percent testable and requires 9 literals and 5 product terms. It is not R-minimal. The equivalent network of Fig. l(c) is similarly prime, irredundant, and testable but, by virtue of a call to REDUCE, is Rminimal, and requires only 2 nodes, 5 literals and 3 product terms. This example, as well as the concept of R-minimality, will be examined more closely in Section I11 below. We further show that the problem of transforming a given Boolean network into prime, irredundant, and Rminimal form can be reduced to that of solving the same problem on a sequence of 2-level, single-output representations of the incompletely specified logic functions realized at each node of the Boolean network. This is achieved zyxw zyxwvutsrq zyxw zy zyxwvu 1 zy zyxwvuts 1 zyxwvutsrqponmlkjih zyxwvutsrqponmlkjihgfedcba zyxwvutsrqponmlkjih zyxwvutsrqponmlk zyx zyxwvutsrqponmlkjihgfedc BARTLETT er U/.: 125 MULTILEVEL LOGIC MINIMIZATION t abstraction of an interconnected set of logic gates, as might be specified by a netlist of standard cells. Considered in isolation, each gate in this network realizes a completely specified logic function, but in the context of the network, it realizes an incompletely specified subfunction. Each interconnection represents a signal net associated with the output of one of the gates. Before formally defining a Boolean network, we briefly introduce the concepts of a) completely and incompletely specified Boolean functions and b) their representations. An incompletely specijied Boolean function ( f,d , r ) is a set of 3 completely specijiedfunctions f :B‘ B (the on B (the don’t care set), and r : B‘ + B (the set), d : B‘ off set). The minterms off, d , and r completely partition the vertices of the Boolean t-cube B‘. Here f may be thought of as a function, f(U ) , of a t-dimensional vector U = ( u l ,v 2 , * , U,). A simple incompletely specified logic function is illustrated in Fig. 2. In this example U = ( u I ,v 2 , u 3 ) ,t = 3 , a n d f ( v ) = 1 for U E (000, 101, 010, l l l } , elsef(v) = O ; d ( v )= 1 f o r v E { 100, llO}, else 0; and r ( u ) = 1 for U E (001, 011 }, else 0. An incompletely specific logic function reduces to a comi.e., there is no pletely specified function when d = 0, don’t care set. Note that a completely specified function f ( U ) may be independent of certain of the U , , and this fact is usually reflected in the selection of a representation F o f f ( U ) . The variables explicitly represented in F are called the support of F . One representation o f f i s the sum of products form, e.g., + zyx zyx -+ (C) zyxwvutsrqpon zyxwvutsrqponmlkji (4 Defining equations fur q’ DXI = D X 2= 0 F,’=r,r2 +y, F~’=xIQxz F<=X,Xz Prmc. Irrcdunbnt and 100%Tcslablc. Defining equation7 for q”’ DX,=x, DX2=r2 F =j 2 F~”’=x,+xI ,”’ Prime. Irrcdundanl. 100%Tcruhlc and R~hlinimal(lowcr cos1 h a t q < ) Fig. 1. Progressively optimized Boolean networks. by determining a representation of the don’t care set for each of these incompletely specified functions. Our approach is rigorous in the sense that we prove that at the end of the proposed procedure, the Boolean network produced is definitely prime, irredundant, and probably R-minimal. This network is not only 100-percent testable, but the stuck fault test vectors “fall out” as a straightforward by-product of the aforementioned minimization of the component 2-level functions. The sequel begins in Section I1 with a discussion of basic definitions and background which focuses mainly on the Boolean network concept. In Section I11 we introduce the topic of multilevel logic minimization and discuss an example in detail. Section I11 gives a characterization of the don’t care sets, shows how to construct them, and proves that this construction is correct. Section IV discusses the proposed procedure, which we call ESPRESSO-MLD (ML is for MultiLevel). In Section V we discuss some experimental results, and in Section VI we present our testability results and discuss, in detail, the connection between multilevel logic minimization and testability. In Section VII, we present conclusions and discuss the prospects for future research. 11. BACKGROUND A N D BASICDEFINITIONS The primary object in our approach to multilevel logic optimization is a Boolean network, defined formally below, which is a technology-independent multilevel structure for representing an incompletely specijied logic function [ 5 ] . The Boolean network may be regarded as an F = + 5 1 ~ +3 E 2 + ~2 ~ 1 Z 3 which is also called the disjunctive normal form. Note that here the support of F is { u l , u2, u3 }, and that a variable which a function does not depend on, like o2 in the above example, may appear explicitly in the support of the function. Other representations are possible and significant, e.g., conjunctive form or factored form [22]. However, in this paper we use disjunctive form since we rely heavily on 2-level, sum-of-products-based logic minimization procedures such as ESPRESSO-I1 as subprocedures in our approach to multilevel logic minimization. Product terms like v,V3 and z / I ~ 3will be called cubes in the sequel. Each cube consists of a set of literals, and each literal appears in one of the two forms U , or 3,.If ‘ ‘ U , ” appears it stands for the predicate “ul = 1,” and if U , appears it stands for the predicate “ U , = 0.” Thus the cube u I V ~stands for the conjunction of predicates ul = 1 and v 3 = 0. A cube with fewer literals has, of course, more vertices on the Boolean t-cube. In this sense we can view the cube vIV3as the intersection of the subcubes (half spaces of the Boolean t-cube) u1 = 1 and u3 = 0 (cf. Fig. 2, in which the dimension of the Boolean t-cube is t = 3). Dejinition 1 (Boolean Networks) As illustrated in Fig. 3 , a Boolean network, 7, is a pair (F,PO),whereF= { F , , j = 1,2, ,m}isasetof m given representations of the on setsf, of incompletely e - - 726 zyx zyxwvutsrqponmlk zyx zyxwvu zyxw zyx zyxwvu zyxw IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. 7, N O . 6 . JUNE 1988 Since 7 is completely determined by the pair ( F , P O ) , we write q = ( F , P O ) . However, 7 has further structure, determined by the support sets SUPP (F,) of the representations, 4 . These sets determine the structure of a directed graph, G = (N, E),with nodes N = {1,2, IU ~ t = r ,m,m n + 1, I S U P P ( F , ) / > m. ;= 1 0 =ON=l F=XIX3+x,x3 r1 =oFF=o R=X,x, L J =DON’TCARE =Oor 1 D=XlX3 Fig 2 . Incompletely specified Boolean function. Pnmary ouiputs Po = (1,2,31 lntcrmcdmcs I V = (1.2.3.4.5 6 ) A (?)/j Rimarylnpuls PI= ~7.8,9,10,11,12,131 With each node i E N, we associate a logic variable U , . With the first m nodes of N we associate the representation F, and its corresponding variable y,, so that U , = y,, i = 1 , 2, * * , m. (This duplication of notation is quite useful in the sequel). However, no F, is associated with the last n = t - m logic variables in the vector U . Instead, these nodes are identified with primary inputs of 7 , and are associated with duplicate logic variables PI = { x l , x2, * , x,}. Thus U , + , = x, i = 1 , 2, * , n. Note that the vector U can be viewed as the catenation v = ( y, x ) . For each node j E N, we define the fan-in set (for short fan-in) FZ,,as follows. I f j Im (intermediate variables), FZ, = { i 1 U , E SUPP (F,)} , but i f j > m (primary inputs) FZ, = 0. Thus the primary input nodes are terminal nodes of the directed graph G. The edge set E of G contains directed edge (i, j ) if node i is in the fan-in of node j, i.e., i E FZ,. Then we may define the fan-out, FO,, of node j to be the set of all nodes i E N for which there is an edge ( j , i ) E E . Similarly, we define the transitive fan-out, TFO,, to be the set of all nodes i E N such that there exists a (directed) path f r o m j to i in G, and the transitivefanin, TFZ,, to be the set of all nodes i E N for which there exists a path from i to j in G. By convention, j E TFO,, but j TFZ,. 0 - zyxw zyxwvu It is important to note that although 4 depends explicitly only on the variables vk E S U P P ( F , ) , we may formally view each F, as a function of the entire vector U = ( y, x) (recognizing, of course, that& may be functionally independent of many of the vk ). Thus we may write = yj = m =6=1IVI n =7=IPII FI B m + n --f B y I =FICy,x) l<j<rn vI =y, l<j<m v,+, = X I l < J < n Fig. 3 A multilevel Boolean network specified functions ( & , d,, r , ) , j = 1 , 2, , m. With each F, is associated a “local output” logic variable y,, in the set ZV = { yI, y 2 , * , y,}, which we call the intermediate variable set. The specified primary output set, PO E { 1 , 2, . . * , m } , identifies the subset { y, I i E P O } G ZV of the outputs of the F, as observable primary outputs of the Boolean network. It is convenient to refer to this subset as the primary output vector z , defined so thatzk=ypo(k),k= 1,2, ’ * . , p , P = [ P O I . ,t} = =F,(y(x),x), 4 ( y , ). j = 1,2, * . . ,m (2.1) as the basic constitutive relations of 7 . Note that as indicated in the last identity, if (2.1) is satisfied f o r j = 1 , 2, . . ., m , then the solution vector v ( x ) = ( y ( x ) , x ) is the vector of values appearing at the nodes of the Boolean network in response to the primary input vector x. In particular, z ( x ) represents the values at the primary outputs of 7 in response to x, i.e., the same values that would have been obtained by logic simulation of the vector x. Thus given that (2.1) is satisfied, z(x) represents the IO (input/output) map of 7 . Thus a Boolean network 7 is a representation of a set of incompletely specified functions, ( f ( i ) , d ( i ) , r ( i ) ), one for each primary output z , ( x ) . Thus z , ( x ) can be regarded as the “IO map” from PI to PO, of the Boolean network 7 . A representation, OX,,of the completely spec- zyxw zyxwvutsrqponmlkjih zyxwvutsrqponmlkj zyxwvutsrqponml zyxwvuts zyxwvutsrqp zyxwvutsrqpo zyxwvuts zyxwvut 121 BARTLETT et al. : MULTILEVEL LOGIC MINIMIZATION ified “don’t care” function d ( i ) must come from the system designer. We refer to OX,as the external don’t care set, which arises from two phenomena. First, for a particular design the designer may decree that a particular primary input vector x E B“ will never occur. The vector x constitutes a don’t care minterm, and such minterms are don’t care for all primary outputs. The set of all such minterms is labeled DXP. Second, the designer may state that for any of the outputs z,, i E PO, the value of ziwill not be used for a set of primary input vectors (minterms) in the set DXO,. Thus for each primary output the total external don’t care set can be written D X ~= DXP + DXO~, i = I , 2, . . - ,p = I PO I . (2.2) Equation (2.2) gives a representation of the completely specified functions d ( i ) , i = 1, 2 , * , p (don’t care sets) associated with the primary outputs of a Boolean network. A principal objective of the sequel is to identify representations of the analogous don’t care sets for each of the incompletely specified functions associated with the intermediate variables of a given Boolean network (and their corresponding internal nodes). A key concept in logic optimization is that of Boolean equivalence. In the multilevel context, we wish to establish when a given Boolean network, 7, can be replaced by another one, q ’ , with an equivalent IO map, z ’ ( x ) = z(x). That is, the relation between primary inputs and primary outputs is preserved. Thus 7’ represents the same set of incompletely specified functions ( f ( i ), d ( i ), r(i)), v i E PO. Dejinition 2 (Equivalence) Boolean networks 7 = ( F , P O ) and 7’ = ( F ’ , PO‘ ) are said to be equivalent (written 17 = 7’ ) if there exists a permutation q of { 1, 2, * , p } such that for each primary output z : ( x ) in PO‘, z : ( x ) = z q ( , ) ( x )for all x $ DXq(1,. 0 - outputs of two Boolean networks match for each care input vector. In particular, it is not necessary to have identity or even correspondence between the intermediate variables of the two networks. For example, a 4-level network could be equivalent to a 2-level network. The 2level network specified by the following equations is equivalent to those of Fig. 1: + F2 = ~ 1 x 2+ 51x2. FI = ~ 1 . ~ 2 51x2 (2.3a) (2.3b) The task of minimizing a Boolean network 17 consists of iteratively transforming 7 into an equivalent network 7’ where 7’ is smaller than 7 in some sense. Two properties of minimality, similar to those for the classical 2level case, are especially relevant to the multilevel case (since Boolean networks having these properties are shown below to be 100-percent testable for stuck faults). Dejinition 3 (Prime and Irredundant Boolean Networks) Given a Boolean network 7 = ( F , P O ) , a cube c of the 2-level representation of F, is prime if no literal of c can be removed without causing the resulting network 17’ to be not equivalent to 7. In more formal terms, 7’ = ( F ’ , P O ) is a Boolean network for which FJ’ = F,, V j # i and F,’ = (F, - { c } ) U c’, where c’ is c with one of its literals removed. Similarly, a cube c of F, is irredundant if c cannot be removed from the representation of F, without causing the resulting network 7’ to be not equivalent to 7. A Boolean network 7 = ( F , P O ) is said to be prime if all the cubes in each of the representations F, of 7 are prime, and irredundant if all of these cubes are 0 irredundant . Note that these two concepts are associated with local minima of a cost function which is nondecreasing in the total number of cubes and literals required to represent the incompletely specified logic functions, realized by the given Boolean network. We complete this section by defining the cofactor operation on both representations of functions and on Boolean networks. zyxwvu zyxwvutsrqp zyxwvuts The permutation, q , in Definition 2 is needed to identify the proper correspondence between the primary outputs of the two Boolean networks, which may be very different structurally. For simplicity, we assume, without loss of generality, that q is the identity permutation. We have, in separate research, demonstrated that a more general definition of equivalence can be stated, but this requires more information about the external environment than just the external single-output don’t care set DX, for i E PO. For example, the external environment may have outputs i a n d j connected only to the inputs of an exclusive or gate, in which case the environment would be unable to distinguish between outputs y, = 1, y, = 0, and y, = 0, y, = 1. We will treat this more general definition of the concept of don’t cares in a later paper. For now, we observe that this generalization will enable us to handle Boolean networks with nodes having multiple-output Boolean functions rather than just single-output Boolean functions. Note that Definition 2 requires only that the primary Dejinition 4 (Cofactor Operation) The cofactor of a sum-of-products representation, F = { c,}, of a Boolean function with respect to a literal v, is defined to be ( W C ,= U (Cl),,. Here if literal vJ is contained in c,, (c,),, is just c, with literal U , deleted, else if literal E, appears in c,, ( c , ) , , = 0. If neither vj or EJ appears in c,, then ( c , ) ( ~= c,. The cofactor of a Boolean network 17 = ( F , P O ) with respect to a literal vJ is a Boolean network, q,., = (F,,, P O ) , where FZ,]= { (Fl)C)}is the set of cofactors of the representations { F, } of the original Boolean network. We denote the vector of logic variables in this cofactored network to be ( U ) , , , with components ( v ~ ) (, v~2,) , , ,. . - , (V,)*I]. 1 728 zyxwv zyx zyxwvu IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN. VOL. 7. NO. 6. JUNE 1988 zyxwvutsrqpon zyxwvutsrq zyxwvutsrqp zyxwvutsr zyxwvutsrq zyxwvuts zyxwv PO = { 1, 2 3 , i.e., that the Boolean network 7 has no external don’t care set. Since FIX2 E D , it is clear that cube FIX2of F3 is redundant and can be deleted. Further, This definition is crucial to computation of the represen- since y2xIx2E D 3 , and y 2 x l x 2 + j Z x I x 2= x I x 2 , literal tation, D,, of the don’t care sets, d,, of the incompletely L2 may be dropped from cube x I x 2 j 2in F3. After these specified functions ( A , d,, r , ) which implicitly define the two typical minimization steps we have derived the prime structure of the Boolean network. Note in particular that and irredundant network 7’ (Fig. l(b)) from 7 and have the edges of the Boolean network v,, are defined by the in fact shown that 7‘ = 7. support of the (F,),,,, from which the variable vJ is now The problem we faced in our research was how to comtotally missing. Thus each node i in the fan-out of n o d e j pute a representation DJ in the general case. To show how in 11 is disconnected from node j in 7 this is done, we define two additional don’t care sets DZV 111. MULTILEVEL LOGICMINIMIZATION (the intermediate variable don’t care set, common to all . , m ) and D T (the transitive fan-out Given a Boolean network 7, it is of obvious interest to nodes j = 1, 2, obtain an equivalent prime and irredundant network 7’. don’t care set, which is specific to n o d e j ) . These are to One possible procedure to obtain this simplification is to be appended to the appropriate external don’t care set to examine each cube as well as each literal in first encounter form D J , as discussed below. We begin by defining DZV. order, and for each such cube or literal to construct a simDejinition 5 plified network v’, identical to 7 except for the removal The “overall” intermediate variable don ’t care set, of the selected cube or literal. Then Definition 2 may be DZV, is defined by embodied in a computer program such as [18] to check if m 11 = 7’.If so, the cube or literal is redundant, and can be DZV = DZV, (3. l a ) removed from 7. If no cube or literal can be so removed, J=1 then the resulting Boolean network is prime and irredunwhere dant (Definition 3). This elementary minimization pro(3.lb) cedure is the one used to obtain the Boolean network of DZV, = LJF, = yJ 0 F,. Fig. l(b) from that of Fig. l(a). This procedure is inti- Note by DeMorgan’s law, we have mately related to the way in which the basic D-algorithm m m (and its variants) [16] is used in test generation algo= rI ( y J = F,) = y,F,). 0 rithms. However, such elementary procedures are not efJ=1 J = I ficient, and do not lead to high-quality minimization re(3. I C ) sults (compare Fig. l(b) and (c)). We present here a more efficient procedure which ap- It is thus clear that for any vertex in v E B‘ (represented pears to give high-quality multilevel minimization re- by the overall vector U of 7) which satisfies (2.1) f o r j = , m , it follows that v E Conversely, if any sults. The procedure is based on 1) computing, for each 1 , 2 ; . . intermediate n o d e j in 7, a representation DJ of the don’t of the equations yJ = F, ( U ) is not satisfied, we have U E care set dJ of the incompletely specified function ( A , d,, DZV. These observations will be used repeatedly in the r J )associated with n o d e j , j = 1, 2, * * m ; and 2) min- sequel. Note that in the above example, the first 4 terms imizing the representation F, of with respect to DJ by in D , represent the contribution of DZV,. We note that each member of the Cloand Coo“forcing” calling an efficient 2-level minimizer (we use the ESsets defined in [32] corresponds to two literal implicants PRESSO-IIC program [5] for this purpose) to render 5 prime, irredundant, and approximately R-minimal. Note of DZV. Thus their recurrence relation provides, in linear that the properties of primality and irredundancy arise time, a proper subset of DZV. The origins of the transitive fan-out don’t care set repfrom both the representation F, and the Boolean network, 7, in which it is embedded. This is because, considered resentation DT, associated with node j are subtler, so a in isolation, the are representations of completely spec- detailed discussion of these don’t care terms is deferred ified functions, but embedded in the network, they are until later in this section. However, in simple cases such representations of incompletely specified functions, i.e., as that exemplified in Fig. 1, the transitive fan-out don’t they have a don’t care set. Thus a network of individually care set has a straightforward construction. Suppose that prime and irredundant functions, such as that shown in V i E FO,, Similar definitions apply when the cofactor is with reo spect to the literal P J . (’,. yJq+ n ( j J q+ m m. e , zyxwvutsr FJ Fig. l(a), may be neither prime nor irredundant. To discover such redundancies, we identify the don’t care sets generated by the structure of a Boolean network. We illustrate this by identifying a representation, D 3 , of the don’t care set d 3 of node 3 of the Boolean network of Fig. l(a). For reasons discussed later in this section, we can show that the 5-cube set 0 3 + = J ~ ( x I X ~ 21x2) + ~ ~ ( x I x Z+ XIX2) + 21x2 is a valid representation of d,, assuming OXi = 0, iE i E PO and FO, = 0. (3.2a) Then DT, = n IGFO, where Ell (3.2b) ~ ~ zyxwvutsrqponmlkjih zyxwvutsrqponml zyxwvutsrqponmlkjih zyxwvutsrqponm 129 BARTLETT et al. : MULTILEVEL LOGIC MINIMIZATION Note that the condition (3.2a) applies in the case of function F3 of the Boolean network of Fig. l(a) for which ( F I ) 4 3= XIX2 1 = 1 and ( F l ) y 3 = FIX2. Thus E13 = ( 1 ) ( X I X 2 ) = XIX2 and DT3 = E13 = T I T 2 ,which can be seen to be the last term in the representation D 3 given above. A physical interpretation of DT, can be given as follows. Consider a primary input vector, x , and a corresponding solution vector U ( x ) = ( y ( x ) , x ) , for which all the primary outputs of 17 are insensitive to the values yJ takes on under this set of inputs. Note in the example that if x , = 0, x 2 = 0 is applied to 11, the primary outputs are FI = 1 and F2 = 0, regardless of the value of y 3 . Thus DT, can be seen to specify a set of values for the vector x such that the value of each of the primary outputs is insensitive to the value of y , , and, by extension, to the representation F J . As we shall show in Section VI, DT, is simply the union of primary input vectors which do not test for either yJ stuck-at-1 or y, stuck-at-0. Each such primary input vector represents a cube (not necessarily just a vertex) in the overall space B‘, which is don’t care for all the primary outputs since none of them are affected by F,. The representation DT, of the transitive fan-out don’t care set is the union of all such primary input cubes. We have now given sufficient background to make a precise definition of DT, meaningful. Line Procedure ESPRESSO-MLD (FPO .DX) r Input Bmlean Networkq=(FPO), ci.. Defmtion I. well BS h e set DX of external don’t care res. {DXIPX2;..DXP). Outpul Minunired Network l)’=(F’PO). A visitation index. V I S , IO employed. such hat VlSk4l (not visited). 1 (visited not changed). - 1 (changed) IfV/S,=l.’jc(l.2 ....ml, l ) ’ s p i m e andinedundant. + zyxwvutsr zyxwvutsrq zyxwvutsr / 1 2 3 4 S 6 7 8 9 IO 11 12 13 14 15 16 Begin F I F VI& to.k =1.2. ...m For(k=l,2. m ) D l t t C v , ~ k + jFt i ) J +{I I VIS,=Oand F 0 , d O and FOt = 0 . tE FO,] While(JtP)) Begin +SELECTl(J) VIS, t 1 DIA,cSELECT2(DI J ) I f o ~ P 0 T) h e n D O , t 0 Else DO, c 1 For ( I EFO,) Begin DT,,+((Fs )y,=(F, )&) DO, +DO, n(DT,, +DX, ) End For End Else DA, e D I A , +DO, (F, .VIS, )+ESPRESSO-IIC(F, RA,) F tF, (F‘.F)tSIMPLIFY(F’.F) Dl,+Y,F,+V, If (FO, 4 ) F t F L A T T E N CI ,F) If ( ~ PO) d F t F - F, J t ( j IVIS,=Oand F 0 , c P O and F O t = 0 . t E FO,] End While Return (F’,VIS) End ESPRESSO_MLD j INuallLc q’. Iniualire vsimtion index. Compute cornponenuo l l V DC ret Minunimble ret (no remnvngent ian-out). Whle there are funcuons non-mmmned whch fan out only I O Prim- outpulr. selwt one and mark 85 v s m d Select Intermediatedon’t cares Imtml1zcTransiuve Fan out DC set 10 mulology. Loop over fanout ol F, Equ,valcnce of wfaclon Update output DC %Cl. for Function F, . Dc sets ior F, . MinirniuF, w r 1 DA, rnd rebrl VIS, UI - 1 ifchanged. Updatc and simpltiy F‘ and F. Update DI, Flatten F, into FO, . Acyclic zyxwvut ’, zyxwvut zyxwvu Dejinition 6 (Transitive Fan-out Don ’t Care Set) We denote, for each primary output i E PO f l TFO,, the “transitive fan-out’’ don ’t care set associated with function j by 1 17 I8 Delete 11 not p m a r y output. Updatc minimiiable set Return minmized Boolean Network. Ii(VIS,=I.~)~’aPnmeandIrredundant Fig. 4. Procedure ESPRESSO-MLD. (3.3) plete” don’t care set. Note DIj G DZVderives solely from 0 the transitive fan-in of Fj. where ( U , ) , and ( u , )are ~ ~the logic variables associated with the corresponding functions (F,)uJ and (F,);,,i.e., in the cofactored Boolean networks, and PO n TFO, identifies the subset of primary outputs contained in the tran0 sitive fan-out of F, . It is of interest to observe the possible interrelationships that exist between the transitive fan out and external don’t care terms in (3.4). To this end, we present two examples. Example 1 Suppose, for the network of Fig. l(c), we specify the external don’t care sets DX, = x 1 and DX, = x 2 . Then the don’t care representation of (3.4) becomes, for node 2, D2 = D12 ( D X , DT,,) (DX, DT2,) DTIJ = (’ E B” (Uf)uJ )(. = (x)} This definition plays a crucial role in the following definition and theorem, and is formed primarily to facilitate theorem proving. In the algorithm of Fig. 4, we actually employ only the special case of (3.2), which is equivalent to (3.3) when the condition (3.2a) is satisfied. Note that because of Definition 4, DT,, = 0, V i E PO. The members of the qJ “blocking sets” defined in [32] may be observed to correspond to implicants of DTtJ. Again, a proper subset of the implicants of DT,, is obtained, in linear time, by the procedure of [32]. Dejinition 7 A representation of the don’t care set, D J , imposed on n o d e j by the Boolean network is 0, = DI, + , e P o n TFO, (DX, + D T J ) (3.4a) where Corollary 1 below gives us reason to call this the “com- + = + + DXI DX, in which D12 = 0, since F; has only primary inputs, and DT12= DT22 = 0, since y 2 and y l are both primary outputs (note j E TFO, by convention). Thus D 2 = x I x 2 , which may be used to minimize Fg further, to F;” =XI +~ 2 . Although further minimization of Fg was made possible by introducing the above external don’t care terms, F;‘ remains prime, irredundant, and R-minimal, and so F,”‘ = F;‘. However, it should be noted that the don’t care set for F;‘ is ltered by the minimization of Fg to F;” . In fact, prior to this minimization, we have 0;‘= zyxwvuts Y , ( X ~ ,X? + X l X 2 ) + j l ( ~ I X 2+ X I X ~ )+ X I 730 zyxwvut zyxwvut zyxwvu zyxwvutsrqponmlk zyxw zyxw zyxwvu zyxwvutsrqp IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. I, NO 6. J U N E 1988 whereas after this minimization, + 0;“= y 2 ( X I X 2 ) L2(x1 + x 2 ) + xI f 0;‘ which proves that the don’t care set of function Fk is not necessarily invariant with respect to the minimization of F j ,j # k . 0 Example 2 Consider some Boolean network (not that of Fig. 1) in which F, = y j x l and Fk = y j X l , FOj = { i , k} C PO, and FOi = FOk = 9. Then the special case assumptions of (3.2) apply to the computation of DTu and DTkj,i.e., This follows from the fact that the two networks r] and r]’ are the same in TFZ,, and hence for the same x , w $ DZ, implies that w satisfies the same defining relations as vk and vi, vk E TFZ,. Thus F , ( w ) = v , ( x ) and F,’(w) = U; ( x ) . Also w $ 0, implies that there exists some i E PO, such that x $ OX, and x $ DT,,. Since FJ ( w ) # F,’ ( w ) , then U,’ ( x ) # U, ( x ) . Suppose U, ( x ) = 1 , then U , ( x ) = ( D , ) ~ (, x ) and v: ( x ) = ( vI)s ( x ) and because x $ DTl,, then U , ( x ) # ( x ) . Therefore, since x $ OX,, then 77 # 7’. The case U , ( x ) = 0 is similar. zyxwvut zyxwvutsrqponml DT.. = X. DTkj IJ I, = x I. Thus from (3.4) we have Dj 7 DZj = DIj = DZj + (OX; + DT,j) (Dxk + DTkj) + DXjDxk + Dx;DTkj + DxkDT,j + DT,) + DXjDXk + DXiDTkj + DXkDT,j. Note that in this case, although DTu and DT,, may, individually, still contribute to D j , 0 assuming O x ;DTk, # 9or DxkDTk, # 0. o It is important to realize the intent of presenting this theorem, which is to establish a representation for the don’t care set d, of the incompletely specified function associated with node j of r ] . Once this is established, we shall have reduced the problem of minimizing F, in a multilevel environment to a conventional 2-level minimization problem. To this end we offer the following corollary. Corollary 1 Dj is a representation of the don’t care set dj of the incompletely specified function ( 4 , d j , r j ) . Proofi Dj represents the set of vertices U ( x ) E B” +” such that the IO map z ( x ) of r] is insensitive to the specific representation given for F j . But this implies that Dj is a representation of d j . 0 zyxwvutsrqpon We now give the theorem and corollary that show that (3.4) gives a complete and correct representation of the don’t care set. Theorem 1 Let r ] , r]’ be two Boolean networks where r] is identically r]’ except for FJ , which has been altered to F,’ in such a way that TFZ, ( 7 ‘ ) C TFZ, ( r ] ) . Then r] = r]’ if and only if for all w E B”’”, either i) FJ ( w ) = FJ’( w ) or ii) w E 0,. Proof (Ifpart): Suppose r] # 7’. Then by Definition 2 there exists x E B“ and some output i E PO, such that x $ O X l and U , ( x ) # ( x ) . Define w E B”’“ so that fork E TFZ,, wk = vk ( x ) = vL ( x ) , and w, = x (i.e., the primary input subvector of w is the primary input vector x ) . The other elements wl of the vector w are chosen arbitrarily. Thus w $ OXl (because x = w, $ OX,), and w $ DZ, (cf. discussion of (2.1)). Since U , ( x ) # v: ( x ) , then certainly U , ( x ) # vJ’( x ) , since F, and F,’ are the only functions which differ in r] and 7’. Thus since F, ( w ) = F, ( v ( x ) )= U , ( x ) and similarly for F,’ ( w ) , then F, ( w ) # FJ’( w ) . There are now two cases: U , ( x ) = 1, U,’ ( x ) = 0 and vice versa. For the case U, ( x ) = 1, we have ( v , > , ( x ) = v , ( x ) , (v,>z,(x> = u:(x>, so ( U , ) & ) f ( u , ) ( ~x )~; hence x $ DT,,. The case U , ( x ) = 0 yields the same conclusion. Thus w $ DT,,, so w $ D,, and we have produced w E B n f mwhich contradicts i) and ii), which proves the if part. (Only Ifpart): Suppose there exists w E B ” + ” such that F, ( w ) # F , ’ ( w )and w $ 0,.Then w $ DZ,, which implies that for x = w,, wk = vk ( x ) = U; ( x ) , k E TFZ,. Having finally determined a representation Dj of the implied don’t care set for node j of Boolean network r ] , we are now ready to present two key theorems in the development of our algorithm for multilevel minimization. Theorem 2(a) Cube c E Fj in Boolean network only if c Q (Fj - r] is irredundant if and {c)) U Dj. (3.5) Proof. (Ifpart): Suppose c 4 (F, - { c } ) U 0,. Then, because Corollary 1 has established 0, as a representation of the don’t care set d,, there exists v ( x ) E c such that u (x) E A , the care on set of the incompletely specified function associated with node j . That is, v ( x ) is a relatively essential vertex [5], contained in c , so c is irredundant . (Only If part): Suppose c is irredundant (Definition 3). Then c contains a relatively essential vertex v ( x ) (FJ - {‘}I O J ’ 0 Theorem 2(b) Cube c of function F, of r] is prime in variable v 1 if and only if either a) neither vl nor appears as a literal of c, or b) c’ $ F, U 0, (3.6) where c’ is the cube obtained by deleting literal uI (q) from cube c. 0 Proofi Similar to that of Theorem 2(a). These two theorems result from the fact that 0, is a “complete” representation of the don’t care component BARTLETT zyxwvutsrqponmlk zyxwvutsrqponmlkjihgfedcb zyxwvutsrqponmlkji zyxwvutsrqpon zyxw PI 73 I nl. : MULTILEVEL LOGIC MINIMIZATION d, of the incompletely specified function ( A , d,,, r,) associated with n o d e j of the Boolean network. This fact is the basis for the proposed approach to multilevel logic minimization, and it will be shown in Section 4 below that a prime and irredundant Boolean network can be obtained by applying a 2-level logic minimizer to each of the representations F, in sequence. This full sequence is then iterated until, on one complete pass through it, no representation changes from what it has been on the previous pass. Equations (3.5) and (3.6) show how to make a Boolean network prime and irredundant. But as discussed in Section I, to make Fj R-minimal we also need to apply the following REDUCE operation. As we shall see below, this operation takes on added significance in the multilevel case, and in fact, accounts for an entirely new aspect of logic minimization. Definition 8 (REDUCE Operation) Cube c’ C c E F, is the reduction of c if a) 17 = v’, where 9’ is defined by replacing F, with FJ’ = c r U ( F j - e ) , and b) for all e” C c’, 17 # r ” , where F;’ = crr U (F; - c ) . 0 Proposition I The reduction, e r , of cube c is unique. Proof: Note e’ contains all relatively essential minterms of the representation F, of the single-output function&. If c’ were not unique then there would be another reduction e’’ # c which would also contain these minterms for which 17 = 17”. Hence e’ and c” can both be replaced by cube c’ fl c ” , which also contains all these minterms. Since e’ # c”, then either e’ f l c’’ C e’ or c’ n e‘‘ c e r ‘ , contradicting the hypothesis that both e‘ and U e’’ were reductions of e. Since the reduction of cube c is unique, the overall REDUCE operation for c is composed of a sequence of “atomic” REDUCE operations, carried out in any order. Each of these atomic operations determines whether equivalence at the Boolean network level is maintained if c is replaced by c*, where c* is obtained from c by adding literal vk, and where Vk is not originally present in e. If the answer to this question is positive, then c can be replaced by e*. The process repeats until we have attempted the addition of the positive and negative phase of every literal not originally present in e. Note that if both ck and 2, can be individually added while maintaining equivalence, then c is redundant and can be deleted from F j . It is tempting to conjecture that as in the case for primality and irredundancy, the don’t care set D, is sufficient to determine the reduction of cube c E F,. Unfortunately this is not quite the case, although the following proposition can be proved about a single atomic REDUCE operation. Theorem 2(c) (REDUCE Don’t Care Set) The minimal and sufficient don’t care set for the atomic REDUCE operation of adding literal U , to cube c E F, is Proof: The proof of Theorem 1 can be applied, mutatis mutandis, noting that adding literal z.’k to cube c potentially augments the transitive fan-in of F,. 0 Note that unlike D,, DR,, k includes intermediate variable don’t cares from the transitive fan-in of both F, and F,. Even though DRJk is sufficient for the single atomic REDUCE operation associated with literal V k , a larger don’t care may be required by the next atomic operation. This is because the successful addition of literal vk adds an edge to the graph ( N , E ) of the Boolean network 7, and, therefore, may alter TFZ,. Thus if the entire REDUCE operation is to be performed with a single don’t care set, and if applicability to arbitrary Boolean networks is desired, then the entirety of the overall don’t care set DIV(cf. Definition 5 ) must be employed. This conclusion is mitigated, however, by the following remarks. zyxwvut zyxwvu zyxwvutsrq Remarks Note that e’ is a minimal (smallest) cube containing all the relatively essential vertices of c [ 5 ] . Hence e’ has more literals than c, hence e’ is reexpressed in a larger support than c had. The remarkable fact is that c r can, in principle, now depend on any variable in the transitive fan-out of the transitive fan-in of F j . As shown for F I in the Example of Fig. 1, this can lead to significant simplifications in the F,. The REDUCE operation appears to be one of the most significant parts of multilevel minimization. Although the overall intermediate variable don’t care set DIV is necessary to obtain the true reduction of e , in practice we use an approximation DA,, where zyxwvutsrqp DR,,, = DI; DAj = DIA, + i e P O ( l TFO, (OXi U D T j ) ) (3.8a) (3.8b) is obtained from DIV by deleting the intermediate variable don’t care contributions of the transitive fan-out of F,. If this deletion were not done, cyclic dependencies might (will) occur, i.e., some cube c in FJ can be reduced until it contains literal U, itself, and, on a subsequent EXPAND step, c might grow to c = v J ,leading ultimately to the correct, but trivial, conclusion that U, = F,. We shall call the reduction of cube c with respect to DA, the acyclic reduction of e. Note that the operations of primality and cube redundancy testing (cf. Theorems 2(a) and 2(b)) do not alter the transitive fan-in of F,. Note that (3.8) implies that 0, C DA,, so that DA, is sufficient for establishing the primality and irredundancy of cube c as well as for finding its acyclic reduction. 0 zyxwvut zyxwvut + DI, + i POfln TFO, (DXi U D7’,) E where DI, and DI, are defined by (3.4b). (3.7) As pointed out in [ 5 , sec. 4.71, reduction is an important mechanism for minimizing the representation F, = { c i } . In fact, by reducing some prime cube ck E Fj to its reduction c; (Definition 8), it is possible that after reex- 7 I 132 zyxwvutsrqponmlkji zyx zyxwvutsrqp zyxwvutsrqp zyxwvut zyxw zyxwvutsrq zyxwvutsr zyxwvu IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN. VOL. 7, NO. 6. JUNE 1988 panding c; to a different prime c: # ck, a second, formerly irredundant prime cube, c[, may now become redundant, 1 # k . This remark gives us, at last, sufficient background to define R-minimality . Dejinition 9 A prime and irredundant Boolean network 7 is R-minimal if there exists no cube ck E FJ of 7 whose acyclic reduction c; (Definition 8) can be reexpanded (i.e., raised back to primality) into cube c: such that for k # 1, {ck, cl} (Fj - {ck, C I } ) U c: U Dj. (3.9) That is, the introduction of the reduced and reexpanded cube causes both the originally prime and irredundant cubes ck and cl to become redundant. 0 Note that the example Boolean network of Fig. l(c) is R-minimal, because none of the cubes of either F, or F2 can be reduced. It is expensive in practice to absolutely guarantee Rminimality, but it is certainly possible in principle. ESPRESSO-IIC executes a routine for reduction and reexpansion called LAST-GASP which guarantees only an approximate form of R-minimality. However, it has been observed in all but a very few cases to date that the actual results of LAST-GASP were, in fact, R-minimal. The REDUCE operation and its variants (this was called “RESHAPE” in MINI [20]) enable logic minimizers to “climb out” of the local minima usually associated with the current prime and irredundant representation. This is, in many cases, the key to the high-quality results obtainable by heuristic minimizers. tions; since conditions (3.2a) are usually satisfied for primary outputs, they are in the first J constructed in line 4. Clearly for any j E PO, DT,, = 0, and hence DT, = 0. Then the algorithm selects for the next function (cf. lines 4 and 17 in Fig. 4) some unminimized function which has only nonreconvergent fan-out to primary outputs, i.e., the next function F, satisfies FO, E PO and FO, = 0, ViE FO,. After minimizing this function, it is stored away for future reference in the minimized function set F,’ (line 12), and then “flattened,” i.e., substituted, into its fan-out (line 13). If it is not a primary output it is then deleted from 7. Because of this deletion, and because 9 is assumed to be combinational, such a next function always exists (but is not unique). Another such function is selected next. This is repeated until all functions have been minimized. Note that ESPRESSO-MLD employs the device of carrying two separate versions, 7 and v r , of the minimized Boolean network. Here 7’ is the version of the original network 7, in which each function is replaced by its minimized version, i.e., the version which is prime, irredundant, and, with high probability, R-minimal. This is the version returned (line 18) by ESPRESSO-MLD. The second version starts out the same as the original Boolean network, but is modified on each pass through the while loop (lines 5-17) by flattening the most recently minimized function into its fan-out, and then deleting it unless it is a primary output function. As discussed at the end of this section, this device permits us to use the construction of (3.2) in computing the transitive fan-out don’t care sets DT,,, i E PO. Note further that a subprocedure, SIMPLIFY, is called (line 13) after replacing FJ and F,’ by the minimized version of F, in the respective Boolean networks q and 7’. SIMPLIFY checks for either of the conditions a) FJ U DJ = 1, or b) FJ E 0,. In the former case, ESPRESSO-IIC will return a representation consisting of a single cube with no literals, and in the latter case, one consisting of an empty set of cubes. In case a) the care off set of the incompletely specified function ( & , d,, r,) is empty, i.e., r, = 0. It follows that 7 qt,,, so SIMPLIFY substitutes U , = 1 into the functions in the fan-out of FJ. Case b), for which we have& = 0, is similar, except U , = 0 is substituted. In either case the simplification is propagated recursively toward the primary outputs and primary inputs. In propagating toward the primary outputs, functions in the fan-out of FJ are tested in turn for simplification by SIMPLIFY. In propagating toward the primary inputs, we note that after simplifying, FJ no longer depends on any of its inputs. Thus edges in 7 associated with these inputs may be deleted from the graph associated with 7. SIMPLIFY thus checks to see if FJ was the last fan-out of any function F, such that j E FO,. If so, F, is deleted from 7 and y r . Note that if as a result of such simplification, some function Fk has no remaining fan-out, i.e., FOk = 0, then it may be seen from Definition 6 that DT,, = 1, V i E PO. Consequently, in this case, when j is later equal to k , the for loop (lines 8 and 9), which computes DOk = zyxwvutsrqp IV. THE ESPRESSO-MLD PROCEDURE FOR MULTILEVEL LOGICMINIMIZATION Theorems 2 establish don’t care methods for applying the EXPAND, IRREDUNDANT-COVER, and REDUCE operations to the cubes of the function representations FJ of 7. We can now present an algorithm which calls the 2-level logic minimizer ESPRESSO-IIC to carry out these operations on each FJ in turn. On exit from ESPRESSO-IIC, FJ is prime and irredundant. However, ESPRESSO-IIC has the property that F, is left unchanged if the first pass through the REDUCE, EXPAND, and IRREDUNDANT-COVER sequence fails to decrease a given cost function measuring the number of terms and literals of the result. Any other valid 2-level minimizer which has this property will also produce a prime and irredundant Boolean network. However, as discussed above, ESPRESSO-IIC guarantees a weak form of Rminimality as well. The algorithm uses the representation of the don’t care set DA,, defined by (3.8) for function FJ of Boolean network 7, to render all the cubes of FJprime and irredundant, V j E ZV, according to Definition 3 and Theorems 2(a) and 2(b). This algorithm is presented in Fig. 4 as Procedure ESPRESSO-MLD. ESPRESSO-MLD calls ESPRESSO-IIC to minimize the functions FJ in a certain order. In most cases, it first minimizes the primary output func- ~ zy zyxwvutsrqponmlk zyxwvutsrqponmlkjihgfed zyxwvutsrqponmlkj zyxwvutsrqponm zyx 733 BARTLETT er al. : MULTILEVEL LOGIC MINIMIZATION I I I E p ~ n T (OX, ~ o k + DT,,), will initialize DOk to I , and DOk will remain at that value unless OX, # 0 for some i . Such functions thus will fall into category a) above. This process continues recursively until the two networks stabilize. Even though F, is prime and irredundant on exit from ESPRESSO-IIC, a function Fk previously minimized by ESPRESSO-IIC may no longer be prime or irredundant. This is because the don’t care set dk is not invariant with respect to the minimization of F,. It is quite easy to construct examples which demonstrate this fact. Thus in order to verify primality and irredundancy of the returned network q’, procedure ESPRESSO-MLD uses a visitation index VZS, to mark which functions were actually alerted by the call to ESPRESSO-IIC. As stated above, Fj is left unchanged unless ESPRESSO-IIC can obtain a finite decrease in the cost of F j . If on exit (line 18), VZS, = l , V j E ( 1 , 2 , * * . , m } , then it is true that no cube of any function representation was altered by the calls to ESPRESSO-IIC, which proves, as shown below, that the given Boolean network is prime, irredundant, and, with high probability, R-minimal. Conversely, if on exit VZS, = - 1 for any j , then, although we are sure that Fj is prime and irredundant, we can no longer be sure that another function Fi is still prime and irredundant, where the representation FL was returned by a previous call to ESPRESSO-IIC. Thus the whole procedure ESPRESSO-MLD should be called again. Since we are guaranteed that the overall cost function has a finite deciease if any function is altered, we know that the sequence of calls to ESPRESSO-MLD must ultimately converge, and, on the last call, return an unchanged Boolean network. This latter network is prime and irredundant and very likely Rminimal. It is of interest to discuss how the structure of the flattened Boolean network 77 is exploited in computing the transitive fan-out portion of the “acyclic” don’t care set DA, prior to each call to ESPRESSO-IIC. By construction, 17 is just 7’with all intermediate variables in the set TFO, - PO flattened (line 15) and deleted (line 16), and those in the set TFO, n PO flattened but not deleted. The key observation is that flattening an intermediate variable does not alter the IO map of a Boolean network. Hence y and 7’ have identical IO maps, i.e., z ( x ) = z ’ ( x ) . Because of the flattening of intermediate variables in the transitive fan-out of F,, we are able to use the construction of (3.2) in computing DT,, for each primary output i E PO in Boolean network 7. Note that by construction of 7, FO, G PO and FO, = 0, V i E FO,. Thus the computation DT,, is restricted to the case where F, has only a direct dependence on U , , V i E PO f l FO,. That is, for functions that fan-out only to primary outputs which have no fan out, DT,, is equivalent to E,j, where (cf. lines 8 and 9) care set D G of the unflattened but minimized network 7’ returned by ESPRESSO-MLD. Lemma Z For each primary output i E PO, let DT,, be the transitive fan-out don’t care set associated with the minimized and flattened Boolean network 7 computed by ESPRESSO-MLD, and let 07;; be that associated with the minimized but not flattened network 7’returned by ESPRESSO-MLD. Then zyxwvutsrq zyxwvutsrq zyxwvutsrqp zyxwv zyx E!, = (FO), (q, + R,,m,. (4.1) Finally, by the following lemma we are able to show that this don’t care set is identical to the transitive fan out don’t DT,, 3 D T , , V i E PO. (4.2) Proofi By construction, 7’is the minimized but not flattened Boolean network with primary inputs x and IO map ~ ’ ( x ) .Similarly, vh, is the cofactor of this network with respect to the variable, U , , of the function to be minimized, which has the same primary inputs, x, but has IO map zh, (x). Note that zh, ( x ) may be regarded as a Boolean network with one “extra” primary input, namely U , , which has been set permanently to 1. By construction vu, is just a flattened version of vh, which has the same primary inputs, x, but has IO map z,, ( x ) . But since vu, can be obtained from qh, by flattening, it follows that these two Boolean networks have identical IO maps, i.e., z&) = Zh,(X> (4.3a) and, similarly, (4= zt, (x). Zt, (4.3b) Since DT,, and DT, are specified by Definition 6 in terms of the IO maps z,, (XI, zt,(x),z;, (x), and zh,( x ) , it follows that DT,, = DT,, so (4.2) is proved. 0 Now reconsider procedure ESPRESSO-MLD, which calls ESPRESSO-IIC only for functions F, which satisfy FO, E PO and FOk = 0, V i E FO,. Thus the transitive fan-out don’t care set of function F, of Boolean network 77 can be computed according to the construction of (3.2) (line 8) for each primary output in TFO,. By Lemma 1, this is identical to in the Boolean network 7’ which we are minimizing. Thus DTl, can be added to the external don’t care set for each of the aforementioned primary outputs and intersected together (line 9 of the inner for loop) to form the rightmost don’t care term in (3.4). This interim result is stored in the variable DO, and is added to the appropriate intermediate variable don’t care sets (cf. (3.4) and the remark following (3.8)), to form DA, (line 10). This construction of the relevant don’t care sets permits us to state the following key theorem, which, in essence, proves the correctness of ESPRESSO-MLD. Theorem 3 Suppose that when ESPRESSO-MLD terminates, all rn functions F, have had 2-level minimization applied to them, without any changes to any of the F,. Then the returned Boolean network, v’, is prime and irredundant. Proof: The procedure uses the acyclic superset, DA, of 0, for minimizing each of the F,, where D, is a representation of the don’t care set d, of the incompletely specified function ( & , d,, r,). Thus after each pass, by Theo- 1 - ~ zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA 734 zyxw zyxwvutsr IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. 7, NO. 6, J U N E 1988 zyxwvutsr zyxwvutsrq zyxwvuts zyxwvu rem 2, Lemma 1, and Corollary 1, the current F, is prime and irredundant. Now if all m functions have failed to change on one complete pass through ESPRESSO-MLD, each has been shown to prime and irredundant given the final state of q’. Thus by Definition 3 , q ’ is prime and irredundant . 0 V. EXPERIMENTAL RESULTS Tables I and 11 illustrate the results of running ESPRESSO-MLD on some multilevel examples generated using Weak Division [ 11. These computational results were obtained using an approximate implementation of ESPRESSO-MLD. The approximation made was the following. In practice DZA, can be quite large, so only a subset of the complete DZA, was used in obtaining the results of Table I. The subset used was the don’t care terms associated with the set of all intermediate variables which are in the transitive fan-out of the transitive fan-in of F,, but not in the transitive fan-out of F,. Thus the REDUCE operation of ESPRESSO-IIC is limited to the introduction of either primary input variables or intermediate variables which are in this set. This approximation is returned (line 5 ) by the subprocedure call to SELECT2, and is also an “acyclic” approximation for the REDUCE operation in ESPRESSO-IIC. This acyclicity constraint prevents, as discussed in the above Remark, trivial reductions of F, by the REDUCE-EXPAND-IRREDUNDANT-COVER sequence. However, note that this requires EXPAND and IRREDUNDANT-COVER to operate with a$xed intermediate variable portion of the don’t care set, despite the fact that the transitive fan-in of F, is being altered by REDUCE. Note that this means the approximately implemented version of ESPRESSO-MLD does not guarantee primality , although ancillary experiments have indicated that the computationally minimized networks very probably are prime. Further, the experimental results appear to have high minimization quality, an observation based on attempts at further minimization, which used alternative computational techniques. In Table I “initial literals” refers to the number of literals in the original multilevel network. The next two columns refer to the number of literals saved when using just the intermediate don’t cares and when using both the intermediate and output don’t care sets. For example when plab was minimized using just the approximation by SELECT2 of DZA,, the resulting network had 9 fewer literals, but when both DZA, and DT, were used (line 10) the resulting network had 20 fewer literals than the initial network. This illustrates the significance of the transitive fanout don’t care set, since in all the examples of Table I we assumed OX, = 0, V i E PO. No table entry indicates that no function F, of the given network could be reduced in cost by the implemented minimization procedure. Runtimes in Table I are in CPU seconds on a Pyramid 90X, which is about twice as fast as a VAX 111780. The CPU time requirements ranged from minutes on the medium size jobs to hours on the larger ones. Use of the “output” don’t care set DOJ (cf. lines 9 and 10 of ES- TABLE I ESPRESSO-MLD MULTILEVEL MINIM17ATION RESULTS Literals Saved Name mark fO fl f2 f3 f4 f5 gerf dec 1 fadd2 clpl insdex plac 8fun exam2 rd53 adder dec2 plab 24 Initial Literals 8 :: 28 73 75 75 17 52 29 19 79 191 83 73 62 48 149 119 58 DIM, DIM, U DO, 1 1 1 Runtime DIM, DIM, U DO, 1 1 1 zyxwvu 4 1 2 4 I 1 3 2 5 7 3 3 14 4 3 9 14 2 2 5 9 28 87 44 1 I I 3 21 2 5 40 1746 70 45 12 4 204 1 434 8 5 28 3 3 24 4 4 20 20 57 130 118 3 34 3 57 3733 152 73 26 87 7852 1850 77 PRESSO-MLD) typically incurs a factor of 2-4 increase in CPU time. Table I1 contains the results of experiments run on the subset of the Table I examples for which the “SOCRATES” expert system was used to further optimize the output of the implemented version of ESPRESSO-MLD [ 11. The purpose of this set of experiments was to see if the technology-independent gains made by ESPRESSO-MLD were of value when its output was postprocessed by a technology-specific optimized mapping into a standard cell library. We used the SOCRATES expert system for this purpose [ 11. In the headers of Table I, AA corresponds to running Weak Division in area-specific mode and then running SOCRATES in the area-specific mode [ l ] . Similarly, DD corresponds to running Weak Division in delay-specific mode and then running SOCRATES in delay-specific mode. The last 4 columns show the effect of inserting ESPRESSO-MLD into the synthesis loop. AA* corresponds to running ESPRESSO-MLD on the output of Weak Division running in area-specific mode and then running SOCRATES in the area-specific mode, and DD* corresponds to running ESPRESSO-MLD after running Weak Division in delay-specific mode and then running SOCRATES in delay-specific mode. It can be observed that when technology-independent multilevel minimization was used as a preprocessor to SOCRATES, the AA* area numbers were better than the AA results in 8 of the 12 cases. In 3 of the other cases, better area delay tradeoffs were exhibited. In the 6 0 0 ” examples the delay was reduced (relative to D D ) in all but one case (exam). These numbers indicate that technology-independent multilevel minimization is often a valuable step to take in the synthesis and optimization process, even when the final result is postprocessed by a technology-specific, optimizing expert system. zyxwv 1 BARTLETT zyxwvutsrqponmlkj zyxwvutsrqponmlkjihgfedcb zyxwvutsrqponmlkji zyxwvutsrqponmlkj zyxwvutsr zyxwvutsrqpo er 735 al. : MULTILEVEL LOGIC MINIMIZATION TABLE 11 WEAK-DIVISION-ESPRESSO-MLD fadd adde dec 1 24 rd53 15 exam f4 8fun plab dec2 plac RESULTS AA AA DD DD AA* AA* DD* DD* Area Delay Area Delay Area Delay Area Delay 39 56 73 76 89 97 98 103 107 158 203 249 12 12 12 13 22 14 13 13 14 18 22 22 47 57 84 117 90 124 127 118 141 192 243 337 9 18 6 16 11 11 9 10 13 14 16 16 32 59 69 58 82 95 94 103 110 176 20 1 256 9 14 10 16 15 14 11 9 13 15 20 26 61 14 109 116 124 128 8 10 8 10 336 15 In addition to assuring primality and irredundancy the don’t care set may be used to alter the adjacency relations of the Boolean network, as shown in the example of Fig. l(b). It is of interest to observe that when ESPRESSO-MLD is run on this example, the starting representation (bottom left) is prime and irredundant. Thus the first EXPAND and IRREDUNDANT-COVER operations in ESPRESSO-IIC will have no effect. We have observed that this also occurred in each of the examples of Table I, each of which was output from the “weak division” process of algebraic decomposition [8]. We conjecture that this will always be the case for multilevel examples produced by Weak Division. However, in this example, after the initial REDUCE operation is performed, the prime, irredundant, and, with high probability, R-minimal result will be obtained in the second or third EXPAND step. This again occurred on all the examples of Table I for which minimization was successful. We observe, in fact, that REDUCE is performing a major part of the role of the minimization process referred to as Boolean substitution in [8]. VI. TESTGENERATION AS LOGICMINIMIZATION (OR VICE VERSA) We now state some basic results on testability, with the intent of 1) establishing, in greater detail, the intimate relationship between logic minimization and test generation; 2) demonstrating that after multilevel logic minimization, a prime and irredundant Boolean network is obtained for which there is no need whatsoever for either test generation or testability analysis. E E, C B” ’“, where D’, n ( First note that because U* D, = c i e P 0 fl TFO, zyxwvu m,~;). (6.1) zyxw zyxw (x*) E m,, the local inputs to FJ will have the same (cf. (2.1)) values they will have under test, i.e., when x* is applied to theprimary inputs. Further, because U* E E,, there will exist at least one primary output node, i E P O r l TFO,, such that U* E E, fl DTIJ. Because U* E El,we are assured that x* represents an external care condition for primary output i. Finally, note that because U* E EIJ, we may conclude that not only does the test produce a difference U, ( x ) f U,’ ( x ) between the good (7)and fault (7’) machines, but that this change is propagated to output i as well (i.e., U , ( x * ) # U,’ ( x * ) ) . It may be observed that the condition v * ( x * ) E E, plays the role of the “implication” phase of the D-algorithm [25], and U* ( x * ) E T T , plays the role of the “propagation” phase. We begin our treatment of the interrelationship between testing and logic minimization by showing that the transitive fan-out don’t care set of Definition 6 can be directly related to the set of output stuck fault tests. This relationship is made precise by the following theorem. Theorem 4 Assuming that there are no external don’t care conditions, don’t care set zyxwvutsrq zyxwvut A. Test Generation as a By-product of Logic Minimization Our derivation of the complete don’t care set (cf. Theorem 1) reduces the testing question for function F, of a multilevel Boolean network 17 to, in effect, the 2-level case. In fact, we shall show that any stuck fault test x* is simply the primary input part of a solution vector u * ( x * ) DT,= I Ep o n TFO, DTJ is the set of primary input vectors which do not test the Boolean network 7 for either of the output stuck faults y, stuck-at-1 or yJ stuck-at-0. Proof: It was shown in [19] that a test x* exists for the output fault yJ stuck-at-1(0) if and only if 7 f 7 v , c ~ ,Let ) . T1, (TO,) be the set of all such tests. Hence, by Definition 2, some i E PO n TFO,}. 1 736 zyxwvutsrqponm zyxwv zyxwvutsrqponml zyxwvutsrqponm zyxwvutsrqpon zyxwvut zyxwvutsr zyxwvu Since IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. 7 . NO. 6, JUNE 1988 U, ( x ) = l ( 0 ) implies that U, ( x ) = ( u , ) ~( (~U , ) ; , ( x ) ) , V i E PO, it then follows that for each such test, x , there exists some i E PO fl TFO, which has the property ( x ) # ( u , ) ~( x, ) . It follows from the Definition 6 that DT, = (Tl, + TO,). 0 This theorem shows that if no test exists for either yJ stuck-at-1 or y, stuck-at-0, then DTJ is tautologous, i.e., DT, = 1. It is well known that in this case F, can be deleted from the Boolean network (such deletions actually occur frequently in practical multilevel logic minimization). On the other hand, DT, = Q would imply that all primary input vectors would be tests for either y, stuckat-1 or y, stuck-at-0. Since this is unlikely to occur in practice, we conclude that the typical case is DTJ # 63, hence DT, can be expected to be helpful in minimizing F,. However, note, as shown by Example 2 of Section 111, that DT, can be empty, meaning that all primary input vectors test for y, stuck-at-1, yet some of the DT,, can still contribute to D,, due to the interrelationship with the OX,. One interpretation of the typical case DT, 1, DT, f 63, is that F, may be partially redundant, in the sense that some of its otherwise “care” on set minterms may be covered by DT,. This type of partial redundancy must be exploited in the minimization of F, if it is to be made prime and/or irredundant. Having established how the computation of the don’t care set provides a direct and constructive link between logic minimization and test generation, we now turn our attention to the testability of a prime and irredundant Boolean network. The usual measure of testability for a Boolean network q is how many of its individual input or output stuck faults are testable. One of the most significant aspects of the relation between logic minimization and testing is that making q prime and irredundant implies much more than merely making it 100-percent testable for the usual input and output single stuck faults. This distinction is further emphasized when the nodes of the Boolean network are represented by complex gates (e.g., CMOS pluricells, domino logic, etc.) rather than simple primitives like NAND’S and NOR’S. To show this, we need to define a stuck fault model which is more fine grained than conventional input or output stuck faults. + De$nition 10 An internal stuck fault is a fault in which literal vk (or vk) of cube c of representation F’ of Boolean network q is stuck at either its existing value v k (or i&) or its opposite value Vk (or vk). 0 Proof (Ifpart): Suppose Boolean network q is prime and irredundant, and suppose cube c of function F,, is being raised to prime. Suppose c contains literal vk (i&) and a logic minimizer is checking to see if c* G F, U D, , where c* is just c with literal vk (3k) replaced by Vk ( u k ) . A negative answer implies that there exists a vertex x* E B” such that u * ( x * ) E c*RJ, where R, = ( F , U 0,).In fact, the minimizer must discover such a vertex U* ( x * ) E Bm + * before it can declare variable k of cube c of function F, to be prime. Given U* ( x * ) , we simply take the primary input part x* = V*(X*)~, to obtain a test for an input fault. The fault tested is the internal stuck fault “variable vk of cube c stuck at b,” where b = 1 if v k E c , and b = 0 if 3, E c. Thus when x* is applied to q, the value v : ( x * ) = 7; will appear as an input to FJ in the good _machine, for which F, is off, i.e., uJ = 0, since U* E F, D,. But with uk stuck at b, cube c in F, will be turned on for input U* ( x ) , so that z; = 1 in the “fault machine’’ ( a Boolean network which we call q ’ ). Because U* is a minterm of the don’t care complement E,, (cf. (6. l)), we have v* DTk,, for some i E PO n TFO, , which by Theorem 1 implies that primary output U , ( x * ) will have a different value in the good and fault machines, i.e., U , ( x * ) # U: ( x * ) , so that q # 7’. This x is a test for input variable uk of cube c of FJ “stuck at 6” faults, where uk appe_ars as b in c. To show that tests are implied for “stuck at b” internal faults, consider the action of ESPRESSO-IIC (in line 11 of ESPRESSO-MLD) in testing if cube c of function F, is irredundant. It is clear that if cube c has been declared irredundant, then c c ( F , - { c } ) U 0,. If this is the case, then there exists a test vector x* and a corresponding relatively essential vertex v * ( x * ) E c such that U* ( x * ) E (F, - { c > )U DJ. Such a u * ( x * ) must be found by ESPRESSO-IIC before it can declare cube c irredundant. The corresponding x* is a test for vk stuck at b, where vk is any literal which appears as b in cube c . The test is for uk stuck at b, because for ck = b, v*(x*) is such that u z ( x * ) = b so that cube c is on for the good m-achine and thus u J ” ( x * )= 1. However, if vk is stuck at b , then c is off and U* ( x ” ) is such that all the other cubes of F, are off, so U , = 0 for the fault machine. Note here that the fault assertion “vk stuck-at-6” has limited scope. That i s , the assertion applies only to cube c , and not to other cubes of F,. Hence all these other cubes, which are of in the good machine, remain of in the fault machine. The argument then concludes as it did for the stuck-at-b case, which proves the if part. Note that x* tests any or all of the variables in cube c stuck at their “opposite” value, which constitutes a multiple rather than single stuck fault. Of course, any of the single stuck faults are also tested. (Only Ifpart): Assume q is 100-percent testable for internal stuck faults. That is, for each cube c and literal v k E c (we assume without loss of generality that vk appears positively in c ) , there exists a test x for variable uk stuck at 1. Since x is a test, cube c and literal vk will be “off” in the good machine, i.e., v k ( x ) = 0, and v ( x ) c, which implies vl ( x ) = 0 in the good machine. But zyxwv zyxwvutsrq These faults are called internal, since they correspond directly to transistor level faults in which the transistor representing the specified literal in the implemented logic is stuck on or off. Their definition enables us to prove our main testability result. Theorem 5 A Boolean network is prime and irredundant if and only if it is 100-percent testable for internal stuck faults. 1 zyxwvutsrqponmlk zyxwvutsrqponmlkjihg zyxwvutsrqponmlkjihgfedcb zyxwvutsrqpon BARTLETT el zyxwvutsrqpon zyxwvut zyxw zyxwvutsrq zyxwvutsrq U/. : 737 MULTILEVEL LOGIC MINIMIZATION with uk stuck at 1, cube c will be “on” in the fault machine. Thus ul ( x ) = l , and, because x is a test, 7 # 7’. But uj ( x ) # U,! ( x ) implies c* $2 F, U D j , where c* is just c with literal Vk replaced by &. This implies cube c is prime in variable uk. The proof that cube c is irredundant follows similarly from the assumed existence of a test for variable vk stuck at 0 in cube c. This proves the only if part. 0 It remains to demonstrate that a prime and irredundant network is testable for all the conventional input and output stuck faults. To see that input stuck faults are all testable, note that in almost every case an internal stuck fault is also an input stuck fault. The essence of the argument is that since we have internal stuck faults for all variables of all cubes if the Boolean network is prime and irredundant, and since all the inputs of F j are contained in one or more of these cubes, the internal stuck fault tests cover all input stuck faults. This is made precise by the following result. Corollary 3 The internal stuck fault tests of a prime and irredundant representation F, also test all input stuck faults. Proofl First assume that the representation F, is binate in variable vk, i.e., that it contains (prime) cubes c’ and C O with literal vk appearing positively and negatively, respectively. Now the argument of the proof of Theorem 5 shows that the test that showed c’ is prime in literal Vk gives a test, x * , for input uk stuck-at-1. For this test, the good machine, 7,has U, ( x * ) = FJ ( y*, x * ) = 0 , but with vk stuck-at-1, cube c‘ turns on, so U; ( x ) = 1 in the fault machine. The same argument applied to cube CO yields a test for the input fault uh stuck-at-0. Next assume that F, is unate [5] in uk, i.e., that F, contains either positive or negative (in variable vk) cubes like c’ or C O , but not both. Suppose, without loss of generality, that there exists cube c’ E F, which contains literal vk, and is irredundant. Then, as in the proof of Theorem 5 , there exists a test x * for which c’ (and F,) are turned on, but all other cubes in F, are turned off. Now if input uk to F, is stuck-at-0, then c’ is turned off. Because F, is unate in uk no other cubes in FJ are turned on by the vk stuck-at-0 fault, so we have U , = 1 in the fault machine and U; = 0 in the fault machine. Note that in this case, the argument involving the primality of cube c’ still provides a test for vh stuck-at- 1. Now in either of the above two cases we have u ( x * ) E D,, else u ( x * ) would not contradict the nonprimality of c’ (or C O ) in the binate case or the redundancy of c’ in the unate case. Hence the differences between U , ( x * ) and U ’ ( x * ) propagate to some primary output (because v(x*) :ElJfor some i ) . Thus we have input stuck fault tests for both zik stuck-at-1 and VI stuck-at-0, and since this is true for any k E FI,, F, is 100-percent testable for input 0 stuck faults if F, is prime and irredundant. At this point we have established that a prime and irredundant network is 100-percent testable for both inter- nal and input stuck faults. But there are also multiple stuck faults which are guaranteed testable for a prime and irredundant Boolean network. To see this, observe that the internal stuck fault test, x*, for the primality of variable vk in cube c’ E FJ also tests for the primality of vk in all cubes c’ such that u ( x * ) E c’. So x* is a test for the internal faults vk stuck-at-1 in all of the cubes c’, and is also a test for the multiple internal stuck faults for which uk is stuck-at-1 in any subset of the cube set { c ’ }. Similarly, the tests derived from the redundancy test are also, typically, tests for multiple stuck faults. To see this, note that the input vector, x*, which contradicts the redundancy of cube c’ E F,, gives a stuck fault test for any literal ( uI or V I ) .In fact, any multiple internal stuck fault, comprised of any combination of the literals of cube c’ stuck at their opposite values, will also be tested by x*. These latter multiple internal stuck fault tests are also multiple input stuck fault tests for any subset of the set of variables which have literals in any cube c’ such that F, is unate in these variables. The principle at work in all these stuck fault test arguments appears to be the following. Suppose there exists vertex v ( x * ) E FJ DJ (the care off set of F,) which is distance one in variable Vk from a vertex D(x*) E F, U D,. Then x* tests for Vk stuck-at-I. Conversely, if u ( x * ) E F, D, (the care on set), and is distance one in variable vk from D ( x * ) E FJ U D,, then x* tests for vk stuck-at-0. It is precisely because the tests for primality and irredundancy tests are inherently obligated to isolate such vertex pairs that prime and irredundant networks are 100-percent testable for all input and internal single stuck faults. On this view, the process of automatic test generation is one in which one identifies care on set or care off set vertices which are located in the distance one “shells” surrounding the off and on sets, respectively. In books, e.g. [16], which take the traditional “simulation” (as opposed to don’t care) viewpoint, this concept is expressed in terms of the so-called Boolean differences. To see that output stuck faults are also included in this set of tests, note that F, U D, = 1 implies that FJDJ = 0, i.e., FJ has no “care” offset. In this case it is clear that no test exists for U, = yJ stuck at 1. But in this case every literal variable uk of every cube c of F, can be deleted in the minimized version of F,. This argument leads us to the interesting conclusion that if there exists any literal vk (or i kof ) any cube c E F, which is prime, then the test which has been shown to exist for the input fault “variable uk of cube c E FJ stuck at b” (where literal U, occurs as b in cube c ) is also a test for the output fault output ‘ ‘ U , = y, stuck at 1.” A similar argument applies to the case where F, 5 D,, which implies that F, E, = 0, i.e., F, has no care on set. This argument leads to the conclusion that any input z l k stuck at b test (for cube c E F,) is also a test for the fault output U, = yJ stuck at 0.” Thus, in terms of the don’t care sets, we can express the basis for the traditional “checkpoint” theorem, (cf. [ I O , theorem 2.31). We conclude that if 7 is prime and irredundant, it is zyxwvut “ 738 zyxwvutsrqponm zyxw zyxwv IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. testable for all output stuck faults as well, i.e., 77 is 100percent testable for input and output stuck faults. Tests are also implicitly generated for an entirely different class of faults, the so called “extra device” faults. In the A N D plane of a PLA, for example, an extra device fault could perhaps occur because of a discontinuity in an isolation mask, and thus polysilicon is erroneously laid over diffusion. This adds, in effect, an extra literal to some cube of the A N D plane. We claim that this type of fault is also completely tested for by the operation of ESPRESSO-IIC when called at line 11 of Fig. 4.These tests are implicitly generated by the REDUCE operation. Applied to cube c , this operation attempts to add to c all literals not originally present in c. If a literal cannot be added to c without intersecting the care off set, ESPRESSO-IIC will generate a test, as discussed previously, for the corresponding extra-device fault. Of course, if such a literal can be added to c, the corresponding extra-device “fault” is not testable. However, this type of extra-device fault will cause no error in the IO behavior of the function. The principal conclusion to be drawn from the above discussion is that prime and irredundant Boolean networks are far more than merely 100-percent testable for conventional input and output single stuck faults. In addition, they are testable for all the internal single stuck faults as well as for many multiple internal and input stuck faults as well as extra-device faults. 7, N O . 6, JUNE 1988 previously prime and irredundant, there will now exist tests for input and/or internal stuck faults which were not previously testable. For example, the prime and irredundant Boolean network of Fig. l(b) has three testable input faults which were not testable in the given network of Fig. 1(4. B. Logic Minimization as a By-product of Test Generation It is clear that all Boolean networks satisfying Definition 1 may be and-or decomposed into a “refined” Boolean network in which each node is either an OR gate or an AND gate. We assert that if a test generation tool is used to generate tests for all input and output single stuck faults, then the resulting Boolean network is prime and irredundant. This presupposes, of course, that if any “untestable” faults are discovered, the offending node or edge is deleted and the effect of this simplification is propagated to the rest of the network. In this way, logic minimization can be viewed as a by-product of test generation. However, such a procedure would not take advantage of the EXPAND IRREDUNDANT-COVER REDUCE cycle, which is responsible for ESPRESSO-MLD’s ability to quickly reduce a given Boolean network into a prime, irredundant and R-minimal form. It is in comparison to this hypothetical procedure that we call ESPRESSO-MLD “efficient.” zyxwvutsrqpon zyxwvut zyxwvutsr zyxwvutsrq zyxwvut zyxwvuts Remark The tests for the stuck faults of Theorem 5 and its corollary are, in principle, supplied as a by-product of the 2-level minimization step (line 11 in ESPRESSO-MLD). In fact if, as in the proof of the above theorem, cube c* is being intersected with the representation RJ = ( F , U 0,) of the care off set, then if U* E c*RJ, then U;, = x* is in internal stuck fault test. Providing the tests as a by-product of the minimization is simply a matter of outputting or otherwise recording such vectors x* as they are encountered in the minimization. 0 Thus the relationship between testing and logic minimization is quite profound. In fact, it follows that once all internal stuck fault tests have been identified and any discovered logical redundancies removed, the Boolean network is prime and irredundant. In brief, Boolean networks are prime and irredundant if and only if they are 100-percent testable (i.e., for conventional input or output faults and internal single stuck faults). Many multiple stack faults will usually be testable, and the tests for all of these various stack fault tests and supplies as a byproduct of the minimization. No separate test generation phase is necessary. As a final comment, we observe that one cannot decrease the testability of any single function, F J , of a given Boolean network by making that function prime and irredundant. In fact, every single (input and internal) stuck fault which was testable prior to calling EXPAND and IRREDUNDANT-COVER to make FJ prime and irredundant is still testable afterwards. Further, if FJ was not VII. CONCLUSIONS We have presented an approach to multilevel minimization based on don’t care sets implied by embedding completely specified functions in a Boolean network. The presentation has including the following: Definitions of prime and irredundant networks have been given, which are straightforward extensions of those for the 2-level case, and which are based on the notion of equivalence of two Boolean networks. We have presented an algorithm, ESPRESSO-MLD, for multilevel minimization which transforms Boolean networks into prime, irredundant, and, with high probability, R-minimal form. We have proven the physically plausible statement that prime and irredundant networks are 100-percent testable for conventional single stuck faults, and that the converse is also true if the internal stuck faults of Definition 10, which include multiple faults, are also testable. We have further shown how the stuck fault tests derive straightforwardly from the minimization process. We have defined the transitive fan-out don’t care sets both in terms of network equivalence and in terms of the set of output stuck fault test vectors. We have provided a proven construction of the representation (3.4) of the don’t care set dj of the incompletely specified function ( &, d j , r j ) . We have observed that the representation D j is not invariant with respect to the minimization of another func- 1 - zyxwvutsrqponmlk zyxwvutsrqponmlkjihgfe zyxwvutsrqponmlkj BARTLETT er al. : MULTlLEVEL LOGIC MINIMIZATION 739 tion, say Fk (cf. discussion of Example 2, Section 111). function. Thus ESPRESSO-MLD is applicable to alternative technologies such as domino logic, NMOS, and CMOS pluricells. Another contrast is that although some It is a well-known fact that actual failure modes of fab- modem D-algorithm variant, e.g., FAN [16], might, because of its restricted applicability, be much faster in findricated chips do not always correspond to the fault model of single stuck faults. Nevertheless, it is also a fact that ing a single stuck fault, ESPRESSO-MLD might be faster complete testability of the single stuck faults usually leads in finding all such faults. This is because ESPRESSO-MLD can use 0, , once it is constructed, to repeatedly to a high percentage of working chips. We conjecture that find all the internal and input stuck faults for the inputs the “extra” testability associated with prime and irredundant networks is at least partially responsible for this fact. (and output) of FJ. ESPRESSO-MLD does, in this sense, The conjecture is based on the hypothesis that designers offer an interesting alternative to any D-algorithm variant ‘‘naturally” attempt to design prime and irredundant net- in finding all stuck fault tests, especially in Boolean networks, without consciously seeking to do so. As disworks from such technologies as domino logic or complex cussed above, if this occurs, many “extra” faults are CMOS, where individual nodes have “large” Boolean functions. tested. Of course we must keep in mind that the miniSome readers may object to referring the transitive fanmization .process described in this paper applies to a techout don’t care set all the way back to the primary inputs, thus creating something of a misnomer. Note that DTIJ nology independent level of representation. This is no could have been premultiplied by DZ,, in Definition 6, and problem for complex CMOS cells, but when standard cells are required, care must be taken to use a technology mapthen DTJ really would have depended solely on the tranper (such a mapper is described in [2]) which preserves sitive fan-out of F,. We believe that if Definition 6 were so altered, the remainder of the theory of Section I11 would the properties of primality and irredundancy and, hence, remain valid (although we have not carried this exercise 100-percent testability. It seems reasonable to conclude, through rigorously). It is not clear whether or not therefore, that a Boolean network with one single func(E,DT,J) has a more compact representatioh than DT,,, tion, F,, which is not prime and irredundant should be since although the intersection with E, decreases the minimized if we can afford the computational expense, number of minterms, this operation also “fractures” the else we will be putting “fat” into silicon. Future work representation into smaller cubes. We prefer the form must be done to characterize the domain of applicability of the reported minimization procedure. There certainly given for Definition 6, because of the direct connection exist some practical Boolean networks which can be hanto testability established by Theorem 4. We have also given an exposition of the role of the ES- dled, and some which cannot. PRESSO “REDUCE” operation in “reshaping” prime and irredundant Boolean networks into more efficient repACKNOWLEDGMENT resentations and in achieving the important property of The authors acknowledge the benefits of helpful disR-minimality. It has been observed that this part of the cussion and commentary from M. Lightner, A. R. Newminimization process is critical in breaking out of the lo- ton, T. Sasao, and T. Williams. A. DeGeus and D. Grecal minima associated with merely prime and irredundant gory contributed valuable technical input as well as representations. ESPRESSO-MLD achieves high minmaking GE’s “SOCRATES” expert system available to imization quality by calling ESPRESSO-IIC, which loops us for testing. Finally, we note that this work would not through the EXPAND-IRREDUNDANT-COVER-REhave been possible without the continued support of B. DUCE sequence. We have noted that while prime and Chern of the National Science Foundation. irredundant status is achieved in one pass in the 2-level case, an iteration is required in the multilevel case, beREFERENCES cause of the interdependence of the individual 2-level K . A. Bartlett, W . Cohen, A. DeGeus, and G. D. Hachtel, “Synthefunctions embedded in the Boolean network. sis and optimization of multilevel logic under timing constraints,” Computational results obtained using an approximate IEEE Trans. Computer-Aided Design, pp. 582-596, Oct. 1986. “C” implementation of ESPRESSO-MLD were preK. A. Bartlett, D. G. Bostick, G . D. Hachtel, R. M . Jacoby, M. R. Lightner, P. H. Moceyunas, C. R. Morrison, and D. Ravenscroft, sented. We believe that the minimized Boolean networks “BOLD: A multiple-level logic optimization system,” ICCAD87. 7’ obtained for the test problems are prime and irredunD. Brand, “Redundancy and don’t cares in logic synthesis,” IEEE Trans. Computers, vol. C-32, pp. 947-952, Oct. 1983. dant even though an approximated don’t care set was used. R. K . Brayton and C. T . McMullen, “The decomposition and facWe note that further research into multilevel minimitorization of Boolean expressions,” in Proc. Inr. Symp. on Circuits zation as a test generation method might be worthwhile, and Systems, Rome, pp. 49-54, 1982. R. K . Brayton, G . D. Hachtel, C. McMullen, and A. Sangiovanniespecially in cases where 100-percent coverage is desired. Vincentelli, Logic Minimization Algorithms f o r VLSI Synthesis. The basic D-algorithm [25] and its variants [16] typically Boston: Kluwer Academic, 1984. operate on Boolean Networks for which each function F, R. K. Brayton and C. T. McMullen, “The Yorktown logic editor users manual,” IBM Technical Report, Yorktown Heights, New York, is a primitive gate (NAND,NOR,XOR, etc.). In contrast, 1984. ESPRESSO-MLD operates on a general Boolean NetR. K. Brayton, G . D. Hachtel, C. McMullen and A. Sangiovanniwork, where each of the FJ represents an arbitrary 2-level Vincentelli, “ESPRESSO-11: A new logic minimizer for program- zyxwv zyxwvutsr zyxwvutsrqpo zyxwvu zyxwvuts zyxwvut - zyxwvu 1 - 1 740 zyxw zyxwvutsrqponm zyxwvut zyxwvutsrq zyxwvutsrq IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. 7, NO. 6. JUNE 1988 mable logic arrays,” IEEE 1984 Custom Integrated Circuits Conf., Rochester, NY, May 21-23, 1984. [8] R. K . Brayton and C . T. McMullen, “Synthesis and optimization of multi-stage logic,” in Proc. IEEE Int. Conf. Computer Design, Rye, NY, Oct. 1984. [9] M. A. Breuer, “Generation of optimal code for expressions via factorization,’’ Commun. ACM, vol. 12, no. 6, June 1969. [IO] M. Breuer and A. Friedman, Diagnosis and Reliable Design of Digital Systems. Potomac, MD: Computer Science Press, 1976. [ I l l M. R. Dagenais, V. K. Agarwal and N . C. Rumin, “MCBOOLE: A new procedure for exact logic minimization,” IEEE Trans. Computerdided Design, vol. CAD-5, Jan. 1986. [I21 J. Darringer, D. Brand, J . Gerbi, W. JoynerandL. Trevillyan, “LSS: A system for production logic synthesis,” IBM 1.Res. Develop., Sept. 1984. [I31 G . DeMicheli, “Symbolic minimization of logic functions,” in Proc. Int. Conf. on Computer-Aided Design, pp. 293-295, Nov. 1985. [I41 J. Dussault, C . Liaw, and M. Tong, “A high level synthesis tool for MOS chip design,” in Proc. 22nd Design Automation Con$, Albuquerque, NM, June 1985. [I51 A. D. Freidman, Logical Design of Digital Systems, 1975. [16] H. Fujiwara, Logic Testing and Design for Testability, The MIT Press, 1985. [17] D. Gregory, K. Bartlett, A. J. deGeus and G . Hachtel, “SOCRATES: A system for automatically synthesizing and optimizing combinational logic,” 23rd ACM/lEEE Design Automation Conf., June 1986. [18] G. D. Hachtel and R. M. Jacoby, “Algorithms for multi-level tautology and equivalence,” in Proc. IEEE Int. Symp. on Circuits and Systems, Kyoto, Japan, June 1985. [19] G. D. Hachtel and R. M. Jacoby, “Verification algorithms for VLSI synthesis,” in Proc. NATO AS1 on Logic Synthesis and Silicon Compilation for VLSI, The Netherlands, 1987. [20] S . J. Hong, R. G. Cain and D. L. Ostapko, “MINI: A heuristic approach for logic minimization,” I B M J . Res. Develop., vol. 18, pp. 443-458, Sept. 1974. [21] T. Hoshino, M. Endo, and 0. Karatsu, “An automatic logic synthesizer for integrated VLSI design systems,” IEEE 1984 Custom Integrated Circuits Conf. Proc., Rochester, NY, May 21-23, 1984. [22] E. L. Lawler, “An approach to multilevel Boolean minimization,” J . ACM, 1964. [23] S . Muroga, VLSI System Design When and How to Design Very-LargeScale Integrated Circuits. New York: Wiley, 1982. [24] B. C. Rosales and P. Goel, “Results from application of a commercial ATG system to large-scale combinational circuits,” in 1985 Int. Symp. on Circuits and Systems Proc., Kyoto, Japan. pp. 667-670. [25] J . P. Roth, Logic Synthesis and Verification. Potomac, MD: Computer Science Press, 1980. [26] J. P. Roth, “Minimization by the D-algorithm,” IEEE Trans. Computers, vol. 35. May 1986. [27] -, private communication. [28] R. Rudell, A. Sangiovanni-Vincentelli and G . DeMicheli, “A finitestate machine synthesis system,“ in Int. Symposium on Circuits and Systems, Kyoto, June 1985, pp. 647-650. [29] R. Rudell and A. Sangiovanni, “ESPRESSO MV: Algorithms for multiple-valued logic minimization, in Proc. Cust. Int. Circ. Conf., Portland, OR, pp. 230-234, May 1985. [30] G. L. Smith, R. J . Bahnsen, and H. Halliwell, “Boolean comparison of hardware and flowcharts,” IBM J . Res. Develop., vol. 26, no, 1 , Jan. 1982. [31] T. W. Williams, private communication. [32] L. Trevillyan, W. Joyner, and L. Berman. “Global flow analysis in automated logic design,” IEEE Trans. Cclmput., vol. c.35, pp, 7781, Jan. 1986. the University of Colorado. She is currently employed by Seattle Silicon. Her research interests include logic synthesis, design optimization, and silicon compilation. * Robert K. Brayton (M’75-SM’78-F’81), for a photograph and a biography, please see page 437 of the April 1988 issue of this TRANSACTIONS. * Gary D. Hachtel (S’62-M’65-SM’74-F’80), for a photograph and a biography, please see page 640 of the May 1988 issue of this TRANSACTIONS. * Reily M. Jacoby, for a photograph and a biography, please see page 640 of the May 1988 issue of this TRANSACTIONS. * Christopher R. Morrison received the B.S. degree in electrical engineering from Yale University, New Haven, CT, in 1977. From 1977 to 1982, he was with IBM at the East Fishkill Facility in Hopewell Junction, NY. His last assignment at 1BM was as a Senior Associate Engineer in the Computer Aided Circuit Design Department working on the circuit simulation program ASTAP. Since 1982, he has been on educational leave from IBM at the University of Colorado at Boulder, studying for the Ph.D degree in electrical engineering. He received an IBM Fellowship award for academic years 1984-85 and 1985-86. He has done research work i n routing algorithms, in particular, channel routing, and is currently working on optimization algorithms for multilevel combinational logic circuits. He has cowritten the program ESPRESSO-MLT (multilevel logic minimizer) and has written the program TECHMAP (technology mapper). In addition, he assembled the BOLD (Boulder Optimal Logic Design) system zyxwvutsrqp * Richard L. Rudell received the B S degree in electrical engineering from the University of Minnesota in 1983 and the M S . degree in electrical engineering from the University of California in 1986 He is currently working towards the Ph D degree in electrical engineering at the University of California, Berkeley From 1980 to 1983 he worked part-time at the Honeywell Corporate Computer Science Center in Minneapolis in the area of computer-aided design This work was in the areas of the test pattern generation, high-level synthesis tools, and floor planning algorithms for VLSI More recently, he has spent the summers of 1984 and 1985 working at the IBM T. J. Watson Research Center in the area of multiple-level logic synthesis. His current interests are in the area of multiple-level logic optimization, including design specification, factoring of Boolean equations, multiple-level minimization, and optimal technology mapping zyxwvutsr * Karen A. Bartlett received the B.S. degree in computer science from Washington University, St. Louis, MO, in 1980 and the M.S. degree in electrical engineering from the University of Colorado, Boulder, in 1986. From 1980 to 1983 she was employed by GTE Laboratories in Waltham, MA, where her projects included symbolic layout and VLSI database design and evaluation. Since June 1983 she has been active in the area of logic synthesis, first at General Electric’s Microelectronic Center and then at * Albert0 Sangiovanni-VincenteIli (M’74-SM’81-F’83), for a photograph and a biography. please see page 519 of the April 1988 issue of this TRANSACTIONS. * Albert R. Wang received the B S degree i n computer science and applied mathematics from the University of California, San Diego, in 1984 He is currently working towards the Ph.D degree in the Department of Electrical Engineering and Computer Sciences at the University of California, Berkeley His current research interests include multiplelevel logic synthesis and optimization, multiplelevel logic verification, and sequential logic aynthesis and optimization 1-