Create Presentation
Download Presentation

Download Presentation
## The Test Pattern Generation for Mutant Propagation Analysis

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**Yen-Chi Yang**2012/1/6 The Test Pattern Generation for Mutant Propagation Analysis**Outline**• Introduction • Overview • Mutation analysis • Motivation • Terminology • ATPG • Genetic algorithm • Problem formulation • The overview flow • Example • The flow of the algorithm • Experimental result • Conclusion • Future work**Outline**• Introduction • Overview • Mutation analysis • Motivation • Terminology • ATPG • Genetic algorithm • Problem formulation • The overview flow • Example • The flow of the algorithm • Experimental result • Conclusion • Future work**Overview**RT level gate level Genetic algorithm M1 M1 Testbench M2 Test patterns M2 M3 M3 Certitude Information propagate living mutants Test patterns user My research work**Outline**• Introduction • Overview • Mutation analysis • Motivation • Terminology • ATPG • Genetic algorithm • Problem formulation • The overview flow • Example • The flow of the algorithm • Experimental result • Conclusion • Future work**Mutation Analysis (1/2)**• Mutation Analysis originated in the early 1970s in software research. The paper introducing mutation analysis was written by R. A. DeMillo, R. J. Lipton, and F. G. Sayward in 1978. • Mutation Analysis can be used for verification towards the most effective test sets possible.**Mutation Analysis (2/2)**• The advantage of using Mutation Analysis can identify the weakness in the verification environment, so we apply Mutation Analysis and generate the test patterns to compensate for the inadequacies of the test-case.**Outline**• Introduction • Overview • Mutation analysis • Motivation • Terminology • ATPG • Genetic algorithm • Problem formulation • The overview flow • Example • The flow of the algorithm • Experimental result • Conclusion • Future work**Motivation (1/2)**• Generating test vectors to propagate mutants in RT level is difficult due to • large value ranges of variables. • complex operations and conditions.**Motivation (2/2)**• We do not use ATPG because modern design has high complexity. • In our work, we • assume the mutants are generated in the gate level. • use the genetic algorithm to find the test patterns which can propagate the living mutants.**Outline**• Introduction • Overview • Mutation analysis • Motivation • Terminology • ATPG • Genetic algorithm • Problem formulation • The overview flow • Example • The flow of the algorithm • Conclusion • Future work**Terminology(1/4)**• RT level (register-transfer level) is Boolean expressions or RTL descriptions in VHDL or Verilog which are transformed to logic gate networks. • Example: … reg a, b, c; … always @(b or c) begin a = b & c; … end**Terminology(2/4)**• Gate level implementations are in terms of generic gate implementations such as AND gate, OR gate, and NOT gate. • Example: b a c**Terminology(3/4)**• Mutant is an operation which is changed in the test program. • Example: • a = b and c -> a = b or c • replacing “and” by “or” is a mutant**Terminology(4/4)**• Non-Propagated Mutants(NPM) • The test-bench can activate these error events, but the patterns cannot propagate these error events to the observation point.**Example of NPM(1/3)**• Original program. A C E B D**Example of NPM(2/3)**• Replacing C by an OR gate. C is a mutant. 1 A 1 Activate! C 0->1 1 0 E 1 B 0 D 1**Example of NPM(3/3)**• Replacing C by an OR gate. C is a mutant. • The pattern (1,1,1,0,1) can activate C, but it can’t propagate C. 1 A 1 C 1 1 0 Can’t propagate! E 0 1 B 0 D 0 1**Outline**• Introduction • Overview • Mutation analysis • Motivation • Terminology • ATPG • Genetic algorithm • Problem formulation • The overview flow • Example • The flow of the algorithm • Experimental result • Conclusion • Future work**ATPG**• Automatic test-pattern generation (ATPG) is the process of generating patterns to test a circuit, which is described with a logiclevelnetlist.**Input and Output of an ATPG**• ATPG • Generate a set of vectors for a set of target faults**Example**• ATPG can generate the pattern (1,1,0) and this pattern can propagate the fault-α. 1 α stuck-at 0 1->0 1 1->0 β 0 0**Outline**• Introduction • Overview • Mutation analysis • Motivation • Terminology • ATPG • Genetic algorithm • Problem formulation • The overview flow • Example • The flow of the algorithm • Experimental result • Conclusion • Future work**Genetic algorithm (1/3)**• A genetic algorithm (GA) is a search heuristic that mimics the process of natural evolution. This heuristic is routinely used to generate useful solutions to optimization and search problems. • Our research work applies the genetic algorithm to create some new patterns, and finally we will get an exactly result.**Example**GA M PO**Genetic algorithm (2/3)**• In the white-box method, the full observability and controllability internal to the circuit is assumed to be available. • The black-box method assumes the internal signals of the circuit are not accessible during verification. Only the external input/output interfaces are directly controllable and observable.**Genetic algorithm (3/3)**• The most difference between ATPG and our method is that ATPG analyze the structure of the circuit to generate the patterns, so ATPG is white-box method. • Our research work applies the genetic algorithm to find the patterns, so our method is a gray-box method.**Outline**• Introduction • Overview • Mutation analysis • Motivation • Terminology • ATPG • Genetic algorithm • Problem formulation • The overview flow • Example • The flow of the algorithm • Experimental result • Conclusion • Future work**Problem formulation**• Inputs: Given a design, a test-bench and a living mutant. • Outputs: Find some patterns which can propagate the living mutant.**Outline**• Introduction • Overview • Mutation analysis • Motivation • Terminology • ATPG • Genetic algorithm • Problem formulation • The overview flow • Example • The flow of the algorithm • Experimental result • Conclusion • Future work**The overview flow**Record. Creation. Inverse. Crossover. Mergence and mutation. Verification. Output some valid patterns to the user. Build the virtual AND tree Random simulation yes no Root = 1 ? dGenetic algorithm Output**Outline**• Introduction • Overview • Mutation analysis • Motivation • Terminology • ATPG • Genetic algorithm • Problem formulation • The overview flow • Example • The flow of the algorithm • Experimental result • Conclusion • Future work**Example1**• Iscas/s27_com.bench G2 D G13 A G0 E G10 B G6 G5 F G17 G1 C G3 G G11 G7**Build the virtual AND gate tree (1/4)**• Add the virtual AND gates for getting the relationship of different sub-pattern and corresponding to its side input. • We will add a virtual AND gate between two adjacent fan-in cones. And then build a virtual AND gate tree.**Build the virtual AND gate tree (2/4)**• Example: M PI PO**Build the virtual AND gate tree (3/4)**• Advantages: • If the logic value of the root of the virtual AND gate tree output one, it means the pattern can propagate the mutant, in this way we don’t have to do genetic algorithm. • And if we have to do genetic algorithm, the iteration times equal to the height of the tree, so the time complexity is O(logn).**Build the virtual AND gate tree (4/4)**• Example: pattern M We find the pattern and don’t have to do GA. 1 PO**Example1**• Set L is a mutant. G2 1 1 1 0 0 1 0 D G13 A G0 I E G10 B G6 V0 1 G5 J V2 G17 F M G1 K G11 G3 C G G7 L V1**Example1**• We get the logic value from the V1, it means that the pattern (1011010) can propagate the mutant L, so we don’t have to run the genetic algorithm.**Example2**T A I Q B Y β U M C X R J D L O V E Z S K F P G W N H Set J is a living mutant.**Example2**T A I Q B Y β U M C R X J D L O V E Z S K F P G W N H Set J is a living mutant.**Example2**T A I Q B Y β U M C X R J D L O V E Z S K F P G W N H Set J is a living mutant.**Example2**T A I Q B Y β U M C X R J D L O V E Z S K F P G W N H Set J is a living mutant.**Example2**T A I Q B Y β U M C X R J D L O V E Z S K F P G W N H Set J is a living mutant.**Example2**A B C D E F G H Set J is a living mutant.**Example2**V0 V2 V1 V3 Build a virtual AND gate tree.**Example2**1 V0 V2 0 V1 0 0 V3 0 After random simulation, we get 0 from V3.r**Example2 – Record(1/2)**• V0 = 1. • V0 =0.**Example2 – Record(2/2)**• V1 =1. • V1 =0.