Abstract
An all-digital phase-locked loop (ADPLL) and a calibration method thereof are provided. The ADPLL includes a digitally controlled oscillator (DCO), a time-to-digital converter (TDC) coupled to the DCO, and a normalization circuit coupled to the TDC. The DCO is configured to generate a clock signal according to a frequency control signal. The TDC is configured to generate a digital output signal according to a phase error between the clock signal and a reference signal. The normalization circuit is configured to convert the digital output signal into a clock phase value according to a gain parameter. More particularly, the normalization circuit may modify the gain parameter according to a phase error value between the clock phase value and a reference phase value.
Claims
1. An all-digital phase-locked loop (ADPLL), comprising: a digitally controlled oscillator (DCO), configured to generate a clock signal according to a frequency control signal; a time-to-digital converter (TDC), coupled to the DCO, configured to generate a digital output signal according to a phase error between the clock signal and a reference signal; and a normalization circuit, coupled to the TDC, configured to convert the digital output signal into a clock phase value according to a gain parameter; wherein the normalization circuit modifies the gain parameter according to a phase error value between the clock phase value and a reference phase value.
2. The ADPLL of claim 1, wherein the normalization circuit multiplies the digital output signal by the gain parameter to generate the clock phase value.
3. The ADPLL of claim 1, wherein when the phase error value is positive, the normalization circuit increases the gain parameter; and when the phase error value is negative, the normalization circuit decreases the gain parameter.
4. The ADPLL of claim 1, wherein the normalization circuit modifies the gain parameter according to the phase error value and the digital output signal.
5. The ADPLL of claim 4, wherein the normalization circuit modifies the gain parameter according to a product of the phase error value and the digital output signal.
6. The ADPLL of claim 5, wherein the normalization circuit comprises a least mean square (LMS) circuit, configured to generate a next gain parameter for a next cycle according to a product of the phase error value and the digital output signal and a current gain parameter utilized in a current cycle.
7. A calibration method of an all-digital phase-locked loop (ADPLL), comprising: utilizing a digitally controlled oscillator (DCO) of the ADPLL to generate a clock signal according to a frequency control signal; utilizing a time-to-digital converter (TDC) of the ADPLL to generate a digital output signal according to a phase error between the clock signal and a reference signal; utilizing a normalization circuit of the ADPLL to convert the digital output signal into a clock phase value according to a gain parameter; and utilizing the normalization circuit to modify the gain parameter according to a phase error value between the clock phase value and a reference phase value.
8. The calibration method of claim 7, wherein the step of utilizing the normalization circuit of the ADPLL to convert the digital output signal into the clock phase value according to the gain parameter comprises: utilizing the normalization circuit to multiply the digital output signal by the gain parameter to generate the clock phase value.
9. The calibration method of claim 7, wherein the step of utilizing the normalization circuit to modify the gain parameter according to the phase error value between the clock phase value and the reference phase value comprises: when the phase error value is positive, utilizing the normalization circuit to increase the gain parameter.
10. The calibration method of claim 7, wherein the step of utilizing the normalization circuit to modify the gain parameter according to the phase error value between the clock phase value and the reference phase value comprises: when the phase error value is negative, utilizing the normalization circuit to decrease the gain parameter.
11. The calibration method of claim 7, wherein the step of utilizing the normalization circuit to modify the gain parameter according to the phase error value between the clock phase value and the reference phase value comprises: utilizing the normalization circuit to modify the gain parameter according to the phase error value and the digital output signal.
12. The calibration method of claim 11, wherein the step of utilizing the normalization circuit to modify the gain parameter according to the phase error value and the digital output signal comprises: utilizing the normalization circuit to modify the gain parameter according to a product of the phase error value and the digital output signal.
13. The calibration method of claim 12, wherein the step of utilizing the normalization circuit to modify the gain parameter according to the product of the phase error value and the digital output signal comprises: according to the product of the phase error value and the digital output signal, and a current gain parameter utilized in a current cycle, utilizing a least mean square (LMS) circuit of the normalization circuit to generate a next gain parameter for a next cycle.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0009] FIG. 1 is a diagram illustrating resolution of a time-to-digital converter (TDC) according to an embodiment of the present invention.
[0010] FIG. 2 illustrates a circuit architecture of a TDC according to an embodiment of the present invention.
[0011] FIG. 3 illustrates some signals which are involved in the circuit architecture shown in FIG. 2.
[0012] FIG. 4 is a diagram illustrating a normalization operation of a TDC according to an embodiment of the present invention.
[0013] FIG. 5 is a diagram illustrating an all-digital phase-locked loop (ADPLL) according to an embodiment of the present invention.
[0014] FIG. 6 illustrates some signals at a locked state under an ideal condition according to an embodiment of the present invention.
[0015] FIG. 7 illustrates some signals at a locked state when a TDC gain has −20% error according to an embodiment of the present invention.
[0016] FIG. 8 illustrates some signals at a locked state when a TDC gain has +20% error according to an embodiment of the present invention.
[0017] FIG. 9 is an example of a least mean square (LMS) circuit shown in FIG. 5 according to an embodiment of the present invention.
[0018] FIG. 10 is a diagram illustrating a working flow of a calibration method of an ADPLL according to an embodiment of the present invention.
DETAILED DESCRIPTION
[0019] In operations of an all-digital phase-locked loop (ADPLL), assume that a cycle period of a clock signal CKV output by a digitally controlled oscillator (DCO) is T.sub.V, and a time-to-digital converter (TDC) generates a digital output signal N.sub.r according to a phase error between the clock signal and a reference signal FREF (e.g., a time difference Δt.sub.r between a rising edge of the clock signal CKV and a rising edge of the reference signal FREF). The ADPLL needs to perform normalization on the digital output signal N.sub.r to convert the digital output signal N.sub.r into a value Ø.sub.DCO within a range from 0 to 1 (e.g., a value representing the phase error between the clock signal CKV and the reference signal FREF as Ø.sub.DCO times the cycle period T.sub.V) for subsequent operations. The result of the above normalization may be affected by resolution Δt.sub.res of the TDC (e.g., a time difference corresponding to a least significant bit (LSB) of the digital output signal of the TDC, or a unit delay of the TDC), where Ø.sub.DCO=N.sub.r×Δt.sub.res/T.sub.v, and the resolution Δt.sub.res of the TDC may vary due to process-voltage-temperature (PVT) variation of semiconductors. Thus, the operation of the normalization mentioned above needs to be calibrated in response to the varying resolution.
[0020] FIG. 1 is a diagram illustrating the resolution Δt.sub.res of a TDC according to an embodiment
[0021] of the present invention. As shown in FIG. 1, the TDC may detect a time difference Δt.sub.r between a rising edge of the clock signal CKV and a rising edge of the reference signal FREF, and may further detect a time difference Δt.sub.f between a falling edge of the clock signal CKV and the rising edge of the reference signal FREF. As shown in FIG. 1, a difference value between Δt.sub.r and Δt.sub.f is a half cycle period T.sub.V/2 of the clock signal CKV, and the TDC (or subsequent processing circuit thereof) may utilize respective digital output signals which are respectively output according to Δt.sub.r and Δt.sub.f to roughly calculate the resolution Δt.sub.res the TDC.
[0022] FIG. 2 illustrates a circuit architecture of a TDC 20 according to an embodiment of the present invention, and FIG. 3 illustrates some signals which are involved in the circuit architecture shown in FIG. 2. It should be noted that the circuit architecture shown in FIG. 2 is an example of the TDC 20 only, and is not meant to be a limitation of the present invention. As shown in FIG. 2, the TDC 20 may comprise multiple inverters connected in series to form an inverter chain. As each inverter of these inverters may cause a delay of a signal, respective output signals D<0>, D<1>, D<2>, . . . , D<L-1> and D<L> of these inverters may have corresponding delay periods relative to the clock signal CKV which is input to a first inverter of these inverters, as illustrated by D<0>, D<1>, D<2>, D<3>, D<4>, D<5>, D<6> and D<7> shown in FIG. 3, where a delay amount introduced by one inverter may be the resolution Δt.sub.res of the TDC 20. In this embodiment, each of the output signals D<0>, D<1>, D<2>, . . . , D<L-1> and D<L> may be input to an input terminal (which is labeled “D”) of a flip-flop, and may be output from an output terminal (labeled “Q”) of the flip-flop when the flip-flop is triggered by the rising edge of the reference signal FREF, as illustrated by Q<0:L> shown in FIG. 3. In this embodiment, a portion of the output signals Q<0:L>which are changed from 0 to 1 (e.g., Q<1> is 0 and Q<2> is 1) may represent the falling edge of the clock signal CKV, and a portion of the output signals Q<0:L> which are changed from 1 to 0 (e.g., Q<5> is 1 and Q<6> is 0) may represent the rising edge of the clock signal CKV. The TDC 20 may utilize a pseudo-thermometer-code edge detector 22 (e.g., a detector configured to detect a change from 0 to 1 and a change from 1 to 0 in a digital sequence) therein to detect the output signals Q<0:L> and accordingly output digital output signals N.sub.r and N.sub.f in a binary format, for respectively representing the time difference Δt.sub.r between the rising edge of the clock signal CKV and the rising edge of the reference signal FREF and the time difference Δt.sub.f between the falling edge of the clock signal CKV and the rising edge of the reference signal FREF (e.g., Δt.sub.r≈N.sub.r×Δt.sub.res and Δt.sub.f≈N.sub.f×Δt.sub.res). In an example, N.sub.r=6 and N.sub.f=2. It should be noted that the circuit architecture of TDC 20 shown in FIG. 2 is for illustrative purposes only, and is not meant to be a limitation of the present invention. For example, a bit count of each of the output signals of the TDC may vary according to requirements of the system, and L may be any positive integer.
[0023] FIG. 4 is a diagram illustrating a normalization operation of the TDC 20 according to an embodiment of the present invention. As shown in FIG. 4, the TDC 20 may transmit the digital output signal N.sub.r and N.sub.f obtained from the above operations to a normalization circuit 30. Initially, the normalization circuit 30 may utilize a first calculating unit 31 (which is labeled “Period average” for better comprehension) to perform the calculation mentioned in the embodiment of FIG. 1 to obtain an average T.sub.V of a cycle period of the clock signal CKV and the resolution Δt.sub.res of the TDC 20, and then utilize a second calculating unit 32 (which is labeled
[00001]
for better comprehension) to output the reciprocal of T.sub.V/Δt.sub.res in a binary form (e.g., a signal PERINV). The normalization circuit 30 further utilizes a multiplier 33 to multiply the digital output signal N.sub.r by the signal PERINV to generate a W.sub.F-bit multiplied result (e.g., W.sub.F=15), and then finally transforms the multiplied result into an unsigned 2's complement form via a third calculating unit 34 (which is labeled “2{circumflex over ( )}W.sub.F-(x)”) to output a signal ε, where the W.sub.F-bit binary signal ε may be illustrated in a manner of discrete data (e.g., a k.sup.th set of data) as follows:
[00002]
[0024] It should be noted that when a duty cycle of the clock signal CKV is not 50%, the aforementioned operations of obtaining the average T.sub.V of the cycle period of the clock signal CKV and the resolution Δt.sub.res of the TDC 20 may need to be implemented by a more complex hardware.
[0025] In addition, the estimation method mentioned above is limited by the resolution Δt.sub.res of the TDC 20, and estimation errors may exist, which degrades the performance of the ADPLL (e.g., output spur becomes too big).
[0026] For brevity, the following description takes values in a decimal form. FIG. 5 is a diagram illustrating an ADPLL 50 according to an embodiment of the present invention, where the ADPLL 50 may comprise a TDC 500, a digitally controlled oscillator (DCO) 510 (which is illustrated by a circle with a sine wave therein for better comprehension), a normalization circuit 520, an accumulator 530 (which is labeled “Σ” for better comprehension), a low pass filter 540 (which is illustrated by a box with a low pass response waveform therein for better comprehension) and an adder 550 (which is illustrated by a circle with “+” therein for better comprehension). In this embodiment, a parameter FCW_F may be set as a ratio value between a target frequency of the clock signal CKV and a frequency of the reference frequency FREF, and the accumulator 530 may continuously accumulate the parameter FCW_F to output an accumulated result as a reference phase. The TDC 500 may be coupled to the DCO 510, and may be configured to generate a digital output signal N.sub.r[k] (e.g.) according to a phase error between the clock signal CKV and the reference signal FREF. The normalization circuit 520 may be coupled to the TDC 500, and may be configured to convert the digital output signal N.sub.r[k] into a clock phase value Ø.sub.DCO[k] (e.g., a value of Ø.sub.DCO at the k.sup.th cycle of the reference signal FREF) according to a gain parameter K.sub.TDC, where the clock phase value Ø.sub.DCO[k] may be regarded as a result of performing normalization on the digital output signal N.sub.r[k]. The adder 550 may perform subtraction on the reference phase mentioned above with a real-time phase (e.g., an accumulated result of a real-time ratio value between a real-time frequency of the clock signal CKV and the frequency of the reference signal FREF) to obtain a phase error value Ø.sub.E[k] (e.g., a value of Ø.sub.E at the k.sup.th cycle of the reference signal FREF), and the low pass filter 540 may generate a frequency control signal according to the phase error value Ø.sub.E[k], in order to control the DCO 510 to generate the clock signal CKV according to the frequency control signal, and thereby makes the real-time frequency of the clock signal CLK gradually approach the target frequency.
[0027] It should be noted that the digital output signal N.sub.r[k] generated by the TDC 500 and the clock phase value Ø.sub.DCO[k] after the normalization are merely configured to represent a fractional portion of the real-time phase, and an integer portion of the real-time phase may be calculated by a counter. As operations of utilizing the counter to generate the integer portion of the real-time phase are well-known by those skilled in this art, and do not affect implementation of calibration of the TDC 500 and the normalization circuit 520, the counter is not shown in FIG. 5 for brevity, and related details are omitted here for brevity. Similarly, a reference phase value Ø.sub.R[k] (e.g., a value of Ø.sub.R at the k.sup.th cycle of the reference signal FREF) output by the accumulator 530 shown in FIG. 5 merely represents a fractional portion of the reference phase mentioned above for brevity.
[0028] In the embodiment of FIG. 5, the normalization circuit 520 may comprise a multiplier 521, configured to multiply the digital output signal N.sub.r[k] by the gain parameter K.sub.TDC to generate the clock phase value Ø.sub.DCO[k], and a correct value of the gain parameter K.sub.TDC may be obtained by the following equation:
[00003]
where t.sub.res may represent resolution of the TDC 500 (e.g., Δt.sub.res mentioned above), and T.sub.DCO may represent a cycle period of the clock signal CKV output from the DCO 510 (e.g., T.sub.V or T.sub.V mentioned above). As the resolution t.sub.res the TDC 500 is quite sensitive to the PVT variation (e.g., t.sub.res is 13 picoseconds (ps) when the temperature is 25° C., and t.sub.res is 10 ps when the temperature is 80° C.), the gain parameter K.sub.TDC may have gain error under different temperatures, and the gain error of the gain parameter may result in occurrence of unwanted frequency components such as fractional spur.
[0029] Assuming that the frequency of the reference signal FREF is 40 MHz, the ratio value FCW between the target frequency of the clock signal CKV and the frequency of the reference signal FREF is 125.25, the expected resolution t.sub.res is 10 ps, and the target frequency such as f.sub.DCO of the clock signal CKV, then the gain parameter is about 0.05.
[0030] FIG. 6 to FIG. 8 illustrate values of the clock phase Ø.sub.DCO, the reference phase Ø.sub.R, and the phase error Ø.sub.E, based on the frequencies of the clock signal CKV and the reference signal FREF under different conditions. As shown in FIG. 6, in respective cycles of the reference signal FREF, the digital output signal N.sub.r is sequentially 5, 10, 15 and 0, and the reference phase Ø.sub.R is sequentially 0.25, 0.5, 0.75 and 0. Under a condition where the gain parameter K.sub.TDC has no gain error (e.g., both a gain parameter corresponding to actual resolution t.sub.res (i.e., t.sub.res/T.sub.DCO) and the value of the gain parameter K.sub.TDC which is set in advance are 0.05), the clock phase Ø.sub.DCO is sequentially 0.25, 0.5, 0.75 and 0, and therefore the phase error Ø.sub.E is kept at 0. When the gain parameter K.sub.TDC set in advance has −20% error (e.g., 0.04), the clock phase Ø.sub.DCO is sequentially 0.2, 0.4, 0.6 and 0, which makes the phase error Ø.sub.E still have a positive phase error (e.g., 0.05, 0.1, 0.15 and 0) at a locked state as shown in FIG. 7. When the gain parameter K.sub.TDC set in advance has +20% error (e.g., 0.06), the clock phase Ø.sub.DCO is sequentially 0.3, 0.6, 0.9 and 0, which makes the phase error Ø.sub.E still have a negative phase error (e.g., −0.05, −0.1, −0.15 and 0) at a locked state as shown in FIG. 8.
[0031] According to the above example, it can be observed that the gain parameter K.sub.TDC has correlation with the digital output signal N.sub.r[k] and the phase error Ø.sub.E[k]. For example, a higher value of N.sub.r[k] may result in a high value of the phase error Ø.sub.E[k]. In another example, a positive gain error of the gain parameter K.sub.TDC may result in a negative phase error Ø.sub.E[k], and a negative gain error of the gain parameter K.sub.TDC may result in a positive phase error Ø.sub.E[k].
[0032] Thus, embodiments of the present invention provide a calibration method and an associated architecture which utilize the digital output signal N.sub.r[k] and/or the phase error Ø.sub.E[k] for calibrating the gain parameter K.sub.TDC.
[0033] As shown in FIG. 5, in addition to the multiplier 521, the normalization circuit 520 may further comprise a multiplier 522 and a least mean square (LMS) circuit 523 (which is labeled “LMS” for brevity), where the LMS circuit 523 is coupled between the multipliers 521 and 522. In this embodiment, the normalization circuit 520 may modify the gain parameter K.sub.TDC according to the phase error value Ø.sub.E[k] between the clock phase value Ø.sub.DCO[k] and the reference phase value Ø.sub.R[k]. In particular, when the phase error value Ø.sub.E[k] is positive (as shown in FIG. 7), it means the gain parameter K.sub.TDC has a negative error (e.g. the gain parameter is less than t.sub.res/T.sub.DCO), and the normalization circuit 520 may increase the gain parameter K.sub.TDC; and when the phase error value Ø.sub.E[k] is negative (as shown in FIG. 8), it means the gain parameter K.sub.TDC has a positive error (e.g. the gain parameter is greater than t.sub.res/T.sub.DCO)), and the normalization circuit 520 may decrease the gain parameter K.sub.TDC.
[0034] In this embodiment, the normalization circuit 520 may modify the gain parameter K.sub.TDC according to the phase error value Ø.sub.E[k] and the digital output signal N.sub.r. For example, the normalization circuit 520 may modify the gain parameter K.sub.TDC according to a product Ø.sub.E[k]×N.sub.r of the phase error value Ø.sub.E[k] and the digital output signal N.sub.r. As shown in FIG. 5, the normalization circuit 520 may utilize the multiplier 522 to calculate the product Ø.sub.E[k]×N.sub.r of the phase error value Ø.sub.E[k] and the digital output signal N.sub.r, in order to make the LMS circuit 523 modify the gain parameter K.sub.TDC according to a calculation result of Ø.sub.E[k]×N.sub.r.
[0035] FIG. 9 is an example of the LMS circuit 523 shown in FIG. 5 according to an embodiment of the present invention. As shown in FIG. 9, the LMS circuit 523 may comprise a multiplier 524 and an accumulator 525 (which is labeled “Σ” for better comprehension). In this embodiment, the LMS circuit 523 may be configured to generate a next gain parameter K.sub.TDC[k] for a next cycle (e.g., the k.sup.th cycle of the reference signal FREF) according to the product Ø.sub.E[k]×N.sub.r of the phase error Ø.sub.E[k] value and the digital output signal N.sub.r and a current gain parameter K.sub.TDC[k−1] utilized in a current cycle (e.g., a (k−1)th cycle of the reference signal FREF). For example, the multiplier 522 may multiply a 19-bit phase error value Ø.sub.E[k] by a 6-bit digital output signal N.sub.r[k] to generate a 25-bit product Ø.sub.E[k]×N.sub.r. The multiplier 524 may further multiply the product Ø.sub.E[k]×N.sub.r by a predetermined value μ, and the accumulator 525 may accumulate a multiplied result to the gain parameter K.sub.TDC[k−1] to obtain a 16-bit gain parameter K.sub.TDC[k], where the predetermined value μ may be any suitable constant value, and related calculation may be expressed in discrete data as follows:
K.sub.TDC[k]=K.sub.TDC[k−1]+μ.Math.{N.sub.r[k].Math.Ø.sub.E[k]}
[0036] It should be noted that the equation mentioned above and the architecture shown in FIG. 9 are merely an example of the LMS circuit 523 calibrating the gain parameter K.sub.TDC, and is not meant to be a limitation of the present invention. As long as the gain parameter K.sub.TDC may be gradually modified or converge to t.sub.res/T.sub.DCO according to the phase error value Ø.sub.E[k] and/or the digital output signal N.sub.r[k], alternative designs should belong to the scope of the present invention.
[0037] FIG. 10 is a diagram illustrating a working flow of a calibration method of an ADPLL according to an embodiment of the present invention, where the calibration method is applicable to the ADPLL 50 shown in FIG. 5. It should be noted that, as long as an overall result is not hindered, one or more steps may be added, deleted or modified in the working flow shown in FIG. 10, and these steps do not have to be executed in the exact order shown in FIG. 10.
[0038] In Step 1010, the ADPLL 50 utilizes the DCO 510 to generate the clock signal CKV according to a frequency control signal.
[0039] In Step 1020, the ADPLL 50 utilizes the TDC 500 to generate the digital output signal N.sub.r[k] according to a phase error between the clock signal CKV and the reference signal FREF.
[0040] In Step 1030, the ADPLL 50 utilizes the normalization circuit 520 to convert the digital output signal N.sub.r[k] into the clock phase value Ø.sub.DCO[k] according to the gain parameter K.sub.TDC.
[0041] In Step 1040, the ADPLL 50 utilizes the normalization circuit 520 to modify the gain parameter K.sub.TDC according to the phase error value Ø.sub.E[k] between the clock phase value Ø.sub.DCO[k] and the reference phase value Ø.sub.R[k].
[0042] To summarize, the embodiments of the present invention provide an ADPLL and a calibration method thereof, which can determine a direction or tendency of an error of the gain parameter K.sub.TDC according to the phase error value Ø.sub.E[k] and the signal N.sub.r output from a TDC, and establish a feedback calibration mechanism to make the gain parameter K.sub.TDC gradually converge to a correct value. In addition, the calibration mechanism of the present invention is not limited to resolution of the TDC, and more particularly, the accuracy and the precision of the calibration may be determined according to the design of the number of bits of calculating units (e.g., the multiplier 521 and 522, and the LMS circuit 523) within the normalization circuit 520. Thus, the present invention can make parameters related to the TDC (e.g., the gain parameter K.sub.TDC of the TDC) converge to a correct or optimized value.
[0043] Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.