Disclosure of Invention
In order to overcome the difficulty of generating stable quadrature clocks in a high-speed interface circuit, the invention is realized by using a method of a high-speed delay phase-locked loop, and simultaneously provides an automatic frequency calibration method which is used for correctly selecting a delay frequency band of the high-speed delay phase-locked loop, selecting a proper frequency band suitable for the current application environment, and then performing loop locking through the closed-loop characteristic of the high-speed delay phase-locked loop so as to obtain stable quadrature clock output.
In order to achieve the above objective, in one aspect of the present invention, a high-speed delay phase locked loop is provided, which includes an automatic frequency calibration algorithm module, a delay cell chain, a four-frequency divider, a phase discriminator, a sampling circuit, a charge pump, a filter, a voltage regulator, and a bias voltage generating circuit; the automatic frequency calibration algorithm module is used for obtaining a sampling result output by the sampling circuit, wherein the sampling result comprises an input clock and a delay clock after frequency division by the four frequency dividers; and setting an output voltage of the voltage regulator and an output of the bias voltage generating circuit; a delay unit chain for generating an input clock and a delay clock according to an output voltage of the voltage regulator, a delay control voltage of the filter, and a high-speed clock; the four frequency divider is used for respectively dividing the input clock and the delay clock by two times, so that the speed reduction of the four frequency divisions is completed, and the speeds of the input clock and the delay clock are reduced to the speed which can be correctly processed by the phase discriminator; the phase discriminator is used for phase discriminating the input clock and the delay clock after the speed reduction and outputting corresponding phase error signals to the charge pump; and the charge pump is used for converting the phase error signal into a current signal, and the filter generates a delay control voltage according to the current signal.
Preferably, the delay unit chain adopts a multistage delay variable inverter to form a link, the delay time of the inverter is respectively regulated by the output voltage of the voltage regulator and the delay control voltage of the filter, the output voltage of the voltage regulator corresponds to coarse delay adjustment, and the delay control voltage of the filter corresponds to fine delay adjustment.
Preferably, the phase discriminator performs phase discrimination on the input clock and the delay clock after the speed reduction, judges whether the phase is advanced or retarded, and outputs a phase error signal to the charge pump.
Preferably, the charge pump converts the phase error signal output from the phase detector into an analog current amount, and outputs the analog current amount to a filter at a subsequent stage.
Preferably, the output of the voltage regulator is used as a power supply voltage of the delay cell chain, different power supply voltages correspond to delay frequency bands which are not communicated by the delay chain, and the delay frequency band suitable for the current input frequency is determined by selecting different power supply voltage values.
Preferably, the bias voltage generating circuit is configured to generate two high and low control voltages, VH and VL, during the automatic frequency calibration, and set the control voltages.
Preferably, the sampling circuit is used for mutually sampling the frequency-divided input clock and the delay clock so as to determine the sequence relationship of the two clocks, and outputting the sampling result to the automatic frequency calibration algorithm module for judgment so as to determine the selection of the frequency band.
In another aspect, an automatic frequency calibration method is provided, including the steps of: setting an output voltage of the voltage regulator and an output of the bias voltage generating circuit; acquiring sampling results of the input clock and the delay clock after the speed reduction; and selecting a delay frequency band required by the current input clock frequency according to the sampling result, and completing automatic frequency calibration.
The invention utilizes an automatic frequency calibration method to select the correct delay frequency band for the high-speed delay phase-locked loop, selects the proper frequency band suitable for the current application environment, and then performs loop locking through the closed-loop characteristic of the high-speed delay phase-locked loop so as to obtain stable quadrature clock output.
Detailed Description
The technical scheme of the invention is further described in detail through the drawings and the embodiments.
Fig. 1 is a block diagram of the overall structure of the high-speed delay phase-locked loop of the present invention.
As shown in fig. 1, the high-speed delay locked loop includes: the automatic frequency calibration algorithm module, a delay unit chain, a four-frequency divider, a phase discriminator, a sampling circuit, a charge pump, a filter, a voltage regulator and a bias voltage generating circuit.
The automatic frequency calibration algorithm module is used for obtaining a sampling result output by the sampling circuit, wherein the sampling result comprises an input clock and a delay clock after frequency division by the four frequency dividers, and an output voltage of the voltage regulator and an output of the bias voltage generating circuit are set; the delay unit chain generates an input clock and a delay clock according to the output voltage of the voltage regulator, the delay control voltage of the filter and the high-speed clock; the input clock and the delay clock of the four frequency divider are divided twice and twice respectively, so that the speed reduction of the four frequency dividers is completed, and the speeds of the input clock and the delay clock are reduced to the speed which can be correctly processed by the phase discriminator; the phase discriminator performs phase discrimination on the input clock and the delay clock after the speed reduction, and outputs a corresponding phase error signal to the charge pump; the charge pump converts the phase error signal into a current signal and the filter generates a delay control voltage based on the current signal.
And the delay unit chain is formed by adopting a multistage delay variable inverter, the delay time of the inverter can be respectively regulated by a power supply voltage Vldo and a control voltage Vctrl, the power supply voltage Vldo corresponds to coarse delay adjustment, and the control voltage Vctrl corresponds to fine delay adjustment.
The quadrature clocks are extracted from the delay cell chain, clk_i and clk_q, respectively.
The four-frequency divider divides the input clock CLK_IN and the delay clock CLK_OUT by two times respectively, thereby completing the speed reduction of the four-frequency division and reducing the speeds of the input clock and the delay clock to the speed which can be correctly processed by the phase discriminator.
The phase discriminator is used for phase discrimination of the input clock CLK_In4 and the delay clock CLK_OUT4 after the speed reduction, judging whether the phase is advanced or retarded, and outputting a phase error signal UP/DOWN to the charge pump.
The charge pump converts the phase error signal UP/DOWN output by the phase discriminator into an analog current amount ICh and outputs the analog current amount ICh to a filter at a later stage.
And the filter is used for integrating the current signal output by the charge pump to obtain a stable voltage value, wherein the voltage is used as a delay control voltage Vctrl of the delay unit chain to determine the delay amount of the delay unit chain, and after Vctrl is stable, the quadrature clock can be taken out from the delay unit chain.
And a voltage regulator that outputs a power supply voltage Vldo as a delay cell chain, wherein different Vldos correspond to delay frequency bands for which the delay link is not in communication, and wherein the delay frequency band suitable for the current input frequency is determined by selecting different values of the Vldo.
And the bias voltage generating circuit is used for generating two high and low control voltages, namely VH and VL, in the automatic frequency calibration process and setting the control voltage Vctrl.
The sampling circuit is used for mutually sampling the frequency-divided input clock CLK_In4 and the delay clock CLK_OUT4 so as to determine the sequence relationship of the two clocks, and outputting the sampling result to the automatic frequency calibration algorithm for judgment so as to determine the selection of the frequency band.
The automatic frequency calibration algorithm module is used for setting the output voltage Vldo of the voltage regulator and the output of the bias voltage generating circuit, acquiring sampling results of the input clock and the delay clock after the speed is reduced, and selecting a delay frequency band required by the current input clock frequency according to the sampling results to complete the function of automatic frequency calibration.
The whole delay phase-locked loop comprises two loops, wherein the first loop is a frequency band selection loop and comprises a delay unit chain, a four frequency divider, a sampling circuit, a voltage regulator, a bias voltage generating circuit and an automatic frequency calibration algorithm module. The second loop is an analog closed-loop fine-tuning loop and comprises a delay unit chain, a four-frequency divider, a phase discriminator, a charge pump, a filter and a voltage regulator. The two loops share part of the modules and work sequentially.
FIG. 2 is a schematic diagram of an automatic frequency calibration method according to the present invention.
As shown in fig. 2, the band selection loop works first, executing on command of the automatic frequency calibration method. The frequency band with the highest frequency is selected first, that is, the output voltage of the voltage regulator is adjusted to the highest, and the delay unit chain corresponds to the shortest delay time. The high-speed clock CLK is processed by a delay unit chain to obtain an input clock CLK_IN and a delay clock CLK_OUT, and because the frequencies of the CLK_IN and the CLK_OUT are equal to the highest clock frequency, the phase discriminator is difficult to achieve the phase discrimination speed equivalent to the highest clock frequency, and therefore, the CLK_IN and the CLK_OUT are subjected to the same four-frequency division processing, so that the two clocks are subjected to the same four-frequency division channel to obtain four-frequency division clocks of the two clocks, namely CLK_In4 and CLK_OUT4. The bias voltage generating circuit is set to be high and low control voltages of VH and VL in sequence, and clock sampling values obtained when the control voltage Vctrl is equal to the high and low control voltages are recorded. The first cycle selects the highest frequency band and the resulting timing is shown in fig. 3. CLK_OUTH and CLK_OUTL correspond to CLK_OUTl output clocks under the condition that Vctrl is equal to VH and VL respectively, CLK_OU4H and CLK_OUTl correspond to CLK_OUTl output clocks after four frequency division respectively, and as the frequency band is the highest frequency sub-band, the rising edge sampling result of CLK_OUT4H and CLK_OUT4L to CLK_IN4 is 0, and the sampling value corresponding to the frequency band is 00. Then, the frequency band number is reduced by 1, and the bias voltage generating circuit is again provided, so that the sampling result of the clock divided by four by clk_in and clk_out is obtained and stored IN the same manner. The traversal of all the frequency bands is completed according to the operation until the frequency band number is reduced to 0, and the circulation is stopped.
During the whole traversal process, the sampling results appear in the sequence of 00, 01 and 11, which correspond to the three cases of fig. 3, fig. 4 and fig. 5 respectively. The sampling results 00 and 11 indicate that the phase of the delay clock clk_out will lead or lag the input clock clk_in regardless of the control voltage IN the current frequency band, which indicates that the analog closed loop cannot be locked within the target delay range, and the control voltage Vctrl will exceed the voltage range defined by the highest voltage VH and the lowest voltage VL. Therefore, the frequency band with the sampling result of 01 is the target sub-band, IN which the control voltage does not exceed the preset range, and the delay of clk_out by exactly one period relative to clk_in after the analog closed-loop locking can be ensured.
After the band selection loop is completed, the output voltage Vldo of the voltage regulator is determined, at which point it can be switched to analog closed-loop fine-tuning loop operation, which relies solely on the closed-loop stability characteristics of the analog circuit to lock the control voltage Vctrl. The phase discriminator compares the phase error of the four frequency division clocks CLK_In4 and CLK_OUT4 to obtain leading and lagging digital signals UP/DOWN, controls the charge pump to convert the digital signals into analog current, obtains a stable control voltage through the integral characteristic of the filter to delay the delay unit chain, and completes the whole generation process of the quadrature clock.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.