Patent ID: 7514974

Claim:
An apparatus comprising: an integrated circuit chip comprising a ring oscillator having a clock output; a clock source, which provides a reference clock; a voltage regulator, which is external to the integrated circuit chip and provides the chip with a supply voltage having a level based on a control signal; and a comparator circuit, which supplies the control signal to the voltage regulator based on a comparison between a frequency of the clock output and a frequency of the reference clock, the comparator circuit comprising: a first counter, which generates a first count as a function of the clock output frequency; a second counter, which generates a second count as a function of the reference clock frequency; and a control circuit, which generates the control signal based on the first and second counts, and wherein at least one of the first or second counters is coupled to stop the other of the first or second counters from counting upon the respective first or second count reaching a predetermined count.