Abstract:
According to the present invention, there is provided an operation mode setting circuit comprising: a plurality of latch circuits each of which receives one of at least two bits contained in an operation mode setting signal for setting an operation mode, and latches and outputs the bit in synchronism with a clock; an inverter which inverts at least one of output signals from said latch circuits; and a logic circuit which receives the output signals from said latch circuits and the signal inverted by said inverter, performs a predetermined logic operation, and outputs a result.

Description:
CROSS REFERENCE TO RELATED APPLICATION  
       [0001]     This application is based upon and claims benefit of priority under 35 USC §119 from the Japanese Patent Application No. 2004-51016, filed on Feb. 26, 2004, the entire contents of which are incorporated herein by reference.  
       BACKGROUND OF THE INVENTION  
       [0002]     The present invention relates to an operation mode setting circuit and, more particularly, to a circuit which sets an operation mode immediately after the power supply is turned on in a semiconductor integrated circuit.  
         [0003]     A semiconductor integrated circuit generally has an integrated circuit dedicated to testing and includes a test mode different from a normal operation mode, in order to facilitate testing.  
         [0004]     Since, however, the test mode is different from the normal operation mode, a user does not operate the semiconductor integrated circuit in this test mode. Therefore, if the test mode starts for some reason while the user is operating the semiconductor integrated circuit, this test mode is regarded as an operation error.  
         [0005]     Accordingly, design of a semiconductor integrated circuit requires some “mechanism” which prevents switching to the test mode while a user is normally operating the semiconductor integrated circuit.  
         [0006]     As an example of this “mechanism”,  FIG. 5  shows the arrangement of a conventional circuit for setting an operation mode.  
         [0007]     4-bit operation mode setting signals “mode bits  0  to  3 ” are input to four test mode input terminals IN 101  to IN 104  from a CPU or another external circuit (neither is shown). A normal operation mode and test mode are switched by the combination of these 4-bit signals.  
         [0008]      FIG. 6  shows operation modes determined by the combination of the 4-bit operation mode setting signals.  
         [0009]     In a normal operation mode, all mode bits  0  to  3  take the value of logic “0”. To enter any of test modes A to C, mode bit  3  takes the value of logic “1”. Each test mode is determined by the combination of logics “1” and “0” in remaining mode bits  0 ,  1 , and  2 .  
         [0010]     Since a user is forced to fixedly use logic “0” in all mode bits  0  to  3 , the semiconductor integrated circuit does not enter any test mode by mistake.  
         [0011]     The operation of the conventional operation mode setting circuit will be described below with reference to  FIG. 5 .  
         [0012]     Of mode bits  0  to  3  input to the input terminals IN 101  to IN 104 , mode bits  0  and  3  remain the same, and mode bits  1  and  2  are inverted by inverters IV 101  and IV 102 , respectively, and input to an AND circuit AD 101 . The output from the AND circuit AD 101  is supplied to a latch circuit LC 101 . At a timing synchronized with a clock CLK supplied from a clock generator CG 101 , the latch circuit LC 101  latches and outputs the output from the AND circuit AD 101 . This output is output from an output terminal OT 101  to, e.g., a CPU (not shown).  
         [0013]     If the output from the AND circuit AD 101  is logic “1”, the operation mode is test mode A. If the output is logic “0”, the operation mode is any of the normal operation mode and test modes B to D. Note that in the following explanation, test mode A is used as the test mode, and a case in which it is necessary to distinguish between the normal operation mode and test mode A will be described.  
         [0014]     The following is a reference which discloses a technique concerning the conventional operation mode setting circuit.  
         [0015]     Japanese Patent Laid-Open No. 2001-273054  
         [0016]     Unfortunately, the conventional operation mode setting circuit described above has the following problems.  
         [0017]     Immediately after the power supply is turned on, the output level of the latch circuit LC 101  is unstable, and the output is either logic “1” or “0”.  
         [0018]     This is so because the clock CLK which is required to latch the data into the latch circuit LC 101  is not generated immediately after the power supply is turned on.  
         [0019]     The clock CLK is not generated until all circuits in the semiconductor integrated circuit become normally operable, i.e., until a quartz oscillator of the clock generator CG 101  which generates the clock CLK becomes stably operable in the semiconductor integrated circuit after the power supply is turned on.  
         [0020]     To eliminate this phenomenon which occurs immediately after the power supply is turned on, a power on clear circuit POC is added to force the output from the latch circuit to “0”.  
         [0021]      FIG. 7  shows an example in which the power on clear circuit POC is added to the latch circuit LC 101  shown in  FIG. 5 .  
         [0022]     When the power supply is turned on, the power on clear circuit POC outputs a pulse while the power supply voltage rises. This pulse is supplied to a reset terminal R of the latch circuit LC 101 , and the output from the latch circuit LC 101  is fixed to “0”.  
         [0023]     Consequently, after the power supply is turned on, the semiconductor integrated circuit enters the normal operation mode, and does not switch to test mode A.  
         [0024]     Even in this arrangement including the power on clear circuit POC as described above, however, it is sometimes impossible to eliminate the above-mentioned phenomenon in which the output from the latch circuit LC 101  is unstable after the power supply is turned on. The reason will be explained below.  
         [0025]     The power on clear circuit POC senses the rise of the power supply voltage, and generates one pulse accordingly. Therefore, the characteristics of the power on clear circuit POC are largely influenced by the rise time of the power supply voltage.  
         [0026]     As shown in  FIG. 8 , a power on clear circuit generally has a capacitor C, resistor R, and switching transistor T. As shown in  FIG. 9 , after a power supply voltage VDD rises, the power on clear circuit generates a pulse POCP by discharging the capacitor C.  
         [0027]     If the power supply voltage VDD rises slowly, the generated pulse POCP peaks at an insufficient height, so the output from the latch circuit LC 101  cannot be reset in some cases.  
         [0028]     Accordingly, the output from the latch circuit LC 101  sometimes becomes logic “1” after the power supply is turned on. Once this output becomes “1”, this “1” output state cannot be reset unless the clock CLK is supplied to the clock terminal L.  
         [0029]     As a consequence, the semiconductor integrated circuit enters test mode A. However, this is an operation error to the user, and increases the possibility of a defective operation in the user system.  
         [0030]     To prevent this event, it is necessary to define a maximum value of the rise time of the power supply voltage to reliably execute this operation. In addition, the user must design the system board such that the rise time is equal to or smaller than this maximum value. This operation is cumbersome for the user, and increases the cost.  
       SUMMARY OF THE INVENTION  
       [0031]     According to one aspect of the present invention, there is provided an operation mode setting circuit, comprising: 
        a plurality of latch circuits each of which receives one of at least two bits contained in an operation mode setting signal for setting an operation mode, and latches and outputs the bit in synchronism with a clock;     an inverter which inverts at least one of output signals from said latch circuits; and     a logic circuit which receives the output signals from said latch circuits and the signal inverted by said inverter, performs a predetermined logic operation, and outputs a result.        
 
         [0035]     According to one aspect of the present invention, there is provided an operation mode setting circuit, comprising: 
        a plurality of latch circuits each of which receives one of at least two bits contained in operation mode setting signals for setting an operation mode, and latches and outputs the bit in synchronism with a clock;     an input inverter which inverts at least one of the operation mode setting signals input to said latch circuits, and supplies an inverted signal to a corresponding one of said latch circuits;     an output inverter which inverts at least one of output signals from said latch circuits; and     a logic circuit which receives the output signals from said latch circuits and the signal inverted by said inverter, performs a predetermined logic operation, and outputs a result,     wherein said latch circuits include a latch circuit having said input inverter on an input side and no output inverter on an output side, and a latch circuit having no input inverter on an input side and said output inverter on an output side.       
 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0041]      FIG. 1  is a circuit diagram showing the arrangement of an operation mode setting circuit according to the first embodiment of the present invention;  
         [0042]      FIG. 2  is a circuit diagram showing the arrangement of an operation mode setting circuit according to the second embodiment of the present invention;  
         [0043]      FIG. 3  is a circuit diagram showing the arrangement of an operation mode setting circuit according to the third embodiment of the present invention;  
         [0044]      FIG. 4  is a circuit diagram showing the arrangement of an operation mode setting circuit according to the fourth embodiment of the present invention;  
         [0045]      FIG. 5  is a circuit diagram showing the arrangement of a conventional operation mode setting circuit according to the first embodiment of the present invention;  
         [0046]      FIG. 6  is a view showing the values of bits  0  to  3  of operation mode setting signals for selecting any of a normal operation mode and test modes A to C;  
         [0047]      FIG. 7  is a circuit diagram showing the arrangement of another conventional operation mode setting circuit;  
         [0048]      FIG. 8  is a circuit diagram showing the arrangement of the power on clear circuit shown in  FIG. 7 ; and  
         [0049]      FIG. 9  is a graph showing the relationship between a pulse generated by the power on clear circuit shown in  FIG. 8  and the power supply voltage.  
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0050]     Embodiments of the present invention will be described below with reference to the accompanying drawings.  
         [0000]     (1) First Embodiment  
         [0051]      FIG. 1  shows the arrangement of an operation mode setting circuit according to the first embodiment of the present invention.  
         [0052]     As in the circuit shown in  FIG. 4 , an operation which, when the power supply is turned on, distinguishes between a normal operation mode and test mode A by using operation mode setting signals having four mode bits  0  to  3  shown in  FIG. 5  will be explained below.  
         [0053]     In the first embodiment, latch circuits LC 1  to LC 4  are arranged in one-to-one correspondence with four mode bits  0  to  3  of the operation mode setting signals.  
         [0054]     The latch circuits LC 1  to LC 4  are connected to a common power supply voltage line VDD 1  and common ground voltage line VSS 1 .  
         [0055]     Mode bits  0  to  3  are input to input terminals IN 1  to IN 4 , and mode bits  0  and  1  are directly input to data terminals D of the latch circuits LC 1  and LC 2 , respectively. Mode bits  2  and  3  are inverted by inverters IV 1  and IV 2 , respectively, and input to data terminals D of the latch circuits LC 3  and LC 4 , respectively.  
         [0056]     A clock CLK generated by a clock generator CG 1  is supplied to the latch circuits LC 1  to LC 4 , and used as a signal for defining a data latch timing.  
         [0057]     Of the latch circuits LC 1  to LC 4 , the outputs from the latch circuits LC 1  and LC 3  to which mode bits  0  and  2 , respectively, are input are directly input to an AND circuit AD 1 . The outputs from the latch circuits LC 2  and LC 4  to which mode bits  1  and  3 , respectively, are input are inverted by inverters IV 3  and IV 4 , respectively, and input to the AND circuit AD 1 . The AND circuit AD 1  ANDs the input data, and outputs the result from an output terminal OT 1 .  
         [0058]     When operation mode setting signals (mode bits  0 ,  1 ,  2 ,  3 )=(0, 0, 0, 0) for setting the normal operation mode are input, (0, 0, 1, 1) is input to the latch circuit LC 1 . When the clock CLK is supplied, the latch circuit LC 1  latches this data, and the output from the latch circuit LC 1  is also (0, 0, 1, 1). When input to the AND circuit AD 1 , this output is inverted to (0, 1, 1, 0) by the inverters IV 3  and IV 4 . Consequently, logic “0” is output from the AND circuit AD 1 .  
         [0059]     On the other hand, when operation mode setting signals (mode bits  0 ,  1 ,  2 ,  3 )=(1, 0, 0, 1) for setting test mode A are input, (1, 0, 1, 0) is input to the latch circuit LC 1 . When the clock CLK is supplied, the latch circuit LC 1  latches this data, and the output from the latch circuit LC 1  is also (1, 0, 1, 0). When input to the AND circuit AD 1 , this output is inverted to (1, 1, 1, 1) by the inverters IV 3  and IV 4 . Consequently, logic “1” is output from the AND circuit AD 1 .  
         [0060]     Accordingly, when logic “0” is output from the AND circuit AD 1 , the operation mode switches to the normal operation mode; when logic “1” is output, the operation mode switches to test mode A.  
         [0061]     The operation mode setting circuit of the first embodiment having the above arrangement can eliminate the operation error concerning mode selection immediately after turning on of the power supply as described above. The operation of the first embodiment will be described below.  
         [0062]     First, assume that the four latch circuits LC 1  to LC 4  are equivalent circuits having substantially the same circuit configuration and layout.  
         [0063]     Assume also that in the semiconductor integrated circuit, the four latch circuits LC 1  to LC 4  are arranged adjacent to each other or arranged as closely as possible.  
         [0064]     The latch circuits LC 1  to LC 4  are connected the same branch lines from the common power supply voltage line VDD 1  and common ground voltage line VSS 1  respectively. Note that both the power supply voltage line VDD 1  and ground voltage line VSS 1  need not always be common lines, i.e., only one of them need be a common line.  
         [0065]     Note also that the four latch circuits LC 1  to LC 4  are arranged in ascending order of mode bit weight, i.e., in the order of mode bits  0 ,  1 ,  2 , and  3 .  
         [0066]     A case in which the power supply voltage VDD is raised in the circuit configuration and layout as described above will be explained below.  
         [0067]     As described above, the outputs from the latch circuits LC 1  to LC 4  are unstable immediately after the power supply is turned on. However, it is experimentally known that the latch circuits LC 1  to LC 4  output the same data when they have the same configuration and layout and they are connected to the same power supply line VDD 1  and same ground voltage line VSS 1 .  
         [0068]     Accordingly, the outputs from the latch circuits LC 1  to LC 4  are expected to be (mode bits  0 ,  1 ,  2 ,  3 )=(0, 0, 0, 0) or (1, 1, 1, 1). In this case, (0, 1, 1, 0) or (1, 0, 0, 1) is output to the AND circuit AD 1 . That is, since the data of logic “0” is always input, the output is logic “0”, so it is ensured that the operation mode switches not to test mode A but to the normal operation mode.  
         [0069]     This is so because on the output side of the latch circuits LC 1  to LC 4 , the latch circuits LC 1  and LC 3  having no inverters and the latch circuits LC 2  and LC 4  having the inverters IV 3  and IV 4 , respectively, are present.  
         [0070]     It is difficult to predict whether the outputs from the latch circuits LC 1  to LC 4  become (0, 0, 0, 0) or (1, 1, 1, 1). However, these outputs presumably largely depend on the way how the power supply voltage VDD rises.  
         [0071]     That is, the outputs from the latch circuits LC 1  to LC 4  can be (0, 0, 0, 0) or (1, 1, 1, 1) depending on the way the power supply voltage VDD rises. Accordingly, depending on the physical positional relationship between the latch circuits LC 1  to LC 4 , “1” and “0” may be mixed, i.e., (0, 0, 1, 1), (1, 1, 0, 0), or the like may be output after the power supply is turned on.  
         [0072]     Even in this case, however, a plurality of “1”s or “0”s often continue, and a run of alternate complementary values such as (0, 1, 0, 1) or (1, 0, 1, 0) extremely rarely occurs, so the possibility of occurrence of such run can be regarded as substantially zero.  
         [0073]     In the first embodiment as described above, to separately detect at least two specific codes “e.g., (0, 0, 0, 0) for setting the normal operation mode and (1, 0, 0, 1) for setting the test mode”, the operation mode switches to the normal operation mode if all the outputs from the latch circuits adjacent to each other are the same immediately after the power supply is turned on, and to test mode A if these outputs are complementary values. Accordingly, it is possible to reliably prevent switching to test mode A by mistake immediately after turning on of the power supply.  
         [0000]     (2) Second Embodiment  
         [0074]     A semiconductor integrated circuit according to the second embodiment of the present invention will be described below with reference to  FIG. 2 .  
         [0075]     The second embodiment is equivalent to increasing the number of latch circuits so as to be able to prevent an operation error at higher probability than that of the first embodiment.  
         [0076]     In addition to four latch circuits LC 1  to LC 4  and four inverters IV 1  to IV 4  of the first embodiment shown in  FIG. 1 , the second embodiment includes four latch circuits LC 11  to LC 14  and four inverters IV 11  to IV 14  having the same connection relationship as in the first embodiment. Also, the 4-input AND circuit AD 1  is replaced with an 8-input AND circuit AD 11 . Other components, i.e., input terminals IN 1  to IN 4 , an output terminal OT 1 , and a clock generator CG 1  are denoted by the same reference symbols as in the first embodiment, and an explanation thereof will be omitted.  
         [0077]     As in the first embodiment, the four latch circuits LC 1  to LC 4  are equivalent circuits having substantially the same circuit configuration and layout, and are arranged adjacent to each other or arranged as close as possible in the semiconductor integrated circuit.  
         [0078]     Likewise, the four latch circuits LC 11  to LC 14  are equivalent circuits having substantially the same circuit configuration and layout, and are arranged adjacent to each other or arranged as close as possible in the semiconductor integrated circuit.  
         [0079]     The latch circuits LC 11  to LC 14  are connected to branch lines from a common power supply voltage line VDD 1  and common ground voltage line VSS 1 .  
         [0080]     Also, as in the first embodiment, the four latch circuits LC 1  to LC 4  are arranged in ascending order of mode bit weight, i.e., in the order of mode bits  0 ,  1 ,  2 , and  3 .  
         [0081]     Likewise, the four latch circuits LC 11  to LC 14  are arranged in ascending order of mode bit weight, i.e., in the order of mode bits  0 ,  1 ,  2 , and  3 .  
         [0082]     An operation performed by the second embodiment having the above arrangement immediately after a power supply voltage VDD is raised will be explained below.  
         [0083]     As described in the first embodiment, the outputs from the latch circuits LC 1  to LC 4  and LC 11  to LC 14  are unstable immediately after the power supply is turned on. However, it is experimentally known that the latch circuits LC 1  to LC 4  and LC 11  to LC 14  having the same configuration and layout and connected to the same power supply voltage line VDD 1  and same ground voltage line VSS 1  output the same data at high probability.  
         [0084]     Accordingly, it is expected that the latch circuits LC 1  to LC 4  output (mode bits  0 ,  1 ,  2 ,  3 )=(0, 0, 0, 0) or (1, 1, 1, 1), and the latch circuits LC 11  to LC 14  similarly output (mode bits  0 ,  1 ,  2 ,  3 )=(0, 0, 0, 0) or (1, 1, 1, 1).  
         [0085]     In this case, the AND circuit AD 11  receives (0, 1, 1, 0) or (1, 0, 0, 1) output from the latch circuits LC 1  to LC 4  via the inverters IV 3  and IV 4 , respectively, and (0, 1, 1, 0) or (1, 0, 0, 1) output from the latch circuits LC 11  to LC 14  via the inverters IV 13  and IV 14 , respectively.  
         [0086]     That is, the AND circuit AD 11  receives (0, 1, 1, 0) and (0, 1, 1, 0), (1, 0, 0, 1) and (1, 0, 0, 1), or (0, 1, 1, 0) and (1, 0, 0, 1). In either case, the AND circuit AD 11  outputs logic “0”, and this makes reliable switching to a normal operation mode possible.  
         [0087]     Switching to the normal operation mode fails and test mode A starts only when all the outputs from the latch circuits LC 1  to LC 4  and LC 11  to LC 14  complementarily continue, i.e., only when (0, 1, 0, 1, 0, 1, 0, 1) is output.  
         [0088]     Immediately after the power supply is turned on, the outputs from the latch circuits extremely rarely take these values by accident, so the possibility can be regarded as substantially zero.  
         [0089]     Accordingly, the second embodiment can avoid an operation error immediately after the power supply is turned on more reliably than in the first embodiment.  
         [0090]     Note that in the second embodiment, the two sets (eight bits) of the latch circuits LC 1  to LC 4  and LC 11  to LC 14  are used for operation mode setting signals having four bits (mode bits  0  to  3 ). However, it is also possible to increase the number of latch circuits to three sets (12 bits), four sets (16 bits), . . . , and so on.  
         [0000]     (3) Third Embodiment  
         [0091]     The third embodiment of the present invention will be described below with reference to  FIG. 3 .  
         [0092]     In the second embodiment described above, all the latch circuits LC 1  to LC 4  and LC 11  to LC 14  are connected to branch lines of the common power supply voltage line VDD 1  and ground voltage line VSS 1 .  
         [0093]     This arrangement has a high space efficiency because all the components can be integrated in a specific portion on the chip. However, in this specific region on the chip, the probability of switching to test mode A can be relatively higher than those in other regions.  
         [0094]     By contrast, in the third embodiment, latch circuits LC 1  to LC 4  are connected to branch lines of a power supply voltage line VDD 11  and ground voltage line VSS 11 , and latch circuits LC 11  to LC 14  are connected to branch lines of a power supply voltage line VDD 12  and ground voltage line VSS 12 .  
         [0095]     In this arrangement, no components need be integrated in a specific region on the chip, so the probability of an operation error is dispersed independently of any specific region. As a consequence, the operation mode can stably proceed to a normal operation mode.  
         [0000]     (4) Fourth Embodiment  
         [0096]     The fourth embodiment of the present invention will be described below with reference to  FIG. 4 .  
         [0097]     The first embodiment described earlier includes the latch circuits LC 1  to LC 4  for all the four bits of the operation mode setting signals. Also, each of the second and third embodiments includes the latch circuits LC 1  to LC 4  and LC 11  and LC 14  for eight bits.  
         [0098]     It is, however, unnecessary to prepare latch circuits for all bits of operation mode setting signals. In the fourth embodiment shown in  FIG. 4 , for 4-bit operation mode setting signals (mode bits  0  to  3 ), latch circuits LC 1  to LC 3  are prepared for mode bits  0  to  2 , and no latch circuit is prepared for mode bit  3 .  
         [0099]     The data of mode bits  0  and  1  is directly input to the latch circuits LC 1  and LC 2 , and the data of mode bit  2  is inverted by an inverter IV 1  and then input to the latch circuit LC 3 . The data of mode bit  3  is not used in signal processing, although the data is input to an input terminal IN 4 .  
         [0100]     In synchronism with a clock CLK, the data latched in the latch circuits LC 1  to LC 3  is output. Of the output data, only the output from the latch circuit LC 2  is inverted by an inverter IV 3 , and then input to an AND circuit AD 1 .  
         [0101]     Only when the latch circuits LC 1  to LC 3  output complementary values (mode bits  0 ,  1 ,  2 ,  3 )=(0, 1, 0) at a very low probability, the AND circuit AD 1  outputs logic “1” to proceed to test mode A. If all these values are the same, a normal operation mode starts. Therefore, it is possible to reliably prevent an operation error concerning operation mode setting immediately after turning on of the power supply in the fourth embodiment as well.  
         [0102]     In this embodiment as described above, the individual bits of the operation mode setting signals are input from input terminals IN 1  to IN 4 . Mode bits  0  and  1  are directly input to the latch circuits LC 1  and LC 2 , respectively, and mode bits  2  and  3  are directly input to the latch circuits LC 3  and LC 4 , respectively. In synchronism with the clock CLK, mode bits  0  and  2  are directly output to the AND circuit AD 1 , and mode bits  1  and  3  are inverted and then input to the AND circuit AD 1 . The AND circuit AD 1  ANDs these mode bits.  
         [0103]     Immediately after the power supply is turned on, all the latch circuits LC 1  to LC 4  presumably output “1”s or “0”s at high probability. However, in the operation mode setting circuit of the above embodiment, mode bits  2  and  3  of these outputs are complementarily inverted by the inverters IV 3  and IV 4 , respectively. In this manner, at least one mode bit is inverted by the inverter, and the outputs from the latch circuits and the signal inverted by the inverter are ANDed. This makes it possible to distinguish between a case in which all the latch circuits output the same value (immediately after the power supply is turned on) and a case in which they do not. Consequently, it is possible to reliably prevent an operation error concerning operation mode setting, i.e., switching to a test mode by mistake immediately after turning on the power supply.  
         [0104]     Each of the above embodiments is merely an example, and does not limit the present invention. Therefore, these embodiments can be variously modified.