Academia.eduAcademia.edu

Estimate of signal probability in combinational logic networks

1989, [1989] Proceedings of the 1st European Test Conference

This work presents two new methods for the calculation of node signal probabilities in combinational networks that improve the state of the art by providing a better accuracy than existing algorithms and a deeper insight in the effects of first order correlations due to multiple fan-out reconvergencies. The proposed algorithms are shown to favorable compare with existing procedures in the analysis of significant benchmarks.

zyxwv zyxwvutsrqponm zyxwvut zyxwvut ESTIMATE OF SIGNAL PROBABILITY IN COMBINATIONAL LOGIC NETWORKS M. Favalli S . Ercolani M. Damiani B . Ricc6 P. Olivo DEIS, University of Bologna Viale Risorgimento 2, 40136 Bologna, I t a l y ABSTRACT faster and conceptually simpler, represents an original improvement of the technique described in Ref. [6]and provides a significantly better accuracy; the other more accurate, is also able t o provide useful information of great help in the testability analysis of complex circuits. Our methods have been tested considering a few benchmark networks and using as reference for comparison exhaustive simulations providing exact signal probabilities or, when these were unpracticable, relevant Monte Carlo calculations. These analysis have shown that our methods, besides providing a deeper insight in the circuit behavior, are accurate and lead to good trade-offs between accuracy and computation time. This work presents two new methods for the calculation of node signal probabilities in combinational networks that improve the state of the art by providing a better accuracy than existing algorithms and a deeper insight in the effects of first order correlations due to multiple fan-out reconvergencies. The proposed algorithms are shown to favorable compare with existing procedures in the analysis of significant benchmarks. zyxwvutsr 1. INTRODUCTION The increase in complexity of modern ICs and the induced rise in the cost of test generation and fault simulation have shown the need for new approaches to these problems. Among the solutions proposed, Pseudorandom Testing is becoming progressively more important [ 11, mainly because it is widely applied in BIST, where Autonomous Linear Feedback Shift Registers (ALFSR) directly implemented on the chip, can be used to generate pseudorandom test vectors. The most important figure of merit of a pseudorandom test pattern is the number of vectors (test length) needed to achieve a desired level of fault coverage that can be calculated with expensive fault simulation or, preferably, estimated by means of probabilistic models [1,2,3]. In this context, the problem of test quality verification, namely the estimate of the expected fault coverage and the identification of the random-resistant faults, requires the knowledge of the circuit detectability profile [I], which can be obtained exactly by means of exhaustive, though unpracticable, fault simulations. Alternatively, it can be evaluated from the node signal probability p(j) [4], namely the probability that the signal value of a given node will be a "1" under a random assignment of an input vector. The task of determining node signal probabilities is very difficult since it represents a #P-complete problem [5,6], possibly even harder than a NP-complete one. To this purpose a number of heuristic algorithms have been proposed [4,6-lo], but the problem is still waiting for more complete and satisfactory solutions. In this paper, we present two original methods to calculate signal probabilities in combinational networks: one, 2. EXISTING METHODS FOR SIGNAL PROBABILITY COMPUTATION The main difficulty in computing signal probabilities is due t o the presence of reconvergent fan-out nodes (RFONs, namely those with fan-out > 1 and branches that reconverge within the circuit) that introduce functional dependencies and statistical correlations among the signals in the network. For a tree-structured network (i.e. a circuit with no RFON), the signal probabilities can be evaluated in linear time according t o the elementary rules of Table 1 1111, hereafter collectively referred to as 0-algorithm. Furthermore, such rules can also be successfully applied to parts of general circuits that are fan-out free. Table 1. Set of rules for calculating the node signal probabilities in absence of RFONs. 0 Inverter gate zyxw zyxwvutsr zyxwvutsrqponm I 132 CH2696-3/89/0000/0132$01.OO 0 1989 IEEE Or gate I ~ -1 In the general case, however, signal conditional probabilities whose order depends on multiple fan-out .reconvergencies must be considered. To solve this problem, whose difficulty and complexity grow exponentially with the order of the considered conditional probability, several heuristic algorithms a t different levels of accuracy have been proposed. Among these: the COP method [7],which assumes all signals to be independent (using the 0-algorithm) neglecting the effects of fan-out reconvergencies, is the simplest and fastest (linear in the number of gate N) but it is not accurate; the Weighted Averaging Algorithm (WAA) (61,which extends and improves the COP, attempts to take into account the first order effects of reconvergent fan-out. It is simple and linear in M N , where M is the number of inputs, but it is inaccurate in estimating the effects of RFONs internal to the circuit; the Cutting Algorithm (CTA) [4], which transforms a circuit with reconvergent fan-out into a tree structured equivalent one by means of arbitrary cuts critically determining the effectiveness of the method, leads to computation times that increase with the target accuracy; the STAFAN method [SI,based on fault-free simulation, requires very long calculations t o achieve a sufficient level of accuracy. A detailed comparison about the accuracy and CPU requirements of these algorithms can be found in Ref. [lo]. In our approach, better estimates are obtained by dynamically updating p ( j ) after having processed each RFON by weighted averaging all avaliable p j ( j ) . In this way, since the accuracy of p f ( j ) depends on that of the values of all the inputs of t h fan-out cone of f, at every step these are assigned taking into account all the information gathered from all processed RFONs. In this process, the order in which the RFONs are considered is of vital importance: the best way is to proceed from lower t o higher level and within the same level from the RFON whose branches reconverge at the lower level. zyxwvutsr zyxwvutsrqpo zyxwvutsrq zyxw zyxwvutsr zyxwvu zyxwvut zyxwvutsrqponm 3.2 The algorithm The Dynamic Weighted Averaging Algorithm (DWAA), developed to implement the idea presented in the previous section, consists of the following main operations: compile the circuit organizing it into levels and determine the order in which the RFONs are to be processed; calculate the signal probabilities by means of the 0algorithm. We will refer to these values as to p ( j , O ) , that is the probability of node j after having processed 0 RFON; successively force each of the RFONs in the circuit to 1 and 0 and calculate the signal probabilities p f ( j ) of its fan-out cone from eq. 1, using as probability at the ith input for its fan-out cone p ( i , t - l), namely the values calculated after having processed (t -1) RFONs. After each step update the value of p ( j ) as follows: 3. DYNAMIC WEIGHTED AVERAGING ALGORITHM The Weighted Averaging Algorithm uses a weighted average of p ( j ) values obtained by means of the 0-algorithm, setting each input probability alternatively at 1and 0 while keeping the others at 0.5. Since it operates directly only on primary inputs, it is inaccurate in estimating the effects of RFONs internal to the circuit. In order to overcome this drawback, we developed an improved algorithm that applies the weighted averaging concept even to the internal RFONs. where the weighting factor w f ( j )= a b s ( P f ( j )- P ( i 0 ) ) t-1 w s ( j , t - 1) = 3.1 The basic idea wk(j) (4) k= 1 represents the sum of all w f on all the ( t - 1) RFONs already processed. The operation # 3 stops when t equals the number of RFONs. Given a combinational network the signal probability p ( j ) of a node j can be expressed by P(j) = P(j/f=o)P(f=o) + P(j/f=l)P(f=l) (3) gives a measure of the deviation on p ( j ) due t o the influence of the considered RFON, and (1) 3.3 An example where f is a RFON of the fan-in cone of j . If f were the only RFON in the circuit, p ( j ) could be exactly calculated by using eq. 1 and applying three times the &algorithm: setting the input probabilities to 0.5, first we evaluate p(f), then, forcing the logical value of f to 0 and 1 we calculate the conditional probabilities. In the presence of more than one RFON, we obtain a value of p ( j ) that is generally not exact and depends on the processed RFON. Since the actual value of p ( j ) is influenced by other RFONs in the circuit, we estimate p ( j ) for each RFON (hereafter referred t o as p f ( j ) ) . As an example of the application of DWAA, we estimate the node signal probabilities of the simple circuit of Fig. 1, having two RFONs i2 and n3. Calculation of the signal probabilities p ( j , O ) by means of the 0-algorithms. I33 In this paper we express this probability by means of correlation coefficients C A , Bdefined by the equation hence If A and E are independent events P ( A B ) = P ( A ) P ( B ) , thus CA,B = 1. In the particular case of signal probability in a combinational network, an event is a node at 1, hence with the notation used in the previous sections P ( A ) = P ( j = 1 ) = p ( j ) and zyxwvutsrqponmlk zyxwvutsrqp zyxwvutsr Figure 1 . zyxw P(i/j)=P(Wi,j Force i2 to 0 and 1 and calculate p ; z ( j ) by means of eq. 1, where j belongs to the fan-out cone of i2. 4.2 The main rules (8) Given a gate with two inputs (i, j), we can calculate exactly the probability p ( l ) at the output by means of p ( i ) , p ( j ) and their correlation coefficient C i , j as shown in Table 2. - Update I-I-I-I-I- .25 - .25 ,375 - Table 2. Set of rules for calculating the node signal probabilities through the correlation coefficients. ,281 .55 zyxwvu 1 - ,488. C&.- I- - - - I - 1-1.501- - - - - .75 ,375 - - - - And gate - .375 ,281 ,515 zyxwvutsrqponmlkjihgfedcbaZYXW The final estimation and the exact values of signal probability are summarized in the following table: 1 il I i 2 I a3 I a4 1 i5 I i 6 I nl I n2 I n 3 I n4 n5 I n6 I 1 Or gate U) I 1 Est. I .50 I .50 I .50 I .50 I .50 I .50 I .25 .25 .75 1.375 1.375 1.281 1.526 Ezoct .50 .50 .50 .50 .50 .50 .25 2 5 .75 ,375 ,375 ,281 ,515 I 4. CORRELATION COEFFICIENT METHOD As already mentioned, the presence of fan-out nodes introduces correlation among the circuit signals. To deal with this problem, we have developed a method that explicitly accounts for first order conditional probabilities introducing correlation coefficients between couples of signals. 4.1 Correlation coefficients zyxwvutsr The correlation coefficients can be calculated analytically by means of the set of basic rules of Table 3. The simple example of Fig. 2 shows how the rules of Table 3 allow to calculate the correlation coefficients for all cases occurring in a combinational network. From probabilistic theory, given two events A and B , the probability P ( A E ) of AB = A n B is given by P ( A E ) = P ( A / B ) P ( B )where p ( A / B ) represents the probability of A given B [12]. I34 zyxwv zyxwvutsrqponm zyxw Signals are assumed to be indipendent 1) Primary inputs P(i/j) =P(4, P ( j / 4 =P M cij = 1 2) Fan-out node 3) Not gate zyxwvutsrq zyxwvutsr _-_-_-i, I I --- I ,I I 5) Or gate I I- - - - - ---- - zyxwvu --I zyxwvutsrqp Table 3. Set of basic rules for determining the output correlation coefficients of a couple of signals given the input correlation coefficients and the input probabilities. I35 z zyx 4.3 The a l g o r i t h m zyxwvutsrqponmlkjihg 2lF3 From the rules of Table 2 and 3, successively applied proceeding from primary inputs to outputs, we can calculate the node probability by means of the following algorithm: 1) compile the network transforming possible multiple input gates into a cascade of two input ones organizing the circuit into levels; 2) initialize the correlation coefficients and the probabilities at primary inputs. Generally in pseudorandom testing the input signals have probability = 0.5 and are considered independent,thus C , j = 1; 3) calculate the node probabilities and the signal correlation coefficients at each level by successively applying the rules of Table 2 and 3. Check that the calculated C;,j are within the bounds of Table 2. If not, assign them the nearest bound values. To save computation time it can be useful to recognize during circuit compilation all the couples of independent signals and the gates for which there is no fan-out reconvergencies because for parts of the circuit that are fan-out free or tree-structured it is simpler and faster to use the 0-algorithm. zyxwvutsrqponmlkjihgfedcb k zyxwvutsrqp Figure 2. The rules here given only for two input gates can be easily extended to the general case considering a multiple input gate as a cascade of two input ones. As an example, in Fig. 3 this procedure is applied to the case of a three input AND gate. zyx zyxwvutsrqpon 4.4 An e x a m p l e As an example of the application of the Correlation Coefficient Method (CCM), we estimate the node signal probabilities of the 2-input multiplexer of Fig.4, where G4 is the only gate at which there is reconvergency. =$ h m h m do II I Figure 3. I I i nl I In case 4 and 5 of Table 3 we assume Figure 4. thus neglecting the dependencies of two signals to a third, hence the effect of second order conditional probabilies. The computation of second order correlation coefficients could in principle be done with a technique similar to that used to derive Table 3. This, however, would lead to an overwhelming increase of CPU time, for each level proportional to the cube of the number of gates at that level. On the other hand, the accuracy already achieved with only first order correlations (see later) suggests that an improvement in the cost/benefit trade off is very unlikely. Neglecting higher order correlations, the calculated Ci,j can lead to gate output probabilities outside the 01 interval. This can be avoided by limiting C;,, within the bounds given in Table2. At level 0 initialize the input probabilities and the correlation coefficients assuming the signals to be independent. Introduce the correlation due to s: p ( d 0 ) = p ( d 1 ) = p ( s ) = 0.5; zyxwvuts Calculate the node probabilities and the correlation coefficients at level 1 by means of the rules of Table 1, 2, 3: p ( n s ) = 0.5; I36 zyxwvut zyxwvutsrqpo zyxwvutsrqpon zyxwvutsr zyxwvut zyxwvut zyxwv zyxwvu At the next level in the network repeat the previous step: both the RMS and the ME calculated with our two algorithms are significantly smaller than those achieved with the others. In particular the DWAA gives better result than the WAA increasing the the number of RFONs and the size of the circuit. The WAA is more powerful only for those circuits having the RFONs close to the primary inputs. From Table 4 it can also be seen that the results obtained on SN74LS157 (data selector) confirms that the CCM is exact for circuits presenting only first-order conditional probability. p(n1) = p(n2) = 0.25; C n 1 , n Z = C s , n e C e , d l C d O , n s C d O , d l = 0; At last level calculate only the signal probabilities. P(W) = 0.25 + 0.25 - 0.25 * 0.25 * 0 = 0.5; As can be easily verified by direct inspection the results are correct. 5. RESULTS AND DISCUSSION zyx zy Table 5. The two new method described in the previous sections have been applied on a few commercial circuits and benchmarks suggested in [13]. The results have been compared with references obtained through exhaustive simulations or, when these were upracticable, with extensive Monte Carlo calculations (performed until achieving a satisfactory convergence in the signal probabilities). In order to measure the quality of our results, we define the error as the root mean square (RMS) deviation from the reference values on all the internal nodes. As this regard it is worth mentioning that other authors use different error definitions. For instance Ref. [lo] considers the average on all the nodes of the absolute difference from the reference results. We prefer to use the RMS deviation because in this case each single error on each internal node is weighted depending on its distance from the exact value, however the results provided by our methods are significantly better than those of previous works regardeless of the actual error definition. Time Requirement ~~ N COP I WAA DWAA CCM I (1 + 2M)N I (1 + 2 F ) N I I E,NL(NL - 1)/2 Table 5 shows a comparison of the same methods of Table 4 in terms of time requirement. Instead of giving the actual CPU time, strictly depending on the the algorithm implementation and on the computer architecture, we prefer to concentrate on the relationship between calculation time and circuit parameters. The DWAA is linear in the product F N , where F if the number of RFONs. In particular, since for each RFON we have t o consider only that part of the network that is in its fan-out cone, (1 2 F ) N is the maximum time consuption (for a circuit in which every RFON affects all the gates). The CCM is linear in the number of levels ( L ) and pseudo-quadratic in that of the gates per level ( N L ) . Its performances depend on the internal structure of the network and not only on the number of gates: for a square circuit, namely when we can assume N L = L = fi the complexity of the CCM becomes N ( f i - 1)/2. In general the calculation time is less than the limit indicated in Table 5 because the CCM calculates the correlation coefficients only for couples of signals that are dependent from each other. + Table 4. The reported values represent the RMS and the ME from the reference results obtained with exhaustive and Monte Carlo (*) simulations. (t) References C1355' 0.0900 0.1475 0.0747 0.1474 0.0595 0.0208 0.1305 0.0473 [l] K.D. Wagner, C.K. Chin and E.J. McCluskey, "Pseudorandom testing", IEEE Transactions on Computer, (2-36,332 (1987) 121 E.J. McCluskey, S. Makar, S. Mourad and K.D. Wagner, "Probability models for pseudorandom testing", IEEE Transactions on CAD, 7, 68 (1988) [3] W.K. Huang, M. Lightner and F. Lombardi, "Predicting fault coverage for random testing of combinational circuits", Proceeding 1987 International Test Conference, 834 In Table 4 we compare the RMS values and the maximum error (ME) calculated with our methods (DWAA, CCM) with those given by some of the procedures mentioned in section 2, namely COP and WAA. As can be seen, I37 zyxwvutsrqponm zyxwvutsr zyxwvutsrqp zyxwvut [4] J. Savir, G.D. Ditlow and P.H. Bardell, "Random pat- tern testability", IEEE nansaction on Computer, C 33, 29 (1984) [5] P. Goel, "Test generation costs and projections", Proceeding 12th Annual Fault Tolerant Computer Symposium, 101 (1982) 161 B. Krishnamurthy and I.G. Tollis, "Improved Techniques for estimating signal probabilities", Proceeding 1986 International Test Conference, 244 [7] F. Brglea, P. Pownall and R. Hum, "Application of testability analysis: from ATPG to critical delay path tracing", Proceeding 6984 International Test Conference, 705 [8] S.K. Jain and V.D. Agrawal, "Statistical fault analysis", IEEE Design & Test, February 1985, 38 191 H.J. Wunderlich, "Protest: a tool for probabilistic testability analysis", Proceeding 22nd Design Automation Conference, 204 (1985) [lo] P. Camurati, P.Prinetto and M. Sonza Reorda, "Random testability analysis: comparing and evaluating existing approaches", Proceeding 1988 International Conference on Computer Design (111 K.P. Parker and E.J. McCluskey, "Probabilistic Treatment of General Combinational Networks", IEEE Transaction on Computer, C-24, 668 (1975) [12] M. Lokve, "Probability theory", Van Nostrand, 2nd Edition [13] F. Brglez and H. Fujiwara, "A neutral netlist of 10 combinational benchmark circuits and a target translator in Fortran", Proceeding 1985 International Symposium on Circuit And Systems zyxwvutsrqp zyxwvutsrq zyxwvu