Abstract:
A LSI circuit having at least one combinational circuit and a latch coupled to the input side of the combinational circuit. The latch includes a switch for inhibiting the latching of either test data for testing the combinational circuit or data for a normal operation.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to a logic integrated circuit technique and, more particularly, to a technique which may effectively be applied to the control of the input and output of data to and from a flip-flop in a LSI logic circuit, for example, a technique which may effectively be utilized for a method of divisionally diagnosing LSI logic circuits such as gate arrays. 
     A method of diagnosing large-scale integration circuits (LSIs) is known in which the LSI is divided into a plurality of combinational circuits and each of the combinational circuits undergoes a diagnosis. 
     For example, a master-slave flip-flop which consists of series connected master and slave latches is connected to each of the input and output sides of each of the combinational circuits. Test data is written into the flip-flop at the data input side and input to the combinational circuit, and the output of the combinational circuit is latched by the flip-flop at its output side. This operation is repeated and the latched output is compared with an expected value which has been obtained in advance to thereby diagnose the LSI (see &#34;Nikkei Electronics&#34;, Nikkei McGraw-Hill, Apr. 16, 1979, pp. 57 to 63). 
     The above-described master-slave flip-flop for the divisional diagnosis is arranged such that data which is latched therein is output to the corresponding combinational circuit through a master latch. Further, all the master latches in the logic LSI are controlled by means of in-phase system clock signals so that they can be accessed from external terminals. 
     SUMMARY OF THE INVENTION 
     The above-described diagnostic method has been found to have the following problems. First, there is a possibility of causing an undesirable phenomenon, known as &#34;in-phase transfer&#34;, in which data which is output from a master latch provided at the input side of a combinational circuit and which is supplied to the combinational circuit is changed by a clock used to latch data into a master latch provided at the output side of the combinational circuit. Second, in the above-described diagnostic method, the normal operation mode and the test mode are set by alternately switching over two different clocks from one to the other. Therefore, even when data for testing is desired to be latched into a flip-flop in the test mode for testing a combinational circuit, there is a possibility of a clock (system clock) for latching data in the normal operation mode being erroneously supplied to the flip-flop, which causes undesirable data to be latched. For this reason, it has heretofore been necessary to design a logic LSI while taking into consideration the logical restriction that, once the test mode is set, the system clock for latching data in the normal operation mode must be held at the low level at all times. 
     It is a primary object of the present invention to reduce the restriction on the logic design and facilitate the diagnosis of a LSI logic circuit. 
     The above and other objects and novel features of the present invention will become more apparent from the following description of the preferred embodiments thereof, taken in conjunction with the accompanying drawings. 
     A representative embodiment of the invention is summarized below. 
     A LSI logic circuit is divided into a plurality of combinational circuits, and a master-slave flip-flop which consists of series-connected master and slave latches is connected to each of the data input and output sides of each of the combinational circuits. 
     The master latch which constitutes the above-described master-slave flip-flop is provided with an input terminal which is supplied with an operation control signal for setting either a normal operation mode or a test mode for testing the corresponding combinational circuit in accordance with the level of the signal supplied thereto. In addition, data which is input to the flip-flop is output to the combinational circuit through the associated slave latch. 
     The master latch is provided with the operation control signal input terminal, so that it is possible to set either the normal operation mode or the test mode in accordance with the level of the operation control signal supplied thereto. Once the test mode is set, the normal mode clock signal for latching data in the normal operation mode is invalidated, and there is therefor no possibility of any undesirable data being latched into the flip-flop. Accordingly, it is possible to ignore the logical restriction that the normal mode clock signal must held at the low level at all times during the test mode in order to prevent any undesirable data from being latched into the flip-flop. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of one embodiment of the present invention; 
     FIG. 2 is a block diagram of one of the flip-flops shown in FIG. 1; 
     FIG. 3 is a circuit diagram of the flip-flop shown in FIG. 2; 
     FIG. 4 is a block diagram of another embodiment of the present invention; and 
     FIG. 5 is a waveform chart showing the operation of the arrangement shown in FIG. 4. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1 schematically illustrates a LSI logic circuit such as a gate array to which the present invention may be applied. Circuits which are surrounded with the two-dot chain line 10 are implemented in a single semiconductor chip such as a single crystal silicon substrate, although not necessarily limited thereto. 
     The diagnosis of a LSI logic circuit is efficiently carried out by dividing it into a plurality of relatively small-sized combinational circuits and diagnosing each combinational circuit. In this embodiment, therefore, flip-flops 1, 2 are connected to the data input side of a combinational circuit 7, and flip-flops 3, 4 are connected to the data output side thereof. The flip-flops 3, 4 are connected to the data input side of a combinational circuit 8, and flip-flops 5, 6 are connected to the data output side thereof. 
     The term &#34;combinational circuit&#34; is used in the conventional manner to refer to any logic circuit in which the output signal is determined by the input signal. Examples of such logic circuits include an AND circuit, OR circuit, NOT circuit, NAND circuit, NOR circuit, XOR circuit and circuits obtained by combining these logic circuits (e.g., a half-adder, full adder, sign converter, encoder, decoder, etc.), together with wirings (on which input and output signals are the same). 
     The above-described flip-flops (denoted by the reference numerals 1 to 6) are, for example, configured as shown in FIG. 2. Referring to FIG. 2, each of the flip-flops illustrated in FIG. 1 is a master-slave flip-flop consisting of a master latch 11 and a slave latch 12. In the master latch 11, when an operation control signal SCAN is at a low level (the normal mode), switches S1, S2 are operated in such a manner that normal mode data D and a normal mode clock signal CK are validated, respectively. Although not necessarily limited thereto, in this normal mode, the normal mode data D is supplied and, when the normal mode clock signal CK is raised to a high level, the data is latched by the master latch circuit 11. When a test mode clock signals SCK 2  is at a low level, the data latched by the master latch 11 is held therein, whereas, when the test mode clock signals SCK 2  is raised to a high level, the latched data is outputted to the corresponding combinational circuit through an output terminal Q 2  of the slave latch 12. 
     When the operation control signal SCAN is at a high level (the test mode), the switches S1 and S2 are operated in such a manner that test mode data SD and a test mode clock signal SCK 1  are validated, respectively. Although not necessarily limited thereto, in this test mode, when the test mode data SD is supplied and the test mode clock signal SCK 1  is raised to a high level, test data used to test the combinational circuit is latched by the master latch 11. When, the test mode clock signal SCK 2  is at the low level, the data latched by the master latch 11 is held therein, whereas, when the test mode clock signal SCK 2  is raised to the high level, the latched test data is outputted through the output terminal Q 2  of the slave latch 12 in a manner similar to that in the case of the above-described normal mode. In the test mode, the test mode clock signals SCK 1  and SCK 2  are alternately raised to the high level, and desired testing data is thereby input to all the master-slave flip-flops each of which is provided at the data input side of the corresponding combinational circuit block and which consists of series-connected master and slave latches. 
     A method of diagnosing a LSI logic circuit is described as follows. 
     Referring to FIG. 1, test data for testing the combinational circuit 7 is set in the flip-flops 1 and 2. More specifically, the operation control signal SCAN supplied to the flip-flops 1 and 2 is raised to the high level, and the switches SW1 to SW6 are controlled so that the test mode data SD is input to each flip-flop. Then, the test mode clock signals SCK 1  and SCK 2  are alternately raised to the high level, and the test data SD for testing the combination circuit 7 and 8 are thus successively set in the flip-flops 1, 2, 3 and 4. The test pattern set in each of the flip-flops 1, 2, 3 and 4 is supplied to the combinational circuit 7 or 8 through the associated slave latch. Then, the operation control signal SCAN is shifted to the low level to control the switches SW1 and SW6 so that the normal mode data D is input to each flip-flop. Thereafter, the test mode clock signals SCK 1  and SCK 2  are shifted to the low level, and the operation mode is thus changed to the normal mode. In the normal mode, the normal mode data clock signals CK (not shown) supplied to the flip-flops 3 and 4 is raised to the high level, and data which is delivered from the combinational circuits 7 and 8 is thereby latched by the flip-flops 3, 4 and 5, 6, respectively. Then, the operation control low level signal SCAN is raised to the high level again and the test mode clock signals SCK 1  and SCK 2  are alternately raised to the high level, and the data latched by the flip-flops 3, 4 and 5, 6 is thus read out. In this way, diagnosis of the combinational circuit blocks 7 and 8 is accomplished. It should be noted that it is also possible to diagnose the combinational circuits 7 and 8 separately from each other. 
     In the above-described embodiment, a LSI logic circuit is divided into a plurality of combinational circuits, and a master-slave flip-flop which consists of series-connected master and slave latches is connected to each of the data input and output sides of each combinational circuit. 
     Further, the master latch which constitutes each of the master-slave flip-flops is provided with an operation control signal (SCAN) input terminal for setting either the normal operation mode or the test mode for testing the combinational circuit in accordance with the level of the signal supplied thereto. Accordingly, once the test mode is set, the normal mode clock signal is invalidated, and there is therefor no chance of any undesirable data being input to the flip-flops. Thus, it is possible to eliminate the restriction on the logic design that it is necessary to hold the normal mode clock signal at the low level at all times during the test mode in order to prevent any undesirable data from being input to the flip-flops. 
     Further, in the above-described embodiment, data which is output from each flip-flop to the corresponding combinational circuit is delivered from the slave latch which constitutes the flip-flop, and the latches which are respectively provided at the data input and output sides of one combinational circuit are controlled by means of clocks having different timings. Accordingly, there is no chance of in-phase transfer occurring during a diagnosis, advantageously. 
     Although the invention has been described in terms of the foregoing embodiment, it should be clearly understood that the invention is not limited to the above-described embodiment and various changes and modifications may, of course, be made without departing from the gist of the invention. 
     For example, although in the above-described embodiment a LSI logic circuit is divided into two combinational circuits and a diagnosis is carried out for each of the combinational circuits, a LSI logic circuit may be divided into any appropriate number of combinational circuits according to the size of the LSI circuit. 
     FIG. 3 shows one implementation of the switch means S1, S2 and master-slave flip-flop shown in FIG. 2. Master latch ML comprises an inverter N1 supplied with the normal mode data D, an inverter N6 supplied with the test mode data SD, an NAND gate A 1  supplied with the operation control signal SCAN and the normal mode clock signal CK, inverters N2 and N3 series-connected so as to constitute a latch, and P-channel type MOSFETs Q1, Q3, Q5, Q7 and N-channel type MOSFETs Q2, Q4, Q6, Q8, etc. MOSFET pairs (Q3, Q4) and (Q7, Q8) are connected in series between the input side of the inverter N2 and the output side of the inverter N3. The output signal from the inverter N1 is supplied to the inverter N2 through a MOSFET pair (Q1, Q2). The output signal from the inverter N6 is supplied to the inverter N2 through a series connection of the MOSFET pair (Q5, Q6) and the MOSFET pair (Q3, Q4). The switching operations of the MOSFET pairs (Q1, Q2) and (Q3, Q4) are controlled by means of the NAND gate A1 and an inverter N4 which inverts the output signal from the AND gate A1. The switching operations of the MOSFET pairs (Q5, Q6) and (Q7, Q8) are controlled by means of the test mode clock signal SCK 1  and the output signal from an inverter N5 which inverts the signal SCK 1 . 
     The slave latch SL comprises inverters N8 and N9 which are series connected so as to constitute a latch, MOSFET pairs (Q11, Q12), (Q9, Q10). The output signal from the inverter N9 is fed back to the input side of the inverter N8 through the MOSFET pair (Q11, Q12). The output signal Q M  form the master latch is supplied to the inverter N8 through the MOSFET pair (Q9, Q10). The switching operations of the MOSFET pairs (Q9, Q10) and (Q11, Q12) are controlled by means of the test mode clock signal SCK 2  and the output signal from an inverter N7 which inverts the signal SCK 2 . 
     The function tables of the master latch ML and the slave latch SL are respectively shown in TABLEs 1 and 2 below. 
     
                                           TABLE 1__________________________________________________________________________FUNCTION TABLE OF THE MASTER LATCH (ML)     INPUTS              OUTPUT__________________________________________________________________________    CK D   SCAN SCK.sub.1                     SD  Q.sub.M    L  X   H    L    X   Q.sub.MONORMAL   H  H   H    L    X   HMODE     H  L   H    L    X   L    X  X   L    L    X   Q.sub.MOSCAN     X  X   L    H    H   HMODE     X  X   L    H    L   L__________________________________________________________________________ 
    
     
                       TABLE 2______________________________________FUNCTION TABLE OF THE SLAVE LATCH (SL)  INPUT  OUTPUT______________________________________  SCK.sub.2         Q  L      Q.sub.O  H      Q.sub.M______________________________________ 
    
     In these tables, &#34;H&#34; represents a high level, &#34;L&#34; a low level, and &#34;X&#34; a state wherein the output is not affected by the level (&#34;don&#39;t care&#34;). &#34;Q MO  &#34; represents the output signal from the master latch in its previous state, while &#34;Q O  &#34; represents the output signal from the slave latch in its previous state. 
     As will be clear from TABLE 1, in SCAN MODE, the normal mode clock signal CK and the normal mode data D are in the &#34;don&#39;t care&#34; state. Accordingly, in TEST MODE such as SCAN MODE, the normal mode clock signal and the like can be invalidated. As a result, it is possible to prevent any undesirable data from being input to the flip-flop in TEST MODE. Further, the test mode data SD can be invalidated in the normal mode. As a result, it is possible to prevent any undesirable data from being input to the flip-flop in the normal mode. 
     FIG. 4 shows an example of an arrangement in which test mode data is scanned in and out by using a plurality of flip-flops shown in FIG. 3. 
     A plurality of flip-flops FF1, FF2, . . . , FFn are fabricated on a single semiconductor chip together with combinational circuits (not shown). 
     This semiconductor chip is provided with external terminals including an input terminal T 1  for the test input data SID, an input terminal T 2  for a mode select signal M, an input terminal T 3  for the clock signal SC 1 , an input terminal T 4  for the slave latch clock signal SCK 2 , and an output terminal T 5  for test output data SOD. A built-in logic circuit LC produces the operation control signal SCAN and the test mode clock signal SCK 1  on the basis of the mode select signal M and the clock signal SC 1 . These signals are supplied to the master latches ML1 to MLn in the flip-flops FF1 to FFn. The slave latch clock signal SCK 2  is supplied to the slave latches SL1 to SLn. 
     FIG. 5 is a waveform chart showing the operation of each of the circuit blocks shown in FIG. 4. The operation control signal SCAN is raised to the high level only when both the mode select signal M and the clock signal SC 1  are at the high level (SCAN=M·SC1). The test mode clock signal SCK 1  is raised to the high level only when the mode select signal M is at the low level and the clock signal SC 1  is at the high level (SCK 1  =M·SC 1 ). 
     In the scan-in state, the test input data SID is serially inputted to the flip-flop FF1 and transferred by being successively shifted to the subsequent flip-flops. 
     In the normal state, the mode select signal M is raised to the high level, and reception of any test input data is thereby inhibited. Further, in the normal state, the test input data held in each flip-flop is supplied to the corresponding combinational circuit (not shown). The resultant output signal from the combinational circuit is supplied to the associated flip-flop as normal mode data D and latched by the flip-flop in synchronism with the normal mode clock signal CK. 
     In the scan-out state, the output signals from the combinational circuits which are held in the associated flip-flops are successively shifted to the subsequent flip-flops and thereby transferred. As a result, test output data SOD is serially delivered from the final flip-flop. 
     Although the invention has been described as an embodiment in which the present invention is applied to a circuit gate array, it should be clearly understood that the present invention is not limited thereto and may generally be applied to LSI logic circuits.