Flip-flop circuit

Abstract: A flip-flop circuit comprising serially connected flip-flops (26) is associated with a combination circuit and configures a scanning circuit for performing a scanning operation in order to test the combination circuit in a test mode. When performing the scanning operation, the flip-flop circuit is preset or cleared and the preset or cleared data is scanned out through the scanning circuit so that the failure of an asynchronous system input circuit connected to a preset or clear terminal of the flip-flop circuit is detected.

Description: Background of the Invention This invention pertains to flip-flops pursuant to the scanning design method used in designing an LSI logic unit. Since the circuit size loadable on a single chip as an LSI keeps on increasing, it takes a long time starting from logic designing to completing test designing during the designing period and a so-called "simplified designing" method is sought. Although scan designing represents one of such "simplified designing" methods, there has been no means for detecting a failure arising in the then attached "scanning circuit". Thus , a development of a means capable of detecting failures simply and certainly has been desirable. Description of the Related Art When an LSI represented by gate arrays comprising up to one hundred thousand (100,000) gates is designed in a short period of time, it becomes necessary to shorten the test designing period. Since it takes a lot of steps to manually design test patterns having superior failure detection rates, designing methods for test simplification are proposed. A logical operation circuit comprises a sequential circuit and a combinatorial circuit. A method of checking failures in a combination circuit is already established. For example, D algorithm or PODEM enables such automatic checks. On the other hand, a circuit containing a sequential circuit, such as a flip-flop, has an undetermined output, even if its input is determined. This is because, to determine its output, it is necessary to prestore such values as initial values in the sequential circuit. One of the methods for checking a circuit including such a sequence circuit is the scan designing method. According to the scan designing method, flip-flops contained in a logical operation circuit are connected serially, and a scan signal is provided from outside to an input of the flip-flop in the first stage. Since the scan signals sequentially shift the flip-flops and reach the flip-flop in the last stage, a logical operation circuit can check a combination circuit with the shifted value, if the scan signal can be detected to reach the final stage. Here, "a combination circuit" designates a circuit having definite outputs, which do not change unless its input signals change, unique to the combinations of its input signals. Figure 1 illustrates the scan designing method and shows the configuration of a logical operation circuit comprising both a sequential circuit and a combinatorial circuit. The sequence circuit comprises flip-flops 6, 7 and 8 (FF1, FF2 and FF3). A scanning circuit 2 comprises a scan-in terminal 3 and a scan-out terminal 4. The scanning circuit 2 is so connected that the combination circuit 5 is logically separated from flip-flops 6, 7, and 8, while the combination circuit 5 is inspected. That is, flip-flops 6, 7, and 8 do not receive outputs from the combination circuit 5 during its inspection. As a result, since flip-flops 6, 7 and 8 (FF1, FF2 and FF3) act similarly to shift registers, it becomes possible to treat the output point of flip-flop 6 (FF1) and the input point of flip-flop 8 (FF3) respectively as the signal input pin of the combination circuit 5 and the signal output pin of the combination circuit 5. Consequently, instead of having to test LSI entirely, it is only necessary to repeat testing every "combination circuit" and judge the existence of a failure. Figure 2 shows, in further detail, above described flip-flops 6, 7 and 8, i.e. FF1, FF2 and FF3. In Figure 2, 9 is a flip-flop (FF), 10 is a flip-flop in the preceding stage, 11 is a scan-in signal terminal, 12 is a terminal for receiving a scanning action control signal, 13 and 23 are NAND gates, 14 is a data terminal (D), 15 is a terminal for receiving a clock signal (CLK), 16 is a terminal for a clear signal CR, a terminal 17 of flip-flop 9 is for receiving the clear signal CR, a terminal 18 of flip-flop 9 is for receiving a preset signal PR, a terminal 19 of flip-flop 9 transmits the output signal Q. 20 and 21 are serially connected flip-flops (FF) where the serial connection is logically enabled during a scanning operation. 24 is an AND circuit. 25 is an OR 'circuit. During an ordinary operation, a scanning operation control signal terminal receives "1", and NAND circuit 13 is enabled, which causes the inversion of the output from flip-flop 10 to be supplied to terminal 18 for receiving the preset signal PR. Thus, when flip-flop 10 outputs "1" supplied from the preceding stage, "0" is supplied to terminal 18 for receiving the preset signal PR of flip-flop 9 through the NAND circuit 13, which presets flip-flop 9. Figure 3 is a table of truth value of flip-flops of the type indicated by reference numerals 6, 7, 8 or 9. When the scanning action control signal is high, the NAND circuit 22 is enabled, so that a combination circuit comprising NAND circuit 23, AND circuit 24, NOR circuit 25, etc. may output "0" to the terminal 17 for receiving the clear signal CR, when flip-flop 9 is to be cleared. Meanwhile, during a scanning action, the scanning action control signal terminal 12 receives "0", NAND circuits 13 and 22 are disabled to output "1". Thus, flip-flop 9 will be neither preset nor cleared any more. During the scanning action control, flip-flops 10, 20, 21 and 9 shown in Figure 2 configure logically and serially connected shift registers (F1 through F5 in Figure 4). The scanning circuit 2 shown in Figure 1 and described earlier has such a configuration. To be more specific, flip-flops 6, 7 and 8 configure the shift register in Figure 1. By storing the target values (SCDATA) in the shift register thus configured by sequentially shifting them, the initial values to be tested are stored in the flip-flops. By starting the operation, the actions of the combination circuit can be confirmed. At this time, the scanning circuit does not operate and is connected to the combination circuit shown in Figure 4. That is, the intended actions of an LSI for one clock cycle are performed. When the clock signal CLK received at terminal 15 rises (indicated as "↑" in Figure 3) while retaining the preset signal PR received at terminal 18 "1", if terminal 14 receives data D, the same data D is outputted at output Q. When the preset signal PR is "0", whatever the state of terminal 15 is, output Q is "1". A failure in an action for a clock signal for scanning is easily detected, since the clock signal is a synchronous signal. Meanwhile, if a failure arises in the circuit of a system asynchronous to the scanning circuit which is connected to an input terminal, such as a circuit supplying the clear signal CR or the preset signal PR, in a scan designing method for judging the actions of a sequence circuit, since scanning actions are being performed, it is difficult to judge whether it is because the clear signal CR or the preset signal PR is unchanging or it is due to a failure. According to a prior art logic circuit disclosed in DE-A-3 743 586, a logic circuit with a scan path is formed from cascaded flip-flops that deliver a scan output and is provided with combination logic portions connected to the flip-flops. The clock signal for the flip-flops is also supplied to a counter that divides the signal by the number of flip-flop stages and delivers the count output on the scan output. Another circuit disclosed in EP-A-0 292 116 in the context of a VLSI combinatorial logic circuit featuring a self-diagnosis function provides specialized flip-flops that additionally include a test input by means of which a serial chain of flip-flops can be configured. The thus-formed flip-flop chain provides a scanning signal in a test mode, during which the combinatorial logic portions of the circuit are by-passed. There is also known from DE-A-3 722 615 a scan test method for a logic circuit that can be implemented on a chip by means of register circuits so as to form a shift register path between the scan-in and scan-out terminals of the device. The circuitry has separate scan mode and test mode phases. The former loads the shift registers with the test data in synchronism with the device clock, while the latter controls the transfer of that test data to the data input signals under test. Summary An object of the present invention is to provide a flip-flop circuit capable of efficient scan designing by detecting failures in the circuits connected to an input circuit of flip-flops. To this end, the invention provides a flip-flop circuit comprising a serially-connected plurality of flip-flops each having synchronous and asynchronous flip-flop terminals, to be connected to a combination circuit and configuring a scanning circuit for testing said combination circuit, characterized by gate means provided between each of said flip-flops and a respective asynchronous system input circuit that is connected to one of said asynchronous terminals of each said flip-flop, for controlling a signal from said asynchronous system input circuit which determines an output of said flip-flop circuit; and means for detecting failures of said asynchronous system input circuit using said gate means during a scanning test through said scanning circuit. The invention also relates to a semiconductor circuit comprising a combination circuit and a flip-flop circuit having the aforementioned characteristics, and which is defined in claim 5. The flip-flop circuit configuring a scanning circuit receives a scan-in data at its scan-in terminal and the output of the flip-flop circuit is provided to a combination circuit which operates at a synchronous manner. Then, the output of the combination circuit is again applied to the flip-flop circuit. Then, the output of the flip-flop circuit is scanned out so that a failure of the combination circuit can be detected. An asynchronous system input circuit comprising a combination circuit which operates in an asynchronous manner is connected, for example, a preset or clear terminal of the flip-flop circuit, so that a failure of the asynchronous system input circuit is detected through an scanning-out operation of the flip-flop circuit. Brief Description of the Drawings Figure 1 illustrates a conventional scan designing method; Figure 2 illustrates in detail the flip-flip circuit shown in Figure 1; Figure 3 is a table of truth values for the flip-flop circuit shown in Figure 1; Figure 4 shows a connection between flip-flops and a combination circuit when it is scanned; Figure 5 illustrates the configuration of a first embodiment of this invention; Figure 6 shows, in further detail, the configuration shown in Figure 5; Figure 7 shows the operating waveforms shown in Figure 6; Figure 8 shows the configuration of a second embodiment of this invention; and Figure 9 shows the logical outputs from the combination circuit used in the second embodiment shown in Figure 8. Preferred Embodiments of this Invention The serially connected flip-flop circuit is associated with a combination circuit and configuring a scanning circuit for scanning the combination circuit. The flip-flop circuit detects failures in an asynchronous system input circuit connected to the flip-flop circuit, when the combination circuit comprise a synchronous system input circuit providing the input to the data terminal of the flip-flop circuit and an asynchronous system input circuit providing the input to the preset or clear terminal of the flip-flop circuit. The flip-flops configuring a scanning circuit can be controlled to receive or not to receive data supplied by asynchronous system input signals in synchronization with clock signals. That is, the configuration enables a slave latch unit to be preset or cleared independently of presetting or clearing its master latch unit, where both the slave latch unit and the master latch unit are in the same flip-flop circuit. When a flip-flop of the slave latch unit receives a preset signal or a clear signal, i.e. an asynchronous system input signal supplied to a flip-flop of the master latch unit, since an expected output signal must be obtained at the output of the flip-flops, if an output signal other than the expected output signal is obtained, a failure in the asynchronous system input circuit is detected. Figure 5 illustrates a case in which a common delayed type flip-flop is used. In Figure 5, 26 is a flip-flop in the scanning circuit; 31 is a master latch unit of flip-flop 26; 32 is a slave latch unit of flip-flop 26; 33-1 and 33-2 are terminals for receiving the preset signal PR respectively for the master latch unit 31 and the slave latch unit 32 in flip-flop 26 (PR1 and PR2); 34-1 and 34-2 are terminals for receiving the clear signal CL respectively for the master latch unit 31 and the slave latch unit 32 in flip-flop 26 (CL1 and CL2); 35-1 and 35-2 are terminals for receiving test control signals (SM and TM); 36-1 through 36-4 are OR operation circuits, 48 is a data input terminal; 49 is a scan-in input terminal (SI); 50 is a clock signal input terminal (CLK); 51 and 52 are input terminals of shift clock signals A and B; 46 is a terminal Q for data output; and 47 is a terminal Q for data output. Flip-flop 26 operate ordinarily as a delayed type flip-flop by supplying clock signals to a terminal 39 for clock signal CLK. That is, when clock signal CLK is "1", the master latch unit 31 inputs data D supplied from the data input terminal 37 and fixes the value when clock signal CLK changes from "0" to "1". When scanning actions are tested, by supplying e.g. "1" to the terminals 35-1 and 35-2 for receiving test control signals, irrespective of signals supplied to terminal 33 for receiving the preset signal PR or terminals 34 for receiving the clear signal CL, operation of a shift register is maintained by OR circuits 36-1 through 36-4, the master latch unit 31, and the slave latch unit 32, which receive "1" at their preset PR and clear CL inputs. At this time, nothing is cleared or preset in the slave latch unit 32. Next, when terminal 35-2 for receiving test control signal is supplied with "0", the master latch unit 31 can be preset or cleared, and it is only the master latch unit 31 that can be preset or cleared. Thereafter, "1" is supplied again to enable shifting to the succeeding stage of flip-flop 26. When earlier set data are shifted, it is judged that nothing fails in shifting and receiving by all the flip-flops, i.e. that the asynchronous system signal circuit is in a good working order. The asynchronous system signal comprises a combination circuit which produce an asynchronous system signal to the flip-flops. Figure 6 illustrates in further detail the configuration shown in Figure 5. The slave latch unit 32 and the master latch unit 31 of delayed type flip-flop 26 in Figure 6. Both consist of transmission gates and logical operation circuits. In Figure 6, transmission gates 37-1 and 37-2 in the master latch unit 31 respond to the clock signal CK. Transmission gates 38-1 and 38-2 in the master latch unit 31 respond to shift clock signal A. Transmission gates 39-1 and 39-2 in the slave latch unit 32 respond to responding to shift clock signal CK. Transmission gates 40-1 and 40-2 in the master latch unit 31 respond to clock signals for shift registers B. 41-1 and 41-2 are logical operation circuits in the master latch unit 31. 42-1 and 42-2 are logical operation circuits in the slave latch unit 32. 35-1 through 35-4 are terminals for receiving test control signals. Note here that transmission gates 37-1, 38-1, 39-1 and 40-1 are off, when transmission gates 37-2, 38-2, 39-2 and 40-2 are on, and that transmission gates 37-1, 38-1, 39-1 and 40-1 are off, when transmission gates 37-2, 38-2, 39-2 and 40-2 are on. The transmission gates 37-1 through 40-2 and the logical operation circuits 41-1 through 42-2 together configure the latch units 31 and 32 encircled by dashed lines. The clock signals supplied from terminal CK ordinarily cause delayed type flip-flop operations. Hence, terminals 35-1 and 35-2 for receiving test control input signals SM, terminals 35-3 and 35-4 for receiving test control input signals TM, and terminals 44-1 and 45-1 for receiving shift clock signals A and B are all set to "0". While clock signal CK is in "0", the master latch unit 31 receives data input D, which is transmitted to the slave latch unit 32 when clock signal CK rises, and data Q and XQ are outputted from terminals 46 and 47. To go into detail, the transfer gates 37-1 through 40-2 are on when supplied with voltages of reverse polarities to the arrow direction. When clock signal CK is "0", clock signal CLK is "0", clock signal XCLK is "1" and transfer gate 37-1 is on, the last of which causes a NAND gate to receive the binary value of input D. If a NAND gate 41-1 is on (i.e. if the master latch 31 is not cleared), a complementary binary value is output from NAND gate 41-1. When the master latch 31 is not preset, NAND gate 41-2 reverses the binary value again, which causes the binary value to revert to the same as the original one. Since shift clock signal A is ordinarily "0", transfer gate 38-2 is turned on. Therefore, transfer gate 37-2 receives the same binary value as the input. This change causes the already inputted binary value to be received, which is independent of later inputted binary values. The binary value outputted from NAND gate 41-1 (the received binary value) is the reversed or the complementary binary value of D and is supplied to the slave latch unit 32. At this time, clock signal CK is "1", and both shift clock signal A and shift clock signal B are "0". Therefore, transfer gates 40-1 and 39-1 are on, and transfer gates 40-2 and 39-2 are off. When a preset is not enabled, since NAND gate 42-1 is on, its output is the same as the binary value received by the master latch unit 31( which is the complement of the memorized binary value). Output XQ is the complement of the received binary value. Output Q is the same as the received binary value. At this state, even if clock signal CK changes to "0", the slave latch unit 32 receives the binary value received from the master latch unit 31, in a similar way to the master latch unit 31. As described above, by having clock signal CK repeat "0" and "1", the master latch unit 31 and the slave latch unit 32 sequentially shift the received binary values. Next, during operations as a shift register operation, as shown in Figure 7, shift clock signals A and B are supplied to terminals 44-1 and 44-2 for receiving shift clocks A and B having a phase difference of about one-hundred eighty (180) degrees and a timing difference at least equivalent to one pulse. Meanwhile, as described later as a serial-in serial-out mode, clock signal CK remains at "1", and since test control signals SM and TM are "1", transfer gates 37-2 and 39-1 are on and transfer gates 37-1 and 39-2 are off, and NAND gates 41-1, 41-2, 42-1 and 42-2 are on. Hence, upon receipt of shift clock signal A being "1", the master latch unit 32 receives scan-in signal SI, and the binary value at that time is latched (i.e. received) on receiving "0". Then, the slave latch unit 32 is inputted with this binary value when shift clock signal B is "0", and receives it when shift clock signal B is "1". When a scanning test is performed, there are two operating modes, namely, the serial-in, serial-out mode and the parallel-in, parallel-out mode. In Figure 7, the serial-in, serial-out mode is used between times T1 and T2. At this time, by supplying "1" to the terminals 35-1 through 35-4 for receiving test control signals SM and TM, data is transmitted from terminal 49 (the terminal for receiving scan-in signal SI) shown in Figure 6 to the master latch unit 31. In this case, irrespective of the signals are received at the terminals for receiving a clear/preset signal input, operation as a shift register is performed properly. The parallel-in, parallel-out mode is used between times T2 and T3. This mode is created, by supplying "0" to terminals 35-1 and 35-2 for receiving test control signal SM and "1" to terminals 35-3 and 35-4 for receiving test control signal TM. When a pulse is only once supplied to terminal 43-0 for receiving clock signal CK only the master latch unit 31 latches a clear/preset signal input. After time T3, the operating mode reverts to the serial-in, serial-out mode. Data received by respective flip-flops is transmitted on receiving clock signals A and B, to terminal 46 for transmitting data outputs XQ and the data is then available for testing the combinatorial circuits. The above description can be summarized as follows. The period between times T1 and T2 is put in the serial-in, serial-out mode, and the values to be tested are stored serially. The period between times T2 and T3 is put in the parallel-in, parallel-out mode, and by performing an asynchronous system circuit action, such as presetting or clearing, the result is stored in the slave latch unit 32. The period after time T3 is put back in the serial-in and serial-out mode and the above result is read again to be confirmed. By repeating these control procedures, failures in clear/preset signal circuits can be detected. That is, when terminal 34-1 for receiving the clear signal CL of flip-flop 26 is at "0", the master latch unit 31 of flip-flop 26 is set to "0" during the parallel-in, parallel-out mode. However, during the serial-in, serial-out mode, since terminals 35-1 and 35-2 for receiving test control signal SM receives "0", the state of flip-flop 26 does not change. Since the slave latch unit 32 is read in synchronization with clock signal CK in the serial-in, serial-out mode, if a clear/preset signal input supplied in synchronization with clock signal CK is read correctly, the clear/preset signal circuits are detected to be working correctly. Figure 8 shows the connection of serially connected three stage flip-flops. In Figure 8, 26, 27 and 28 are all delayed type flip-flops, 29 is a combination circuit e.g. similar to the combination circuit 5 shown in Figure 6. When respective flip-flops are used as shift registers, the signal inputted from the terminal for serial-in SI reaches terminal SI of flip-flop 27 in the succeeding stage from the terminal of output Q of flip-flop 26, and the signal inputted from terminal for serial-in SI reaches the terminal for serial-in SI of flip-flop 28 in the next succeeding stage from the terminal for output Q of flip-flop 27. Terminal SO receives a scan-out signal from the terminal for output Q of flip-flop 28. Terminal SO is an output signal terminal for scanning when LSI is checked, i.e. during a scanning action. A combination circuit 29 is supplied with predetermined signals to input terminals In of the combination circuit 29, so that the signal from the terminal for output Q of each flip-flop is transmitted to the terminal for serial-in SI in the succeeding stage. Next, if signals are supplied from the terminals for test control signals SM and TM, and clock signal CK and shift clock signals A and B are used, as described earlier, it becomes possible to detect failures in clear/preset signal circuits. Figure 9 illustrates how the master latch unit 31 and slave latch unit 32 shown in Figure 8 change their outputs in correspondence with the changes in their inputs. Flip-flop 26 is explained first. Input D1 is "1" at phase P1, at this time, the master latch unit 31 has not received an input, and is in a preexisting state. (The state is expressed as X, because it is not definite.) At phase P2, i.e. when clock signal is "0", the master latch unit 31 receives data and its output (M1) becomes "1". Then, in phase P3, the slave latch unit 32 receives "1", and its output (Q1) becomes "1". In phase P3, after clock signal CK rises, no matter how input D1 changes, its output remains "1". This is similar for flip-flops 27 and 28. Figure 9 shows a case where flip-flop 27 receives "0" in phase P1 and output Q is "1", and a case where flip-flop 29 receives "1" and output Q is "1". Meanwhile, when only master latch unit 31 of flip-flops 27 and 28 are cleared (M-FF cleared in Figure 9), i.e. when test signal SM is set to "0", and test signal is set to "1", outputs M2 and M3 from the master latch unit 31 are always "0", irrespective of inputs D2 and D3. This state continues in phase P2, and the slave latch unit 32 receives the state in phase P3, and its outputs Q2 and Q3 become both "0". When the master latch unit 31 and the slave latch unit 32 are both cleared, the respective outputs from the master latch unit 31 and the slave latch unit 32 change simultaneously to 0 in phase P1', irrespective of the previous inputs or values memorized before. Through the above operations, when only the master latch unit 31 is cleared, the master latch unit 31 receives the clearing result. Consequently, by changing the mode to the serial-in serial-out mode thence, the position of the object serial data is cleared and thus has the value "0", which ascertains the normal operation. This is similar to a preset case. Accordingly, this invention enables failures in signal supplied from an asynchronous system input terminal to flip-flop circuits used for scanning to be promptly detected.

Claims: A flip-flop circuit comprising a serially-connected plurality of flip-flops (26-28) each having synchronous and asynchronous flip-flop terminals, to be connected to a combination circuit (29) and configuring a scanning circuit for testing said combination circuit, characterized by gate means (36) provided between each of said flip-flops and a respective asynchronous system input circuit that is connected to one of said asynchronous terminals (33, 34) of each said flip-flop, for controlling a signal from said asynchronous system input circuit which determines an output of said flip-flop circuit; and means for detecting failures of said asynchronous system input circuit using said gate means during a scanning test through said scanning circuit. The flip-flop circuit according to claim 1, wherein : said flip-flop circuit comprises a master latch unit (31) and a slave latch unit (32) respectively equipped with at least either a clear terminal or a preset terminal as said asynchronous flip-flop terminal; said master latch unit and said slave latch unit each includes a gate circuit receiving, at either said clear terminal or said preset terminal, either a clear signal or a preset signal supplied from the outside by turning its gate on or off in correspondence with the operation mode. The flip-flop circuit according to claim 1 or 2, wherein : said asynchronous system input circuit is said combination circuit (29) to be connected to at least either a clear terminal or a preset terminal of said flip-flops. The flip-flop circuit according to claim 1, further comprising a slave latch unit and a master latch unit having a clearing function or a presetting function, wherein : said master latch unit (31) and said slave latch unit (32) are cleared or preset independently. A semiconductor circuit comprising a combination circuit and a flip-flop circuit according to any one of claims 1 to 4, wherein : said scanning circuit is connected to said combination circuit (29) comprising said asynchronous system input circuit. A method of testing a semiconductor device, the semiconductor device having at least one combination circuit (29) and at least one sequential circuit (26-28), the sequential circuit having a plurality of synchronous inputs and a plurality of asynchronous inputs, comprising the steps of: scan testing the combinational circuit, scan testing the synchronous inputs of the sequential circuits, and scan testing the asynchronous inputs of the sequential circuits.

Inventors: NAITO MITSUGU, NAITO, MITSUGU
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1991
Main classification: G06F11
IPC codes: H03K3, G06F11, G01R31