A method and apparatus are provided for calibrating digital thermal
sensors. A processor chip with a plurality of digital thermal sensors
receives an analog voltage. A test circuit coupled to the processor chip
receives a clock signal and a register coupled to the test circuit
outputs a value on each clock cycle to a digital thermal sensor in the
plurality of digital thermal sensors. The digital thermal sensor
transitions an output state in response to the value of the register
received in the digital thermal sensor equaling a temperature threshold
of the digital thermal sensor. The value of the register at the point of
transition is used to calibrate the digital thermal sensor. An
incrementer increments the value of the register on each clock cycle in
response to the value of the register received in the digital thermal
sensor failing to equal the temperature threshold of the digital thermal
sensor.