Research Article  Open Access
Shen Hui Wu, Sridhar Jandhyala, Yashwant K. Malaiya, Anura P. Jayasumana, "Antirandom Testing: A DistanceBased Approach", VLSI Design, vol. 2008, Article ID 165709, 9 pages, 2008. https://doi.org/10.1155/2008/165709
Antirandom Testing: A DistanceBased Approach
Abstract
Random testing requires each test to be selected randomly regardless of the tests previously applied. This paper introduces the concept of antirandom testing where each test applied is chosen such that its total distance from all previous tests is maximum. This spans the test vector space to the maximum extent possible for a given number of vectors. An algorithm for generating antirandom tests is presented. Compared with traditional pseudorandom testing, antirandom testing is found to be very effective when a highfault coverage needs to be achieved with a limited number of test vectors. The superiority of the new approach is even more significant for testing bridging faults.
1. Introduction
Random testing is a form of blackbox testing which does not require knowledge of the circuit under test. It avoids the problem of deterministic test generation using structural information about the circuit under test. Available evidence suggests that pseudorandom testing may be a reasonable choice for obtaining a moderate degree of confidence, however it becomes inefficient when only hardtotest faults remain [1]. Generally in BIST environment, pseudorandom test vectors are used for testing digital circuits. In pseudorandom testing, each test vector is chosen with equal probability out of a pool that initially contains M different vectors without replacement [2]. A common approach is to generate them using an autonomous linear feedback shift register (ALFSR) based on a primitive polynomial [3]. An alternative approach is to use a cellular automatabased generator [4, 5]. The use of Galois LFSRs (GLFSRs) as test pattern generators for BIST schemes employing multiple scan chains is investigated in [6, 7]. The effectiveness of such techniques can be enhanced by using some information about the circuit under test and tailoring the generator hardware to achieve higher coverage faster [8]. Weighted random pattern techniques adjust the probability generating 1's and 0's at each input, rather than using equal probabilities. Such an approach has been shown to increase efficiency of testing, especially for modules such as PLAs [9]. In some cases test generation for selftesting may be implemented in software [10].
Pseudorandom testing does not exploit some information that is available in blackbox testing environment. This information consists of the previous tests applied. If an experienced test engineer is generating tests by hand, he would select each new test such that it covers some part of the functionality not yet covered by tests already generated. The objective of this paper is to formally define a blackbox approach that uses this information, and to propose schemes that may allow such test generation to be done automatically. We term this approach antirandom testing, since selection of each test explicitly depends on the tests already obtained. This technique can potentially be used in place of the traditional pseudorandom testing.
In Section 2 we define and characterize the antirandom test patterns. A procedure for generating antirandom tests is described. Then we compare pseudorandom and antirandom strategies by evaluating their effectiveness for ISCAS benchmark circuits. Both stuckat and bridging faults are considered.
2. Binary Antirandom Sequences
Antirandom testing [11] is a blackbox strategy like pseudorandom testing, meaning that it assumes no information about the internal implementation of the circuit. However, it explicitly uses information about the past vectors applied for generating a new vector. Here we start with formal definitions of the terms used and then examine construction of antirandom sequences.
Deffinition 1. Antirandom test sequence (ATS) is a test sequence in which a test is chosen such that it satisfies some criterion with respect to all tests applied before. In this paper we use two specific criteria based on the distance concept introduced below.
Deffinition 2. Distance is a measure of how different two vectors and are. Here we use two measures of distance defined below.
Deffinition 3. Hamming distance (HD) [12] is the number of bits in which two binary vectors differ. It is not defined for vectors containing continuous values.
Deffinition 4. Cartesian distance (CD) between two vectors, and , is given by Since the two test vectors are binary, then (1) can be written as
Deffinition 5. Total Cartesian distance (TCD) for any vector is the sum of its Cartesian distances with respect to all previous vectors. We refer to the total distance when Hamming and Cartesian distances are used by THD() and TCD(), respectively.
Deffinition 6. Maximal distance antirandom test sequence (MDATS) is a test sequence such that each test is chosen to make the total distance between and each of maximum, that is,is maximum for all possible choices of .
Deffinition 7. Maximal Hamming distance antirandom test sequence (MHDATS) a MDATS that uses Hamming distance as the distance measure.
Deffinition 8. Maximal Cartesian distance antirandom test sequence (MCDATS) a MDATS that uses Hamming distance as the distance measure.
For functional testing, we have no structural information available about the actual circuit implementation. Using maximal distance criterion, every time we attempt to find a test vector as different as possible from all previously applied vectors. The antirandom testing scheme thus attempts to keep testing as efficient as possible. In this approach, we are using the hypothesis that if two input vectors have only a small distance between them, then the sets of faults encountered by the two are likely to have a number of faults in common. Conversely, if the distance between two vectors is large, then the set of faults detected by one is likely to contain only a few of the faults detected by the other. Extensive evaluation of Torino benchmarks for fault coverage in [13] has confirmed this hypothesis to be valid for all the benchmarks tested.
If testing is less than exhaustive, then maximum distance antirandom testing (MDAT) is likely to be more efficient than either random or pseudorandom testing. Even when exhaustive testing is feasible, MDAT is likely to detect the presence of faults earlier.
Procedure 1. Construction of a MHDATS (MCDATS)
Step 1. For each of
N input variables, assign an arbitrarily chosen value to obtain the
first test vector. This does not result in any loss of
generality.
Step 2. To obtain each new vector, evaluate the THD (TCD) for each of the remaining combinations with respect to the combinations already chosen and choose one that gives maximal distance. Add it to the set of selected vectors.
Step 3. Repeat Step 2 until all combinations have been used, or until the desired number of vectors have been generated.
This procedure uses exhaustive search. As we will see later, the computational complexity can be greatly reduced. Note that the procedure ensures that a vector will not be repeated.
To illustrate the process of generating MDATS, we consider in detail the generation of a complete sequence for three binary variables.
Example 9. Consider a system with three inputs . We will illustrate the generation of MHDATS using a cube with each node representing one input combination.
Let us start with the input . This does not result in any loss of generality as the procedure can easily be used for sequences starting with any vector. As we will see later, the polarity of any variable can be inverted. The next vector of the MHDTS is obviously with THD. At this point, the situation is shown in Figure 1(a), where the input combinations already chosen are marked.
(a)
(b)
(c)
As can be visually seen, a symmetrical situation exists now. Any vector chosen would have HD = 1 from one of the past chosen vectors and HD = 2 from the others. If we allow the variables to be reordered, then without any loss of generality we have the following choices:
Let us consider the first choice. After , the clear choice for is at the opposite corner of the cube. The situation now is shown in Figure 1(b).
Again a symmetrical situation exists. Any one of the remaining vectors have the same relationship with the set of vectors already chosen. Let us pick as . The next vector then has to be at the opposite corner of the cube. We can again choose any one of two remaining vectors as shown in Figure 1(c). Let us choose which leaves . The complete MHDTS obtained here is given as sequence 1 in Table 1.

In this example, it is easy to see that with our chosen vectors for and the two choices for , we could have constructed 16 distinct MHDATSs using all of the later choices available. We can verify that all of these are also MCDATSs.
A MCDATS needs to satisfy a more strict requirement than a MHDATS, for example, is a MHDATS but not a MCDATS. If we replace by with equal number of 1's and 0's, it would be a MCDATS.
A large number of experiments with construction of MHDATSs and MCDATSs have been done. Based on these, the following results can be stated [11].
Deffinition 9. If a sequence B is obtained by reordering the variables of sequence A, then B is a variableordervariant (VOV) of A.
Deffinition 10. If a sequence B is obtained by complementing some of the variables of sequence A, then B is a polarityvariant (PV) of A.
Theorem 1. If a sequence B is a variableorder variant of a MHDATS (MCDATS) A, then B is also a MHDATS (MCDATS).
Proof. Note that Hamming or Cartesian distance is independent of how the variables are ordered. Thus, a variableorder variant of a sequence will exhibit the same distance properties. Hence, if a sequence B is variableorder variant of a MHDATS (MCDATS) A, then B is also a MHDATS (MCDATS) .
Theorem 2. If a sequence B is a polarity variant of a MHDATS (MCDATS) A, then B is also MHDATS (MCDATS).
Proof. For a pair of vectors, the distance remains the same if the same set of variables in both vectors is complemented. Thus, a polarity variant of a sequence will exhibit the same distance properties. Hence, if a sequence B is polarity variant of a MHDATS (MCDATS) A, then B is also a MHDATS (MCDATS) .
Theorem 3 (See [11]). A MHDATS (MCDATS) will always contain complementary pairs of vectors, that is, will always be followed by which is complementary for all bits in where
Proof. The first two vectors and will always be
a complementary pair. Below we will show that if the vectors
, are
complementary pairs, then the vectors and will also be a
complementary pair. Thus and , hence and , and so on, will all be complementary paris.
Let us assume a MHDATS contains an even number of
vectors, , such that a vector with an odd subscript is a
complement of the preceding vector. Let us now assume that a vector
is found such
that its total Hamming (Cartesian) distance from all of is maximal.
If we change the polarity of all the variables, we get
the sequence , where indicates
complement of . By Theorem 2, this is also a MHDATS (MCDATS). Now
since , , and so on, the partial sequence contains the
same vectors as but in a
different order. Thus, has the same
total Hamming (Cartesian) distance as with respect to .
Now after having constructed the MHDATS (MCDATS) , the addition of will keep it a
MHDATS (MCDATS) because
(1) provides the
maximal total HD (CD) with respect to ;(2) also provides
the maximal HD (CD) with respect to .
The following procedures can be used to construct MHDATS (MCDATS) for a larger number of variables starting with MHDATS (MCDATS) for a smaller number of variables.
Procedure 2. Expansion of MCDATS (MCDATS)
Step 1. Start
with a complete MHDATS of N variables, .
Step 2. For each vector , , add an additional bit corresponding to an added variable , such that has the maximum total HD (CD) with respect to all the previous vectors.
Procedure 3. Expansion and Unfolding of a MHDATS (MCDATS)
Step 1. Start with a complete variable MHDATS
(MCDATS) with vectors.
Step 2. Expand by adding a variable using Procedure 2. We now have the first () vectors needed.
Step 3. Complement one of the columns and append the resulting vectors to the first set of vectors obtained in Step 2. Here, it would be convenient to complement the variable added in Step 2.
The above procedures have been implemented in a program called ATG [14]. It generates MCDATSs which are also MHDATSs. The application of antirandom testing for software has been reported in [15]. Three related approaches termed fast antirandom [16], randomlike [17] and maximum distance [18] testing have recently been proposed that attempt to incorporate some of the features of antirandom sequences.
A psuedorandom test sequence attmpts to achieve randomness. However, Pradhan and Chatterjee [19] have shown that LFSRbased sequences fail many of the tests used to measure randomness. An antirandom test sequence attempts to span the input space by applying inputs that are as different as possible [16, 20]. It does it by being deliberately nonrandom. Let us compare the first 30 test patterns for 14input sequences generated using antirandom property and conventional pseudorandom tests, as given in Table 2. Pseudo0 and Pseudo2 represent the pseudorandom sequences starting with the seeds 00000000000000 and 01010101010101, respectively. The successive vectors in the time sequence are listed sequentially. A more visual representation is given in Figure 2. A black pixel indicates value 0, while the white pixel indicate value 1. The time progresses from top to bottom for each bitmap.

3. Effectiveness of Antirandom and Pseudorandom Testing
To compare the effectiveness of antirandom sequences with pseudorandom tests generated using linear feedback shift registers (LFSRs), a series of experiments has been performed. We have measured the effectiveness of a test set using two coverage measures. The stuckat 0/1 coverage is the ratio of the number of stuckat faults detecteded to the total number of faults. Some faults may be undetectable. We have also evaluated the bridgingfault coverage in the IDDQ test environment. A bridging fault is assumed to be detected if the two nodes have opposite logic values, because in such a case a very high quiescent supply current would indicate the presence of a fault.
The basic characteristics of the ISACAS85 combinational circuit used in the study are given in Table 3. It lists the detail information such as the number of inputs and outputs, number of gates, the circuit function, and the total number of stuckat faults.

3.1. Testing Combinational Circuits for Stuckat Fault
A pseudorandom test generator will generate different sequences depending on the seed used, and thus different seeds will yield different results. To see the variation in coverage due to the choice of the seed value, three different seed values were used for the pseudorandom test generator.
We have simulated several ISCAS85 combinational benchmark circuits using Nemesis, a software tool developed at University of California, Santa Cruz [21].
Figures 3 and 4 show the stuckat fault coverage obtained by the test sequence generators for the circuits C880 and C3540. In these plots, the xaxis represents the number of the test patterns, and the yaxis fault coverage. Tables 4, 5, 6, 7 show the fault coverage for different number of test patterns for c880, c3540, c1355, and c499, respectively, with two digits after the decimal point. Note that the Pseudo0, Pseudo1, and Pseudo2 in the figures and plots represent the different initial seeds for pseudorandom generator which are all zeros (000000), all ones (111111), and alternating bits (101010).




For c880 (Figure 3), we observe that antirandom tests perform well, obtaining 90.87% coverage for 100 vectors. The fault coverage curve rises sharply and exhibits a smooth behavior. In case of pseudorandom tests, there is a significant difference depending on the initial seed, the coverage obtained with 100 vectors ranges from 44.90% to 73.76%. For all three seeds, pseudorandom tests significantly lag in performance compared with antirandom tests. We also observe that the plots for pseudorandom tests show somewhat irregular growth. The plot for c3540 (Figure 4) shows that antirandom testing is again the best, the difference between it and pseudorandom testing is most pronounced at about 70% coverage. Similar observations can be made for c1355 and c499 (Tables 6 and 7).
The results show that
(1) the antirandom sequences generally provide higher coverage than pseudorandom testing;(2) the new test pattern generation scheme can obtain a highfault coverage with significantly fewer test patterns compared to pseudorandom testing;(3) for pseudorandom testing, the effectiveness can depend on the initial seed chosen.
These results show that the proposed scheme exercises the circuits under test better because it spans the test vector space better than pseudorandom testing.
3.2. Testing Combinational Circuit for Bridging Faults
A bridging fault is a short between two nodes in a circuit. We have applied the new test pattern generation scheme to test bridging faults in the four ISCAS benchmark circuits. The bridging faults are identified by Carafe [22] by considering the layout information. Nemesis assumes that a bridging fault is being tested in the IDDQ test environment. If the two bridged nodes have opposite logic values, then the bridging fault will cause a high value of IDDQ thus detecting the fault.
Figures 5 and 6 give the fault coverages obtained for the circuits c880 and c3540 for different schemes. Tables 8, 9, 10, 11 list the faultcoverage values for specific number of test patterns for the four circuits.




Figure 5 for c880 shows that the difference between the proposed approach and the traditional pseudorandom testing is quite remarkable. Furthermore with antirandom sequences, the coverage of bridging faults rises much faster than that for stuckat faults. The gap between the curves for the new approaches and pseudorandom testing is wider for bridging faults. The same behavior is observed for other three circuits [23]. For example, we can consider the number of vectors needed to obtain a stuckat coverage of about 90% using the new approach. For c880 for the same number of vectors (about 100), pseudorandom vectors obtain coverage values of 44.90 for Pseudo0 to 73.46 for Pseudo2, that is, about 19–50% less. For bridging faults, for about the same level of coverage, this difference between antirandom and pseudorandom coverage for c880 widens to 31–63%. The similar gaps for c3540 widens from 34% to 25–52%, for c1355 from about 0–3 to 4–14%, and for c499 from 0–5% to 4–15%. This makes the proposed schemes suitable for generating tests for bridging faults in the IDDQ test environment. Using a very few vectors, very high coverage for bridging faults can be achieved.
An explanation for this improvement can be found by observing the fact that different inputs are toggled relatively independently with the proposed schemes, making it more likely that any two nodes will have opposite logic values.
4. Conclusions
Antirandom testing is a new test generation approach. Here we have demonstrated that it can achieve highfault coverage much faster than the conventional pseudorandom testing. It has also been successfully applied for software testing [15] and testing of VHDL descriptions [24]. Its effectiveness is specially remarkable for bridging faults. The scheme is well suited for IDDQ testing because it provides very good coverage with only a few vectors when blackbox testing is used. One possible way to exploit the capabilities of antirandom testing is to use it until a suitable high coverage is obtained, and then to switch to deterministic testing.
This paper considers the testing of combinational blocks. Testing of sequential circuits presents challanges that need to be considered separately. In DFT approaches, the problem of testing sequential circuits is converted to the problem of testing combinational blocks during the test mode. In such cases, antirandom testing for combinational blocks is still applicable. However, testing becomes complex if no such DFT approaches are used. Studies have shown [25] that holding a vector for a few clock periods can improve coverage. This suggests that using antirandom testing for sequential circuits will require the development of special approaches. Such approaches are currently being researched. One can also envisage circuits for which clustering of patterns, as opposed to antirandom, may be beneficial. For example, a vector that sensitizes a long path in the circuit can be slightly modified to detect many other faults. A second example is a single AND gate with a large number of inputs. Most of good tests are clustered around all1 vector. However, exploiting such scenarios usually require the use of structural information about the circuit.
The concept of complementary pairs was one of our contributions as a part of the antirandom concept. While application of a pattern and its complement [17] with pseudorandom testing can provide some benefit, antirandom is more effective due to the fact that it increases the overall Hamming distance between new vectors in addition to using the complement of each vector.
In this paper, we have considered only blackbox testing which assumes that we do not have any structural information available. It is possible to generate antirandom sequences that can exploit some structural information thus further increasing coverage [8, 26]. Further research is needed to develop techniques that will allow us to do that.
Acknowledgments
This work was supported in part by a BMDO funded project monitored by ONR. The authors thank Ruyi Fan, Aditya Kaul, and Vivek Ukidve for their assistance.
References
 Y. K. Malaiya and S. Yang, “The coverage problem for random testing,” in Proceedings of IEEE International Test Conference (ITC '84), pp. 237–245, Philadelphia, Pa, USA, October 1984. View at: Google Scholar
 K. D. Wagner, C. K. Chin, and E. J. McCluskey, “Pseudorandom Testing,” Transactions on Computers, vol. 36, no. 3, pp. 332–343, 1987. View at: Publisher Site  Google Scholar
 P. H. Bardell, W. H. McAnney, and J. Savir, in Builtin Test for VLSI Pseudorandom Techniques, John Wiley & Sons, New York, NY, USA, 1987.
 P. P. Chaudhuri, D. R. Chowdhury, S. Nandi, and S. Chattopadhyay, in Additive Cellular Automata: Theory and Applications, vol. 1, IEEE Computer Society Press, Los Alamitos, Calif, USA, 1997, Please provide the rest of the authors if possible.
 P. Dasgupta, S. Chattopadhyay, P. P. Chaudhuri, and I. Sengupta, “Cellular automatabased recursive pseudoexhaustive test pattern generator,” IEEE Transactions on Computers, vol. 50, no. 2, pp. 177–185, 2001. View at: Publisher Site  Google Scholar
 S. Chidambaram, D. Kagaris, and D. K. Pradhan, “Comparative study of CA with phase shifters and GLFSRs,” in Proceedings of IEEE International Test Conference (ITC '95), pp. 926–935, Austin, Tex, USA, November 2005. View at: Publisher Site  Google Scholar
 D. K. Pradhan, D. Kagaris, and R. Gambhir, “A hamming distance based test pattern generator with improved fault coverage,” in Proceedings of the 11th IEEE International OnLine Testing Symposium (IOLTS '05), pp. 221–226, Saint Raphael, French Riviera, France, July 2005. View at: Publisher Site  Google Scholar
 C.A. Chen and S. K. Gupta, “A methodology to design efficient BIST test pattern generators,” in Proceedings of IEEE International Test Conference (ITC '95), pp. 814–823, Washington, DC, USA, October 1995. View at: Publisher Site  Google Scholar
 J. A. Waicukauski and E. Lindbloom, “Fault detection effectiveness of weighted random patterns,” in Proceedings of IEEE International Test Conference (ITC '88), pp. 245–255, Washington, DC, USA, September 1988. View at: Publisher Site  Google Scholar
 L. Chen and S. Dey, “Softwarebased selftesting methodology for processor cores,” IEEE Transactions on Computer, vol. 20, no. 3, pp. 369–380, 2001. View at: Publisher Site  Google Scholar
 Y. K. Malaiya, “Antirandom testing: getting the most out of blackbox testing,” in Proceedings of the 6th IEEE International Symposium on Software Reliability Engineering (ISSRE '95), pp. 86–95, Toulouse, France, October 1995. View at: Publisher Site  Google Scholar
 W. R. Hamming, “Error detecting and error correction codes,” Bell System Technical Journal, vol. 29, pp. 147–160, 1950. View at: Google Scholar
 C. Gupte, Antirandom testing of fullscan sequential circuits, M.S. thesis, Electrical and Computer Engineering Department, Colorado State University, Fort Collins, Colo, USA, 2004.
 H. Yin, Test data generation and evaluation for antirandom testing with checkpointing, M.S. thesis, Computer Science Department, Colorado State University, Fort Collins, Colo, USA, 1997.
 H. Yin, Z. LebneDengel, and Y. K. Malaiya, “Automatic test generation using checkpoint encoding and antirandom testing,” in Proceedings of the 8th IEEE International Symposium on Software Reliability Engineering (ISSRE '97), pp. 84–95, Albuquerque, NM, USA, November 1997. View at: Publisher Site  Google Scholar
 T. Chen, A. Bai, A. Hajjar, A. A. K. Andrews, and C. Anderson, “Fast antirandom (FAR) test generation to improve the quality of behavioral model verification,” Journal of Electronic Testing, vol. 18, no. 6, pp. 583–594, 2002. View at: Publisher Site  Google Scholar
 S. Xu and J. Gao, “An efficient randomlike testing,” in Proceedings of the 7th Asian Test Symposium (ATS '98), pp. 504–508, Singapore, December 1998. View at: Publisher Site  Google Scholar
 S. Xu and J. Chen, “Maximum distance testing,” in Proceedings of the 11th Asian Test Symposium (ATS '02), pp. 15–20, Hyatt Regency Guam, Guam, USA, Novembe 2002. View at: Google Scholar
 D. K. Pradhan and M. Chatterjee, “GLFSRa new test pattern generation for BIST,” in Proceedings of IEEE International Test Conference (ITC '94), pp. 481–490, Washington, DC, USA, October 1994. View at: Google Scholar
 S Wu, Y. K. Malaiya, and A. P. Jayasumana, “Antirandom vs. pseudorandom testing,” in Proceedings of IEEE International Conference on Computer Design: VLSI in Computers and Processors (ICCD '98), pp. 221–223, Austin, Tex, USA, October 1998. View at: Publisher Site  Google Scholar
 C. Hall, B. Chess, T. Larrabee, and H. Manley, “The Nemesis Manual,” Computer Engineering, University of California, Santa Cruze, Calif, USA, 1995. View at: Google Scholar
 A. Jee, D. Dahle, C. Bazeghi, and F. J. Ferguson, “Carafe User's Manual,” Computer Engineering, University of California, Santa Cruze, Calif, USA, 1996. View at: Google Scholar
 S. Wu, Effectiveness of antirandom and reedsolomon code based testing, M.S. thesis, Electrical Engineering Department, Colorado State University, Fort Collins, Colo, USA, 1998.
 A. von Mayrhauser, T. Chen, A. Hajjar, A. Bai, and C. Anderson, “Fast antirandom (FAR) test generation,” in Proceedings of the 3rd IEEE International HighAssurance Systems Engineering Symposium (HASE '98), pp. 262–269, Washington, DC, USA, November 1998. View at: Publisher Site  Google Scholar
 L. Nachman, K. Saluja, S. J. Upadhyaya, and R. Reuse, “A novel approach to random pattern testing of sequential circuits,” IEEE Transactions on Computers, vol. 47, no. 1, pp. 129–134, 1998. View at: Publisher Site  Google Scholar
 N. A. Touba and E. J. McCluskey, “Altering a pseudorandom bit sequence for scanbased BIST,” in Proceedings of IEEE International Test Conference (ITC '96), pp. 167–175, Washington, DC, USA, October 1996. View at: Publisher Site  Google Scholar
Copyright
Copyright © 2008 Shen Hui Wu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.