Abstract:
A semiconductor integrated circuit includes: a plurality of scan flip-flops configured to form a scan chain in a scan test; and a plurality of clock gating circuits connected between a clock input and corresponding portions of the plurality of scan flip-flops, respectively. The plurality of clock gating circuits are connected in serial to form a chain and gating setting data is inputted in serial through the chain connection. Each of the plurality of clock gating circuits controls a connection between the clock input and a corresponding portion of the plurality of scan flip-flops based on the gating setting data.

Description:
INCORPORATION BY REFERENCE 
       [0001]    This patent application claims a priority on convention based on Japanese Patent Application No. 2009-129489 filed on May 28, 2009. The disclosure thereof is incorporated herein by reference. 
       TECHNICAL FIELD 
       [0002]    The present invention relates to a semiconductor integrated circuit and a method of testing the semiconductor integrated circuit, and more particularly, to a scan circuit and a scan test method. 
       BACKGROUND ART 
       [0003]    A design technique is known in which a test circuit is previously incorporated in a semiconductor integrated circuit in a design stage in order to check whether a delay fault or a stuck-at fault occurs after or during production of the semiconductor integrated circuit. For example, a scan test of a scan chain is performed by the previously incorporated scan circuit. In the scan test, a test pattern data is inputted to a combinational circuit by a shift operation of the scan chain and an output data of the combinational circuit is taken out to a scan cell (flip-flop) by a capture operation. Next, the output data taken out to the scan cell is outputted to outside by the shift operation. Whether a logic circuit in a circuit to be tested is in a good state or a fault state can be determined by comparing the data taken out in this manner (scan out data) with an expected value. 
         [0004]    In the semiconductor integrated circuit, when an operation current exceeding a power supply capacity flows, a power supply cannot maintain a power supply voltage necessary for the semiconductor integrated circuit to properly operate, thereby causing a malfunction. Especially, with upsizing and speeding-up of the semiconductor integrated circuit, a power consumption amount has prominently increased in execution of the scan test. For this reason, the test circuit is demanded in which the increase in the power consumption amount can be suppressed in the execution of the scan test. 
         [0005]    A technique related to a scan circuit is described in patent literature 1.  FIG. 1  is a diagram showing a configuration of the scan circuit described in the patent literature 1.  FIG. 2  shows timing charts in a scan test operation described in the patent literature 1. 
         [0006]    Referring to  FIGS. 1 and 2 , during a scan shift operation period (SCAN_Shift), a final value of a scan shift operation is inputted to scan flip-flops built in test clock control circuits TC 11 , TC 12 , and TC 13 . For example, “0” is inputted to the test clock control circuit TC 11 , “1” is inputted to the test clock control circuit TC 12  and “0” is inputted to the test clock control circuit TC 13 . By setting a scan enable signal SEN to a low level in this state, the mode is switched to a scan capture mode. 
         [0007]    During a scan capture period (SCAN_Capture), clock output signals MCOUT 1  and MCOUT 3  of the test clock control circuits TC 11  and TC 13  are fixed to “0” corresponding to the value “0” inputted in the shift operation, so as not to operate as a clock pulse. As a result, the capture operation to a register group SFFG 1   a  to SFFG 1   z  and a register group SFFG 3   a  to SFFG 3   z  is not performed and data is not taken out from scan output terminals SOT 2  and SOT 4 . 
         [0008]    Meanwhile, during the scan capture period, a clock output signal MCOUT 2  of the test clock control circuit TC 12  functions as the same clock pulse as a test clock SCLK based on the value “1” inputted in the shift operation. As a result, data shift-inputted to a register group SFFG 2   a  to SFFG 2   z  by the shift operation is taken out from a scan output terminal SOT 3 . 
         [0009]    As described above, in the scan circuit described in the patent literature 1, by controlling to supply a clock to only a desired clock domain, it is possible to stop supply of the clock to only a particular clock domain, thereby suppressing a power consumption amount during execution of the scan test. 
       CITATION LIST 
       [0000]    
       
         [Patent literature 1]: JP2007-248135A 
       
     
       SUMMARY OF THE INVENTION 
       [0011]    Stopping supply of clock to an arbitrary clock domain or a scan chain in a scan test has an effect of suppressing a power consumption amount in the test. However, in the patent literature 1, in the shift operation in the scan test, the clock domain to which the clock should be supplied is set. In this case, during a scan shift period, the clock is supplied to all of the scan flip-flops in the scan chain, and all of the scan flip-flops perform the shift operation. Thus, there is a demand for a scan circuit and a scan test method which can reduce a power consumption amount in the capture period as well as the shift operation. 
         [0012]    In an aspect of the present invention, a semiconductor integrated circuit includes: a plurality of scan flip-flops configured to form a scan chain in a scan test; and a plurality of clock gating circuits connected between a clock input and corresponding portions of the plurality of scan flip-flops, respectively. The plurality of clock gating circuits are connected in serial to form a chain and gating setting data is inputted in serial through the chain connection. Each of the plurality of clock gating circuits controls a connection between the clock input and a corresponding portion of the plurality of scan flip-flops based on the gating setting data. 
         [0013]    In another aspect of the present invention, a test method of a semiconductor integrated circuit, is achieved by setting connection or disconnection of a clock input for each of portions of a plurality of scan flip-flops of a scan chain; and by inputting a test pattern data to the scan chain to which the connection or the disconnection is set. 
         [0014]    According to the present invention, a power consumption amount in a scan test can be reduced. Moreover, false determination in the scan test can be reduced. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0015]    The above and other objects, advantages and features of the present invention will be more apparent from the following description of certain embodiments taken in conjunction with the accompanying drawings, in which: 
           [0016]      FIG. 1  is a diagram showing a configuration of a scan circuit according to a conventional technique; 
           [0017]      FIG. 2  shows timing charts in a scan test operation according to the conventional technique; 
           [0018]      FIG. 3  is a diagram showing a configuration of a scan circuit according to the present invention; 
           [0019]      FIG. 4  is a diagram showing a configuration of a clock gating circuit according to the present invention; 
           [0020]      FIG. 5  is a diagram showing a configuration of a scan flip-flop according to the present invention; 
           [0021]      FIG. 6  shows timing charts in a clock gating setting operation according to the present invention; and 
           [0022]      FIG. 7  shows timing charts in a scan test operation according to the present invention. 
       
    
    
     DESCRIPTION OF EMBODIMENTS 
       [0023]    Hereinafter, a semiconductor integrated circuit of the present invention will be described with reference to the attached drawings. In the drawings, same or similar reference numerals designate same or similar or components. 
         [0024]    Referring to  FIGS. 3 to 5 , a configuration of the semiconductor integrated circuit (scan circuit) according to the present invention will be described.  FIG. 3  is a diagram showing a configuration of a scan circuit in the semiconductor integrated circuit according to the present invention. Referring to  FIG. 3 , the scan circuit of the present invention includes a plurality of clock gating circuits GC 0  to GCx and a plurality of scan flip-flops SF 00  to SF 0   z , SF 10  to SF 1   z , SF 20  to SF 2   z , . . . , and SFxO to SFxz. It is noted that x, z each are an integer. 
         [0025]    The scan circuit according to the present invention has a clock input CLK 0 , a scan input SIN 00 , a scan output SOUTxz, a gating control input GSIN 0 , clock gating enable output GSOUTx, a test mode control signal input AMC 0 , a scan mode control signal input SMC 0  and a clock gating circuit setting control input GCC 0  as terminals. Hereinafter, the clock gating enable output GSOUTx is referred to as an enable output GSOUTx, the test mode control signal input AMC 0  is referred to as a mode control input AMC 0 , the scan mode control signal input SMC 0  is referred to as a mode control input SMC 0  and the clock gating circuit setting control input GCC 0  is referred to as a setting control input GCC 0 . 
         [0026]    Each of the clock gating circuits GC 0  to GCx includes a normal operation clock gating enable signal input EN, a scan clock gating enable signal input GSIN, a test mode control signal input AMC, a clock gating circuit setting control input GCC, a gated clock output GCLK, a clock gating enable output GSOUT and a clock input CLK as terminals. Hereinafter, the normal operation clock gating enable signal input EN is referred to as an enable signal input EN, the scan clock gating enable signal input GSIN is referred to as an enable signal input GSIN, the test mode control signal input AMC is referred to as a control signal input AMC, the clock gating circuit setting control input GCC is referred to as a setting control input GCC and the clock gating enable output GSOUT is referred to as an enable output GSOUT. 
         [0027]    Each of the scan flip-flops SF 00  to SF 0   z , SF 10  to SF 1   z , SF 20  to SF 2   z , . . . , and SFx 0  to SFxz includes terminals for a data input DIN, a scan input SIN, a scan clock gating enable signal input GCEN, a scan mode control input SMC, a clock input CLK, a data output DOUT and a scan output SOUT. Hereinafter, the scan clock gating enable signal input GCEN is referred to as an enable signal input GCEN and the scan mode control input SMC is referred to as a mode control input SMC. 
         [0028]    The clock input CLK 0  is connected to the clock inputs CLK of all the clock gating circuits GC 0  to GCx. The setting control input GCC 0  is connected to the setting control inputs GCC of all the clock gating circuits GC 0  to GCx. The mode control input AMC 0  is connected to the mode control inputs AMC of all the clock gating circuits GC 0  to GCx. 
         [0029]    The gating control input GSIN 0  is connected to the enable signal input GSIN of the clock gating circuit GC 0 . The enable output GSOUT (GSOUT 0 ) of the clock gating circuit GC 0  is connected to the enable signal input GSIN of the clock gating circuit GC 1 , and the enable output GSOUT (GSOUT 1 ) of the clock gating circuit GC 1  is connected to the enable signal input GSIN of the clock gating circuit GC 2 . Similarly, the enable outputs GSOUT are sequentially chain-connected in series up to the clock gating circuit GCx. 
         [0030]    The enable output GSOUT (GSOUT 0 ) of the clock gating circuit GC 0  is connected to the enable signal inputs GCEN of the scan flip-flops SF 00  to SF 0   z . The enable output GSOUT (GSOUT 1 ) of the clock gating circuit GC 1  is connected to the enable signal inputs GCEN of the scan flip-flops SF 10  to SF 1   z . The enable output GSOUT (GSOUT 2 ) of the clock gating circuit GC 2  is connected to the enable signal inputs GCEN of the scan flip-flops SF 20  to SF 2   z . Similarly, the enable output GSOUT (GSOUTx) of the clock gating circuit GCx is connected to the enable signal inputs GCEN of the scan flip-flop SFx 0  to SFxz. 
         [0031]    The gated clock output GCLK (GCLK 0 ) of the clock gating circuit GC 0  is connected to the clock inputs CLK of the scan flip-flops SF 00  to SF 0   z . The gated clock output GCLK (GCLK 1 ) of the clock gating circuit GC 1  is connected to the clock inputs CLK of the scan flip-flops SF 10  to F 1   z . The gated clock output GCLK (GCLK 2 ) of the clock gating circuit GC 2  is connected to the clock inputs CLK of the scan flip-flops SF 20  to F 2   z . Similarly, the gated clock output GCLK (GCLKx) of the clock gating circuit GCx is connected to the clock inputs CLK of the scan flip-flops SFx 0  to Fxz. 
         [0032]    The scan input SING 00  is connected to the scan input SIN of the scan flip-flop SF 00 , the scan output SOUT (SOUT 00 ) of the scan flip-flop SF 00  is connected to the scan input SIN of the scan flip-flop SF 10 , and the scan output SOUT (SOUT 10 ) of the scan flip-flop SF 10  is connected to the scan input SIN of the scan flip-flop SF 20 . Similarly, the scan flip-flops are chain-connected through the scan output SOUT and the scan input SIN to constitute a scan chain having the scan flip-flop SF 00  as an input stage (initial stage) and the scan flip-flop SFxz as a final stage. 
         [0033]    The scan mode control signal input SMC 0  is connected to the mode control inputs SMC of all the scan flip-flops SF 00  to SFxz. 
         [0034]    Next, referring to  FIG. 4 , a configuration of the clock gating circuits GC 0  to GCx according to the present invention will be described in detail.  FIG. 4  is a diagram showing the configuration of the clock gating circuit GC 0  according to the embodiment of the present invention. Since the configurations of the other clock gating circuits GC 1  to GCxz is the same as that of the clock gating circuit GC 0 , description thereof is omitted. 
         [0035]    The clock gating circuit GC 0  includes a multiplexer MX 1  and a clock gating cell LT 1 . The multiplexer MX 1  includes data inputs D 0  to D 2  and control signal inputs S 0  and S 1  as input terminals and an output Y as an output terminal. The data input D 0  is connected to the enable output GSOUT, the data input D 1  is connected to the enable signal input GSIN and the data input D 2  is connected to the enable signal input EN. The control signal input SO is connected to the mode control input AMC and the control signal input S 1  is connected to the setting control input GCC. The output Y is connected to a control input GT of the clock gating cell LT 1 . 
         [0036]    The multiplexer MX 1  selects one of the data inputs D 0  to D 2  based on the signal levels (logic values) of the mode control input AMC and the setting control input GCC inputted to the control signal inputs S 0  and S 1 , and outputs the selected data input from the output Y to the clock gating cell LT 1 . In detail, the clock gating circuit GC 0  is set to a test mode in response to the mode control input AMC in a high level. In the test mode, the data input D 1  (enable signal input GSIN) is outputted from the output Y in response to the setting control input GCC in the high level and the data input D 0  (enable output GSOUT) is outputted in response to the setting control input GCC in a low level. On the other hand, the clock gating circuit GC 0  is set to a normal mode in response to the mode control input AMC in the low level. In the normal mode, the data input D 2  (enable signal input EN) is outputted from the output Y at all time. 
         [0037]    The clock gating cell LT 1  controls connection (supply) and disconnection (supply stop) of the clock to the scan flip-flop in response to the enable signal (output Y) selected by the multiplexer MX 1 . The clock gating cell LT 1  includes the control signal input GT and the clock input CLK as input terminals, and the enable output GSOUT and the gated clock output GCLK as output terminals. The clock gating cell LT 1  includes a latch circuit LT 1 A and an AND circuit LT 1 B. The latch circuit LT 1 A latches the enable signal supplied to the control signal input GT in response to the clock input CLK and outputs the latched enable signal to the enable output GSOUT. The AND circuit LT 1 B outputs a logical product of the clock input CLK and the enable output GSOUT to the gated clock output GCLK. The AND circuit LT 1 B may be realized by another logic operation. 
         [0038]    In the test mode, the data input D 1  (enable signal input GSIN) is supplied to the clock gating cell LT 1  in response to the setting control input GCC in the high level. At this time, the gated clock output GCLK indicates a signal level corresponding to the enable signal input GSIN. Here, when the setting control input GCC is in the low level, the enable output GSOUT is fixed to the signal level of the data latched by the clock gating cell LT 1 . That is, data (enable output GSOUT) for determining connection or disconnection of the gated clock output GCLK is set to the clock gating circuit GC 0 . For example, when the clock gating circuit GC 0  is set (fixed) to the enable output GSOUT in the high level, the gated clock output GCLK has a signal level corresponding to the clock input CLK. In other words, the gated clock output GCLK is in a connection state and a clock signal from the clock input CLK is supplied to the scan flip-flops SF 00  to SF 0   z  (clock connection). Alternatively, when the clock gating circuit GC 0  is set (fixed) to the enable output GSOUT in the low level, the gated clock output GCLK is fixed to the low level (clock disconnection). 
         [0039]    On the other hand, in the normal mode, the data input D 2  (enable signal input EN) is supplied to the clock gating cell LT 1 . At this time, the gated clock output GCLK indicates the signal level corresponding to the enable signal input EN. That is, the data (enable output GSOUT) for determining connection or disconnection of the gated clock output GCLK is set to the clock gating circuit GC 0 . For example, when the clock gating circuit GC 0  is set (fixed) to the enable output GSOUT in the high level, the gated clock output GCLK having the signal level corresponding to the clock input CLK is outputted (clock conduction). Alternatively, when the clock gating circuit GC 0  is set (fixed) to the enable output GSOUT in the low level, the gated clock output GCLK is fixed to the low level (clock blocking). 
         [0040]      FIG. 5  is a diagram showing a configuration of the scan flip-flop SF 00  used in the scan circuit according to the present invention. Since the configuration of the other scan flip-flops SF 01  to SFxz is the same as that of the scan flip-flop SF 00 , description thereof is omitted. Referring to  FIG. 3 , the scan flip-flop SF 00  includes a flip-flop FF 1  and a multiplexer MX 2 . The scan flip-flop SF 00  includes the data input DIN, the scan input SIN, the enable signal input GCEN, the mode control input SMC and the clock input CLK as input terminals, and the data output DOUT and the scan output SOUT as output terminals. 
         [0041]    The flip-flop FF 1  includes a selector SL 1  which is connected to each of the data input DIN, the scan input SIN and the mode control input SMC, and a flip-flop FF 1 A which is connected to an output of the selector and the clock input CLK and has an output Q. The output Q of the flip-flop FF 1 A is connected to the data input D 1  of the multiplexer MX 2 . The selector SL 1  selects either the data input DIN or the scan input SIN in response to the signal level of the mode control input SMC and outputs the selected input to the flip-flop FF 1 A. The flip-flop FF 1 A latches the output of the selector SL 1  in response to the clock CLK and outputs the output from the output Q to the multiplexer MX 2 . 
         [0042]    The multiplexer MX 2  selects one of the data inputs D 0  and D 1  in response to the signal levels of the mode control input SMC and the enable signal input GCEN supplied to the control signal inputs S 0  and S 1 , and outputs the selected input to the data output DOUT and the scan output SOUT. In detail, the scan flip-flop FS 00  is set to a scan shift mode in response to the mode control input SMC in the high level, and the flip-flop FF 1 A latches the scan input SIN in response to the clock input CLK. Here, the multiplexer MX 2  selects the data input D 1  (output Q) and sets it as the output Y when the enable signal input GCEN is in the high level (scan shift), and selects the data input D 0  (scan input SIN) and sets it as the output Y when the enable signal input GCEN is in the low level (through output). On the other hand, the scan flip-flop FS 00  is set to a capture mode or the normal mode in response to the mode control input SMC in the low level and the flip-flop FF 1 A latches the data input DIN in response to the clock input CLK. Here, the multiplexer MX 2  selects the data input D 1  (output Q) and sets it as the output Y irrespective of the signal level of the enable signal input GCEN. 
         [0043]    Next, referring to  FIGS. 6 and 7 , an example of a scan test operation according to the present invention will be described. According to the present invention, prior to the scan test, whether the clock is connected or disconnected is set to each of the clock gating circuits GC 0  to GCx. A mode of performing this setting operation is referred to as a clock gating setting mode. 
         [0044]      FIG. 6  is a timing chart showing an example of a clock gating setting operation according to the present invention. Referring to  FIG. 6 , first, the scan circuit shown in  FIG. 3  is switched to the test mode in response to the mode control input AMC 0  in the high level. In this state, in a period T 1  during which the setting control input GCC 0  is in the high level, the scan circuit is set to the clock gating setting mode. 
         [0045]    In the period T 1 , data (gating setting data) for setting a desired state (clock connection or disconnection) is serially supplied from the gating control input GSIN 0  to the clock gating circuits GC 0  to GCx in synchronization with the clock input CLK 0 . The gating setting data serially supplied from the gating control input GSIN 0  is supplied sequentially to the clock gating circuits GC 0  to GCx through the enable signal input GSIN and the enable output GSOUT. At this time, the gating setting data in the high level is supplied to the clock gating circuit to be set to the connection state, and the gating setting data in the low level is supplied to the clock gating circuit to be set to the disconnection state. In the period T 1 , values of the gated clock outputs GCLK 0  to GCLKx are not determined and values (x) corresponding to respective enable outputs GSOUT are shown. 
         [0046]    At the time when the desired gating setting data is supplied to all the clock gating circuits GC 0  to GCx, the setting control input GCC 0  is set to the low level, so that the clock gating setting mode is terminated (period T 2 ). At this time, the clock gating circuits GC 0  to GCx hold the gating setting data supplied to the gating control input GSIN in response to the setting control input GCC 0  in the low level. Thereby, clock connection or clock disconnection is set together with the value of the enable output GSOUT of each of the clock gating circuits GC 0  to GCx, and as the result of this, the scan test can be started. 
         [0047]    In an example shown in  FIG. 6 , by the above-mentioned clock gating setting operation, the gating setting data in the high level is set to the clock gating circuits GC 0  and GC 2  and the gating setting data in the low level is set to the clock gating circuit GC 1 . In this case, the enable outputs GSOUT 0  and GSOUT 2  of the clock gating circuits GC 0  and GC 2  are in the high level and the gated clock output has the signal level corresponding to the clock input CLK. In other words, the clock gating circuits GC 0  and GC 2  are set to clock connection. On the other hand, the enable output GSOUT 1  of the clock gating circuit GC 1  is in the low level and the gated clock output is fixed to the low level. In other words, the clock gating circuit GC 1  is set to clock disconnection. In a similar manner, the clock connection or the clock disconnection is set to the other clock gating circuits. 
         [0048]    As described above, according to the present invention, prior to the scan test, the clock connection or the clock disconnection can be set to each of the clock gating circuits GC. 
         [0049]      FIG. 7  is a timing chart showing an example of the scan test operation according to the present invention. Referring to  FIG. 7 , the scan shift operation (periods TS 0  and TS 1 ) and the capture operation (period TC 0 ) in the scan test operation according to the present invention will be described in detail. Here, in the clock gating circuit setting mode, the “clock connection” or the “clock disconnection” is previously set to all the clock gating circuits GC 0  to GCx shown in  FIG. 3 . In the present example, the clock gating circuit GC 1  is set to the “clock disconnection” and the other clock gating circuits are set to the “clock connection”. 
         [0050]    In performing the scan test, the mode control inputs AMC of the clock gating circuits GC 0  to GCx are set to the high level and the setting control inputs GCC are set to the low level. Thereby, while the scan test is performed (TS 0 , TC 0 , TS 1 ), the clock gating circuit GC 0  to GCx output the enable output GSOUT (GSOUT 0  to GSOUTx) and the gated clock output GCLK (GCLK 0  to GCLKx) based on the clock gating setting. In this example, the enable outputs GSOUT 0 , GSOUT 2  to GSOUTx of the clock gating circuits GC 0 , GC 2  to GCx are set to the high level and the gated clock outputs GCLK 0 , GCLK 2  to GCLKx become the clock signals having a period corresponding to the clock input CLK. The enable output GSOUT 1  of the clock gating circuit GC 1  is set to the low level and the output of the gated clock output GCLK 1  is disconnected. 
         [0051]    As described above, the gated clock output GCLK 1  is disconnected and stopped during the scan test. In this case, the scan flip-flops SF 10  to SF 1   z  in which the clock input CLK is connected to the clock gating circuit GC 1  do not perform operation in response to the clock input CLK during the scan test. 
         [0052]    In the scan test, inputting of the test pattern data by scan shift (scan shift mode (scan-in): period TS 0 ), writing of data by the capture operation (capture mode: period TC 0 ) and reading of capture data to outside by scan shift (scan shift mode (scan-out): period TS 1 ) are performed. 
         [0053]    First, the operation in the scan shift mode (scan-in: period TS 0 ) will be described. In the scan shift mode (period TS 0 ), a group of scan flip-flops constitutes the scan chain (shift register) in response to the mode control input SMC in the high level. During this period, the test pattern data S 0  to Sn are supplied to the scan flip-flops by the shift operation of the scan chain. 
         [0054]    On the other hand, in the scan shift mode, the scan flip-flops SF 10  to SF 1   z  output the scan input SIN as it is in response to the enable signal input GCEN in the low level. Since the clock input CLK is stopped, the scan flip-flops SF 10  to SF 1   z  do not latch the scan input SIN. For example, in the period TS 0 , the scan output SOUT of the scan flip-flop SF 10  outputs the scan input SIN as it is. Accordingly, the scan flip-flop SF 20  operates so as to input a value from the scan output SOUT 00  preceding the scan output SOUT 10  in a previous stage. Similarly, since the scan output SOUT of the scan flip-flop SF 11  outputs the scan input SIN as it is, the scan flip-flop SF 01  operates so as to input a value from the scan output SOUT 21  preceding the scan output SOUT 11  in a previous stage. 
         [0055]    Next, when test data is supplied to the whole scan chain, the mode control input SMC shifts to the low level and the mode shifts to the capture mode (period TC 0 ). The scan flip-flops SF 00  to SF 0   z , and SF 20  to SFxz latch the data input DiN in response to the clock input CLK and output the latched data (capture data) to the data output DOUT and the scan output SOUT. In an example shown in  FIG. 7 , in a period TC 0 , two clock pulses are supplied to the clock input CLK. In response to a first clock pulse, the scan flip-flops start the capture operation. In response to a second clock pulse, data to be verified is read from the scan flip-flops. For example, in the period TC 0 , the scan flip-flops SF 00 , SF 20 , SF 21 , and SF 01  output data L 00 , L 20 , L 21 , L 01  in the period TCO in response to the first clock input CLK, respectively. For example, the scan flip-flop SF 00 , SF 20 , SF 21 , SF 01  output the capture data C 00 , C 20 , C 21 , C 01  corresponding to the test data Sn and the data L 00 , L 20 , L 21  in response to a next clock input, respectively. 
         [0056]    Also, in the capture mode, since the gated clock output GCLK 1  is in the disconnection state, the clock signal is not supplied to the scan flip-flops SF 10  to SF 1   z . For this reason, in the capture operation period TC 0 , the scan outputs SOUT of the scan flip-flops SF 10  to SF 1   z  are fixed to the low level as an initial value of the flip-flop FF 1 . 
         [0057]    When data is captured by the scan flip-flops, the mode control input SMC shifts to the high level and the mode shifts to the scan shift mode (scan-out) (period TS 1 ). In the period TS 1 , the capture data shifts the scan chain and is outputted from the scan output SOUTxz of the scan flip-flop SFxz in a final stage. During this period, as in the scan-in, the scan flip-flops SF 10  to SF 1   z  output the scan input SIN as it is in response to the enable signal input GCEN in the low level. 
         [0058]    According to the present invention, in the clock gating setting mode prior to the scan test, the clock connection or the clock disconnection is set to the clock gating circuits GC 0  to GCx. For this reason, in the scan shift operation period, the clock connection/disconnection state of the clock gating circuits GC 0  to GCx does not change, and an arbitrary clock gating circuit is disconnected during the scan test. The individual scan flip-flops output the scan input as it is to the scan output when the supply of the clock is stopped in the scan shift operation. Accordingly, even if the arbitrary clock gating circuit is disconnected in the scan shift operation, the scan shift operation can be achieved without any problem. Therefore, in the scan capture operation as well as the scan shift operation, clock disconnection can be performed based on control of the arbitrary clock gating circuit, thereby suppressing a power consumption amount. 
         [0059]    That is, according to the present invention, the power consumption amount can be suppressed by stopping supply of the clock during the whole period of the scan test. When the power cannot be suppressed in the scan shift period, malfunction can occur in the circuit, resulting in false determination of a tester. According to the present invention, since the power can be suppressed in the scan shift period, malfunction of the circuit can be prevented, thereby reducing false determination of the tester. 
         [0060]    Although the embodiments of the present invention has been described in detail, a specific configuration is not limited to the above-mentioned embodiments, and may be modified so as not to deviate from the subject matter of the present invention. Such a modification is included in the present invention.