DECISION DIAGRAMS AND DIGITAL TEST Raimund Ubar Tallinn University of Technology, Tallinn, Estonia INVITED PAPER MIDEM 2005 CONFERENCE 14.09.2005 - 16.09.20045, Bled, Slovenia Key words: testing, testing of digital systems, decision diagrams, hierarciiical modeling, iiigh level decision diagrams, vector descision diagrams Abstract: The most important question in testing today's compiex digitai systems is: how to improve the testing quality at continuously increasing complexities of systems? Two main trends can be observed: defect-orientation to increase the quality of testing, and high-level modelling to reduce the complexity problems of diagnostic analysis. Both trends can be joined in the hierarchical approach. Decision Diagrams (DD) serve as a good tool for hierarchical modelling and diagnostic analysis of digital systems. Traditional Binary Decision Diagrams are well known for worl1 Figure 2: Combinationai macro and Iiis SSBDD is represented on the gate level or on the higher macro-level whereas the macro means an arbitrary single-output subcircuit of the whole circuit. Moreover, the test generation procedures developed for SSBDDs can be easily generalized for higher level DDs to handle digital systems represented at higher levels /6,16,17/. The BDD that represents a Boolean function is a directed noncyclic graph with a single root node, where all nonterminal nodes are labelled by Boolean variables (arguments of the function) and have always exactly two successor-nodes whereas the terminal nodes are labelled by constants 0 or 1. For all nonterminal nodes, a one-to-one correspondence exists between the values of the label variable of the node and the successors of the node. The correspondence is determined by the Boolean function to be represented by the graph. Denote the variable which labels a node m in a BDD by x{m). We say that a value of the node variable activates the node output edge. According to the value of x(m), one of two output edges of m will be activated. If x(m) = 1 we say 1-edge is activated, or if x(m) =0 we say 0-edge is activated. A path is activated if all the edges that form this path are activated. The BDD is activated to 0 (or 1) if there exists an activated path which includes both the root node and the terminal node labelled by the constant 0 (or 1). Definition 3.1. A BDD Gy with nodes labelled by variables xi, X2,..., Xn, represents a Boolean function y = f(X) = f(xi, X2.....Xn), if for each pattern of X, the BDD will be activated to the value which is equal to y for the same pattern. Important property of SSBDDs. SSBDDs differently from traditional BDDs have the following property: each node m in a Gy which describes a tree-lil 2,3,4,5 IN Ha-^RI A V R AaR 10 z A Figure 6: Decision Diagrams for a hypothetical microprocessor An example of a hypothetical microprocessor is presented in Figure 5 given by a instruction set and three DDs Ga, Gr, Gout, for representing the behaviour, correspondingly, of accumulator^, register Rand output logic. Since the model consists of several DDs representing a network of modules, the following tasks are solved for test generation: fault manifestation, fault propagation and line justification. To generate a scanning test for the node/\+flin Ga, a path l{A+R) = {I, A+R) in Ga is activated, which produces a test pattern / = /7. The test data vector DATA =(/^1,1,^2,1; ^1,2,^2,2; ■■■ A^,m,R2.m) fortesting the adder are generated by a low level ATPG. These operations correspond to the fault manifestation procedure, i.e. for solving a set of conditions H^ =1 to map the low-level defects of the adder to the behavior level errors in the register/A. For propagating the faults from A to OUT, a scanning test for the node A in Gout is generated. As the result, the path l{A) = {I, A) in Gout is activated, which produces a test pattern I = /4. For justification of the data variables A and R, the paths /(/A/) = Data Path M MUXi MUX2 COND A ADR B C CC Control Path 5ix S4- Begin A=B + C 0 1 .Xa B = B + C Xa FF B = ^B C=-C C=--.C 0 1 [A = A+ B + C ] C = A + B A = -,C + B 1 1 1 -So ■S1 "S2 ■ S5 END Figure 7: A digital system with a behavioral description (/, IN), correspondingly, in Ga and Gr are to be activated which produce symbolic test vectors {I = h, IN = a) and (/ = /5, IN = r). The scanning test consists in cyclically run sequence: FOR all (a/) g DATA: //5: MOV R,M (Load R = r); /1: MVI A,D (Load = a); /7: ADD R{A = a + b)] U: MOV M,A(Read/^)/. Consider a digital system with a behavioral description in Figure 6. The system consists of control and data parts. The FSM of the control part of the system is given by the output function y = A (q', x) and the next-state function q = 5 (q', x), where y is an integer output vector variable, which represents a microinstruction with four control fields y = (Ym, Vz, Yz.h yz,2), x = (xa, xc) is a Boolean input vector variable, and q is the integer state variable. The value / of the state variable corresponds to the state s/ of the FSM. The apostrophe refers to the value from the previous clock cycle. The data path consists of the memory block M with three registers/!; B, C together with the addressing block ADA, represented by three DDs: A = Ga (ym, z), B = Gb (ym, z), C Gc (Ym, z)\ of the data manipulation block CC where z = Gz (Yz, zi, Z2); and of two multiplexers zj = Gz,i (Yz,i, M) and Z2 = Gz,2 (yz,2, M). The block COND performs the calculation of the condition function x = Gx (A, C). By superpositioning the DDs /21/ we can represent the system by only four DDs Gq, Ga, Gb, and Gc in Figure 7a. Consider now the possibility of joining a set of DDs into a single DD. In Figure 7b the DDs Ga, Gb, Gc and Gq are joined into a single Vector Decision Diagram (VDD) M = A.B.C.q = Gm (q', A, B, C, I) which produces a new concise model of the system. For calculating the values to different components of the vector variable M, we introduce a new type of node in VDD called addressing node labeled by an addressing variable I. The VDDs offer the capability to efficiently represent the array variables (corresponding to register blocks and memories) for calculating and updating their values. VDDs are particularly efficient for representing functional memories with complex input logic - with shared and dedicated parts for different memory locations. In general case, all the registers of the data path can be combined in the model as a single memory block. T ^^^ —[#5] —{#3 1 #3| JzCi #5 -'S' L#5j zBL #5^ Figure 8. Representing the digital system in Figure 7 by high-level Decision Diagrams Using VDDs allows significally to increase the speed of simulation, For example, in Gm in Figure 7b for tine input vector q'= 4,xa = 0, xc = 0, the nodes q'andx/\, are traversed for calculating both new/values of-4 and B only once, whereas in case of separate DDs in Figure 7a the nodes c/'and should be traversed for all the graphs: for calculating separately/A, B, C, and q. 5. Experimental results Table 3 presents the results of investigating the defect-oriented hierarchical test generation based on using of physical defect tables for library cells and logic macro level test generation. Experiments were carried out with a new defect-oriented Automated Test Pattern Generator (ATPG) DOT /22/ for detecting the AND-short defects in the 0.8|jm CMOS technology. We used circuits resynthe-sized from the Verilog versions of the ISCAS85 suite as benchmarks for tests. The circuits were synthesised by SYNOPSYS Design Compiler. Column 2 in Table 3 shows the total number of defects in the defect tables summed over all the gates belonging to the netlist. Column 3 reflects the number of gate level redundant defects. These are defects that cannot be covered by any gate input (Gl) vector of the gate. In column 4 circuit level redundant defects are counted. These are defects that cannot be tested as the circuit structure does not allow to generate a test for any of the Gl vectors covering the defect. This redundancy is proved by the DOT tool. Column 8 shows the percentage of defects covered by DOT, while column 5 shows the ability of logic level SAP-oriented ATPG to cover the physical defects. The next coverage measure shows the SAF-oriented test efficiency. In this value, both, gate level redundancy of defects (column 6) and circuit level redundancy of defects (column 7) are taken into account. The experiments prove that relying on 100 % SAFtest coverage would not necessarily guarantee a good coverage of physical defects. In many situations the achieved coverage remained well below what can be achievable with the defect-oriented tool. For example, for circuit c2670 the defect coverage 98,29% obtained by SAF tests was more than 1.7 % lower than the result of the proposed tool. An interesting remark is, that up to nearly 25% of the defects were proved redundant by the DOT and can therefore not be detected by any voltage test. 75% defect coverage for c880 by 100% SAF-test gives not much confidence for this test. Only using DOT allows to prove that most of the undetected defects are redundant, and that the real test efficiency of this SAF-test is actually 99,66%) giving finally a good confidence to the test. Table 4: Comparison of ATPGs Circuit Faults HITEC [1] GATEST [3] DECIDER [9,23] F.C. % Time s F.C. % Time s F.C., % Time, s gcd 454 81.1 170 91.0 75 89.9 14 sosq 1938 77.3 728 79.9 739 80.0 79 mult 2036 65.9 1243 69.2 822 74.1 50 ellipf 5388 87.9 2090 94.7 6229 95.0 1198 rise 6434 52.8 49020 96.0 2459 96,5 151 diffeq 10008 96.2 13320 96.4 3000 96.5 296 average F.C.: 76.9 87.9 88.6 The experiments of the hierarchical DD-based ATPG DECIDER /9,23/ developed at the Tallinn Technical University were run on a 366 MHz SUN UltraSPARC 60 server with 512 MB RAM under SOUVRIS 2.8 operating system. At present, DECIDER contains gate-level EDIF interface which is capable of reading designs of CAD systems CADENCE, MENTOR GRAPHICS, VIEWLOGIC, SYNOPSYS, etc. In Table 4, comparison of test generation results of three ATPG tools are presented on six hierarchical benchmarks. The tools used for comparison include HITEC /1 /, which is a logic-level deterministic ATPG and GATEST /3/ as a genetic-algorithm based tool. Actual stuck-at-fault coverages of the test sequences generated by all the tools were measured by the same fault simulation software. The experimental results show the high speed of the ATPG DECIDER which is explained by the DD-based hierarchical approach used in test generation. Table 3: Experiments of defect oriented test generation on logic level Circuit Number of defects Defect coverage All defects Redundant defects 100% stuck-at fault ATPG DOT Gates System 1 2 3 4 5 6 7 8 c432 1519 226 0 78,6 99,05 99,05 100,00 c880 3380 499 5 75,0 99,50 99,66 100,00 c2670 6090 703 61 79,1 98,29 98,29 100,00 C3540 7660 985 74 80,1 98,52 99,76 99,97 c5315 14794 1546 260 82,4 97,73 99,93 100,00 c6288 24433 4005 41 77,0 99,81 100,00 100,00 6. Conclusions Two main trends can be observed today in the field of digital test: defect-orientation to increase the quality of testing, and high-level modelling to reduce the complexity problems of diagnostic analysis. However, on the other hand, counting physical defects increases the complexity, and high-level modelling reduces the accuracy. Hierarchical approaches can solve this antagonism. Decision diagrams discussed in the paper contribute as a good tool for hierarchical modelling and diagnostic analysis of digital systems. The new innovative forms of DDs, structurally synthesized binary decision diagrams, high-level and vector decision diagrams have been discussed. From simulation point of view, they provide a compact and efficient representations of digital systems. High-level DDs is a new model, and there are a lot of possibilities for further research, for additional improvements and optimization. Acknowledgements: This work has been supported by EU V Framework projects IST-2000-30193 REASON and lST-2001-37592 eVIKINGs II, as well as by the Estonian Science Foundation grants 5649 and 5910. A special thanks to my colleagues Jaan Raik and Artur Jutman from Tallinn University of Technology and Joachim Sudbrock from Darmstadt University of Technology (Germany) for developing the prototype tools of test generation and fault simulation by using DDs. 7. References /1/ T. M. Niermann, J. H. Patel. HITEC: Atest generation package for sequential circuits. Proc. European Cont. Design Automation (EDAC). pp.2^4-2^8, 1991 /2/ J.F. Santucci et ai. Speed up of behavioral ATPG. 30f/i ACM/ lEEEDAC, pp. 92-96, 1993. /3/ E. M. Rudnick, J. H. Patel, G, S. Greenstein, T. M. Niermann. Sequential circuit test generation in a genetic algorittim framework. Proc. Design Automation Conference, pp. 698-704, 1994. /4/ R.E.Bryant. Graph-based algorithms for Boolean function manipulation. iEEE Trans, on Computers, Vol.C-35, No8, 1986, pp.667-690. /5/ S. Minato. BDDs and Applications for VLSI CAD. Kiuwer Academic Publishers. 1996, 141 p. /6/ R.Ubar. Test Synthesis with Alternative Graphs. iEEE Design&Test of Computers^ Spring 1996,pp.48-57. /7/ R.Ubar Multi-Valued Simulation of Digital Circuits with Structurally Synthesized Binary Decision Diagrams. OPA (Overseas Pubi. Ass.) N. v. Gordon and Breach Pubiishers, /Multiple Vaiued Logic, Vol.4,1998,pp.141-157. /8/ R.Ubar. Combining Functional and Structural Approaches In Test Generation for Digital Systems. fVlicroelectronics Reiiabiiity, Vol. 38, No 3, pp.317-329, 1998. /9/ J.Raik, R.Ubar. Sequential Circuit Test Generation Using Decision Diagram Models. iEEE Proc, of Design Automation and Test in Europe, Mur\\ch, March 9-12, 1999, pp. 736-740. /10/ L.M. Huisman. Fault Coverage and Yield Predictions: Do We Need More than 100% Coverage? Proc. of European Test Conference, 1993, pp. 180-187. /11/ RNigh, W.Maly. Layout - Driven Test Generation. Proc. iCCAD, 1989, 154-157. /12/ M.Jacometand W.Guggenbuhl. Layout-Dependent Fault Analysis and Test Synthesis for CMOS Circuits. iEEE Trans, on CAD, 1993, 12,888-899. /13/ R.Ubar, W.Kuzmicz, W.PIeskacz, J.Raik. Defect-Oriented Fault Simulation and Test Generation in Digital Circuits. int. Symp. on Quality of Electronic Design, San Jose, California, March 26-28, 2001, pp.365-371. /14/ R.Ubar. Test Generation for Digital Circuits with Alternative Graphs. Proceedings of Tallinn Technical University No 409, 1976, pp.75-81 (in Russian). /15/ S.B.Akers. Functional Testing with Binary Decision Diagrams. J. of Design Automation and Fault-Tolerant Computing, Vol.2, Oct. 1978, pp.311-331. /16/ R.Ubar. Vektorielle Alternative Graphen und Fehlerdiagnose für digitale Systeme. Nachrichtentechnil