Patent ID: 7388419

Claim:
A compensation circuit for compensating for process, voltage and temperature (PVT) variations in an integrated circuit, the integrated circuit including a plurality of functional modules, each functional module including a set of functional units, and generating an output signal in response to an input signal, the compensation circuit comprising: a code generator for generating a digital code for each functional unit from amongst the set of functional units, wherein the digital codes are based on phase differences between the input signals and the output signals; and a code comparator for comparing the digital code with a reference code to generate at least one control signal; and a shift register coupled to the code comparator for generating a calibration code based on the at least one control signal, wherein the calibration code compensates for the PVT variations in the corresponding functional units, wherein generating the calibration code comprises shifting the digital code left to generate the calibration code when the digital code is less than the reference code, and shifting the digital code right to generate the calibration code when the digital code is greater than the reference code.