TEST PATTERN GENERATOR

Abstract: In a main pattern memory (12, 13, 14) are stored an increment command pattern and an enable control pattern in addition to test patterns. The main pattern memory is read out with an address from an address control circuit (11). The increment command pattern thus read out of the main pattern memory instructs incrementing of an address pointer (15), and a partial pattern memory (16) is read out according to the contents of the address pointer. In accordance with the enable control pattern read out of the main pattern memory, a gate circuit (17) is controlled to open, through which the output of the partial pattern memory is passed, and bits of the passed output are each ORed, by an OR circuit (18), with the corresponding bits of the test pattern read out of the main pattern memory, providing the ORed output as a test pattern.

Description: BACKGROUND OF THE INVENTION The present invention relates to a pattern generator which is employed in testing of logic circuit devices and which generates test data for input into the logic circuit device under test (hereinafter referred to as DUT) and correct data corresponding to the output of the logic circuit device based on the input of the test data, that is, expected value data. With an increase in the integration density and in the logic depth of the logic circuit device, which usually comprises a plurality of relatively simple-structured internal logic circuits or combinational logic circuits, it will become more and more difficult to locate failures by the common traditional method of only applying test data to input terminals of the DUT and then checking data obtained from its output terminals because many steps are involved in processing of the input data, and it will also be difficult to generate the test pattern that insures a 100% failure detection. As a solution to this problem a logic design through the LSSD techniques has been proposed, for example, in U.S. Patent No. 3,783,254. According to the LSSD techniques, flip-flops provided for latching the outputs of respective internal logic circuits in the DUT are arranged to be directly connectable to one another all in series in response to a control signal and individual test patterns are serially input into the series-connected flip-flops. Then the series connection is resolved into individuals and the test data thus input are applied to the subsequent internal or combinatorial logic circuits respectively connected to the flip-flops and the operation of the internal logic circuits is advanced by one clock. The results of their operations are input again into the flip-flops and they are connected again in series, after which their states are serially read out and, at the same time, new test data are serially input into the flip-flops and the read-out data is checked to see whether the corresponding internal logic circuit operated correctly. In this manner, the entire logic circuit device is tested. Each of the successive test patterns to be used for the logic circuit device designed by such LSSD techniques is composed of N bits of the same number as the sum of the numbers of input and output terminals of the logic circuit device. In the test pattern for advancing the operation of the internal logic circuits in parallel (i.e. simultaneously) by one step, the N bit pattern consists of input data and expected value data, but during the periods in which test data is applied to the series-connected flip-flops and operation results are read out from the series connected flip-flops, only three bits in each N-bit test pattern, that is, one-bit test data for input to one end of the series connection of the flip-flops, expected value data for comparison with one-bit data that is read out from the other end of the series connection and one-bit control data for connecting the flip-flops in series, are effectively used, while the other remaining (N-3) bits are not used for test and usually held unchanged. Conventionally, such N-bit test patterns are prestored at successive addresses of an N-bit-word pattern memory and read out in a sequential order. It is, however, frequent during a test that only three bits in an N-bit word are actually used, as mentioned above, so that memory cells corresponding to (N-3) bits are not utilized efficiently. Since the number of such words in the pattern memory is very large, the efficiency of its utilization is very low. Further, since logic operation is advanced by one step after each serial application of data to all of the series-connected flip-flops, the length of the entire sequence of the test patterns becomes considerably long and it becomes necessary for subsequent test patterns to be transferred from a large-capacity pattern file to the pattern memory after each completion of reading out all the patterns from the pattern memory. With this method, however, the number of transfers is large and much time is needed for testing the whole logic circuit device. Moreover, even apart from the LSSD techniques, it may frequently happen, in testing of logic circuit devices, that the same procedure is repeated but some parts of the data used therefor differ for each step. In such a case, it has been conventional to store all the necessary test patterns in the pattern memory. Consequently, large quantities of data of the same contents are stored in the pattern memory, resulting in an uneconomic use of memory. US-A-3 873 818 discloses a technique of pattern compression for use in device testing. In this case the data-word immediately following the basic pattern, of which variants are to be produced, can be regarded as a partial pattern memory. This parallel word is serialised by transferring it to a shift register which is then shifted out to produce a series of single bits which vary the data at a specified location in the basic pattern. SUMMARY OF THE INVENTION An object of the present invention is to provide a pattern generator which permits a marked reduction of the overall storage capacity of a pattern memory which is used in the case of generating such patterns that differ in part from one another but remain identical in the rest, as described previously. This object is achieved with a pattern generator as claimed. According to the present invention, test patterns for application to some terminal pins of a logic circuit device under test (DUT) are stored in a partial pattern memory, which is addressed by an address pointer for readout. On the other hand, test patterns each corresponding to a set of all the terminal pins of the DUT, increment command patterns for the address pointer and control patterns for controlling whether to enable the output of the partial pattern memory are stored in a main pattern memory, which is read out by an address control circuit. The control pattern for enabling the output of the partial pattern memory is ANDed therewith, and the ANDed output is ORed with the corresponding one of the outputs of the main memory read out therefrom for the test patterns applied to the respective terminal pins, thereby providing a test pattern. For example, in the case of the test pattern for the logic circuit device utilizing the aforesaid LSSD techniques, input data for the aforementioned series-connected flip-flops and the corresponding expected value data are stored in the partial pattern memory. The partial pattern memory has a large depth in the direction of address, but words of a small number of bits can be used. The partial pattern memory is read out advancing its address by the address pointer. In the main pattern memory are stored at certain intervals such test pattern data each pattern of which includes the aforesaid two bits, which correspond to the series-connection input terminal and the series-connection output terminal of the DUT, respectively, and are each set to a "0". In addition to these two bits, this test pattern data includes a control bit which indicates that this data relates to test patterns including the aforesaid two bits. The remaining (N-3) bits of the test pattern data are usually the same. The number of addresses of the main pattern memory that are needed to be read out is smaller than the number of addresses of the partial pattern memory that are read out. In short, the contents of the same address are repeatedly read out of the main pattern memory and the outputs therefrom are respectively ORed with the outputs sequentially read out of different addresses of the partial pattern memory, thus generating new test patterns one after another. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a diagram showing, by way of example, the state of storage of a pattern memory in a conventional pattern generator; Fig. 2 is a block diagram illustrating an example of the pattern generator of the present invention; Fig. 3 is a diagram showing, by way of example, stored contents of a test pattern memory 12 in Fig. 2; Fig. 4 is a diagram showing, by way of example, stored contents of a partial pattern memory 16 in Fig. 2; Fig. 5 is a diagram showing, by way of example, stored contents of an increment command pattern memory 13 in Fig. 2; Fig. 6 is a diagram showing, by way of example, the state of storage of a control pattern memory 14 in Fig. 2; Fig. 7 is a diagram showing variations of outputs at respective parts during operation of the pattern generator depicted in Fig. 2; Fig. 8 is a diagram illustrating an embodiment of the present invention shown in Fig. 2 where a specific example of an address control circuit 11 is employed; Fig. 9 is a diagram illustrating a specific example of an address pointer 15 in Fig. 2; Fig. 10 is a diagram illustrating a specific example of a pin selector 19 in Fig. 2; Fig. 11 is a diagram showing, by way of example, stored contents of a conventional test pattern memory in the case of repeating the same procedure; Fig. 12 is a diagram showing, by way of example, stored contents of a main pattern memory 34 in the case of the present invention being applied to the case of Figs 11; Fig. 13 is a diagram showing, by way of example, stored contents of a partial pattern memory 16 in the case of Fig. 12'; and Fig. 14 is a diagram showing output variations at respective parts of the pattern generator of the present invention during its operation. DESCRIPTION OF THE PREFERRED EMBODIMENTS To facilitate a better understanding of the present invention, a description will be given first of a conventional pattern memory for test patterns which are used for testing a logic circuit device designed by the LSSD techniques. In this kind of test patterns which are stored in the pattern memory at addresses corresponding to respective count values of a program counter, for example, as shown in Fig. 1, when terminal pins of the logic circuit under test are 0th to 255th, one word (one pattern) is composed of N = 256 bits. Stored at an address corresponding to a count value 0 of the program counter is a pattern a₁ which includes test data for application to respective input terminals of the logic circuit under test and, if necessary, expected value data for some combinatorial logic circuits internal to the logic circuit device. At an address corresponding to a count value 1 of the program counter is stored a pattern b₁ which includes control data for connecting flip-flops (i.e. latches) in the logic circuit device in a series relation to form a scan shift register and data for input into the series connected flip-flops. At addresses corresponding to count values 2, 3, ... of the program counter are sequentially stored patterns b₂, b₃, ... of data for input into the series-connected flip-flops. At an address corresponding to a count value 6 of the program counter is stored a pattern a₂ which includes control data for disconnecting the flip-flops from one another, test data to be applied to the input terminal pins of the logic circuit device and output expected value data to be compared with the outputs from some internal logic circuits. Following this, patterns b₆, b₇, ... are sequentially stored which include data to be input into the series-connected flip-flops and expected value data to be compared with the current outputs obtained from the series-connected flip-flops relative to the preceding inputs. As described previously, when the flip-flops in the DUT are connected in series, the input terminal pin to which one end of the series connection is connected is a Pth bit and the output pin having connected thereto the other end is a (P+1)th bit. Command data for series connection of the flip-flops is a 0th bit and when this bit is a "1", the flip-flops are connected in series. Accordingly, when the 0th bit is "1" only the bits P and P+1 in each word of the test patterns b₁, b₂, ... are effective data which change in accordance with test data to be eventually generated and the 0th bit is a connection command for the flip-flops. The other 253 bits are data which are ignored and usually made identical from pattern to pattern. Since the contents of bits P and P+1 in the patterns b₁, b₂, ... change at random, however, they cannot be compressed in a convenient fashion. For example, simultaneously with the inputting of the data patterns b₆, b₇, ..., the results of logic operations performed by the internal logic circuits based on the preceding patterns b₁ to b₅ in response to the input of the pattern a₂, are output from the terminal pin P+1 one after another, and at the same time, compared with the corresponding expected value data produced at the bit P+1. As the logic depth of the DUT increases, the series connection of flip-flops also becomes longer, so the memory areas corresponding to the bits 1 to (P-1) and (P+2) to 255 in the respective patterns b i , which are to be ignored during testing, increase extremely. In this respect, it cannot be said that the pattern memory is used efficiently. In addition, the length of the series connection of the flip-flops increases also and various test data must be input. This increases the entire length of a sequence of the test patterns for a complete test so much that it is difficult in the prior art to store all necessary test patterns in a test pattern memory provided in a pattern generator. It is therefore the general practice in the prior art to once store all the test patterns in a large-capacity pattern file and to transfer therefrom the test patterns to the test pattern memory after each reading out of the entire contents of the test pattern memory. With this method, however, the transfer of the test patterns from the pattern file to the pattern memory takes much time, resulting in the testing of the DUT becoming time-consuming. Fig. 2 illustrates an embodiment of the pattern generator of the present invention. An address control circuit 11 provides a readout address in common to a test pattern memory 12, an increment command pattern memory 13 and an output enable control pattern memory 14. At the same time, the address control circuit 11 initializes an address pointer 15. The address pointer 15 addresses a partial pattern memory 16. The test pattern memory 12 has stored therein test patterns each having a word length corresponding to all terminal pins of a DUT, as shown in Fig. 3. Accordingly, if the number N of the terminal pins of the DUT is 256, then one word is composed of 0th to 255th bits as is the case of Fig. 1, the following test pattern is stored in the pattern memory 12, in addition to the test patterns a₁, a₂, ... each of which provides effective test data to all the terminal pins. That is, in the case where there exists between the test patterns a₁ and a₂ such a pattern that only some specific bits differ from the corresponding bits of the patterns a₁ and a₂, a pattern c₁ is used in which only those specific bits of the test pattern, i.e. the bits P and P+1 in the example of Fig. 1, are each given a "0", the 0th bit which provides a command for the series connection of flip-flops in this example is given a "1" and the remainder is made proper data. The pattern c₁ is inserted between the test patterns a₁, a₂, ... alternately, and such a test pattern array is stored in the pattern memory 12. The increment command pattern memory 13 has stored therein data which indicates whether to increment the address pointer 15, that is, data which indicates whether to increment the address of the partial pattern memory 16 for the next readout thereof. Each word is one-bit and logic "1" is stored in the case of incrementing the address. The output enable control pattern memory 14 has stored therein at each address one-bit data which determines whether to enable the data read out of the partial pattern memory 16. The output 14a read from the memory 14 controls a gate circuit 17 to supply it with the output from the partial pattern memory 16. When to enable the output of the memory 16, logic "1" is stored in the memory 14. The output of the gate circuit 17 and the output of the test pattern memory 12 corresponding thereto are ORed by an OR circuit 18. In this embodiment, the outputs of bits P and P+1 read out of the test pattern memory 12 and two bits read out of the partial pattern memory 16 are ORed with each other. In order to change, as required, the bit positions of the output bits of the test pattern memory 12 which are to be ORed, such an arrangement is made that in a pin selector 19, each output of the gate circuit 17 can be switched to any one of bits of the N-bit output of the pin selector 19. In the case of handling such a test pattern as shown in Fig. 1, the partial pattern memory 16 stores data in connection with only those parts of the patterns b₁, b₂, ... in which their some data alone differ from the others. In other words, the changing-data portions of the patterns b₁ to b₅ between the patterns a₁ and a₂, in Fig. 1, that is, data 1a of the bits P and P+1, data 1b of only the data changing portion of the patterns b₂ to b₁₀ between the patterns a₂ and a₃ and similar data of the succeeding patterns are stored in the one-word-two-bit partial pattern memory 16, as depicted in Fig. 4. As will be seen from Figs. 3 and 4, the address of the pattern memory 12 is not updated until the patterns b₁ to b₅ in Fig. 1 have been read out, that is, until the test pattern c₁ having the bits P and P+1 set to "0s" has been repeatedly read out five times in this example, and it is necessary only to update or increment the address of the partial pattern memory 16 sequentially in this while. Accordingly, in the increment command pattern memory 13 are stored a "1" at each of addresses 1, 3, 5, ... where the pattern c₁ read out of the test pattern memory 12 is stored and a "0" at each of the other addresses 0, 2, 4, ..., as illustrated in Fig. 5. While the pattern c₁ is read out, the output of the test pattern memory 12 and the output of the partial pattern memory 16 are ORed with each other. Consequently, the stored contents of the enable control pattern memory 14 are such as shown in Fig. 6 in which a "1" is stored at each of addresses 1, 3, 5, ... where the pattern c₁ is stored and a "0" is stored at each of the other addresses. As the step in the address control circuit 11 advances from 0 to 1, 2, 3, ... in a sequential order, the address 21 of a program counter for reading out the memories 12 to 14 advances from 0 to 1, 1, 1, 1, 1, 2, 3, 3, ..., as shown in Fig. 7. In this example, in step 0 the address control circuit 11 sets a 0 in the address pointer 15 to set it to 0, as shown. The address 21 of the program counter is initially set to a 0, as mentioned above, and a "0" is produced as each of the outputs 13a and 14a of the memories 13 and 14, and further, a "0" is produced as the output 15a of the address pointer 15 by the initialization. When the address 21 goes to a "1" in step 1, the increment command pattern memory 13 yields a "1", and when the process proceeds to the next step, the address pointer 15 is incremented. In this case, the output 14a of the enable control pattern memory 14 is a "1", and at this time, the output of the partial pattern memory 16 read out of an address specified by the address pointer 15 is provided via the gate circuit 17 to the OR circuit 18, wherein it is ORed with each of the bits P and P+1 of the test pattern c₁ read out of the test pattern memory 12, thus producing the test pattern b₁. In step 2, since the increment command previously issued from the increment command pattern memory 13 is a "1", the address pointer 15 is incremented by one and its output 15a goes to a "1". As a result, an address 1 of the partial pattern memory 16 is read out, and at this time, the output 14a of the enable control pattern memory 14 is a "1" and the output of the partial pattern memory 16 is ORed with the output of the test pattern memory 12, outputting the test pattern b₂. Until step 5 the address 21 remains at "1" and similar operations are repeated. As the process advances step by step in this while, the output 15a of the address pointer 15 is incremented one by one. In step 6 the address 21 goes to a "2", and the memories 12, 13 and 14 output the pattern a₂, an increment command pattern "0" and an output enable control pattern "0", respectively. Since the increment command in the preceding step 5 was a "1", however, the output 15a of the address pointer 15 has been incremented to a "5". Since the output enable control pattern output 14a is a "0", the output of the gate circuit 17 goes to a "0", and in the test pattern memory 12 an address 2 is specified, from which the pattern a₂ is read out and output as a test pattern. In step 7 the address 21 goes to a "3" and the pattern c₁ is read out. At this time, since the increment command pattern output 13a was a "0" in the preceding step, the output 15a of the address pointer 15 holds the previous value "5" and the partial pattern memory 16 is read out at the address being specified by the address pointer 15. At this time, the output enable control pattern output 14a is a "1" and it is provided via the gate circuit 17 to the OR circuit 18, wherein it is ORed with the pattern c₁ read out of the test pattern memory 12, and the ORed output is provided as the test pattern b₆. In the succeeding steps similar operations are carried out. The address control circuit 11 in Fig. 2 may be, for instance, such as described in U.S. Patent No. 4,313,200 (issued on January 20, 1982); that is, it is formed as a microprogram control system, as depicted in Fig. 8. The count value of a program counter 31 is output as the address 21 from the address control circuit 11, and by this address 21, an operation code part 32 and an operand part 33 are read out in addition to the contents of the memories 12, 13 and 14. In this example, the memories 12, 13 and 14, the operation code part 32 and the operand part 33 make up together a main pattern memory 34. An instruction read out of the operation code part 32 is decoded in an instruction decoder 35, performing address control in accordance with the contents of the instruction. Connected to the instruction decoder 35 are an index counter 36 and a subroutine stack 37. Instructions loaded in the operation code part 32 are a no operation instruction NOP for simply incrementing the program counter 31 by one, a loop instruction, a subroutine execute instruction JSR and a return instruction RTN. The loop instruction is to inhibit the increment of the program counter 31 the number of times of clocks equal to a value loaded in the operand part 33. That is, when this instruction is read out of the operation code part 32 and judged to be the loop instruction in the instruction decoder 35, the value of an operand simultaneously read out of the operand part 33 is loaded into the index counter 36, and for each step (clock), the content of the index counter 36 is decremented while the increment of the program counter is stopped. When the index counter 36 has been decremented to zero, the program counter 31 is incremented by one. In the example of Fig. 7 described previously, at the address from which the pattern c₁ (Fig. 3) is read out, the loop instruction is read out of the operation code part 32, and at the same time, the value indicating the number of looping operations, 5, is read out of the operand part 33. Accordingly, the program counter 31 is held at the same address 21 in the course of five steps, after which the address 21 of the program counter 31 advances by one. In this manner, the aforesaid operation is carried out. The subroutine execute instruction JSR is to advance the execution to an address which is read out of the operand part 33 at the same time as the instruction JSR and to advance the program counter 31 by one upon completion of the execution. In other words, when it is judged in the instruction decode part 35 that the readout instruction is the subroutine execute instruction JSR, the value that the contents of the program counter 31 at that time has been incremented by one is loaded into the subroutine stack 37, after which a value read out of the operand part 33 at the same time is preset in the program counter 31 and then the subroutine is executed. At the end of the subroutine, the operation code part 32 has loaded therein the return instruction RTN, and when the instruction RTN is read out, the instruction decode part 35 sets in the program counter 31 the value loaded in the subroutine stack 37. In the address pointer 15 in Fig. 2, for example, as shown in Fig. 9, the output 13a of the increment command pattern memory 13 is read into a D flip-flop 39 by a clock which is applied from a terminal 38 for each step, and the output of the flip-flop 39 is supplied to an enable terminal E of a counter 41. When a "1" is being applied to the enable terminal E of the counter 41, the counter 41 advances by one for each application of the clock from the terminal 38. When a "0" is being applied to the terminal E, even if the clock is provided from the terminal 38, the counter 41 does not advance. The count value of the counter 41 is provided as the output 15a of the address pointer 15. The counter 41 is presettable and, it can be set to an initial value via the line 22 from the address control circuit 11, as described previously in respect of Fig. 2. The pin selector 19 in Fig. 2 is formed, for example, as illustrated in Fig. 10. The gate circuit 17 is to yield two bits in this example, and it is made up of gate circuits 17₁ and 17₂, the outputs of which are connected to selectors 19₀ to 19₂₅₅ of the pin selector 19. The selectors 19₀ to 19₂₅₅ respectively have inhibit terminals 42₀ to 42₂₅₅ and select terminals 43₀ to 43₂₅₅. When an inhibit command is being applied to the inhibit terminal, each selector does not yield an output, but when no inhibit command is applied to the inhibit terminal, it selectively passes therethrough one of the outputs of the gate circuits 17₁ and 17₂ in accordance with a select command supplied to the select terminal. The outputs of the selectors 19₀ to 19₂₅₅ are each provided to the one input of each of OR circuits 18₀ to 18₂₅₅ of the OR circuit 18, and the other inputs of the OR circuits 18₀ to 18₂₅₅ are respectively supplied with bits 0 to 255 read out of the test pattern memory 12. Accordingly, by selecting the commands which are provided to the inhibit terminals 42₀ to 42₂₅₅ and the select terminals 43₀ to 43₂₅₅ of the pin selector 19, the output of the gate circuit 17₁ can be supplied to any of the OR circuits 18₀ to 18₂₅₅ and, similarly, the output of the gate circuit 17₂ can also be applied to any of the OR circuits 18₀ to 18₂₅₅. As described previously, the output 13a of the increment command pattern memory 13 is to determine whether or not to increment the address pointer 15 and the output 14a of the enable control pattern memory 14 is to determine whether or not to enable data read out of the partial pattern memory 14, so they differ in function. In the above example, however, as is evident from Figs. 5, 6 and 7, the stored contents of the increment command pattern memory 13 and the stored contents of the enable control pattern memory 14 are exactly the same. Therefore, it is also possible to interconnect the output sides of these memories 13 and 14 and to omit one of them. Moreover, in the case of testing a logic circuit device by means of LSSD techniques, the test pattern memory 12 stores test patterns each including a control data bit (e.g. 0th bit in Fig. 3) and a sequence of the command data bits exactly correspond to either of the sequence of enable control patterns and the sequence of increment command patterns. Therefore, it is also possible to omit both the increment command pattern memory 13 and the enable control pattern memory 14, and to arrange such that the 0th bit output of the test pattern memory 12 is used as the enable control patterns 14a and also as the increment command patterns 13a, that is, the 0th bit output of the memory 12 is connected to the gate circuit 17 and the address pointer 15. The increment command pattern memory 13 and the enable control pattern memory 14 are generically called an auxiliary pattern memory and the patterns stored in them are called auxiliary patterns. According to the embodiment described with reference to Figs. 2 to 6, there are simply provided, in association with the test pattern memory 12, the increment command pattern memory 13 and the enable control pattern memory 14 which are one-bit-word memories accessable with the address 21 common to the test pattern memory 12, so these memories 12, 13 and 14 can be constituted as one memory. That is to say, by using such a memory in which one word is composed of bits whose number is larger than that of the terminal pins of the DUT by two or more and by storing a sequence of the enable control patterns and a sequence of the increment command patterns in the corresponding two bit positions at successive addresses, the memories 12, 13 and 14 can be formed as one memory. As explained before, each sequence of those test patterns in which only the corresponding two bits (Pth and P+1th bits) vary from one pattern to another, is substituted with a single pattern c₁ and a sequence of these two-bit patterns are stored in the partial pattern memory 16. Since the partial pattern memory 16 may be a two-bit word memory in this example, even if its depth is great in an address direction, a small storage capacity is enough as a whole. Thus, there may be only very few memory cells (i.e. bits) in total which do not serve to generate successive test patterns and the entire area of the memory 12 can be utilized effectively to store data for generation of a long sequence of test patterns, enabling the test pattern data necessary for a complete test to be transferred from a pattern file to the memory 12 through one continuous transfer operation. This eliminates the necessity of repeating a split transfer of the pattern data after each sectional testing, ensuring to reduce the testing time by that. Moreover, even if the pattern data cannot be transferred through one continuous operation, since the number of split transfers is smaller than is required in the prior art, the testing time can be reduced. The present invention is applicable not only to the case of generating test patterns for the logic circuit devices using the LSSD techniques, as described previously, but also to the case where the same sequence of steps for generating test patterns is repeated but data of only some corresponding bits in the corresponding patterns in the respective sequences are modified as shown in Fig. 11, for instance. In Fig. 11, one process, i.e. a test is made using a sequence of test patterns a₀ to a₅, but data of the corresponding Pth to P+nth bits in the corresponding test patterns a₂, a₃ and a₄ are modified for the respective tests. That is, in the first test, data of the Pth to P+nth bits in the patterns a₂, a₃ and a₄ are d₀, d₁ and d₁, respectively, and in the next test, they change to d₂, d₃ and d₃, respectively, but data of the other bits in the corresponding patterns remain unchanged throughout the successive tests. Also in such a case, according to the prior art, the test pattern is stored in the test pattern memory for each step, as shown in Fig. 11. Accordingly, a number of similar test patterns are stored in the test pattern memory. Now a description will be given of the application of the present invention to this example. As shown in Fig. 12, at addresses 0, 1, 2, ... of the main pattern memory 34 are respectively stored the test pattern a₀ in the test pattern memory 12, a "0" in the increment command pattern memory 13, a "0" in the enable control pattern memory 14, the subroutine execute instruction JSR in the operation code part 32 and an address of the subroutine, "10" in this example, in the operand part 33. At subroutine addresses 10, 11, 12, 13 and 14 are respectively stored test patterns a₁, a₂', a₃', a₄' and a₅ in the test pattern memory 12, "0", "1", "0", "1" and "0" in the increment command pattern memory 13, "0", "1", "1", "1" and "0" in the enable control pattern memory 14 and NOP, NOP, NOP, NOP and RTN in the operation code part 32. In this case, let it be assumed that in the test patterns a₂', a₃' and a₄', the P to P+nth bits of the test patterns a₂, a₃ and a₄ are all "0s". In the partial pattern memory 16, data d₀, d₁, d₂, d₃, ... are stored at its addresses 0, 1, 2, ..., respectively, as shown in Fig. 13. With the data thus stored, the pattern generator operates for each step, as depicted in Fig. 14. In step 1 the address 21 of the program counter 31 is a "0", the output of each of the memories 13 and 14 is a "0" and the output a₀ of the test pattern memory 12 is provided as a test pattern. In response to the subroutine execute instruction JSR read out from the operation code area 32, a value "1" obtained by adding "1" to the current content of the program counter 31, is loaded into the subroutine stack 37 and then, the operand 10 read out from the operand area 33 at that time is set in the program counter 31. In step 2 the contents at the address "10" designated by the program counter 31 are read out to initiate the subroutine. Since the output read out of the memory 14 at this time is a "0", the output a₁ of the test pattern memory 12 is provided as a test pattern. Then, the NOP instruction advances the counter 31 by one address. Consequently, in step 3, the stored contents of the address "11" are read out, and since the output of the memory 14 is a "1" at this time, the output a₂' of the test pattern memory 12 is ORed with the data d₀ read out of the partial pattern memory 16 at the address 0, outputting the test pattern a₂. Then, the program counter 31 is incremented by the NOP instruction, and at the same time the address pointer 15 is incremented by the output "1" from the memory 13. In step 4 the address "12" of the main pattern memory 34 is read out. At this time, since the output of the memory 14 is a "1", the test pattern a₃' and the output d₁ of the partial pattern memory 16 are ORed with each other to provide the test pattern a₃. Then, the program counter 31 is incremented by the NOP instruction, but since the output of the memory 13 is "0", the address pointer is not incremented and its content remains "1". In step 5 the address "13" of the main pattern memory 34 is read out. In this step, since the output of the memory 14 is a "1", the output a₄' of the memory 12 is ORed with the output d₁ from the same address of the memory 16 as that read out in the previous step, providing the test pattern a₄. Then, the counter 31 is advanced to the address "14" by the NOP operation and at the same time the address pointer 15 is incremented to "2" by the output "1" of the memory 13. In step 6 the address 14 of the main pattern memory 34 is read out. Since the output of the memory 14 is "0", the output a₅ from the memory 12 is output as the test pattern a₅. Further, since the output of the operation code part 32 is the return instruction RTN, the value 1 which has been held in the subroutine stack 37 is set in the program counter 31. Consequently, in step 7 the address 1 of the main pattern memory 34 is read out and the test pattern a₀ is output in the same manner as in step 0, after which the process proceeds to the subroutine, repeating the same operations as described above. In Fig. 11, addresses of the test pattern memory 12 are assigned to all of the test patterns to be generated, but in the examples of Figs. 12 and 13, it is necessary only to assign five addresses to the subroutine and to store the data d₀, d₁, d₂, ... in the (n+1) bit-word partial pattern memory 16, and consequently, the storage capacity required is extremely reduced. In the example of Fig. 11, each of the data d₁, d₃, d₅ ... is repeated in the successive test patterns a₃ and a₄ in the respective sequences a₀ to a₅; this is because the same data has to be applied during two cycles (usually a plurality of cycles) in the test of a microcomputer, for example. As described above, according to the present invention, in the case of generating such a sequence of test patterns for a logic circuit device in which sequence only some bit data in the patterns corresponding to some terminal pins of the logic circuit device change but bit data corresponding to the other terminal pins are repetitions of the same data, the changing bit data in the patterns are stored in a partial pattern memory and bits of the corresponding patterns in a pattern memory are each set to a "0", by which the repetitive patterns of exactly the same test pattern are produced at those portions. This enables compression of the repetitive patterns, and hence permits an extremely effective use of the pattern memory and the generation of a long sequence of test patterns with a small storage capacity. Accordingly, even if the sequence of test patterns is very long, the number of its split transfers from the pattern file to the test pattern memory can be decreased smaller than has been needed in the past, reducing the entire time for testing.

Claims: A pattern generator in which a main pattern memory means (12, 13, 14) having a test pattern memory (12) for storing a sequence of test patterns each having the same number of bits respectively corresponding to terminal pins of a logic circuit device under test is read out with an address generated from an address control means (11) to output the test pattern, characterized by: an auxiliary pattern memory (13, 14) provided in the main pattern memory means, for storing a sequence of auxiliary patterns; a partial pattern memory (16) for storing a sequence of bit data corresponding to predetermined ones of the terminal pins of the logic circuit under test; an address pointer (15) means for providing a readout address for the partial pattern memory (16), the incrementation of the address being controlled by the auxiliary pattern read out of the auxiliary pattern memory (13, 14); a gate circuit (17) controlled by the auxiliary pattern read out of the auxiliary pattern memory (13, 14) to open or close, for permitting or inhibiting the passage therethrough of the output of the partial pattern memory (16); and an OR circuit (18) for ORing each output bit of the gate circuit (17) with a respective bit of the test pattern read out of the test pattern memory corresponding to one of said predetermined terminal pins to provide the ORed output as a test pattern. A pattern generator according to claim 1, wherein said address control means (11) comprises a program counter (31) for generating a readout address in response to each clock for reading said main pattern memory means (32, 33, 34) ; said main pattern memory means includes an operation code part (32) and an operand part (33) at each address; when the readout address (21) reaches an address where the operation code part contains a loop instruction (LOOP), said address control means inhibits increment of said program counter and repeats to execute the loop instruction a predetermined number of times specified in the corresponding operand part (33); and said auxiliary pattern memory (13, 14) has stored at the readout address where the loop instruction is stored, an auxiliary pattern for controlling incrementing of said address pointer (15) and enabling of said gate circuit (17). A pattern generator according to claim 1, wherein said address control means (11) comprises a program counter (31) for generating a readout address in response to each clock for reading said main pattern memory means (32,33,34); said main pattern memory means includes an operation code part (32) and an operand part (33) at each address; when the readout address reaches an address where said operation code part contains a subroutine instruction (JSR) said address control means sets in said program counter a subroutine start address designated in the corresponding operand part, instructions constituting the subroutine being specified in said main pattern memory means at a sequence of subroutine addresses; at each of said subroutine addresses there is stored in said auxiliary memory (13, 14) an auxiliary pattern for controlling incrementing of said address pointer (15) and enabling of said gate circuit (17). A pattern generator according to claim 1 wherein said auxiliary pattern memory is composed of an increment command pattern memory part (13) and an enable control pattern memory part (14), said increment command pattern memory part having stored therein a sequence of increment command patterns for instructing said address pointer (15) to increment and said enable control pattern part having stored therein a sequence of enable control patterns for controlling said gate circuit (17) to enable or disable it. A pattern generator according to any one of claims 1 or 4 wherein said address control means (11) operates under microprogram control; said address control means comprises a program counter (31) for generating the readout address for said main pattern memory means (34); said main pattern memory means includes an operation code part (32) and an operand part (33); the operation code part stores a sequence of at least one of no-operation instruction for incrementing the program counter by one, loop instruction, subroutine execute instruction and return instruction; the operand part stores the number of clock times the increment of said program counter is inhibited at the time of executing the loop instruction and a subroutine starting address at the time of executing the subroutine execute instruction; and the instructions read out of the operation code part are decoded by an instruction decoder (35) and these operations of incrementing said program counter, setting the number of inhibit clock times in an index counter (36), loading the contents of said program counter into a subroutine stack (37) and setting the subroutine starting address in said program counter are carried out in accordance with the instructions. A pattern generator according to any one of claims 1 to 4 wherein the output of said gate circuit (17) is provided via a pin selector (19) to said OR circuit (18), and wherein said pin selector is arranged so that it can be controlled to change the bit position to be ORed in the test pattern in connection with each bit of the output from said gate circuit. A pattern generator according to claim 1 wherein said test pattern memory part includes at least one control bit position in each test pattern for controlling the test state of said logic circuit device under test and the control bit position is used in common with said auxiliary pattern memory part.

Inventors: OKINO, NOBORU
Applicants: ADVANTEST CORPORATION
Application year: 1985
Main classification: G01R31
IPC codes: G06F11, G01R31