Abstract:
A speed governor for an integrated circuit which prevents the operation of the integrated circuit above a selected frequency. The speed governor generates a frequency reference and compares the frequency reference to the frequency of the external clock signal that clocks the integrated circuit. As a result of the comparison, if the frequency of the input clock signal is greater than the frequency reference then operation of the integrated circuit is disrupted.

Description:
FIELD OF THE INVENTION 
     The field of the invention relates to the field of governing the speed at which a computer may run; more particularly, the present invention relates to disabling the operation of an integrated circuit when the input clock signal exceeds an upper limit. 
     BACKGROUND OF THE INVENTION 
     In some computers systems, the need may arise to disable the computer when an input clock signal exceeds an upper limit. For instance, using a clock that is too fast may cause problems in a system, since some of the components in the system may not be able to operate at the higher frequency. 
     In the fabrication of microprocessors, it is common to find out that some of the microprocessors are able to operate at higher frequencies than others even though all are fabricated with the same processor. Process variations affecting, for example, the thickness of oxides can cause some wafer runs to yield parts that operate at much higher frequencies than in other wafer runs. Some companies test the upper frequency performance of newly fabricated microprocessors and sort them into &#34;frequency&#34; bins. Consequently, some microprocessors when sold are graded (and labeled) for higher frequencies than others. The microprocessor may not function properly for frequencies above its labeled frequency, especially under stressful ambient conditions or marginal power supply potential. 
     Companies have found that parts labeled with one frequency are sometimes relabeled after being sold by the manufacturer with higher frequencies, and then resold. These relabeled parts could end up in computer systems sold to operate at higher frequencies than the manufacturer intended. An innocent purchaser of such a computer could find that the computer operates well part of the time but fails at other times. The failures may be difficult to trace, and if traced to the microprocessor, reflect badly on the manufacturer. 
     At least one manufacturer has incorporated a speed governor in its microprocessors which cause the microprocessors to fail if the clocking signals applied to them are higher than the frequency they were originally sold for. When this is done, the microprocessor could never be used in higher frequency applications since it will never operate at the higher frequencies. 
     In U.S. Pat. No. 5,107,523, entitled &#34;Processor Clock Governor&#34;, issued Apr. 21, 1992 and assigned to the assignee to the present invention, a circuit is described for disabling a microprocessor when a clock with an improper frequency is used. A problem with this circuit is that the manner in which the &#34;kill&#34; signal is generated is itself subject to process variations and hence may not be settable with the precision desired. 
     In U.S. Pat. Nos. 5,280,605 and 5,274,337, a clock speed limiter is disclosed and uses an integrated resistor as the basis for a timing reference. The resistance value is sensitive to temperature variation, which makes the timing reference variable with temperature. In other words, because the resistance value is sensitive to temperature variation, the cut-off frequency is not constant with temperature, making it difficult to set a reliable cut-off value without losing yield. 
     As will be disclosed, the present invention provides a circuit that is substantially independent of temperature and process variation and additionally provides other advantages. 
     SUMMARY OF THE INVENTION 
     A method and apparatus for regulating the operating speed of an integrated circuit is described. The method and apparatus of the present invention comprises a timing reference generator and a comparison circuit. The timing reference generator generates a timing reference. The comparison circuit compares the timing reference to the input clock signal and generates a disable signal to disable the integrated circuit when the frequency of the input clock signal is greater than the reference frequency. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The present invention will be understood more fully from the detailed description given below and from the accompanying drawings of various embodiments of the invention, which, however, should not be taken to limit the invention to the specific embodiments, but are for explanation and understanding only. 
     FIG. 1 illustrates one embodiment of the frequency reference generator. 
     FIG. 2 are waveform diagrams that depict the operation of the frequency reference generator. 
     FIG. 3 is a block diagram of the decision generator with a clock speed limiter of the present invention. 
     FIG. 4 are waveforms depicting the operation of the decision generator. 
     FIGS. 5A and 5B illustrates a circuit schematic and a graph supporting the derivation of the constant current under the present invention. 
     FIG. 6 illustrates a composite resistor of the present invention. 
     FIG. 7 is a circuit schematic for generating the reference current. 
     FIG. 8 is a block diagram of one embodiment of an integrated circuit according to the present invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     A clock speed limiter for an integrated circuit is described. In the following detailed description of the present invention numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one skilled in the art that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the present invention. 
     Overview of the Present Invention 
     The present invention provides an apparatus and method to prevent an integrated circuit from operating above a predetermined frequency. The present invention employs a frequency reference to determine whether the clock signal that is currently clocking the integrated circuit device is too fast. That is, frequency reference is used as a basic timing reference against which the external input clocks frequency is compared. In one embodiment, the timing reference is generated on-chip. 
     In one embodiment, the comparison between the timing reference and the input clock is implemented in digital circuitry. The digital circuitry counts the number of external clock cycles which occur during a period of the reference frequency. This count is directly proportional to the frequency to the external clock. The count is then compared against a predetermined value that is indicative of the speed allowed for the integrated circuit. In one embodiment, this value is stored in a read-only memory (ROM). If the count exceeds the value stored, a violation has occurred. 
     The predetermined frequency that is compared against the frequency of the external input clock is temperature insensitive. In the present invention, two temperature insensitive references are used to generate the frequency reference: a bandgap voltage reference and a constant current reference. By sourcing the constant current to a gate capacitor, a voltage ramp is obtained. The voltage ramp is terminated when it reaches the level of the bandgap reference output. Using this configuration, a constant and slow frequency reference is obtained in the integrated circuit (e.g., microprocessor). It should be noted that using the constant voltage and the constant current produces a constant resistance that will be temperature insensitive. 
     An on-chip ROM may contain several entries to allow the same integrated circuit to be programmed for different speeds. In one embodiment, programming is done by bondpad options. 
     Frequency Reference Circuitry 
     FIG. 1 illustrates a block diagram of one embodiment of the frequency reference generator of the present invention. Referring to FIG. 1, the frequency reference generator comprises a constant current source 101 for generating a constant current using a constant current reference 110. The constant current source 101 is coupled to capacitor 104 to charge capacitor 104. Capacitor 104 is also coupled to ground. The charge generated by capacitor 104 represents the N1 input voltage to one side of comparator 103. The other input to comparator 103 is bandgap reference 102 which establishes the trip point for the comparator 103. Capacitor 104 is also coupled to a discharge mechanism (e.g., transistor) 106 for discharging capacitor 104. The output of comparator 103 is coupled to the input of a divide-by-2 105. The output of comparator 103 is also fed back to control the discharge mechanism 106. In one embodiment, where discharge mechanism 106 comprises a transistor, the output of comparator 103 is coupled to the gate of the transistor as an on/off switch. The output of divide-by-2 105 is the frequency reference FREF. 
     Bandgap reference 102 establishes a trip point reference BG for comparator 103. Comparator 103 constantly compares the voltage difference between the BG and N1 inputs. The N1 input potential is charged up gradually from ground at a constant rate as determined by constant current source 101 and capacitor 104. Note capacitor 104 is also a constant value. When the potential at the N1 input exceeds the BG input, the output (CQ) of comparator 103 flips, turning on the strong discharge mechanism 106. This causes the input N1 to be pulled to ground very quickly, which immediately causes the output of comparator 103 to flip back to ground. This sequence of events is repeated indefinitely, producing a stable frequency at CQ (the output of comparator 103). The output of comparator 103 is divided by two to produce a frequency reference output FREF, which is stable and independent of temperature. 
     An example of analog waveforms generated by the frequency reference generator of the present invention are shown in FIG. 2. Referring to FIG. 2, the N1 input is shown as a constant voltage ramp which increases until slightly beyond the bandgap reference. At that time, the N1 device is discharged back to ground, while the CQ pulse occurs. In one embodiment, the discharge of the N1 device begins in the middle of each CQ pulse (i.e., the delay from the rising edge of the CQ pulse to the falling edge of the N1 device discharge curve equals the delay from the falling edge of the discharge curve of the N1 device to the falling edge of the CQ pulse. The pulse width of the CQ is very small when compared to the period of the frequency reference FREF. Note that the voltage ramp actually exceeds the bandgap reference level slightly, but the discharge mechanism quickly returns the potential at N1 to ground. 
     Once a stable, digital and temperature independent frequency reference FREF is obtained, a decision generator shown in FIG. 3 compares the frequency reference to the input clock signal. 
     The Decision Generator of the Present Invention 
     Referring to FIG. 3, the input clock 310 is coupled as an input of divide-by-2 301. The output of divide-by-2 310 is an HCLK clock signal 311. Synchronizer 302 is coupled to receive the HCLK signal 311 and the frequency reference (FREF) signal. The output of synchronizer 302 as well as the HCLK signal 311 are coupled to inputs of counter 305. The output of counter 305 is coupled as an input of magnitude comparator 307. The other input to magnitude comparator 307 is coupled to the output of ROM 306, which is output in response to bondpad configuration signal 304. The output of magnitude comparator 307 is a C&gt;R signal that is input into D flip-flop 308. D flip-flop 308 is clocked a ROS signal 313 output from one shot 303. One shot 303 operates in response to the frequency reference (FREF) signal and also generates the reset input to counter 305. The output of the D flip-flop 308 is a Q1 signal 314 that is coupled to the input of hysteresis counter 309. Hysteresis counter 309 is clocked by the synchronized version of the FREF signal output from synchronizer 302 and produces the HCNT signal used to disable the integrated circuit when the input clock is faster than the frequency range permitted. 
     Clock signal 310 is input to the integrated circuit to clock components within the integrated circuit. Clock signal 310 governs the rate of data transfer from one flip-flop to the next. Clock signal 310 is input to a divide-by-2 301 to produce a divided-by-2 version of the clock, referred to herein as the HCLK signal 311. The HCLK signal 311 contains the external input frequency information that is used to clock counter 305 and is used by synchronizer 302. By having clock signal 310 undergo the divide-by-2 operation, the present invention may employ slower components in the decision generator. If the decision generator is configured with faster operating components, then the divide-by-2 operation may not be necessary. 
     The synchronizer 302 synchronizes the HCLK signal 311 to the FREF signal input from the frequency generator of the present invention. If the FREF and HCLK signal 311 were synchronized, then synchronizer 302 would not be required. The synchronized version of the FREF, referred herein as the ENC signal 312, enables counter 305. Counter 305 also receives the HCLK signal 311. When the ENC signal 312 is high, counter 305 is enabled and counts each clock cycle of the HCLK. Thus, counter 305 advances when the FREF signal is high and the HCLK signal 311 toggles. 
     At the end of the high time of the FREF signal, the count contained in counter 305, referred to as the QCNT signal, is compared against a predetermined value, referred to as QROM, output from ROM 306, using magnitude comparator 307. If the QCNT output of counter 305 is larger than the predetermined value, then the C&gt;R signal 315 is activated. 
     The one shot 303 is coupled to receive the frequency reference signal FREF and generates the ROS signal 313. The ROS signal 313 is a one shot generated just before the rising edge of the synchronized FREF signal. The ROS signal 313 resets counter 305 to zero before it begins counting and at each time the rising edge of the synchronized FREF signal occurs. The ROS signal 303 also latches the last value of the C&gt;R signal output from magnitude comparator 307 into a D flip-flop 308. The output of the D flip-flop 308, referred to as a Q1 signal 314, signifies that the speed of the input clock 310 has exceeded the value allowed in ROM 306 during the last FREF cycle. 
     To ensure correct detection, a hysteresis counter 309 is included in one embodiment. Hysteresis counter 309 is clocked by the ENC signal and is enabled only when the Q1 signal 314 is high. Otherwise, hysteresis counter 309 resets to zero. In this embodiment, hysteresis counter 309 counts for eight consecutive FREF cycles before a &#34;speed violation&#34; is determined to have occurred. At that time, the third most significant bit (MSB) of the output signal HCNT from hysteresis counter 309 is activated. Thus, the function of hysteresis counter 309 is to ensure the a real violation is detected, not momentary false ones such as may be due to noise. In alternative embodiments, a hysteresis counter may not be needed. Likewise, the number of consecutive FREF cycles chosen to ensure that a speed violation has occurred is a design choice. 
     The third most significant bit, referred to herein as the HCNT3 signal, or an equivalent signal version is subsequently used to disrupt the normal functionality of the integrated circuit. This intentional failure can be interpreted externally as a critical speed failure. Note that there are numerous ways well-known to those in the art in which the microprocessor or the integrated circuit may be disabled in response to such a signal. For instance, in response to such a signal, the processor can be forced to access the wrong microcode entry, resulting in a software error, or a control signal can be forced to remain at a logic value that results in erratic behavior. 
     It may be necessary for various speed grades to be personalized on different individual circuits of the same product type or integrated circuit type. In one embodiment, ROM 306 holds multiple values, each of which is representative to a different operating frequency limit. Different speed thresholds may be set by programming ROM 306. The bondpad signals 304 select the appropriate data in ROM 306. Thus, by programming the bondpads, a selection of a value in ROM may be made. 
     ROM 306 may be implemented using a simple register, particularly if only one speed grade is available. Also, other forms of programming may be provided to select one of multiple values for comparator 307. It may be feasible to incorporate programming as part of an EPROM or flash EPROM. In other embodiments, the programming may be performed on the fly through, for instance, software running in the computer system in which the integrated circuit is contained. 
     Exemplary waveforms generated through the use of the decision generator in FIG. 3 are shown in FIG. 4. 
     Basis for the Frequency Reference 
     In the present invention, the frequency reference FREF is power supply and temperature insensitive in order to allow tight speed grades to be programmed on an individual integrated circuit. Since the frequency reference FREF is an internal timing reference, a temperature independent resistor and capacitor must be available in the integrated circuit. MOS gate oxide capacitors are known to be temperature insensitive. To obtain a temperature independent resistor in a digital CMOS process, the present invention uses an independent current source with a temperature independent voltage to create a resultant &#34;imaginary&#34; resistor that is also temperature independent. 
     Temperature independent voltage sources are well-known in the art. In one embodiment of the present invention, the temperature independent voltage source is implemented as a bandgap voltage reference. In another embodiment, a Zener diode may be used to provide a temperature independent voltage source. 
     In one embodiment, the temperature independent current source (IREF) used in the present invention employs two resistor layers, none of which are required to have a zero temperature coefficient. The only requirements on the two resistors are that they have good predictable temperature coefficients, have good predictable absolute values, and that one of the two resistor layers has a temperature coefficient above 3356 parts per million, per degree centigrade (ppm/°C.) while the other has a temperature coefficient below 3356 ppm/°C. Note that the temperature coefficient refers to a constant number valid in the interested range of operation (i.e., the operating range of the integrated circuit). 
     FIGS. 5A and 5B illustrate the independent current source (IREF) concept. Note that the term &#34;PTAT&#34; refers to herein as Proportional to Absolute Temperature. A PTAT resistor is a resistor with a temperature coefficient of 3356 ppm/°C. 
     A constant current I is derived by passing two identical currents to two bipolar devices, e.g., Q2, Q1 (=n×Q2), that are different in size. Because the bipolar transistors are different sizes, they have a different current density when identical currents are passed through them. This causes a difference of V be . The difference in V be  can be forced on a resistor, such as R c . Resistor R c  is a 3356 ppm/°C. resistor. The voltage across resistor R c  is ΔV be=  V be  -V be1 . ##EQU1## Note in the equations above, R c  equals α×T, where α is a constant. 
     The derivation above illustrates that if a PTAT voltage is dropped across a PTAT resistor, a temperature independent current results. FIG. 5B is a graph illustrating the relationship between voltage V and the resistor R c  with respect to temperature where V/R c  is a constant. 
     By combining two resistors in series, as shown in FIG. 6, one with a coefficient higher than 3356 ppm/°C. and the other lower, it is possible to size the resistors such than the effective coefficient of the equivalent resistor is 3356 ppm/°C. 
     In one embodiment of the present invention, the N-well and base layers are used for the two resistors in series. A pair of N-well and base resistor values is chosen to satisfy the following equation; ##EQU2## 
     Note that the above equation depicts the relationship between the temperature coefficient and the resistor. Non-idealities such as non-linear or inaccurate temperature coefficients will effect output accuracy. 
     One embodiment of the schematic of the current reference circuit is shown in FIG. 7. The IREF current reference circuit comprises the following devices listed in Table 1 below: 
     
                       TABLE 1______________________________________Ref. No.    Device Type______________________________________701         p-channel transistor702         p-channel transistor703         n-channel transistor704         n-channel transistor705         p-channel transistor706         p-channel transistor707         p-channel transistor708         p-channel transistor709         p-channel transistor710         p-channel transistor711         p-channel transistor712         bipolar transistor713         bipolar transistor714         bipolar transistor715         p-channel transistor716         p-channel transistor717         p-channel transistor718         p-channel transistor719         p-channel transistor720         n-channel transistor721         n-channel transistor722         base resistor723         Resistor (transistor)______________________________________ 
    
     The PB and PC outputs represent cascoded PMOS current source, while the VREF output represents a non-cascoded NMOS current source. The PB and PC outputs may be the output of constant current reference 110. The operation of the elements in the circuit described in FIG. 7 is well-known to those skilled in the art. 
     FIG. 8 is a block diagram of one embodiment of an integrated circuit according to the present invention. Referring to FIG. 8, the integrated circuit comprises a timing reference generator 801, comparison block 803 and core logic/function block 806. Optionally, the integrated circuit may include disable logic 805. 
     Core 806 provides one or more functions. For instance, when the integrated circuit comprises a microprocessor, the functions include fetching, decoding and executing instructions as part of one or more execution pipelines. The comparison block 803 compares the external input clock signal 802 with a timing reference generated by timing reference generator 801, in a manner described above. Based on the results of the comparison, comparison block 803 asserts disable signal 804. Note that disable signal 804 may be active high (e.g., 1) or active low (e.g., 0). 
     The disable signal 804 may be received by core 806 directly. In one embodiment, the disable signal 804 may be received by disable logic 805 which in turn controls the disrupting of core 806. Note that the functionality to disable/disrupt core 806 is well-known in the art. 
     Whereas many alterations and modifications of the present invention will no doubt become apparent to a person of ordinary skill in the art after having read the foregoing description, it is to be understood that the particular embodiment shown and described by way of illustration is in no way intended to be considered limiting. Therefore, references to details of the preferred embodiment are not intended to limit the scope of the claims which in themselves recite only those features regarded as essential to the invention. 
     Thus, a clock speed limiter has been described.