LOGIC ANALYZER

Abstract: A logic analyzer which applies test pattern signals from a pattern generator (2) to a circuit under test (5) and sequen­ tially reads logic outputs into a memory (1B). The output which is provided from the circuit under test when it reaches a predetermined logic state is input as an external control signal into the logic analyzer. A change command is generated from the pattern generator in relation to the generation of the test pattern signal. When the change command and the external control signal are obtained at the same time, the flow of the generation of the test pattern signals is changed to a predetermined flow.

Description: BACKGROUND OF THE INVENTION The present invention relates to a logic analyzer which applies test pattern signals to a circuit under test, sequentially reads the output data therefrom into a memory and reads out therefrom the data for analysis or display. Heretofore there has been proposed in, for example, United States Patent Nos. 4,425,643 and 4,434,488, a logic analyzer which reads waveform outputs occurring at respective parts of a logic circuit and displays output waveforms from which the operator judges whether the logic circuit is correctly operating or not. With this kind of logic analyzer, since the operator passes a judgement on the operation of the circuit under test on the basis of the timing of the plurality of logic waveforms being displayed, he is required to be well versed in the operation of the circuit under test. Accordingly, much skill is needed for the test using such a logic analyzer. Recently there has come into use a logic analyzer of the type that applies a test pattern signal from a simple pattern generator to the circuit under test and obtains the response output therefrom for observation, analysis or comparison with an expected value so as to judge whether the circuit under test is non-defective or defective. The test pattern signal must be chosen properly in accordance with the function of the circuit under test. For example, a logic circuit performing a counting operation and a logic circuit performing a logic operation entirely differ in the flow of the test pattern signal. Therefore, in the case where the circuit under test includes, for example, a counting operation part and a logic operation part and repeats an operation such that, for instance, when the count value reaches a certain value, a certain logic operation circuit operates and the counter operates again based on the logic operation result, it is necessary that the test pattern signal generating condition of the pattern generator differ depending upon which of the counter and the logic operation circuit is in operation. Further, there are cases where the test pattern signal generating parameters are changed when a certain malfunction is detected during the test of a circuit having one function. To meet the abovesaid requirements, there has been proposed such a method that when the logic state of the circuit under test reaches a predetermined logic state, a signal indicating it is produced and used as an interrupt signal to thereby change the test pattern signal generating parameters. In some cases, however, the time when the circuit under test is put in the predetermined logic state varies under the influence of an external signal, or the circuit is repeatedly put in the predetermined logic state. Therefore, the above interruption system has the disadvantage that when the circuit under test satisfies the predetermined logic condition, even if the pattern generator is executing a program of generating a series of test pattern signals, the flow of generation of the test pattern signal is changed over. That is, predetermined kinds of test pattern signals are applied from the pattern generator to the circuit under test to test its all functions, but if the generation of a certain series of test pattern signals is switched to the generation of another series of test pattern signals, then the circuit under test cannot completely be tested. The document Electronic Design, Vol.29, No. 21, October 1981, pages 165-174, Waseca, MN, Denville, NJ, US S. Palmquist et al.: "Flexible pattern generation aids logic analysis" discloses a logic analyzer wherein generation of test patterns can be controlled by a program in response to the current state of a DUT. The program is capable of executing functions of pause, inhibit and interrupt. The document Electronic Design, Vol. 29, No. 3, February 5, 1981, pages 79-82, Waseca, MN, Delville, NJ, US K. Neves: "Interactive software eases 64-k memory testing" discloses a memory test system displaying test results both, as waveforms and numerical data specifying the waveforms. The document Wescon Technical Papers, Vol. 19, September 16-19, 1975, page 27/2 (1-4) J.F. Campbell, Jr. et al.: "A new real-time function test generation system for complex LSI testing" discloses an IC tester wherein test patterns are generated from functional data stored under control of a sequence processor. To a local memory is added a microcode store. The address control and timing sections of the sequence processor fetch and interprete a microcode from the current location in the local memory and at the same time functional and compara data is fetched from the functional data portion of the local memory. The fetched microcode allows a number of control functions with a conditional jump being among the basic commands allowed by the processor. The description of the conditional branch in this document is no more than that for a general conditional branch and no particular arrangement is disclosed. It is an object of the present invention to provide a logic analyzer which is designed so that only when a circuit under test satisfies a predetermined condition and the generation of a series of test pattern signals is completed at that time, the flow of generation of test pattern signals is changed, making it possible to perform all predetermined tests of a circuit. This object is achieved with a logic analyzer as claimed in claim 1. Specific embodiments of the invention are subject matter of the dependent claims. According to the present invention, in a logic analyzer of the type in which test pattern signals are applied from a pattern generator to a circuit under test and its output data is read into a memory, a change command for changing the test is generated by test change command generating means in relation to the generation of the test pattern signals from the pattern generator, the output available from the circuit under test when it satisfies a predetermined condition is applied as an external control signal from an input probe and when coincidence is detected between the external control signal and the change command, the flow of generation of the test pattern signals is switched by the change means to a predetermined flow. Even when the circuit under test has thus been put in the predetermined state, if the generation of a series of test pattern signals has not been completed yet, the change command is not issued, so that there is no possibility that the flow of the test pattern signal generation is changed in the course of generating a series of test pattern signals, leaving some tests undone. Namely, the change command is set to be issued after the completion of generation of a series of test pattern signals so that no trouble will be caused by the change of the flow of test pattern signal generation. In the case where the pattern generator reads out a program from a microcode memory and reads out pattern data from a pattern memory under control of the program, the abovesaid change command can be stored in the microcode memory. The change command may also be added to specified pattern data in the pattern memory. The predetermined state of the circuit under test may sometimes be detected by detecting that signals at a plurality of places in the circuit under test assume a specific state. In such a case, the change command is stored in the microcode memory and, at the same time, the specific state is stored as a signal indicating the state to be changed. The state indicating signal and a signal from an input probe of the circuit under test are compared and only when coincidence is detected between them, an instruction being read out at that time is executed. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram illustrating an example of the logic analyzer of the present invention; Fig. 2 is a block diagram illustrating a specific operative example of a part of a pattern generator 2 used in Fig. 1; Figs. 3A to 3H are timing charts for explaining the operation of the example depicted in Fig. 2; Fig. 4 is a block diagram illustrating a specific operative example of a microcode sequencer 2D utilized in Fig. 1; Fig. 5 is a flowchart showing an example of a part of the flow of a program stored in a microcode memory 14 used in Fig. 4; and Fig. 6 is a block diagram illustrating a partly modified form of the microcode sequencer 2D. DESCRIPTION OF THE PREFERRED EMBODIMENTS Fig. 1 illustrates, by way of example, the entire arrangement of the logic analyzer of the present invention which is provided with a pattern generator. A data acquisition device 1 and a pattern generator 2 are connected via a bus line 4 to a control unit 3 and placed under the control thereof. In the pattern generator 2 pattern data, delay data and width data are transferred from the control unit 3 to and stored in a pattern memory 2A, a delayed pulse generator group 2K and a width pulse generator group 2L, respectively. These pattern, delay and width data are entered from a keyboard or like input means 11 at the start of a test, but data set before may be stored in a storage 12 such as a floppy disc unit and fetched therefrom into the control unit 3. Incidentally, the pattern memory 2A stores microcodes into which instructions of a program for defining pattern generating conditions have been encoded. The microcode read out of the pattern memory 2A is interpreted by a microcode sequencer 2D to generate a sequence of addresses for reading out the pattern memory 2A. In a clock generator 2J is set a pattern generation period from the control unit 3, and the clock generator 2J yields at its terminals 2a, 2b and 2c a TG clock derived from a fundamental clock, a PG clock which is a pattern generating clock synchronized with the TG clock and having a period which is an integral multiple of that of the TG clock and a retiming clock. The delay pulse generator group 2K and the width pulse generator group 2L respectively have stored therein plural, for example, eight delay data and width data, and they generate delay pulses TD delayed behind reference timing and width pulses TW in accordance with the delay data and width data, respectively. The delay pulses TD and the width pulses TW are supplied to a signal generator 2G, along with pattern data read out of the pattern memory 2A. The signal generator 2G generates RZ or NRZ signals which have the logic values of the input pattern data and each of which is delayed for a time τ D relative to the reference timing and has a pulse width τ W defined by a corresponding one of pairs of the input delay pulse TD and width pulses TW. These plural, for example, eight signals are respectively controlled in polarity by corresponding polarity control signals set in a polarity setting register 2M. The polarity-controlled signals are supplied to one or more drivers in a driver group 2H in accordance with distribution control signals set in a distribution setting register 2N. The polarity control signals and the distribution control signals are set by the control unit 3 in the polarity setting register 2M and the distribution setting register 2N. Fig. 2 illustrates a specific operative example of the arrangement for generating one signal by one delay pulse generator 2K', one width pulse generator 2L' and the pattern memory 2A in the signal generator 2G. The delay pulse generator 2K' is provided with a delay memory 2B and a delay counter 2E, and the width pulse generator 2L' is provided with a width memory 2C and a width counter 2F. Delay data indicating the delay time τ D relative to the reference timing and width data indicating the pulse width τ W are respectively prestored in the delay memory 2B and the width memory 2C from the control unit 3 (Fig. 1). A program counter 15 included in the sequencer 2D counts the PG clock of the period Ta from the terminal 2b, shown in Fig. 3A, and the pattern memory 2A is read out by the count contents of the program counter 15. Fig. 3B shows an example of pattern data PA having successive values "1, 1, 0" thus read out of the pattern memory 2A. The delay counter 2E and the width counter 2F are both reset by the PG clock and count the TG clock from the terminal 2a, shown in Fig. 3C. The delay memory 2B comprises a coincidence detector (not shown) which compares the delay data stored in the memory 2B and the content of the delay counter 2E and, upon detection of a coincidence therebetween, produces the delay pulse TD delayed for the time τ D relative to the reference timing (the PG clock) as shown in Fig. 3D. Similarly, the width memory 2C comprises a coincidence detector (not shown) which compares the width data stored in the memory 2C and the content of the width counter 2F and, upon detection of a coincidence therebetween, produces the width pulse TW delayed for the time τ W relative to the delayed pulse TD as shown in Fig. 3E. In the foregoing arrangement, since both the counters 2E and 2F are reset by the PG clock pulses, the width memory 2C is prestored with a value τ D + τ W as the width data. The read-out pattern data PA and the thus generated delay pulse TD and width pulse TW are respectively applied to data terminals D of D flip-flops 2d, 2e and 2f for retiming use in the signal generator 2G. A retiming clock signal RG is provided to clock terminals ck of the flip-flops 2d, 2e and 2f from the terminal 2c. The outputs at output terminals Q and Q of the flip-flop 2d are applied to AND circuits 2g and 2h, which is supplied with the output from an output terminal Q of the flip-flop 2e as well. The output of the AND circuit 2g is provided to a set terminal S of an RS flip-flop 2i, to the reset terminal R of which is supplied via an OR circuit 2j the output of the AND circuit 2h and the output from an output terminal Q of the flip-flop 2f. Though not shown in the drawing, a delay means for timing adjustment use is provided between the Q output of the flip-flop 2f and the input of the OR circuit 2j. The outputs at output terminals Q and Q of the flip-flop 2i are applied to gates 2k and 2ℓ, respectively. The polarity control signal is applied directly to the gate 2k from one output terminal 2m of the polarity setting register 2M, and at the same time, it is provided via an inverter 2n to the gate 2ℓ. The outputs of the gates 2k and 2ℓ are supplied to a terminal 2p which is one of the outputs of the signal generator 2G. In the case where the pattern data PA is at the high level as shown in Fig. 3B, when the delay pulse TD is generated, the flip-flop 2i is set by the output of the AND circuit 2g and then it is reset by the width pulse TW. If the polarity control signal at the terminal 2m is at the "1" level, the output of the flip-flop 2i (Fig. 3F) is provided as a positive RZ signal to the terminal 2p via the gate 2k. When the polarity control signal is at the "0" level, the output of the flip-flop 2i is provided via the gate 2ℓ to the terminal 2p, obtaining a negative RZ signal as shown in Fig. 3H. In the case of generating a NRZ signal, that is, in the case where the width data stored in the width memory 2C indicates that the pulse width τ W is zero, when the read-out pattern data PA goes down to the low level, the flip-flop 2i is reset by the output from the AND circuit 2h upon occurrence of the delay pulse TD immediately thereafter. Conversely, when the pattern data PA rises to the high level, the flip-flop 2i is set by the output from the AND circuit 2g upon occurrence of the immediately subsequent delayed pulse TD. In consequence, an NRZ signal is produced. Turning back to Fig. 1, the output of the pattern generator 2, that is, the output pattern signal of the driver group 2H is applied via an output probe 6 of, for example, 644 channels, to each input terminal of a circuit under test 5. Signals from one or more predetermined circuit points of the circuit under test 5 are input via an input probe 2I into the pattern generator 2, wherein they are applied to the microcode sequencer 2D. Connected to the input side of the data acquisition unit 1 is, for example, 644-channel input probe 7, which is, in turn, connected to each output terminal of the circuit under test 5 so that the output therefrom is provided as a signal under test to a waveform shaping circuit 1A via the input probe 7. In the waveform shaping circuit 1A it is decided in synchronism with a clock in the circuit tester whether the signals under test are at the H or L logic, and they are stored in a memory 1B while being normalized in timing The memory 1B is controlled by a memory control circuit 1C to store the signals under test in succession. When coincidence is detected by a trigger word detector 1D between the input signal under test and a preset trigger word, a write end signal is applied to the memory control circuit 1C a preset delay time after the detection of coincidence, stopping the writing in the memory 1B. The control unit 3 comprises a central processor unit 3A, a read-only memory (hereinafter referred to as ROM) 3B and a random access memory (hereinafter referred to as RAM) 3C. In the ROM 3B is stored a program for operating, in a predetermined sequence, the data acquisition unit 1, the pattern generator 2 and a display 9 described later. In the RAM 3C are stored pattern data (the polarity of a pattern signal, data on the delay time relative to the reference timing, pulse width data) for pattern generation use, entered from input means 11, and the microcode. The pattern data, the microcode and the delay and the width data are respectively transferred to and stored in the pattern memory 2A, the delay memory 2B and the width memory 2C of the pattern generator 2. The pattern data, the microcode and the delay and the width data can be input into the storage 12 such as a floppy disc via a communication interface 13 from the outside. The display 9 comprises a video memory 9A, a controller 9B for readout control of the video memory 9A and a cathode ray tube or like scanning type display 9C. Data stored in the video memory 9A is repeatedly read out for display on the display 9C. Fig. 4 illustrates a specific operative example of the microcode sequencer 2D in connection with several other parts used in Fig. 1. In this example, a microcode memory 14 is shown to be separate from the pattern memory 2A. The microcode memory 14 and the pattern memory 2A are each read out by an address signal from a program counter 15. From the microcode memory 14 are read out an instruction to be executed next, a branch address and so forth. The instruction read out of the microcode memory 14 is input into a microcode decoder 16, wherein it is interpreted. To the microcode decoder 16 are provided via input terminals 16A and 16B an interrupt signal (INTERRUPT) and a pause signal (PAUSE) as external control signals. Further, a plurality of external control signals (IF signals) indicating the status of the circuit under test 5 are applied via the input probe 2I to a terminal 16C. The address read out of the microcode memory 14 is provided to one input terminal 17A of a multiplexer 17. To another input terminal 17B of the multiplexer 17 is applied from an interrupt register 18 an address signal indicating an address to be jumped to at the time of an interruption, and still another input terminal 17C of the multiplexer 17 is supplied with an address signal from a stack file 19. The multiplexer 17 responds to the output of the microcode decoder 16 to select any one of the input terminals 17A, 17B and 17C to load the corresponding address into the program counter 15. The external control signals from the input probe 2I are plural, as mentioned above, and these external control signals are encoded by an encoder 16D. The encoded output B₁B₂B₃ and a status specifying code A₁A₂A₃ at the time of an IF instruction read out of the microcode memory 14 are compared by a coincidence detector 16E. When coincidence is detected, an inhibit gate 16F is disabled to inhibit the passage therethrough of a signal indicating the IF instruction to enable the microcode decoder 16, but when the signal indicating the IF instruction is applied to the microcode decoder 16, its operation is stopped. The instructions that are read out of the microcode memory 14 are INC, JUMP, CALL and RETURN instructions. Usually, the INC instruction is mainly read out. The count value of the program counter 15 is incremented by counting one PG clock pulse from the terminal 2b upon each occurrence of the INC instruction to advance the addresses of the pattern memory 2A and the microcode memory 14 one by one, and pattern data is read out of the pattern memory 2A and applied to the signal generator 2G, generating a pattern signal. In the case of the JUMP instruction, a branch address read out of the microcode memory 14, along with the instruction, is loaded via the multiplexer 17 into the program counter 15 and then an instruction of the branched address area is performed, creating a pattern signal defined by this address area. When the CALL instruction is read out of the microcode memory 14, a branch address of the microcode memory 14 is loaded into the program counter 15, and at the same time, the next program address of the CALL instruction is pushed in the stack file 19 at an address specified in accordance with the contents of a stack pointer 21. In the case of the RETURN instruction, the address retained in the stack file 19 at the time of execution of the CALL instruction is loaded into the program counter 15 and the pattern generation starts at the loaded address. Where the INTERRUPT signal is input to the external control input terminal 16A, an instruction at the time of input is performed, after which the value of the program counter 15 is pushed in the stack file 19, and the contents of the interrupt register 18 are loaded into the program counter 15 and then an instruction of the address area starting at the loaded address is executed, producing a pattern signal determined by the instruction written in the address area. In the case where the PAUSE signal is applied to the external control input terminal 16B, the microcode sequencer 2D stops execution of the program during the application of the PAUSE signal. In the present invention, an instruction to be read out of the microcode memory 14 is added with an IF statement, as required, and when the instruction added with the IF statement is read out, if the status code A₁A₂A₃ specified by the instruction and a signal representing the status of the circuit under test 5, applied to the external control input terminal 16C, that is, the output B₁B₂B₃ of the encoder 16D, coincide with each other, then the signal indicating the IF statement cannot pass through the inhibit gate 16F and the decoder 16 operates to perform the instruction added with the IF statement. In other words, when an instruction A₁A₂A₃ IF CALL SUB 1 (A₁A₂A₃ being a status code), for example, is read out of the microcode memory 14, if the code coincides with a code B₁B₂B₃ (output from the encoder 16D) indicating the status of the circuit under test 5, applied to the external control input terminal 16C at that time, then the microcode decoder 16 operates to execute the instruction CALL SUB 1. Fig. 5 shows this in flowchart form. In the example shown in Fig. 5, the test starts with the execution of an instruction LOOP 1 to generate test pattern signals. When the pattern signals defined by the instruction LOOP 1 are applied to the circuit under test 5 after completion of the test, the instruction A₁A₂A₃ IF CALL SUB 1 is read out. In this case, if the circuit under test 5 has correctly responded to the pattern signals applied so far and is in a predetermined status, the status output from the circuit under test 5 will coincide with the status represented by the status code A₁A₂A₃. Then the microcode decoder 16 performs the instruction IF CALL SUB 1, that is, the microcode decoder 16 jumps to an address being read out at that time and executes a subroutine SUB 1 to generate a series of test patterns and, at the end of the subroutine SUB 1, performs the RETURN instruction to return to the address pushed in the stack file 19 before it proceeded to the subroutine SUB 1, carrying out an instruction LOOP 2. In this example, after completing the execution of the instruction LOOP 2, the microcode decoder 16 responds to a jump instruction to return to the beginning of the instruction LOOP 1. This operation is repeatedly performed to test the circuit under test 5. If no coincidence is detected between the status codes A₁A₂A₃ and B₁B₂B₃ when the instruction A₁A₂A₃ IF CALL SUB 1 is read out, the instruction LOOP 2 will be further executed. As described above, only when the conditions of the pattern generator 2 and the circuit under test 5 coincide with each other, another test pattern can be produced, so that if the status of the circuit under test 5 has reached a predetermined condition when one test is completed, another test can be made. Accordingly, the circuit under test 5 can be tested completely in all states. That is, according to the prior art, when the status of the circuit under test 5 satisfies a predetermined condition, the subroutine SUB 1 in the above example is performed, but it may sometimes be impossible, under the influence of an external signal, to predict when the circuit under test 5 reaches the condition (status), and in such an instance, the subroutine SUB 1 is carried out before the completion of the test desired to make. To avoid this, according to the prior art, a plurality of different tests are not performed in series but after the completion of a series of tests, another series of tests are initiated. According to the present invention, however, a plurality of different tests can be effected in series, and hence the time for testing can be reduced. While in the above the instruction IF CALL SUB 1 is inserted between the instructions LOOP 1 and LOOP 2, it is also possible to detect the abovesaid coincidence upon each execution of one instruction which is read out of the microcode memory 14. In such a case, even if the operation of the circuit under test 5 is not fully pre-known, the test pattern signal can be switched to another one when the status of the circuit under test reaches a predetermined condition. Further, although in the above the instruction IF CALL SUB 1 is executed as a modification of the pattern generation program, it is also possible to change the flow of the test program by executing another instruction, for example, IF JUMP 200. It is sometimes detected from the state of one signal from the circuit under test 5 that its status has reached the predetermined condition, and in such a case, only one signal is provided from the input probe 2I and is applied directly to the inhibit gate 16F, as partly shown in Fig. 6, and the status code A₁A₂A₃ in the microcode memory 14 is omitted. Also it is possible to adopt such an arrangement as shown in Fig. 6 in which a bit representing the IF statement is stored in a specified bit area b i of the pattern memory 2A and when a "1" is read out of the specified bit area b i , that is, when test data is output, coincidence between the output "1" from the bit area b i and the external control signal at the terminal 16c is detected by an AND circuit 22 and the detected output is applied to the decoder 16 and then a predetermined address is set in the program counter 15, that is, the decoder 16 jumps to that address.

Claims: A logic analyzer comprising: first memory means (1B) for sequentially storing the outputs of a circuit under test; input probe means (2I) for sequentially receiving external control data from said circuit under test, said external control data representing successive states of said circuit under test; second memory means (2A, 14) for storing pattern data and a program in a plurality of address locations for generation of successive test patterns to be applied to said circuit under test, each of said address locations including a pattern data area and an instruction area all of which are simultaneously accessed by an address designating the address location; a program counter (15) for sequentially generating addresses to be supplied to said second memory means for access to the respective address locations in synchronism with pattern generation clock signals; decoder means (16) for decoding an instruction read out from said instruction area of said second memory means and controlling said program counter in accordance with the decoded result; a pattern generator (2G) for sequentially generating test patterns on the basis of said pattern data read out from said pattern data area of said second memory means and for supplying said test patterns to said circuit under test; characterized by each of the address locations of said second memory means further including an IF statement area and a status code area; coincidence detecting means (16E) for detecting coincidence between a status code read out from said status code area of said second memory means and a control signal corresponding to said external control data received from said input probe means; and inhibit means (16F) for receiving the outputs of said IF statement area of said second memory means and said coincidence detecting means and, when an IF statement is present in the absence of a coincidence, for disabling said decoder means so that said program counter advances to the next address disregarding the instruction read out from said instruction area along with said IF statement and, when both the IF statement and coincidence are present, for enabling said decoder means to execute said instruction. A logic analyzer according to claim 1, wherein said second memory means comprises a pattern memory (2A) for storing said pattern data and a microcode memory (14) for storing said program, and said pattern memory and said microcode memory are simultaneously accessed by each of the addresses generated by said program counter. A logic analyzer according to claim 1 or 2, which further comprises an encoder (16D) for encoding said external control data to produce said control signals. A logic analyzer according to any of the preceding claims, wherein each of the address locations of said second memory means includes an address area for storing an address, and said analyzer further comprises address register means (18, 19) for storing predetermined addresses and an address multiplexer (17) for selectively supplying addresses from said address register means and said adddress area of said second memory means to be set in said program counter in accordance with the decoded result of said decoder means.

Inventors: AKIYAMA, NOBORU, AOKI, TETSUO, KOBAYASHI, KATSUMI, NAKAJIMA, TAKAYUKI
Applicants: ADVANTEST CORPORATION
Application year: 1985
Main classification: G06F11
IPC codes: G01R31, G06F11