LIBRARY OF THE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN 510.84 "o. 728-733 J ' *-- v I JjtdiV UIUCDCS-R-T5-T32 I fjfuXi 7 f PROGRAM MANUAL: NOR NETWORK TRANSDUCTION BASED ON ERROR-COMPENSATION (Reference Manual of NOR Network Transduction Programs NETTRA-E1, NETTRA-E2 , and NETTRA-E3) BY June, 1975 H. C. Lai J. N. Culliney DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN URBANA, ILLINOIS Digitized by the Internet Archive in 2013 http://archive.org/details/programmanualnor732laih UIUCDCS-R-75-732 PROGRAM MANUAL: NOR NETWORK TRANSDUCTION BASED ON ERROR-COMPENSATION (Reference Manual of NOR Network Transduction Programs NETTRA-E1, NETTRA-E2 , and NETTRA-E3) BY H. C. Lai J. N. Culliney June, 1975 DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF ILLINOIS AT URBAN A- CHAMPAIGN URBANA, ILLINOIS 6l801 This work was supported in part by the National Science Foundation under Grant No. GJ -1*0221. Ill ABSTRACT Three NOR network transduction procedures based on error-compensation were implemented in the FORTRAN computer programs NETTRA-E1, NETTRA-E2 , and NETTRA-E3. The general principles on which these programs are based are discussed in a separate report. The present report, however, describes the specific implementations of the three programs and serves as a reference manual for the program user. Preparation of input data is discussed in detail. Transduction ( trans formation and re duction ) procedures attempt to reduce given, non-optimal, multiple-output, multiple-level, loop-free, NOR- gate networks to "near-optimal" networks of fewer gates. The three programs described in this report, based on the sophisticated "error-compensation" concept, remove gates one at a time from the network and, after each removal, try to reconfigure the network, without employing additional gates, to compensate for any resultant errors caused in the network output(s). IV TABLE OF CONTENTS Page 1. INTRODUCTION 1 2. ERROR- COMPENSATION PROCEDURE k 2.1 General Procedure and Flowchart 6 2.2 Major Support Subroutines 15 2.3 Error- Compensation Subroutines 30 2.U Example for NETTRA-E1 62 3. REPETITIVE APPLICATION OF ERROR-COMPENSATION PROCEDURE 69 3.1 Single-Path Application 69 3.2 Multi-Path Application 73 k. MAJOR FUNCTIONS OF SUBROUTINES 83 5. INPUT DATA SETUP 89 5.1 Input Data Card Format 93 5.2 Restrictions on Problem Size 10^ 5.3 Examples of Input Data Setup 10 U REFERENCES 117 APPENDIX: PROGRAM LISTINGS 118 1. INTRODUCTION This manual is intended to instruct the reader in the use of the FORTRAN programs 'NETTRA-E1,' 'NETTRA-E2,' and 'NETTRA-E3,* and also to enable a moderately detailed understanding of how these programs actually realize their respective algorithms. The principal algorithm upon which these programs are based is described in detail in [5], and this manual will assume a knowledge of the definitions and algorithm descriptions in [h] and [5]. NETTRA-E1, -E2 , and -E3 represent only three out of a whole system of programs developed at the University of Illinois by the logical design group of S. Muroga. The generic name 'NETTRA' (for NETwork TRAns f ormati on ) designates the whole collection of programs comprising the system. All of the programs in the NETTRA system either transform or assist in transforming networks of interconnected NOR gates realizing various functions (either completely or incompletely specified) of their respective sets of input variables. By these transf ormations , a large, non-optimal network of NOR gates realizing one or more various functions can often be reduced to a smaller, less expensive (in terms of the number of required gates and interconnections, for example), near-optimal network realizing the same function(s). In general, such a transduction ( transf ormation and re duction ) could involve a complete reorganization of the network: the addition and/or deletion of gates; the addition and/or deletion of connections among gates; and/or the substitution of certain connections for various others. The transduction procedure realized by NETTRA-E1 (the same procedure forms the basis of NETTRA-E2 and -E3 also) can accomplish any of these changes, with the exception of adding gates to the network. The present three programs employ a transduction procedure much more powerful than those found in NETTRA-P1, -P2, -PG1, -Gl, -G2, -G3, and -GU (see [l], [2], [3], [6], [7] , [8]). The transduction procedures embodied in these earlier programs never make a change to a network which would alter its output functions. However, the current procedure is able to go through a long series of networks representing intermediate stages of the transfor- mation, none of which realize the correct output function(s), in order to finally obtain a less expensive network correctly realizing the desired outputs. In this sense, this procedure is more "far-sighted" than the transduction procedures realized by the earlier programs. Although the feature is not exploited in the programs explained here, it is possible for the current procedure to use an initial network which does not even realize the desired function(s) (hopefully, though, it does realize a function "reasonably close" to the desired one). NETTRA-E1, -E2 , and -E3 are primarily intended to reduce the number of gates in a given network. No serious attempts are made by these programs to minimize the number of connections. However, other transformation pro- grams (e.g., NETTRA-P1, -P2 , or -Gl ) can be applied after NETTRA.-E1 (or -E2 or -E3) to try to further reduce the number of connections in a network. The following section, Section 2, explains the NETTRA-E1 program which applies just once the transduction procedure discussed in [5] to a given network. This single application attempts to eliminate just a single gate from the network. In order to eliminate several gates, the procedure must be applied several times. Two different methods of doing this (corre- sponding to the programs NETTRA-E2 and NETTRA-E3) are discussed in Section 3. Section h briefly describes all of the subroutines used in the programs NETTRA-E1, -E2 and -E3. In Section 5, instructions are given on the preparation of the input data for the three programs. Finally, a listing of all of the FORTRAN subroutines used in NETTRA-E1, -E2, and -E3 is given in the appendix. 2. ERROR-COMPENSATION PROCEDURE In this section, the NOR-network transduction procedure realized by the FORTRAN program designated NETTRA-E1 is discussed. When it is applied in an attempt to transform a network, the number of gates in the network will either be reduced or left -unchanged - it will never be increased. In contrast to the earlier programs (NETTRA-P1, -P2, -PG1, -Gl, -G2, -G3, and -G^) which never transform a network so that it produces incorrect output functions, NETTRA-E1 causes "errors" to appear in the outputs of a network by deliberately removing a necessary (to the correct operation of the network) gate of the network. Then it attempts to compensate for these errors by adding and rearranging connections in the remaining network. Actually, NETTRA-E1 "memorizes" the original network and removes each of its gates in turn, trying to compensate for the errors in the new networks which each have one less gate than the original. If the program is successful in compensating for any of these removed gates, it prints out the solution (i.e., the transformed, reduced network of a smaller number of gates than the network originally given as input) and halts. The input to this program and NETTRA-E2 and -E3 is a description of a particular NOR network under consideration. This description (explained in great detail in Section 5) consists of a set of variables and arrays containing various network parameters . MAIN PROCCE POT o *" MINI 2 RCEC OUTPUT SUBNET FORC CALS1 0RDRQ2 RPLCF OONECT Figure 2.1 General organization of the programs NETTRA-E1 and NETTRA-E2, The entire NETTRA-E1 program requires l63K bytes of core storage, about 78K being occupied by the actual program instructions and about 85K by the stored data. The following subroutines, written in FORTRAN IV for the IBM 360/75, constitute the program NETTRA-E1: CALS1, CONECT, FORC, MAIN, MINI2, 0RDRQ2, OUTPUT, POT, PROCCE, RCEC, RPLCF, and SUBNET. Two system-supplied timing routines, STIMEZ and KTIMEZ are also assumed to be available, but if they are not, their use can be omitted from the program, or another suitable timing routine substituted, without harming the procedure itself. The general organization of the program NETTRA-E1 is shown in Figure 2.1. An arrow from block i to block j represents the fact that the sub- routine represented by block i calls the subroutine represented by block j. 2.1 General Procedure and Flowchart The general execution of the error-compensation procedure is carried out by the subroutine PROCCE (for: transduction PRO Ce dure by the Compensation of Errors) which, while quite simple itself, controls the calling of the major subroutines (explained in more detail in Sections 2.2 and 2.3) that actually execute the complex details of the procedure. The following discussion of PROCCE will assume a knowledge of the information contained in [U] and [5]. Explanations of the purposes of the variables and arrays actually appearing in the subroutine can be found in the program listing of PROCCE in the appendix. It is, however, convenient to define some of the variables at this point in order to discuss the flowchart of PROCCE which appears in Figure 2.1.1: N_ is the number of external variables, n, if only uncomplemented variables are allowed as inputs. If both complemented and uncomple- mented are available (i.e., n variables and their n complements) then N is equal to 2n. Note that this is strictly the representation internal to the program; for input-output purposes (as described in Section 5) N and n are always equal. R_ is the number of gates specified by the input data to the program. It includes all gates declared to be present by the input data, even though some of them may be isolated (i.e., not connected to other gates in the network). Internally , the program represents the gates 1, 2, . . . , R by the labels N+l, N+2, ...,N+R. (External variables are labeled 1, 2, ..., N internally.) NR is equal to the sum N + R. It is often convenient to treat both external variables and gates in a similar manner. External variables being labeled 1, 2, ..., N and gates being labeled N + l, ..., N + R (internally), the number N + R is frequently required. GSMALL is a two-dimensional array used to store intermediate and 4. final calculated compatible sets. GSMALL (i, j) contains (or rather will contain by the end of a procedure) the j-th component of the vector representing the compatible set of permissible functions for gate or external variable i. t For simplicity, sometimes just the words "compatible sets" will be used to denote compatible sets of permissible functions . NEPMAX is a variable limiting the maximum number of "error- positions" which will be tolerated in a network. NEPMAX is either specified by the input data, or, if left unspecified on the input cards, it is set to the value 2 (for example, in .the case of an implicit specification of external variables). An error-position is an index number i such that at least one output gate of a network (with errors) has an incorrect output for the i-th network input vector (i.e., the i-th combination of and 1 assignments to the network inputs). The removal of a gate from the network, as occurs during the execution of the procedure, usually causes errors to appear in several positions. If the number of these error-positions is too great, the chance of compensating all of them is generally low. In the interest of efficiency, if the number of error-positions exceeds NEPMAX after the removal of a certain gate, PROCCE does not attempt to compensate for the errors. Instead, it restores the original network and moves on to remove another gate. In addition to these variables which appear in the FORTRAN program itself, a few concepts from [k] and [5] should be recalled: G (v.) was defined in [h] t and G (v. ) was defined in [5]. The c l E i expression G (v. ) denotes a vector representing a compatible set of per- missible functions (CSPF) of a gate or external variable v. . This concept t In [5], the v- represent input terminals and gates, the concept of input terminals being introduced for theoretical completeness. Since the dis- tinction between input terminals and external variables is unnecessary for the purposes of this paper, the v. are considered to represent external variables and gates. was frequently used in programs realizing earlier procedures: NETTRA-PG1, NETTRA-G1, NETTRA-G3, and NETTRA-GU. For the error- compensation procedure, however, CSPF's must be extended to the concept of compatible sets of permissible functions with errors ( CSPFE' s) as defined in [5]. For each gate or external variable v., the corresponding CSPFE is denoted G (v. ). 1 L 1 The notation G (v.) or G„ (v.) refers to the d-th component of the c 1 E 1 respective corresponding vector. Whereas the components of the CSPF vectors were only of three types: 0, 1, or * (don't-care), the components of the CSPFE vectors may be any of five (logical) types: *, 0, 1, 0_ (a error), or 1 (a 1 error). Blocks 1 through k of the flowchart of PROCCE (Figure 2.1.1) perform some preliminary steps in preparation for the main part of the procedure realized in blocks 5 through 20. Block 1 calls the subroutine MINI 2 (described in detail in [T])« This serves two purposes. First of all, MINI 2 realizes a "pruning" trans- duction procedure, and it may be able to quickly eliminate some unnecessary gates from the original network. Secondly, MINI 2 will calculate CSPF vectors (G (v.)'s) for all of the gates remaining in the network. The information is examined in block 2 where the number of l's in the CSPF vector of each gate is determined. Block 3 creates an ordering of gates 1 through R based on an increasing number of l's in their respective CSPF vectors. The ordering is stored in the array PORDER such that the gate stored in the location PORDER(l) has a minimum number of l's in its CSPF vector and the gate stored in PORDER(R) has a maximum number of l's. In a rough sense, the number of 10 START CALL MINI2 T0 ELIMINATE EASILY REMOVED GATES AND T0 CALCULATE THE CSPF VECTOR F0R EACH GATE. DETERMINE THE NUMBER 0F l'S IN CSPF VECTOR FOR EACH GATE. LIST GATES IN ARRAY PORDER ACCORDING TO INCREASING NUMBERS OF l's IN THEIR RESPECTIVE CSPF VECTORS. k C RETURN > YES i PO0 = p0rder(pc0unt: 10 restore orig- inal network connection PATTERN (I*E, , RESET INC$MX). 11 I REMOVE ALL CONNECTIONS TO AND FROM GATE PCO. 13 i CALCULATE CODED CSPFE VECTORS FOR OUTPUT GATES. PCOUNT = PCOUNT + 1 12 UPDATE ALL ABJtAYS . CALL : SUBNET, PVALUE, AND UNNECE. 18 INITIALIZE CSPFE VECTORS OF NEW NETWORK: CALL P0RMGO AND CALL INITGS. XL I I INITIALIZE COUNTER: PCOUNT - 0. 19 form potential Output table: CALL POT. execute error- cOmpensattOn ROUTINE: CALL RCEC. YES Ik COUNT THE NUMBER of ERROR- POSITigiNS, NEP. c RETURN } 21 YES ALL ERRORS SUCCESSFULLY COMPENSATED . PRINT RESULT Figure 2.1.1 Generalized flowchart of PROCCE. 11 l's in a gate's CSPF vector reflects the relative "importance" of that gate in the network. In general the removal of a gate with many l's in its CSPF vector from a given network is likely to produce more error-positions in the output gates than would the removal of a gate with fewer l's. Thus, the ordering in the array PORDER roughly lists gates which are, from PORDER(l) to PORDER(R), increasingly more difficult to compensate for (the errors caused) when they are removed from the original network. Trying to remove the most easily compensated gates (i.e., those whose removals cause fewer error- positions) first (as is done in blocks 5 through 20) will generally lead to a quicker solution. In block h a counter, PCOUNT, is initialized to the value 0. PCOUNT will be incremented by 1 during every pass through block 5 . If PCOUNT exceeds the value R (i.e., the number of gates in the network), a condition tested for in block 6 , it means PROCCE was unable to successfully compensate for the removal of any gate from the network, and PROCCE returns to the calling subroutine (MAIN). If PCOUNT was found to be less than or equal to R, block 7 will set the variable PCO equal to P0RDER( PCOUNT ) . PCO is then the label of the next gate to be removed from the network by the error-compensation procedure. Block 8 checks to see if PCO is an isolated gate. If it is, there is, of course, no purpose in removing it from the network, and so the program would move on to the next gate to be removed (by returning to block 5). If PCO is not isolated, block 9 further tests to see if PCO is an external variable (PROCCE assumes that all n variables are essential to the network) or an output gate. In either case, it cannot be removed from the network, and so the next gate is selected for removal instead (by returning 12 to block 5) • If PCO passes these tests, PROCCE enters block 10 . Here an array INC$MX is initialized to contain the connection pattern of the original network (i.e., the network connection pattern as it existed immediately after the transformation by MINI2 in block l). The value INC$MX(v. , v ) J indicates the presence or absence of a connection from gate or external variable v. to gate v.. This initialization is done in preparation for the removal of PCO from that original network. During the calculation, the array INC$MX always contains the most recently updated version of the network connection pattern. Block 11 removes PCO from the orignial network by removing all of its input and output connections. This is done by changing some of the values of INC$MX. The removal of PCO also causes changes in many other arrays storing various information related to the network configuration. These are updated by calling the subroutine SUBNET and its entry point PVALUE in block 12 . Another entry point of SUBNET, UNNECE , is called to eliminate from the network any gates which may have been left, after the removal of PCO, with no paths to any of the network output gates. It is possible that leaving such gates In the network might actually be more beneficial, but an argument could be made either way. Programming considerations tipped the scale in favor of their removal. Although there are only 5 logical types of components permitted in the CSPFE vectors, *, 0, 1, 0_, and 1, the variety of the actual codings employed to realize these 5 types is somewhat larger (this will be discussed further in Section 2.2.1). In block 13 the outputs of all of the gates 13 remaining in the new network are recalculated. The actual (new) network outputs are compared with the desired outputs, and from this information the (initial) coded entries of the CSPFE vectors of the network output gates can be directly determined. The number of error-positions in this new network, NEP, are counted in block Ik . If the number of error-positions is 0, the new network realizes all of the desired functions correctly, and block 15 directs control of the program to block 21. Otherwise, the program enters block l6 where NEP is checked to see if it exceeds the maximum number of allowable error-positions, NEPMAX. NEPMAX is a parameter which may be varied by the user (see Section 5). If NEPMAX is exceeded, PROCCE. abandons all hope of compensating for errors in so many positions, and control goes back to block 5 for the selection of a new PCO. If NEPMAX was not exceeded, block IT forms the "potential output table" by calling the subroutine POT (POT will be discussed in more detail in Section 2.2.2). Essentially, the potential output table lists all (theoretically all - but actually just a "great many") functions which either exist or can be "manufactured" (by adding the appropriate connections to the network) by a certain algorithm. This table is used to assist in error- compensation by providing a list of functions which may be connected as new inputs to certain gates during the procedure. This is followed by another preparatory step just before the execution of the main error-compensation subroutine, RCEC. The CSPFE vectors are initialized in block 18 by calling INITGS (an entry point of MINI2). (The call to FORMGO merely recalculates GORDER in preparation for the execution of Ik INITGS. ) This initialization sets the values of some components of certain CSPFE vectors which can he predetermined. This initialization generally improves both the efficiency and effectiveness of the procedure. Block 19 is the most important part of the flowchart. . Here, the heart of the procedure, subroutine RCEC, is called. The subroutine RCEC (discussed in detail in Section 2.3) performs a function somewhat similar to that of the subroutine PROCII in [l], except that it must also deal with the added difficulty of "errors" (i.e., undesired outputs of certain gates for certain input combinations) present in the network. The main purpose of RCEC is to rearrange the network connection pattern in a manner such that all of these "errors" can be compensated. This cannot be done in just a single call to RCEC however. When RCEC corrects just a single error of a certain type, it must return to PROCCE (block 12) to have all of the necessary arrays updated before it can continue its error-compensation task. If the correction of that error causes the network to function correctly, this fact will be detected in block 15. If no errors of any kind were compensated by RCEC, it means that the compensation of further errors is impossible (at least, by following the algorithm realized by RCEC), so control of the program is sent back to block 5 to select a new PCO. The test is made in block 20 . When block 15 detects the presence of an error-free network (i.e., all of the desired output functions are correctly realized by the network) with the gate PCO removed, control goes to block 21 which prints out the new result. PROCCE then returns to the calling subroutine. 15 2.2 Major Support Subroutines This section will discuss some of the details of two important support subroutines called by PROCCE, MINI2 and POT. A knowledge of the functions of these two subroutines is necessary in order to. understand the error-compensation subroutine, RCEC (discussed in Section 2.3). 2.2.1 Subroutine MINI2 The subroutine MINI 2 was discussed in an earlier report, [T], with an emphasis on those points of the subroutine most relevant to the operation of the program NETTRA-PG1. In block 1 of the flowchart of PROCCE (see Figure 2.1.1), MINI2 is used in a capacity similar to that in NETTRA-PG1. Since this function has already been discussed adequately in [j] , it will not be repeated here . Of greater interest with regard to the error-compensation procedure is the function of MINI2 in block 18 of the flowchart of PROCCE. In that block, an entry point, INITGS , of MINI2 is called which performs an initiali- zation of the CSPFE vectors of the network. Although this aspect of the subroutine MINI2 was mentioned in [?]» it was not discussed in detail. The rest of this section will explain the results of calling INITGS. During the main body of the error-compensation procedure (i.e., during the call to RCEC in block 19 of the flowchart of PROCCE) the compatible sets of permissible functions are determined by assigning logical *'s, O's, l's, 0_'s, and _l's to elements of GSMALL (recall that the array GSMALL is used to store the CSPFE vectors). There is usually considerable freedom in making these assignments, and consequently a large variety of collections of compat- ible sets for the entire network can be produced. Despite this freedom though, 16 there are certain assignments of logical l's and O's to certain entries of GSMALL which are predetermined by the configuration of the network and by the algorithm to be applied. These necessary assignments are made during the initialization step in order to avoid making certain unnecessary assignments (to particular elements of GSMALL) later, as would otherwise occur. It is important, however, to remark that the existence of such predetermined entries is only possible under the assumption that only a single call to RCEC will follow the initialization. Partly for this reason. UTITGS is always called to re-initialize the CSPFE vectors immediately before each call to RCEC (see blocks 18 and 19 of the flowchart of PROCCE). Two or more successive calls to RCEC (without changing the initialization assignments) might change the network configuration so that any such initialization would be invalid. In any event, a call to RCEC usually alters the network configuration so that all of the CSPFE vector entries calculated during that call by RCEC itself must be recalculated (in the next call to RCEC), so some sort of initialization must be performed before each call anyway . As previously mentioned, five different logical entries, *, 0, 1, 0_, and 1_, may appear as components of the different CSPFE vectors. The precise meanings of these five logical entries are discussed in [5] 5 and they will also become clear during the discussion of the error-compensation subroutine (Section 2.3). In general terms, however, the meanings are as follows : * - indicative of a "don't-care" component. In other words, every permissible function of the corresponding CSPFE may IT have either a or a 1 for this component. - indicative of a required component. Every permissible function of the corresponding CSPFE must have a for this component position. 1 - indicative of a required 1 component. Every permissible function of the corresponding CSPFE must have a 1 for this component position. 0_ - indicative of currently required that should preferably be a required 1 instead (this is called a "0- error"). Although every permissible function of the corresponding CSPFE currently has a for this component, it would be desirable to change the network configuration so that a 1 could be demanded instead. _1 - indicative of currently required 1 that should preferably be a required instead (this is called a "l-error"). Although every permissible function of the corresponding CSPFE currently has a 1 for this component, it would be desirable to change the network configuration so that a would be demanded instead. To understand the coding of these logical values into the actual values used by the program, the concept of "covering" must be understood. Due to the nature of NOR gates, a 1 appearing on any of the input lines to a gate will cause a output of that gate. Such a 1 is called a cover of that 0, and the is said to be covered by that 1. Although a output may be covered by several l's (appearing on different input lines), only a single cover is actually required to guarantee the output. For a given 18 gate, certain components of its CSPFE vector (assuming that its CSPFE vector has already been calculated somehow - at least partially), repre- senting required outputs of the gate, each have only a single 1 cover. In each such case, the single 1 covering the is called an essential 1 . These essential l's form the basis of the initialization steps performed by calling INITGS. The correspondence between the logical values *, 0, 1, 0, and 1 and the actual (coded) values used in the program is shown in Table 2.2.1.1 (the symbols a and (3 used in the table represent variable integer values which may appear as the computer's internal representation of the logical value of a CSPFE component). LOGICAL VALUE OF CSPFE COMPONENT 1 1 ACTUAL VALUE OF CSPFE COMPONENT a, where > a > -1000 1 -1100 1001 a = -100 means this component has an unknown number of covers a = -200 means this component has 2 or more covers a = _p ^ -100, -200 means this component has an essential 1 cover from gate or external variable $ Table 2.2.1.1 Coding of logical values for components of CSPFE vectors. The sequence of events when INITGS is called is shown in Figure 2.2.1.1. INITGS assumes certain preliminaries have already been completed before it is called. For example, GORDER is assumed to be updated and 19 ENTRY INITGS START SET ALL ENTRIES 0F GSMALL T0 "D0N 'T CARES" EXCEPT F$R THE 0UTPUT GATES. Figure 2.2.1.1 Flowchart of a section of the subroutine MINI2 (beginning at entry point INITGS ). 20 GSMALL is assumed to already contain the correct values for the CSPFE vectors of the output gates (this is done by PROCCE). In block 1 of the flowchart in Figure 2.2.1.1, all of the entries in GSMALL, except for those corresponding to the network output gates (since these have already been determined), are set to "don't cares" in preparation for the initialization. Block 2 sets a counter, I, to the value 0. Thereafter, each pass through block 3 will increase I by 1. If I should exceed NR (the total number of gates and external variables), as tested in block U , a return is made to PROCCE. Otherwise, block 5 sets the variable GATE equal to GORDER(l). GATE is the current gate under consideration. Elements of the CSPFE vectors of the gates which feed GATE will be initialized according to the already initialized CSPFE vector of GATE itself (the ordering contained in the array GORDER guarantees that the CSPFE vector of GATE will be completely initialized before the CSPFE vectors of any of its predecessors). Blocks 6 and 7 test whether or not GATE is an external variable or an isolated gate. If it is either, the program returns to block 3 to increase I and select a new GATE. A list is made in block 8 of the component positions of all the logical 0's currently appearing in the CSPFE of GATE. These are stored in the 1-dimensional array F$l. Similarly, block 9 lists the positions of all of the logical l's and stores them in the array F$0. If F$l contains an empty list, GATE has no logical 0's in its CSPFE to be covered by its predecessors, and the covering step in block 12 can be skipped. The test is made in block 10. 21 By checking the number of predecessors -which cover each logical in GATE'S CSPFE vector, "block 11 determines the actual coding for each of these logical O's individually (according to Table 2.2.1.1). This coding is used by block 12 which assigns values to (i.e., initializes) certain components of the CSPFE vectors of GATE's predecessors. Each logical in GATE's CSPFE vector whose actual coding is of the -3 (3 4 100, 200) type has an essential 1 cover. In other words, each logical of this type is covered by the function from only a single gate. Making the assumption that every logical or 1 appearing in the CSPFE vector of GATE can be shown to be a required value assignment regard- less of the finally chosen sets of CSPFE vectors (i.e., for any choice of compatible sets of permissible functions for the gates of the network, these components of the CSPFE vector of GATE will always have the same assigned value) , one can assert that the essential 1 covers of those logical O's are also required regardless of the finally chosen CSPFE vectors (assuming no change in the network configuration). Thus justified, an assignment of a logical 1 is made to the CSPFE vector of a predecessor, PEED, of GATE in a component position corresponding to an essential 1 cover provided by PRED for a in GATE's CSPFE vector. This is done by block 12 for every in the CSPFE vector of GATE. Furthermore, since every predecessor, PRED, of GATE which provides an essential 1 cover for at least one of GATE's CSPFE vector cannot be disconnected from GATE without introducing a new error into the network, it is clear that the CSPFE vector of PRED must also contain a logical in every component position where a logical 1 appears in GATE's CSPFE. These assignments are also made in block 12. 22 Generally the initialization of GSMALL (i.e., the CSPFE vectors) can be seen as a propagation of required values of certain CSPFE vector components from the output gates through the gates feeding them, through the gates feeding these gates, etc.: The complete CSPFE vectors for the network output gates are known completely from the beginning. For the gates providing essential 1 covers for certain O's in the CSPFE' s of the output gates, one can make assignments of O's and l's to their own CSPFE vectors which are valid independent of whatever algorithm is used later (after the initialization step) to make a complete assignment to all components of all CSPFE vectors. This step is then repeated for the gates providing essential 1 covers for the gates providing essential 1 covers for the output gates, and so on. 2.2.2 Potential output table (POT) In order to compensate for error- components at the CSPFE of a gate, functions currently realized at other gates and external variables may be used according to the basic transduction procedure using CSPFE' s discussed in [5]. In order to make the error-compensation more flexible, the concepts of potential outputs and potential output tables (POT) were introduced in [5] j and a procedure utilizing a potential output table was also given. This section will briefly explain these concepts and discuss in some detail the implementation of the potential output table in programs NETTEA-E1, -E2, and -E3. (For details of these concepts see [5]). A potential output from a gate GI is a function realized at GI by connecting additional inputs to GI. This potential output of GI differs from the function currently realized at GI , and therefore can be used to 23 compensate for errors in a certain gate to which the current output function at GI is not connectable (i.e., connecting GI to that gate will change some non-error components in its CSPFE). There may be two major problems in using potential outputs . One is the problem of over-compensation caused by using too sophisticated potential outputs (i.e., too many modifications are required in producing potential outputs) that the number of error components in other gates may increase and it becomes too difficult to completely compensate for them. This problem can be avoided by restricting the types of modifications used in producing potential outputs. As explained in [5], only potential outputs which can be realized by adding connections satisfying triangular conditions are allowed in the error compensation procedure. Another potential problem is the additional computational complexity required by searching for potential outputs. This problem can be serious if a complete searching of potential outputs is required each time when a potential output is desired. This problem of time-consuming search cannot be completely avoided (if potential outputs are to be used) but can be reduced to a certain degree by employing a potential output table (POT). The POT is a list of selected potential outputs and the information on how to construct each potential output. For the sake of convenience, functions which are currently realized at input terminals (external variables) and gates are also listed. In the beginning of the error compensation process, all potential outputs satisfying certain triangular conditions are searched and listed in the form of a table. During the error-compensation process for a particular gate GI , the candidates for new inputs to GI (strongly effectively E-connectable functions with respect to the CSPFE of Gl) are selected from POT. Therefore, 2k at the expense of memory space (for storing POT), the relatively time consuming process of searching for potential outputs can be replaced "by a simple table look-up process. The potential output table used in NETTRA-E1, -E2, and -E3 is organized as follows. (1) The potential output table (POT) is stored in a two dimensional array POTAB (200, U2) . The first argument of POTAB is the entry number. For example, the information on the PTR-th entry of POT is stored in POTAB(PTR, 1) ~ POTAB(PTR, k2) . (2) Each entry, corresponding to one potential output, contains the following information: (a) POTAB (PTR, l) ~ POTAB (PTR, 32): the actual function (vector) of the PTR-th potential output in a truth table form. (b) POTAB(PTR, $GT): the gate label of gate GI at which the PTR-th potential output is realized ($GT is an integer constant and has the value 33). (c) POTAB(PTR, $LTH): the number of connections to be added to gate GI in order to realize the PTR-th potential output ($LTH is an integer constant and has the value 3^) • POTAB(PTR, $LTH) may have the value through 6. (d) POTAB(PTR, $LTH+l) ~ POTAB(PTR, $LTH+6) : the list of external variables and/or gates whose outputs must be connected to GI In order to realize the PTR-th potential output. (e) POTAB(PTR, $PW) and POTAB ( PTR, $NOE) : the preference weight and the number of one errors, in the PTR-th 25 potential output, respectively. Since these two values are defined with respect to the CSPFE of a particular gate, these two fields are used only during the error- compensation process when a gate has been selected. ($PW and $NOE are integer constants and have the values Ul and U2, respectively) . (3) Entries of POT are divided into several blocks of consecutive entries. Each block contains, the potential outputs realized at one par- ticular gate. In other words, every entry in the same block has the same POTAB(PTR, $GT) , and for every gate or external variable in the network there is a corresponding block containing the potential outputs realized at that gate or external variable (a block may consist of only one entry). {k) For each gate or external variable in the network, there are two pointers PPOTAB and LPOTAB both of which are one dimensional arrays. PPOTAB(Gl) indicates the starting entry of the block corresponding to GI , whereas LPOTAB indicates the last entry of the same block. (5) In the block corresponding to gate or external variable GI, the entries are listed in the following order: (a) The function currently realized at GI, and therefore POTAB ( PPOTAB ( GI ) , $LTH ) = (b) The functions realized at GI with one additional connection (i.e., POTAB (PTR, $LTH) = l). For the sake of convenience, these entries are called simple entries . (c) Entries realized at GI with POTAB(PTR, $LTH) > 2. An entry with POTAB (PTR, $LTH) >. 2 is called a composite entry because it can be obtained by an operation with two other entries with the 26 same POTAB(PTR, $GT). For example, if the PTRA-th and PTKB-th entries satisfy POTAB(PTRA, $GT) = POTAB(PTRB, $GT) = GI , a composite entry PTR can be generated as follows. (1) POTAB(PTR, I) = POTAB(PTRA, I) a POTAB(PTRB, I), for I = 1 , 2, ..., 32. (2) POTAB(PTR, $GT) = GI. (3) POTAB(PTR, $LTH) = POTAB(PTRA, $LTH) + POTAB(PTKB + $LTH). (U) POTAB(PTR, $LTH + I) = POTAB(PTRA, $LTH + I), for I = 1, ..., POTAB(PTRA, $LTH). (5) POTAB(PTR, $LTH + I) = POTAB(PTRB, $LTH + I - POTAB(PTRA, $LTH) ) , for I = POTAB(.PTRA, $LTH) +1, ..., POTAB(PTRA, $LTH ) + POTAB(PTRB, $LTH) . In programs NETTRA-E1, -E2 , and -E3, the potential output table for a given network is generated by subroutine POT which realizes the following procedure. Procedure for Generating Potential Output Table Step 1. Initialize Set PPOTAB(GI) = for GI = 1, . . ., N + R, where N and R are the numbers of external variables and gates in the network, respectively. Set POINTR = 1 (POIWTR is a pointer indicating the next entry to be generated). Step 2. Selection of gates According to the level assigned to each gate and external variable (i.e., a gate in a higher level precedes a gate in a lower level), select a gate or an external variable, GI, in the network. If all gates and external variables have been considered, the procedure terminates. 27 Step 3. Set the first entry for GI Set PPOTAB(GI) = POINTR. Copy the present function realized at GI into POTAB(POINTR, l) - POTAB(POINTR, N2), where N2 is the number of input combinations (if completely specified, N2 = 2**N ) . Set the following values : POTAB(POINTR, $GT) = GI , POTAB( POINTR, $LTH ) = 0, and POINTR = POINTR + 1. If GI £ N, go to Step 6. Step U. Find the simple entries realized at GI Step U-l Select a gate or an external variable, GJ, whose level number is not lower than that of GI. If all such GJ's have been considered, go to Step 5. Step U-2 Check whether or not GJ is connected to all immediate successors of GI. If not, go to Step U-l. Step U-3 Check whether or not connecting GJ to GI produces a function which differs from the function of GI and from the functions produced by connecting previous GJ's to GI. If not, go to Step U-l. Step U-U Make the POINTR-th entry as follows.. POTAB( POINTR, $GT) = GI P0TAB( POINTR, $LTH) = 1 P0TAB( POINTR, $LTH + l) = GJ POINTR = POINTR + 1 Go to Step U-l. 28 . 3 .' N LEV = LEVM (LKVM IS THE NUMBER 0F LEVELS IN THE NETWORK) :elect\exhausted 0ne gate in level lev. LEV = LEV - C0PY THE FUNCTION 0F 01 AS THE P0INTR-TH POTENTIAL OUTPUT IN P0TAB PP0TAB(GI)«P0INTR P0TAB ( P0INTR ,$GT )=GI P0TAB(P0INTR,$LTK)=O P0INTR=P#INT" + SET .PQT AB ( G I j =P0 I NTR- 1 MAKE THIS FUNCTION A NEW ENTRY IN P0TAB SET P0TAB( P0INTR ,*G.T )=GI P0TAB ( P0INTR ,$LTH )=1 P0TAB(P0INTR,$LTH+: = V P0INTR=P0INTR+1 Figure 2.2.2.1 Flowchart of subroutine POT 29 SET : PTRl=PPaTAB(Gl)+l SP=Pg)INTR EP=PC2INTR-1 LP=P3INTR-1 PTR=PTR1+1 I MAKE THE C0MP0SITE ENTRY 0F PTR-TH AND PTR1-ST ENTRIES AS THE P0INTR-TH ENTRY 0F P0TAB P0TAB(P(2INTR,l)=P0TAB(PTR,l) ( P0 TAB ( PTR1 , 1 ) , F0R 1=1,. .. ,N2 P0TAB ( P<2 INTR , $GT ) =GI P0TAB(P0INTR,$LTH)=P0TAB(PTR1,$LTH)+1 P0TAB(P0INTR,$LTH+I)=P$)TAB(PTR1,$LTH+I) , P0R 1=1,... ,P0TAB(PTR1,$LTH) P^TAB ( P0INTR , $LTH+P0TAB ( PTR1 , $LTH )+l ) = P0TAB(PTR,$LTH+l) ?:::;7?^?;::;r?+: ?T?.l=FTRl+i PTR=PTR+] Figure 2.2.2.1 Cortinued. 30 Step 5. Generate composite entries to be realized at GI If there is no more than one simple entry for GI, go to Step 6; otherwise generate composite entries as follows. (S denotes the total number of simple entries, which are the entries PPOTAB(Gl) + 1 through PPOTAB(Gl) + S in the potential output table, and POINTR always points at the next entry to be entered) . Step 5-1 Set I = 2 and E = S. Step 5-2 Generate a composite entry from the (PPOTAB(GI) + l)-th and the (PPOTAB(GI) + J)-th entry, for J = 1, . . . , I - 1 . Step 5-3 Generate a composite entry from the (PPOTAB(Gl) + l)-th entry and the (PPOTAB(Gl) + j)-th entry, for J = S + 1, . . . , E( if E < S, this step is skipped). Step 5-k Set 1=1+1. If I > S, go to Step 6; otherwise set E = POINTR and go to Step 5-2. Step 6. Set the pointer indicating the last entry in block GI Set LPOTAB(GI) = POINTR - 1, and go to Step 2. The flowchart of this procedure is shown in Figure 2.2.2.1. 2.3 Error-Compensation Subroutines Error compensation procedure is coded into a FORTRAN subroutine named RCEC which stands for Replacement of Connections for Error-Compensation and five supporting subroutines: CALS1, RPLCF, FORC, 0RDRQ2, and CONECT. RCEC is the central part of the transduction programs NETTRA-E1, -E2, and -E3. This subroutine needs, as parameters, a NOR network which does not realize the desired output functions along with the initialized CSPFE's for each gate 31 (explained in Section 2.2.1). When it is entered, it selects one gate at a time whose CSPFE has been completely calculated and tries to compensate for error-components in the CSPFE of the selected gate. As a result of the error- compensation for this particular gate, if some error-components are compensated or output functions of some gates are changed, this subroutine will return to PROCCE, the calling subroutine in NETTRA-E1 , -E2 , and -E3. PROCCE will then recalculate the output functions of the network to check whether or not this new network realizes the desired functions. If it does, the original network has already been transduced to a desired new network; otherwise PROCCE will recalculate the potential output table and call subroutine RCEC again to apply the error-compensation procedure to this slightly modified network. On the other hand, if no error-components in the CSPFE of the selected gate can be compensated, the CSPFE of the selected gate will be propagated to its inputs. If all gates have been considered in this manner, it means no error-components can be compensated in this application of RCEC (otherwise it would have returned to PROCCE). In this case, the subroutine returns to PROCCE unsuccessfully. The error-compensation procedure consists of several subprocedures. These subprocedures and two supporting subroutines will be discussed in some detail in Sections 2.3.1 and 2.3.2, respectively. Section 2.3.3 will be devoted to the discussion of the propagation of CSPFE' s, and Section 2.3.*+ will summarize the entire procedure and present the flowchart. 2.3.1 Compensation of error-components for a particular gate The error-compensation procedure considers only one gate at a time. When a gate is selected, its CSPFE must be completely calculated. Therefore, 32 at the beginning of the procedure, only first level output gates can be selected. As the calculation goes on, a gate becomes selectable only when all its immediate successors have been selected. Thus the ordering of selection can be made according to the gate level assigned to each gate. The ordering also could take into consideration the number, type and degree of the error-components in the CSPFE of each gate when more than one gate is selectable as explained in [5] • After a gate GI has been selected, the procedure concentrates on compensating for error-components in the CSPFE of gate GI by (l) removing redundant input connections, (.2) substituting for input connections, and (3) adding connections to compensate for 1 -error-components . The first two types of operations are aimed at compensating for O-error-components whereas the third one 1-error-components . In all cases, the number of error- components in the CSPFE of gate GI will never increase after applying these operations. In addition to the number of error-components, the degree of an error-component is also an important criterion in deciding which connec- tions are to be added or disconnected. The degree of an error-component is defined only for O-error-components to indicate how difficult this 0-error- component is to be compensated. If a O-error-component in the CSPFE of gate GI is covered by only one input connection of the gate, this error is considered easier to be compensated since the proper substitution for this input connection or the compensation for the corresponding 1-error-component in that input can compensate for this O-error-component. This type of O-error-components are called primary O-error-components . On the other t The Definition 4.3*2.3 of [5] defines primary 1-error-components which are the ones which cover primary O-error-components defined here. For the convenience of discussion both are regarded as primary error-components in this paper. 33 hand, if a O-error-component is covered by more than one input , it is considered more difficult to be compensated either at this stage "when the gate having this O-error-component is under consideration or later when the immediate predecessors covering this O-error-component are under consideration. This type of 0— error-components, are called secondary error components . Among the three types of operations mentioned earlier, the last two require the connection of functions to the selected gate GI. The set of candidates for those functions must be strongly effectively E-connectable functions with respect to the CSPFE of gate GI. Among these candidates the functions -which have been actually selected to be connected to GI as inputs must also satisfy the prohibition conditions (Lemma 3.2 of [5]) with each another. These conditions are examined each time when a function has been selected, and the functions which do not satisfy one of these conditions with this selected function will be prohibited from being selected. The above conditions are required for the functions to be connected to gate GI both in the second (substitution of connections) or the third type (addition of connections) operation. In addition to these conditions, the replacing functions and the replaced functions must satisfy the following condition. That is, the addition of the entire set of replacing functions will make the set of to-be— replaced functions E-disconnectable with respect to the CSPFE of gate GI . This condition guarantees that the number of 0-error- components never increases. In the actual procedure, the operation of the substitution for Input connections consists of three subprocedures. Each subprocedure is aimed at compensating for a particular type of 31+ error-components. Additional conditions are required in each subprocedure in order to actually compensate for some error-components, and will be discussed later in this section. For the third type of operation, each of the added connections must have at least one 1-component which covers a 1-error-component in the CSPFE of gate GI since this operation is aimed at compensating for 1-error components. The input connection substitution problem is essentially a covering problem. All O-components in CSPFE of gate GI must still be covered after the substitution, and the number of O-error-components covered by the new input set (the replacing functions and the remaining functions) is to be minimized. Although the optimal solutions can be obtained by solving this covering problem, the time required for deriving optimal solutions would usually be too excessive, especially when the number of candidates for substituting functions is very large. Furthermore, the local optimization, i.e., the optimization concerning only the selected gate GI is not necessarily the optimization with respect to the entire error compensation procedure. Based on these considerations, a heuristic method for substitution subprocedures is used. The error compensation procedure contains the following six subprocedures, among which, subprocedures (2), (3), and (h) t are substitution subprocedures . (l) Remove redundant connections. The redundant connections are the input connections which are E-disconnectable with respect to the CSPFE of the selected gate GI. Since it has no essential 1-components to cover 0— components in the CSPFE of GI , the removal of this connection will not increase the number of error-components 35 The number of O-error-components or the degrees of some O-error-components in the CSPFE of the selected gate may decrease resulting from the removal of redundant connections. It should be noted that the redundant connections are removed before substitution is considered but the removed input connection may be reconnected in the substitution subprocedures. (2) Substitution for input connections from external variable with error-components . If an input connection from an external variable has a 1-component which covers a O-error-component in the CSPFE of gate GI , this 0-error- component can never be compensated unless this input connection to gate GI is removed. Therefore, this type of input connections must be considered for substitution prior to other input connections. Since the main purpose of this subprocedure is to replace the input connections having uncompen- satable errors, the strongly effectively E-connectable functions (for simplicity, strongly effectively E-connectable functions will henceforth be referred to as connectable functions) without uncompensatable error- components, i.e., the connectable function from external variables without error-components and connectable function from gates with or without error- components may be used as the candidates for the substituting functions. (3) Substitution of input connections from gates with primary errors. If a O-error-component in the CSPFE of the selected gate is covered by only one input function, it is called a primary error as it may be corrected by substituting for that input function only. In this case, the connectable functions which have a 0-component corresponding to the primary O-error-component under compensation are candidates for the substitution. Once a primary error Is eliminated by substitution, the 36 candidates for later substitutions should be limited to those functions which have O-components corresponding to the compensated primary 0-error- component . (h) Substitution for input connections by functions without error-components. This subprocedure substitutes connectable functions which have no 1-components corresponding to O-error-components in the CSPFE of the selected gate GI for functions which have at least one 1-component corresponding to a O-error-component in the CSPFE of the gate GI . As a result of the substitu- tion the degrees of some O-error-components may be reduced and this may make the total number of error-components in the input functions smaller. If the degree of an error is reduced to zero, this error of the selected gate has been compensated. (5) Adding connections to compensate for 1 -error-components . A 1-error-component in the CSPFE of the selected gate GI is easy to be compensated if there is a connectable function whose corresponding com- ponent is a 1. Some of the 1-error-components may have been already compen- sated during the compensation for O-error-components by substitutions. Since earlier subprocedures are aimed at compensating for O-error-components, however, there are still possibilities to compensate for 1-error-components especially when there is no O-error-component in the CSPFE of gate GI. In this subprocedure, the candidates are those functions which have a 0-component corresponding to each 1-component (including the corrected O-error-components if any) in the CSPFE of gate GI. (6) Adding redundant input connections from external variables. This subprocedure does not belong to any of the three types of operations for error-compensation since it is not aimed at compensating for 37 error-components in the CSPFE of the selected gate GI , "but rather, at loosening the requirements of the predecessors of gate GI to make error-compensation at later steps easier. In subprocedure (2), the inputs from external variables with error- components have been considered for replacement in the first place since an error- component in an external variable can never be compensated unless it is removed. A redundant input from an external variable without error- components, however, will help to loosen the requirements for the predecessors of the selected gate GI if this input from external variable has some 1- components corresponding to the O-components in the CSPFE of gate GI. There- fore, this type of redundant external variables (i.e., those without anticipated error-components) should be connected to gate GI. In addition, the external variables with some anticipated 1-error-components which cover the corresponding O-error-components are also added if these O-error-components are not primary errors (i.e., the addition of these redundant inputs from external variables will not decrease the number of primary O-error-components in the CSPFE of the selected gate). This seems to contradict the objective of subprocedure (2), i.e., removing external variables with error-components by any means, but it should be noted that if some error-components can be compensated later, this gate will be considered again when subroutine RCEC is reentered. At that time, the redundant external variables, if still redundant, will be removed by subprocedure (l), and may not be added again if it would cover primary O-error-components. These subprocedures will be explained in some detail in Section 2.3.3. 38 2.3.2 Supporting subroutines for substitution In the error-compensation procedure, there are three subprocedures which substitute a subset of candidates for a subset of input functions of a selected gate GI . Since these subprocedures are similar in nature, they are coded to share two subroutines, CALS1 and RPLCF. Subroutine CALS1 calculates the to-be-replaced subset of certain input functions when a set of candidates are given. Let the set of input functions to be removed be denoted with S, and the set of candidates for the functions to be added t with S2 . The subroutine CALS1 will calculate a subset SI of S which can be replaced by S2 . For example, in subprocedure (2) the set S contains all external variable inputs which cover some O-error-components , and the set S2 contains all connectable functions except the connectable external variables which have 1-components corresponding to some O-error-components in the CSPFE of the selected gate GI. The subroutine CALS1 checks whether or not every essential 1-component in each function of S can be covered by S2. If all essential ones in a function of S can be covered by set S2, this function is replaceable, and therefore should be placed in set SI. Along with set SI, the components which must be covered by one of the substituting functions are stored in set Tl, which will be referred to by subroutine RPLCF. + In reference [5J , symbols S, S , S , and S were not used in order to avoid the possible confusion with S(v. ), the set of successors for input terminal or gate v.. Instead of S, S , S , and S , symbols Q, Q , Q , Q were used to indicate a set of input functions containing the candidates to be replaced, a subset of Q which can be actually replaced, a set of candidates replacing Q , and a subset of Q which can actually replace Q , respectively. For better correspondence with the notation in the actual programs NETTRA-E1, NETTRA-E2, and NETTRA-E3, the symbols S, SI, S2 and S3 are used in this paper in place of Q, Q , , and Q , respectively. 39 The procedure of subroutine CALS1 is as follows. Step 1. Selection of functions Take a function GP from set S. If all functions in S have been considered, return to the calling procedure (subroutine RCEC in NETTRA-E1, -E2, or -E3). Step 2. Check replace ability For each 0-component in the CSPFE of GI , the gate under consideration, which is covered only by input function GP , check whether or not set S2 covers it. If not, GP is not replaceable and go to Step 1. Step 3. List essential ones Add the positions of all essential 1-components in the function of GP into set Tl, which is the list of the positions to be covered by the substituting functions. Step h. Update Add GP into set SI. Remove GP from the list of current input functions of GI. Remove GP from set S. Go to Step 1. The flowchart of subroutine CALS1 is shown in Figure 2.3.2.1. Subroutine RPLCF is called immediately after CALS1 has returned. RPLCF selects a subset S3 of S2 which is needed to replace functions in set SI. Therefore, sets S3 and SI must satisfy the conditions for sub- stitutions described in Section 2.3.1. Since the selection of S3 is essentially a covering problem, as mentioned previously, a heuristic procedure is used. The candidates for the replacement of SI (i.e., set S2) are stored according to the ordering based primarily on the number of 1*0 EXHAUSTED 1 RETURN Figure 2.3.2.1 Flowchart of subroutine CALS1. ill anticipated error-components (if connected) and secondarily the number of 1-components covering O-components or 1 -error-components . The procedure examines each candidate according to this ordering to check if it covers any components in Tl which are not covered by any selected candidates. If it does, the candidate will be added into set S3 which is the set of functions substituting for inputs in set SI. As mentioned in Sections 2.2.2 and 2.3.1, the candidates in set S2 may not be compatible with one another, so each time when a candidate is added into set S3, all other candidates which are not compatible with it are prohibited from being selected. Because of the prohibition, the remaining functions in set S2 and functions in set S3 may no longer cover set Tl. In this case, the functions prohibited by the latest selection are permanently prohibited, and the set S2 is recon- structed. The procedure then calls subroutine CALS1 (from subroutine RPLCF) and reenter RPLCF itself to repeat this procedure of substitution. As a final result, a subset of input functions may be replaced by a subset of candidates in set S2 , and the conditions, listed in Section 2.3.1 are satisfied. The procedure of subroutine RPLCF is as follows. Step 1. Initialize Set S3 = 0. Step 2. Selection of a candidate Select a function, PTR, from set S2 which is the PTR-th entry of POT and is realized at GT. Step 3. Check usefulness Check whether or not this function covers any components in set Tl which are not covered by any functions already in set S3. If not, go to k2 Step 2. Step h. Prohibition Prohibit functions which are realized either at gate GT or at some other gate GX requiring the addition of the connection from GT. to GX. Step 5. Update Temporarily add this function into set S3. Remove components covered by this function from set Tl. If Tl = 0, go to Step 8. Step 6. Check replaceability Check whether or not remaining functions in set S2 still cover all remaining components in set Tl. If yes, set S3 = S3 U {PTR} and go to Step 2. Step 7. Recalculate set SI Restore set S2 but delete from S2 the functions just prohibited in Step h. Call CALS1 to recalculate SI and associated Tl. Go to Step 1. Step 8. Substitution Connect functions in S3 to gate GI. Disconnect the input functions in set SI from gate GI. Return to the calling procedure (subroutine RCEC in NETTRA-E1, -E2 , and -E3) . The flowchart of this subroutine is shown in Figure 2.3.2.2. Beside the two subroutines mentioned above, there are three other supporting subroutines: F0RC, 0RDRQ2 , and CONECT. FORC has an argument GJ. When it is called, the connection from GJ to GI which is the gate under consideration is examined. If the connection from GJ to GI is E-disconnectable with respect to the CSPFE of GI, it will be removed from the network; otherwise it will do nothing. U3 NO SELECT ONE FUNCTION, PTR (AN ENTRY NUMBER IN 3 QT), FROM S EXHAUSTED I CHECK WHETHER OR N0T PTR COVERS AT LEAST ONE COMPONENT IN SET Tl WHICH IS N0T COVERED BY FUNCTIONS IN S3 I YES PROHIBIT FUNCTIONS IN S2 WHICH USE THE GATE REALIZING FUNCTION PTR I CHECK WHETHER SET S2 STILL C0VERS ALL ESSENTIAL COMPONENTS IN SET Tl I NO RESTORE SET S2 BUT REMOVE THE FUNCTIONS JUST PROHIBITED FROM SET S2. CALL CALS1 REPLACE FUNCTIONS IN SET SI BY FUNCTIONS IN SET S3 f RETURN J Figure 2.3.2 Flowchart of subroutine RPLCF. kh Subroutine 0RDRQ2 classifies the input functions except external variables of the selected gate GI into three groups. The first group contains input functions which have no 1-components corresponding to O-error-components in the CSPFE of GI. The second group contains the functions which have at least one 1-component corresponding to a primary O-error-component in the CSPFE of GI. The functions which have 1-components corresponding to some 0-error components but none of them are primary error-components are classified as the third group. Since the functions in the first group are not subjects of substitution, they are not listed. The other two groups are put into a 2-dimensional array working as two 1-dimensional arrays, each of which contains the sorted list of the functions in second and third groups, respectively. The sorting is based on the number of 1-components corresponding to the O-error-components in the CSPFE of GI. These two lists are referenced by subroutine RCEC as the lists of candidates to be replaced. Subroutine CONECT(PTR) realizes a simple procedure which connects the PTR-th function in the POT to gate GI , the gate under consideration. As the realization of the PTR-th function in the POT may require additional connections as explained in Section 2.2.2, subroutine CONECT also connects these connections. 2.3.3 Propagation of CSPFE' s As discussed in Section 2.3.1, if no actual substitution has taken place and no error-component has been compensated during the error- compensation concerning a selected gate GI , the procedure will propagate the CSPFE of GI to the input connections of GI and will select another gate. U5 The propagation of CSPFE's is a procedure for calculating CSPFE's. As explained in Section 2.1 of [5], the CSPFE of a particular gate depends on the CSPFE's of its output connections, and the operation for calculating the CSPFE of a gate from the CSPFE's of its output connections is commutative (i.e., the order in which connections are considered is not important). In the procedure realized "by subroutine RCEC, the CSPFE for each connection is not stored. Instead, the intermediate CSPFE for each gate is stored, and it will remain an intermediate CSPFE for that gate until all its output connections have been considered. The propagation of the CSPFE of gate GI is essentially the calculation of CSPFE's of its immediate predecessors contributed by gate GI . Since there are five types of components in the CSPFE, the propagation can be classified into the following five categories. (1) Don't-care components (*) The corresponding input components can he either or 1. Since it is a don't-care component, no change is required for the intermediate CSPFE's of the immediate predecessors of gate GI. (2) 1-components A 1-component is realized when all corresponding input components are 0. Since the 1-component is required for the CSPFE of gate GI, all the corresponding components in the CSPFE's of GI's immediate predecessors should be assigned to unless the input is from an output gate and the corresponding component has been assigned as a 0— error-component . ( 3 ) 1 -error -components Since a 1-error-component in the CSPFE of GI Indicates the actual output is 1 but the preferred value is 0, it should he propagated to its U6 immediate predecessors as O-error-components if possible. If the corresponding component in the intermediate CSPFE of one of GI's immediate predecessors has already been assigned to before this propagation, it should remain since the assigned means that an earlier propagation from another gate requires that it be 0. ( k ) O-error-components. In this case, the corresponding components of the inputs of GI could be either or 1. If the component of an input corresponding to a 0-error- component in the CSPFE of GI is 0, the corresponding component of the CSPFE of that input is assigned to In order not to increase the degree of the 0-error-component under consideration. On the other hand, if the component corresponding to a 0-error-component is a 1, it should be assigned as a 1— err or- component unless it has already been assigned as a 1-component in an earlier step. (5) 0-components The propagation of 0-components is the most complicated case among those of five different types of components. For each 0-component in the CSPFE of GI, only one corresponding component of GI's inputs should be assigned to 1, and all others need not change. If a 0-component is covered by an external variable or a gate whose corresponding component in its CSPFE has already been assigned to 1, the above condition has already been satisfied and therefore no other changes are necessary. Since the error- compensation procedure depends very much on how to choose the 1-component to cover a 0-component, the ordering is carefully calculated according to the following. (a) Inputs which covers fewer primary O-error-components in the hi CSPFE of GI have higher priority in the selection. (b) If there is a tie based on (a), the input which covers fever Q-error-components has the higher priority in the selection. (c) If two Inputs have the same priority based on (a) and (b), the one which has more output connections has the higher priority. Rules (a) and (b) are based on the consideration of easier error-compensation for the immediate predecessors of GI. Since a primary O-error-component in the CSPFE of GI can be compensated if the 1-error- component covering it is compensated, every effort should be made to make this 1-error-component easier to be compensated. Rules (a) and (b) tend to assign more don't-care— components to the inputs which cover more primary O-error-components . This explains rules (a) and (b) since the more don't-care-components there are in the CSPFE of a gate, the more connectable functions are likely, and therefore the more chances there are to compensate for these error-components. Rule (c) is based on the number of output connections . If a gate which has more output connections than others is selected and assigned to 1, this 1 is likely to cover O-components in other immediate successors of this gate. In the actual program, the priority depends on the weight associated with each input connection which is calculated according to the following formula. £> h W = 10 - 10 * (# primary error-components) 2 - 10 * (# error-components) + (# immediate successors) A special case should be noted. If a 0-component is covered only by an output gate of the network and the corresponding component in the CSPFE of that gate has already been assigned as a 1-error-component, this hH component should not be changed and the corresponding components of other inputs should be assigned as O-error-components , if possible, in order to cover the 0-component in the CSPFE of GI when the corresponding 1-error- component in the CSPFE of the output gate is compensated. 2.3. U Algorithm of error-compensation procedure and flowchart As a summary of the above discussions, a brief description of the procedure realized by subroutine RCEC is presented in this section. For the detail of the procedure, however, see the flowchart in Figure 2.3.^.1. The Procedure of Error Compensation Realized by RCEC Step 1. Selection of gate Select a gate GI according to the ascending order of the level number assigned to each gate, i.e., a gate in the lowest level is selected first. If all gates have been considered, return (RETURN l) to the calling subroutine (PROCCE in NETTRA-E1, -E2, and -E3)(this is an unsuccessful compensation). Step 2. Removal of redundant connections For each immediate predecessor GJ of GI, call subroutine FORC(GJ) to check whether or not the connection from GJ to GI is redundant. If so, remove this connection. If no error-component is in the CSPFE of GI, go to Step 9- Step 3. Selection of connectable functions from POT Select strongly effectively E-connectable functions for GI from the potential output table. If there is no such connectable function for GI, go to Step 9- U9 Step h. Classification of connectable functions Classify connectable functions for GI into four categories: (l) external variables without error-components (set DIO), (2) gates without anticipated error-components (set BIO), (3) gates with anticipated error- components (set BI), and (h) external variables with error-components (set DI ) . Sort BI according to the number of 0-error- components the function covers. Step 5* Substituting for external variables with errors Let S2 = DIO U BIO U BI, S = external variable inputs of GI, which cover O-error-components (these inputs are found and sorted by calling subroutine 0RDRQ2). Call subroutine CALS1 and RPLCF to substitute a subset S3 of S2 for a subset SI of S, if possible. Step 6. Substituting for functions covering primary error-components For each input of GI covering primary error-components (these inputs are found and sorted by calling 0RDRQ2 in Step 5), check whether or not it can be replaced by functions in DIO, BIO and BI with some primary error-components corrected. Call CALS1 and RPLCF to complete this substitution. Step 7. Substituting for functions by functions having no error-components Let S be the set of remaining inputs of GI which have error- components, and let S2 be the set of the remaining functions (exclude already selected and/or prohibited ones) in sets DIO and BIO. Call CALS1 and RPLCF to replace as subset SI of S by functions in a subset S3 of S2 , if possible. Step 8. Compensating for 1-error-components in the CSPFE of GI If some of the remaining functions in DIO, BIO and BI have 1-components corresponding to some 1-error-components in the CSPFE of GI, 50 ENTRY r~ 13 Step 1 r Step 2 SELECT A GATE GI WH0SE CSPFE HAS ALREADY BEEN CALCULATED EXHAUSTED RETURN 1 (UNSUCCESSFUL C0MPENSATI0N Y LIST ALL 1, 1, 0, AND _0 C0MP0NENTS IN THE CSPFE 0F GI . LET CI, C1E, CO AND COE BE THE SUBSETS 0F THESE C0MP0NENTS RESPECTIVELY. ~l F0R EACH PREDECESS0R GJ 0F GI CALL F0RC(GJ) TC) REM0VE REDUNDANT CONNECTI0NS UPDATE COE L J 51 r Step 3 ~i SELECT FR0M P0SSIBLE 0UTPUT TABLE ALL STR0NGLY EFFECTIVELY E-C0NNECTABLE FUNC- TI0NS (ECF) F0E GI , EACH 0F WHICH C0VERS AT LEAST 0NE C0M- P0NENT IN CO 0R C1E. ARRANGE ECF ACC0RDING T0 THE NUMBER 0F 0-. AND 1-ERR0R C0M- P0NENTS C0VERED BY EACH FUNCTI0N Step k 1 F CLASSIFY ECF INT0 h SUBSETS 1. DIO: EXTERNAL VARIABLES WHICH C0VER N0 O-C0MP0NENTS 2. DI: EXTERNAL VARIABLES WHICH C0VER AT LEAST 0NE O-C0MP0NENT 3. BIO: GATES WHICH CQfVER N0 O-COMPONENT h. BI: GATES WHICH QZiVER AT LEAST 0NE O-C0MP0NENT 52 l_ r Step 5 ARRANGE BI ACCORDING T0 THE NUMBER 0F O-C0MP0NENTS COVERED SET S2=BI0 U DIO U BI IN THIS 0RBER LET SET S BE THE EXTERNAL VARIABLES C0NNECTED T0 GI WHICH O0VER AT LEAST 0NE O-C0MP0NENT IN THE CSPFE 0F GI J ~l S=<|> L CALL CALS1 T0 CALCULATE A SUBSET SI 0F S WHICH CAN BE REPLACED BY S2 CALL RPLCF T0 SELECT A SUBSET S3 0F S2 WHICH IS NECESSARY F0R REPLACING SI J 53 r ~i CALL 0RDRQ2 T0 CLASSIFY INPUT FUNCTI0NS 0F GI FR0M GATES INT0 TW0 SUBSETS 0NE 0F WHICH CONTAINS FUNCTI0NS C0VERING AT LEAST 0NE PRIMARY O.-C0M- P0NENT, THE 0THER C0NTAINS 0THER INPUT FUNCTI0NS COVERING S0ME O.-C0MP0NENTS Step 6 LET S C0NTAIN THE FUNCTI0NS IN THE FIRST SUBSET CALCU- LATED AB0VE s= SELECT 0NE FUNCTI0N, GP FR0M SET S -O EXHAUSTED -© LIST ALL PRIMARY 1_-C0MP0NENTS IN GP. LET THIS BE SET ES1E. IT SELECT 0NE C0MP0NENT ES1E(I) FR0M ES1E EXHAUSTED 18 5h SELECT AS A SUBSET Sk £>F S2 THE FUNCTI0NS WH0SE VALUES AT ES1E(I) ARE 0. WHENEVER A FUNCTI0N IS SELECTED, THE FUNCTIONS IN S2 WHICH USE THE SAME GATE AS THE SELECTED 0NE ARE PR0HIBITED FROM BEING SELECTED CHECK WHETHER 0R^ N0T FUNCTI0NS IN Sk C0VER ALL ESSENTIAL l'S IN GP ,N0 YES PUT GP INT0 SI. ADD ESSENTIAL l'S C0VERED BY GP INT0 SET Tl SET SP=SU ADD INPUT FUNCTIONS (FROM GATES) 0F GI WHICH C0VER S0ME 0-COMPONENTS INT0 SET S REST0RE S2 RESET Sk CALL CALS1 T0 FIND ADDITIONAL FUNCTI0NS F0R SI (SUBSET 0F S) WHICH CAN BE REPLACED BY FUNCTIONS OF S2 55 r Step T Step 8 L r CALL RPLCF T0 FIND A SUBSET S3 ) Configuration of final network. 73 printout from NETTRA-E2. This final transformed, reduced network consists of only 11 gates and 30 connections. 3.2 Multi-Path Application The program NETTRA-E3 represents what is called a mult i -path application of the error-compensation procedure. It is only slightly more complicated than NETTRA-E2 (due to the necessity of storing intermediately produced networks in a stack) and employs only one additional subroutine. NETTRA-E2 only produces a single sequence of networks beginning with the original network specified by the input data and ending with a network from which the error-compensation routine can successfully remove no more gates. Let this sequence of networks be labeled W ■*■ ¥ -> W -*• ... -> W , where W is the original network and W is the final network. El a Each ¥. , is derived from W. by the removal of a single gate (although i+l i ° ^ other gates may consequently be removed) and the successful compensation of the resulting errors by the error-compensation routine. Actually, (in general) there are several different networks that can be obtained from each W. by the removal of and successful compensation for several different gates. NETTRA-E2 settles for the first network, W. in , that can be obtained & > i+l' from W. by the removal of a certain gate and the successful compensation of errors , but NETTRA-E3 stores that improved network (W. . ) and continues to i+l search for additional improved networks that can be derived from ¥. by removing different gates. These are also stored, in a stack, and NETTEA— E3 will then search for all of the possible improved networks obtainable from those in the stack, storing the new networks in the stack as they are obtained, and so on. Thus NETTRA-E3 will produce a "tree" of solutions 7h (intermediate and final) while NETTRA-E2 only produces a single "string" of solutions (which, incidentally, will be identical to a certain path through the tree produced by NETTM-E3). For example, Figure 3.2.1 shows the difference between the (intermediate and final) solutions obtained by NETTRA-E2 and the solutions obtained by NETTRA-E3. Beginning with W (assumed to be a network of 16 gates) NETTRA-E2 discovers that gate 6 (for example) can successfully be removed from W to produce the 15-gate network W . It immediately prints out this result (i.e., the configuration of W ) and proceeds to "operate" on W^, trying to remove some gate in order to obtain a network W of ik gates. However, beginning with the same original network, W , NETTRA-E3 also finds that gate 6 can be successfully removed to produce a 15-gate network (let it be called ¥ this time), but it does not "forget about" W and immediately attempt to transform W . Instead, it prints the result, W (along with a message identifying the "parent" [i.e., W ] of d ,-L ± the network), stores it in a stack memory, and continues to search for other 15-gate networks obtainable from W by the removal of different gates (these are represented by W_ _ [obtained by removing gate 8 from W ], W [removing gate 11], and W , [gate 15]). These networks, W , W , and W , are also put into the stack. NETTRA— E3 then selects the top network of the stack (W , in this example) and attempts to remove individual gates from it in the same manner as it treated ¥ . This process continues until the stack is empty. The terminal nodes of the "solution tree" must then be searched to identify the best solution (i.e., the network with the fewest number of gates). 75 w o •H P O w ro W I f£ EH EH W O o a; a -P A) cd (h bO •»»» *> H a) OO !> o 0) a p 0) cd ^H (3D -■^ ^>* o ■ on OJ C\J C'vj CM (D On O V cd ^ bC -^- OJ CD r~\ !> o CD S p -=r a> cd a u bO --» CM ^ CD VD !> o CD S p 0) cd 5h bfl ~~» *> on en .- ••>• OJ i j- j, m i .-j i -^ I ^. i ~j w I OJ H I W o o P 03 PI O •H H O CO 0) •H TJ CD P ■H CVJ w H C l O <^ •H CC P e 3 H w O s w 0) VD !> o 0) a P CD cd fc bO OJ 0) o\ > o CD a p CD cd fH bO p H OJ* en v bC •H CO M U P cd c OJ 13 bO I w Aj P o > p 0) £ CD P cd bO I CO P o p 0) tu p cd bO I o > p CD a CD P cd bfl I 76 While NETTRA-E3 will obviously produce a solution as good as the best solution produced by NETTRA-E2, it is quite possible that it might produce an even better solution. Of course NETTRA-E3 can require much more computation time than NETTRA-E2 , so each program has an advantage over the other, depending on the intended application. 3.2.1 Program organization of NETTRA-E3 NETTRA-E3 needs more storage space than NETTRA-E1 or -E2 due mainly to the addition of the previously mentioned stack. The program requires 207K bytes of core storage, about 82K for the actual program instructions and about 12 5K for the stored data. The following subroutines, written in FORTRAN IV for the IBM 360/75, constitute the program NETTRA-E3: ALPATH, CALS1 , CONECT, FORC , MAIN (this differs from the MAIN in NETTRA-E1 or -E2), MINI2, 0RDRQ2, OUTPUT, POT, PROCCE (this differs from the PROCCE found in both NETTRA-E1 and -E2), RCEC, RPLCF, and SUBNET. Two system-supplied timing subroutines, STIMEZ AND KTIMEZ are also assumed to be available, but if they are not, their use can be omitted from the program, or another suitable timing routine substituted, without harming the procedure itself. Figure 3.2.1.1 illustrates the general organization of the program. In this figure, an arrow from block i to block j represents the fact that the subroutine in block i calls the subroutine in block j . In NETTRA-E3, subroutine MAIN calls the subroutine ALPATH only once. After that, it is ALPATH that controls the application of the error-compensation procedure to the networks stored in the stack. The modified version of PROCCE stores the intermediate solutions (networks) in the stack in the order 77 MAIN ALPATH PROCCE 1 1 1 4 •» POT MINI2 RCEC OUTPUT 1 * SUBNET FORC CALS1 0KDRQ2 RPLCF C0NECT Figure 3.2.1.1 General organization of the program NETTRA-E3. 78 in which it obtains them. NETTRA-E3 terminates when the stack empties. Once again, the input data setup is the same as that for NETTRA-E1 and -E2. The details can he found in Section 5. Listings of all of the subroutines used in NETTRA-E3 can he seen in the appendix. 3.2.2 Example of NETTKA-E3 As in the example for NETTRA-E2, this example also begins with the same initial network described in Figure 2.U.1 (a), (b), and (c). However, NETTRA-E3 produces a whole "tree" of 126 transformed, reduced networks (note that many of these can be and probably are identical) compared with the single "string" of three transformed, reduced networks derived by NETTRA-E2 from the same initial network. This tree is partially pictured in Figure 3.2.2.1 where the numbers represent the number of gates and connections in the corresponding network. (Each number is determined by multiplying the number of gates by 1000 and adding the number of connections. For example, 22087 represents a network of 22 gates and 87 connections.) It can be seen that seven reduced networks are obtained from the initial network alone. And from each of these "sons" of the initial network, two or more additional networks are produced, etc. It requires 117 seconds of computation time to completely generate this tree of solutions (i.e., transformed, reduced networks). Only one "path" of solutions is completely represented in Figure 3.2.2.1. It terminates with a network consisting of ten gates and 3^ connections. This is the smallest size of any of the 126 transformed networks (although It is not the only network of such size in the tree). The printout obtained from NETTRA-E3 for this network is shown in Figure 79 22087 130UU number of networks found: 126 least cost network: 1003*+ total time required: 117 sec. 12039 1003U Figure 3.2.2.1 Solution tree found by NETTRA-E3. 80 NETWORK NUMBER 32 DERIVED BY PROCCE. THE PARENT OF THIS NETWORK IS NUMBER 31 TRUTH TABLE XI =00000000000000001111111111111111 X2 = 00000000111111110000000011111111 X3 =00001111000011110000111100001111 XU =00110011001100110011001100110011 X5 = 01010101010101010101010101010101 1=10101000101010100101110011101000 2 = 11111111111111111111111111111111 3 = 11111111111111111111111111111111 k = 11111111111111111111111111111111 5 = 11111111111111111111111111111111 6 = 10001000100010000000100010001000 7 = 11111111111111111111111111111111 8 = 11111111111111111111111111111111 9=11111111111111111111111111111111 10 =01010101010101010000000000000000 11 = 11111111111111111111111111111111 12 = 00000010000000001010001000000000 13 = 10101010101010100000000000000000 lU = 01010000000000001111000000000000 15 =11001100000000001100110000000000 16 = 11000000110000001100000011000000 IT =10100000101000000000000010100000 18 = 11111111111111111111111111111111 19 =00000001000101010000001100010111 (a) Truth table for transformed, reduced network. ."■'i;-;. '%2.2.2 Printout of a transformed, reduced network obtained by NETTRA-E3. 81 GATE . . LEVEL FED BY 1 / 1/ 10 12 19 2 / 1/ 3 / 1/ k / 1/ 5 / 1/ 6 / 3/ xU X5 Ik 7 / 1/ 8 / 1/ 9 / 1/ 10 / 2/ XI 13 11 / 1/ 12 / 2/ X2 X5 6 IT 13 / 5/ XI X5 ik / U/ X2 X3 13 15 / 3/ X2 Xh 16 / 3/ X3 Xk IT / 3/ X3 X5 111 18 / 1/ 19 / 2/ 6 13 lU 15 THIS NETWORK HAS A COST OF: 10030 (b) Configuration of final network, 82 3.2.2.2. A similar printout is made for each of the 126 networks found by NETTRA-E3. This particular network is assigned the name "Network #32". It is derived from "Network #31" which is the network corresponding to the network of cost 12039 appearing in Figure 3.2.2.1. The truth table for Network #32 appears in Figure 3.2.2.2 (a), and the network's configuration description is in Figure 3.2.2.2 (b). Thus, for the particular initial network in Figure 2.U.1 (c), NETTRA-E3 is able to obtain a better solution (i.e., a solution of less cost) than that obtained by NETTRA-E2 (see Figure 3.1.2.1). 83 h. MAJOR FUNCTIONS OF SUBROUTINES Thirteen different subroutines are used in the programs described in this manual: ALPATH, CALS1, CONECT, FORC, MAIN, MINI2, 0RDRQ2, OUTPUT, POT, PROCCE, RCEC, RPLCF, and SUBNET. Complete program listings of these subroutines (a couple of subroutines have more than one listing since they appear In slightly different forms in different programs) can be found in the appendix. The main functions of these thirteen subroutines are as follows: ALPATH: This subroutine is used only in NETTRA-E3. It controls the calling of subroutine PROCCE for the various networks produced in the multi-path mode which are stored in a stack. Instead of the sequence of solutions (networks) of decreasing cost produced by NETTRA-E2, this sub- routine causes the production of a "tree" of solutions. CALS1 : Subroutine RCEC calls subroutine CALS1 in several places. When CALS1 is entered, the following sets of functions are given: (l) set S which is a set of to-be-replaced input functions of the gate under considerations, (2) set S2 which contains candidate functions for the replacement of functions In set S. CALS1, based on these two sets, calculates a subset SI of S consisting of the functions that may be replaced by functions In set S2. Since set S2 may contain mutually 84 incompatible functions, it is possible that set S2 cannot actually replace the calculated set SI. In such a case, CALS1 will be reentered from subroutine EPLCF with a new restricted S2. CONECT: This subroutine has one argument which is to specify a function in the possible output table. When this subroutine is called from RCEC, it actually constructs (make necessary connections) this function and connect it to the gate under consideration. FORC : This subroutine is called by RCEC before other error-compensation procedures are applied. It removes redundant connections among input connections of the gate under consideration. MAIM : This subroutine repeatedly reads in groups of input data which include information about the given networks, such as the number of external variables, the availability of the complements of variables as input variables, the number of output functions, the number of NOR gates, the list of connections, and the truth table of the output functions (see Section 5 for details). Using this information, MAIN constructs the incidence matrix, INC$MX, for the network. INC$MX is a two— dimensional array whose arguments represent gates or external variables An array element INC$MX(GI, GJ) 5 1 indicates a connection from GI to GJ; an array element INC$MX(GI, GJ) $ indicates the absence of a connection from GI to GJ. Next, subroutine SUBNET is called to calculate the level of each gate and to make lists of predecessors and successors (i.e., which gates precede which and which gates succeed which). MAIN then prints out 85 the truth table and the constructed incidence matrix of the original network "by calling the subroutine OUTPUT. Finally the desired transduction procedure is applied to the network by calling the subroutine(s) realizing that procedure. The transformed, reduced network is stored in INC$MX, replacing the original network. Then MAIN prints the results of the transduction procedure, i.e., the new incidence matrix and the new truth table. MINI2 : Subroutine PROCCE, when initially entered, calls MINI 2 to eliminate quickly some easily removable gates in the given network. MINI 2 is a subroutine which realizes a pruning procedure (i.e., it transforms a network strictly by removing connections), and it is described in some detail in [7]. Calling the entry point FORMGO simply forms an ordering of the gates of the network and stores it in the array GORDER for future use. A call to INITGS, another entry point of MINI 2, initializes the CSPF vectors of the gates of a network in preparation for calling RCEC to compensate for errors in that network. 0RDRQ2 : This subroutine arranges the input connections of the selected gate according to an ordering based on the number of components covering O-error-components. Two arrays are used to store two groups of input connections from gates. Group 1 contains functions which have at least one primary 1-error-component , whereas group 2 contains functions which have 1-error-components other than primary ones. Both arrays are sorted according to the number of 1-error-components in each function. OUTPUT : This subroutine may be entered at five different points by a call 86 to either OUTPUT, PAGE, LINE, TRUTH or CKT. OUTPUT assigns mnemonic names to external variables and gates for the purpose of achieving a readable printout. PAGE ejects one page on the printer. LINE skips a specified number of lines on the printout sheet. The number is specified by the argument in the call (e.g., "CALL LINE(5)" skips 5 lines). TRUTH prints, out the truth table of the network currently- stored in INC$MX. CKT prints out the network itself. POT : This is the subroutine which constructs the potential output table. The procedure and the representation of the table are discussed in great detail in Section 2.2.2. PROCCE : This subroutine directs the execution of the error— compensation procedure. It does not itself perform the detailed logic of the procedure, but it controls the sequence of calling the subroutines which do (primarily, RCEC, POT, and MINI2). RCEC : This procedure realizes the essential part of the entire error- compensation procedure. It has two returns: RETURN1 will be executed if no error-compensation can be performed, whereas RETURN2 will be executed if some error-compensations are performed. In the later case, PROCCE will compare the outputs of the new network with the specified outputs. Depending on the result of comparison, RCEC will be reentered unless a 87 network realizing the given functions has been obtained. RPLCF: This subroutine is called by RCEC immediately after it calls CALS1. From set SI calculated by subroutine CALS1 and set S2, it calculates a subset S3 of S2 which is necessary for replacing set SI. Because of the incompatibility of functions in S2, this subset may not actually exist. In this case, some incompatible functions in set S2 will be prohibited and a new set SI will be calculated by calling CALS1. RPLCF will then repeat the procedure from the beginning. SUBNET : This subroutine may be entered at any of three different points by a call to either SUBNET, UNNECE, or PVALUE. SUBNET generates detailed information on the network configuration stored in INC$MX: (l) it calculates the level of each gate in the network. Level 1 is assigned to gates having no output connections (thus all gates which have been removed from the network will be assigned level l). (2) It lists all immediate successors and immediate predecessors for each gate. (3) It calculates the successor matrix which is stored in a two- dimensional array, SUC$MX. The value of SUC$MX(GI, GJ) indi- cates the existence or non-existence of a path from gate (or external variable) GI to gate GJ. UNNECE disconnects certain types of obviously unnecessary connections in the network and updates the above information (discussed in (l), (2), and (3)). The connections removed from the given network are those existing in no paths from the external 88 variables to the output gates.. PVALUE calculates the actual truth table for the entire netvork stored in INC$MX. 89 5. INPUT DATA SETUP In order to fully understand the description of the setup of the input data cards, certain preliminary explanations are necessary. The purpose of network transductions is to reduce the cost of a network which realizes a certain function (or functions) or to alter the network in such a way as to allow another transduction to eventually accomplish such a reduction. This cost, C, is formally defined by the weighted sum of the number of gates, R, and the number of connections , I, of a particular network, i.e., C=AXR + BXI where weights A and B are arbitrary non-negative numbers. Suppose the original network which is to be transformed produces m output functions of n variables. Let Xp, I =1, ..., n, be the external variables and f , h = 1, . . . , m, be the output functions. Before a transformation can be performed on a network by a program, a description of that network must be input to the program. In the case when all of the output functions are completely specified (i.e., no "don't cares"), specifying only the interconnection pattern of the network is sufficient. But if one or more of the output functions is not completely specified, then the user must also provide the truth table (truth tables for all output functions are condensed into a single table) of the problem. Providing the truth table to the program consists of two steps, t A "connection" refers to either a connection from an external variable or an interconnection between two gates. 90 namely the specification of external variables, and the specification of output functions. The method of specifying the output functions depends directly upon the method chosen to specify the external variables. External variables may be specified in either of two ways, (a) an implicit specifi - cation of external variables , or (b) an explicit specification of external variables . (a) In the case of implicit specification of external variables, the user specifies the number n of external variables along with a parameter which indicates whether or not the uncomplemented variables are available. Reading the value n along with the parameter, the program internally generates the entries of external variables of an ordinary truth table, that is, a truth table which consists of 2 input vectors, as shown in Fig. 5.1. In this truth table, the input vectors are arranged according to the order such that an integer j expressed in a binary representation (x . ..x ) increases, where x is the most significant digit and x is the least significant digit. For example, the truth table for a function of three variables is shown in Fig. 5.2. The implicit specification of external variables is used for logical design problems in which the output functions have relatively few don't-care terms. 91 The uncomplemented variables The complemented variables The output functions r X. : V. m x 1 ' ' . x. o • • -0 X l ' X J -0 x . . n . x J n *•• ■i m . f : m 2 n -1 x 2 n -l 2 n -l -\ -2 D -1 X l J ,2 n -l f 2 n -l m These entries exist only in the case of logical design problems where the complemented variables are available as external inputs. Fi g» 5.1 The truth table of output functions of n variables x l 1 1 1 1 X 2 1 1 1 1 X 3 1 1 1 1 x l 1 1 1 1 o" X 2 1 1 1 1 X 3 1 1 1 1 °> f l f° ± • 'I These entries exist only in the case of logical design problems where complemented variables are available as input variables. Fig. 3*2 The truth table of a function of three variables. 92 (b) In the case of explicit specification of external vari- ables , the user specifies the entries of external variables of the truth table using additional cards called < external -vari- able-card > s. The explicit specification of external variables is used in the case of logical design problems where output functions have many don't-care terms. Suppose that the output functions are defined for a subset of input vectors of the entire truth table of Fig. 5.1. Let x , j = j , j , ..., j denote these input vectors. The user can 'condense' the truth table of Fig. 5.1 into another table shown in Fig. 5.3. only n input vectors The uncomplemented variables The complemented variables r ^ f\ x i j 2 X l ' * • 1 • • ( • • • • X I n h X n X n ■ ^ n c — x l x i J 2 x^ . • • • • • X L n X n J 2 n -Jll . X * n f i J 2 f > j , for which the output functions are defined. 93 Using < external-variable-card > s, the user can set up internally the table of Fig. 5.3 in place of Fig. 5.1. 5.1 Input Data Card Format For each separate problem, a set of input data cards must be t submitted which consists of the following : (i) < heading -card > (ii) < problem- parameter -card > (iii) < external-variable-card > s > omitted for (iv) < output -function-card > s j certain cases (v) < connection-description-card > s Both (i) and (ii) will always consist of only a single card, but (iii), (iv), and (v) may each consist of several cards. Furthermore, types (iii) and (iv) are omitted if all output functions are completely specified, and (iii) need only be prepared in the case of the explicit specification of external variables for the truth table „ Following is a description of the formats for each type of input card, (i), (ii), (iii), (iv) and (v): (i) < Heading-card > This is the first card of the input deck for a problem. This card may contain any alphanumeric information, in columns 1~80, which may be used for the identification of the problem, but none of the information on this card will be used in the actual computation, This information will be printed on the first page of the output. t The current implementations of the NETTRA programs accept only heading, problem-parameter, and connection-description cards. Eventually it is hoped that these programs will be modified to accept all of the options described in this section. 9h (ii) < Problem-parameter-card > This card specifies the nature of the problem the user wants to solve. There are 7 fields in which to specify the parameters with characters and numerals „ These fields are as follows: Cols. l~k: An integer, N, which is right- justified. This number, N, represents the number of external variables, n, of the output functions. Be sure to punch n (rather than 2n) for N in the case of both complemented and uncomplemented variables available . Cols. 5~8: An integer, M, which is right-justified. This number, M, is the number of output functions, m, to be realized simultaneously. Therefore, of course, M will also be the number of output gates in the network. Cols. 9~12 ; An integer, R, which is right-justified. This number, R, specifies the number of gates which are included in the network. For various reasons, the user may wish to input networks in which one or more of the gates are "isolated" (i.e., are not connected to any other gates). This is permissible as long as these "isolated" gates are also included in the total number of gates, R. ColSo 13~l6: An integer, A , which is right-justified. The number A is the value of the non-negative weight for the number of gates in the cost function. (See Table 5.1.1? 'Typical combinations of values A and B for different network reduction problems ' . ) 95 Cols. 17~20: An integer, B , which is right-justified. The number B is the value of the non-negative weight for the number of connections in the cost function. (See Table 5.1.1. ) Col. 2k: A blank 'b' + , or one of the characters, /C, 'X', 'Y', •IT or 'V. The 'b' or ' C parameter represents an implicit specification of both the external variables and an implicit specification of the output functions (in this case, the output functions will be calculated from the connection pattern of the network). The 'X' or -Y 1 parameter indicates an implicit specification of external variables only . The 'U' or 'V parameter indicates an explicit specification of external variables . (See summary of these symbols in Table 5.1.2) The 'b' or 'X' parameter specifies that only uncomplemented external variables are available for the network. The ' C or 'Y' parameter specifies that both uncomplemented and complemented vari- ables are available for the network. If the user specifies the 'b', 'X', 'C, or 'Y' parameter, the program sets up the truth table by generating a set of 2 input vectors (x , ..., x ), for j = 0, ..., 2 -1, in the case of a 'b ' or 'X' parameter, or (x^ , ..., x , xr, ..., x ) for j = 0, ..., 2 -1, in the case of a ' C or 'Y' parameter. The 'b' or ' C parameters should be used for problems in which the output functions contain no don't-care terms. For such problems, the preparation of the < external-variable-card > s and the < output- function-card > s can be dispensed with since the program can calcu- late completely all output functions using only a description of the t A 'b' stands for a blank (i.e., no character punched). 96 Network Reduction Problem Values of A and B reducing the number of gates only. A = 1 and B = reducing the number of gates primarily, then reducing the number of connections secondarily. A = 100 and B = 1 reducing the number of connections only. A = and B = 1 reducing the number of connections primarily, then reducing the number of gates secondarily. A = 1 and B = 100 reducing the sum of the number of gates and the number of connections. A = B = 1 Table 5.1.1 Typical combinations of values A and B for different network reduction problems. Most of the programs in the NETTRA system are oriented toward this reduction problem, so the user will probably find this combination of A and B the most useful. 97 ■uncomplemented variables only available both complemented and uncomplemented variables available »b f 'C •X' • yi •IT •V implicit specification of external variables and output functions implicit specification of external variables explicit specification of external variables Table 5.1.2 Possible symbols for column 2k of < problem-parameter-card >. 98 connection pattern of the network (provided by the s ) „ Similarly, the 'X' or 'Y' parameter implies the use of a complete truth table (i.e., 2 input vectors for n external variables) inside the program. Since from this information the program can easily generate the truth table entries for the external variables, as just mentioned, the < external-variable-card > s are unnecessary. The m < output -function -card > s, however, must still be prepared. The 'U' parameter specifies that only uncomplemented external variables are available for the network. The 'V parameter specifies that both uncomplemented and complemented variables are available for the network. In either case, the 'U' or the 'V parameter, the user must prepare n < external-variable-card > s and m < output- function-card > s. The program sets up the truth table by reading these < external-variable-card > s and < output -function-card > s. Cols. 25~28: An integer, NEPMAX, which is right-justified. This parameter is omitted for all NETTRA programs except those involving "error -compensation" routines. In the cases where NEPMAX is required, a further discussion of this parameter can be found elsewhere in the manual. The abbreviation NEPMAX is a mnemonic for "maximum number of error positions", and the default is NEPMAX =2 , where n is the number of external variables. (iii) < External-variable-card > s In combination with the 'U' or 'V parameter in column 2h of the < problem-parameter-card >, the n < external -variable-card > s specify the entries of external variables of the truth table of 99 Fig. 5.3. Each card contains the binary representation of external variable x«, i.e., (x, , x^ 2 , .„., x,^ ), starting from column 1 of the card. The maximum number of bits in a binary representation is limited to 32. (This means the maximum number of input vectors is 32.) If the actual number of bits is less than 32, then a termination symbol '/' (slash) is put on the right of the right-most bit of the binary representation on the first < external- variable- card >. The remaining columns after the termination symbol '/' in the first card, as well as the same columns in the following cards, may contain any alphanumeric information which may be used for identification. This information will not be printed on the output pages . In the case of the 'V parameter, the program generates the binary representations corresponding to complemented variables by taking negations of the entries of the < external-variable-card > s. Therefore the user must not provide < external -variable-card > s representing the complemented variables, x«. If one of the parameters 'b', 'C, 'X', or 'Y' appears in column 2k of the < problem-parameter -card >, the user does not prepare < external- variable-card > s. (iv) < Output-function-card > s The m < output -function-card > s specify the set of m output functions to be realized simultaneously. Each card contains the binary representation of one output function f , starting from column 1 of the card. A symbol * ** is used to denote don't-care terms, if any. The maximum number of bits in a binary representation is limited to 32. 100 The actual number of bits must be 2 in the case of an implicit specification of external variables, or must be the same as defined by the < external-variable-card > s in the case of an explicit specification of external variables. The remaining columns, up to column 72 (inclusive), may contain any alphanumeric information which may be used for identification. This information will not be printed on the output pages. If either the 'b' or 'C parameter appears in column 2k of the < problem-parameter-card >, the < output-function-card > s must be omitted . (v). < Connection-description-card > s In the present version of the program, 9 cards (some of which 4- may be just blank cards) are required. Each of these cards is divided into l6 fields of 5 columns each (i.e., columns 1~5, 6~10, 11~15, ..., 71~75, 76~80). Beginning with the first field of the first card, continuing through the succeeding fields of that card and through the fields of as many additional cards as necessary (up to a maximum of 9, total), the expressions (explained in the next paragraph) C , CL, C , ..., are punched right- justified in their respective fields. Each gate of the network is labeled uniquely by assigning it one of the integers 1, 2, ..., R, such that the output gates receive t For many uses, the user will probably find that these 9 cards far exceed his needs, and may thus be inconvenient. In such a case, the number of required cards may be easily adjusted by making the obvious changes in two statements (A READ statement and a DO statement) following the comment card "C**** READ IN NETWORK INFORMATION AND SET UP INC$MX *****" in subroutine MAIN. 101 the labels 1, 2, ..., m. The names XI, X2, ..., Xn are assigned to the external variables x , x , ..., x (and the names Yl, Y2, ..., Yn to the complemented external variables x , x , ..., x , if appropriate). Now, for each connection of the network (i.e., including both the connections from external variables to gates and connections from gates to other gates), a k character expression, C, is formed, to represent that connection as follows: to represent a connection from gate GI to gate GJ, the numeric label GI is inserted into the first two character positions of C. and the numeric label GJ is inserted into the second two positions (e.g., the C. for a connection from gate 9 to gate 5 would be "0905" )j "to represent a connection from external variable XI to gate GJ, the alphanumeric label XI is inserted into the first two character positions of C. and the numeric label GJ into the second two positions (e.g., the C. for a connection from external variable x to gate 10 would be "X310"). Every connection of the network must be represented by a C , although there are no restrictions on the order in which the connec- tions (i.e., C.'s) are punched onto the input cards. t At the time of writing, the programs have not yet been changed to recognize this new labeling system. The old labels are simply: 1, 2, o.., n, for external variables x , x 2? ..., x^ (and n + 1, n + 2, ..., 2n for the complemented variables x , x^, . .., x , if they are permitted in the problem); n + 1, n + 2, „.., n + m for the m output gates of the network (2n + l, 2n + 2, ..., 2n + m if complemented variables are included); and finally n + m+1, n + m + 2, ..„, n + R (2n + m+l, 2n + m+2, ..., 2n + R) for the non-output gates of the network. j/j;- These five groups of cards, (i), (ii), (iii), (iv) and (v) in the correct order constitute the necessary description for a single problem. In order to solve several problems during the same computer run, the descriptions for the desired problems are just arranged serially. See Fig. 5«1«1 for an example of the sequencing of all cards for the execution of a NETTRA program using typical JCL statements for the IBM 360/75. The Program r 103 //ID ... // EXEC FORT //FORT. SYS IN DD* FORTRAN PROGRAM SUBROUTINES /* // EXEC LKED // EXEC GO //GO.SYSIN DD * The Input Data Cards V. \ < heading -card > \ < problem-parameter -card > f < external-variables -card > s r I : output -function -card > s < connection-description-card > s f< heading -card > E r< heading -card > i"7 E CH The first problem J The second problem -N The last problem J "Fig . 3.1.1 Input card sequence for the execution of a typical NETTRA program, 10^ 5.2 Restrictions on Problem Size In order to fit the programs into a finite amount of space, some restrictions on the size of an acceptable problem are required: 1. The number t of input vectors in the truth table is 32 or less. 2. The number n of external variables. Because of t < 32, n is 5 or less in the case of completely specified functions. In the case of incompletely specified functions, however, any n < 20 is acceptable if only uncomplemented variables are avail- able, or n < 10 if both uncomplemented and complemented variables are available, provided that the truth table is defined by the < external-variable-card > s. 3. The number R of gates. The number of gates, R, may not exceed UO-n in the case of only uncomplemented variables available (a 'b ' , 'X', or 'U' parameter). In the case of both uncomplemented and complemented variables available (a 'C, 'Y' or 'V parameter), the limit is lowered to ^0-2n. All of these limitations are essentially imposed by the array sizes in the programs as presently written. To loosen the restrictions is mainly a task of increasing array dimensions appropriately. ^.3 Examples of Input Data Setup The following examples will illustrate, for the general program in the NETTRA system, various possible input data card setups complying with the directions given in Section 5*1. 105 Example 1 : A two output network of four variables shown in Fig. 5.3.1. Assume the two output functions are f = CCEF and f = 3BBB and only uncomplemented variables are available. Furthermore, assume it is desired to reduce the number of gates primarily and the number of connections secondarily (see Table 5.1.1). From this description, the < problem-parameter-card > must contain the following values : Cols. 1 ~ U h, the number of external variables Cols. 5~8 2, the number of output functions Cols. 9~12 8, the number of gates in the original network Cols. 13~l6 100, the value of A Cols. 17-20 1, the value of B Cols. 2k 'b ' , uncomplemented variables only available and implicit specification of both the external variables and the output functions Cols. 25~28 'b', since the NEPMAX parameter is unrelated to the program to be used Fig. 5.3.2 shows the setup of data cards used to specify the network in Fig. 5.3.1 as input for the program. Notice that in forming the C. , the four uncomplemented variables are represented by the labels XI, X2 S X3, Xk; the two output gates by the numbers 1, 2; and the remain- ing gates, by the numbers 3 5 k, 5? 6, 7? 8. This manner of labeling is t For convenience, the output functions are expressed in hexadecimal notation. When the numbers in this notation are expanded into binary, they represent the output vectors as they appear (i.e., in the same left-to-right order) in the complete truth table described earlier and pictured in Fig. 5.1. ++ This assumption is implicit in most of the transduction procedures and their implementations which comprise the NETTRA system. 106 x, Fig. 5.3.1 Network to be transformed in Examples 1 and 2, 107 oo o CM PP X PQ PQ OO oo o i H X O X t- O CO vO o CO X LT\ O CO II ! o H EH O i CM i l O O • • X 1 • • II • • ir\ l J- _=f o S .3- oo r~- o J- OJ H -=t H R -O- O J- O oo o\ o [2] enco l>- 5 en t~ Eh en\o i en lt\ -Hr R nj- o CO en en CM H en cm X i en H i en O -=f- I CM G\ o W CM CO VO PI CM t>- O CM VO s CM UA en EH CM -3" O W CM CO VO s CM CM 1 CM H H CM O H OA oo H hP O I pn H 00 H I 2 H t- X I i— i H VO O § H ir\ CM o H J- O H > H on LT\ | i H CM CO -3- H H i i O On H i *N O i EH O CO -=}■ CM P O t- 1 Ph O VO 1 Eh O LT\ H 1 P o j- O -=h O O en OO 1 i O CM 1 CM O H « • • 1 1 \ ^ ^ ^\ o H o o I I g g o o ■H -H M P -P G O Ph d (D'H ra H G ^ -d & a o g O ra ni 00 O (U O -d G rd G ■H aJ -d -P o G CJ i i o5 a) G S o a O 0) 1 a ■H H G P ,q 0) o Ph O -P •H G CD p G Ph §j m a CD H CO G tt) Ctf -d Ph d g ctS o I bD G •H CD cu ,G H a; P. G •H G > •H bD H ■§ G Ph CD P •H O s (see Section 5.1). The heading card in Fig. 5.3.2 will simply be read by the program and printed character for character onto the output page as an identifica- tion of the particular problem. Below that, the number of variables, number of functions, and the cost coefficients, A and B, will be printed (all with appropriate labels). Also, immediately following will be a statement of what types of external variables are permitted (i.e., either just uncomplemented variables or both complemented and uncomplemented) along with their generic names: X - for uncomplemented variables "^ . f external variables - , , , . , , / were implicitly specified Y - for complemented variables or U - for uncomplemented variables V - for complemented variables if external variables were explicitly specified For example, if both X and Y appear as generic names (as would occur in the case of an implicit specification of external variables with both complemented and uncomplemented variables available) then the external variable names which appear on subsequent output pages will be XI, X2, . . . , Xn and Yl, Y2, . . . , Yn. Or, if both U and V appear as generic names (as would occur in the case of an explicit specification of external variables with both complemented and uncomplemented variables available) the external variable names which appear in the output will be Ul, U2, ..., Un (for the uncomplemented variables) and VI, V2, ..., Vn (for the complemented variables). It should be noted, however, that the letters U and V, as used as replacements for X and Y (respectively) in the 109 naming of external variables (e.g. Ul, VI instead of XI, Yl), appear strictly on the output pages of the program - they are not used internally in the program and they must not appear in the variable names punched on the < connection-description-card > s by the user. They are intended only as an aid to the user so that, at a glance at the transformed network in the output, he can easily distinguish whether the external variables were implicitly or explicitly specified for that particular problem. Following the statement of whether only uncomplemented or both complemented and uncomplemented external variables are employed, the user will find next on the output page the cost of the original network which was input to the program. This is the cost which was defined in the beginning of Section 5. The cost will be followed by a truth table (generally in the same form as Fig. 5.1) showing the outputs (0 or l) of all of the gates in the network for every external variable input combination (i.e., combina- tions of 0's and l's) of interest. Finally, below the truth table will be printed a description of the network submitted as input. This is for documentation purposes, and it is also much more readable than the network description which appeared on the < connection-description-card > s. In this description, each gate is listed along with the names of the gates and external variables which feed ito Also, to assist the user in sketching the network from its description, the level of each gate in the network is included (gates which do not feed other gates are assigned to level 1, all other gates are assigned level numbers such that each gate is in a level one Y.l'j higher than the highest level gate directly fed by it). All of the information just described will be printed before the execution of the transduction actually begins. This will be followed, begin- ning at the top of a new output page, by the network(s) actually obtained as a result of the computation. First the complete truth table of the transformed network will be printed, followed by a network con- nection description of the form just described above. Finally, the cost of the new network will be calculated and printed. In this example, it was assumed that there were no "don't-cares" in the output functions implicitly specified by the input, thus no < external-variable-card > s or < output -function -card > s were included. In the next example, however, < output-function-card > s will be required in order to specify some of the components of the output functions as "don't-cares". Example 2 : The two output network of four variables shown in Fig. 5.3.1. This is the same network used in Example 1, but this time the output functions are not assumed to be completely specified. Let f = ' 11001*-*01*10*111 * and f _ = ' 0**1101H*111011 ' be the required functions. Also, suppose that both complemented and uncomplemented variables are desired to be available during the transduction. Again the problem is to reduce the number of gates primarily and the number of connections secondarily. For this problem, the following values must appear on the < problem-parameter-card >: Cols. 1~^4 k, the number of external variables Cols. 5~8 2, the number of output functions Ill Cols. 9~12 8 ? the number of gates in the original network Cols. 13~l6 100, the value of A Cols. 17~20 1, the value of B Col. 2k Y, indicative of an implicit specification of external variables and the availability of both complemented and uncomplemented variables Fig. 5.3.3 shows the setup of the data cards corresponding to this problem. Notice the differences and similarities to the data cards shown in Fig. 5.3.2. The < problem-parameter-card > differs only in column 2k. The < external-variable-card > s are missing in both Fig. 5 .3.2 and Fig. 5.3.3 since the external variables are implicitly specified for both problems. The < output- function-card > s, however, appear in Fig. 5o3«3 but not in 5.3.2 since they are necessary to specify "don't- care" components which do not occur in the completely specified output functions of Example 1. In both cases, though, the < connection-description- card > s are identical since the original networks are identical,, By allowing "don't-care" terms in the output functions, and by t allowing the use of both complemented and uncomplemented variables (even though the original network employed only uncomplemented variables), the restrictions during the transduction process are loosened (compared to what they were for Example l), perhaps permitting a network of t In the case of NETTRA-PG1, -PI, and -P2, it is useless to specify Y rather than X in column 2k for this example. Since the original network uses only uncomplemented variables, to these programs which perform "pruning" procedures (i.e., procedures which are incapable of adding new connections) the availability of complemented variable is not meaningful. 112 oo o H H H O O CT\ O 00 O C-- O v£> O Lf\ O J- O en O OJ O H 00 o 0J x , H oo H o O H H *l H H tr- * o H 3 o t- H o H °°l i O VO II o & X J 1 H o H oo OJ H H x l 1 i * O in EH EH H o <; H ft ^1 1 ft ft 1 1 H 1 oo H i-q o 1 pQ H 1 3 *l H H 1 O B OJ H H O 3 o o H H >, LT\ H * i i H o 00 -at-, H H 1 1 H * * 1 *\ O H H I EH -=J- H H O O * * OJ 1 1 s Eh H H H 1 !=) O H o -=t- O, OO $ o 1 1 H 1 CM. l • • • o H 1 1 J*i I G O d >H H -P OO Ih oJ o i G H O -P (D ft G -H G \ \ \ \ d Ih o g o ■H (1) g o •H ■p o <\> a a -p o ft O -H -P O w w H 0) d d i o -p i 3 g ft o -P -H 3 -P O O G d P G «H OJ d !h d o •p i 2 g ft o -P -H pi -P O O g -p p W ft d i m S ctf (D CJ H I ,£> !h O (U ^H -P ft 0) E ft d !h Ki O I M G •H d ■d OJ H ft G •H G > •H to 0) H ,Q O ft QJ -P £ •H O (U ft w O -p d In d a ctf •p d O ft ■P CD w 0) H fit •H ra M O ft en oo LT\ bO •H ft 113 less cost to be obtained. Notice that the first < output-function-card > corresponds to the output of gate 1 and the second < output -function -card > corresponds to the output of gate 2. This must hold true for every problem in which < output-function-card > s are included; the gates labeled 1, 2, . . „ , m must correspond to the output functions specified on < output-function- card > s 1, 2, ..., m, respectively. Of course, the printed output of the program will be in the same format described in Example 1. Example 3 : The three output network of six variables shown in Fig. 5.3.^-. The outputs are again assumed to be incompletely specified. In fact, only the following 11 input combinations are specified out 6 of a possible 6k ( = 2 ): x l 00000000001 X 2 00000001110 x 3 00000000011 x h 00001110001 X 5 00110010110 x 6 01010101100 F l 001100*0000 F 2 11*1110110* F 3 11000001000 Hh £ OO (U H Ph & a ■H o w § -P O -P M o ITS •H En 115 Additionally, only uncomplemented variables are assumed to be available, and the problem is to reduce the number of gates primarily and the number of connections secondarily. For this example, the following parameters appear on the < problem-parameter-card >: Cols. l~k 6, the number of external variables Cols. 5 ~ 8 3 ■> the number of output functions Cols. 9 ~ 12 11, the number of gates in the original network Cols. 13~l6 100, the value of A Cols. 17~20 1, the value of B Col. 2k U, indicative of an explicit specification of external variables and the availability of only uncomplemented variables Fig. 5-3-5 shows a possible setup of the data cards corresponding to this example. Notice that in this example, the s are included, whereas in the two previous examples they were omitted. Although this problem is not too realistic (none of the 3 functions is actually a 6-variable function), it demonstrates the input data preparation to be used in cases where many external variables are present and a high percentage of "don't care" terms exist. Again, the printed output from the program will follow the same format described in Example 1. 116 VO O H H 8 O H LTN o o H a o LT\ CO X H J- H o 8, ON H -=1- H o H LT\ x X o ro H O -=f t- X o co H o co VO X o on H o ^, UA ON co o o VO LT\ X X co CM H VO LT\ -3- co H ti o\ CM Pq pq Pq X X X X o O 1 1 w co fr- 1 1 3 X S & s w W H H w w o o O O H i-q t-1 ►h 3 i-q ON CM H H H pq pn pq fi o O EH EH EH 2 2 2 W H , VO P O O i— i I— 1 l—l 1— i I— 1 i—l 1 S p § p g 1 > > > i> > H i-q 1 i 9 X 1 f_ ) CO H o o 1 o O H i3 _d/ LT\ I X s. H VO o O o 1 o o H H o' H H i tr- H o o o 3 O H H O I «N Q O o 3 o H O O H O l f-\ OA -3- H o H o O O H o co P O o o O H H O O o i Ph O H H O H O O o i t- H O r-i o O O H o O o i £3 O O O H 3 H H O o O o vo o \Q 8 O * O H O o O o i 1 X Pi H o H O o o O o i CO • • • ' i H o O O o o o o i 1 £ H O O V_ i ft •H i 1 £h a c o o 03 •H •H o o i a; -p cy Jh d ctf m ft a? I o •H H o ft 0) ^5 -p ^ •H o ft w o -p w -d a o -p Cm o ft p -p 0) co CD H ^3 •H CO CO CO LTN O M ft -d s O I hO bD -H •H •d cd (U £1 117 REFERENCES [l] J. N. Culliney, "Program manual: NOE 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-75-698, Dept. of Comp. Sci., Univ. of 111., Urbana, 111., Feb., 1975- [ 2] J. N. Culliney, H. C. Lai, and 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 -^-7^-690, Dept. of Comp. Sci., Univ. of 111., Urbana, 111., Nov. 19lh. [ 3] Y. Kambayashi and J. N. Culliney, "NOR network transduction procedures based on connectable and dis connectable conditions (Principles of NOR network transduction programs NETTRA-G1 and NETTRA-G2) ," to appear as a report, Dept. of Comp. Sci., Univ. of 111., Urbana, 111. [ k] 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 Comp. Sci., Univ. of 111., Urbana, 111. [ 5] Y. Kambayashi, H. C. Lai, J. N. Culliney, and S. Muroga, "NOR network transduction based on error-compensation (Principles of NOR network transduction programs NETTRA-E1, NETTRA-E2, and NETTRA-E3) ," Report No. UTUCDCS-R-75-737, Dept. of Comp. Sci., Univ. of 111., Urbana, 111. , June 1975. [ 6] 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. UTUCDCS-R-75-71^, Dept. of Comp. Sci., Univ. of 111., Urbana, 111., April 1975. [ 7] 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-7^-686, Dept. of Comp. Sci., Univ. of 111., Urbana, 111., Nov. 191k. [ 8] H. C. Lai and Y. Kambayashi, "NOR network transduction by generalized gate merging and substitution (Principles of NOR network transduction programs NETTRA-G3 and NETTRA-GU) ," Report No. UIUCDCS-R-75-728, Dept. of Comp. Sci., Univ. of 111., Urbana, 111., June, 1975. L18 APPENDIX : Program Listings Following are the listings of the FORTRAN programs NETTRA-E1 , NETTRA-E2, and NETTRA-E3. These programs realize, respectively, the transduction procedures discussed in Section 2, Section 3.1, and Section 3.2, Since NETTRA-E2 and NETTRA-E3 only differ in a few subroutines from NETTRA-E1, only these subroutines are listed for NETTRA-E2 and -E3: MAIN (differs slightly in each of the three programs), ALPATH (used only in NETTRA-E3, and PROCCE (slightly different for NETTRA-E3). Explanations of variables used in the programs can be found in the listings themselves. pppp RRRC (IT i i r,GG PRPR A M M P R R P G R R A A MM MM p p R R n G R R A A M M M M pppp RRRR o G GG RRRR AAAAA M M M p R R -> G G P R A A M M p R R oor GGG R R A A M M ************* ***«**^********#*********«******#***»**«***«** ************* ******* * * * * * * * * * * * * - * c * c r - M m EEEEE T TTTT TTTTT RRRR A r NN N p T T R P A A r N N N F T T R R A A - N NN FFE T ■ RRRR AAAAA c N N E T T R R A A p N N EEEEE T T R R A A xxxxx EEEEE E E EEE E EEEEE 1 11 1 1 I 111 SU*P0U T INE MAIN El EDITION) B8RBBBBB3 8PBBBBBBPPBBBBBBBBBBBBBBBB8BBBBBBBBBBBBBB8BBBBB8BE1 El NOT BE USED IN THIS PROGRAM. NOTE: ALL COMMON varibles might COMMON SGT: $LTH: $N0E: $PW: A: B: TOST: ESSIS: VARIABLES: POINTS TO A IN THIS COL. POINTS to A IN THIS COL. POINTS TO A IN THIS COL. ROW IS USED. POINTS TO A IN THIS COLUMN WEIGHT FOR NO. WEIGHT FOR NO. FSUBl: FS1: SI: GLEVEL: G SMALL: HLIST: TDXO: IDXOE: IDX1: IDxlE: •rCLJMM' OF POTAB. FOR EACH 'ROW* THE ENTRY TELLS GATE WHERE FN. IS REALIZED. •COLUMN* OF POTAB. FOR EACH •ROW 1 THE ENTRY TELLS HOW MANY CONNECTIONS MUST BE ADDED. •COLUMN' OF POTAB. FOR EACH 'ROW 1 THE ENTRY TELLS THE NUM3EP OF i-ERRQRS CREATED IF THIS •COLUMN 1 THE ENTRY OF POTAB. FOR EACH 'ROW' TELLS THE PREFERENCE WEIGHT. OF GATES IN COMPUTING COST FUNCTION. OF CONNECTIONS IN COMPUTING COST FUNCTION. COST OF NETWORK - A MEASURE OF NETWORK SIZE. RECORDS NO. OF ESSENTIAL l'S IN EVERY INPUT TO CURRENT El El El El El El El El El El El El El El El GCOE1 (POSITIONS IN ESSIS CORRES. TO GATES NOT FEEDING GCO ARE El IGNORED). El POINTS TO LAST ELEMENT IN F$l. El LISTS (CONSFCUTIVFLY) POSITIONS OF DESIRABLE 1«S (FOR El COVERING) IN A CONNECTIBLE FUNCTION. El LABEL OF A PARTICULAR GATE. El GLEVEL(GI) TELLS WHICH LEVEL OF THE NETWORK GI IS IN. El STORES INTERMEDIATE AND FINAL CALCULATED CSPF'S, El HLIST(I»J) GIVES NAME OF I-TH GATE (OR EX. VAR.) IN NET- El WORK LEVEL J. El LIST OF O-COORDINATES IN CSPFE OF THE GATE UNDER El CONSIDERATION. El LIST OF O-ERROR-CnORDINATES IN CSPFE OF THE GATE UNDER El CONSIDERATION. El LIST OF l-COORDIN&TES IN CSPFE OF THE GATE UNDER El CONSIDERATION. El LIST OF 1-ERROP-COORDINATES IN CSPFE OF THE GATE JNDEP El OOOIO 00020 00030 000*0 00050 00060 000 70 000 80 00090 00100 00110 00120 00130 00140 00150 00160 00170 00180 00190 00200 00210 00220 00230 00240 002 50 00260 002 70 00280 00290 00300 00310 00320 00330 00340 00350 00360 t PI AS: T\r $mx: T \| P T - v • I Pf th : T PPEO: T^UCC; JFLAG: 0 ME»NS THERE EXIS T S A ("ONYFCTICN FROM GATE El (PR FX. VAP.) G! TO GATE GJ . I NC $MX ( G I, GJ ) = if NOT. El LISTS Fnp FACH CORRESPONDING ENTPY OF F$l , HOW MANY INPUTSE1 HAVF * »1« TN TM= POSITION INDICATED RY F$l. El IPATH(G!)=1 MFAMS GATE GI IS ON A PATH FROM A CERTAIN GATEE1 T,i AM OUTPUT r,fTE. OTHERWISE IPA T H(GI) = 0. IP"ED(I t GJ) GIVFS T HE M AM E OF THE I-TH GATE OR A LTS T OF GATFS AND EX. VAR. FEEDING GJ. EX. VAP. T HE NAME OF THE I-TH SUBROUTINE PROCII. IF ANY ERROR COMPENSATION nur.r 1 1 , nj i gtvfs SAMF AS JAYFLG IN 6 FLAG INDICATING pF" £-} DM PP . A FLAG INDICATING RFEN CfMPENSATFD. SAME *.S KEIFLG TN PR SCI I. wijMRFP. "F LEVELS TM THE NETWORK (NOTE ASSIGNED LTVFI.S JUST LIKE 3ATES). LGLIST(J) T FLLS NO. OF GATFS AND EX. VA» . NETWORK. MijMRFB pF PPFDE r ESS r iRS FOR THE GATE UNDER GATE FED BY GJ. HAS BEEN IF ANY P D IMAPY 0-ER»OR-CnORD INATE S HAS EX. VAR. ARE ALSO IN LEVEL J OF CONSIDERATION. El IME1 El El El El El El El El Fl El El El El LIPREO(GI) TF|_ L c mo. PF IMMEDIATE PREDECESSORS OF GATE GI.E1 ^ROERED LIST pf :rNN c :TI8LE INPUTS TC GCC. ORDERED BY DFf'FASING NO. OF O'S IN GCC COVERED. PRDEPFD LI^T PF GATES AND EX. VAP. WHICH """MGINALLY FED G~3 AND WHICH M«VE NOT YET BEEN DISCONNECTED. ORDERED BY DECREASING NO. OF ESSENTIAL l'S. IISUT(GI) TELL* NO. OF IMMEDIATE SUCCESSORS OF GATE (OR EX. VAR. J SI. IJPPEP LTMTT PF THc DUMBER OF ELEMENTS IN SET S2. FP5 GATE 0*, LP nT AB(GI) POINTS Tp L AST RCW OF POTAB CONCERN ING GT . ►jijmbep OF ME T WOPK TJTPJT GATES. NUMBER OF FXTEPNAL VARIABLES (PR INPUT FNC.) AVAILABLE. FTR foppr rp\iPENS" T ION PR33RAMS. IF MORE THAN NEP*AX roopR POSITIONS nrc.JP WHEN A PARTICULAR GATE IS REMOVED, PR03RAM SKIPS A TT EMPT TP COMPENSATE FOR THAT OATE'S FFyp\/AL. VALUE CN BE SPECIFIED BY TP ONE HALF np N? RY DEFAULT. SUM PF N PLUS M USE 5 *, OTHERWISE EQUAL SUM OF NM PLUS 1 . PRODUCT OF N AND M2. NUMBE OF FLEMFNTS IN ELEMENTS IN FL"MFN T S IN OF CF NUMB to NUMBER RPLTF. NU M BEP NUM3ER NJMBEP PPLCF. NUMBER NUMBER NJMREP NJMPE SUM OF PR3DUC T n F NRPLC(I) S OF OF OF OF OF OF PF N ELEMENTS ELEMENTS FLEME" T S IN TN IN SET SET SET SET SET SET S. SI. SI BEFPRE S2. Tl. Tl BEFORE ENTERING SUBROUTINE ELEMENTS ELEMENTS ELEMENTS ELEMENTS ACTTVF AOMVE ACTIVE ACTIVE PLUS P. NP AND N2. QOES TMF NUMBER ENTERING SUBROUTINE IN ARRAY IDXO. IN ARPAY IDXCE. IN ARRAY IDX1. IN ARRAY IDX1E. CF ELEMENTS IN PPLCU,*) FOP 1=1,2. SUM OF NUMBEP N PLUS 1 . OF niFFER c Nr INPUT COMBINATIONS TD BE CONSIDERED El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El 003 70 00360 00390 00400 00410 00420 00430 00440 00 4 5C 00460 00470 00480 00490 00500 00510 00520 00530 00540 00550 005 6C 00570 00580 005 9C 00600 00610 00620 00630 00640 006 50 00660 00670 00680 00690 00700 00710 00720 00730 00740 00750 00760 00770 007 80 00790 00800 00810 00820 0083C 00840 00850 00860 00870 00880 00890 00900 00910 00920 00930 0094C 00950 00960 00970 r C r C P c r c c r c c r c c c c c c r c c c c c c c c c c r »-• c c r c c c c c c c PPIGTN: PC?: P"TNTA POT NTC P°INTL POINTR PP? T &B R PPLC ^ SCHNJnJ : RTrr-NN: s SFTS SFTSU SETS2: SFTTl STSi su:$mx: SUMP: SUMS2: T: TIME: JNAMEi VFSU*1: VF$l: (USUALLY 2 TO THE POWER N). ORIOIN(GI)=1 MEANS GI ORIGINALLY OQI5INMGI )=0 MEANS GI p$(i,-j consecutivfly EVERY GATE (FOR EVERY P$(1,N2) FOR FIRST FX VAP; P* ( 1 ,N2+1 ),..., P$( 1 , 2*N2 ) SECOND EX VAR; ... ; P$( 1, N*N2+ 1) ,. . . , P$ ( 1 , N*N2«-N2 ) FIRST GATE; FT. P$(2,-) IS USED AS WORK SPACE FOR calculations ASSOCIATED WITH P$(l,-). F n R ERROR COMPENSATION PROCEDURES. PCO REMOVED FROM OPIGINAL NETWORK TO OBTAIN NETWORK. NOT USED. POINTS TO &OINTS TO POINTS TO PO T EN T IAL CONNECTED TO GCO. DID NOT FEED GCO ORIGINALLY. LISTS OUTPUTS CF EVERY EX. VAR. AND INPUT COMBINATION): P$(l,l),..., FOR FOR IS THE GATE CURRENT ALTERED LAST ELEMENT LAST FLFMENT LAST ELEMENT OUTPUT TABLE. IN LISTP. IN LISTL. IN RNEC1 (IN SUBROUTINE SUBSTI) HOLDS INFORMATION ABOUT ALL OF NOTE SOME RPLCd,*) PPLC(2,*) El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El fOMRINAMCNS OF CONNECTIONS TO FORM NEW (AND HOPEFULLY USEFUL) FUNCTIONS. FOR GATE GI, PPPTAB(GI) POINTS TO FIRST OF A SEQUENCE ROWS OF POTAB CONCERNING GI. NUMBER OF GATES IN THE NETWORK (EXCLUDES EX VAR, ALSO ^F R GATES MAY BE ISOLATED). STORES THE SELECTED GATE«S IP GATES WHICH HAVE FOROP-COORDINATES OF WEIGHT 2 OR ABOVE. STORES THE SELECTED GATE'S IP GATES WHICH HAVE AT LEAST ONE ERROR-COORDINATE OF WEIGHT 1. LIS T OF CONNECTIONS ADDED TO A NETWORK (IN CODED FOPM). LIST OF CONNECTIONS REMOVED FROM A NETWORK (CODED FORM). NO. OF CONNECTIONS ADDED TO A NETWORK. POINTS TO LAST ENTRY IN RSCONN. SET S CONSISTING OF INPUTS OF THE GATE UNDER CONSI DERATI ONE 1 WHICH APE T BE REPLACED IF POSSIBLE. El SET SI CONSISTING OF ELEMENTS OF SET S WHICH CAN BE REPLACED BY ELEMENTS IN SET S2. SET S2 CONSISTING OF FUNCTIONS WHICH ARE CANDIDATES FOR REPLACING ELEMENTS IN SET S. SET Tl CONSISTING OF ESSENTIAL ONES COVERED BY ELEMENTS SET SI. STARTING ELEMENT OF SET S. SU:$MX(GI ,GJ)>0 MFANS GATE GJ IS A SUCCESSOR OF GATE GI. SU:$MX(GI ,GJ)=0 IF NOT. SUM OF ALL ACTIVE INPUTS OF THE GATE UNDER CONSIDERATION. SUM OF ALL ACTIVE ELEMENTS OF SET S2. NUMBER OF CONNECTIONS REMOVED FROM A NETWORK. POINTS TO LAST ENTRY IN RTCONN. USED TO STORE AMOUNT OF ELAPSED COMPUTATION TIME. MNEMONIC NAMES FO* EXTERNAL VARIABLES AND GATES. POINTS TO LAST ELEMENT IN VF$1. SIMILAR TO F$l, EXCEPT THIS LISTS JUST COMPONENT POSITIONSE1 (OF D»S IN CSPF VECTOR OF GCO COVERED ONLY BY REMAINING El ORIGINALLY «"ONNEC T ED INPUTS TO El El El El INE1 El El El El El El El El El El El GCO. IMPLICIT INTEGEP*4(A- T ,V-Z,$) , REAL(U) COMMON NEPMAX COMMON N , M » A 1 ♦ R ♦ N2 , Nl 2 , NM , KFLAG » JFLAG 3 LEVM , NRN? ♦ NM1 B NR COST NN2 El El El El El El El El El El 00980 0099C 01000 01010 01020 01030 01040 010 50 01060 01070 01080 01390 01100 OHIO 01120 01130 01140 01150 01160 01170 01180 01190 01200 01210 01220 01230 01240 01250 012 60 01270 01280 01290 01300 01310 01320 01330 01340 01350 01360 01370 01380 01390 01400 01410 01420 01430 01440 01450 01460 01470 01480 01490 01500 01510 01520 01530 01540 015 50 01560 01570 01580 rnnM~)M IS J I , TNT ? t GLF r n m M H N T - '•Mf/HM T FL 1 , F$U«1 ? ,LTS T L< 3 fPnJMTp ? , T o X I r ( 3 ,s c rsi( 5 ,LTP 6 , N nr> 7 , *L T H na"* KODNT5 993 FFAD<5tlOO0» vj^pva x T S th 1000 P n PMJT(?0A4/ KFYX r =0 TFJ UC.NE.URL CALL PAGF CALL LTNEUO (,2 CfcLL LINF(4) PQTMT 10 » N, IQ F^DMATO^X,' 1 30X, • 2 30 X,' 3 47X, <*ALL LINE(l) IF { KFYXC.NE. p o i m t ? 1 ?1 F^0VA T (1H0,2 GC Tn 3<" 25 C3M T INUE P"IN T 28 28 cr, P^A.T(iHT,2 1 X, Y ') 30 CHN'INUE :*LL LINF(5) ***** SFT UP EXTF *]2=2**N IPJNFPMAX.FO H=\*M2 J=N2 L = 1 1 = DH 1"11 I!=1,N J = J / 2 L = l #2 SN= 1 DO 1010 LL = 1 ,1 fC( 40,40) , L T S LJ r C iMX( 40,40 ) , SUrtMX VFL(40) , LSLIST , RTCOMN \G , POTNT4 , TNJPT'-.Vt '+0) , POTM'-L ,VF$1( 32 AB( 200,4? ),PP^T4B( ,4r) ,T0XO(3? 3?) ,SU«P( 32 40) ,\' fl ,SU^S2(3 ,NjnoF ,N01 ,$PW N0T1SV T Lm 144) ,UGATP(4" /0/, UPLANK/' • FND=500) UHF^O, \|, <= M4XIWU« ALLPWABL 5 T4,A4, T4) IPRFD(40,4G) p$(2, 1280) , HLIST(40,40) , S ,ESS1S<43 ) ,LISTC( 40) ,0PIGIN(40) ,VF$UB1 ,LP0TA8(40) , IDX0E132 ) ,SFTT1(32) ,SETS( 40) ,SETS2(200) ,KEYA , N01E , $ Nf E ,NF 31SV ) ,UHF*D<20) / M , ', A, B f UCi NEPMA F NUMBER OF ERROR PCS I ( 40) , (40 ( 40J f <4C) , (100) , 32) ) ^♦0) ) ) 2 ) , LIPRED(40) , UNAMF(40) , TIME , R.SCONNM 100 ,F$1(32) ,PO!NTf. , IPATH(40) ,GSMALL(40,3 ,NRPLC(2) , IOXK 321 fNOTl ,NOS ,NCS2 ,KEYB , $GT »GI LMTS2 X TIONS ANK) KFYX'.=1 ) 5+] VJT5 *** OPTIMAL NPR NFFWCRK *** • , 5CX, • PPDBL EM N0.= ',14 JHFAD 0A4) M,A,B MUMPER n F VARIABLFS NUMBER OF FUM-T T ONS COST CrEPFTCIFNT a •8 =• , 14 // = • ,T4 // =♦, T4// =• ,14) 0) GO to 2 5 9X,« UNCOMPLEMENTED VARIABLES X •) 9X,» ROTH rnMPLEMEN T ED AND UNCOMPLEMENTED VAPIABL »MAL V4PT API. FS ***** . 0) NFPMAX = N2/2 E 1 01590 PI 1 600 El 01610 ) El 01620 El 01630 El 01640 El 01650 2)E1 01660 E 1 01670 El 01680 El 01690 El ">1700 El 01710 El 01720 El 01 730 El 01740 E I 01750 El 01760 El 0177C El 0178C El 01790 El 01800 El 0181C El 01820 El 01830 El 01840 El 01850 El 01860 ) El 01870 El 01880 El 01890 El 01900 El 01910 El 0192C El 01930 El 01940 El 0195C El 01960 El 01970 El 01980 El 01990 El 02000 El 02010 El 02020 El 02030 ESEl 02040 El 02050 El 02060 El 020 70 El 02080 El 020 90 El 02100 El 02110 El 02120 El 02130 El 02140 El 02150 El 02160 El 02170 El 02180 El 02190 v = ( 1 + sm) n DO 1009 JJ=1,J 1=1+1 P$( 1,1 ) «v IF(KEYXC.NF.O )P $< 1, I+H)*l-V 1009 CONTINUE 1010 TMINUF 1011 r?MTIMUF. IF(KFYXC.NF.O ) N=N+N NJ1=N'*-1 NJMl = NM+1 N"J2=N*N2«-1 NP=N+P nrn?=nr*N2 CALL OUTPUH INC$MX,KFYXC ) >?***** ocfO IM NETWORK INFORMATION AND SET UP INC $MX ***** RFAD 1001, CNTLIS 1001 F0BVATn6T5) D n 1115 GI = l,f^P 9" 1 1115 GJ = 1,NR 1115 INC$MX(GI,GJ ) = DO 1120 1=1,144 TTEM = CNTLIS( I ) IF( ITEM.E3.D) GO TO mg 5I=ITEM/100 GJ=ITE^-100*GT INr$MX(GI,GJ )=1 GO TO 1120 1119 C0ST=A*R«-8*( 1-1 ) GO TO 113? 1120 :3N T IMUE 1130 CONTINUE CALL SUBNET CALL PVALUE CALL LINE(4) PRINT 1140, COST 1140 F0R«AT(?0X,' ORIGINAL NETWORK COST=« , 15) CALL LINE(4) :all TPUTH(P$ ,1 ) CALL LINF<4) CALL CKT( INC$MX,GLEVEL ) C***** ENJTRY REDJNDANCY CHECK ***** S = T = CALL UNNECE GATFS = M C = D3 4 GI = 1,NR C « C «■ LISUCC(GI ) IF(GI.LE.NM)G0T04 IF(L ISUCC(GI ).GT.0)GATES = G«TES«-1 4 CONTINUE OLOCST = A*GATFS + B* ( C ) T = S=0 INITIALIZE TIMER TO 10 MINUTES CALL STIM=Z( 60000) TIME * KTIMEZ(O) El 02200 El 02210 El 02220 El 02230 El 02240 El 02250 El 02260 El 02270 El 02280 El 02290 El 02300 El 02310 El 02320 El 02330 El 02340 El 02350 El 02360 El 02370 El 02380 El 02390 El 02400 El 02410 El 02420 El 02430 El 02440 El 02450 El 02460 El 02470 El 02480 El 02490 El 02500 El 02510 El 02520 El 02530 El 02540 El 02550 El 02560 El 02570 El 02580 El 02590 El 02600 El 02610 El 02620 El 02630 El 02640 El 02650 El 02660 El 02670 El 02680 El 02690 El 02700 El 02710 El 02720 El 02730 El 02740 El 02750 El 02760 El 02770 El 02780 El 02790 El 02 800 r***« PPTCEDU^E PROCCF El 02810 CALL porrrPC^opKEDI El 02820 r CALL FOR ELAPSED TIME El 02830 ▼IMF = KTTMEZ(O) - TIME 61 02840 CALL LTNE(4) El 0285^ "TNT 3915 61 02860 391.6 FDR^&tj ?0X, 'TIME ELAPSFD =',T8,« : ENTI SECONDS ' ) El 02870 3915 F^OKAT (20X, 1 NETWORK OFRIVFD RY PROCCE') El 02880 PPIK T 3916, T IME El 02890 HALL LINE14) El 02900 CAl L TPl)TH(P$,l ) E 1 02910 CALL LINE<4) El 02920 CALL CKT( imc$MX,GLEVFL I El 02930 GATES = M El 02940 C = El 02950 OH 36 GT = 1,NR El 02960 C * C + LISUCCCGI ) El 02970 IF(GI.LE.NM) GT T^ 36 El 02980 IP(LISU<"C(GI ) .GT.O) GATFS = GATES * 1 El 02990 36 "ONTINUF El 03000 NEWCST = A*G*TES * P* r El 03010 IP(MFWCST.LT.OLD^STJGQ th 37 =1 03020 P3T\|T l05 E1 03030 105 F3P^"AT(iH , 10X,«N0 RFDIJMOANCY FOUND.') El 03040 GD TO 990 5 1 03050 37 TALL LINF( 3) El 03060 PRINT 320.NEWCST El 03070 320 =3P"AT(9X,'* A NETWORK OERTVFD BY PPOCCEVgX,' CDS T = • , 15, • . • ) El 03080 GO n 990 El 03090 500 STDP El 03100 FMD El 03110 SUBROUTINE CALS1 El 03120 r El 03130 -**** r HTS SUBROjriNE CALCULATES A MAXIMUM SUBSET, SI, DF S El 03140 r. WHICH CONTAINS FUNCTIONS REPLACEABLE BY S2. THE NUMBER El 03150 C IF IMITIAL ^LFMENTS IN SI (MDS1) IS SET BY CALLING PROGRAM. El 03160 C THE NUMBER OF ESSENTIAL ONFS COVERED BY INITIAL SI IS ALSO El 03170 C S C T BY CALLING PROGRAM < NCT1 AND SETTK*)) El 03180 C El 03190 r El 03200 : DEFINT T IONS OF 'COMMON* VARIABLES CAN BE FOUND IN MAIN PROGFAM. El 03210 El 03220 IMPLICIT INTE0FR*4 1000 : ALREADY PEMPVED ***** El 03510 TF(r,P.C,T.l 000 )G3 T3 7800 El 03520 BSGP = (GP-1)*N2 El 03530 CALCULATE ESSFNTi&i. ONES IN 3P AND CHECK WHETHER SETS2 COVERS El 03540 THEM HP ^3 T ***** El 03550 NC T = NH T 1 El 03560 DP 7100 N3Z=1,N00 El 03570 TH = TDXO(NOZ) El 03580 TF( SlJMP( T H) .NE.1.0R.o$(l,BSGP*TH) .NE.l ) GO TO 7100 El 03590 IF(SUMS2(TH).LF.O)G3 T 7800 El 03600 NPTO = NOTO ♦ I El 03610 SFTT l(NO TO) = TH El 03620 i fPNMNUE El 03630 NPTl = NPTO E 1 3640 N0S1 = NISI ♦• 1 El 03650 SFTSHN3S1 ) = GP El 03660 UPDATE SUMP ***** El 03670 DP 7300 T H=l,N2 El 03680 SUMP(^H) = SUMP(TH) - P$(l, BSGP+TH) El 03690 1 CONTINUE El 03700 ' UPDATE SFT S (MAKE GP INACTIVE) ***** El 03710 SETS (NO ) =1000 ♦ GP El 03720 I CONTINUE El 03730 RETURN El 03740 END El 03750 SUBROUTINE CDNECTfPTR ) El 03760 El 03770 THIS SUBROUTINE CONNECTS THE FUNCTION IN POTAB SPECIFIED BY PTR El 03780 TO GATE GI AND MAKES ALL OTHER NECESSARY CONNECTIONS FOR El 03790 REALIZING THIS FUNCTION. El 03800 El 03810 El 03820 DEFINITIONS OF 'COMMON' VARIABLES CAN BE FCUND IN MAIN PROGRAM. El 03830 El 03840 IMPLICIT INTEGER*4(A-T,V-Z,$), PEAL (U ) El 03850 COMMON NEPMAX El 03860 COMM-JN N , M , A , B El 03870 1 t R t N2 , Nl , NR El 03880 2 , NM , KFLAG , JFLAG , COST El 03890 3 , LEVM , NRN2 t NM1 , NN2 El 03900 :OMMDN ISUCC(40,40> , LISUCCC40) , IPRED(40,40) , LIPREDJ40) El 03910 1 , INCSMX(40,40), SUC$MX( 40,40) , P$(2,1280) t UNAME(40) El 03920 2 , GLEVEH40) , LGLIST(40) , HLIST(40,40) , TIME El 03930 COMMON T f RTC n NN(100) , S , PSCONNUOO) El 03940 COMMON IFLAG ,POINTA ,FSS1S(40) ,F$1(32) El 03950 1 ,F$UB1 ,INPTCV(32) ,LISTC(40) ,POINTC El 03960 2 ,LISTL(40) ,POINTL ,CRIGIN(40) ,IPATH(40) El 03970 3 ,POINTR ,VF$1(32) ,VF$UB1 ,GSMALL ( 40,32) E 1 03980 nwMON PHTAR( 200,42) ,PPO T AB(40) , RPL~(2, 40) ,IDX1E(32J ♦ SE T S1 ( 40) ♦ TDX0( 32) ,SUMP(32) ♦ NOSl ,S1IM C ?( 32) ♦ NCTE f N0\ ♦ $PW NOT] SV ,LPCTAB(40) ,TQXOE( 32) ,SETTK 32) ♦ SETSUO) ,SETS2( 200) ,KEYA ,N01E ,$NOE ♦N0S1SV .LIP ,N0O , $L T H "3MM0N <***** CONNECT THIS FUNCTION GP = POTAB(PTR, $GT) T N"$MX(GP,GI ) = 1 S = S + 1 RSC.ONN(S) = 100*GP + GI r**** CONNECT ot HFP NECESSARY OHNNECTIONS TF{POTAR(PTR, $LTH).FQ.O)GO Tr > 7200 |_tm = POTAB( PTP f $LTH) 0"» 7\00 T H=1 , L T H '•.O = PHTAPJ PTR t $LTH+'H) IN:$MX(G0,GP) = 1 S = S + 1 ? ,IDX ,SUM ,NOS ,SUM ,N00 ,NOT ,$PW N0T1 LAG N2 SUCC( C$MX( LI ST( r ONN( NT& t:vo ntl 1(32) TAB( 4 0(32) P( 32) 1 S2(32 E SV 40) , 40,40), 40) , 1301 , 2) 0) A Nl J FLAG NM1 IPRED140.40) P$(2,1280) , HLIST(40,40) , S ♦ESS1S(40) ,LTSTC(40) ,0RIGIN(40) ,VF$UB1 ,LPCTAB(40) , IDX0E(32) ,SETT1(32) ,SETS(40) ,SETS2(200) ,KEYA ♦ NC1E ,*NOE ,N0S1SV . B » NR , COST , NN2 , LIPPEDC40) , UNAME(40) , TIME , RSCONN( 100) ,F$1(32) ,POINTC , IPATH(40) ,GSMALL(40.32 ,NRPLC(2) , IDXK 32) ♦ N0T1 ,NOS ,N0S2 .KEYB , $GT ♦ GI ,LMTS2 El 03990 El 04000 El 04010 El 04320 El 04030 El 04040 El 040 50 El 04060 El 040 70 El 04080 El 04090 El 04100 El 04U0 El 04120 El 04130 El 04140 El 0415C El 04160 El 04170 El 04180 El 04190 El 342 00 El 04210 El 42 20 El 042 30 El 42 40 El 342 50 El 04260 El 04270 El 04280 El 42 90 El 04300 El 04310 El 04320 El 04330 El 04340 El 04350 El 04360 El 04370 El 043 80 El 04390 El 04400 El 04410 El 04420 El 04430 El 04440 El 04450 El 04460 El 044 70 )E1 04480 El 04490 El 04500 El 04510 El 04520 El 04530 El 04540 El 04550 El 04560 El 04570 * El 0*580 c**** LIST ESSFNTTAL ONES 1 El 04590 KPYA4 = n El 0*600 RSGJ = (GJ-1) *N? El 0*610 D-» 310 fH=l,N2 El 0*620 I'M SUMP(TH) .NF.1 .0R.P$(1 ,BSGJ*TH) .NE.DGO TO 310 El 0*630 IF(GSMALL( GI,TH ).GT.-1000)GO TO 300 El 0*6*0 KEYAA = I El 0*650 30 to 310 El 0*660 300 IF(GSMAL'_( GI,TH ).LT.O) RETURN El 0*670 310 CCNTINUE El 0*680 - **** 0ISC3MMECT GJ T D GI, UPDATE SUMP ***** El 0*690 INC*"X (GJ,GI ) = El 0*700 T = T ♦ I El 0*710 ' T "C^( T) = 100*GJ *■ GI El 0*720 DO 320 rH=l,N2 El 0*730 320 StJMP( TH) = SUMP1E OF AN TN0UT SELECTED AS A CANDIDATE FOR DI SC0NNECTI0NE1 050*0 c Ff>0 M GATE 'GCO' . El 05050 r T: COUNTS PEMOVFD CONNECTIONS. El 05060 C TOPPER: A SPECIAL ORDERING OF GATES AND EXTERNAL VARIABLES SUCH El 05070 c THA r VARIABLES COMF FIRST FOLLOWED BY GATFS WITH DECREASE0E1 50 80 r NUMBERS OF OUTPUTS ( T IES ARE BROKEN BY GORDER) . El 05090 C TPOINT: POINTER TO TORDER. El 05100 r T1PRED: LIST OF GCO'S PREDECESSORS AT ONE STAGE OF COMPUTATION. El 05110 C T2 3 »ED: LIST OF GCO'S PREDECESSORS AT ONE STAGE OF COMPUTATION. El 05120 c T1SUB: A POINTER TO TIPPED. El 05130 : T2SUB : A POINTER tp T?ppED. El 51*0 c JSED: USED(GI)=1 MEANS GI IS AN OUTPUT GATE, OR IS A COVER FOR El 05150 r SOMF 0-COMPPNENi" OF 'GATE 1 . (IT ALSO HAS A TEMPORARY USE El 05160 C IN «FGINNING OF PROGRAM.) 51 05170 f 5 1 05180 : CnUNT f TfI!t JfKtL*M03T v O v TCClWfXfXXtY ARF USED AS JUS T TEMPORARY El 05190 r VARIABLES. El 05200 H n W TC INC'EASF CAPACITY IF SUBFOJMNE. El 05210 7 DTMENSI?N: tipp F n < X) , T 2 PRED( X ) ,GPRDEP (X ) , El 05220 r «APKED(X»,USFD( X) ,TDRDER( X) - X EQUAL TO MAX NUMBER El 05230 C OF GA T ES PLUS EXTERNALE1 05240 VARIABLES. El 05250 C F$0(Y) - Y FQJAL n: 2**(MAX ALLOWED NO. 0^ EX. VAR.) El 0526C El 05270 IMPLICIT !VJTEGEP*^(A-T,v-Z,$) , REAL(U) El 05280 COMMON NFPMAX El 05290 -rvMON hi , m , a ,8 El 05300 1 , R , N2 , Nl , NR El 05310 2 , NM , KFL4G , JFLAG , C3ST El 05320 3 , LEVM , NRN2 , NM1 , NN2 El 05330 COMMON ISl'CC(40,40) , LISUCCI40) t IPRFD(40,40) , LIPREDKO) El 05340 1 , INC$MX(40,40) , SU r $MX(40 ,40), P$«2,1280) , UNAME(40) El 05350 2 , GLFVFH40) , LGLIST(40» , HLIST(40,4C) , TIME El 05360 COMMON T , RTCONNt 100) , S , RSCONN(IOO) El 05370 -HMMON TFLAG ,POINTA ,ESS1S(40) ,F$1(32) El 05380 1 ,F$im\ ,INPTr.V(32) ,LISTC(40) ,POINTC El 05390 2 ,LISTL(40) ,PniNTL ,0RIGIN(40) ,IPATH(40) El 05400 3 ,POIN T R ,VF$1(32) ,VF$UB1 , GSMALL ( 40, 32 ) E 1 05410 C"iM*nN P1TAB( 200,42),P pr, TA8<40) ,LP0TAB{40) ,NRPLC(2) El 05420 1 ,PPLC(2,4 r ») ,10X^(32) ,IDX0E(32) ,IDX1<32) El 05430 2 ,IDX1E(32) ,SUMP(32) ,SFTT1(32) , N0T1 El 05440 3 ,SETS1(40) ,N0S1 ,SETS(40) ,NOS El 05450 4 ,STS ,SUMS2(32) ,SFTS2<200) ,N0S2 El 05460 5 ,LID ,MO0F ,KEYA ,KEYB El 05470 6 ,NCO ,N01 ,N01E ,$GT El 05480 7 ,$L T H ,$PW ,$NCE ,GI El 05490 COMMON ^OTISV ,NCS1SV ,LMTS2 El 05500 DIMENSION ri<>RED(4n),T2PRFD(41) y GDRDER(40)«F$0f J2) V MARKED(4C) El 0551C DTMp^siON USED! 40) ,T0RDER(40) El 05520 TMPPOV =0 El 05530 T = El 05540 C D IPII.LT.ND50 TO 58 IF( I.GT.NM) GP TO 58 GO TO 3 DO 59 J = l t N2 GSMALL(I f J)= CONTINUE OC 62 I = ^1,NM USFDU ) = I CONTINUE INITIALIZATION DO 34 I=1,NR 3A T F = GOOOEP(I) IF(GATE.LT.N1 )GC TO 34 XX = LIPRED(GATF) IF( XX.E0.0JG0T0 34 F$UP1 = F$UBO = DD 35 J=1,M2 CCMPNT = GSMALUGATE, J) I«=(rOMPNT.EO.O)GP TO 35 IF(POMPNT.L r .0)G0 TO 36 IP(COMPNT.GE.ICOO) GO TO 35 F$JBO = F$UBO ♦ 1 THE NUMBER OF OUTPUTS OF GATE I USEO( It El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El 05780 05790 05800 05810 05820 05830 05840 05850 05860 05870 05880 05890 05900 05910 05920 059 30 59 40 05950 059 60 05970 05980 05990 06000 06010 06020. 06030 06040 063 50 06060 06070 06080 06090 06100 06110 06123 06130 06140 06150 06160 06170 06180 06190 06200 06210 06220 06230 06240 06250 062 60 06270 06280 06290 06300 06310 06320 06330 36340 06350 06360 06370 06380 F$o(r$(mo) = j rr T ?5 36 TP(r*3MPNT.LE.-1000) GO TO 35 F$IJR1 = F$!JRl ♦ 1 F$l(F*imi = J 35 CONTINUE IF{ F$UR1. C 0.0 )GP T^ 34 DO ^8 K=1,XX FFFPG T = IDREDIK, GATF) X = (FEFDG T -1 )*M? n^ 39 L = 1,F$IJB1 Y = F$l (L) TF( P$( l, x+Y) .LE.OJGO T H 39 TF (rS»«ALL (FEFDGT, Y ) .f,T .1 000 > GDTP39 IF (3 SMALL (GAT E,Y) . FQ.-20 ) GOT 03 9 TF( GSMALl ( GATE, Y> .FO. -100)00 to ^q GSMALL(GATE,Y) = -200 GT t-i 39 40 GS^fiLL (GATp t y ) = -F?F0G T 39 CONTINUE 38 CONTINUE DO 63 K=!,XX 60 m*fkFDUPPED(K, GATF)) = O" 1 41 K=1,F$UR1 X = GSM&LL(Ga.TE,F$l(K ) ) TF( X.FQ.-1"">)GC TO '+1 TFl X.FQ.-200)GP T P41 X = -X GSM*LL(«-X,F$1 (K) J =1 USFD(X) = I TF(M4 PK i=o(X).EQ.l IG0TH41 M AC?KED(X) = I DO 42 L = l, F$URO Y = GSMALLU, FSO(LI ) TF(Y.G T . 1000.hr. Y.LT.-1000JGO to 42 nS^ML(+X,F$0(L ) ) = -100 42 CONTINUF 41 CONTINUE 34 CONTINUE IFJFFLAG.FQ.l )RE T URN INITIALIZE COUNTER Tn LOOP ONCE FOR EACH GATE GCCUNT = INCPEMEN T GCCUNT 5 GCCUNT = GC.OUNT ♦ 1 <"»F ALL GATES EXHAUS T FO? if(g:oumt.le.np)go Tn 6 IF(T.G T .0) IHPROV = I IF( I MPROV.E 0.0) RETURN! TF HERE, NETWORK WAS ALTERED, SO UPDATE ARRAYS r»LL SUBNET "ALL PVALUE RETURN 6 GCO = GOR OER ( GC PUNT ) IS G:0 AN ISOLATED GATE OR EXTERNAL VARIABLE? IF{GC0.LF.N)SOT05 00 8 1=1, N2 IF(GSMALL(3C0tI I.GE.l )GH T n7 8 CONTINUE IF HF°E, GATE IS ISOLATED - REMOVE INPUTS X = LIPR C 0(GCO) TF(X.E0.0)rOT0 5 El 06390 El 06400 El 06410 El 06420 El 06430 E 1 06440 El 06450 El 06460 El 06470 El 06480 El 06490 El 06500 El 06510 El 06520 El 06530 El 06540 El 06550 El 06560 El 06570 El 06580 El 06590 El 06600 El 06610 El 06620 El 06630 El 06640 El 06650 El 0666C El 06670 El 06680 El 06690 El 06700 El 06710 El 06720 El 06730 El 06740 El 06750 El 06760 El 06770 El 06780 El 06790 El 06800 El 06810 El 06820 El 0683C El 06840 El 06850 El 06860 El 06870 El 06880 El 06890 El 06900 El 06910 El 06920 El 06930 El 06940 El 06950 El 06960 El 06970 El 06980 El 06990 m 9 1=1 ,X El 07000 Y = IPRFDU ,GC0) El 07010 TVK$MX(Y, ^rO) = El 07020 RP:r*D THE DI SCCNNECTION El 07030 T = f ♦ 1 El 07040 9 CPNTINUE El 07050 GDTP 5 El 07060 *E^C\/E UNNECESSARY CONNECTIONS TP SCO IN THE NEXT FEW SECTIONS El 07070 El 07080 CALCULATE F(GCC) El 07090 7 <= $JP1 = El 07100 DP 10 1=1 ,N2 El 07110 IF(PSMALL(G:T,I ).GE.O)GOTiio El 07-120 F$UP1 = FSJB1 + 1 El 07130 F$l(F$UBll = I El 07140 10 CONTINUE El 0715C On ii T=l t F$JBl El 07160 11 !\|dt:vG0T048 El 07250 USU3 = TISUB +1 El 07260 TIPFED(TISUB) = ! El 07270 48 CONTINUE El 07280 17 DO 18 1=1, X El 07290 Y = (UPREDU l-l)*N2 El 07300 0? 19 J=1,F$UB1 El 07310 = F$l(J ) El 07320 IF(P$(l,Y*Q).NE.l 1G0 TQ 19 El 07330 IF(IMPTCVO).LE.O) GP T 20 El 07340 TNPTCV(O) = INPTCV(Q) + I El 07350 GP Tn 19 El 07360 20 IF( iMPTCvm.LT.OIGO T 21 El 07370 INPTCV(Q) = -TIPREP(T) El 07380 30 TO 19 El 07390 21 INPTCV(O) =2 El 07400 19 CONTINUE El 07410 18 CONTINUE El 07420 MARK ESSENTIAL l'S El 07430 DP 22 I=1,F$UB1 El 07440 = INPTCV(F$1(I) ) El 07450 IF(O.GE.0)G3 TP 22 El 07460 FSSIS(-Q) = ESSIS(-O) ♦ 1 El 07470 22 CONTINUE El 07480 46 SFLE^T =0 El 07490 BFSTSL =0 El 07500 03 45 L=l t X El 07510 = TIPRED(L) El 07520 IFUNC$MX(Q,GCC).EQ.0)GOTO45 El 07530 IF(FSS1S(0).GT.0)G0T345 El 07540 IF(?FLECT.EO.O)SELFCT =0 El 07550 IF(USE0(Q).FQ.l)G0Tn45 El 07560 IF( PFSTSL.ME.0)G0TP45 El 07570 BESTSL =0 El 07580 45 CONTINUE El 07590 IF(SELECT.EO.O)GO TP 47 El 07600 = ^FLFC" TF( PFSTSL.MF.O )0 = *FSTSL C IF HERE, r,&TE HAS NO ESSENTIAL 1»S - PEMOVE IT IN r $^X(Q,r,:-') = T = T + 1 r UPD* T F ESSl^ Y = < - 1 ) *N 2 0*1 24 J = l,FtJRl V = c $l( J) TF( p$( 1 ,Y+V) .NF.l IRC T l 24 LJPD*TF" INPT("v FOR COMPONENT V IMPT-V(V) = INPTV(V) - 1 TF(IMPTrv(v).GT.l )r,r T n ?4 r ^ACE WHEN NEW FSSEN 1 CREATED D"l 27 K = 1,X w = Tl PREP(K ) IP{ INC$ M X(W,GCO).EO.f ) GO Tn 27 Z = ( W - 1. ) * N 2 TF(P$( I ,ZW ) .EO.O )R0 TP 27 c s^i si w) = e <; sis ( w) ♦ i r IM THI'- tftSE, NC NEED T7J IJPD«TE INPTCV FURTHER GS***LL(Gr-l,VI = -W 3" *""' 2 A 27 '".TNTTMUF 24 CONTINUE ~,nTr46 47 on 49 t = lf Nj R IF( TKT$MX(I , GCCKEC-.* ) goto 49 T2°RED 61 r HniCE = l r 3 JJJ=1 ,NP JJ = TppnER(JJJ) IF(INC$MXIJJ,GC0).FQ.0 IGO T 31 TF(P$( 1,( JJ-1)*N2+I).NF.1)G0 T C 3 IF( J J .1 E.N) Gd tp 29 IF(rHDICE.EQ.r)r.HPTCF = JJ TFlGSVALUJJtl I.GE.l)SOTQ29 30 rrNjTTMU c 61 G CM ALL(CHOKE tl) = I J* ED< CHOICE) = 1 29 C0N T INUE o : 3 ? i = l , m ? IF(GS^ALL(G':*JtIl.L T . 1 .)G'3 T ^ 3? 0^ 33 J=1,T2SUB T F» REAL(U) El 08290 COMMON NEPMAX El 08300 TD^M-tM \j , M , A , B El 08310 1 , R t N2 ♦ Nl , NR El 08320 2 ♦ NM , KFLAG , JFLAG , COST El 08330 3 , LEVM , NRN2 , NM1 , NN2 El 08340 rpyMPM ISJCC(40,40) t LTSUCC(40) , IPRED(40,40) , LIPREDUO) El 0835C 1 ♦ IN~$MX(40,40), SUr$MX(40,'»0), P$(2,1280) , UNAME(40) El 08360 7 , r,LEVFL(40) , Lr,LIS"T(40) ♦ HLIST(40,40) , TIME El 08370 "OMMPN T t RTCONN(IO')) f S , RSCONN(IOO) El 08380 COMMON I^LAG t P0TNT4 ,ESS1S(40) ,F$1<32) El 08390 1 »p$UB1 ,!NDT:v(32» ,LISTC(40) ,POINTC El 08400 2 f L!STLI40l ,POINT|_ ,0RIGIN(40) ,IPATH(40) El 08410 3 .POIMTR ,VFSl(32) ,VF$UB1 ,GSMALL( 40 ,32 ) El 08420 CDMM-jn ?OfAB( 200,42»,PPOTAB{40) ,LPO"<"AB< 40 ) ,NRPLC(2) El 08430 1 ,RPLC(2,40) ,IDX0«32) ,IOX0E(32) ,IDXH32) El 08440 2 ,IDX\E(32) ,SUMP(32) ,SETT1(32) ,N0T1 El 08450 3 ,SETS1(40) ,N0S1 ,SETS(40J ,NOS El 08460 4 ,S T S ,SUMS2(32) ,SE T S2(200) ,N0S2 El 08470 5 ,LIP ,N0OE ,KEYA ,KEYB El 08480 6 ,N00 ,N01 ,N01E , $GT =1 084 90 7 ,$LTM t $PW ,$NOE ,GI El 08500 COMMON NOTISV ,N0S1SV ,LMTS2 El 08510 DIMENSION WPPLC(2,40) El 08520 NPPLr(l) = El 08530 NRPLC(2) =0 El 08540 DO 8100 LI =1 ,LIP El 08550 GP=IPRED(LI,GI ) El 08560 TF(GP.LE.N) GO Tn 8100 El 08570 IF(INC$MX(GP,GI ).EQ.O) GO TO 8100 El 08580 BSGP=(0P-U*N2 El 08590 NOPNEE =0 El 08600 e$SM=l El 08610 DO 8050 NO=1,NOOE El 08620 TH=IDXOE(NC) El 08630 IF(P$(l,RSGo+TH).LE.O) GO TO 8050 El 08640 NO0NFE=N00NEF+l El 08650 IF( SUMP(TH).EO.l) ESSN=2 El 08660 8350 CONTINUE El 08670 r**** put GP INTO RPLCd,*) OR RPLC(2,*) DEPENDING ON ESSN El 08680 C ESSN=1 : NO ESSENTIAL ERROR El 08690 C ESSN=2 : WITH ESSENTIAL ERRORS El 08700 T RPLC TABLES ARF STPRED ACCORDING TO OROERING Ql(NOONEE) El 08710 C NRPLJMESSN) :NUMBER OF ELEMENTS IN RPLC ( ESSN) **E1 08720 IF(NOONEE.EO.O) GO TO 8100 El 08730 P2=NRPLC(ESSN) El 08740 IF(P2.EQ.O) GO TO B070 El 08750 DO 8060 PP=1,P2 El 08760 RP=P2-PP*1 El 08770 IF(WRPL:*ATRT X( 40«4 DATA [jX / • X 1 S • X2S DA'A IJY/' Yl ' »' Y2' t' « T A J F / • 1 S ' 2 • , M N? KFLAG M o f>.| •> LISUCCC S'jriMXC , LILT ST ( , PTC INN ( , PIT NT A tINPT'-VO , POINTL ,VPt1 (32) ),PPr«Tft8( 4 ,T0X' , (32) ,SIJwp< 32) ,N0S1 ,SU^S2(32 .NOOF t N01 ,$PW N3T1SV )t UG(40), 0) • X3S • X4 Y3S' Y4» 40) 40 1 4 40) 100) 2) 0) 0), UF( A Nl J FLAG NM1 IP3ED(40,40) P*(2,12 80) , HLIST(40,40) » S ,ESS1S(40 ) ,LTSTC(40) , OR I GIN (40) ,VF$UB1 ,LP0TAB(40> , IOX0E132) ♦SETT1 (32) »SETS( 40) ,SETS2(200) ♦ KEYA ,N01E ,$N0E ,N0S1SV 40), ARRAY(40), 9 S ' J7S' 25«, • 33* ♦• 10 •, 18', 26', 34' . i 31 f 1 • IIS • ' 19' ♦' • 27S* • 35S ' 4' 12 20' 28' 36 ' X5'/ '5'/ 5' , 13S 21S 29S 37S 7« , 15S 23S 31» ♦ 39S , B , NR , COST , NN2 , LIPRED(40) , UNAME(40) , TIME ♦ RSCONN( 100) ,F$1(32) fPOINTC ,IPATH(40) ♦GSMALL(40,32 tNRPLC(2) , IOXK 32) ,N0T1 ,NCS ,N0S2 tKEYB ,$GT tGI ,LMTS2 ARRAY2( 2, 1280) • 8« • 16* 1 2 4» 1 32 « • 40'/ OftT f r^^x/^o/ 4 100 KEYXC=APRAY(1 ) TF( KEYX: .NE.O) GO T ~ 50 0-> 1 GI=1 f N UMAMEIGI ) =UX (GT) "IMTTVJUE GO TO 100 :. n MTIN'J p L=N/2 on 4 GI=1,L DNCMFIOI ) =L)X(GI ) JNAMC(r,T+L ) = IJY(GI ) CONTINUE :")v ,T !NUE El El El El El El El El El El El El El El El El El )E1 El El El El Fl El El El El El El El 51 El El El El El El El El El El El El El El El El El El El El 08890 08900 89K' 08920 08930 08940 08950 08960 08970 08980 08990 09000 0901C 09020 090 30 09040 0905C 09060 09070 09080 09090 091 CC 09110 09120 091 3C 09140 09150 09160 091 70 09180 09190 09200 09210 09220 09230 09240 09250 09260 09270 09280 092 90 09300 09310 09320 09330 09340 09350 09360 093 70 09380 09390 0H 2 r,I=Nl, CMAX El 09400 UNAMF(GT >=UF (GI-N) El 09410 2 "ONTINIIE El 09420 RETURN El 09430 El 09440 FVJ'RY LINE(L) El 09450 DO 6 LL=1»L El 09460 PRINT 5 El 09470 5 PDRMATQH ) El 09480 6 CONTINUE El 09490 RFTU'M El 09500 r. El 09510 C M'CY PAGE El 09520 J>3 T N T 7 El 09530 7 FOPMAT(lHl) El 09540 RETURN El 095 50 C El 09560 ENTPy '-KTlMATRIXt ARRAY) El 09570 PRINT 10 El 095 80 1D f^p«»M1H ,8X,'GATF .. LEVEL', 6X, 'FED BY'/) El 09590 D^ 20 GJ=N1,NP El 09600 > = El 09610 D n 1 5 GI=ltNR El 09620 TF(MAtrix(GI,GJ J.EO.*"*) GP TO 15 El 09630 3 = S+1 El 09640 JG(G)=UNA*F(GI) El 09650 15 :nNTj NU E El 09660 IF(G.EQ.O) GO to 18 El 09670 PPIMT 17, JNAMF( GJ ), AR* AY(GJ), ,GG=1,G) El 09680 17 F?RMAT(lH% 9X*»3t5Xf*/* , 1 2 , • / • , 5X , 35 ( A3 I) El 09690 GZ TO 20 El 09700 18 PRIST 19, JNAME(GJ J,APPAY(GJI El 09710 19 FiRMAKni, 9X,A3,5X,' /• ,12,'/' ) El 09720 20 CONTINUE El 09730 PETURN El 09740 C El 09750 EN T PY TRUTHCAPPAY2, J) El 09760 IF(J.EQ.2) GC TO 36 El 09770 PR.INT 35 El 09780 35 FIPMAMUX, 'TRUTH TABLE'/) El 09790 GO TO 38 El 09800 36 PRINT 37 El 09810 37 FOPMATdlX, 'REQUIREMENT TA.BLE') El 09820 38 CTNTINUE El 09830 DO 40 GI=1,NP El 09840 ILC=(GT-1)*N2+1 El 09850 IHI«ILP*N2-1 El 09860 PRHT 41, JNAME(GT), ( AR» AY2( J , I ) , I = 1 LO,I HI ) El 09870 40 CONTINUE El 09880 41 =0PMAT(1H0, 9X,A3,' = ', 32(11, IX)) El 09890 RETURN El 09900 END El 09910 SUBROUTINE POT El 09920 r El 09930 C THIS SUBR-iJTINE GENERATES THE POTENTIAL OUTPUT TAELE El 09940 C El 09950 : P")T*B(Pi ,P2) STORES POTFNTIAL OUTPUT TABLE El 09960 C P1. = 1,$^XPTR: FUNCTION ENTRY NUMBER El 09970 C P2=lt32 : VALUE OF EACH COMPONENT OF THAT FUNCTION El 09980 P2 = 33( P2=34( P2=35, P? = 4\( P2=42( $gt) SLTH J $PW) $NOF) GATE MJMBF NUMBER OF HATES WHIC drffeo fnjcp NUM8FP CF R WHEPE THE CONNECTIONS H APE TO 8F WFIGHT OMF ERRORS FUNCTION IS T3 BE ADDED CONNECTED TQ REALIZED POTAB(*, SGT > nFFTNITTCMS 3F 'COMMON* VARIABLES CAN BF FCUND IN MAIN PROGRAM. IM CO r n Q ^M-)\j r**** re 1 2 3 1 2 3 5 6 7 "3 DT DA IM DO 90 P° PO DO MMON 'MM">N 100 r**** no pli:it IN MMOM NFPM "MON N MM LF IS IN 3L T IF F$UM LISTL PO$NT PPLC( IDX1E SETS1 STS LIP MOO SLTH W3N MFNSION 'A SMXPTR TTIALIZF 90 GI=1, ? T ABMS? ♦ NOOF ♦ N01 ,$PW NPTISV A Nl JFLAG NM1 , I PP ED (40, 40) INDEX (32) /2"0/ PPOTAB( *) NP OC(40) , IPPED(40,40) MX(43,40), P$(2,1280) ST(40) ♦ HLIST(40,40) NN( 100) , S A ,ESS1S(4C) V(32) ,LISTC(40) L .ORIGIN (40) 32) ,VF$UB1 B(40) ,LP0TAB(40) 32) ,10X^(32) 32) ,SETT1(32) ♦SETSI 40) (32) ♦SETS2(200) ♦ KEYA ♦ N01E ,$NOE ♦ N0S1 SV **** B NP COST NN2 LIPRED(40) UNAME(40) TIME , RSCONN(IOO) ,F$1( 32) ♦POINTC ♦IPATH(40) ♦GSMALL( 40, 32 ,NRPLC(2) ♦ IDXK 32) ,N0T1 ♦ NGS ♦ N0S2 ♦ KEYB ,$GT ♦ GI ♦LMTS2 = 1 t LFVM LEVV+1 ST(LEV ) =1 t LGL IST(LG f LEV) GT .1) GO TO 100 T.NM.OR.OI.LE.N.np.M.EO.l ) GO to 960 LISUCCIGU (GI-1 )*N2 T R .GT.$MXP T R) GO TO 990 GI ) = POINTR ESENT OUTPU 1 " T H=I f N2 (POINT P,TH) = d$( l t BSGI+TH) E niNTP t $0T) =GT OINTR, $LTH) = = PCINTP + 1 E.NM) GO T^ 9*50 LEVJ=LEV t LFVM LGIIST(LEVJ) LGJ=1,LGLJ =HLI*T (LOJ.LFVJ) < INC $MX(GJ,GT J.GT.O.CR.GI.EQ.GJ) GC TO 360 El El El El El El El El El El El El El El El El El El El El El )E1 El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El 09990 n r 10010 10020 10030 10340 10050 10060 10370 100 3C 10090 10100 10110 10120 10130 10140 10150 10163 10170 10180 1019C 10200 10210 10220 10230 10240 10250 13260 10270 10280 10290 1030C 10310 10320 10330 10340 10350 10360 10370 10380 10390 10403 10410 10420 10430 10440 10450 10460 10470 10480 10490 10500 10510 10520 10530 10540 10550 10560 10570 10580 10590 r**** THFTK IF G.j is CONNECtEO T p ALL SUCCESSORS OF GI ****E1 10600 D^ 120 LIT=l,LIST El 10610 IF(!MC$MX(GJt I-SUCCCLIItGIH.LE.OI GO TC 360 El 10620 120 CONTINUE El 10630 ■ **** CH^CK IF OJ IS STRONGLY CHNNEPTIBLE TO GI ****E1 10640 R5T,J = ( GJ-l )*N2 El 10650 NO * El 10660 0^ 1 80 T H = 1,N2 El 10670 IF(P$( l,BSGH-TH).i\IE.l.OR.P$( I, 3SGJ *TH ) .NE . 1 )G0 TO 180 E 1 10680 N0=NP+1 El 10690 INOEX(ND)=TH El 10700 180 CONTINUE El 10710 * **** vn=o => NOT S^PDNGLY CONNECTABLE ****El 10720 r **♦* M0>0 => STROMf-LY COMNECTABLE ****E1 10730 IF(Nir.FQ.O) GO n 360 E i 1074C irj POINTR.GT.SMXPTP) GO TO 990 El 10750 0? ?0C TM=1,N2 El 10760 POTAe(PrlNTR,TH)=o$( UBSGI+THI El 10770 ?00 CONTINUE El 10780 03 210 NORWN=1,NO El 10790 POTARI PCIN^PtlNDEXlNOPUN) » = El 10800 210 :tsitinue ei 10810 SP=PprTAB(GT )+l El 10820 IF(PCINTR.EQ.SP) GO TO 300 El 10830 <=P = POINTR - 1 El 108*0 :**** CHECK IF ''HIS EN T RY IS SA*E AS ONE OF THE PREVIOUS ENTRIES ****E1 10850 00 230 PTp s so t EP El 10860 DC 220 T H=1,N2 El 10870 IFtPPTAR(PniNTfi,TH|.NE.POT*B(PTR,TH)| GO TO 230 El 108 80 220 CONTINUF El 10890 GO TO 360 El 10900 2 30 CONTINUE El 10910 300 P0T48(POINTP ,$GT|=(;i El 10920 P0TAB(POINTP, $LTM) = l Ei 10930 P0T4B(PniNTR,$LTH+l )=GJ El 10940 POTNTP = POINTR * 1. El 10950 360 CONTINUE El 109 60 380 CONTINUF El 10970 r**** IF THE SET OF STRONSLY CONNECTABLE GATES CONTAINS MORE El 10980 r TH&N ONE GATE TRY THEIR COMBINATIONS ****E1 10990 * °TRl: STARTING POSITION OF the LIST El 11000 C PTR2: STARTING POSITION OF THE COMBINATIONS CF THE LIST El 11010 r PTP : THE ENTRY WHOSE COMBINATIONS WITH OTHERS ARE UNDER El 11020 V CONSIDERATION El 11030 r PTRL: LAST EMTRY PRECEDING PTP El 11040 r PT»L2:LAST ENTRY OF COMBINATIONS OF ENTRIES PRECEDING PTREl 11050 r El 11060 PTRi = pP3TAB(GI )+l El 11070 PTR2=P0INTR El 11080 FP=PTR2-1 El 11390 SP=PTR1+1 El HI 00 IF(SP.ST.EP) GO to 950 El 11110 IF(PTR2-PTR1.G T .6) DRINT mo El 11120 1110 FORMAT (/////2ix, • ***** WANING: NUMBER OF STRONGLY CCNNECTABLE FUNEl 11130 1 CTIONS FOR A GATE EXCEEDS 6 *****•/ El 11140 2 21X,'***** NOT A.LL POSSIBLE OUTPUTS ARE AVAILABLE IN CE1 11150 3AL0ULATION *****•////) 11160 DO 560 PTR=SP,EP El 11170 OTRLxpTP-1 El 11180 PTPL2 = °CTNTR-1 El 11190 :**** MAKE THE COMBINATION* OF PTP AND ENTRIES PRECEDING IT AS El 11200 450 c TH NEW ENTR JFS DO 453 PT = PTP1 ,PTP|_ **** MAKF S| p W FNT»Y AS THF IF(P1I\|TP .GT.SMXPTP | r, on 4-20 TH=l f N2 PPTAB( PPINTR, THJ = TF(PnTAB(PTR, TH). 1 P0""*8< P r >TN" r R, T H) = 420 OMTINUE PPTAB(PPINTP, $GT ) = 0I P0T&3 ( P 01 N'TR , $L T H) =2 POTABIPPINTR, $L T H+1)=P P^TAB( POINT R, $LTH*2) = P oniN T P=PC!NTR+l CONTIMUE IF(PTR2 ,GT.P T RL2 ) GO T MAKE THE COMBINATIONS PRECEDING PTR AS THE N DG 525 PT=PTR2,PTPL2 TF(P3IMR.r,T.$MXPTR) r, IF{ POT* B(PT, $l_TH).GE.6 OH 480 T H=1,N2 PDTAB( PPIMTR t T H )= IF (POTAB(PTR,TH). P3TAB< PPINTR,T4) = CDMTINUE LT H =PCTABnCF SUCCESSFULLY COMPENSATES ERRORS* 'WORKED 1 IS SET TO 1, •WORKED' IS SET TO DEFS. OF MOST 'COMMON' VARIABLES CAN BE FOUND IN MAIN PROGRAM. V.»«HBLF DEFINITION'S: EP: EPF ERR0°S in NETWORK n UTPUTS WHEN PCO REMOVED. El 11310 SITES: NUMBER DF GA T ES REMOVED FROM NETWORK RY CALL TO MINI2. El 11320 r IMPR->y/: A PARAMETER RETURNED RY MINI2. • =1 ■ MEANS MINI2 WAS ABLE El 11830 C T ? REDUCE TOST OF NETWORK. El 11840 Z MAX: MAXIMUM NUMBFR OF REQUIRED l'S IN A CSPF VECTOR (AFTER El 11850 C CALLING MIM2I PLUS 1. El 11360 f MIN: nRi-TMALLY SET T ZERO, MIN IS INCREMENTED EACH TIME BY 1 El 11870 C UNTIL TTS VALUE EQUALS MAX. El 11880 C NEP: NO. OF ERRfP POSITIONS FOR A GIVEN NE T WORK AFTER A SE- El 11890 : LEC'ED G*TF MAS BFFN REMOVED. AN ERROR POSITION IS A El 11900 C COMPONENT POSITION WHICH IS IN ERROR FOR AT LEAST ONE El 11910 C OUTPUT. El 11920 N C P*AX: READ FROM TNPUT CARDS, THIS PARAMETER IS PASSED TO PROCCE El 11930 r WHFN IT IS <"Al_LFD (,Y M *IN« * T REPRESENTS THE MAXIMUM El 119*0 T ALLOWABLE NU*>BFP OF FPPOR POSITIONS. IF AN ALTERED (I.E., El 11950 C SIM? PCO PF«OVED) NETWORK EXCEEDS THIS MAXIMUM, ERROR El 11960 C COMPENSATION TS NOT ATTEMPTED FOR THAT NETWORK. El 11970 N=TfUT: STORES OUTPUTS OF 04tf$ j N ALTERED (PCO REMOVED) NETWORK. El 11980 C 3MFCNT: USED IN COUNTING NO. OF l'S IN CSPF VECTOR OF A GATE. El 11990 C rr>ES: AFTER THE INITIAL CALCULATION OF THE CSPF SETS IN THE El 12000 BEGINNING, ONES(GI) GIVES THE NUMBER OF l'S IN THE CSPF El 12010 C VECTOR OF GI. THIS TNFCRMATION IS REQUIRED FOR GENERATINGE1 12020 C POPDER. El 12030 C OR~rUT : USED TO S Tn PF ORIGINAL (UNALTERED) NETWORK OUTPUTS IN El 12040 r COOED FCJCM (SAME CODE AS IN GSMALL) AND (40,32) FORMAT. El 12050 C PCO: CURPEN T GATE REMOVED FROM ORIGINAL NETWORK TO OBTAIN El 12060 C CU*?ENT AL T EREQ NETWORK. PCO = POROER ( PCOUNT ) . El 12370 C PfOUNT: A POINTER TO PORDFR. El 12080 r pronEP: ORDERING OF GATFS ACCORDING TO NUMBER OF l'S IN THEIR El 12090 C CSPF VECTORS. GATS ARE INDIVIDUALLY REMOVED FROM CPIGI- El 12100 C NAL NETWORK IN T HIS ORDER El 12110 C PSUP: USED AS A POIN T FR tp PORDER DURING ITS INITIALIZATION. El 12120 C OINC$ M : S T 0»ES A CHPY IF INCSMX FOR THE ORIGINAL NETWORK. El 12130 C START: POINTS T ^ BEGINNING OF LIST OF NETWORK OUTPUTS IN P$. El 12140 C ST?p: POINTS TO END OF LIST OF NETWORK OUTPUTS IN P$. El 12150 C El 12160 C I,J,NI,X,Y ARE USED AS JUST TEMPORARY VARIABLES. El 12170 C El 12180 C HOW TO INCREASE CAPACITY ^ F SUBROUTINE. El 12190 C DIMENSION: PORDER(X) El 12200 C ONES(X) El 12210 C QINC$M(x,X) - X fquAL TO MAX NO. OF GATES PLUS EX. VAR.E1 12220 C EP(Y) - Y EQUAL TO: 2**(MAX ALLOWED NO OF EX VARJE1 12230 C NFTDUT(X,Y) El 122*0 C CRGOUT(X,Y) - X,y AS ABOVE El 12250 C El 12260 IMPLICIT INTEGEP*4(A-T t v-Z, S), REAL(U) El 12270 COMMON NEPMAX El 12280 COMMON NJ , M , A , B El 12290 1 , R , N2 , Nl , NP El 12300 2 , NM , KFLAG , JFLAG , COST El 12310 3 , L C VM , NPN2 , NM1 , NN2 El 12320 COMMON I5JCC(40,40) , LISUCC(40) , IP*ED(40,40) , LIPRED(40) El 12330 1 , INC$MX(40,40) , SUO$MX(40,*0) , P$(2, 1280) , UNAME(40) El 12340 2 , GLEVEH40) , LGLIST(40) , HLIST(40,*0) , TIME El 12350 COMMON T , RTCONN(IOO) , S , RSCONN(IOO) El 12360 COMMON tflAG ,POINTA ,ESS1S(40) ,F$1(32) El 12370 1 ,F$UB1 ,INPTCV(32) ,LISTC(40) ,POINTC El 12380 2 ,LI$TL(40) ,POINTL ,0RIGIN(40) ,IPATH(40) El 12390 3 ,POIN"R ,VF$1(32) ,VF$UB1 ,GSMALL ( 40, 32 ) E I 12*00 (--iMMHN P^AB^OO^ ) ,PPOTA3(40) , r p l c ( 2 , 40 ) » I0XIE(32) , SETS1 ( 40) .STS ,LIP ,N00 , tLTH rnMMPM ,T0X0( 32) ,SU^P( 32) ,N0S1 ,SUMS2( 32) ,NOOE ,N01 , $PW N0T1SV DIMENSION :>?RDFR( 40),ONF S( 40) ,QINCJ 1 FP(32 ),n*G0UT(40,32l ^HTS SUBPOUTTNF A^UM^S »LL ARRAYS ARE UPDATED e'FVIDUS T1 BETMG CALLED $37 = 33 $!. r H = 34 $PW = 41 $MDF = 42 W n OKPD = s = o T = ,LPGTAB(40) ,NRPLC(2) ,IDXOE<32) tIDXl (32) tSETTK 32) ,NOTl ,SETS(40) ,N0S ,SETS2( 200) ,N0S2 tKEYA ,KEYB ,N01E ♦ *GT ,$N0E »GI NPS1SV ,LMTS2 40,40) ,NFT0UT(40,32) , BLOCK B R B 3 B 8 B B B 8 TALL MINT2« IMPPOV) IK' THIS TALL TO MINI2, GORDEP M ILL BE CALCULATED. LATE* IN EUCH CALL TQ INITGS (AN ENTRY POINT OF HI GORDER W NI2). NOT REMOVAL OF GATES FROM t HE ORIGINAL N El El El El El El El El El El El El El El El El El El El El El El El El El El El CONNECTIONS CALCULATION HAVE B OF THE EEN REMOV CSPF SET I? NOT AFFECTED BY THE IF( IMPRnv.FQ.O)GO TO 1 G/\ T ES = DO 2 I = NM1,NR 00 3 J = Nl ,NR TF( IMr$MX(I,J I.GT.0153 T} 2 3 CONTINUE GATES = G4TFS + 1 2 riNTIMUE PRTNT 4,GA T ES,T 4 FTRMAT(« «,l5 t ' GATFS AND', 13, • I THE NETWORK DUPING THE IMITIAL 1 CONTINUE CDUNT the DUMBER OF 1»S IN THE CSPF VECTOR FOR EACH GATE MAX = DO 5 I = Nl ,NR ?MEC^T = DO 6 J = 1,N2 IF(GS M ALL(I , J) .LF.O)GO TO 6 OvjECMT = one:nt ♦ 1 6 CONTINUE !=(0NECNT.3T.MAX) MAX=ONECN' r ONES (I ) = ONECNT 5 CONTINUE MftX = MAX f 1 MIM = -1 PSUP = 1 7 M!\J = MIN «■ 1 IF(MIN.EQ.MAX ) GO '0 8 DO 9 I = Nl ,NR IF(ONJFS( I ).NE.MIM)Gn tq 9 PORDFR(PSUB) = I PSUP = PSUB *- 1 9 CONTINUE ILL BE E THAT ETWORK.El El El El El El El El El El ED FR0ME1 ) El El El El El El El El El El El El El El El El El El El El El El El 12410 12420 12430 12440 12450 12460 12470 12480 12490 12500 1251C 12520 12530 1254C 12550 12560 12570 12580 12590 12600 12610 12620 12630 12640 12650 12660 12670 12680 12690 12700 12710 12720 12730 12740 12750 12760 12770 1278D 12790 12800 12810 12820 12830 12840 12850 12860 12870 12880 12890 12900 12910 12920 12930 12940 12953 1296D 12970 12980 12990 13000 13010 10 13 30 31 32 28 27 11 19 34 12 33 r,->TP7 CONTINUE S*VE ORIGINAL NETWORK D n 10 T = 1 ,NR m JO J = !. f NR OTNr$M(l f j) = INCtMX(I,J) ;ontinuf SAVE .ORIGINAL OUTPUTS S*VF nQjr,iNAL OUTPUTS IN (2tl280) FCPMAT ST-JP = (NM*N2 ) D1 13 I = START, CTOD o$( 2,r ) = p$IM) rn N TTMUE S»VE ORIGINAL OUTPUTS iw C^DED (40,32) FORMAT D"» 21 I = Ml t NM X = ( I-ll * N2 D"> 23 J = l,M2 Y = PK1 ,X*J) T« r (Y)30,31, 32 "O^P?MENT IS DON'T CARE (I.E., -1) OPGOJT(I,J) = GOTp 2 8 Cl^PDMFMT is LOGICAL ZERO nPGOJT(l t j) = -100 GO TO 28 C^Pl^NT IS LOGICAL ONE ORGCUT(I,J) = 1 :iNTINUE CONTINUE 8L0CKCC CC CCCCCCCCCC PCOUMT = P!OU^t = PCOUNT ♦ I IF(P:nuNT.GT. R)GO TO 23 P r = POPDEP( PCOUNT) IF(Ovjcs( PC!J).EQ.O)GO to 11 TF( PCD.LE.MH )GT T H U ERRORS UNCORRECTABLE, RESTORE NETWORK, TPY AGAIN 03 J 9 I = l t NP D r 19 J = 1,NR IN:$HX(T f J) = QINC$M(I,J) CONTINUE REMOVE GA T E PCO FRO M THE NETWORK O n 12 I = 1 ,NR IFI INC$MX(I, PCOl.EQ.OIG^ TO 34 INC$MX (T ,PCO) = IF(IMC$MX(»CDtII.EQ.OI GO TO 12 TNC$MX(Pri, I ) = CON T INUE U»r>f p G&T= OUTPUTS FOR ALTERED NETWORK c c BLOCK D D D D D D D D D D D D D D D CALL SURNET CALL PV^LUE C«LL unnf:e RESTORE GSM4LL FOP DO 29 I = N1,NM DO 29 J = 1, N2 OUTPUT GATES El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El E 1 El El El El El El El El El El El El El El El El 13020 13030 13040 13050 13060 130 70 13080 13090 13100 13110 13120 13130 13140 1315C 13160 13170 13180 13190 13200 13210 13220 13230 132 40 13250 13260 13270 13280 13290 13300 13310 13320 13330 13340 13350 13360 13370 13380 13390 13400 13410 13420 1343C 13440 13450 13460 13470 13480 13490 13500 13510 13520 13530 13540 13550 13560 13570 13580 13590 13600 13610 13620 GSMALLUtJ) = r PGOU T (I,J) 29 r . "3NTTSJUF ccRpoS = o O n 24 T=l ,N2 24 F°( T ) = DO 14 I = 1 , M MT = M ♦ t X = (NJT - 1» *N2 D n 15 J = 1,N2 TP(5SM<\LL (NI t J) 116,15,17 f r»SF WHEPF PFQUIPEMENT IS 4 ZERO 16 TP(P$(l ,X«-J) .EO.O I GO TO 15 : CtSF OF ONE WITH FRPr'P G^MALLCNIt J) = 1001 FPRCRS = FRPOPS 4- I PD(J) = 1 GO TO 15 "ASF WHE^F REQUIREMENT IS A ONE 17 IF(P$( 1, x+J) .EO.DGn TO 15 r CASE OF ZF»0 WITH ERROR GSM/»lL(NT ,J) = -1100 ERRORS = ERRORS * I EP(J» = 1 15 rr^TTMUF 14 CONTIMUE IF(FRROPS.EQ.0)WPPKED = I IFiE^'ORS.EQ. 0) RETURN! NFP = D n 25 I = 1 ,N2 IF(F=»( I I.EO.O) GO TO 25 MEP = NEP + 1 25 :ONTINUE IF(V'EP.GT.MEPMAX) GO To 11 r BLOrx EFEFFEEEFEEEEEEEEEEE r f&LL POT T »P3T» IS A SUBROUTINE THAT GENERATES THE POTENTIAL OUTPUT TABLE r C BLOCK FFFFFFFFFFFFFFFFFFFF r C SeVE MEW NETWORK OUTPUTS DO 18 J = 1,N2 OT 18 I = N1,NM NET0JT(I,J) = GSMALUTtJ) 18 CONTINUE CALL F0RMG3 TALL INITGS CftLL RCEC(£11 ,£33) C C BLOTK I I I I I I I I I I I I I I I I I I I I r C CftSF DF ALL POSSIBLF GATE REMOVALS EXHAUSTED 23 DO 26 I = 1,NR ")0 26 J = I ,NR INC$*X(I,J) = OINC$M(I,J) 26 CONTINUF :ALL SUBNET T^LL PV«LJE RETURN FN3 El 13630 El 13 640 El 13650 El 13660 El 13670 El 13680 El 13690 El 13700 El 13710 El 13720 El 13730 El 13740 El 13750 El 13760 El 13770 El 13780 El 13 79C El 13800 El 13810 El 13820 El 13830 El 13840 El 13850 El 13360 El 13870 El 138 80 El 13890 El 13900 El 13910 Ei 13920 El 13930 El 13940 El 13950 El 13960 El 13970 El 13980 El 13990 El 14000 El 14010 El 14020 El 140 30 El 14040 El 14050 El 14060 El 14070 El 140 80 El 14090 El 14100 El 14110 El 14120 El 14130 El 14140 El 14150 El 14160 El 14170 Ei 14180 Ei 14190 El 14200 El 14210 El 14220 El 142 30 SlRPnjTlMF PCECl*,*) El 14240 61 142 50 SUBROUTINE for PFMPVING CO NNET IONS BY E&PGR COMPENSATION El 142 60 :. - - El 14270 C El 142 80 r El 142 90 D = c TNlTinNS OF troMMPN* VARIABLES CAN BE FOUND IN MAIN PROGRAM. El 14300 r El 14313 IMPLICIT TNTEGEP*4(A-T,v-Z t $)» PEAL(U) El 14320 —?MMDN MFP^ax El 14330 COMMON \j f m , ft , B El 14340 1 t R , N2 , Nl , NR El 14350 2 , NM f KFLAG ♦ JFLAG » COST El 14360 3 , LEVM , NRN2 t NM1 , NN2 El 14370 —MMpN 7SUCC(40,40) , LISUCC(40) , IPPED(40,40) , LIPRED<40) El 14380 ♦ IMC$MX(40,40) , SUCSMX( 40,40), P$(2,1280) , UNAME(40) El 14393 2 , GLFVFL(4P) , LGLIST(40> , HLIST(40,40) , TIME El 14400 -TMM?vj t , PTrnNN(ioO) , S , RSCONN(IOO) El 14410 COMMON IFLAG ,POINTA ,ESS1S(40) ,F$1(32) El 14420 1 ,F$U«1 ,INPTr V (32) ,LISTC(40) ,POINTC El 14430 2 ,LISTL(40) ,POTN T L ,OPIGIN(40) ,IPATH(40) El 14443 3 ,PO$NTR tVFtlO?) ,VF$UB1 ,G SMA LL( 40, 32) 5 1 1 4450 -n MM n N PTTABI 200 ,«?) ,PPOMB(<*0) ,LPOTAB(40) ,NRPLC(2) El 14460 1 ,PPLC(2,40) ,TDXO(32) ,IDX0E(32) ,10X1(32) El 14470 2 ,IDXIE(32) ,SUMP(32) ,SETT1(32) ,N0T1 El 14480 3 ,SETS1(40) ,NOSl ,SETS(40) , NOS El 14490 4 ,STS ,SUMS2(32) ,SETS2(200) ,NCS2 El 14500 5 ,LIP ,N03F ,KEYA ,KEYB El 14510 6 ,M n ,N01 iNOIE ,$GT El 14520 7 ,$LTH , $PW ,$NDE ,GI El 14530 :DMM0N NPT1SV ,NCS1SV ,LMTS2 El 14540 DI*F^SI0N L!SCN0(200), DK10), 010(10), BM200), El 14550 1 BT0(200),TDXK(32) El 14560 DIMENSION 0PDRP4140) El 14570 C SELECT ONE GATE, GI , WHOSE :SPFE IS ALPEADY CALCULATED. El 14583 C ACCORDING TO THF QRDFP o 1 El 14590 31 = El 14600 LEV =0 El 14610 100 LEV = LEV ♦ I El 14620 IF(I.PV.GE.LFVM) RFTUPN1 El 14630 LGL = LGLIST(LEV) El 14640 LG = El 14650 120 LG = LG + 1 El 14660 IF(LG.GT.LGL )GD Tp 100 El 14670 GI = HLIST(LG,LEV) El 14680 GO TO 150 El 14690 C IM CASE THE ORDERING PI HAS BFEN CHANGED DURING PREVIOUS CALCULA- El 14700 TIGN FOR 51 (THE LEVFL OF GI CAN NEVER CHANGE), FIND THE NEXT El 14710 f GftTE OF GI ACCORDING TO THF CURRENT ORDERING PI El 14720 130 LGL = LGLIST(LEV) El 14730 LG = El 14740 140 LG = LG ♦ 1 El 14750 C IF(LG.GT.LGL)GO TO PO CAN NEVER HAPPEN El 14760 IF(GI.ED.HLIST(LG,LFV) )G0 T 120 El 14770 GO TH 140 El 14780 r**** CONSIDER INPUTS OF GATE GT El 14790 150 IF(GI.LE.N) GO t o 120 El 14800 IF(GI.OT.NM.*NO.GLEVEL(GI ).LF.1)G3 TO 120 El 14810 LIP =LIPPED(GI) El 14820 ^**** INITIALIZE ARRAY (VEC T ^ D ) SUMP AND SUMS2 nr 160 TH=1,N2 SUMS2(TH) = 160 SlMP(TH» = r**** SUM-UP ALL INPUTS n F 01 Dl 180 LP =1. t LIP 0J = TPRED(LP,GI) R«~>J = (~,J-1)*N2 OP 170 TH=1,N2 170 sump( t h) = sump(th) ♦- p$(1,bsgj ♦ thi 180 ccn t inue r**** LIST OtO-FRR?P f 1, 1-ppROP r nyPONENTS OF CSPFE OF 01 NOC = MD1 = MODE = NP1F =0 D? 230 T H=1,N2 IF(GSMALL(GI,TH) ) 190, 2 30, 210 190 IF«GSMALL(GI ,TH) ,LE.-IOTO)GO TO 200 NCO = MOO ♦ 1 IDXO(NOO) = TH SO TO 23^ 200 MOOE = NDDE *■ 1 IDXOE(NOOE) = TH SO TO 230 210 TF(GSMALL(GI,TH).GE. 1000)00 TO 220 NCI = N01 ♦ 1 IDXKNrU) = th GO TO 230 220 N01E = NP1F «- 1 IDXIE(NOIE) = TH 230 CONTINUE 0**** REMOVE REDUNDANT CONNECTIONS By CALLING FORC **** r Ll° = LIP*ED(GI ) KEYA = KEYP = 03 350 LP=1,LIP GJ = IPRED(LP,GI) CALL FORCCGJI 350 CONTINUE C**** COMPARE SUMP WITH THE OUTPUT OF GI TO CHECK WHETHER ALL C ARE CORPECTD OR NCT **** IF(NOOE.EO.O) GO TO 380 NOE=0 DD 370 IDX=1,N00E IF(SUMP(IDXOE( IDX M.GE.l ) GO TO 360 N01 =N01+1 IDXl(N0l)=IDX0E(IDX) GO TO 370 360 N0E=N0E*1 I0X0E(N3F)=IDX0E(I0X) 370 CONTINUE N00F=NOE r**** ALL ERROPS IN GI APE CORRECTED **** 380 IFINOOE.EQ.0.AND.NP1F.FQ.'}) GO TO 1400 C**** CALCULATION 3F EFFECTIVELY CONNECTABLE FUNCTIONS FOR GI r**** ACCESS EACH GATE IN THE NETWORK 400 CNDDT = C D3 490 OR = 1,NP IF(GLFVEL(GP) .EQ. 1 . AND.GR . GT .NM ) GO TO 490 TF(INC$MX(GP,GI ).GE.l.OR.GI.E0.GR.0R.SUC$MX(GI,GP).GE.l)G0T0490 El 14S3D El 14840 El 14850 El 14863 El 148 70 El 14880 El 14890 El 149 00 El 14913 H 14920 El 149 3D El 14940 El 149 50 El 14960 El 14970 El 149 80 El 14990 El 15000 El 15010 El 15020 El 15030 El 150 40 El 15050 El 15060 El 150 70 El 15080 El 150 90 El 15100 El 15110 El 15120 El 15130 El 15140 El 15150 El 1 51 60 El 15170 El 15180 El 15190 El 152 00 El 15210 El 15220 ERRORS El 15230 El 15240 El 15250 El 15260 El 15270 El 15280 El 15290 El 15300 El 15310 El 15320 El 15330 El 15340 El 15350 El 15360 El 15370 El 15380 El 15390 El 15400 El 15410 El 15420 DG0T0490 El 15430 r**** ic r-o IS ro^sjFrTFD TD ALL SUCCESSORS OF Git IT IS NOT A LIS = lisu:c(gi ) IF(LIS.EO.O) GC TO 415 DT 410 L 1=1 » LIS IP( INC$MX (GR»ISUCC(LI.GI ) ).LF.O ) GC TO 415 410 nNTH'JF GC TO 490 415 CONTINUE r**** ThECK T HF or iSSTBLE OUTPUTS OF THAT GATE **** Pt = PP0T4BIGP) !F(PA.LE.O» G^ T 490 PR r LPriT/'R (GR ) Of 4 95 PTR=PA,PP Lth = P1TftB( P T P tSLTH) TF(LTH..E .0) G^ Tn 425 D r 4?^ LT=1 ,LTH !F{ SUT $ M X(GI ,pn-r&R( PTR ,$LTH+LT) 1.GE.1IGC TO 485 IP(INC$MX(POTAB (PTO, $LTH+LT),GI).GE,1I GG TO 485 420 CONTINUE (-*♦** :HECK the EFFECTIVELY C ONNECTAB I L I T Y **** 425 IF(NOl.EQ.O) GO Tn 435 DO 430 TOX=l,NOl IF( PD^ftBlPTR, IDXK IOX) ) .NE.O) GO TC 485 430 CONTINUE ***** PTtab(ptr) I? EFFECTIVELY CONNFFTABLE TO GI **** r**** CALCULATE THE PREFERENCE WEIGHT **** 435 PW = IF( NJDO.EO.O) GO TO 445 DO 440 !DX=l,NHO IF(P0TAB( PTR,I0XO( IDX ) J.GE.DPW = PW + 1 440 C0NTTS1UE 445 IF(NCIE.EO.O) GO TO 460 D" 450 IDX=1 ,NP1F IF(P0TAPIPTR, IDXIE(IOX) 1.GF.1IPW = PW ♦ 1 450 CONTINUE :**♦* SORT CAMDIDATS IN ORDER ACCORDING TO PW 460 IF (CNDD T . EQ.OJGO TO 47 5 DO 470 CR=1,CNPDT CMO = CNDDT-CR+I. IF(PW.LE.PPTAB(LISCND(CND),$PW) )GC TC 480 LISCND(CND+1 I = LISCND(CND) 470 CONTT\JUE 475 CND = 480 LTSCN0(CND*-1) = PTP '•"TftBfPT^ ,$PWJ = PW CNDDT = CNDDT + 1 485 :ONTINUE 490 CCN T TNUF IFtCNDDT.EO.O ) GO TO 1490 :**** CLASSIFY CANDIDATES INTO - \|PPL<-(2) El 1679D TF(P2.F0.0) GH TO 995 El 16800 op 9 q PR=l f r»2 El 16810 GP = RPL r (2tPR) El 1682C NTS = NCS *■ 1 El 16830 SFTS(NOS) = OP El 16840 asr-p = tr,p - n*N2 El 16850 -***♦ "tlZDLtTE T ME ERPOP POSITIONS OF WEIGHT I IN GP ***** El 16860 NTK =0 El 16870 00 840 NO=1,NOOE El 16880 th = tOXOE(NO| El 16890 TF(SIJMP(THI.NF.l.?R.P$t lt*SGP*THI.NE. 1)G0 TO 840 El 16900 NOK = NOK +1 El 16910 IDXK(NOK) = th El 16920 840 CONTINJE El 16930 r**«# rfLTULATE SETS4 ***** El 16940 O n 940 MK=1,NCK El 16950 TH = TOXK (NKJ El 16960 :**** if SETS2(*) =1 OOO+PTP, IT is NOT IN SET S4 ***** El 16970 pr> 870 SR=l t N0^2 El 16980 IF(SETS2(SR).GT.nO'} ) GO TO 870 El 1699C IF(PTT&B(SETS2( SRI »TH) .EO.O) GO TO 861 El 17000 T**** IJPD<\tf SUVS2 ***** El 17010 00 8S"< tt=i ,N2 El 17020 860 SUMS2CTT) = SUMS2(TT) - POT AB< SETS2 ( SR ) ,TT ) El 17030 SETS2(SP) = SETS2(SR) ♦ 1000 El 17040 GO TO 870 El 17050 T**** tp^piririly PUT SETS2(SR) INTO SETS4. PROHIBIT FUNCTIONS WHICH El 17060 C H&S SAME OJTPUT GATE AS SETS2(SP) El 17070 861 CONTINUE El 17080 IF(8RPLC.F0.1) GO TO 370 El 17090 GT=P0TAB(SETS2(SR), $GT) El 17100 0? 865 SRP=1,N^S2 El 17110 IP(S'R.FQ.SR ) GO TP 865 El 17120 IF(SETS2{SRR).GT. 10001 GO TC 865 El 17130 IF(PTT*B( S^TS2(SRP) ,$GT).EO.GT) GOTO 8617 El 17140 IF(P^TAB{SFTS2(S5? ), $LTH).E0.0) GO TO 865 El 17150 M*UN=PCTAB(SETS2(SRR) ,SLTH) El 17160 OP 8615 RUN=1,MPUN El 17170 IF( PPTAB(SFTS2(SRR ) , SLTH+-RUN ) .EO.GT ) GO TO 8617 El 17180 8615 CPN T INUE El 17190 CO T D 865 El 1720C 8617 CONTINUE El 17210 :**** UPDATE SUMS2(*) El 17220 OP 863 TT=l t N2 El 17230 863 SUMS2(TT)=SUMS2(TT)-P0TAB(SETS2(SRR),TT) El 17240 SFTS2(SRP)=SETS2 (^RR)+1000 El 17250 865 CPMTIMUE El 17260 87C CONTINUE c**** :me:k whether op not r ONES OF GP ***** no poo no=i ,noo TT=IOX0(NO) IF(P$(] t PSGP+TT).N I^(S'JMS2( TT J 900 CONTIMUE (-**** s$( 1,PSGP + t-) NO T l = N0T1 «- 1 SET T l (NOTl) = TT 915 CONTINUE r**** JPDATE SJMP ***** DID 920 TH=1 ,N2 SUMP(TH)=SUMP(TH) 920 CONTINUE 3D TO 990 (>**** RESET SETS4 **** 930 00 935 N0=1 t N0S2 IF( SETS2(N0).LT.10 SETS2(N0) = SETS2( :**** UPDATE SETS2 (THIS DO 932 TH=i,N2 932 SUMS2(TH) = SUMS 935 CONTINUE 940 CONTIMUE 990 CONTINUE :**** put RPLC(lt*l INTO SET S 995 STS1 = NOS ♦ 1 ?? = NRPLC(l) IF(P2.EQ.0)5D TO 1005 DO 1300 PR = lt<>2 NOS = NOS «■ 1 SETS(NOS) = PPLC(1,PR) 1000 CONTINUE 1005 I C (BRPLC.EQ.3)G0 TO 1310 NDT1SV=N0TI N0S1SV=N0S1 CALL CALS1 C&LL RPLCF £**** REPLACEMENT BY BIO AND D 1010 N0S2 = NOBI + NODIO C**** JPDATE SUMS2(*> TO OONT« IE(NOBI.EO.O) GO TO 1063 51 * N09I0 «- NODI 0+1 52 = SI ♦ NOBI - 1 DO 1050 N0=S1 ,S2 PT* = SETS2(N0) TF(PTR.GT.IOOO) GO TO ELEMENTS IN SETS4 COVER ALL ESSENTIAL E.l.OR .SUMP(TT ).NE-1) GO *0 900 •EQ.OJGC TO 930 IAL ONES ***** AND T l 00.4ND.SETS2(SP).LT.2000> SP ) *■ 1000 NE.l.nR.SUMP(TT).NE.l) GO TO 915 - P$( 1,BSGP«-TH) OO.OR.SETS2(NO).GT.2000)GO TO 935 NO) - 1000 ELEMENT BECOMES ACTIVE AGAIN) 2(TH) ♦ P0TAB(SETS2(N0),TH) ***** 13 ***** IN THE CURRENT ELEMENTS IN SETS2 ONLY 1050 El El El El El El El El El Ei El El El El El El El El El E 1 El El El El El El El El Ei El Ei El El El El El El El 51 El Ei El El El El El El El El El El El El Ei ****El El El Ei El El El 17270 17280 172 90 17300 17310 1732C 17333 17340 17350 17363 17370 17380 17390 17400 17410 17420 17430 17 443 17453 1746C 17470 17*83 17490 17503 17510 17520 17530 17540 17550 17560 17570 17583 17590 17600 17610 17620 17630 17640 17650 17660 17670 17680 17690 17700 17710 17720 17730 17740 17750 17760 17770 17780 17790 17800 17810 17820 17830 17840 178 50 17860 17870 90 1040 T H=! t N? 61 17880 1040 SUMS2(TH) ■ SU*S?(TH) - POT AP ( PTR , TH) El 1789C 1050 CONTINUE El 17900 1060 C1MTIMUF El 17910 IF(N0S2 .60.91 GO jr< \ 100 61 17920 STS = STS1 El 17930 1F( STS.g t .^OS )00 to hoo 61 17940 N^S1SV=0 61 17950 NOTlSV=0 61 17960 CALL "MSI El 17970 TALL ^Pl_rF 61 1798C -**** -ITMPFNSATI-M OF 1 FRRORS OF CSPFE OF GI El 17990 1100 nNTIMUE El 18000 r**** SIJM-JP \DOFD FUNCTIONS ***** El 18010 : MITTPY SU WC 2 T P rON T MM ONLY ADDED CONNECTIONS 61 13020 *F(MPS2.FQ.O) GO TO 1175 El 18030 DO 117" N0 = 1 ,NrS2 61 18040 ptr = SFTS2(N0) 61 18050 TF(DT5 .GT.1000JG0 To 1170 61 18060 or 1150 T H=1,N2 61 18070 SIJMS2( T H) = SUMS2(TH) - POTAB( PTR , TH) 61 18080 1150 CONTINUE 61 18090 1170 "PNTINUE 61 18100 1175 :ovjt Ivj j E E l 18110 NOS2 = NP*I0 ♦ NODTO ♦ NOR* El 18120 -**♦* L TST UNCOVERED 1-6RR0R COMPONENTS ***** 61 18130 IF(\niF.FQ.O)GP T P 1400 El 18140 NOTO =0 6 1 18150 DO 1200 N0=1,N01E 61 18160 T H = TDX1F(NG ) 61 18170 TF< *UMS?< T H).GF.1 )G0 TO 1180 61 18180 viOTO = \J3T0 + 1 61 18190 GO T^ 1200 51 18200 TH IS roVE=ED ALRFAOY ( T OX 1 F ( * ) >1000 : COVERED) 61 18210 TDXIE(NO) = 1000 ♦- TH El 18220 00NTTNU6 61 18230 IF(NOTO.EO.O)GO to i^OO 61 18240 GO TO 1220 61 18250 NPTO = NP1F El 18260 RESTRICTIONS ON S2 AS STATED IN ALGORITHM MAY BE INSEPTED HERE El 18270 CH5f< 4CTIV6 FUNCTIONS TN S2 61 18280 CCNTINU6 6 1 18290 00 1300 NO=1,NOS2 El 18300 PTR=S C TS2(MG) El 18310 IF(PTR.GT.200C)G0 TO 130C El 18320 :**** CHE:< WHETHER THIS FUNCTION CAN COMPENSATE SOME ONE-ERRORS • El 18330 op MOT El 18340 MCTOO = NOTn El 18350 DO 1230 N36=l t NOl6 El 18360 IF( IDXlE(NOE).GT. 1000)00 TO 1230 El 18370 t=(PPTAB( PTP,TDX16(N0F) ).NF.l)G0 TC 1230 El 18380 MOTO = ^0 T - \ El 18390 IDXIF(NOE) = 1000 ♦ TOXlEtMOEl 61 18400 1230 CONTINUE 61 18410 IF(M0T0.FO.NPT00)G? TO 1300 61 18420 DO 1235 TH=1,N2 61 18430 1235 SU m P( t -«) = SUMP(th)+POTAB( S6TS2(NO) ,TH) 61 18440 SETS2(N0) = 5000 ♦ OTR El 18450 CALL CrNECT(P'R) El 18460 C**** PROHIBIT FUM"TIQMS WHICH HAS SAME OUTPUT GATE AS PTR **** El 18470 !F(N0.F0.N0S2 ) GO TO 1300 El 18480 r * * * * 1180 1200 1210 " **** r**** 1220 SP 1=N0+1 El 18493 OT=P0TAB(PTR, SOT) El 18500 DC 1250 SR=SR1,N0S2 El 18510 I F( SF T S2( SR) .G T .?000l GO TO 1250 El 18523 IF(POT&B( SETS2(S9 ), $GT J.EO.GT) GP TO 1245 El 18530 IF(PTTAB( SFTS2(SP> ,SLTH).EO.O) GO TO 1250 El 18540 MRUN=P1T&R( SETS2( SR) ,SLTH) El 18550 DO 1240 RUN=1,MPUN El 1856C IF(P r )T4B(SETS2(SR) , SLTH+RUN) .EQ.GT ) GO To 1245 El 18570 1240 :?MTINUE El 18580 GO TO 1250 El 18590 1245 SFTS21SR) =SFT S2 ( $R H-2 000 El 18600 1250 rOMTINUE El 18610 1300 CONTINUE El 18620 1400 r?MTt MUE El 18630 C**** APOIMG FX T F*MAL VAPIABLFS TO GI ***** El 18640 0? 1480 GP=1 ,N El 18650 IF( IMT $mx(GP,GI l.GE.l) GO TO 1480 El 18660 RSGP=(GP-1)*N2 El 18670 -**** ;me:k connectability ***** ei 18680 DT 1410 IDX=1,N01 Ei 18690 !F(P$(1,RSGP*1DX1(IDX1 1. GE.il GO TO 1480 Ei 18700 1410 CONTINUE Ei 18710 TF(MOOE.FO.O) GO T^ 1430 El 18720 DO 1420 IDXsltNO^E El 18730 TH=IDX0F( IDX) El 18740 IF(P$(l,BSGP+TH).GE.l.»ND.SUMP(TH) .LE.l) GO TO 1480 El 18750 1420 CONTINUE El 18760 r**** CHEC< WHE t HER OR NOT it COVERS OR 1-ERROR COMPONENTS **** El 18770 1430 CONTINUE El 18780 DO 1440 IDX*1,N00 El 18790 IF(P$( 1,3SGP + IDX0( IDXn.GE. 1) GO TO 1460 El 18800 1440 CONTINUE El 18810 IF(N01E.E0.01 GO Tn 1480 El 18820 DO 1450 IDX=1,N01F El 18830 TH=IDX1E< IDX) El 18840 IF(TH.GT.IOOO) TH=TH-1000 El 1885D IF(P$pAf,^y5 ZERP COMPONENTS ***** El 1930C IF( NDO.EO.O) GO TO 1800 El 19310 r************«****»****************************************************«tl 19320 r ALCULftTlON OF ORDERING P4 El 19330 C ^INCF NO CONNECTIONS ARE ADOFD DURING CALCULATION FOR GATE GI , El 19340 r SUMP(*) HAS THE INPUT SUM OF GATE GI =1 19350 !**** CALCULATE NUMBER OF l-EPROPS AND NUMBER OF ESSENTIAL 1-ERRORS IN El 19360 C ^ACH INPUT OF GI El 19370 DP 1610 LP=1,LIP El 19380 ;p=lPREOILP,GT) El 19390 IF(GO.LE.N) GO Tn 1610 El 19400 NP n NEE=0 El 19410 \'01EES = El 19420 IF(NOOE.FO.O) GO TO 1606 El 19430 R$GP=(GP-1 ) *N2 El 19440 00 1605 N0=l,N0OE El 19450 TH=TDXOE(NO) El 19463 IF(P$(1 ,BSGP+TH).GE.l ) N00NFE=N00NFE*1 El 19470 IP< SUM»(TH).EQ.1.AND.P$( I ,B SGP + TH ) . EC 1 ) N01 EES=N01 EES + 1 El 19480 1605 CONTINJE El 19490 1606 OR3RD4(-;P)=1000000-N01EES*10000-NOONEE*130+LISJCC( GP) El 19500 1610 CONTINUE El 19513 C**** FND OF CALCULATION OP OPOEPING P4 El 19520 DO 1700 N0=!,NOO El 19530 TH = IDXO(NP ) El 19540 PCOPMX = El 19550 0? 1620 LP=1,LIP El 19560 GP = JP^ED(LP,GI) El 19570 BSGP = (GP-1)*N2 El 19580 IF(P$( 1,3SGP+TH).EQ.0)G0 TO 1620 El 19590 C**** TF SOME GATES ARE ALREADY ASSIGNED ONE, DO NOTHING El 19600 I C (3SMALL(GP,TH).E0.1.0R.GP.LE.N) GO TO 1700 El 19610 <-**** COMPARE PRIORITY OF CUMENT GATE WITH PREVIOUS HIGHEST ONE El 19620 IF(GP.LE.NM.AND.GSMALL(GP,TH).GT.1000)G0 TO 1620 El 19630 PODR=0*ORP4(GP) El 19640 IF( POD*.LE.PODRMX)GO Tr 1620 El 19650 POORMX = PODR El 19660 PODRGT = r,P El 19670 1620 CONTINUE El 19680 IF(PODP M X.EQ.O)GP TH 1630 El 19690 GSMALL(P30RGT,TH) = 1 El 19703 r **** r c 16 30 1650 1700 1800 GO TO 1700 THIS ZFP"> I S CTVFRFH ONLY BY OUTPUT GATES WHICH ARE ALREADY ASSIGNED OME-ERRPP. PROPAGATE ZERO EPPOR TO PREDECESSORS WHICH HAVE ZERO COMPONENT H3 1650 LP=1,LIP GP = TPRED(LP,GI ) BS3P = (GP-1)*N2 IF( P$(l,BSGP+TH).EQ.l.nR.GP.LE.N)GO TO 1650 IP(GSMALL (GP,TH).FO.T)GSMALL(GP,TH) * -1100 CONTINUE CONTINUE CONTINUE GO TT 130 END El El El El El El El 61 El El El El El El 19710 19720 19730 19740 19750 19 760 19770 19780 19790 19800 19813 19820 19830 198*3 r**** c c r SU««OU T INE 3PLCF CAICJLATE A SUBSET OF SF T S2 IS LISTED ACCOR SET S2 WHICH DTNG TO ORDER CAN REPLACE SET SI Ql DEFINITIONS OF 'COMMON' VARIABLES C tV-Z f $), PEAL El El El IMPLICIT I^TEGER*4(A-T :OMMPN NEPMAX AN BE FOUND IN MAIN PROGRAM. (U) COMMON 1 » 2 ♦ 3 COMMON 1 t 2 ♦ COMMON T CO^MOM IFLAG 1 t F$UBl 2 ,LISTLUO) 3 ♦POIMTR COMMON PDTAB<200,42) R NM L?VM ISJCC (40,40) in:$mx<40,40) GLEVEL(40) 1 ,RPLC<2,40) 2 .IDX1EJ32) 3 ♦SETSK^O) 4 , STS 5 ,LIP 6 ,NCO 7 ,$LTH COMMON 6000 IF (NOSl.EQ.O) RETURN DO 6200 N0=1,N0S2 TF(SETS2(N0).GT.2OOO) PTR=SETS2(N0) (-**** CHErK ESSENTIAL ONES I KEYT2=0 D? 6100 N0T=1,N0T1 IF(SETTKNOT).GT.IOOO) TH=SETTi (NOT) IF(P3TAB(P T a t TH).LE.O) KEYT2=1 SETT1(N0T)=1000>TH 6100 COMTI>JUE C**** IF T2 IS EMPTY THIS FU IP( KEYT2.LE.0) GO Tn 6 (-**** PROHIBIT PJNfTIONS IN ♦ N2 t KFLAG t NRN2 , LISUCCI40) » SUC$MX<40,4 , LGLISTI40) , RTCONN(ICO) ,POINTA ,!NPTCV(32) ♦ POTNTL ,VF$1( 321 , PP0TAB<40) ,TDX0(32) ,SU«P( 32) ,N0S1 ,SUMS2(32 ) ,N30E tNOl ,$PW N0T1SV ♦ A , Nl , JFLAG , NM1 , IPRED<40,40) 0)t PS(2 t 1280) , HLIST<40,40) » S ,ESS1S<40) ,LISTC( 40) ,0RIGIN<40) f VF$UBl ,LP0TAB(40) ,IDX0E(32) ,SETT1(32) ,SETS<40) ♦SETS2C200) ,KEYA ♦ N01E ,$NOE ♦N0S1SV GO TO 6200 N SI GO TO 6100 GO TO 6100 NCTION IS NOT 200 S2 MHKH USE B NR COST NN2 LIPRED(40) UNAME(40) TIME RSCONNC 100) F$l(32) POINTC IPATH(40) El El El El El El El El El El El El El El El GSMALL(40,32)E1 NRPLC(2) IDXK32) N0T1 NOS N0S2 KEYB $GT GI MTS2 IN SET S3 SAME OUTPUT GATE AS PTR ***** El El El El El El El El El El El El El El El El El El El El El El El El El 19350 19860 19870 19880 19890 19900 19910 19920 19930 19940 19950 19960 19970 19980 19990 20000 23010 20020 20030 20043 20050 20060 20070 200 80 20093 20100 20110 20120 20130 20140 20150 20160 20170 20183 20190 20200 20210 20220 20230 20240 20250 20263 20270 20280 20290 6120 614^ Z **** 6130 6145 6150 T **** r r 61 60 6180 6190 6195 6200 C**** r**** 6210 6220 0**** c **** c c**** 6290 6300 C **** TO TO 6140 6150 GO TO 6140 I c (K?T l SV.3T.0j GOTO 6lB0 N0T1SV>0 => B*»l:>0 => SETS2 IS COMPATIBLE sw=o :,T = P"'T&B(PTQ t $GT) D n 6150 IDX=l f LMTS2 IPl IDX.EO.NP) GO TO 6150 IF( SETS2(TDXJ .GT.2000) GO to 6150 TF( POT A R( SETS 2 ( IDX) ,$GT).EO.GT) GO TF(P0TAB(SETS2( I DX ) , tL T H ) . EO.O ) GO wp'|sj = p->t 4B ( SETS2( IDX) , $1 T n> O r 6 120 ^l.»M = l,MRUN IF ( POT* R (SETS 2 ( I OX I , $1 TH+R J N) . E Q.GT ) :?MTlvn;- gt rn 6150 :on t inue if( i0x.gt.n0s2) go tq 6145 SW = 1 tJPTATP SUMS2 ***** 03 6130 T H=1,N2 SliyS2(TH)=SUMS2(TH)-P0 T AP(SFTS2( IDXI,TH) SFTS2( ! r 5X) = 3000*SETS2(IOX) CONTINUE IFCSW.EO.-TI GO TO 618') :hf:< whe t h = : > S2 still :over all essential ones or not *** IF YFS CONTINUE T HIS PROCEDURE, OTHERWISE RECALCULATE SI A PEPFAT THIS PROCEDURE D n 61 60 NiT = i,NC!Tl IF(SETTKNOT).GT.IOOO) GO TO 6160 !F(SUMS2(SETTKMOTi).LE.OI GO TO 6190 CONTINUE SFTS2(N0)=V?'>0 + PTR GO TT 6200 CONTTMUE DO 6195 TH=1 ,N2 SU^S2( T H)=SUMS2(TH)-P0TAB( PTP t TH) SFTC2(NJ0)=PT^*2000 30 T l 6500 '3NTINUE REPLACE FJNCMPNS IN SI BY FUNCTIONS IN S2 **** D n 6300 N0=1,LMTS2 PTR=SETS2(N0) IF(PTR.GT.5000) GO IF(PTR.GT.4000) GO IF(PTR .GT.3000 ) GO GC TO 6300 ADDING P0T»3( PTR , *) rONTINUE DO 6220 TH = 1 ,N2 SUMP(TH)=SUMP(TH)+P0T4P( PTR-4000,TH) RECORD THIS FUNCTION HAS BEEN CONNECTED ( SETS 2< * » >5000) SETS2(N0) =1000+PTR CONNECT THIS FUNCTION TO 0,1 AND HAKE OTHER CONNECTIONS NEC FOR REALIZING THIS FUNCTION 3ALL C0NECT(PTR-4000) GO TO 6330 T HIS FUNCTION CAN NO LONGER SFTS2(N3)=PTR-\000 CONTINUE DISCONNEXION PPEOECESSORS DO 6400 N3=1,NDS1 GP=SETS1 (NO) ** ND TO TO TO 63^0 6210 6290 TO SUMP **** BE USED TO REPLACE OTHER FUNCT OF GI IN SET SI El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El El ESSARY El *****E1 El El IONS ***E1 El El El El El ***** 20300 20310 20320 20330 20340 2035C 20360 20373 20380 20393 20400 20410 23423 20430 20440 20450 20460 20470 20480 20490 20500 20510 20520 20530 20540 20550 20560 20570 20580 20590 20600 20610 20623 20630 20640 20650 20660 20670 20680 20690 20700 20710 20720 20730 20740 20750 20760 20770 20780 20790 20800 20810 20820 20830 20840 20850 20863 208 70 20880 20890 20900 6400 c**** 645* r **** 6500 tn:*mx(gp,gi )=o RTCON C3MTI MAKE N(T)=1D0*GP*GI MUE PFRMM 6510 6520 C**** 6530 6550 **** 6580 6600 C**** 6650 D? 64 IF( tONT! RETU^ SET S c^ntt DO 65 u? IF( IF( IF( GD MAKE SFT GO SE M62000 : REMOVED ) (2000>S>1000 : TEMPORARILY REMOVED l,NOS D) . LT. 2000. AN D. S ETS ( ND ) . GT . 1000) SETS( NO ) «SETS ( NO) ♦ OT PEPLACABLE BY S2. RECALCULATE SET SI E FUNrTlONS WHITH CAUSED THIS SITUATION **** 1.LMTS2 ( MO) .5000) GO TT 6550 .^O^O) GO to 6510 .3000) GO TO 6520 LEMFNT ACTIVE ***** =PTP-4000 ) = pTR-300'» LE M FNT ACTIVE **** N3S2JG0 TO 6550 TH=1,N2 H) =SUMS2( T H) + oO T AB(SETS2(NO) ,TH) EMENTS OP SFT SI TO SUMP l,NOSl NO) 1)*N2 4*1, N2 )=SUMP(TH)+P$(1, BSGP+TH) SET S ***** 1, NOS 3) .GT.2000) GO TO 6650 3).LT.1000) GD T D 6650 SETS(N0)-1000 El El El El El ) El El 1000E I El El El El El El El El El Ei El El El El = 1 El El El El El El El El El El El El El El El El El El El El El 20910 20920 20930 20940 20953 20960 20970 20980 20990 21000 21010 21020 21030 21040 21053 21063 21070 21080 21090 21100 21110 21120 21130 21140 21153 21160 21170 21183 21190 21200 21210 21220 21230 21240 212 50 21260 21270 21280 21290 21300 21313 21320 21330 21343 SUBP3UT!NE SUBNET DEFINITIONS DP 'COMMON' VARIABLES CAN BE FOUND IN MAIN PROGRAM IMPLICIT INTEGER*4(A-T f v-Z,$), REAL(U) COMMON NEPMAX C0MM3N 1 t 2 ♦ 3 , COMMON 1 2 , :^mm3n COMMON ■M » R , NM , LEVM , ISJCC(40,40) , IN:$MX(40 f 40) , GLEVEL140) , T M , N2 , KFLAG , NRN? , LISUCC(40) , SUCSMXi 40,40) , LGLIST(40) , RTCONN(IOO) , A Nl JFLAG NM1 IPRED(40,40) P$(2,1280) HLIST(40,40) S IFLAG ,PDIN T A ,ESS1S(40) , B , NR , COST , NN2 , LIPRE0(40) , UNAMEI40) , TIME , RSCONN(IOO) ,F$1(32) El El El El El El El El El El El El El El El 21350 21360 21370 21383 21390 21400 21410 21420 21430 21440 21450 21460 21470 21480 21490 1 ,F$IJB1 ? ,LIST|_<40) 3 , PPINTR -OMM3M P r >TAB(20 1 ,RPLC<2,40) 2 ,!0X1F(32) 3 ,SE T S1(40) 4 ,STS 5 ,LIP 6 ,M00 7 ,$LTH DnFNSION X(40),L FNTPY PPESUC I C^^TIMUE 0? 10 G I = 1 , N R LP = D" 5 GJ = 1,\J9 IF( INC$MX(GI,GJ L S=LS*1 ISUCCiLS , GI)=G 53 T1 5 3 IF( INC$MX(GJ,GI LP=LP*l IPRED(LPtGI) =G 5 CONTINUE L!SUCC(GI)=LS LIP*ED(GI)=LP 10 CONTINUE FNTPY SUCCES 00 21 GI»ltMR DH 21 GJ=1,NR SUCS^XIGI ,GJ)*0 21 CQNTIMUE DO 3 GJ=Ni,NR 0"! 22 6S*l f MR X < GS ) = 22 r^NTINUE X( GJ1«1 10=1 LX(1 ,1 ) =GJ V = l 23 "DMTMijp V=l-V SW0=1+V SW1=2-V Ll = 00 28 LL=1,L0 3M=LX( LL.SWO) LI»*LTPRFD< GM) IF(LIP.EQ.O) GO 3^ 26 LP=1,LTP GP=IPPED(LP, GM IF(X El 22560 LIS=LISUC:ST = a El 22810 IF(LFV^.r,T.LM4X)S n T P 160 El 22820 On 150 0T=N1,NP El 2283C TPJLIPOFDfGI I.GT.FANTNIG^ TO 160 El 22840 IF( L ISUCCI GT ).GT.F»N3UT)G0 TO i 6 El 22850 150 ^NMNUE El 22860 CE T U=N El 22870 160 *FYRS T =1 El 22380 RETURN El 2289C FNTBY IJNNE'E El 22900 r***** ^HIS ENTRY DISCONNECT *LL GATES FRCM WHICH THERE IS MO PATH El 22910 C Tn OUTPUT GATES ***** El 22920 TS=T El 22930 DO 209 GI«1*1 ,NR El 22940 TF(GLEVEL(GI I.EO.l I GO To 207 El 22950 0"< 205 GJ = M1 tNM El 22960 IF(Sjr$yX( GIf GJ I.GT.O) GO TO 209 El 2297C 205 "PMTINUF El 22980 r****« cj js R C OJMOANT ***** El 22990 207 CONTINUE 51 2300C L!P=LIPP c O(GI) El 23010 T c (LIP.EO.O) GO Tn 206 El 23020 DO 203 LI=1,LIP El 23030 5K»IPRFDCLI t GI ) El 23340 IF(IMC$yx(GK, GII.LE.01 GO TO 203 El 23053 T = T + 1 5 1 23060 'T"OMN(T) s i IOO*GK + OI El 23070 TN r $MX(GK,GI )=0 El 23080 203 rn NTiNUE El 23090 206 LTS=IISU:: T E? ALL COMMON VARIBLES MIGHT COMMO $3 $Lr iND VARIABLES: POINTS TO A IN THIS COL. POINTS TO A •COLUMN' OF TELLS GATE •COLUMN' OF ENTRY E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 POTAB. FOR EACH •ROW THE WHERE FN. IS REALIZED. POTAB. FOR EACH 'ROW THE ENTRY IN THIS COL. TPLLS HOW MANY CONNECTIONS MUST BE ADDED. POINTS TO A 'CHLUMN' OF POTAB. FOR EACH 'ROW' THE ENTRY IN THIS COL. TELLS THE NUMBER OF 1-ERRORS CREATED IF THIS ROW IS USED. $PW: POINTS TO A 'COLUMN* OF POTAB. FOR EACH 'ROW 1 THE ENTRY IN THIS COLUMN TELLS THE PREFERENCE WEIGHT. A: WEIGHT POR NO. OF GATES IN COMPUTING COST FUNCTION. B: WEIGHT FOR NO. PF CONNECTIONS IN COMPUTING COST FUNCTION. COST: COST OF NETWORK - A MEASURE OF NETWORK SIZE. ESSIS: RECORD* NO. OF ESSENTIAL l»S IN EVERY INPUT TO CURRENT GCOE2 (POSITIONS IN ESSIS CORPES. TO GATES NOT FEEDING GCO ARE E2 IGNORED). E2 FtU^l: POINTS TO LAST FLFMENT IN F$l. F$i: LISTS (CONSECUTIVELY) POSITIONS OF DESIRABLE 1«S (FOR COVERING) IN A CONNECTIBLE FUNCTION. Gl: LA3EL OF A PARTICULAR GATE. GLEVFL: GLEVEL(GI) TELLS WHICH LEVEL OF THE NETWORK GI IS IN. 3SMALL: STORES INTERMEDIATE AND FINAL CALCULATED CSPF'S. HLIST: HLISTCIfJI GIVES NAME OF I-TH GATE (OR EX. VAR . ) WORK LEVEL J. TDXO: LIST OF O-COORDI NA Tf S IN CSPFE CONSIDERATION. IOXOE: LIST OF O-FRROR-COORDI NAT ES IN CONSIDERATION. IDKl: LIST OF 1 -COORDINATES IN CSPFE OF THE GATE UNDER rONSIDERATTQN. IOX1F: LIST OF 1-ERROR-COORDINATES IN CSPFE OF THE GATE UNDER IN NET- OF THE GATE UNDER CSPFE OF THE GATE UNDER E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 OOOIO 00020 00030 0004C 00050 00060 00070 00080 00090 00100 00110 00120 00130 00140 00150 00160 00170 0018C 00190 00200 00210 00220 00230 00240 00250 00260 00270 00280 00290 00300 00310 00320 00330 00340 00350 00360 c CDNSIOFRATION. E2 00370 r T F L * G : SA«E AS EYFFlG IN SUBROUTINE PPOCII. E2 00380 c TNC$mx : IN"tMX(GI,GJ)>0 MEANS THERE EXISTS A CONNECTION FROM GATE E2 00390 r (OR EX. VAR.) GI T n GATE GJ. I NC $MX ( GI , GJ ) = IF NOT. E2 00400 c ISJDT-y/: LISTS FOP FAT.H CORRESPONDING ENTRY OF F$l, HOW MANY INPUTSE2 00410 c HAVP A »1' IN T HE POSITION INOICATED BY F$l. E2 00420 r IPAT4: TOATH(GI)=l MEANS G*TE GI IS ON A PATH FROM A CERTAIN GATEE2 00433 c TO &M OUTPUT GATE. OJHFRWISE IPATH(GI) = 0. E2 00*40 c I PR ED: I°RF0(I,GJ) GIVFS THE NAME OF THE I-TH GATE OP EX. VAR. INE2 00450 r A LIST OF r,«TFS AND EX. VAR. FEEDING GJ. E2 00460 r TSUCC: ISUCC(ItGJ) GIVFS THE NAME OF THE I-TH GATE FED BY GJ. E2 004 70 r L J=L&G: SAME AS JAYFLG TN SUBROUTINE PPOCII. E2 00480 c 0 MEANS GATE GJ IS A SUCCESSOR OF GATE GI. MX(GI,GJ ) = IF NOT. OF ALL ACTIVE INPUTS OF THE GATE UNDER CONSIDERATION. OF ALL ACTTVE ELEMENTS OF SET S2. ER OF CONNECTIONS REMOVED FROM A NETWORK. POINTS TO ENTRY IN RTCONN. TO STORE AMOUNT OF ELAPSED COMPUTATION TIME. ONIC NAMES FOR EXTERNAL VARIABLES AND GATES. TS TO LAST ELEMENT IN VF$1. LAR TO FS1, EXCEPT THIS LISTS JUST COMPONENT 0«S IN CSPF VECTOR OF GCO) COVERED ONLY BY INALLY CONNECTED INPUTS TO GCO. IMPLICI :ommon COM^DN T INrEGER*4(A-T,V-Z,$), NEPMAX N ♦ M R , N2 NM , KFLAG LEV** » NRN? REAL(U) A Nl JFLAG NM1 E2 E2 E2 E2 INE2 E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 E2 POSITIONSE2 REMAINING E2 E2 E2 E2 E2 E2 E2 B E2 NP E2 COST E2 NN2 E2 00980 00990 01000 01010 01020 01030 01040 01050 01060 010 70 01080 01090 01100 OHIO 01120 01130 01140 01150 01160 01170 01180 01190 01200 01210 01220 01230 01240 01250 01260 01270 01280 01290 01300 01310 01320 01330 01340 01350 01360 01370 01380 01390 01400 01410 01420 01430 01440 01450 01460 01470 01480 01490 01500 01510 01520 01530 01540 01550 01560 01570 01580 rr M |*PN ISUCCC40 ,4->) , LISUCC<40) t IPRED(40,40) , LIPRED14C) E2 01590 1 , IMC$MX( 40,40), SUr$MX( 40,40) , P$(2,1280) , UNAME(40) E2 01600 2 , GLEVEU40) , LT,LIST(40) t HLIST(40,40I , TIME E2 0161C :n M wnN T , R^CONN(IOO) , S , RSCONN(IOO) E2 01620 CUMMIN I c LAr, ,c»OINTA ,FSS1S(40) ,F$1(32) E2 01630 1 ,f$UB1 ,TNPTCV(32) ,LISTC(4C) ,POINTC E2 01640 2 ,LISTL<40) ,POINTL ,PRIGIN(40) ,IPATH<40) E2 01650 3 .PPINTR T VF$1( 32) ,VF*UB1 ,GSMALL ( 40,32 ) E2 01660 rnMMGN P~\ T A R ( 20 ,42 ) , P P OT A 8 ( 40 ) ,LP0TAB(40) ,NRPLC<2> E2 01670 1 ,»PL: ,SETT1(32) ,N0T1 E2 01690 3 ,SE T S1(4^) ,N0S1 ,SETS(40) ,NOS E2 01700 4 ,$tc ,SUMS?(32) ,SETS2(200) ,N0S2 E2 01710 5 ,LIP ,NO0F ,KFYA ,KEYB E2 01720 6 ,NHO ,N01 ,N01E ,$GT E2 01730 7 , $LTH ,$PW ,$NCF ,GI E2 01740 Chmvpm N0T1SV ,N0S1SV ,LMTS2 E2 01750 DIVEMSION :M T LIS<144) ,UGATE<40) ,UHEAD(20) E2 01760 OAT t K0JNT5 /O/, UBLAMK/' •/ E2 01770 NEP^AX IS T4«= M/SXTMUM ALLOWABLE NUMBER OF ERROR POSITIOMS E2 01780 990 » c iP( 5, 1000,END=500) UHFAD, N, M, R, A, B, UC , NEPMAX E2 01790 1000 FPPMAT (20A4/5T4,A4, 14) E2 0180C KFYX:=n E2 01810 IF( IT .NE.JBLANK ) KFYXC=1 E2 01820 r «LL PAGF E2 01830 "ALL LINF(IO) E2 01840 KrurT5=K0tNT5+l E2 01850 POTKr 2, K0UN T 5 E2 01860 2 c.-tpMiT, ?0X, •*** npTfMiL NOR NETWORK ***• ,50X ,• PROBLEM N0.= %I4 ) E2 01870 CALL LTNE(4) E2 01880 PRINT 1005, UHE4D E2 01890 1005 F?RM»T( 25X.20A4) E2 01900 CALL LTMF(4) E2 01910 PRINT 10, N,M,A,R E2 01920 10 F?R«AT( 30X, 'NUM3EP "»F VARIABLES = ',14 // E2 01930 1 30X, 'MIIMBER <^F FUNCTIONS =«,T4 // E2 01943 2 30X,T.0ST COEFFICIENT A =*,l^// E2 01950 3 47X, «B =• ,14) E2 01960 "ALL LINE(l) E2 01970 IF(KFYXC.NE.O) GO T 25 E2 01980 PRINT 21 E2 01990 21 FPBmat(ihO,29X, • UNCHMPL EMFNTED VARIABLES X •) E2 02000 GO T 3 30 E2 02010 25 CONTINUE E2 02020 PPTN T 28 E2 02030 28 F13MAT( 1H0,29X, • BOTH COMPLEMENTED AND UNCOMPLEMENTED VARIABLESE2 02040 1 X, Y ' ) E2 0205C 3T CONTINUE E2 02060 CALL LINF( 5) E2 02070 r***** SET UP EX^FPNAL VARIABLES ***** E2 02080 N2=2**N E2 02090 IF( NEPMAX. E3.0)NFPMAX = SI2/2 E2 02100 H=M*N2 E2 02110 J=N2 E2 02120 L= 1 E2 02130 1=0 E2 0214C 00 1011 TI=1,N E2 02150 J=J/2 E2 02160 L=L*2 E2 02170 SM= 1 E2 02180 01 1010 LL=1,L E2 02190 V=( H-SN )/2 D^ 1009 JJ=1,J T =T * 1 PS( 1, I )=V TF(KFyxC.NE.OIP$(ltI*H»=l-V 1009 :tntimup 1.010 continue 1011 continue IP(KPYXr.\|P.O) N=N+N Ml = M + 1 NM=N«-M NMI = VJM*1 NN2=^*N2+1 NP=N*R NRVJ2 = N1R *N? CALL OJTPJT ( INC$MX,KFYXC ) :.***** ^EftQ IN NETWORK INFORMATION READ 1001, CNTLIS 1001 F0PMA T (16I5) D1 1115 01=1, NR m 1115 GJ*1,NR 1115 INC$MX(GI,GJ)=0 OP 1120 1=1,144 ITEM = CNTLIS( I) !F( ITEM.Eq.O) GO TO 1119 GIMTEM/100 GJ=TTEM-100*GI IMC$MX(GI,GJ)=1 G3 TO 1120 r,OST = &*R+B*( i-i ) zn th ii3o C3MTIMUE continue :all subne t call pvalue call line!*) PR TNT 1140, COST F0PMAT(20X, • ORIGINAL NETWORK CALL LINEC+) ANO SET UP INC$MX ***** 1119 1120 1130 1140 COST*', 151 CALL TRUTH$,1> CALL LINF(4) C r*' CALL CKT(INC$MX,GLEVELI **** ENTRy REDJSOANCY CHECK ***** s = o T = CALL UNNECE GATES = M C = DO 4 GI = 1,NR C = ■ C ♦ LISUCCCGI ) IFCRI.LE.NMI50T04 IF(LISUCr(GI I.GT.O)GATES =GATES+1 4 CONTINUE NEWCST = A*3ATES * B*(C) ITERFN = 3 ^LICST = NEWCST ITEPTN = TTERTM ♦• 1 POINT 2444,ITERTN 2444 FHR^AT( »li t 5X,«**** BEGIN »,I3 f , -TH APPLICATION OF E2 02200 E2 02210 E2 02220 E2 02230 E2 02240 E2 02250 E2 02260 E2 02270 52 02280 E2 02290 E2 02300 E2 02310 E2 02320 E2 02330 E2 02340 E2 02350 E2 02360 r E2 02370 E2 02380 52 02390 E2 02400 E2 02410 52 02420 E2 02430 E2 02440 E2 02450 E2 02460 E2 02470 E2 02480 E2 02490 E2 02500 E2 02510 E2 02520 E2 02530 E2 02540 E2 02550 E2 02560 E2 02570 E2 02580 E2 02590 E2 02600 E2 02610 E2 02620 E2 026 30 E2 02640 E2 02650 E2 02660 E2 02670 E2 02680 E2 02690 E2 02700 E2 02710 E2 02720 E2 02 730 E2 02740 E2 02750 E2 02 760 E2 02770 E2 02780 E2 02 790 PROCCE : E2 02800 I ************•///////) E2 02810 t=o E2 02820 S=n E2 02830 P !N TT IA|_!ZF T !MEP *0 10 MINUTES E2 02840 :*LL STIMEZ(60000) E2 02850 TI«f = K'T^FZ(O) E2 02860 r**** PRTFDUPE COMPENSATE ERRORS ************************** **********f= 2 02870 CALl P3nc:E( WORKED ) E2 02880 r rALt FOR ELAPSED TTyc E2 02890 T I^E = K T IMFZ(0) - TIME =2 02900 CftLt LINF(4) E2 02910 PPTNjr 3915 E2 02920 3916 =-^"AT{20X f «TlME FLAPSED =«,I8,' C ENT IS ECONDS • ) E2 02930 3915 F3RMATC 20X, 'NETWORK DERIVED BY PROCTER E2 02940 PRTNT 3916,TIME E2 02950 CALL LIMFI4) E2 02960 CM 1 TRU"H( P$,l) E2 02970 TALL LTNF(^) E2 02980 :«ll :k t un:smx,glevel) E2 02990 GATES = M E2 03000 r = E2 03010 f)"» 36 GI = 1 V NR E2 03020 r = P «■ LISJCC(GI ) E2 03030 IF(GI.LE.NM) GC r^ 36 E2 03040 TFILISUCC(S?1 .GT.o) GATES » GATES ♦• 1 E2 03050 36 CCWTIMUE E2 03060 NEWCST = A*GATFS ♦■ B*P E2 03070 IF(NErfCST.LT.0LDCSTJG3 TO 37 E2 03080 PPTNir 105 E2 03090 105 c^RM&tch ,10X,»NO REDUNDANCY FOUND.') E2 03100 GO TO 990 E2 03110 37 CALL LINF(3) = 2 03120 POIMT 320,MFWCST E2 03130 320 F-)cy ft T(9x, t* A METWDPK DE*IVFD BY PPrCCE'/9X,' COST = • , I 5, • . • ) E2 03140 IF( WDPKED.EQ.DGO T 3 E2 03150 CALL LI NF (31 E2 3160 PRINT 301 E2 03170 301 >=-p.MA.T(9X,'* PPQCPP PANNOT REOUCE THE PRECEDING NETWORK FURTHER 1 ) E2 03180 G3 n 990 E2 03190 500 STDP E2 03200 EN") E2 03210 *************************************************** * * * THE RFST OF THE SUBROUTINES * * REQUIRED FOP NETTRA-E2 ARE: * * * * CALSlt CP-NECT, FORC, MINI2, 0RDRQ2, OUTPUT, * * pr.T, PROCCE, RCEC, RPLCF, AND SUBNET. * * * * * * (THESE ARE IDENTICAL TO SUBROUTINES OF * * THE SAME NAMES LISTED FOR NETTPA-E1.) * * * *************************************************** ***t*4.**********************************«*******************************» oppp RRRP one i s SG RRRR A M M p p R G G R P A A MM MM p p P R G P R A A M M M M PPPP RRPP n G GG RRPR AAAAA M M M p R P G G R R A A M M p R P ooo GGG R R A A M M N M NN N N N N N MM N N N N EEEFE E E EEE E EEEEE TTTTT ▼ T T T T TTTT' T T T T T RRPP P R R P RRRP R P R R A A A A A AAAAA A A A A XXXXX EEEEE E E EEE E EEEEE 33333 3 3 3 3 3 333 ************************************************************************* ****** * * * * * * * * * * * * * * * * * * * ****** SUBROU E0ITI3 INE MAIN AAAAAAAAA NOT: ALL :OMMON VAPIRLES MIGHT COMMON $LTH *NOE: $PW A B COST' ESS1S: FijBl F$l GI SLEV5L GSMCLL HLIST IDXO: IOXOE IDX1 IDX1E VARIABLES: POINTS TO IM THIS C POINTS TO IM THIS C POINTS TO IN THIS C ROW I S US POINTS TO IN THIS C WEIGHT FO WEIGHT FO COST OF N RECORDS N (POSITION IGNORED). POINTS TO LISTS (CO covering) LABEL OF GLEVEL(GI STDRES IN HLIST (I, J WORK LEVE LIST OF CONSIDERA LIST OF CONSIDEPA LIST OF I CONSIDEPA LIST OF 1 OF ENTRY E3 AAAAAAAAA A AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE3 E3 NOT BE USED IN THIS PROGRAM. E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 A 'COLUMN' OL . A CL. A POTAB. FOR EACH 'ROW 1 THE TELLS GATE WHERE FN. IS REALIZED. •COLUMN' OF POTAB. FOR EACH 'ROW' THE ENTRY TELLS HOW MANY CONNECTIONS MUST BE ADDED. •COLUMN* OF POTAB. FOR EACH 'ROW' THE ENTRY OL. TELLS THE NUMBER OF 1-ERRORS CREATED IF THIS ED. A 'COLUMN' OF POTAB. FOR EACH 'ROW' THE ENTRY OLUMN TELLS THE PREFERENCE WEIGHT. R NO. OF GATES IN COMPUTING COST FUNCTION. R NO. OF CONNECTIONS IN COMPUTING COST FUNCTION. ETWORK - A MEASURE OF NETWORK SIZE. OF ESSENTIAL l'S IN EVERY INPUT TO CURRENT GCOE3 IN ESS1S CORRES. TO GATES NOT FEEDING GCO ARE LAST ELEMENT IN F$l. NSECUTIVELYI POSITIONS OF DESIRABLE l'S (FOR IN A CONNECTIBLE FUNCTION. A PARTICULAR GATE. ) TELLS WHICH LEVEL OF THE NETWORK GI IS IN. TERMEDIATE AND FINAL CALCULATED CSPF'S. ) GIVES NAME OF I-TH GATE (OR EX. VAP.) IN NET- L J. -COORDINATES IN CSPFE OF THE GATE UNDER TION. -ERROR-CPGRDINATES IN CSPFE OF THE GATE UNDER TION. -COORDINATES IN CSPFE OF THE GATE UNDER TION. -ERPOP-COORDINATES IN CSPFE OF THE GATE UNDER E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 OOOIO 00020 00030 00040 00050 00060 00070 00080 00090 00100 00110 00120 00130 00140 00150 00160 00170 00180 00190 00200 00210 00220 00230 00240 002 50 00260 002 70 00280 00290 00300 00310 00320 00330 00340 00350 00360 c r r r C .. r c r r r r c c r r r r. r r C r r r c c c r c c r r r c r r C r r r c c r r r IFL&G im: $*x: i njot: v Tppf 0: isuc: : JFLAG: *FY» KFYB: < F L A G : LFVM: LGLTST: LT pi LIPPED; LISTC LISU : LISUCC; LMTS2: LPnTftB : m; NEpm&x: Mm NN2 NTS NCS1 N0S1SV UPS 2- ncti: NOUSV: NDOi NCOE: roi M C ! E ! NR: NJRPLC: Ml: N2: n\s T deration . s&mf as eyfflg in subroutine ppocii. in: $mx(gi ,gj) >o mfans there exists a conn c-»p fx. var.) gt tp gate gj . inc$mx(oi,g ltstc for farh corresponding entry of f$l ha v ' c 4 m • tm the pcsition indicated by f tpath(gi)=1 means gate gi is on a path fr TO (M ^uTPtr GATE. OTHERWISE IPATH(GI) = IPRFDII.GJ) GIVES THE NAME CF THE I-TH GA A LIST OF GATES AND EX. VAR. FEEDING GJ . ISUCC(l f GJ) GTVES "HE NAME OF THE I-TH GA SUBROUTINE PPOCII. IF ANY ERPCR COMPENSATI E3 E 3 FCTICN FROM GATE E3 J) = IF NOT. E3 , HOW MANY INPUTSE3 $1. E3 CM A CERTAIN GATEE3 0. TE OP EX. VAR IF ANY PRIMARY O-ERP PR-COORD I NA TE S HAS EX. VAR. ARE ALSO IN LEVEL J PF SA*E AS JffYFLG IN A ^LAG INDICATING PESFCRMED. A FL»G INDICATING RE C N COMPENSATED. SAME AS KFIFLG IN PPOCII. NJMBFR °F LEVFLS IN THE NETWORK (NCTE ASSIGNED LEVELS JUST LIKE GATES). LGLIST(J) 'FLLS NT. OF GATES AMD EX. VAR. NE r WORK . NUMBER OF PREDECESSORS FOR THF GATE UNDER LIP8PDIGI) T FLLS NQ. 3F IMMEDIATE PREDECE ORDERED LIST OF C°NNECTIBLE INPUTS TO GCO DECEASING NO. CF O'S IN GCC COVERED. 0° DEB ED LIST OF GATES AND FX. VAR. WHICH GCO AND WHICH HAVE NOT YET BEEN DISCCNNEC DECREASING N3. OF ESSENTIAL 1«S. LISJCC(GI) T FLLS NO. OF IMMEDIATE SUCCESS EX. VAP.) GI. UP°F* LIMIT p F THE NUMBER OF ELEMENTS IN FOR GATE GI, LPPTAB(GI) POINTS TO LAST RO CONCERNING GI . NJMBER CF NETWORK OUTPUT GATES. NijmreR OF EXTERNAL VARIABLES (CR INPUT FN FO* ERROR CPMPENS" T ION PROGRAMS. IF TRE FRROP PPSI T IPNS OCCUR WHEN A PARTICULAR G PROGRAM SKIPS ATTEMPT TO COMPENSATE FOR T REMOVAL. VALUE CAM BE SPECIFIED BY TC PNF HALF PF \I2 BY DEFAULT. SUM OF N PLUS M SJH -if NM PLUS 1. PPTDUCT OF N AND N2. NIM3ER OF ELEMENTS IN IN IN TE FED BY GJ. ON HAS BEEN CONSIDERATION SSORS OF GATE . ORDERED BY GI USER ORIGINALLY FED TED. ORDERED BY OPS OF GATE (OR SET S2. W OF POTAB C.) AVAILABLE. THAN NEPMAX ATE IS REMOVED, HAT GATE'S OTHERWISE EQUAL OF OF ELEMENTS ELEMENTS SET SET SET NUMBER NUMBER RPLCF. NUMBER OF ELEMENTS IN SET NU^BFO tf ELFMENTS IN SET NJMBER OF ELEMENTS IN SET PPLCF. NUMBER OF ACTIVE ELEMENTS NJMBER OF ACTIVE ELEMENTS NUMBER OF ACTIVE ELEMFNTS NJ«3EP CF ACTIVE ELEMFNTS SU M OF N PLUS R. PRODUCT CF NP AND N2 . NRPLC(I) STORES THE NUMBER S. SI. SI BEFORE ENTERING SUBROUTINE S2. Tl. Tl BEFORE ENTERING SUBROUTINE IN AFPAY IDXO. IN ARRAY IDXOE. IN ARRAY IDX1. IN AFRAY IDX1E. OF ELEMENTS IN RPLCU ,*) FOP 1=1,2. SUM OF N PLUS 1. NJMBFR OF DIFFERENT INPUT COMBINATIONS TO BE CONSIDERED E3 INE3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 53 E3 El 53 53 E3 E3 E3 E3 53 E3 E3 53 E3 E3 E3 E3 E3 E3 E3 E3 E3 53 53 E3 E3 E3 E3 E3 E3 53 53 E3 53 E3 E3 E3 E3 53 E3 E3 53 003 70 00380 00390 0040C 00410 00420 00430 00440 00450 00460 00470 0048D 00490 00500 00510 00520 00530 00540 00550 00560 00570 00580 00590 00600 00610 00620 00630 006*0 00650 00660 00670 00680 00690 00700 00710 00720 00730 00740 00750 00760 00770 00780 00790 00800 00810 00820 00830 00840 O0850 00860 00870 00880 00890 00900 00910 00920 00930 00940 00950 00960 00970 r (USUALLY 2 TO THE POWER N). E3 00980 C ORIGIN: 0RIGIN(GI)=1 MEANS GI ORIGINALLY TONNECTED TO GCO. E3 00990 DRI3INIGII=0 MEANS GI DIO NOT FEED GCO ORIGINALLY. :3 01000 C P$: P$(l,-) CONSECUTIVELY LISTS OUTPUTS OE EVERY EX. VAP. AND E3 01310 f EVERY GATE (PQR EVERY INPUT COMBINATION): P*(l,l),..., E3 01020 : P$(1,N2) FOR FIRST EX VAR; P$ ( 1 »N2 «-l ) , . . . , PS ( 1 , 2 *N2 ) FOR E3 01030 T SECOND FX VAR; ... ; P $( 1 , N*N2*1 ) t . . . , P$ < 1 ,N*N2 + N2 ) FOP E3 01040 f PIRST GATE; FTC P$(2,-) IS USED AS WORK SPACE FOR E3 01050 C CALCULATIONS ASSOCIATED WITH P$(l,-). E3 31060 C PO: F03 ERROR COMPENSATION PROCEDURES. PCO IS THE GATE E3 01370 REMOVED FROM ORIGINAL NETWORK TO OBTAIN CURPENT ALTERED E3 01080 r NETWORK. E3 01390 f POINTA: >ilT USED. E3 01100 r pout-: pnivjTS TO LAST ELEMENT IN LISTC. E3 OHIO r POIMTL: POINTS TO LAST ELEMENT IN LISTL. E3 01123 r POINTR: POINTS TO LAST ELEMENT IN RNEC1 (IN SUBROUTINE SUBSTI). E3 01130 PV4B: POTENTIAL OUTPUT T ABLE. HOLDS INFORMATION ABOUT ALL E3 01140 C COMBINATIONS OF CONNECTIONS TO FORM NEW (AND HOPEFULLY E3 01150 t! USEFUL) FUNCTIONS. =3 01160 f PPTT4B: F3' GA T F GI , PPOTAB(GI) POINTS TO FIPST OF A SEQUENCE OF E3 01170 r RnwS OF POTAR CON'FRNING GI . E3 01180 R: NUMBER OF GATES IN THE NETWORK (EXCLUDES EX VAR, ALSO E3 01190 r N1TE SOME OF R GATES MAY BE ISOLATED). E3 01200 C DPLC: RPLC(1,*) STORES THE SELECTED GATE'S IP GATES WHICH HAVE E3 01210 I FPROP-COORDINATES GF WEIGHT 2 OR ABOVE. E3 01220 C R°LC(2,*) STORES TH<: SELECTED GATE'S IP GATES WHICH HAVE E3 01230 T AT LEAST ONE ERROR-COORDINATE DF WEIGHT 1. E3 01240 C *SCOMN: LIST OF CONNECTIONS ADDED TO A NETWORK (IN COOED FORM). E3 01250 C RtcrvjM: LIST OF CONNECTIONS REMOVED FROM A NETWORK (CODED FORM). E3 01260 C S: N n . OF CONNECTIONS ADDED TO A NETWORK. POINTS T3 LAST E3 01270 C F\|t?y IN RSCONN. E3 01280 C SETS: SFT S CONSISTING OF INPUTS OF THE GATE UNDER CONSIDEPATI 0NE3 01290 C WHICH ARE TO BE REPLACED IF POSSIBLE. E3 01300 C SFTSl: SFT SI CONSISTING OF FLEMENTS OF SET S WHICH CAN BE E3 01310 C REPLACED BY ELFMENTS n SET S2. E3 01320 C S C TS2: SET S2 CONSISTING OF FUNC T ICNS WHICH APE CANDIDATES FOR E3 01330 REPLACING ELEMENTS IN SET S. E3 01340 C SETTl: SET Tl CONSISTING OF ESSENTIAL ONES COVERED BY ELEMENTS INE3 01350 C SET SI. E3 01360 C STS: STARTING ELEMENT OF SET S. E3 01370 C SUCSMX: SUC$MX(GI ♦GJ)>3 MEANS GATE GJ IS A SUCCESSOR OF GATE GI. E3 01380 C SU:$MX(GI,GJ)=0 IF NOT. E3 01390 C SUMP: SUM 3F ALL ACTIVE INPUTS 3F THE GATE UNDER CONSIDERATION. E3 01400 C SUMS2: SUM OF ALL ACTIVE ELEMENTS OF SET S2. E3 01410 C T: NUMBER OF CONNECTIONS REMOVED FROM A NETWORK. POINTS TO E3 01420 C LAST ENTRY IN RTCOMN. E3 01430 C time: USED TC STORE AMOUNT OF ELAPSEP COMPUTATION TIME. E3 01440 r JNAMF: MNEMDNK NAMES F3R EXTERNAL VARIABLES AND GATES. E3 0U50 C VFSUBl: POINTS TO LAST ELEMENT IN VF$1. E3 01460 C VF$l: SIMILAR TO FS1 , EXCEPT THIS LISTS JUST COMPONENT P0SITI0NSE3 01470 C (OF 3'S IN CSPF VECTOR OF GCO) COVERED ONLY BY REMAINING E3 01480 r ORIGINALLY CONNECTED INPUTS TO GCO. E3 01490 r E3 01500 C E3 01510 C E3 01520 IMPLICIT ISTEGER*4(A-T,V-Z,t), REAL(U) E3 01530 COMMON NEPMAX E3 01540 CdMM-jNj v, f q f A f R E3 01550 1 » R t N2 , Nl , NP E3 01560 2 » NM , KFLAG , JFLAG , COST E3 01570 3 , LFVM , NRN2 , NM1 f NN2 E3 01580 r-iMM~N ! »*2 ) , PPOM8<40 ) ,inX0( 32) ,SUMP( 32) ,NOSl ,SU«S?( 32) , MOOF ♦ NOl , SPW N0T1SV 99C 1000 10 , IDXIE(3?) ,SETSlt*OI tSTS ♦ LIP , MOO ♦ $LTM r nM^nrj 0T«-MSI n M :MTLIS( I**) ,UGATF(40) ,UH 0*T t KnuNT5 /O/, UBL<*NK/« •/ PE*DC5,1000,END*500 ) IJHFAT, N, M» \|FP*"U TS THE MAXIMUM ALLOWABLE NU FnpWJT ( 20 A*/ 5 I*, A 4, 14) k* yx:=o IF(u:.^F.U3L4NK ) KEYX:=1 CHL PAGE :»LL LINE(IO) K^JNT5=Knu^T5+l PPINT 2, KHUNT5 2 Pn P MftT(20X, •*** OPTIMAL NOR NFTWOR CALL L TNF«4) PRINT 10C5, UHEAD 1005 cTSMftTj 25X, 20«4) CALL LINE(*) PPINT 10, N,M,A,R F-'^viTJ 30X, •NUMBEP OF VARIABLES 1 30X, , NUMBFR HF FUNCTIONS 2 30X, ,r .0S T rOEFFTriFN T A 3 *7X, »B CALL LINF(l) IF(K=YXC.NE.O) GO Tp ?5 PRT\T 21 F0PWV T (1H0,29X,' UNCOMPLEMENTED S3 TO 30 TONTINE PRINT 28 FDO^AT( 1H0,29X, • BOTH tOMPLEMEN 1 X, Y • ) 30 COMTINUF C&LL LINF< 5) r***** cct jp FXTERNAL VARM8LES ***** N2=2**N !F(NEPMAX.EO.O)NEPMAX = N2/2 H=N*N2 J=N2 L= 1 I»3 00 1011 II=l,N J = J/2 L=L*2 SM= I DO 1010 LL=1,L , IPRED(*0,*0) *0I, P$(2,1280) , HLIST(*0,*0) ) » S ,ESS1S(*0) ,LISTC(*C) ,CRIGIN(*0) ,VF$UBl ,LPOTAB(*0) ,IDX0E<32) ,SETT1( 32) ,SETS(*0) ,SETS2(200) ,KEYA ,N01E ,$NOE ,NCS1SV EAD(20) R, A, R, UCt NEPM MBEP OF ERROR PCS , LIPRED(*0) , UNAME(*0) , TIME , RSC0NNC100 ,F$1(32) ,P0INTC , IPATH(*0) ,HSMALL(*0,3 ,NRPLC(2) ,IDXl (32) ,N0T1 ,NOS ,N0S2 ,KEYB ,$GT ,GI ,LMTS2 AX ITIONS K ***• ,50X,« PROBLEM NC.= SI* ) — i - • - • — % 21 25 28 ,1* // , I* // , I*// ,1*) VARIABLES X •) T ED AND UNCOMPLEMENTED VAPIABL E3 E3 E3 E3 E3 E3 E3 )E3 E3 E3 E3 E3 E3 E3 E3 E3 = 3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 ESE3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 = 3 E3 E3 01590 01600 01610 01620 01630 0164C 01650 01660 01670 01680 01690 01700 01710 01720 01730 01740 01750 01760 01770 01780 01790 01800 01810 01820 0183C 018*0 01850 0186C 01870 01880 01890 01900 01910 01920 01930 019*0 01950 01960 01970 01980 01990 02000 02010 02020 020 30 23*0 02050 02060 02070 02080 02090 02100 02110 02120 02130 021*0 02150 02160 02170 02180 02190 ?\=-SN E3 02200 V=U«-SN)/2 E3 02210 Of 1 009 JJ=1 , J E3 02220 I=T*1 E3 02230 P$(ltl ) = V E3 0224C I-(KEYXC.NE.-))P$(1 ,H-H)=1-V E3 02250 1009 rCNTTNUF E3 02260 1010 r nMIMUE E3 02270 1011 •DNTTVJJE E3 02280 IfMKEYXC.vjE.O ) N = N+N E3 022 90 Nl=NH E3 02300 \jw=fu«.M E3 02310 NMl=MM*l E3 02320 NN2=N*N2+l E3 02330 ^R=N+R E3 02340 N«N?=^R*N2 E3 02350 ftli r)UTP1JT( INC$mx ,KFYXC ) 53 02360 (-***** }c j N ^= Tw npK INFORMATION AND SET UP INCSMX ***** 02370 RFAD 1001, ONTLIS E3 02380 1001 P1RMAT(16I5) E3 02390 DO 1115 GI=1,NR E3 02400 OP 1115 GJ=1, NP E3 02410 1115 incsmxcgi ,gj> =0 E3 02420 DO 1120 1=1,144 E3 02430 ITFM=CNTLI5( I) E3 02440 IF( ITFM.EO.O) GO T" 1119 E3 02450 GI=TTEM/100 E3 02460 GJ=ITEM-10:*GI E3 02470 IMC$MX(GI,GJ)=1 E3 02480 GO TO 1123 E3 02490 1119 r->ST = A*R+B*(I-l ) E3 02500 GO TJ 1130 E3 02510 1120 CONTINUE E3 02520 1130 :iNTINUE E3 02530 CALL SUBNET E3 02540 CALL PVALJE E3 02550 :all line(4) E3 02560 PRIMT 1140, COST E3 02570 1140 F0RMAT(20X,« ORIGINAL NETWORK COST=«, 15) E3 02 5 80 CALL LINE(4) E3 02590 CALL TRUTH(P$,1) E3 02600 CALL LINE 14) E3 02610 CALL CKT( In:$mx,GLEVEL) E3 02620 c E3 02630 £***** =MTRY REDUNDANCY CHECK ***** E3 02640 T = E3 02650 S=3 E3 02660 "ALL UNNECE E3 02670 c IMITULIZE TIMER T 10 MINUTES E3 02680 CALL STIMFZ(60000) E3 02690 TIMF = KTIMEZ(O) E3 02700 r**** PROCEDJRE :O^PE^SATE ERRORS ******************»****************#g3 02710 CALL ALPATH E3 02720 r CALL FOR ELAPSED TIME E3 02730 TIMF = KTHFZ(O) - TJMP E3 02740 CALL LINE(^) E3 02750 P'I^t 3915 E3 02760 3916 FnRMA T (20X,'T IME FLAPSFD =•, 18, • C ENT ISECONDS • ) E3 02770 3915 FORMAT( ?0X, 'NETWORKS DERIVED BY ALL-PATH PROCCE') E3 02780 PRINT 3916, TIME E3 02790 G^ TO 990 E3 02800 r **«* fo* THIS S'FriAL ALL-PATH VERSION 3F MAIN, THE REST of the C ST.S ARE BYPASSED 'ALL LINE<4) TALL TRUTH(P$,1) C4LL LINF(V) r*LL :kt( im: $*x,glevfd r***** P?!N T "lU r NETWORK DERIVED RY REDUNDANCY CHECK ***** IFIT.GT.OI GO TO 110 CALL LINP(2) 102 PRTVjr 105 105 epRwflT(n ,nx,'NO REDUNDANCY FOUND.') G3 n 990 C 110 r^NTlMUE r***** PRjvjT OUT 'EDUNDANT G4TES ***** C*LL UNNE'E G = 115 KEY=0 0^ 125 GJ=NM1 ,NP I c (LISUrC( GJ) .G T .0) GO tq 125 G=G + 1 MG1TC(G)=UNAME(GJ) LISUCC(GJ)=9999 LIP=LIPRED(GJ I T C CALL LINE(2) (-***** D^lvjT OUT REMOVED AND ADDED CONNECTIONS ***** 310 IF(T.EO.O)GDT0401 PRINT 311 311 F!)R*4Tn.H , 1 5X, «R EMPVED CONNECT ION( S) • ) DO 315 TT=l,T TTEM = pTrr)NN(TT) GI»ITE*V100 GJ=ITFM-gi*ioo UI«UNAME(GI ) UJ=JNAME(GJ ) PPIN T 3l*,UI,UJ 314 FT»MAT|IH0,19X, , ( • ,2X,A3,' ,' ,2X,A3 ,•)•) 315 CONTINUE 401 IF( S.FO.O) G3 TO 319 CALL LINF(2) PRINT 316 316 F3R«AT(JH ,15X, 'ADDED C3NNEC TI 3N ( S ) • ) PR0GRAME3 02810 E3 02820 E3 02830 E3 02840 = 3 02850 E3 02860 E3 02870 E3 02880 E3 02890 E3 0290C E3 02910 E3 02920 E3 02930 E3 02940 E3 02950 = 3 0296C E3 02970 E3 02980 E3 02990 E3 03000 E3 03310 E3 03020 E3 D3330 E3 03040 E3 030 50 E3 03060 E3 03070 E3 03380 E3 03390 E3 03100 E3 03110 E3 03120 E3 03130 E3 33140 E3 03150 E3 03160 E3 03170 E3 03180 E3 03190 E3 03200 E3 03210 E3 03220 E3 03230 E3 03240 E3 32 50 E3 03263 E3 03270 E3 03280 E3 032 90 E3 03300 E3 03310 E3 03320 E3 03330 £3 03340 = 3 03350 E3 03360 E3 03370 E3 03380 E3 03390 E3 03400 E3 03*10 53 03420 E3 03430 E3 03440. E3 03450 E3 03460 E3 0347C E3 03480 E3 03490 E3 03500 E3 03510 E3 03520 E3 03530 E3 03540 E3 03550 E3 03560 E3 03570 E3 03580 cpst = % 15, • .• ) E3 03590 E3 03600 E3 03610 E3 03620 E3 03630 E3 03640 DC 318 SS = 1 ,S TTEM = <»S rr )NVi< SS) OI=I T FM/lD0 J T = ) M A M F < G I ) U J=JNAMF (^ J ) P'lMT 314, UT ,UJ r 318 CONTINUE 319 :^NJTI vjup CO'JNTT = 9 DP 6447 I = 1 ,NP 6447 SDUMT = :0UN T C ♦ LISUCC(I) rj^pj = a*(r-g)«-b* {cpuntcj ~~ST = CUNEW CALL LTNF<3) PRT\: T 320, CUNFW 32 r =7RfftT(9Xt •* A NETWORK DERIVED BY PRCCCE'/gx,' vjFWCST = :jmpw C IP(NEWCST.L T .0L0r.ST)Gn TO 3 -n T? 990 500 S T-, P PNO SUBROUTINE 33PCCE(W0RKED ) E3 03650 ? PRPCCF FOP MULTI-PA T H PROGPA" **** E3 03660 C FOITI^NJ AAAAA AAAAAA*AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE3 03670 C IF POTC r E SJCCESSFULLY COMPENSATES ERRORS, 'WORKED' IS SET TC 1, OE 3 03680 C •WORKED' IS SET n E3 03690 C E3 03700 C DEFS. OF MOST 'COMMON* VART*B_ES CAN BE FOUND IN MAIN PROGRAM. E3 03710 r E3 03720 C SPFTtal rr-**ON VARIABLES: E3 03730 C E3 03740 C TN:$»V: 5 t »CK CONTAINING BLO r KS. EACH BLOCK CONTAINS A NETWORK'S E3 03750 C NME, PARENT, r.DST, AND LIST OF CONNECTIONS. E3 03760 r KAMF: NAME OF NETWORK UNDER CONSIDERATION. E3 03770 C METlST: L T S"»" IS T «CK) OF POINTERS to TOP OF BLOCKS IN INCSAV. E3 03780 C NLSTPT: POINTS TO TOP ^F STACK NETLST. E3 03790 C NTCNTR: NE r WCRK COUNTER - COUNTS NJMBER OF NETWORKS GENERATED SO E3 03800 C FA}. E3 03810 r NTTCST: COST OF A PARTICULAR NETWORK. E3 0382C ? i>UFM T : NAMF OF NETWORK FROM WHICH NETWORK 'NAME* WAS DERIVED. E3 03830 f $AVPT: POIMTS TO FIRST FRFP LOCATION IN STACK INCSAV. E3 03840 E3 03 850 C VARIABLE DEFINITIONS: E3 03860 C EP: E°(I)=1 MFANS AT LEAST ONE NETWORK OUTPUT GATE HAS AN E3 03870 C EP^ONFCUS OUTPUT IN THE I-TH COMPONENT WHEN PCO IS REMCVEDE3 03880 C F}0" TMF NETWORK. EP(I)=0 OTHERWISE. E3 03890 C ERRPRS: TOTAL NO. OF ERRORS IN NFTWCRK OUTPUTS WHEN PCO REMOVED. E3 0390C : 3»t=s: NUMBER OF GATES RFMOVFD FROM NETWORK BY CALL TO MINI2. E3 03910 C HP']i/: A 3ARAMETER RETURNED BY MINI2. •=!' MEANS MINI2 WAS ABLE E3 03920 C TD REDUCE COST OF NETWORK. E3 03930 wax: MAXIMUM KUMBER OF REQUIRED l'S IN A CSPF VECTOR (AFTER E3 03940 C CALLING MINT2) PLUS I. E3 03950 C KIN: 0»IGIMALLY S^T TO ZERO, MIN IS INCREMENTED EACH TIME BY 1 =3 0396C UM T IL ITS VALUE EQUALS MAX. E3 03970 f NFP: Nn. -jf ERRO D PnSI T IONS FOR A GIVEN NETWORK AFTEP A SE- E3 03980 C LETTED G'TF HAS BFFN REMOVED. AN ERROR POSITION IS A E3 03990 r COMPONENT prSITION WHICH IS IN ERROR FOP AT LEAST ONE E3 04000 <~ OJTPJT. E3 0*010 N=P"Ax: RFAD FRDM INPIJT CARDS, THIS PARAMETER IS PASSED TO PROCCE E3 0*323 C WHEN IT TS CALLED BY MAIN. IT REPRESENTS THE MAXIMUM E3 0*033 C ALLOWABLE NUMRER OF FPROP POSITIONS. IF AN ALTERED (I.E.,E3 0*040 C SD^E PCO RFMGVFD) NETWORK EXCEEDS THIS MAXIMUM, ERROR E3 0*353 C COMPENSATION IS NOT ATTEMPTED FOP THAT NETWORK. E3 0*060 NETOUT: STORES OUTPUTS OF GATES IN ALTERED UT: USED Tp STPRF ORIGINAL (UNALTEPEDI NETWORK OUTPUTS IN E3 0*130 r CODED FDRM (SAME CODE AS IH GSMALL) AND (*0,321 FORMAT. E3 0*1*0 C PCD: CURRENT GATE REMPVFQ FROM ORIGINAL NETWORK TO OBTAIN E3 0*150 C CJRRENT ALTERED NETWORK. PCO » PORDEP ( PCCUNT ) . E3 0*160 C PCOUNT: A POINTER TO PORDEP. E3 0*170 r PORDER: ORDERING OF GATES ACCORDING TO NUMBER OF l'S IN THEIR E3 0*180 r CSPF VECTORS. G*TES ME INDIVIDUALLY REMOVED FROM OPIGI- E3 0*190 C MAL NETWORK IN THIS ORDER E3 0*200 PSUB: USED *S A POINTER TO PORDER DUPING ITS INITIALIZATION. E3 0*210 C OINCSM: STORES A COPY OF TMC$MX FOR THE ORIGINAL NETWORK. E3 0*220 C ST*Rt : points TO BEGINNING OF LIST OF NETWORK OUTPUTS IN P$. E3 0*230 C ST3P: POINTS TO END OF LIST OF NETWORK OUTPUTS IN P$. E3 0*2*0 C E3 0*2 50 I,J,N!,X,Y 4RE USED AS JUST TEMPORARY VARIABLES. E3 0*260 C E3 0*273 C H n W TO INCREASE CAPACITY OF SUBROUTINE. E3 0*280 £ DIMENSION: PORDER(X) E3 0*290 r DNES(X) E3 0*300 C QINC$M(X,X) - X EQUAL TO MAX NO. OF GATES PLUS EX. VAR.E3 0*310 EP(Y) - Y EQUAL TO: 2**(MAX ALLOWED NO OF EX VAR)E3 0*320 C NETOUT(X,Y) E3 0*330 C ORGOUTU,Y) - X,Y AS ABOVE E3 0*3*0 C E3 0*350 IMPLICIT WFGER**(A-T,V-Z, $), PEAL(U) E3 0*360 COMMON NEPMAX E3 0*370 COMMDN N , M , A , B E3 3*380 1 , P ♦ N2 , Nl , NR E3 0*390 2 , NM , KFL4G , JFLAG , COST E3 0**00 3 , LEV^ , NRN2 , NM1 , NN2 E3 0*^10 COMMON ISJCC(*0,*0) , LISUCC(*3) , IPRED(*0,*0) , LIPRED<*0) E3 0**20 1 , INC$MX(*0,*0), SUr$MX(*0,*0> , P$(2,1280) , UNAME(*0) E3 0**30 2 , GLEVEL(*0) , LGL1ST<*0) , HLIST(*0,*0) , TIME E3 0***0 COMMON T f RTCONN(IOO) , S , RSCONN(IOO) E3 0**50 CC*»ON IFL4G ,POINTA ,ESSIS(*0) ,F$1<32) E3 0**60 1 ,F$UBl ,INPTCV(32) ,LISTC(*0) ,POINTC E3 0**70 2 ,LISTL(*0) ,POINTL ,ORIGIN(*0) ,IPATH(*0) E3 0**80 3 ,POINTR ,VF$1(32) ,VF$UB1 ,GSMALL< *0 ,32 )E3 0*V90 COMMON POr AB(200,*2),PPOT4B(*0) ,LPOTAB(*0) ,NRPLC(2) E3 0*500 1 ,RPLCI2,*0) ,IDX0<32) ,IDX3E(32) ,IDX1<32) E3 0*510 2 , IDX1E(32) ,SUMP(32) ,SETTi(32) ,N0T1 E3 0*520 3 ,SETSH**1 ,N0S1 ,SETS(*0) ,NOS E3 0*530 * ,STS ,SUMS?(32) ,SETS2(200) ,N0S2 E3 0*5*0 5 ,LIP ,^00E ,KEYA ,KEYB E3 0*550 6 ,NOD ,N01 ,N01E , $GT E3 0*560 7 , SLTH ,$PW ,$NOE ,GI E3 0*570 COMMON N0T1SV ,N0S1SV ,LMTS2 E3 0*580 COMMON NTCNTR , PARENT ,NAME , INCSAV < 10000)E3 0*590 1 ,SAV°T ,NETLST(500) ,NLSTPT ,NTCOST E3 0*600 DI M FNSION PORDERt*'? ),ONES(*D ) ,0 INCSMI *0 , *0 ) , NETOUT < *0, 32) , E3 0*610 I FP( 3?), r l~,3\JT( 40,3?) THIS SUH cr, JMNF ASSUMES ALL ARRAYS APE UPDATED p«FV t_1 US T 3 BEING r/VLLED SGT 33 $L T H = 34 s°w 41 tNOF = 42 WI^KFD = S = 3 Tin $PS« v* = $ = $AVP T c : RLOTK BBBBBBBBB8BB8BBBB8B r CALL MINI2C IMPBOV 1 : IM THIS :&LL TO MIMT2, GHRnER 4 ILL BE CALCULATED. GO 1 ? DER WILL r LATE* IM FftCH CA.LL in T^IT^S (AN ENTRY POINT OF MINI2). NOTE T C I* NOT AFFECTED BY THE RCmo^AL OF GATES FROM THE ORIGINAL NETW I PI IMdoov.^Q. 0)G0 th 1. r,AP T EP = m C = D^ 2 I = 1,N* <~ = r «■ L ISUCC( I) I r ( I.LE.NMJG0TO2 TF( LISUCCU J.GT.O) G4FTER = GAFTER ♦ 1 2 C^MTTVJUE GBEFOP = (NTrOST-B*(C+T) )/A GATFS = R - GAFTF" PRINT 4, GATFS, T 4 FORMATC «,T5,' GATES AND' ,13,' CONNECTIONS HAVE BEEN REMOVED 1 THE NETW>R< DURING THF TMITI&L CALCULATION CF THE CSPF SET*) 1 CONTINUE C COUNT THF MUMBER OF Its IN T HE CSPF VECTOR FOR EACH GATE MAX = D1 5 I = Nl ,NP ^\JE r ^T = DO 6 J = 1,N2 ! C (SSMALL U ,J).LE.01G0 T 6 DNECVJT = 3>4E;nT ♦ 1 6 CONTINUE T c ( r NECN T .3T. MAX) MAX=ONECN T 0>JES(I) = ONECNT 5 CONTINUE MAX = MAX *■ I MTN = -1 PSUB = 1 7 MI>J = MIN ♦• I IF(MISI.EO.MAX ) GO TO 3 30 9 I = Nl ,NP !F<0\JFS( I ).NE.MIN)GO T 9 POROER(PSUB) = I PSUB = PSUB *■ 1 9 CD^TTMUE G0TC7 8 rONTTNUF C SAVF ORIGINAL NETWORK DO 10 I » ltNR D~> 10 J = It NO OINr$*(T,j) = TNC$MX(I,J) in rn^ypHJE E3 04620 E3 0463C E3 04640 E3 04650 E3 0466C E3 04670 E3 04680 E3 04690 E3 04700 c 3 34710 E3 04720 E3 04730 E3 04740 B E3 04750 E3 04760 E3 0477C BE E3 04780 HAT E3 04790 0PK.E3 04800 E3 04810 E3 04820 E3 04830 E3 04840 53 04850 E3 04860 E3 04870 E3 04880 E3 04890 E3 34900 E3 04910 FP0ME3 04920 E3 04930 = 3 04940 E3 04950 E3 04960 E3 04970 E3 04980 E3 04990 E3 05000 E3 05D10 E3 05020 E3 050 30 E3 05040 E3 5050 E3 05060 E3 05070 E3 050 80 E3 05390 E3 510C E3 05110 E3 05120 E3 05130 E3 05140 E3 05150 E3 05160 E3 05170 E3 05180 E3 051 90 E3 05200 E3 05210 E3 05220 C SAVP IRI^TNJAL OUTPUTS r SAVE ORIGINAL OUTPUTS IN (2,1280) FORMAT ST&BT = (S*N2) ♦ 1 ST->P = (NM*VJ2 ) 00 13 I = START, STOP p$< 2, I ) = P$( It I ) 13 CONMNUE C S^VE CRIGIMAL OUTPU T S IN C^DED (40,32) FORMAT 0") 27 I = Sl,NM X = ( 1-1) * N2 O -1 28 J = 1,N2 Y = P$(l, X*J ) IF(Y)30t31*32 r C?HP3MENT IS OCN'T CARP (I.E., -1) 30 0RG0JT(I,J1 = GO^O 28 P CO^RO^ENT IS LOGICAL ZERO 31 ORGnjT(I,J) = -100 GO th 28 c :o^po^en^ is logical one 32 ORGOJMI, J) = 1 28 :?NTIMUF 27 COMMIE P block c : ccccccccccccccccc p °:ount = n p:punt = PCOUNT ♦ 1 IF(P:OUNT.GT. R)G0T042 p"0 = PORDEPl PCOUNT) IF(O^ES(PC3).E0.0)GO TO 11 IF{PCD.LE.N^)GO TO 11 C ERROR? UNCORRECTABLE, RESTORE NETWORK, TRY AGAIN Ot 19 I = l,NR DO 19 J = l,No IN:$MX(I ,J) = OINCSMd, J) 19 CONTINUE C REMTVE GATE ©CO FROM THE NETWORK 30 12 I = 1,NR IF( nC$MX(T,PC0).E0.0)G3 T^ 34 INC$MX(I,PC?I = 34 IF(ISC$MX|PC3 f I).E0.0) GO TO 12 IN r $^X(PC3, I ) = 12 CONTINUE C UPDATE GATE 3U T PUTS POR ALTERED NETWORK C P BLOCK 00 ODDODDDODDDDDODDO C 33 CALL SUBSET CALL PVALUE CALL UNNECE S = D T = 3 C *ESTO*E GSM6LL FOR OUTPU T GATES DO 29 I = N1,NM DO 29 J = 1 , N2 GSMALU T,J) = PRGOUT(I f J) 29 CONTINUE ERRC'S = DO 24 I*1,N2 24 EP( I ) =0 E3 05230 E3 05240 E3 05250 E3 05260 E3 05270 E3 05280 E3 05290 E3 05300 E3 05310 E3 05320 E3 05330 E3 05340 E3 05350 E3 05360 E3 05370 E3 053 80 E3 05390 E3 05400 E3 05410 E3 0542C E3 05430 E3 05440 E3 05450 E3 05460 E3 054 70 E3 05480 E3 05490 E3 05500 E3 05510 E3 05520 E3 05530 E3 05540 E3 05550 E3 05560 E3 0557O E3 05580 E3 05590 E3 05600 E3 05610 E3 05620 E3 05630 E3 05640 E3 05650 E3 05660 E3 05670 E3 05680 E3 05690 E3 05700 E3 05710 E3 05720 E3 05730 E3 05740 E3 05750 E3 05760 E3 05770 E3 05780 E3 05790 E3 05800 E3 05810 E3 05820 E3 05830 16 17 15 14 25 18 23 26 D"l \it T = l,v| NT = N ♦ T X « I M I - I ) * N2 m 15 J = 1,N2 IP(GS M ALI.(MT, J) )16,15,17 C»SF WHFRF FEQUIREMENT TS P ZFRC TF(P$(1, X+J ) . EO.O)GP xn 15 CA^F n F PNF WITH FPROR GS^M-l(NI,J) = lOOi FRPTRS = ER51PS + 1 EP( J) = 1 ro n 15 CASF WHEP C PEOUTPE^FNT IS t ONE T C (F$( 1,X*J) .FO.l )GP TO 15 C&SF OF ZERO WITH FRROR 3S«»LL(N! ,J) = -1100 FPOTPS = C PP?RS ♦ 1 FP(J) = 1 COM T IVUE CONTINUE TP< ERRORS. EO.ni WPPKEO = 1 TF( ERRORS. EQ.O) GO T"i 23 NFP = D] 25 I = 1,N2 IF< FP( I I.E3.0 ) Gr Tn 25 NFP = NFP *■ 1 continue if(nep.gt.mepmax) go tp \\ B L3C< E rut po t »»:t' is Rl.OCK F 41 * SUBROUTINE T HAT GENERATES THE POTENTIAL OUTPUT TABLE SAVE NEW NETWORK OUTPUTS 00 18 J = 1,N2 DO 18 I = VJ1,NM NETruT(I,.J) = GSMALL(T,J1 continue CALL FORM GO r4U INITGS C«\Lt n:EC(r.llt£33» NEW NETWORK HAS BEEN Nt:njR = NT!"NTR + 1 TE^P = $avP T DO 26 1=1, NR 00 26 J=N1,NR IF< INC$MX< I, J I.LE.OIGO X = 1300*1 ♦ J !n:$av($avp t ) = x $AVPT = $AVPT «- 1 CONTINUE MLSTPT = MLSTPT *■ 1 NETLST(NLSTPT ) = SAV<>t ♦ 2 INSERT COST OF NETWORK Gft T FS = M D n 41 GATE! = NMl.NP IF( LISUCC(G»TEI ).GT.1)G&TFS=GATES+1 CO^TIWJE FOUND, PUT IT IN STACK TO 26 E3 05840 E3 °5850 E3 05860 E3 35870 E3 05880 E3 05890 E3 05900 E3 3591C E3 05920 E3 05930 E3 05940 E3 05950 E3 05960 E3 05970 E3 05983 E3 35990 E3 05303 53 06010 E3 36320 E3 06030 E3 06040 E3 06050 E3 36060 E3 06070 E3 36380 E3 06090 E3 36100 E3 06110 E3 36120 E3 061 30 E3 06140 E3 06150 E3 06163 E3 061 7G E3 06180 E3 06190 E3 062 00 E3 06210 E3 06220 E3 06230 E3 06240 E3 06250 E3 06260 E3 36270 E3 06280 E3 06290 E3 06300 E3 06310 E3 06320 E3 06330 E3 06340 E3 06350 E3 06360 E3 063 70 E3 06380 E3 06390 E3 06400 E3 06410 E3 06420 =3 06430 E3 06440 C = *&VP T - TEMP :ST = A*GATFS ♦ B*C INjr$ PART ICULAP NETWORK. E3 07060 r o»?FV|t: NdME OF NFTWOPK FR^M WHICH NETWOPK •N&ME 1 WAS DERIVED. E3 07070 r $W°T: POINTS T ^ FIPST FREE LOCATION IN STACK INC$AV. E3 07080 r E3 07090 r Hirf T3 INCREASE TAPACiTY *>F SUBROUTINE. E3 07100 r DTmfmsION: NETLST(X) - ■ X PQJAL TO MAX NUMBER OF NETWORKS ALLOWED = 3 07110 ~ IN STACK «- 1 E3 37120 r TMC $AV(Y) - Y EOUAL TO 3*> PLUS MAX TOTAL NUMB E3 07130 r CONNECTIONS IN ALL NETWORKS STORED IN STACKE3 07140 r E3 07150 T^LKIT I^EGFR*4(A-7 ,V-Z,i), PEAL(U) E3 07160 T.hmvon NEPMA* E3 07170 :omm:j\i sj , M t A t B E3 37180 1 , ° , N2 , Nl , NR E3 07190 2 , MM , KFL4.0 , JFLAG , COST E3 07200 3 t LrVM , ^3N? , NM1 , NN2 E3 07210 COMMON ISJCf(40,40) , LISU*~C<40) , IPRED(40,40) , LIPPED(40) E3 07220 1 , TNT$MX<40,40) , SUC$MX(40, ,IDX0E(32) ,10X1(32) E3 07310 2 ,IDX1E(32) ,SUMO( 32) ,SETT1(32) ,N0T1 E3 07320 3 ,SETS1(40) ,N0S1 ,SETS(40) ,NOS E3 73 3C 4 , STS ,SUMS2132 ) ,SETS2(200) ,NCS2 E3 07340 5 ,LTP ,VJOOE ,KEYA ,KEYB E3 07350 6 , N n,% ,NOl ,N01E , SGT E3 07360 7 f $LTH ,$PW ,$NOE tGI E3 07370 COMMON N0T1SV , N0S1SV ,LMTS2 E3 073 80 ^n^MQN NTCM^P , PARENT ,NAME , INC$AV(10000)E3 07390 I , $AVP T ,NETLST< 500) ,NLSTPT ,NTCOST E3 07^00 NE T LST<1) = E3 07410 NTCMTR = 1 E3 07420 MLSTPT = 1 E3 07430 S4VPT = 1 E3 07440 PARENT = E3 07450 NAME = I E3 07460 NT30ST = CO^T E3 07470 1 :&LI P^OC:E( WORKED) E3 07480 r IF S T "CK E>1PTY, RETURN E3 07490 IE(h'ETLST(NLSTPT» .E0*0 )RE T URN E3 07500 r CHOPSE NEW NETWORK cpr) M TOP OF STACK, SET UP E3 07510 DO 2 1=1, NR E3 07520 00 2 J=1,NR E3 07530 2 TM~ $*X< T, J) =0 E3 07540 X = NETLST(NLSTPT ) E3 07550 NLSTPT = NLSTPT - 1 E3 07560 Y = NETLST(NLSTPT) ♦ \ E3 07570 $AVPT = Y E3 07580 NAMF = INCSAV(X) E3 07590 PARENT = I"jr$AV(X-l ) E3 07600 NTCCST = INC$AV(X-2) E3 07610 X = X - 3 E3 07620 DO 3 T = Y,X E3 07630 Z = INC$AV(I) E3 07640 IG4TE = Z/IDOO E3 07650 JGATE = Z - 1000*IG*TP E3 07660 TNi:$*X(IGATE t JGATE) = \ E3 07670 CALL S'JRNET E3 07680 CALL PVALUE E3 07690 30 TO 1 E3 07700 EMD E3 07710 ***<<*********#*#*********************************** * * * THE REST OF THE SUBROUTINES * * PEOUIPEO FOR NETTRA-E3 ARE: * * * * CALSlt THNJECT, FORCt MIM2, DPDRQ2, OUTPUT, * * P" T , RCEC, RPLCF, AND SUBNET. * * * * * * (THESE APE IDENTICAL TO SUBROUTINES OF * * THE SAME NAMES LISTED FOR NETTPA-El.) * * * *************************************************** BIBLIOGRAPHIC DATA SHEET 1. Report No. UIUCDCS-R-75-732 3. Recipient's Accession No. 4. Title and Subtitle PROGRAM MANUAL.: NOR NETWORK TRANSDUCTION BASED ON ERROR- COMPENSATION (Reference Manual of NOR Network Transduction Programs NETTRA-E1, NETTRA-E2 , and NETTRA-E3) 5. Report Date June, 1975 7. Author(s) H. C. Lai, J. N. Culliney 8- Performing Organization Rept. No. 9. Performing Organization Name and Address Department of Computer Science University of Illinois at Urb ana-Champaign Urbana, Illinois 6l801 10. Project/Task/Work Unit No. 1 1> Contract /Grant No. NSF GJ-U0221 12. Sponsoring Organization Name and Address National Science Foundation 1800 G Street, N. W. Washington, D.C. 20550 13. Type of Report & Period Covered Technical 14. 15. Supplementary Notes 16. Abstracts Three NOR network transduction procedures based on error-compensation were implemented in the FORTRAN computer programs NETTRA-E1, NETTRA-E2, and NETTRA-E3. The general principles on which these programs are based are discussed in a separate report. The present report, however, describes the specific implementations of the three programs and serves as a reference manual for the program user. Preparation of input data is discussed in detail. Transduction ( transf ormation and re duction ) procedures attempt to reduce given, non-optimal, multiple-output, multiple-level, loop-free, NOR-gate networks to "near -optimal" networks of fewer gates. The three programs described in this report, based on the sophisticated "error-compensation" concept, remove gates one at a time from the network and, after each removal, try to reconfigure the network, without employing additional gates, to compensate for any resultant errors caused in thp npt.vn-rk mitpnt.fs ) . 17. Key Words and Document Analysis. 17a. Descriptors Logic design, logic circuits, logical elements, programs (computers). 17b. Identifiers/Open-Ended Terms Program manual, computer-aided-design, network transduction, network transformation error-compensation, near-optimal networks, permissible functions, permissible functions with errors, NOR, NAND, CSPFE, CSPF. 17c. COSATI Field/Group 18. Availability Statement Release Unlimited FORM NTIS-35 (10-70) 19. Security Class (This Report) UNCLASSIFIED 20. Security Class (This Page UNCLASSIFIED 21. No. of Pages 178 22. Price USCOMM-DC 40329-P71 JUH25 \m <\ i