Test pattern generation device

Abstract: A test pattern generation device for producing a test pattern signals for testing a preselected digital circuit includes a dominant pattern signal generator (11) and a subservient pattern signal generator (6). When a first dominant pattern signal (0,0,0,0,0) is generated, five subservient pattern signals (1,0,0,0,0), (0,1,0,0,0), (0,0,1,0,0), (0,0,0,1,0) and (0,0,0,0,1) are generated, each being unit Hamming distance from the dominant pattern signal. The subservient pattern signals are sequentially applied to a simulator (4) carrying a hypothetical digital circuit for producing a controllability cost CC0 f and a continuous cyclic logic value CV f at a preselected line G f in the digital circuit for each subservient pattern signal. A cost generator (9) produces an evaluation cost CT f by the use of the controllability cost CC0 f and the continuous cyclic logic value CV f for each subservient pattern signal. A selector (10) selects from the set of subservient pattern signals a subservient pattern signal that produced a minimum evaluation cost CT f , test pattern memory (11) stores the selected subservient pattern signal as one test pattern and assigning the selected subservient pattern signal as a next dominant pattern signal in a next cycle operation.

Description: 1. Field of the Invention The present invention relates to a test pattern generation device for a digital circuit. 2. Description of the Prior Art ASIC semiconductors with a circuit construction which makes it possible to monitor the state of all circuit elements have become the preferred type of test pattern generation device. Testing by a semiconductor with this type of construction detects circuit shorts and breaks and other types of semiconductor defects by switching the state of circuit elements ON and OFF and measuring the result according to the test sequence. According to the prior art test pattern generation devices, the test patterns are generated by the simulation operation using the real number instead of the logic values. The logic values used in the conventional test pattern generation devices are shown in Fig. 8. The logic value is expressed sequentially increasing from logic 0 through logic X to logic 1. Using a conventional logic value shown in Fig. 8, more information can be obtained about the logic states in the circuit. For example, in the AND gate shown in Fig. 12, the outputs of Figs. 12a and 12b would both be 0 when the inputs are either (0,0) or (0,1). When the logic state is expressed as a continuous value between logic 0 and logic 1, the logic state of the output section will be a value closer to logic 1 with the case of Fig. 12b than with the case of Fig. 12a. By the use of the continuous value instead of the discrete value, information concerning the logic states of the input section can be obtained from the logic state of the output section. Thus, it is possible to know in which direction the output is easily shifted when the input is varied by just investigating the logic state of the output section, and this can be used to facilitate troubleshooting. However, according to the prior art test pattern generation device that uses the continuous logic value of Fig. 8, it is not possible to express a definite logic state between logic 0 and logic 1 in the input section and the output section because the logic X expressing an unknown value is positioned midway between logic 0 and logic 1. SUMMARY OF THE INVENTION The present invention has been developed with a view to substantially solve the above described disadvantages and its main object being to provide an improved test pattern generation device. In order to achieve the aforementioned object, a test pattern generation device for producing test pattern signals for testing a preselected digital circuit, according to the present invention, comprises means for producing a dominant pattern signal in a binary form; means for producing a set of subservient pattern signals each in a binary form and being unit Hamming distance from said dominant pattern signal; means for simulating an operation of said preselected digital circuit, in response to each subservient pattern signal; means for producing, from the result of the simulation operation, a controllability cost CC0 f at a preselected line G f in said digital circuit for each subservient pattern signal; means for producing, from the result of the simulation operation, a continuous cyclic logic value CV f at said preselected line G f for each subservient pattern signal; means for producing an evaluation cost CT f for each line by the use of said controllability cost CC0 f and said continuous cyclic logic value CV f for each subservient pattern signal; means for selecting from said set of subservient pattern signals a subservient pattern signal that produced a minimum evaluation cost CT f ; and test pattern memory means for storing said selected subservient pattern signal as one test pattern and assigning said selected subservient pattern signal as a next dominant pattern signal in a next cycle operation. BRIEF DESCRIPTION OF THE DRAWINGS These and other objects and features of the present invention will become clear from the following description taken in conjunction with the preferred embodiments thereof with reference to the accompanying drawings throughout which like parts are designated by like reference numerals, and in which: Fig. 1 is a block diagram of a test pattern generation device of the present invention; Fig. 2 is a diagram showing a continuous cyclic logic value employed in the present invention; Fig. 3 is a circuit diagram of one test circuit used for explaining the present invention; Figs 4a and 4b are flow charts showing the operation of the test pattern generation device of the present invention; Fig. 5 is a circuit diagram of one test circuit used for explaining the present invention; Fig. 6 is a diagram showing the results obtained after each operation cycle; Fig. 7 is a circuit diagram of one test circuit used for explaining the present invention; Fig. 8 is a diagram showing a continuous logic value used in the prior art devices; Fig. 9 is a diagram showing a neural network of a logic element having two inputs and one output; Fig. 10 is a graph showing the continuous cyclic logic values of an AND gate obtained by the neural network; Figs. 11a and 11b are logic elements showing relationship between inputs and output; Figs. 11c and 11d are logic elements showing controllability costs CC0 i , CC1 i , CCP i and CCN i at the output of each element; Figs. 12a, 12b, 12c and 12d taken together as shown in Fig. 12 shows a table for obtaining the continuous cyclic logic values CV i for an AND gate; Figs. 13a, 13b, 13c and 13d taken together as shown in Fig. 13 shows a table for obtaining the continuous cyclic logic values CV i for an OR gate; Figs. 14a, 14b, 14c and 14d taken together as shown in Fig. 14 shows a table for obtaining the continuous cyclic logic values CV i for an EX-OR gate; and Figs. 15a and 15b taken together as shown in Fig. 15 shows a table for obtaining the continuous cyclic logic values CV i for an inverter, which is a logic NOT. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Referring to Fig. 1, a test pattern generation device according to the present invention is shown. The test pattern generation device comprises a simulator 4 in which a sequential circuit 1 to be tested is created in terms of software. The sequential circuit 1 includes various logic elements such as, AND, OR, EXCLUSIVE OR and NOT elements, and also memory devices such as, FF (flip-flops), and has N inputs 2 and M outputs 3. The N inputs 2 sequentially receive N-bit signals from an N-bit signal generator 6. The N-bit signal generator 6 receives a dominant pattern from a dominant pattern memory 11 and generates N different subservient patterns of N-bit signals based on the received dominant pattern, and applies the subservient pattern signals to inputs 2. For example, when N=5, the dominant pattern signal may be (0,0,0,0,0), and five subservient pattern signals would be (1,0,0,0,0), (0,1,0,0,0), (0,0,1,0,0), (0,0,0,1,0) and (0,0,0,0,1). Note that the difference between the dominant pattern signal and each of the subservient pattern signals is equal to unit Hamming distance, meaning that only one bit is changed therebetween. As will be described later, after one cycle operation, that is, after N patterns of N-bit signals are produced, one subservient pattern signal is selected and is used as a dominant pattern signal in the next cycle operation. It is to be noted here that instead of N different patterns, the signal generator 6 may produce L different patters (L<N) selected randomly with the pins used more often are weighted greater. The test pattern generation device further comprises a controllability cost generator 7, a continuous cyclic logic value calculator 8, a cost generator 9, a minimum cost selector 10, and a dominant pattern memory 11, each is described in detail below. The continuous cyclic logic value calculator 8 calculates a continuous cyclic logic value CV i (subscript i represents a line in the sequential circuit 1) for each line in the sequential circuit 1 after one subservient pattern signal is inputted to inputs 2. Referring to Fig. 2, a diagram of the continuous cyclic logic value CV i is shown. Before explaining the logic value CV i , a logic operation of an AND gate is considered. As shown in Figs. 11a and 11b, an AND gate produces logic "0" when inputs thereto is either (0,0) or (0,1). If the output of the AND gate is to be changed to logic "1", two input signals should be changed from "0" to "1" for the case of Fig. 11a, but for the case of Fig. 11b, only one input signal should be changed from "0" to "1". Therefore, the logic "0" produced from the AND gate of Fig. 11b can be said closer to logic "1" than the logic "0" produced from the AND gate of Fig. 11a. To distinguish between these two logic "0s" produced from the AND gates in Figs. 11a and 11b, the logic "0" of Fig. 11a is referred to as a discrete logic "0", and the logic "0" of Fig. 11b is referred to as an intermediate logic "0", and in the present invention, the continuous cyclic logic value CV i is introduced that can indicate the intermediate levels between the discrete logic values "0", "1" and "unknown X". ("Unknown X" is used to indicate that it can be either "1" or "0", as often used as a logic value represent the output of a flip-flop.) In other words, by the use of the continuous cyclic logic value, it is possible to indicate, in the case of an AND gate, that the output of the AND gate obtained by the input (1,0) is closer to discrete logic "1" than the output obtained by the input (0,0). As shown in Fig. 2, the continuous cyclic logic value CV i takes a value between 0 and 30, in which 0 represents discrete logic "0", 10 represents discrete logic "1" and 20 represents discrete logic "unknown X". The logic values between 0 and 10, between 10 and 20 and between 20 and 30(=0), are values indicating the intermediate levels. Figs. 12a, 12b, 12c and 12d taken together shows an example of a table for obtaining the continuous cyclic logic values CV i of an output of an AND gate in which the top row indicates the continuous cyclic logic value CV i of the first input to the AND gate and the left column indicates the continuous cyclic logic values CV i of the second input to the AND gate. Similarly, Figs. 13a, 13b, 13c and 13d taken together shows an example of a table for obtaining the continuous cyclic logic values CV i for an OR gate, Figs. 14a, 14b, 14c and 14d taken together shows an example of a table for obtaining the continuous cyclic logic values CV i for an EX-OR gate, and Figs. 15a and 15b taken together shows an example of a table for obtaining the continuous cyclic logic values CV i for an invertor, which is a logic NOT. For calculating the continuous cyclic logic values CV i of a flip-flop, the following formula may be used. CV i = dff (set, reset, data, clock_b, clock_n, q_b) = |line - line1 * dff(i1)/10 + |line - line2| * dff(i2)/10 wherein six parameters (set, reset, data, clock_b, clock_n and q_b) represent signals applied to these terminals, and the suffixed symbol _n indicate the present cycle signal, and _b indicate the previous cycle signal. More, specifically, il is the first nearest discrete logic value set from six parameters (set, reset, data, clock_b, clock_n, q_b), i2 is the second nearest discrete logic value set from six parameters (set, reset, data, clock_b, clock_n, q_b). It is noted that the function dff produces, when the input parameters are all expressed by the discrete logic values, a discrete logic value. The continuous cyclic logic value is obtained by finding the discrete logic value sets i1 and i2. The discrete logic value sets i1 and i2 are given by the following formulas: i1 = {set1, reset1, data1, clock_b1, clock_n1, q_b1| min d({set, reset, data, clock_b, clock_n, q_b}, {set1, reset1, data1, clock_b1, clock_n1, q_b1}) (set1, reset1, data1, clock_b1, clock_n1, q_b1 ∈ {0, 10, 20})} i2 = {set2, reset2, data2, clock_b2, clock_n2, q_b2| min d({set, reset, data, clock_b, clock_n, q_b}, {set2, reset2, data2, clock_b2, clock_n2, q_b2}) (set2, reset2, data2, clock_b2, clock_n2, q_b2 ∈ {0, 10, 20}, (set2, reset2, data2, clock_b2, clock_n2, q_b2} ≠ i1)} wherein function d produces an Euclid distance between the two inputs. A linear compensation 11 represents the input value of the function dff, the value of i1 and the value of i2 at an input terminal, in the case where the i1 and i2 take different values, and which can be given by the following formula. l1= (line, line1, line2 | line1≠line2 ({line, line1, line2,} ={set, set1, set2}, {reset, reset1, reset2}, {data, data1, data2}, {clock_b, clock_b1, clock_b2}, {clock_n, clock_n1, clock_n2}, (q_b, q_b1, q_b2})} The continuous cyclic logic values CV i given in the tables and the above formulas are merely as an example. Other tables or calculation formulas may be used, such as disclosed in "A SEQUENTIAL CIRCUIT TEST GENERATOR USING THRESHOLD-VALUE SIMULATION" by Cheng et al in 0731-3071/88/0000/0024S01.00 1988 IEEE, in which the decimal fraction figures are used. Using the table presented in the drawings, the continuous cyclic logic values CV i of a circuit shown in Fig. 3 is now considered. Assuming that all six inputs are constituted by discrete logic "0", the number given in parentheses over each line indicate the continuous cyclic logic values CV i . For the simplicity, the continuous cyclic logic values CV i at the Q output of the flip-flops are chosen to be 20. Instead of using the table, it is possible to obtain the continuous cyclic logic values CV i by a neural network, which will be described later in connection with Figs. 9 and 10. The controllability cost generator 7 produces various kinds of controllability costs CC0 i , CC1 i , CCP i and CCN i at the output of each element (input terminal, AND, OR, EX-OR, NOT, FF) after one signal pattern is inputted to inputs 2. Generally, the controllability cost is the number of steps necessary to change the output of an element from the present condition to another condition. The controllability cost CC0 i represents the number of steps necessary to change the present output condition to "0". The controllability cost CC1 i represents the number of steps necessary to change the present output condition to "1". The controllability cost CCP i represents the number of steps necessary to change the present output condition first to "0" and then to "1". The controllability cost CCN i represents the number of steps necessary to change the present output condition first to "1" and then to "0". For example, the controllability costs of an OR gate having two inputs, as shown in Fig. 11c, are considered. It is assumed that the OR gate is receiving (0,0). In this case, the present output condition of the OR gate is (0), which is expressed by V i °=0 (superscript o indicates output). Under this condition, the controllability cost CC1 i =1 is obtained at the output of the OR gate, because the inputs must be changed in one step: (0,0) → (0,1) to obtain (1) at the output of the OR gate. When the controllability cost CC1 i =1 is obtained at the output of the OR gate, it is so stated that the output line of the OR gate is charged with CC1 i =1. Under the same condition, the controllability cost CC0 i =0 is obtained, meaning no change step is necessary in the two inputs to change the output of the OR gate to "0". In this case, it is so stated that the output line of the OR gate is charge with CC0 i =0. Similarly, under the same condition, the output line of the OR gate is charge with CCP i =1, and CCN i =2. In other words, under the above condition, the output line of the OR gate is charged with the controllability costs CC0 i =0, CC1 i =1, CCP i =1, and CCN i =2, simultaneously. The charged costs may change when the input condition is changed. As another example, the controllability costs of a logic circuit having two OR gates one AND gate, as shown in Fig. 11d are considered. It is assumed that the both OR gates are receiving (0,0). In this case, the present output condition of the AND gate is (00, which is expressed by V i °=0. Under this condition, the controllability cost CC1 i ° (superscript o indicates output) for the output of the AND gate is calculated by adding the costs CC1 i i =1 (superscript i indicates input) charged on each input line of the AND gate, thus obtaining CC1 i °=2. The formulas for obtaining the controllability costs CC0 i CC1 i , CCP i and CCN i for various elements are give below. For all elements: CC0 i ° = 0 (V i ° =0) CC1 i ° = 0 (V i ° =1) For an input terminal: CC0 i ° =1 (V i ° =1, X) CC1 i ° = 1 (V i ° =0, X) For an AND gate: For an OR gate: For an EXCLUSIVE OR gate (with two terminals) CC0 i ° =min (CC0 i 1 + CC0 i 2 , CC1 i 1 + CC1 i 2 ) (V i ° =1, X) CC1 i ° =min (CC0 i 1 + CC1 i 2 , CC1 i 1 + CC0 i 2 ) (V i ° =0, X) CCP i ° =min (CC0 i 1 + CCP i 2 , CC0 i 2 + CCP i 1 , CC1 i 1 + CCN i 2 , CC1 i 2 + CCN i 1 ) CCN i ° =min (CC1 i 1 + CCP i 2 , CC1 i 2 + CCP i 1 , CC0 i 1 + CCN i 2 , CC0 i 2 + CCN i 1 ) For a D flip-flop CC0 i ° =CC0 i set + min (CC1 i reset , CC0 i data + CCP i clock ) (V i ° =1, X) CC1 i ° =CC0 i reset + min (CC1 i set , CC1 i data + CCP i clock ) (V i ° =0, X) CCP i ° =CC1 i ° (V i ° =0) CCP i ° =CC0 i ° + CC1 i ° (V i ° =1, X) CCN i ° =CC1 i ° + CC0 i ° (V i ° =0, X) CCN i ° =CC0 i ° (V i ° =1) The cost generator 9 receives, after the application of each subservient pattern signal, the controllability cost CC0 f of a test line G f , if the test line G f is presumed to have a stuck-at 1 fault, i.e., a fault wherein the line continuously produces "1" without any change. On the other hand, the cost generator 9 receives the controllability cost CC1 f of a test line G f , if the test line G f is presumed to have a stuck-at 0 fault, i.e., a fault wherein the line continuously produces "0" without any change. In general, if "S" and "T" are defined as opposite logic values, the cost generator 9 receives the controllability cost CCT f of a test line G f , if the test line G f is presumed to have a stuck-at S fault, i.e., a fault wherein the line continuously produces "S" without any change. Furthermore, the cost generator 9 also receives the continuous cyclic logic value CV f of the test line G f . In the cost generator 9, a difference CCV f between the continuous cyclic logic value CV f and a desired continuous cyclic logic value DCV f of the test line G f is calculated. Here, the desired continuous cyclic logic value DCV f would be equal to 0 if the line G f should have logic "0", that is when the test line G f is presumed to have a stuck-at 1 fault, and be equal to 10 if the line G f should have logic "1", that is when the test line G f is presumed to have a stuck-at 0 fault. Then, in the cost generator 9, the controllability cost CCT f multiplied by a predetermined constant K1 and the difference CCV f multiplied by a predetermined constant K2 are added to obtain an evaluation cost CT f of the test line G f . Thus, in the cost generator 9, after the application of each dominant or subservient pattern signal, the following calculation is carried out. CT f = K1 x CCT f + K2 x CCV f The minimum cost selector 10 stores the evaluation cost CT f for each subservient pattern signal, and selects the minimum evaluation cost CT f in each cycle operation. The dominant pattern memory 11 receives the minimum evaluation cost CT f and compares the minimum evaluation cost CT f obtained in the present cycle operation and that obtained in one previous cycle operation. If the minimum evaluation cost CT f obtained in the present cycle operation is smaller, the pattern signal used in the present cycle operation to produce the minimum evaluation cost CT f is stored as one test pattern. If the minimum evaluation cost CT f obtained in the present cycle operation is equal to or greater than that obtained in one previous cycle operation, the dominant pattern used in one previous cycle operation is modified by changing an input representing the clock to the opposite logic, and the modified pattern is stored as one test pattern. Here, as shown in Fig. 3, an input representing the clock can be an input (a) which is directly applied to the clock terminal of a flip-flop, or an input (b) which is indirectly applied to the clock terminal of a flip-flop. If there are more than one inputs representing the clock, only one input is selected randomly. The test pattern just stored in the dominant pattern memory 11 is applied to the N-bit signal generator 6 which uses the received test pattern as a dominant pattern for the next cycle operation. The dominant pattern memory 11 continues to store the test patterns until the obtained minimum evaluation cost CT f becomes smaller than 10, which is equal to a logic value difference between two discrete logic values, such as between discrete logic "0" and discrete logic "1". When the evaluation cost CT f becomes smaller than 10, the controllability cost CCT f will become nearly equal to 0, and therefore, the difference CCV f will become nearly equal to 3.3 (note that K2=3). Thus when the evaluation cost CT f becomes smaller than 10, it is understood that the continuous cyclic logic value CV f has approached very close to the desired continuous cyclic logic value DCV f of the test line G f . For testing the actual sequential circuit which has the same design as the simulated circuit, the test patterns stored in the dominant pattern memory 11 are sequentially applied to the actual sequential circuit, while observing the test line G f . If the logic signal at the test line G f changes after the sequential application of all the test patterns, it is understood that the tested sequential circuit is operating properly. On the other hand, if the logic signal at the test line G f did not change, it is understood that there is a fault in the tested sequential circuit somewhere at a stage before the test line G f . Now, the operation of the test pattern generation device of the present invention is described with reference to Figs. 4a, 4b, 5 and 6. It is assumed that the sequential circuit to be tested is the circuit shown in Fig. 5, and the line G f to be tested is the line G 17 . It is hypothetically set that a stuck-at 1 fault is observed at line G 17 , so that the line G 17 continuously produces "1" without any change. Also, for the calculation in the cost generator 9, constants are so set that, K1=1 and K2=3. As shown in Fig. 4a, in step #1, pattern generation device according to the present invention is initialized so that dominant pattern memory 11 provides a first dominant pattern signal (0,0,0,0,0) to the N-bit signal generator 6. In step #2, the simulation of the circuit operation is carried out using the first dominant pattern signal. The detail of step #2 is shown in Fig. 4b. In step S1, logic value "1", "0" or "X" is at the output of each element. In step S2, the controllability costs CC0 i CC1 i , CCP i and CCN i at the output of each element are calculated. In step S3, the continuous cyclic logic value CV i at the output of each element is calculated. In step S4, by the use of CC0 17 , CCV 17 , the following calculation: CT 17 = 1 x CC0 17 + 3 x CCV 17 the cost generator 9 produces the evaluation cost CT 17 for the first dominant signal, which is temporarily stored in the cost generator 9. As an example, it is assumed that the evaluation cost CT 17 for the first dominant pattern signal (0,0,0,0,0) is such that CT 17 =38.9, as shown in Fig. 6. Returning back to the main routine of Fig. 4a, in step #3, it is detected whether the subservient patterns for the first dominant pattern have been produced, or not. At this moment, since no subservient patterns are produced for the first dominant pattern, the program goes to step #4. At step #4, the evaluation cost CT 17 =38.9 for the first dominant pattern signal is temporarily stored in the minimum cost selector 10 and, at the same time, the first dominant pattern signal is stored as the first test pattern in the test pattern memory in the dominant pattern memory 11. At step #5, based on the presently selected dominant pattern signal, which is (0,0,0,0,0) in the present situation, the N-bit signal generator 6 generates the five subservient patten signals (1,0,0,0,0), (0,1,0,0,0), (0,0,1,0,0), (0,0,0,1,0) and (0,0,0,0,1), each of which is unit Hamming distance from the selected dominant pattern signal. Then, the program returns to step #2. At step #2, the first, second, third, fourth and fifth subservient pattern signals are used sequentially to simulate the circuit operation to produce the evaluation costs CT 17 for these five subservient pattern signals. It is assumed that the produced evaluation costs CT 17 for the first, second, third, fourth and fifth subservient pattern signals are 35.1, 38.0, 40.1, 37,0 and 37.7, respectively, as indicated in Fig. 6. The produced evaluation costs CT 17 for the five subservient pattern signals are temporarily stored in the cost generator 9. Then, at step #6, the minimum cost selector 10 selects the minimum of the five evaluation costs temporarily stored in the cost generator 9. In the above example, CT 17 =35.1 is selected. At step #7, it is detected whether the selected evaluation cost CT 17 is less than 10, or not. If yes, the program goes to step #12, so that the subservient pattern signal that has produced the selected evaluation cost CT 17 is stored in the test pattern memory and, then, the operation ends. If no, the program advances to step #8. At step #8, the selected minimum evaluation cost CT 17 is compared with the previous evaluation cost temporarily stored in the minimum cost selector 10, which is in the present situation 38.9 for the first dominant pattern signal. If the minimum evaluation cost selected in the present cycle is less than that selected in the previous cycle, the program goes to step #9 at which one subservient pattern signal that has produced the minimum evaluation cost is selected. If the minimum evaluation cost selected in the present cycle is not less than that selected in the previous cycle, the program goes to step #10 at which a modified pattern signal is produced. The modified pattern signal is based on the present dominant pattern signal with one clock bit being changed to opposite logic signal. Then, at step #11, the pattern signal as selected in step #9 or the modified pattern signal obtained in step #10 is stored in the test pattern memory, and used the same as the next dominant pattern signal. In the above example, the first subservient pattern signal (1,0,0,0,0) has produced the minimum evaluation cost CT 17 =35.1, and therefore, the subservient pattern signal (1,0,0,0,0) is selected as the next dominant pattern signal, and is stored as the second test pattern signal in the dominant pattern memory 11. When the operation in step #11 completes, one cycle operation is completed, and the third cycle operation starts from step #5. Then, in step #6, the N-bit signal generator 6 generates, based on the present dominant pattern (1,0,0,0,0), five subservient pattern signals (0,0,0,0,0), (1,1,0,0,0), (1,0,1,0,0), (1,0,0,1,0) and (1,0,0,0,1), and in step #2, five evaluation costs CT 17 , which are 34.1, 34.8, 36.2, 33.1 and 33.5, respectively, as shown in Fig. 6, are produced. At step #6, at this stage, since the fourth subservient pattern signal (1,0,0,1,0) has produced the minimum evaluation cost CT 17 =33.1, the subservient pattern signal (1,0,0,1,0) is selected as the next dominant pattern signal, and is stored as the third test pattern signal in the dominant pattern memory 11. Then, in the fourth cycle operation, using the pattern signal (1,0,0,1,0) as a dominant pattern signal, the sequential circuit operation is simulated five times using five subservient pattern signals (0,0,0,1,0), (1,1,0,1,0), (1,0,1,1,0), (1,0,0,0,0) and (1,0,0,1,1) to produce five evaluation costs CT 17 , which are 32.1, 32.8, 34.2, 35.1 and 31.5, respectively, as shown in Fig. 6. Then, the last subservient pattern signal (1,0,0,1,1), with which the minimum evaluation cost CT 17 =31.5 is produced, is selected as the next dominant pattern signal, and is stored as the fourth test pattern signal in the dominant pattern memory 11. In a similar manner, in the fifth cycle operation, the first subservient pattern signal (0,0,0,1,1), with which the minimum evaluation cost CT 17 =30.5 is produced, is selected as the next dominant pattern signal, and is stored as the fifth test pattern signal in the dominant pattern memory 11. Then, in the sixth cycle operation, it is detected that the first subservient pattern signal (1,0,0,1,1) has the minimum evaluation cost CT 17 =1.3, and that this evaluation cost is less than 10. Thus, at step #12, the pattern signal (1,0,0,1,1) just used is stored as the final test pattern signal in the dominant pattern memory 11, and the operation ends to obtain one set of test pattern signals: (0,0,0,0,0), (1,0,0,0,0), (1,0,0,1,0), (1,0,0,1,1), (0,0,0,1,1) and (1,0,0,1,1). The obtained set of test pattern signals is used for testing an actually produced sequential circuit of Fig. 5. In the test, the output from line G 17 is observed by a suitable tester, while six test pattern signals are applied sequentially. After the application of the six test pattern signals, if the output from line G 17 showed "0", it is understood that the circuit is operating properly. However, if the output from line G 17 showed "1" after the application of six test pattern signals, it is understood that there is a fault in the circuit somewhere before the line G 17 . In the above operation, if all of the evaluation costs CT 17 of the five subservient pattern signals showed greater than the dominant pattern signal, a new dominant pattern signal is prepared by changing one bit, representing a clock bit, of the previous dominant pattern signal. Another example of operation of the test pattern generation device of the present invention will be described. In the second example, it is assumed that the sequential circuit to be tested is the circuit shown in Fig. 7, and the line to be tested is line 23. It is hypothetically set that a stuck-at 1 fault is observed at line 23. Initially, input 22 is set to logic "1", and the Q output from the D flip-flop 24 is assumed as logic "X". From this initial condition, the simulation operation is carried out to obtain a set of test pattern signals for making the output 23 to logic "0". According to the circuit of Fig. 7, it is not possible to obtain a set of test patterns that can ensure the change of the output 23 with a one step change procedure, i.e., directly from logic "X" to logic "0". Thus, to ensure the output 23 to produce logic "0", it is necessary to follow a two step change procedure, i.e., first from logic "X" to logic "1", and then to logic "0". The operations to obtain a set of test patterns are carried out by the flow chart shown in Figs. 4a and 4b, and therefore, a description therefor is omitted for the sake of brevity. If the prior art continuous logic value such as shown in Fig. 8 is employed, no test pattern signal that can change the state from logic "X" to logic "1" is available, because the prior art continuous logic value is not cyclic and therefore, from logic "0", a distance to logic "1" is greater than a distance to logic "X". On the other hand, when the continuous cyclic logic value, shown in Fig. 2, of the present invention is used, from logic "0", a distance to logic "X" is equal to a distance to logic "1". According to the present invention, the test sequence length, i.e., the number of test patterns generated in a set, can be reduced and the computing time can be shortened, because the continuous cyclic logic value indicating the degree of change due to the input pattern of the fault-set signal line G f and the cost indicating the number of procedures required to test the fault types at the fault-set signal line G f are used, and unnecessary searches in which the D flip-flop is changed are not performed. A second embodiment of the present invention is described next. According to the second embodiment, a neural network is introduced to formulate a relationship between input and output the continuous cyclic logic values of an element. The continuous cyclic logic values shown in Fig. 2 are used. The input/output relationship of each logic element, such as AND, OR, NOT, EX-OR, D flip-flop, is determined by the neural network shown in Fig. 9. The neural network is a three tier network with an input level, intermediate level, and output level as shown in Fig. 9. The continuous cyclic logic values of the input sections 31a and 31b and the output section 32 are expressed by two neurons, neuron 0 33 and neuron 1 34. The relationship between the continuous cyclic logic values and the two neurons is shown in Table 1 below. Logic Value Neuron 0 1 0 1 0 1 0 1 X 0 0 1 1 When A is defined as continuous cyclic logic value, X 0 is defined as neuron 0, and X 1 is defined as neuron 1, conversion formulas for converting from the continuous cyclic logic value to neuron, and vice versa are shown below. (continuous cyclic logic value) → (two neurons) When 0 ≤ A ≤ 10 X 0 = 1 - A/10 X 1 = A/10. When 10 ≤ A ≤ 20 X 0 = 0 X 1 = (20 - A) * 0.07. When 20 ≤ A ≤ 30 X 0 = (A - 20) * 0.07 X 1 = 0. (two neurons) → (continuous cyclic logic value) When (X 0 + X 1 ) < 0.75 A = (X 0 - X 1 ) * 10/0.7 + 20. When 0.75 ≤ (X 0 + X 1 ) ≤ 1.25 A = (-X 0 + X 1 + 1) * 10/2. When 1.25 ≤ (X 0 + X 1 ) A = (X 0 - X 1 )/(X 0 + X 1 -0.6) * 10 + 20. Only those points where the input is logic 0, logic 1, or logic X are used for training the neural network. Training is done by applying to the network the input data and the corresponding output logic value (0, 1, X) as the teacher data. A difference between the teacher data and the value obtained by the network is obtained and the difference is inversely propagated through the network to modify the network weight until the difference is decreased to a sufficiently low level. The training is terminated when the sum of the differences between the teacher data and the value obtained by the neural network is less than 0.05 multiplied by the teacher data number. A relationship between the input and output of an AND gate determined by this neural network is shown in a graph of Fig. 10. When the logic function table shown in Figs. 12a, 12b, 12c and 12d and the graph shown in Fig. 10 are compared, very similar values are obtained. Moreover, if Fig. 10 is surveyed for the input between logic 0 and logic 1, there is a simple increase from logic 0 to logic 1, as the continuous cyclic logic value of the output increases. Thus, when two cases: one is when the input is logic (0,0), and the other is when the input is logic (0,1), are compared, the later case has a greater continuous cyclic logic value. Thus it is understood that, when the neural network is used, the input information is reflected in the output information. By learning only at the logic value peaks, the overall relationship between the input and output continuous logic cyclic value can be automatically determined. Using a logic element in which the relationship between the inputs and outputs is thus determined, the same circuit simulation described above can be performed, and it became easier to control the signal line at the faulty site. Although the present invention has been fully described in connection with the preferred embodiment thereof with reference to the accompanying drawings, it is to be noted that various changes and modifications are apparent to those skilled in the art. Such changes and modifications are to be understood as included within the scope of the present invention as defined by the appended claims unless they depart therefrom.

Claims: A test pattern generation device for producing test pattern signals for testing a preselected digital circuit, comprising: means for producing a dominant pattern signal in a binary form; means for producing a set of subservient pattern signals each in a binary form and being unit Hamming distanced from said dominant pattern signal; means for simulating an operation of said preselected digital circuit, in response to each subservient pattern signal; means for producing, from the result of the simulation operation, a controllability cost CC0 f at a preselected line G f in said digital circuit for each subservient pattern signal; means for producing, from the result of said simulation operation, a continuous cyclic logic value CV f at said preselected line G f for each subservient pattern signal; means for producing an evaluation cost CT f at said preselected line G f by the use of said controllability cost CC0 f and said continuous cyclic logic value CV f for each subservient pattern signal; means for selecting from said set of subservient pattern signals a subservient pattern signal that produced a a minimum evaluation cost CT f ; and test pattern memory means (11) for storing said selected subservient pattern signal as one test pattern and assigning said selected subservient pattern signal as a next dominant pattern signal in a next cycle operation. A test pattern generation device according to Claim 1, wherein said selecting means (10) comprises a memory for storing said minimum evaluation cost CT f for comparing the minimum evaluation cost CT f obtained in the previous cycle operation and that obtained in the present cycle operation, said selecting means (10) selecting said subservient pattern signal from the present cycle operation when said minimum evaluation cost CT f obtained in the present cycle is smaller than that obtained in the previous cycle, and selecting a modified subservient pattern signal, which is a subservient pattern signal selected in the previous cycle with one bit representing a clock bit being changed, when said minimum evaluation cost CT f obtained in the present cycle is not smaller than that obtained in the previous cycle. A test pattern generation device according to Claim 1, wherein said continuous cyclic logic value CV i is a continuous value which changes from logic "0" to logic "1", logic "1" to logic "unknown X", and logic "unknown X" to logic "0". A test pattern generation device according to Claim 1, wherein said simulating means (4) produces at an output of each element, a controllability cost CC0 i which represents the number of steps necessary to change the present output condition to logic "0", a controllability cost CC1 i which represents the number of steps necessary to change the present output condition to logic "1", a controllability cost CCP i which represents the number of steps necessary to change the present output condition first to logic "0" and then to logic "1", and a controllability cost CCN i which represents the number of steps necessary to change the present output condition first to logic "1" and then to logic "0". A test pattern generation device according to Claim 1, wherein said evaluation cost producing means produces said evaluation cost CT f by the following equation: CT f = K1 x CCT f + K2 x CCV f wherein K1 and K2 are predetermined constants, CCT f is a controllability cost which represents the number of steps necessary to change the present output condition to logic "T", and CCV f is a difference between the continuous cyclic logic value CV f and a desired continuous cyclic logic value DCV f of the preselected line G f . A test pattern generation device according to Claim 1, wherein said continuous cyclic logic value CV f is obtained by a neural network.

Inventors: KAYASHIMA KAZUHIRO, NIWA HISAO, KAYASHIMA, KAZUHIRO, NIWA, HISAO
Applicants: MATSUSHITA ELECTRIC IND CO LTD, MATSUSHITA ELECTRIC INDUSTRIAL CO., LTD.
Application year: 1992
Main classification: G06F11
IPC codes: G01R31