LIBRARY OF THE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN 510.84 XJl6r no. 728-733 spons'iblefor^f ^ this material i« SKaSSEaKs '••■ discipline.'""' ° nd ""derlinin of . T » «ne w cod Te.eoh ' SS °' *"" == == Zl_^i IN OIS IIBRARV AT , L, 6'~ O-J096 Digitized by the Internet Archive in 2013 http://archive.org/details/nornetworktransd728laih VM -UIUCDCS-R-75-728 NOR NETWORK TRANSDUCTION BY GENERALIZED GATE MERGING AND SUBSTITUTION PROCEDURES (Principles of NOR Network Transduction Programs NETTRA-G3 and NETTRA-G^) by H. C. Lai Y. Kambayashi June 1975 UIUCDCS-R-75-728 NOR NETWORK TRANSDUCTION BY GENERALIZED GATE MERGING AND SUBSTITUTION PROCEDURES (Principles of NOR Network Transduction Programs NETTRA-G3 and NETTRA-G^) fey H. C. Lai Y. Kambayashi June 1975 Department of Computer Science University of Illinois at Urbana-Champaign Urbana, Illinois This work was supported in part by the National Science Foundation under Grant No. NSF GJ-^0221. 10, w fi ZS^33 ACKNOWLEDGMENT The authors are grateful to Professor S. Muroga for his guidance and careful reading of this report. The authors would like to thank Mr. J. N. Culliney for his valuable discussions throughout the period of this research. IV ABSTRACT Based on the concept of Compatible Sets of Permissible Functions (CSPF) discussed in the previous paper [l], several NOR network transduction procedures aiming at reducing the number of gates in a given network are introduced. These procedures can be classified into two types: gate merging procedures and gate substitution procedures. In a given NOR network, two gates can be merged to one if the intersection of their CSPF's is not empty and a function contained in that intersection can be realized by connecting the outputs of some gates already existing in the network to a new NOR gate as its inputs. This process is called gate merging. Several procedures of gate merging are discussed. On the other hand, a gate substitution procedure replaces each fan-out connection of a certain gate with a set of connect able functions based on CSPF's (possibly each fan-out connection with a different set of connectable functions). A generalization based on possibly-connectable conditions is also discussed. Two procedures, one for each of gate merging and gate substitution were implemented as computer programs NETTRA-G3 and NETTRA-Qlf respectively. Computational results showed that these procedures are efficient and effective in reducing the number of gates in a NOR network which has relatively many redundant gates. TABLE OF CONTENTS 1. INTRODUCTION ± 2. GATE MERGING AND ITS GENERALIZATIONS 1+ 3. GATE SUBSTITUTION AND ITS GENERALIZATIONS 30 k. COMPUTER PROGRAMS AND EXPERIMENTS kf U.l Program for Gate Merging Uy k.2 Program for Gate Substitution Uo, ^4.3 Experiments by Computer Programs 55 5. CONCLUSIONS ^ REFERENCES 55 1. INTRODUCTION The design of NOR (or NAND) networks with many gates is one of important problems in logic design. The network transduction methods [1] appear promising to solve this problem ("transduction" means trans formation and re duction ). The concept of CSPF's (Compatible Sets of Permissible Functions) was introduced in [1]. Several network transduction methods based on CSPF's were discussed and applied to the simplification of NOR networks [2-5]. In this paper, using CSPF's, we will generalize two known network transduction methods (gate merging and gate substitution) discussed in [7] and [8]. The possibly-connectable condition will be introduced for further generalizations. The concepts and symbols defined in [1] will be used throughout this paper. The following definitions and theorems introduced in [k] will also be used. Definition 1.1 A gate or an input terminal, v., is said to be connect able to a gate v. with respect to a set of permissible functions of v., G(v ), if (1) the output function of v. remains in G(v.) after adding 3 3 3 3 connection C , and (2) the network obtained after this input addition is loop- free. Definition 1.2 Connection C. . is said to be disconnectable from a gate v with respect to a set of permissible functions of v., G(v ) if the J 3 3 output function of v. remains in G(v.) after removing C. . from the network. 3 3 i,J Definition 1.3 The set of connectable functions to gate v with - j respect to G(v.), K(v.), is the set of all functions such that the addition J J of any subset of these functions to v. as its inputs keeps the function realized at v. remain in G(v. ). -] 3 Theorem 1.1 A gate or an input terminal, v., is connectable to v. with respect to set G(v.) if and only if the following conditions are J satisfied: (1) For all d such that f^(v. ) = 1, G<; d) (v.) = or *. c 3 where f (v. ) is the d-th component of the output vector of gate v. . (2) v. is not contained in S(v ) where S(v ) denotes 1 3 3 the set of successor gates of gate v..- Theorem 1.2 Connection C. . is disconnectable from gate v with 13 fa .3 respect to set G(v.) if and only if the following condition is satisfied: J For all d such that f^ d '(v. ) = 1, either G (d) (v.) = * or J V f (d) (v) = 1 veIP(v.) v/v. 3 ' 1 where ^ denotes logical OR operation and IF(v.) denotes the set of all 3 immediate predecessor gates of gate v.. J Theorem 1.3 The set K(v.) of all connectable functions to a gate v. with respect to G(v.) is given by 'J J IC d ^(v.) == for all d such that G^(v.) = 1. and 3 3 K^ d '(v.) := * for all other d's. J NOR network transduction procedures based on the above connectable and disconnectable conditions are discussed in [k]. These conditions are also essential for the gate merging and gate substitution procedures to be discussed in Sections 2 and 3, respectively. The "possibly-connectable" condition will be introduced in Section 2 in order to generalize these procedures. Two computer programs designated NETTRA-G3 and NETTRA-QJ+ have been prepared and tested. Program NETTRA-G3 realizes a gate merging procedure whereas program NETTRA-Cx4 realizes a gate substitution procedure. Section k will be devoted to the discussion of these programs along with computation results. 2. GATE MERGING AND ITS GENERALIZATIONS In this section generalizations of a transduction method known as gate merging will be discussed. The "possibly-connectable" condition will be introduced in order to generalize these procedures. Figure 2.1 shows a simple example of gate merging. The networks in Figure 2.1(a) and (b) realize function f, I = X, Xp ^y X_ X~ . In the network in Figure 2.1(a) we can add redundant inputs x p and x to gates Vr and v , respectively. By adding these redundant inputs we can merge gates V/- and v , deriving the network in Figure 2.1(b). This kind of transformations was discussed in [6] and [7]. Definition 2.1 Gates v. and v. are said to be merge able if the l j a following conditions are satisfied: (1) v. ^ S(v. ) and v. £ S(v.), where S(v. ) denotes J -L -L J -L the set of all successor gates of v. and S(v.) i ^ is similarly defined. (2 ) Each output terminal v _, . realizes a function in set ' * n+R+i z. f for i = 1, 2 f ..., m, after the following network modifications : (2-1) Add connections from all gates and input terminals in IP(v. )-IP(v. ) to gate v., where X. Vs >o- V x^ ^i>^r 5 J - (a) A given network v. Vr x P -y v... X, 2 ~\ v, l . *i- 5 V V, 8 O f (b) Simplified network Figure 2.1 Example of Simple Gate Merging IP(v.) denotes the set of all immediate predecessor gates of v. and IP(v. ) is 3 1 similarly defined. (2-2) Add connections from all gates and input terminals in IP(v. ) - IP(v.) to gate v.. If two gates v. and v. are mergeable, then we can replace these two gates by gate v. . satisfying IP(v. .) = IP(v. ) U IP(v.), ij i 3 IS(v. .) = IS(v. ) U IS(v.). " ij i J This gate, v. . is called the merged gate. Condition (l) of Definition 2.1 is a loop-free condition for the network after merging two gates v. and v . Conditions whether we can add an input to a gate without changing output functions of the network were discussed in [6], [7] and [8]. The condition given by Lai, Nakagawa and Muroga [8] is the best among these conditions. The condition is as follows. "When on each path from gate v. to an output terminal there exists a gate which has an input connection from v. (gate located outside all these paths or input terminal), we can J add a connection from v. to v. without changing that output of the network. If this property holds with all outputs of the network then we can add a connection from v. to v. without changing any output of the network. " However, in order to use this condition we have to check all possible paths from gate v. to all output terminals. We can generalize the procedure using CSPF's. Theorem 2.1 Gates v. and v. are mergeable if the following conditions are satisfied: (1) v. £ S(v. ) and v. £ S(v. ), (2) g c (v.) na c (y.) /0, (3) f^)-^) e G c (v.) nG c (v.), where symbol • denotes the logical AND operation for each component of f(v. ) and f(v.). i 3 Proof If the function realized by the merged gate v. . is contained in G (v ) n G (v ) then each output terminal v _, . realizes a function in set z i (i=l, .. .,m). We only need to prove that f(v. )«f(v.) is the output J function of the merged gate v. . . As gates v. and v. realize f(v ) and f(v ), respectively, the following relations are satisfied because v and v 3 i 3 are NOR gates : V f(v) = f (v ,), v£lP(v. ) x l V f(v) = f(v.). veIP(v.) J 3 The merged gate realizes function ( V t{v)K V f(v)J veIP(v. ) veIP(v.) J = f(v ) V f(v ) = f(v. )-f (v.). Q.E.D. If we want to simplify a network by gate merging, we have to examine for each pair of gates whether the conditions of Theorem 2.1 are satisfied. The following lemma gives a sufficient condition for condition (2) of Tneorem 2.1. Lemma 2.1 If there exist two gates v. and v. satisfying IS(v. ) = IS(v.) i 3 8 then G (v. ) DG (v.) / 0. c 1 c .i ' ' r Proof : For simplicity we consider the case where v. and v. are connected to one gate v . There are three cases as follows: (1) G^ d) (v ) = *, then G (d) (v. ) = * and G (d) (v.) = ♦. C JS C 1 C J (2) G {d \v ) = 1, then G^ d) (v. ) = and G (d) (v.) = 0. C K CI C J (3) G^ d) (v k ) = 0, then G^ d) (v.) = 1 and G^ d) (v.) = *; G (d) (v. ) = * and G (d) (v.) = 1; C x c v J J ' or G (d) (v. ) = * and G (d) (v.) - * c i c v i \ J depending on ordering r and other inputs connecting to v (see [1] for ordering). Since there exists no d such that G (d) (v. ) = 1 and G (d) (v.) = 0; c X C x J J ' or G (d) (v. ) - and G (d) (v.) = 1, CI c J the theorem statement holds. The above argument can be easily generalized to the case when IS (v. ) consists of more than one gate. Q.E.D. Procedure MGC : Merging of gates using CSPF's. Step 1 Select two gates v. and v. such that — i J v.. i S(v.), v. I S(v. ), and G (v. ) DG (v.) / r( \) for every v i S(v ) U S(v ) U (v., v.) and every v e S(v. ) U S(v.) U {v., v.} As a result we have a greater possibility of merging of these two gates. We can easily prove that this procedure gives no worse result than the procedure using the condition given by [8]. The following example shows how Procedure MGC works. Example 2.1 : Figure 2.2(a) shows a network which realizes a four-variable function f. f = (l 0000 0011 110 1) Functions realized at input terminals and gates are as follows : f (v x ) =(0 000 0000 1111 1111) f(v 2 ) =(0 000 1111 0000 1111) f(v 3 ) =(0 011 0011 0011 0011) f(v^) =(0 101 0101 0101 010 1) f (v^) =(1111 1111 0000 000 0) f(v u ) =(0 000 0000 1100 110 0) LO x„ V x,.— v 9 v, x. X 2--| y 10> '** \ v 7 >c- -g> x ^=5^r>- 13^> — 5 >° — o v. 13 (a) A given network 1^02 6 V x 2 _Jv 10 V- X, Xp r~ —\, ^o_Jx 3 q V8 v ^y° — z^_ \>-° V 13 (b) Network obtained after applying procedure GMC Figure 2.2 Example 2.1 11 f(v 1Q ) =(1111 0000 1111 000 0) f (v ) =(1000 1000 1000 100 0) f(vg) =(0 000 0000 1100 000 0) f(v ) =(0 000 1010 0000 0010) f(v 6 ) =(0 111 0111 0000 000 0) f(v ) =(1000 0000 0011 110 1) Let us calculate CSPF's. Ordering r is as follows: r(v ± ) = i-if for i = 5, 6, . .., 12, r(v i ) = i+8 for i = 1, 2, . .., h. Since v is an output terminal, g c (c 5 ) = (1 0000 0011 110 1) = f. As v is a single output gate, G (v_) =(1000 0000 0011 110 1). c p ' CSPF's for inputs of v_ are calculated as follows: G (v r ) =(1000 0000 0011 110 1) c 3 f(v 6 ) = (0Q©@ 0®1Q 0000 000 0) f(v ) = (0 @0®0 0000 ooQo) f (vq) =(0 000 0000 QQ 0) ( d ) For any d such that G^ J (v ) = at least one input should be 1. These selected inputs are encircled. For any d such that G^ d '(v ) = 1, the d-th c p component of every input must be 0, so CSPF's for inputs of v are: 5 G c (C 6 ) = (0 111 * 1 * 1 "00 00*0), G c (C ) = (0*** 1*1* **00 0010), and G c (Cg ) =(0*** **** 1100 00*0). 12 As y<, v and Vq are single output gates, °c ( V " G c' c)). In this example, IS(v xl ) Uis(v 8 ) = {v 10 ,v 5 }, but IS(v 8 ^) = {v 5 }. Thus IS(v i;L ) U IS(vq) = IS(v Q ) is not satisfied. The connection from v ll t0 v 10 becomes redundant due to the removal of the connection from v to v Q (this removal changes CSPF for v, to a larger set). 18 x? V. X *i-l3/ ^ V 10 =&■ \ V, X-, v, V 7 ^— -) v 5 (a) A given network x 1 *a v i2 J Xi X M^°-% V 10 % Xi V ;■:,- v r r ! v 5 (b) After applying Procedure GMG-C (dotted lines show redundant connections ) Figure 2.k Example 2.3 19 Example 2.k. The network shown in Figure 2.5(a) realizes function f f = (1 1 1 0111 0001 000 1). Functions realized at all input terminals and gates are as follows: f (Vj) = (0 000 0000 1111 1111) = x f(v 2 ) =(0 000 1111 0000 1111)=, f(v 3 ) =(0 011 0011 0011 11) = x f (v. ) = (0 101 0101 0101 10 1) = Xl f(v 13 ) = (1111 0000 1111 000 0) f ( v !2) =(0 000 1100 0000 110 0) f ( v u ) =(1010 0010 0000 000 0) f ( v 10 ) = (0 000 1000 1010 1010) f(v 9 ) = (1100 0100 0000 000 0) f(vg) =(0 001 0000 0000 000 0) f(v ? ) =(0 000 1000 1100 110 0) f(v 6 ) = (0 000 1000 1010 1010) f(v 5 ) = (1110 0111 0001 000 1) Here we want to replace ^ and v^ by a new gate, y^^. Let us choose ordering r as follows: r(v 1Q ) = 1, r (v xl ) = 2, r^) = 3j r (v 6 ) = k, r(v ? ) = 5, r(v 8 ) = 6, r(v 9 ) = 1, r^) = 8, r(v x ) = 9, r(v 2 ) = 10, r(v 3 ) = 11, r (^) = 22. Disconnect all inputs of v 10 and v^ and calculate CSPF's as follows: o c (v 5 ) = (1110 0111 0001 000 1) G c ( v £)=(0 00* *000 * * 1 Q * * 1 0) G c (v ? ) =(000* 1000 11*0 11*0) G c (vg)=(0 001 *000 * * * ***o) 20 UA U o -p 0) H cd •H bO ■H Sh O H a\ . I £1 no ■d o H O to ft •H (D XI -P { G ( c ^ q)=(11*0 * * * * * * * * * * * *\ c 9> o ' G (c nn Q ) = (* * 1 * * -x- * * * -x- •* •*•*-* *-) c 11, o y G (v ) =(11*0 01** 000* 000*) C y G (v ) =(0 0** 10** * * * * * * * *) G (v,, ) =(**10 * * 1 * **o* * * o *) = (0 010 101* **o* * * *), K(v ) = (* * * 0*0* * * * * ****). After we removed all inputs of v 1Q and v we have obtained the network shown in Figure 2.5(b). There is an isolated subnetwork consisting of two gates (v^ and v ). We can use any function realized by a new network using at most two NOR gates as an input of v (i.e., the isolated subnetwork is ignored and we try to realize a new network of at most two gates which realizes functions useful for us). If we use the following functions as the inputs of v 1Q 1± , then v realizes a function in G c (v i0,ll> : Thus, the network in Figure 2.5(c) is obtained. If the isolated networks resulting from the disconnection of the inputs of v ± and v consist of t gates, we discard these isolated subnetworks and construct a new network of at most t gates such that the output functions at the gates in this network can be used as the input set to the new gate 22 under consideration. However, such a procedure is very difficult to formulate so we restrict the set of available functions as inputs of v. . as follows : (1) external variables, (2 ) functions realized by gates not contained in S(v. ) U s(v.) U [v., v.), l j i j (3) t functions which are realized by t separate NOR gates (with input from input terminals). For a further generalization of gate merging we define the possibly-connectable condition as follows. Definition 2.2. Gate v. is said to be possibly-connectable to v. if the following conditions are satisfied: (1) f (v. ) fi K(v.), where K(v.) is the set of -k d J connectable functions to gate v., (2) K(v ) OG (v.) f p, (3) v. i S(v ). Condition (l) shows that v. is not connectable to v.. Condition (2 1 shows that v. can be connectable to v. if v. realizes a proper function in G (v. ). Condition (3) is a loop-free condition. Table 2.1 shows possible combinations of K (v.), G (v.) and J L» _L f (v.) when condition (2) is satisfied. If for every d the combination of K (v.), G^ '(v. ) and f^ (v.) j c x 1 is shown by some row except the third row of Table 2.1, then v. is connectable to v.. In order to satisfy condition (l), there must exist at least one d such that the combination of K (v.), G (v.) and f (v.) j ' C 2. i Table 2.1 23 K (d) (v.) 3 G (d) (v.) c i' f (d) (v.) 1 * 1 ■x- 1 1 * 1 1 2 3 k 5 6 7 2k is represented by the third row of Table 2.1. For such a d if we can find v. satisfying the following conditions, then by connecting y to v. , f Vv ) & k 1 v i / changes to (corresponding to the second row of Table 2.1). (1) f(v k ) e K(v.), (2) f (d) (v k ) = 1, (3) v i S(v.) US(v ) U (v ,v ) (loop- free condition). If we can find such a v for every d satisfying the combination shown in the third row of Table 2.1, then v. becomes connectable to v. by adding input connections from these v 's to v.. k i The possibly- connect able condition can be used in gate merging. Suppose gates v. and v. are to be merged to gate v. . . In order to realize a function contained in G (v. . ) by gate v. ., functions which are modified based on the possibly- connectable condition may be used as inputs to gate v. .. The following procedure is a generalized procedure of gate merging using the possibly-connectable condition. Procedure GMGPC . A generalized merging of gates using the psosibly-connectable condition. Step 1 - Step 3 The same as Procedure GMGC. Step k Connect all gates and input terminals in U to gate v. . . If the output function is contained in G (v. . ), then go to Step 5; otherwise go to Step 7. c ij Step 3 - Step 6 The same as Procedure GMGC. Step 7 Calculate an additional requirement vector H for v. . . 25 C H (d ^ = for all d such that G^(v. ) = 1 IT ' = * for all d such that G^(v ) = * c ±y or v t^ d \v) = 1. veu JP d ^ = 1 for all d such that G^(v ) = c ±y and v f^(v) = 0. veU Step 8 Find a gate v satisfying (a) G c (v h ) n K (v..) /-0, (b) There exists at least one d such that H (d) = 1 and f (d) (v h ) = 1. (c) v h 4 S(v.) U S(v.) (a) and (c) show that v is possibly- connectable to v n ±y ste P 9 By adding inputs which are connectable to v , tr try to make v h connectable to v... if ^ becoraes con nectable to v h , then U - U U {v h }. Update CSPF's and functions realized at all the gates. Step_10 Repeat Step 8 and Step 9 for all gates satisfying conditions in Step 8. Step_ll Connect all gates and input terminals contained in U to gate v if the output function is contained in G (v ), then c i j go to Step 5; otherwise v and v cannot be replaced by gate v d id" Note that by each application of Step 9 the network is modified (new connections are added). The following example shows how Procedure GMGPC works. K Example 2.5 . The network in Figure 2.6(a) realizes function f f = (1 0000 0010 110 1). Funtions realized at input terminals and gates are as follows : f( V] f(v g f(v. f(v, f(v f(v f(v 12 11 10 f(v 9 f(v 8 f(v„ f v, f v. 0000 0000 1111 1111 0000 1111 0000 1111 0011 0011 0011 0011 0101 0101 0101 0101 1100 1100 0000 0000 0000 0000 1100 1100 1010 0000 0010 0000 0011 0011 0000 cooo 0101 1111 0000 0000 0101 0000 1101 0000 0000 1010 0000 0010 1000 0000 0010 1101 We will try to merge gates Vn and v . For the calculation of CSPF's, we can remove inputs of Vo and v Q (see Figure 2.6(b)). CSPF's for gates are calculated according to an ordering r given as follows : r(vg) = 1, r(v 9 ) = 2, r(v^ = 3, r(v 6 ) = h, r(v 7 ) = 5, r ( v 1Q ) = 6, r(v 11 ) = 7, r( V]L2 ) = 8, r( Vl ) = 9, r(v 2 ) - 10, r(v 3 ) = 11, r(v h ) = 12. The CSPF's for all the gates in the network shown in Figure 2.6(b) are as follows : X 1 — \ V. x. 13 x, X 3~W 11 x. Xi V. 10 ■^=£>1 x— 1 V 8 '1 ~1 v V 27 of V 13 (a) A given network x. x. I 12 v V 11 X k V 10 V \ — -\ K>' v 9 r^ 13 (b) Network after removing the inputs of v and v o c X k- X- x^ V Xi X, 3 H 12 11 X. D~l V x, X i v 7 > 10 L V- y v x. 8,9 13 (c) Network obtained by gate merg: mg Figure 2.6 Example 2.5 28 G (v c ) -(1000 0000 0010 110 1) c v 5 (vs) = (0 * * * 1*1* * * * 0010) c '6 G (v) =(0 1*1 **** 1101 00*0) G (v Q ) = (0*** * 1 * * **o* 00*0) CO G (v ) =(0*1* ***1 * * o * 00*0) C y G (v nrt ) = (10*0 0*0* 0010 * * *) c 10 ' G (v ) =(0*** 0*0* 1*0* 1*0*) G(v ) = (l * * ■* i*** o*** 0***) For the new gate Vn Q , G (vo n ) = G k) OG (v_) c o, 9 co c 9 =(0*1* *1*1 * * * 00*0) K(v ^)=(**0* *0*0 * * * * * * * *) Of 9 So v , V/-, v and v are connectable to Vn Q . According to Step 1+ of Procedure GMGPC, u = ( v^, v 6 , v _, v^} , and V f(v) =(1010 0101 0000 000 0). veU This function is not contained in G (v Q „). Therefore, we have to use c o, 9 possibly- connectable connections. In Step 7> H is calculated as follows: H=(l*00 *0*0 * * -x- -x- -x -x- -x- *) # Then in Step 8, we find that v and v^ satisfy the conditions required. In order to make v no connectable to v Q „, we first calculate the set of connectable functions to v, p as follows: Since G (v no ) = (l * * * i * * * o*** 0***), c ±d K(v )=(o*** o * * * * * * * -x- -x- -x -x), 29 v^ is connectable to v^. If we connect v. to v^, the output of v becomes f(v J2 ) =(1000 1000 0000 000 0). This function is connectable to Vn q and its first component is 1 which is required by H. In Step 11, we recalculate the function corresponding to the new set U of connectable functions. u = < v i> v 6> V v n' v i2^ V f(v) =(0 011 0101 0000 000 0) veU It is contained in G (v Q „). c o, 9 We then try to obtain a reduced set U' of U as follows: G c (vq g ) = (0 * 1 * * 1 * 1 * * * 0*0), f(v ) =(0 000 0000 1111 1111), f(v 6 ) = (0 000 1010 0000 0010), f(v ) = (0 101 0000 1101 000 0), f(v 11 ) = (0 000 0000 1100 1100), f(v 12 ) = (1000 1000 0000 000 0). As V 6' V 7 and v ll are disconne ctable, the input set U r for v ft Q is {v-j^, v^). The network obtained is shown in Figure 2.6(c). 30 3. GATE SUBSTITUTION AND ITS GENERALIZATIONS In this section, a netowrk transformation procedure by gate substitution which was discussed in [8] will be generalized using CSPF's. A further generalization of this transduction method by gate substitution is also discussed using the possibly-connectable condition. If the disjunction of outputs of some gates and external variables is found to be identical to the output of a gate v., then we can substitute the sum of these outputs of gates and/or external variables for the output connections of gate v. [8] . A simple example is shown in Figure 3.1. Here, we assume that the disjunction of outputs of v.,, v. ? and external variable x is identical to the output of v., that is, f(v dl ) V f ( v a - 2 ) V x^ = f(y ± ). Therefore, the connections from v. to y _ and y _ can be replaced by the ' i kl k2 connections from v.-., v. p and x„ to v ,, and v ? as shown in Figure 3.1(b). If we use CSPF's this procedure can be generalized as follows. Procedure SGC . Substitution of a gate using CSPF's. Step 1 Calculate CSPF's for all gates in a given network. Step 2 Select one gate v. . If we can find a set U of gates and input terminals satisfying the following conditions: (a) v ^ S(v. ) for every v € U, (b) V f(v) e G (v i ), V€U 31 (a) Original network (b) After gate substituti on Figure 3.1 A Simple Example of Gate Substitution 32 then go to Step 3; otherwise repeat Step 2 until all gates are considered. Step 3 Substitute connections from gates and input terminals in u for the output connections of gate v. . l To calculate a set U in Step 2, we can use the following method: (2-1) Calculate a set H(v. ) which is defined by H(v ) = fl K (v), veIS(v. ) where K(v) is the set of connectable functions to gate v with respect to the CSPF for v (i.e., G (v)). (2-2) Let Ube a set of all gates and input terminals satisfying v 2_j 1 — l v 12 x 1 X 3 j 10 a> i U^V^>- ■o v 13 x,, _fll X, -) v 8 'a) A given network X, 1 lv JV 4'9 X-, ^ x l -.- x i 4 = X 10 V/ X, x? \>- X =)v 2 — I v c 4, A X. 1 V 5> V X, V) — I y 13 (b) A redundant connection from x is added to v 2 \ v ^4v> >: 1 " i v n ' X U J ^ x x 3 H v ic \ -L — y XT / Vi ) 4^ -O V 13 ^3 - X, —j "11 :-:.- H / x. -3 \ V r (c) Network obtained by gate substitution Figure 3.3 A Simple Example for Procedure SOGPC 37 IT ■ = 1 for all d such that G^(c ) - 1 c ±y or v f^ d \v) = 0. veu ste P 6 Find a gate v h satisfying (a) G c (v h ) HK(v ) / 0, (b) there exists at least one d such that IT d ^ = 1 and f (d) (v h ) = 1. (c) v h i S(y.). (a) and (c) show that v is possibly-connectable to v.. J Step_7 By adding inputs to v h , try to make v connectable to v . If v h becomes connectable to v., then U = U U {v } . J h Update CSPF's and functions realized at all the gates in the network. ste P 8 Repeat Steps 6 and 7 for all gates. Step_9 If v f(v) e G (c ), then go to Step 10: veu J otherwise c. . can not be replaced. ste P 10 Substitute connections to v. from gates and/or input terminals in U for c. .. Disconnect some of the new connections by applying the disconnectable conditions to gate v.. d Ste P ^ Repeat Step 3 - Step 10 for all output connections of gate v i# If there exists an output connection of v. which cannot be substituted for, then v. cannot be removed. If so, select another gate and apply Steps 3-10 to the original network again. V: An application of this procedure is shown in the following example . Example 3.1 . Let us consider the network shown in Figure 3. Ma) which is the first solution by Program ILLOD(NOR-B) based on the branch-and-bound method [9*10] for the four-variable function f. f = (1 1 1000 1011 0111) Functions realized at input terminals and gates are as follows : (0 000 0000 1111 1111] (0 000 1111 0000 1111] (0 011 0011 0011 11] (0 101 0101 0101 10 1] (ioio ioio ioio ioi o; (1000 1000 0000 0] (oioo oioo oioo oio o; (0 010 0010 0000 ooo o; (1001 0000 1011 0] (0 110 0000 0100 0] (0 000 0000 0000 10 0] (0 110 0111 0000 0] (1001 1000 1011 111] First, we want to remove Vq so the following ordering r is used in the calculation of CSPF's: r(vg) = 1, r(v 5 ) = 2, r(v 6 ) = 3, r(v ? ) = k, r(v ± ) = 1-k for i = 9, 10, . .., 13, r(v ) = j+9 for j = 1, 2, ..., k. J f(v x ) - ( f(v 2 ) = ( f(v 3 ) = ( f(v 4 ) - ( f(v 13 ) - ( f( vl2 ) - ( f(v n ) = ( f(v 1Q ) - ( f(v 9 ) - ( f(v 8 ) - ( f(v 7 ) = ( f(v g ) - ( f(v 5 ) = ( 39 ■a o •H ro QJ .-I P. X H 0) Pi to >+0 CD -p CD O Cti H ft 0) *H w ■H OO > O o •H -P O CD CJ fl o o -p pi ft o o p OJ •H -p o 0) o o 0) p o p 8 PI O •H •P O o o X X X Ul Ch . -P .<-> & 3 " — !> M U g o o > ^ ■p «H CD fi a o o rd S g a) P in T3 CD 0) W •H X K X 1+2 bC G • •H G t> o o •H S -P 0) 2 *H -P •H *H -(J CD W -P & > *H P o > CM -p H 0) t> c TJ ■d S a •H CO fe > = G c (v lx ) = G c ( Vl2 ) = G c (v 13 ) = 1001 1000 1011 0111 0110 0111 0*00 *000 0**0 0*** 0*00 1000 0**0 0*** 0100 * 1001 *000 1011 0*** 0*10 **** 0*00 •**** 01*0 **** 0100 **** 100* 1000 **** o*** 10** **** 101* **** K(v ) =(0**0 0*** 0*00 * 0), only v 1Q is connectable to v , but as f (vg) > f (v ) the connection from V 10 to v 5 is redundant « Only v lx satisfies the possibly-connectable condition G c (v i:l ) HK(v 5 ) = (0 1*0 0*** 0100 * 0) / Since f (v^) =(0100 0100 0100 1 0), if we can find a function which is connectable to v and whose llj-th component is 1, f ( v i:l ) wil1 become connectable to v after connecting this function to v ll* The set of connectable functions for v is given by K(v 1 ) = (* * * **** *o** ****) so v 2 , v^ and v are connectable to v . As f (1*0 (Vp) = 1, we can use the connection from v . The new function realized at v becomes f ( v n) = (° 100 oooo oioo oooo), and f(v,.,) e G (vj- So the connection from v to v can replace v p . The result is shown in Figure 3.Mb). Next we check whether or not v, p can be removed by substitution. During the calculation of CSPF's the connection from v , to v is removed, and the network shown in Figure 3«M C ) is obtained. The connection from v, p to v can be replaced by a connection from v to v . The connection from v, p to v^ cannot be replaced by the outputs of other gates and/ or input terminals. However, by adding a redundant input from v~ to v,~, the output of v,_ can substitute for the connection from v, p to v^. The result is shown in Figure 3«Md). The network is proved to be a minimum network for f by Program ICCOD(NOR-B) [10,11], Since Vp is a single-output gate during the first step, Procedure GMGPC discussed in Section 2 would have given the same result. In Procedure SOGPC, we try to substitute for all the output connections of a selected gate v. , but sometimes we can substitute only for part of these connections. If so, the CSPF for v. often becomes larger than that in the original network. This may help to remove some redundant inputs of v. . Especially when a single-output gate is connected to v. and we can remove such an input from v. , the cost of the network i i will reduce. One example is shown in Example 3.2. Example 3.2 . The network shown in Figure 3.5(a) realizes function f f = (1 1 1000 1011 0111). During the application of Procedure SOGPC to gate v , the connection from v to Vn is replaced by the connection from v~ to Vp (see Figure 3.5 (b)), because G (vp) = (0 1*0 0*** 0100 * 0), J+5 o f X H V 13 (a) A given network. v 11 x^=) V 12 v V X3-I V 1C X 8 V (b) Connection C has been replaced by C 9,8 * J 3j 8' -o f V. Ill O f (c) Redundant connection C has been removed. Figure 3-5 Example 3.2, i*6 and f(v ) v x V x , = (0 1 10 0). 9 <- 3 On the other hand, we cannot replace all output connections of v , so v cannot be removed. However, the new CSPF for v is larger than before, and as a result the connection from v to v satisfies the disconnect able condition. The result is shown in Figure 3.5(c) which can be further reduced (see Figure 3.3). hi k. COMPUTER PROGRAMS AND EXPERIMENTS Two computer programs NETTRA-G3 and NETTRA-G1+ using the generalized procedures for gate merging and gate substitution, discussed in Sections 2 and 3, respectively, have been prepared and tested. The actual procedures used in NETTRA-G3 and NETTRA-Gl* are described in Sections k.l and k.2, respectively. Several examples are shown in Section U.3 to illustrate the computer procedures. k.l Program for Gate Merging Three procedures for gate merging, i.e., MGC, GMGC and GMGPC have been described in Section 2. As we discussed, procedure GMGC is more powerful than MGC, since a pair of gates which can be merged by MGC can always be merged by procedure GMGC. Similarly, procedure GMGPC is more powerful than GMGC since it uses the possibly-connectable condition which is a looser condition than the connectable condition used by procedure GMGC. Procedure GMGPC, however, requires more computation time than procedure GMGC in order to modify a possibly-connectable function to a connectable connection (steps 8-11 in procedure GMGPC). A FORTRAN program NETTRA-G3 based on procedure GMGC has been developed. In NETTRA-G3, the gate merging is realized by subroutine GTMERG which applies the following procedure to a given NOR network when it is called by the subroutine MAIN in NETTRA-G3. V; Procedure used in subroutine GTMERG Step 1 Calculation of CSPF's Call subroutine MINI2 to calculate a compatible set of permissible functions for each v. e V_. The detailed 1 G procedure of MINI2 is discussed in [2] and [3]. Step 2 Selection of a pair of gates Select two gates v. and v. such that j > i both according to the ascending order of i and j . If all possible gate pairs have been considered, return to the calling subroutine. Step 3 Calculation of CSPF for the merged gate Calculate G. (v. . ) = G (v. ) D G (v . ) and K( v. . ) . If G (v. . ) = which means that v. and v. are not mergeable, go to Step 2. Step k Check substitutability If f (v. ) e G (v.) and v. t S(v.), go to Step 8. If l cj l r j f(v.) e G (v.) and v. k S(v. ), interchange the values of i and j and then go to Step 8. Step 5 Select connectable functions for v. . * — ij Calculate a set U == {v k |v k e V, v k e K(v ±J ), v fe ^ S(v.) U S( Vj ) U {v.} U {v.}} Step 6 Check realizability of the merged gate If U f (v ) k G (v. . ), then v. . is not realizable with TT k r c ij ij v eU d d k functions in U only and go to Step 2. Step 7 Making the merged gate Disconnect all input connections of v. , and connect all v e U to v.. (The function f(v. .) e G (v. .) is realized at v..) 1 1J c 1J X h9 Step 8 Connect v. to immediate successors of v. ■3 Disconnect all output connections of v. and connect v to i all IS(v ). The resulting network still realizes the J specified functions. Step 9 Update information on the new network Call subroutine SUBNET to update the information on IS(v ) k IP(\), s (\)> f(\) for all v k e V. Go to Step 1. This procedure is similar to procedure GMGC except Step k which is not included in procedure GMGC. Since whether or not f(v ) e G (v ) or 1 c J f( V £ VV is sa tisfied can be easily checked during the calculation of G c (v..), adding Step k will skip the process of finding connectable functions when the condition for substitution is satisfied. As discussed in Section 2, if all input connections for v and v 1 J are disconnected before the calculation of CSPF's and if a proper ordering suitable for a specific pair of gates is used in the calculation of CSPF's, then the CSPF of the merged gafp i p> r ( -,r 1 i * -u -, c merged, gate, i.e., G^v ), could be larger and thus the procedure would be more powerful. Howeyer, it is time consuming because recalculation of CSPF's is required each time when a pair of gates is selected. In Step 1 of subroutine GTMERG, a fixed ordering is used in the calculation of CSPF's and the recalculation is required only after a pair of gates has been merged to one. Reference [ll] discusses the actual program in more detail and proyides the necessary information on how to use the program. A program listing of NETTRA-G3 is also attached in [ll] as an appendix. k.2 Prog ram for Gate Substitution A computer program NETTRA-Gl* based on procedure SOGPC is written 50 in FORTRAN IV since SOGPC is the most powerful procedure among the three procedures for gate substitution mentioned in Section 3. Two orderings are used in this procedure. Ordering r n which is for the calculation of CSPF's is based on the levels of gates and, when there is a tie, the labels of gates. The gate v. which is under consideration to be substituted is not included in this ordering because the calculation of G (v. ) is not necessary (however, the CSPF of each of its output connection must be calculated). Ordering r n for v € V^, - {v_ . } : -L Li X first. (1) r 1 (v,) r(v ) if j > k and L(v.) = L(v ) where L(v ) is the level of gate v . k According to r , a gate v. with the smallest r (v. ) is selected Ordering r , which is defined for input connections of a gate v. € V - {v.} is based on the numeric order of the gate labels, treating J Lt i the output connections of v. differently as follows. This ordering is used when an input of gate v. to be assigned 1 in order to satisfy G (v.) = J c j is chosen during the calculation of G (C n .) for c, . € C where C is the set c hj hj of all connections . Ordering r : (1) If v. e IS(v, ), r (c, ,) < r Q (c.,) for any c, . € C - {c..}. J i 2 hj 2 ij hj ij This makes the CSPF for c. . larger, and therefore the ij substitution for c. easier. (2) r 2 (c hJ ) > r 2 (c kj ) for c kJ , c hJ e C - {c.j} -h>». According to r_, a connection c. . with the smallest r (c, .) is & 2' hj 2 hj selected first. 51 In order to help the understanding of the computer procedure for calculation of CSPF's, the concept of intermediate CSPF's for a gate is introduced. Since the CSPF's for connections (except the output connections of v. , the gate to be substituted) are important only during the calculation process of CSPF's for gates, they are not stored in the program to save memory space. As the CSPF for a gate v. is calculated by J G c ( V = c., e C G c (c jk } vhere the operation of intersection is commutative, jk the intermediate CSPF for a gate v up through a certain connection c J jk based on an ordering r (ICSPF denoted by I^Cc )") is defined recursively as follows : I cr (c jk ) = ( *> *' ' *) if c - k € C and r(v k ) = min Mv £ )|v £ 6 IS(v.)} I ( c .. ) = I ( c , ) Hg ( c lifo e r cr jk y cr v jh/ V jh/ 12 c jk L > r(v k ) / min (r(vjv £ e IS(v )}, and r(v h ) = max {r(v £ )|v £ e IS(v ) s r(v £ ) < r(v k )} It is easy to see that I cr (c Jk ) 2 Gq (v.). I cr (c Jk ) is the intermediate result during the calculation of G (v.) based on ordering r. In the actual program, only one 1^ is stored for each gate. When all output connections of a gate v have been taken into account, G (v ) is J c j obtained: °c ( V = I cr (c jk ) nG c (c jk ) " here C j k £ C a*d r(v k ) = max {r(v £ )|v 6 IS(v.)}. According to the way each gate is selected, the ordering r in the calculation of y^l'e is the same as ordering r ± described above. Program NETTM-G>* contains a major subroutine PROCV which applies 52 the following procedure to a given network when it is called. Step 3 of this procedure is realized by another subroutine RQRNW which calculates CSPF's for gates and output connections of a selected gate. Procedure used in subroutine PROCV : Step 1 According to the ascending order of i, select one gate v. € V satisfying the following conditions: (a) i > n + m. This condition means that v. is not connected to l any output terminal. (b) |lS(v k )| | > 1 for every v k £ IP(v. ). This condition eliminates the cases where the substitution for v. is unlikely. If all gates have been considered, the procedure terminates . Step 2 If there exists a v. € IS(v. ) and j > n + m such that |lP(v )| = 1, then v. is redundant. Remove v. from the network J J J and connect y to v. for all v, e IP (v. ) and v, € IS (v.). Go to h k hi k j Step 1. Step 3 Calculate CSPF' s for all gates and for all output connections of v according to the following substeps. (This step is programmed J as a subroutine RQRNW. ) 3-1 G (v ) = z, for 1 < h < m. Initialize I 's. c n+R+h h cr 3-2 Select a gate v. 4 v. and v. € v_ u V n according to ordering r n . J 1 J (i U 1 If all gates have been considered go to Step k. 3-3 For all d such that G (d) (v.) =1, set G ^(c, .) = for every c j c kj c. , e C. For all d such that G (v.) = 0, set k J c j a. G c (d) (e kj ) = * ^r e^ £ C and f U) (v k ) = 0; b. G (c ) = * for c. . e C and there exists a c, . e C such c kj kj hj 53 C# °c (c kj ) = 1 for c kj € C such that f (d) (v k ) = 1, and r 2 (c k( .) = Mn ^ c £J ) | c £j e C, ^^(c^) = 1} (if there exists no ChJ e C such that I (d) ( c ) = l) ; and (d) 1 G c (c jl^ = * for all c„. e C and£/k. IV £J , XUX c^X C £ . (Vj) = *, set G c ^ CL; (c k ) :: * for every For all d such that G ^ d ''" ^ •■ * --■ «■ " ^ d ^ i c. . e c. 3± Calculate 1^, (^J n G c (c kJ ) for c kJ € C - { c }. (The ^r^j* is then ^Placed by 1^ (c^) fl G^.)). Go to Step 3-2. Ste P h Se lect one connection c € C according to ordering r J 2 If all output connections of v ± have been considered, go to Step 8. Step__5 Calculate K(v ) from G (v.). Calculate a set J c j U= {v|v € V G U V T , v^ S(v. ), f(v) e K(vJ} Calculate a set W= {v|ve V Q U V I§ v^ S(v.), f(v) i K(v ), K(v.) fl G (v) / 0} J r (c, . ) if c. . , c n . £ c 3 ij 3 kj ij' kj W >r 3 (c kj } if c hj' C kj £ c " {c ij } ' v h £ S(v i } and \ * S(v i } r 3 ( °hJ ) >r 3 (c kj } if C hj' c kj £ c " {c ij } ' v h' v k e S(v i } or v, , v 4. S(v. ) , h > k. h k l 55 The elaborated procedure for the calculation of CSPF' s discussed in [k] could also be used in this program. Another possible way to make this program more powerful is to change Step 7-3. Instead of searching one function, searching a set of functions whose disjunction satisfies the required conditions will definitely increase the power of the substitution procedure. These modifications, however, require additional computation time, and therefore the implementation depends on the tradeoff between efficiency and effectiveness. Reference [ll] discusses the actual program in more detail and provides the necessary information on how to use the program. A program listing is also attached in [ll] as an appendix. k.3 Experiments by Computer Programs In order to compare the speed and effectiveness of the two procedures implemented as subroutines GTMERG and PROCV, 1+0 single-output test networks realizing 20 different h- and 5-variable functions were chosen as initial networks for the procedures. In this case, two initial networks realize each of the above 10 different U-variable functions and 10 different 5- variable functions. For each function, one network was obtained by a simple procedure for generating a 3-level network to realize a given function. The other network was obtained by a "universal network" generating program (for either k- or 5-variable functions) which can realize any given (k- or 5-variable) function simply by adding a few connections. Table U.3.1 and U.3.2 compare the results showing the size of the transformed network (i.e., the number of gates and number of connections) and the corresponding computation time in seconds on an IBM 360/T5J computer 56 for each initial network and each transduction method. Table ^.3.1 is based on the initial networks derived by the "universal network" generating program, while Table H.3.2 is based on initial networks derived by the "3- level" network generating program. Each function is represented by its output function vector in a hexadecimal form (i.e., the output column in the truth table is expressed in a hexadecimal expression). In Table U.3.1> the column for the networks derived by the program NETTRA-G^ is blank. This does not mean that NETTRA-GU is ineffective, but, rather, that NETTRA-GU cannot transform a universal network. The reason is that in an n-variable universal NOR network each gate except the output gates realizes only one minterm of n-variable and therefore no gate can substitute for any other gates. Since program NETTRA-G3 is combined with procedure MDTI2 which removes some redundant connections while calculating CSPF's, the situation is much different. However, this does not mean that NETTRA-G3 is always more powerful than NETTRA-GU. This can be seen from the last column, which shows the results obtained by applying NETTRA-GU on the results derived by NETTRA-G3 alone. Among ten networks of 5-variable functions, NETTRA-G3 could improve six of them by one gate. Similar observations can be made from Table U.3.2, which shows the results using initial networks derived by the 3-level network generating program. For 5-variable function z = (U9F363CD) £, NETTRA-G3 gives a solution with one less gate than the solution given by NETTRA-GU, while for functions z = (BFD6c6dA) g and z = (C6ET103E) £ NETTRA-GU gives better solutions than NETTRA-G3 does. As discussed in Section 3, the procedure based on GMGC, i.e., NETTRA-G3, is generally faster than the procedure based on SOGPC, i.e., 57 p CJ LO LO CM LA _=f t— CM LA O CO CM o VD o LTN ON LO H H CM CM o or -3" ON OO CM CM CM ON t— rH CM LTN CM !> co M O K 1 J CO H CM H rH H H CM H • • • • fn w ft P K 1 o u Eh H ■H W Eh P K H ^ O S < EH >H EH CO pq l/N H CM LA vo H co o H -=r on CO CO CM rH rH H co £ on j- rH co H H J" co H CO CO rH CO O H CM CM O CO O t— VD f^l H H t- H H CM O CM ■8 ON On ON o r-1 ON CO OO CO O H ON 0) ^ o o W) ^ ^tfc . > o -P P pq (U K 1 CO c CO ■d Bg 5=5 o r< Eh H (U W EH Eh > K pq •• O •H O & CO pq Eh >h pq a Ejj S 3 w pq <: o CD £5 -P >> p o pq VO LTN O CM O O CM VD t- t- o VD OO O On O H O f- CM H H ON t-- On lcn On t— tr— P> co H O K 1 CO H > •rH CO (D pq < P K o rd EH H W W Eh K pq D S Eh >h En •• o co pq pq a Eh g < O -H/ H -3" LA C— rH CO LA H H -=T CM CO _=r CM CM H H H LA CO _=f ON ^t H 00 CO CM rH H co CO H CO o H CM CM O CO O On VD ^ H r-\ t- H H CM o CM O On On On o H ON ON OO CO O H ON > -P & =tte =tfc P3 ■d CO p s •H o C HOW rH S Cxi H B H ? w ra H Eh •• O ^ ° LTN O co co co LA o CO CO CO CO o CO CO CO O H H O CO CO CO CO CO CO la lc\ H o CO CO CO CO CO CO O H CO CO CO CM O CO CO CO t- o CO CO CO O O rH H H H On O H ON o H ON co OO O O o H rH H CO f— o o H rH o H •H ■H H H H L^ H t— t— [— H rH H H H H : *fc --tfc w p 01 CD ' « Q ^ r 2! EH S h pq o pq VD P-4 LCN ON CM oo H P-H p p CO ptl OO O Plh -3- t— CM W IA PP VD CO CO p o o H CO OO VD CO CO o Ph On o CO < p VD o VD ro o H VD CO H H O H O O On VD o o OO CO CM ■H pq O CO ON ON CO O ON CM O H co pq ON CO ON H O C O rH • < o vo VO n 8 OO Pth < On LT\ Ph p ptl VD CO J-
  • < K M < m p pq CO -=r > < X H < pq P pq co '/' CO CM C— CM t- t~ On CM CO o _d- t- O LTN t- O. _=)- o CM o o VO VO o -H/ H CM OO vo o vo H H H rH o CM CM CM H CM o W [> en M o co H CM H H H CM rH K 1 -J" CO ggT § EH H MBR EH OO On VO -=r On rH rH H H J- CO O _=r CO o t— t— t— H O •• O J" _3- 00 OO 00 OO -=r OO -=f -d- H CM CM CM 00 H H H CM CM O S H Ij ^ H H H H H H H H H H rH pq PQ <£ O S CO O t- CM CM UN On CM LTN CM O t- LTN LTN On On t- t- LTN o -3" o cJ o\ ON On VO _H/ CO O -3- t— CM O H H O O H CM CM rH OO fi CO H H H H CM H H CM M O W 1 CO o EH H W Eh EH O t- O H ltn CM CM ON VO H Lf> OO _H/ H H _J- H L— H -3- PC pq •• co LT\ u~\ .J- -H/ -cr 00 l/n OO _=)- J- CM CM CM OO OO CM OO CM CM CM o s co H pq a LT\ vo H CM CM ON -H; CM OO OO rH O On O ON O H O O ON P >H En s H H H H H H H H rH H H H H H H H pq PQ <: o m o o o\ J- t- O -=t -3- LTN t— On -H/ ON CM l/N -=t LTN CM LTN t- t- O CO CM OO On OO CO CM H H CM ON O H O o O H H CM O CM o pq j> on M co CO H H H H K l CO pq < £h o EH H W En EH OO CM l/N -=f H H LTN -H/ t- LTN CO O _=r CO o ON t- t— H O CO W ^t LTN 00 OO J" OO _H/ oo -=f _=r H CM CM CM OO H H rH CM CM LTN VO r-j CM CM o\ OO CM _* LT\ ON ON ON O On On CO CO O On EH >H %! ^ H H H H H rH H H H H H W pq <* O S O O CO S3 O 3g M EH CM o LTN O VO MOW •• CO O o O U"\ CM H O VO LTN o UA H VO H H VO O CO CO 00 Eh S isl CO pq H H H VO On CO H oo CO H CM OO OO OO OO 00 ^t OO OO _=r H Eh H EH § VO LTN LTN t— CM OO i_r\ H CM VO H CM CM O ON OO 00 OO OO j- M S < O co o CM CM CM H CM H CM CM OJ CM H rH H H H H H H H Q CO W S Eh J g VO OO OO O Ph OO fi O < pq vo 00 ON J- H pq o OO pq -3- o ^ H K Ph H Ph _H/ t- o CO Ph o OO H H VO 0O CO On ON On OO Q M M o W us Ph 3 CM pq H 00 On vo o O H O oo CO O ON On H <4 Eh CO £3 pq eg On Q LT\ pq OO vo O u H O O o CM CM O H o O O 3§ 2! Q OO VO OO CO 00 CO vo t— O NO 1 VO OO Ph LTN Q pq p p-i id* Ph VO Ph pq < On pq Ph vo ^g J- < Ph H Os o -=t CO pq o ir\ > < K H <£ pq r-q [X CO -=f > -L 23 1 - x, H 11 x. Ik V X 5H 2^ X 2 x 3 X U" X 5 13 x. '5 H 15 1-f g = x 4_- x 5 x s x: 1- X 2- X U - X2 x 5 x 2 - V 10 - Co Xi 12 ->: (a) Initial three-level network for function z = (49F363CD) 1 ^ Figure k.3.1 An Example by NETTRA.-G3 and NETTRA.-G4. 6l (b) Network derived from (a) by program NETTRA-G3, Figure if. 3.1 An Example by NETTRA-G3 and NETTRA-G4 (continued) 62 16 x l-[ X 2- l£ 21 X l- x 5 10 x u- 12 25 *2-r x 3 - x 5 -L 13 (c) Network derived from (a) by program NETTRA-G^. Figure U.3.1 An Example by NETTRA-G3 and NETTRA-GU (continued) 63 Gate 6 is removed by NETTRA-G4. The three heavy lines represent the connections added by NETTRA-GU to replace the connections from gate 6. (d) Network derived from (b) by program NETTRA-G4. Figure If. 3.1 An Example by NETTRA-G3 and NETTM-G^ (continued) 6k 5. CONCLUSIONS Two types of NOR-network transduction procedures are presented in this report. The computational experiments show that they are quite effective and efficient in reducing the number of gates in a given network. These procedures, however, are aimed only at reducing the number of gates, and therefore they may not be capable to remove other types of redundancies in a given network. For example, the network in Figure k. 3.1(c) which is derived by program NETTRA-GH, has an apparently redundant connection, i.e., the connection from x to gate 2k. Since both immediate successors of gate 2k have an input x , the input x for gate 2k is redundant by the generalized .... [8] triangular condition For the above reason, the procedures presented here should be combined with other transduction procedures in order to implement a powerful computer-aided logic design system. In such a system these procedures should be applied in the early part of the entire procedure because of their effectiveness in efficiently removing relatively simple redundant gates. 65 REFERENCES [ 1] Y. Kambayashi and S. Muroga, "Network transduction "based on permissible functions (^General principles of NOR network transduction NETTRA programs) " to appear as a report, Dept. of Computer Science, University of Illinois. ' J 1 2] ij 1 " Culline ^> H ' C ' Lai > «id Y - Kambayashi, "Pruning procedures for NOR networks using permissible functions (Principles of NOR network transduction programs NETTRA-PG1, NETTRA-P1 , and NETTRA-P2 ) " Report No. UIUCDCS-R-7^690, Dept. of Computer Science, University 'of Illinois November 1974. [3] H. C. Lai and J. N. Culliney, "Program manual: NOR network pruning procedures using permissible functions (Reference manual of NOR network transduction programs NETTRA-PG1, NETTRA-P1, and NETTRA-P2) " Report No. UIUCDCS-R- T l*-686, Dept. of Computer Science, University 'of Illinois, November 1974. [ h] Y. Kambayashi and J. N. Culliney, "NOR network transduction procedures based on connectable and disconnect able conditions (Principles of NOR network transduction programs NETTRA-G1 and NETTRA-G2) ," to appear as a report, Dept. of Computer Science, University of Illinois. I 5] J. N. Culliney, "Program manual: NOR network transduction based on connectable and disconnect able conditions (Reference manual of NOR network transduction programs NETTRA-G1 and NETTRA-G2)," Report No UIUCDCS-R-74-698, Dept. of Computer Science, University of Illinois February 1975. [ 6] D. T. Ellis, "A synthesis of combinational logic with NAND and NOR elements, IEEE Trans, on Electronic Computers, Vol. EC-14, pp. 701-705, [ 7] H. Lee and E. S. Davidson, "A transform for NAND network design," IEEE Trans, on Computers, Vol. C-21, pp. 12-20, 1970. [ 8] H. C. Lai, T. Nakagawa, and S. Muroga, "Redundancy check technique for designing optimal networks by branch-and-bound method," International Journal of Computer and Information Sciences, Vol. 3, pp. 251-271, 197U. [ 9] ^J* 8 *!*'"? ^ d H ' C * Lai ' " A branch-and-bound algorithm for optimal NOR networks (The algorithm description)," Report No. U38, Dept. of Computer Science, University of Illinois, April 1971. [10] T Nakagawa and H. C. Lai, "Reference manual of FORTRAN programs ILLOD-(NOR-B) for optimal NOR networks," Report No. U88, Dept of Computer Science, University of Illinois, December 1971' [11] H C. Lai, "Program manual: NOR network transduction by generalized gate merging and substitution (Reference manual of NOR network transduction programs NETTRA-G3 and NETTRA-GM ," Report No. UIUCDCS-R- rW14, Dept. of Computer Science, University of Illinois, April 1975 BIBLIOGRAPHIC DATA SHEET 4. Title and Subtitle 1. Report No. UIUCDCS-R-75-728 NOR NETWORK TRANSDUCTION BY GENERALIZED GATE MERGING AND SUBSTITUTION PROCEDURES (Principles of NOR Network Transduction Programs NETTRA-G3 and NETTRA-GU) 7. Author(s) 3. Recipient's Accession N. 5. Report Date June 1975 H. C. Lai. Y. Kambayashi 9. Performing Organization Name and Address Department of Computer Science University of Illinois at Urban a- Champaign Urbana, Illinois 6l801 12. Sponsoring Organization Name and Address 15. Supplementary Notes 8. Performing Organization Rept. No - UIUCDCS-R-75-728 10. Project/Task/Work Unit No. 11. Contract /Grant No. 13. Type of Report & Period Covered 14. 16. Abstracts Several NOR (or NAND) network transduction procedures aiming at reducing the number of gates on a given network are introduced. These procedures are generalizations, based on compatible sets of permissible functions, of simple gate merging and substitution procedures. The programs NETTRA-G3 and NETTRA-Glj- based on generalized gate merging and substitution, respectively, have been prepared and tested. The computational experiments show that these programs are relatively effective and efficient in reducing the number of gates in a network with many redundant gates. 17. Key Words and Document Analysis. 17a. Descriptors Logic design, logic circuits, logical elements, programs (computers) 17b. Identifiers/Open-Ended Terms Computer-aided design, permissible functions, network transformation, network transduction, gate merging, gate substitution, NOR, NAND, CSPF. 17c. COSATI Field/Group 18. Availability Statement Unlimited FORM NTIS-35 (10-70) 19. Security Class (This Report) UNCLASSIFIED 20. Security Class (This Page UNCLASSIFIED 21. No. of Pages 71 22. Price USCOMM-DC 4 0329-P7 1 Jll 1 b *ft ^ I