K.T. Tim heng, 5_comb_tg, v. Outline utomatic Test Pattern Generation Test generation systems Test generation for combinational ckts -lgorithm POM oolean Satisfiability approach Test compaction Test generation for sequential ckts Time-frame expansion & xtended -lgorithm Nine-valued test generation Potential detection Issues of sequential TPG Test sequence compaction K.T. Tim heng, 5_comb_tg, v. 2
The TPG Problem Problem definition: Given a logical fault model, and a circuit, determine a small set of test vectors that detect all faults in the circuit. Problem complexity: Under the stuck-at fault model, the problem is NP-complete even for combinational circuits However, commercial test generators that efficiently generate tests for >M-gate ckts are in use today. K.T. Tim heng, 5_comb_tg, v. 3 asics: Path Sensitization Method tomic operations:. ctivation, fault excitation: Specify inputs so as to generate the appropriate value at fault site for fault excitation (I.e. set S to for S-stuck-at- fault) 2. rror propagation: specify additional signal values to propagate the fault effect from the fault site to the outputs/observation points 3. Line justification: Specify input values so as to produce the signal values specified in () or (2) 4. Value implication: unique determination of values at other signals due to value assignments made in (), (2), or (3) K.T. Tim heng, 5_comb_tg, v. 4 2
Simple xample f G a s.a. G6 f2 () Fault activation : = = = (2) Have a choice of error propagating: through G 5 or G 6 (a) Propagating through G 5 requires G 2 = == contradiction (b) Propagating through G 6 requires G 4 = =, = Test =(x) K.T. Tim heng, 5_comb_tg, v. 5 Line Justification H F G4 s-a- = G = = to propagate through G. To propagate G 4, need G 2 = G 3 = ttempt to line justify G 2 = G 3 = G 3 = possible if = F = or = H = If = F = inconsistency since = so G 2 =. Therefore, G 3 = = H = G 2 = need = or F = Tests are H, FH K.T. Tim heng, 5_comb_tg, v. 6 3
ompleteness of TPG lgorithms test generation algorithm is deemed complete iff it will find a test for a fault if exists or prove that there exists no test, given sufficient time. omplete algorithms can identify untestable faults Major complete algorithms for comb. ckts -algorithm (Roth, 966) POM (Goel, 98) FN (Fujiwara, 983) Socrates (Schulz, 988) oolean-st-based TPG (Larrabee, 992) K.T. Tim heng, 5_comb_tg, v. 7 Single Path Sensitization Is NOT omplete x d s.a. G 6 G d G4 f d s-a- : = = Propagate along G 3, G 6 requires =, G 2 = G 4 = G 5 =. In order for G 4 = either = or G = inconsistency =, = G 5 = inconsistency Propagate along G 4, G 6 = & G 2 = G 3 = G 5 = G 2 = =, = G 3 = inconsistency No test K.T. Tim heng, 5_comb_tg, v. 8 4
ut oolean ifference Method Finds Test =()!! G d s-a- / / G4 / / G6 / K.T. Tim heng, 5_comb_tg, v. 9 Multiple Path Sensitization G d s-a- / / G4 / / G6 / Two paths G 3, G 2 and G 4, G 6 are sensitized, i.e. error is propagated along both paths. K.T. Tim heng, 5_comb_tg, v. 5
The -lgebra Need to be able to deal with multiple errors at the inputs to a gate. represents a signal which has value in normal (fault-free, good) ckt, and value in faulty ckt. (I.e. /); Similarly, / ehaves like a oolean variable. K.T. Tim heng, 5_comb_tg, v. Primitive -cubes Specifies the minimal input conditions which must be applies to a logic element in order to produce an error signal at the output of Propagation -cubes The propagation -cubes of a logic element specify minimal input conditions which are required to propagate an error signal on an input (or inputs) to the output of that element. K.T. Tim heng, 5_comb_tg, v. 2 6
n xample 2 H J 8 9 G s.a. G4 5 7 G6 2 3 G s-a- : 3 4 6 F 2 3 4 5 6 7 8 9 2 3 primitive -cube primitive cubes of primitive cubes of primitive cubes of G4 primitive cubes of primitive cubes of G6 K.T. Tim heng, 5_comb_tg, v. 3 The -lgorithm ) Select a primitive -cube of the fault 2) Implication and checking for inconsistency. If inconsistency occurs, go to (). 3) -drive: selects an element in -frontier & attempts to propagate or in its inputs to its output. -frontier consists of set of all elements whose output values are unspecified but inputs have some signals with or. -drive is done by intersecting the test cube with a propagation -cube of the selected element. acktrack, i.e. select another propagation -cube, if intersection is null. 4) Implication of -drive: perform implication for the new test cube. 5) Repeat 3) & 4) until faulty signal propagated to an output. 6) Line justification: onsistency check on input conditions required. K.T. Tim heng, 5_comb_tg, v. 4 7
-lgorithm xample 2 H J 8 9 G s.a. G4 5 7 G6 2 3 3 4 6 F K.T. Tim heng, 5_comb_tg, v. 5 2 3 4 H J 8 9 G s.a. G4 5 6 7 F initial test cube ti propagation -cube of test cube after -drive through = tc' perform implication G6 2 3 2 3 4 5 6 7 8 9 2 3 heck implication: -cube of G does not imply any other signal. -frontier : G 3 Get propagation -cube for G 3 K.T. Tim heng, 5_comb_tg, v. 6 8
Now -frontier is G 5 & G 6 Select G 5 and a propagation -cube of G 5 2 3 4 5 6 7 8 9 2 3 perform implication propagation -cube of Test cube after -drive Line justification or 8 G4 H J 9 2 G 5 7 2 s.a. G6 3 F 3 6 K.T. 4Tim heng, 5_comb_tg, v. 7 Flowchart for -algorithm start Initialize test cube (tc) Select a primitive -cube of that as inconsistent acktrack to the last point a choice exists none exists -intersect with previous test cube tc and perform implication consistent Is there a or on any PO? no Select a gate from -frontier and a propagation -cube of the selected gate as yes Line Justification impossible done Test has been generated K.T. Tim heng, 5_comb_tg, v. 8 9
Line Justification egin Is there any line in tc which are not justified yes Select an unjustified line and a primitive cube to justify the line Intersect with previous test cube tc inconsistent consistent acktrack to the last Line point a choice exists justification impossible none exists no Test has been generated K.T. Tim heng, 5_comb_tg, v. 9 -lgorithm xample G 5 2 6 3 s-a- 4 7 G4 G6 G7 8 9 G8 2 3 4 5 6 7 8 9 2 primitive -cube () implication (2) Select -frontier (3) implication (4) implication (5) 2 Select -frontier G8 (6) Implication Line justification (7) Implication Line justification (8) inconsistent & backtrack to (6) Select -frontier G6 (9) K.T. Tim heng, 5_comb_tg, v. 2 implication (8) implication () Test is found :
Potential Problems with -lgorithm Since the assignment of values is allowed to internal lines, more than one choice is available at such internal line/gate and backtracking could occur at each gate ould result in inefficiency for large ckts and some special classes of ckts. xample: n T (error-correction-&-translation) ckt H s.a. J F G K N P R Q L M K.T. Tim heng, 5_comb_tg, v. 2 The POM lgorithm (Goel 98) Only allows assignment of values to primary inputs The values assigned to primary inputs are then propagated toward internal lines by the implication. xample: First, a binary value is assigned to an unassigned PI to provide a fault effect at fault site: = etermine the implications of assigned PIs (only forward implication): = cause no implication Next, assign = = = imply H = F G H s.a. J N K L M P Q R K.T. Tim heng, 5_comb_tg, v. 22
POM ecision Tree for the xample Start = = H s.a. P = = J = = = F G L K N Q R F = F = M Test has been Successfully generated G = G = K.T. Tim heng, 5_comb_tg, v. 23 POM ssentially a process of finding a PI & a binary value for initial assignment. ontinue assigning PI values, checking to see if the error is being propagated to outputs (after each PI assignment, perform forward implication) If at any stage, either the fault cannot be excited or the error cannot be propagated further, backtrack to the most recent PI assignment and change it. K.T. Tim heng, 5_comb_tg, v. 24 2
Flowchart of POM Start ssign a binary value to an unassigned PI etermine implication of all PIs Test is found No test exists yes no Is there a or on any P? Is there an untried combination of values on assigned PIs? yes Set untried combination of values on assigned PIs no Test possible with additional no assigned PIs? maybe K.T. Tim heng, 5_comb_tg, v. 25 Steps in POM () etermine an initial objective. If the fault effect has not appeared at fault site, the initial objective is directed toward providing the fault effect on the faulty line. (2) Given the initial objective, a PI & a logic value are chosen that have a good likelihood of meeting the object. one using the backtrace procedure. K.T. Tim heng, 5_comb_tg, v. 26 3
Flowchart of acktrace begin Found PI initial assignment is the current objective value xit OR/NN & V= N/NOR & V= yes no (fed by gate G) urrent objective value V and type of gate driving Next obj line is the input of G which is at x and is the hardest to control Next obj value is the same as the current objective value objective line? no Is objective line fed by a PI? OR/NN & V= N/NOR & V= Next obj line is the input of G which is at x and is the easiest to control Is G a NN/NOR gate? yes Next obj value is the complement of the current objective value K.T. Tim heng, 5_comb_tg, v. 27 POM xample Initial objective: (, G 2 ) G4 acktrace to PI : 2 = G Initial objective: (, G 2 ) acktrace: 3 = Implication: G 2 = 2 3 4 s-a- G6 G8 Z -frontier is { G 5, G 6 } G7 ttempt to propagate through G 5 Require = Implication: G =, G 4 =, G 5 = ttempt to propagate through G 8 K.T. Tim heng, 5_comb_tg, v. 28 4
POM xample ont d Initial objective: (, G 6 ) acktrace to set 4 = Implication: G 3 =, G 7 = & G 8 = failed in propagating error acktrack to most recent PI assignment reassign 4 = Implication: G 3 =, G 6 =, G 8 = Test is generated 2 = G G4 ecision tree 3 = 4 = test is found = 2 3 4 4 = conflict & backtrack s-a- G6 G7 G8 Z K.T. Tim heng, 5_comb_tg, v. 29 ost of TPG () How long? (Time complexity) () How much RM? (Space complexity) () How many vectors generated? (Test application time) Theoretical result (Ibarra & Sahni, 975) : Generating a test for comb. ckt is NP-complete Worst-case time constant G (G = # of gates) mperical result (average-time behavior): Total TPG time constant G 2 Test length G K.T. Tim heng, 5_comb_tg, v. 3 5
ccelerating omb. TPG asic goals: Reduce number of backtracks Reduce processing between backtracking asic tools: Topological analysis Multiple backtrace Learning K.T. Tim heng, 5_comb_tg, v. 3 Socrates: Static Learning Preprocessing the ckt: () ssign a logic value to a certain signal of the ckt (2) Perform all implications from that assignment (3) Learn from the results of implications Using law of contraposition: ( ) (!!) Preprocessing: uring TPG: b d a f c e b a c d e ( a = f = ) ( f = a = ) b b d d a f a c e c e f Learned information f K.T. Tim heng, 5_comb_tg, v. 32 6
oolean Satisfiability pproach Given a fault, it consists of two steps: Step : onstruct a formula expressing the oolean ifference of a circuit with respect to the fault Step 2: pply a oolean Satisfiability (ST) solver to the resulting formula K.T. Tim heng, 5_comb_tg, v. 33 Step : xtracting the formula ach node of the ckt is tagged with the logic formula in 3-element conjunctive normal form, or 3NF The formula is true iff the values assigned are consistent with the truth for the logic element ( + ) * ( + ) * ( + + ) ( + ) * ( + ) * ( + + ) ( + ) * ( + ) K.T. Tim heng, 5_comb_tg, v. 34 7
Step : xtracting the formula ont d (a) onstruct the formula of the good circuit output (+) * (+) * (++) (+) * (+) * (++) (+) * (+) (b) onstruct formula of faulty circuit output for fault stuck-at- (no need to repeat the part identical to (a)) (+) * (+) * (++) ' ('+') * ('+) * ('+'+) ' (+) * (+) K.T. Tim heng, 5_comb_tg, v. 35 Step : xtracting the formula ont d (c) onstruct the formula of the oolean ifference: OR of (a) & (b) and the output of OR should be =(+ ) (+ )=V V 2 = From (a): (+) (+) (++) (+) (+) (++) (+) (+) From (b): ( + ) ( +) ( + +) From (c): (V +) (V + ) (V ++ ) (V 2 +) (V 2 + ) (V 2 ++ ) (+V ) (+V 2 ) (+V +V 2 ) (note: = =(+ ) (+ )=V V 2 ) K.T. Tim heng, 5_comb_tg, v. 36 8
Step 2: Satisfying the Formula - oolean Satisfiability Given a suitable representation for a oolean function f(): Find an assignment * such that f(*) = Or prove that such an assignment does not exist (i.e. f() = for all possible assignments) In the classical ST problem, f() is represented in product-ofsums (POS) or conjunctive normal form (NF) Many decision (yes/no) problems can be formulated either directly or indirectly in terms of oolean Satisfiability K.T. Tim heng, 5_comb_tg, v. 37 Public Released ST Solvers by US -ST: ombinational ircuit-based ST Solver F. Lu, Li-. Wang, K.-T heng, and R. Huang, ircuit ST solver with Signal orrelation guided learning, T, March 23. F. Lu, L.-. Wang, K.-T. heng, J. Moondanos and Z. Hanna, " Signal orrelation Guided TPG Solver and Its pplications for Solving ifficult Industrial ases,", Jun. 23. Satori & Seq-ST: Sequential ircuit-based ST Solver M. K. Iyer, G. Parthasarathy, and K.-T heng, STORI Fast Sequential ST solver for ircuits, I, Nov. 23. F. Lu, M. K. Iyer, G. Parthasarathy and K.-T. heng, "n fficient Sequential ST Solver With Improved Search Strategies," I Proc. esign, utomation & Test in urope (T), Mar. 25. K.T. Tim heng, 5_comb_tg, v. 38 9
Test ompaction for omb. Tests Fault simulate test patterns in reverse order of generation TPG patterns go first Randomly-generated patterns go last (because they may have less coverage) When coverage reaches %, drop remaining patterns (which are the useless random ones) ould significantly shortens test sequence reducing test application time K.T. Tim heng, 5_comb_tg, v. 39 2