Objectives
To practice with manual and automatic test
pattern generation. To perform fault simulation and to analyze the simulation
information. To compare the efficiency of different methods and approaches.
Introduction
After a circuit is manufactured it has to be tested for manufacturing defects
(physical faults) to ensure it has been fabricated correctly. There is a number
of various methods used in test generation (TG). For example, deterministic
methods, random and pseudorandom TG, genetic algorithms (and other non deterministic
search) based TG, combined TG, etc. Each technique has its advantages and drawbacks.
The efficiency of TG method can be significantly improved for a some classes
of circuits if we can force it using the information about the functionality
or the structure of the circuit. This is the clue why manual TG sometimes
can give better results than automatic methods. For example, any ripple-carry
adder, no matter how wide it is, can be tested with 8 test vectors only. A human
can easily compose such a test. However, automatic test pattern genrators (ATPG)
can hardly provide a test of such a small length. The main drawback of manual
test generation, however, is the dramatically low speed of the process.
Work description
In this work we are going to study and compare different TG methods. There are
three circuits to be tested. The first one is a relatively small
random circuit with 5 inputs and 2 outputs. The second is a full
8-bit ripple-carry adder with 17 inputs (two 8-bit operands and the carry
in) and 9 outputs (one 8-bit result and the carry out). The third circuit is
to be chosen from the list of comparatively
complex ISCAS '85 benchmarks.
First of all, a manual test pattern generation (random and deterministic) is to be practiced with. The following diagram shows in general what has to be done at this step. We took the deterministic test generation as the example here.
You begin with the selection of the circuit under test and calculate the first test vector (or several vectors at once). For that you have to use one of the methods you have been taught during the lectures. Otherwise, you can use the method from the theoretical notes. This vector must be then converted into a special format and saved in the test vector file. All these technical things are performed by the vecmanager tool. After fault simulation you will receive information about signals in the circuit and faults on these signals that are covered by your test. If the required test coverage level has not been reached yet, the whole process must be repeated.
There are also some automatic tools (ATPGs) to be used for test generation in this work:
A similar diagram (below) illustrates the workflow. The process starts after the circuit and the corresponding ATPG has been chosen. First, the ATPG has to be run with default settings. Then test vectors are fault simulated and the results are registered and saved. The next phase is started with the adjustment of the ATPG. Everything is repeated then with the new ATPG settings. The ATPG can be tuned further and process is repeated again for several times until the target test quality (test length/cover) is achieved.
In the case of the deterministic ATPG, there is no possibility of tuning in order to achieve a shorter test with the same fault coverage. Only the coverage can be improved (if possible) by further adjustment. For some circuits the maximum coverage is always achieved with default options and no tuning needed at all. In that case we can use the test compaction technique. It uses the fault table to select the minimal number of test vectors sufficient to cover all the faults. Remaining vectors can be removed without the fault coverage reduction.
The tasks for Test Generation laboratory work are summarized in the following table, where the sign denotes the task to perform.
|
|
|
|
Random manual
|
|
|
|
Algoritmic manual
|
|
||
ATPG
|
|
After the mentioned tests are obtained the cost of test generation can be calculated. There are different methods used for that. We will use the following equation:
Cost = Cv + Ct + C%
where     |
Cv
= a · (Nr. of vectors) - cost of test length, Ct = b · (Time,s) - cost of test generation time, C% = c · (100% - Cover,%) - cost of fault coverage |
a,
b, and c
are to be chosen by the following rules:
10 additional test vectors can be justified by 1% of fault coverage gain;
we agree to spend 10 seconds more to generate 1-vector shorter test.
 
Steps
Here (as well as in all examples of this course) we will follow the Steps
and show how one can follow them. The circuit to be used in this example is
a small ISCAS '85 benchmark c17 (c17.agm).
TABLE 2x1 x2 x3 x4 x5 Pattern 1 1 0 1 0 1 Pattern 2 0 1 0 1 0 Pattern 3 0 0 0 0 0 Pattern 4 1 1 1 1 1 The obtained cover is 90.91 % (20 out of 22). Not bad but these four vectors are not enough for the given circuit since our goal is 100% fault coverage (if possible) and therefore let us add one pattern more (use vecmanager again). Let it be the pattern 00111. After that the fault simulator reports higher coverage of 95.45 % (21/22). Still not enough. Okay, let's add then, for instance, the pattern 11100. Again 95.45 % (21/22), which means that this pattern doesn't improve the coverage and, therefore, we are going to remove it and select another one. Let it be 10011. This time the simulator reports 100% (22/22). The final result is reflected in the following table.
TABLE 3x1 x2 x3 x4 x5 Pattern 1 1 0 1 0 1 Pattern 2 0 1 0 1 0 Pattern 3 0 0 0 0 0 Pattern 4 1 1 1 1 1 Pattern 5 0 0 1 1 1 Pattern 6 1 0 0 1 1 We have a pure random set of 6 vectors, giving the 100% fault coverage. However, it is maybe possible to compose a shorter test. Let's try other techniques and see if they can improve the test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In Table 5, the experimental results for three ATPG types are given. The first row indicates used options (default and tuned). The three lowest rows reflect the information concerning the number of vectors and the generation time for the three ATPGs.
Mode:
|
Default
|
Tuned/Compacted
|
||
Vectors
|
Time
|
Vectors
|
Time
|
|
Deterministic
|
6
|
0.01
|
6
|
0.01
|
Genetic
*
|
5
|
0.09
|
4
|
0.17
|
Random
|
6
|
0.03
|
4
|
0.07
|
* each time being run, genetic can give different results due to its random behavior
The deterministic ATPG with default options gives a six-pattern test which is longer than that we composed manually. However, we can use the test compaction in order to reduce the number of vectors, at the same time keeping the fault coverage level unchanged. For that we have to run ATPG once again with option -fault_table (generate -fault_table c17). This option allows the fault table used for the test compaction to be saved together with test vectors into the c17.tst file. Then we run optimize c17 command. The results are given in Table 5. As you can see, there is no test reduction this time. However, for larger circuits you should observe it.
The next ATPG is the genetic algorithm-based one. It gives sometimes five, sometimes four vectors with default options. To achieve a shorter test we can set bigger population size. For example the setting -popul_size 64 (instead of -popul_size 32 by default) gives usually a four-vector test. At the same time the generation time grows almost twice. That is, we receive a better test on the cost of the time used for the test generation. What is really better (shorter test or shorter time) in this situation? The question can be answered after the calculation of the test generation cost (step 8).
The random ATPG gives the worst test (6 patterns) when run with default options. However, adjusted (random -pack_size 2 -select_max 1 c17) it is also able to generate the test with minimal length (4 patterns). The generation time in the latter case has also increased.
Last update: 27 July, 2004