Quick-locking all-digital phase-locked loop

By adopting a step-by-step adjustment method of frequency and phase in a fully digital phase-locked loop, the problems of frequency oscillation and long locking time during the locking process in the existing technology are solved, and fast and stable frequency and phase synchronization are achieved.

CN118713663APending Publication Date: 2024-09-27SHENZHEN SHUMA ELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410939286.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Existing all-digital phase-locked loops are prone to large-scale oscillations in output signal frequency during the locking process, and the loop locking time is long, making it impossible to effectively synchronize the frequency and phase of the target clock signal and the reference clock signal.

Method used

A fast-locking all-digital phase-locked loop is designed. Through the combination of digital control module, numerically controlled oscillation module, filter control module and phase comparison module, the frequency and phase are adjusted step by step. The target clock signal is first adjusted through frequency adjustment. The frequency is close to the frequency of the reference clock signal, and then the phase synchronization of the target clock signal is ensured through phase adjustment to avoid large frequency oscillation and shorten the locking time.

Benefits of technology

A fast-locking all-digital phase-locked loop is realized, which avoids large frequency oscillations of the output signal, shortens the loop locking time, and ensures the frequency and phase synchronization of the target clock signal and the reference clock signal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118713663A
    Figure CN118713663A
Patent Text Reader

Abstract

The invention provides a quick-locking all-digital phase-locked loop, which is characterized in that a frequency control word is corrected through a digital control module to enable the frequency of a target clock signal to be close to the frequency of a reference clock signal, then a filtering control module is used for adjusting the target frequency control word according to an adjusting step length, and then the phase-locked loop is locked on the basis of a phase difference signal. On one hand, the target frequency control word is corrected, and on the other hand, the adjustment step length is adjusted, so that large-amplitude oscillation of an output signal can be avoided through a step-by-step adjustment mode of firstly roughly adjusting the frequency and then simultaneously adjusting the frequency and the phase, the loop convergence speed is improved, the loop locking time is shortened, and the loop locking efficiency is improved. Frequency adjustment and step-length-adjustable phase adjustment are adopted at the same time subsequently, it can be guaranteed that the frequency of the target clock signal does not deviate too much relative to the frequency of the reference clock signal, it can be guaranteed that the step length of the frequency is adjustable, large-amplitude oscillation of the frequency is further avoided, and the overall locking time of the loop is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of frequency control, and in particular to a stable and fast-locking all-digital phase-locked loop. Background Art

[0002] The Phase Locked Loop (PLL) can generate signals of various specific frequencies by modulating and demodulating the input clock signal. It is an important component of modern communication systems and circuits. The performance of PLL largely affects the performance quality of the entire system.

[0003] At present, the implementation of PLL is mainly divided into analog PLL scheme based on charge pump and digital PLL scheme based on digital logic unit. Among them, the most common analog PLL scheme is charge-pump PLL (CPPLL). The phase noise of the clock signal output by CPPLL is small, but it is easily interfered by power supply noise. In addition, the implementation based on analog process makes the process transplantation poor. With the reduction of CMOS feature size, the circuit leakage problem is further aggravated, and the design of high-performance charge pump and voltage-controlled oscillator in it will become more difficult. In addition, the low-pass filter in CPPLL is usually implemented based on RC (resistance-capacitance). These passive devices occupy a large area, which greatly increases the circuit cost. The all-digital phase-locked loop (ADPLL) design scheme based on BBPFD in the digital PLL scheme overcomes the above shortcomings. It is insensitive to the noise of power supply voltage and is less affected by power supply noise. The implementation based on digital process makes the process transplantation high, the basic circuit structure is simple and easy to design. In addition, since it does not involve passive devices such as RC, the circuit occupies a smaller area in comparison.

[0004] However, since this scheme does not make phase adjustments based on the specific phase difference between the target clock signal and the reference clock signal, but only makes phase adjustments based on the leading or lagging relationship between the target clock signal and the reference clock signal, it is easy to cause large oscillations in the output signal frequency and a long loop locking time. Summary of the invention

[0005] The present application provides a fast-locking all-digital phase-locked loop that can avoid large-amplitude oscillations.

[0006] A fast-locking all-digital phase-locked loop, comprising:

[0007] A digital control module, used for outputting a frequency control signal;

[0008] A digital control oscillation module, connected to the digital control module, and configured to output a target clock signal according to the frequency control signal;

[0009] The digital control module is further used to receive the target clock signal, compare the frequency of the target clock signal with the frequency of the reference clock signal, and correct the frequency control signal according to the frequency comparison result to correct the frequency of the target clock signal output by the digital control oscillation module until the frequency of the target clock signal approaches the frequency of the reference clock signal, thereby obtaining a target frequency control signal;

[0010] a filtering control module connected to the digital control module, and configured to adjust the target frequency control signal according to an adjustment step so that the frequency of the target clock signal changes according to a frequency step corresponding to the adjustment step;

[0011] a phase comparison module, connected to the digital control module, the filter control module and the digital control oscillation module respectively, and used to compare the phase of the target clock signal after the frequency change with the phase of the reference clock signal to obtain a phase difference signal;

[0012] Based on the phase difference signal, the digital control module is also used to correct the target frequency control signal adjusted by the filtering control module, and the filtering control module is also used to adjust the adjustment step to adjust the frequency step until the target clock signal is synchronized with the reference clock signal.

[0013] In one embodiment, the target frequency control signal carries a target frequency control word; the digital control module corrects the target frequency control signal to correct the target frequency control word; the filtering control module adjusts the target frequency control signal to adjust the target frequency control word; if the phase difference signal indicates that the phase relationship between the target clock signal and the reference clock signal has changed, the digital control module is also used to correct the target frequency control word after adjustment by the filtering control module to the target frequency control word before adjustment by the filtering control module; the filtering control module is also used to reduce the adjustment step.

[0014] In one embodiment, the digital control module is also used to obtain the reduced adjustment step size. If the reduced adjustment step size reaches the first step size threshold, and the frequency of the target clock signal changes according to the frequency step size corresponding to the reduced adjustment step size, the phase difference signal represents that the phase relationship between the target clock signal and the reference clock signal changes, then the target frequency control word is corrected to the average of the target frequency control word at the last correction moment and the target frequency control word at the current moment.

[0015] In one embodiment, the digital control module is further used for:

[0016] If the reduced adjustment step reaches a second step threshold, the target frequency control word is stopped from being corrected, and the filter control module is controlled to stop reducing the adjustment step; wherein the second step threshold is smaller than the first step threshold.

[0017] In one of the embodiments, the digital control module is further used to: obtain the target frequency control word within a first preset time length, and if the fluctuation range of the target frequency control word is within a preset range, output a lock prompt message.

[0018] In one of the embodiments, the digital control module is further configured to receive the target clock signal, and if the frequency of the target clock signal exceeds a frequency threshold, control the fully digital phase-locked loop to perform a system reset.

[0019] In one embodiment, the target frequency control word includes an integer control word and a decimal control word, and the filtering control module includes:

[0020] A filter, connected to the phase comparison module and the digital control module respectively, for obtaining the fractional control word, and adjusting the fractional control word according to the adjustment step to obtain an adjusted control word;

[0021] a Σ-Δ modulator, connected to the filter and the digital control module respectively, for modulating the adjustment control word to obtain a modulated control word, wherein an element average of the modulated control word is equal to a value of the adjustment control word;

[0022] The digital control module is also used to obtain the modulation control word, calculate the sum of the value of each element in the modulation control word and the value of the integer control word, obtain the target control word, and use the target control word as the new integer control word.

[0023] In one of the embodiments, the filter is further configured to adjust the value of the integer control word by overflow if overflow occurs when adjusting the fractional control word.

[0024] In one of the embodiments, the filter is further used to adjust an integral coefficient to adjust the adjustment step size.

[0025] In one of the embodiments, the digital control module is also used to count the cycles of the target clock signal within a second preset time length, and compare the number of cycles obtained by counting with the number of reference cycles to obtain the frequency comparison result; the number of reference cycles is equal to the product of the second preset time length and the frequency of the reference clock signal.

[0026] In one of the embodiments, the digital control module is further used to obtain a current frequency control word carried by the frequency control signal at the current moment if the frequency of the target clock signal is different from the frequency of the reference clock signal;

[0027] If the frequency of the target clock signal is greater than the frequency of the reference clock signal, the upper boundary value of the current frequency control word is corrected to the value of the current frequency control word, and the value of the current frequency control word is corrected to an intermediate value between the corrected upper boundary value and the lower boundary value of the current frequency control word;

[0028] If the frequency of the target clock signal is less than the frequency of the reference clock signal, the lower boundary value is corrected to the value of the current frequency control word, and the value of the current frequency control word is corrected to an intermediate value between the corrected lower boundary value and the upper boundary value;

[0029] The frequency of the modified target clock signal is detected until the frequency of the modified target clock signal is the same as the frequency of the reference clock signal, or the current frequency control word is close to the upper boundary value or the lower boundary value of the current frequency control word, to obtain the target frequency control word.

[0030] In one embodiment, the current frequency control word includes a current coarse adjustment control word, a current fine adjustment control word and a current decimal control word; the digital control module corrects the current frequency control word by sequentially correcting the current coarse adjustment control word, the current fine adjustment control word and the current decimal control word until the frequency of the corrected target clock signal is the same as the frequency of the reference clock signal, or the current decimal control word is close to the upper boundary value or the lower boundary value of the current decimal control word, thereby obtaining the target frequency control word.

[0031] In one embodiment, the all-digital phase-locked loop further includes:

[0032] The frequency division module is connected to the phase comparison module and the digital control oscillation module respectively, and is used for dividing the frequency of the target clock signal and then transmitting it to the phase comparison module.

[0033] In one embodiment, the phase comparison module includes:

[0034] a digital phase detector connected to the digitally controlled oscillation module, for generating, according to the target clock signal and the reference clock signal, a phase advance signal for indicating that the reference clock signal leads the target clock signal, and a phase lag signal for indicating that the reference clock signal lags behind the target clock signal;

[0035] The latch is connected to the digital phase detector, the filtering control module and the digital control module respectively, and is used to latch the phase lead signal and the phase lag signal, and integrate the latched phase lead signal and the phase lag signal to obtain the phase difference signal.

[0036] In one embodiment, the digital controlled oscillation module comprises:

[0037] A coarse adjustment module, connected to the digital control module, and used to delay the output clock signal according to the coarse adjustment control word carried by the frequency control signal;

[0038] A fine adjustment module is respectively connected to the coarse adjustment module and the digital control module, and is used to delay the output clock signal output by the coarse adjustment module according to the fine adjustment control word carried by the frequency control signal to obtain the target clock signal; wherein the delay step size of the coarse adjustment module is greater than the delay step size of the fine adjustment module.

[0039] In the above method, the frequency control word is first corrected by the digital control module to make the frequency of the target clock signal close to the frequency of the reference clock signal, and the target frequency control word is obtained. Then, the target frequency control word is adjusted according to the adjustment step by the filter control module, so that the frequency of the target clock signal changes according to the corresponding frequency step. Then, the phase difference signal between the target clock signal and the reference clock signal is obtained by the phase comparison module. Based on the phase difference signal, the target frequency control word is corrected by the digital control module on the one hand, and the adjustment step is adjusted by the filter control module on the other hand. In this way, the frequency adjustment is first used to ensure that the frequency of the target clock signal is close to the reference clock signal, and then the frequency and phase adjustment are used to ensure that the phase of the target clock signal is close to the phase of the reference clock signal. The step-by-step adjustment method can avoid large-scale oscillation of the output signal, thereby improving the loop convergence speed and shortening the loop locking time. Subsequently, the frequency adjustment and the phase adjustment with adjustable step size are simultaneously used, which can ensure that the frequency of the target clock signal will not deviate too much from the frequency of the reference clock signal, and the frequency step size can be adjusted, further avoiding large-scale frequency oscillation and shortening the overall loop locking time. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A structural block diagram of a fast-locked all-digital phase-locked loop according to an embodiment of the present application;

[0041] Figure 2 A structural block diagram of a fast-locked all-digital phase-locked loop according to another embodiment of the present application;

[0042] Figure 3 This is a structural diagram of the Σ-Δ modulator of the present application;

[0043] Figure 4 This is a process for adjusting the current control word with a bit width of 5 and a value of 16 based on the binary search method in this application;

[0044] Figure 5 A structural block diagram of a fast-locked all-digital phase-locked loop according to another embodiment of the present application;

[0045] Figure 6 A structural block diagram of a fast-locked all-digital phase-locked loop according to another embodiment of the present application;

[0046] Figure 7 A waveform diagram of a phase difference signal of the present application;

[0047] Figure 8 This is a schematic diagram of the structure of the numerically controlled oscillation module of this application;

[0048] Fig. 9 A structural block diagram of a fast-locked all-digital phase-locked loop according to another embodiment of the present application;

[0049] Fig.10 This is a flow chart of the working principle of a fully digital phase-locked loop according to an embodiment of the present application. DETAILED DESCRIPTION

[0050] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0052] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly. The connection can be a direct connection or an indirect connection.

[0053] In addition, in this application, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0054] Figure 1 FIG. 1 is a structural block diagram of a fast-locked all-digital phase-locked loop according to an embodiment of the present invention. Figure 1 As shown, the digital phase-locked loop includes a digital control module 110, a digitally controlled oscillating module 120, a filtering control module 140 and a phase comparison module 130; the digital control module 110 is used to output a frequency control signal; the digitally controlled oscillating module 120 is connected to the digital control module 110, and is used to output a target clock signal according to the frequency control signal; the digital control module 110 is also used to receive the target clock signal, compare the frequency of the target clock signal with the frequency of the reference clock signal, and correct the frequency control signal according to the frequency comparison result, so as to correct the frequency of the target clock signal output by the digitally controlled oscillating module 120, until the frequency of the target clock signal approaches the frequency of the reference clock signal, and obtain the target frequency control signal; the filtering control module 1 40 is connected to the digital control module 110, and is used to adjust the target frequency control word according to the adjustment step so that the frequency of the target clock signal changes according to the frequency step corresponding to the adjustment step; the phase comparison module 130 is respectively connected to the digital control module 110, the filtering control module 140 and the digital control oscillation module 120, and is used to compare the phase of the target clock signal after the frequency change with the phase of the reference clock signal to obtain a phase difference signal; based on the phase difference signal, the digital control module 110 is also used to correct the adjusted target frequency control signal, and the filtering control module 140 is also used to adjust the adjustment step of the filtering control module to adjust the frequency step until the target clock signal is synchronized with the reference clock signal.

[0055] It can be understood that the digital control oscillation module 120 outputs the target clock signal under the drive of the digital control module 110. In order to synchronize the target clock signal with the reference clock signal, the frequency can be roughly adjusted first, so that the frequency of the target clock signal approaches the frequency of the reference clock signal, and then the frequency and phase are adjusted simultaneously, so that the phase of the target clock signal can quickly approach the phase of the reference clock signal.

[0056] The target frequency control signal corresponds one-to-one to the frequency of the target clock signal output by the digital control oscillation module 120 .

[0057] Specifically, in the rough frequency locking stage, the digital control module 110 can obtain the target clock signal generated by the digital control oscillation module 120, and compare it with the frequency of the reference clock signal to obtain a frequency comparison result in which the frequency of the target clock signal is greater than or less than the frequency of the reference clock signal, and then correct the output frequency control signal to change the frequency of the target clock signal output by the digital control oscillation module 120, until the frequency comparison result obtained by the digital control module 110 is that the frequency of the target clock signal is close to the frequency of the reference clock signal, and the frequency control signal at this time is used as the target frequency control signal.

[0058] In one embodiment, the frequency control signal can be modified by continuously modifying the characteristic parameters of the frequency control signal used to determine the target clock signal according to a preset step size, so that the frequency of the target clock signal is continuously close to the frequency of the reference clock signal, until the frequency of the target clock signal approaches the frequency of the reference clock signal. The measurement of whether the frequencies of the target clock signal and the reference clock signal are close can be, for example, whether the frequency difference between the target clock signal and the reference clock signal is within a preset frequency difference range.

[0059] After the frequency adjustment stage is completed, the frequency of the target clock signal is closest to that of the reference clock signal, but the phase difference may reach the maximum, and the frequency and phase simultaneous adjustment stage is entered at this time. In this stage, the filter control module 140 adjusts the target frequency control signal according to the adjustment step size, so that the frequency of the target clock signal changes accordingly, wherein the step size of the frequency change corresponds to the adjustment step size, and the initial value of the adjustment step size can be set by itself; then the phase comparison module 130 compares the phase of the target clock signal with the reference clock signal to obtain a phase difference signal, wherein the phase difference signal can characterize the lead-lag relationship between the target clock signal and the reference clock signal. After the target frequency control signal is adjusted according to the adjustment step, the frequency of the target clock signal will also deviate from the frequency of the reference clock signal, and a necessary condition for the synchronization of the target clock signal with the reference clock signal is that its frequency must be consistent with the reference clock signal. Therefore, after obtaining the phase difference signal, according to the phase difference signal, on the one hand, the digital control module 110 can correct the target frequency control signal to reduce the amplitude of the deviation of the frequency of the target clock signal from the frequency of the reference clock signal, ensure that the frequency of the target clock signal does not deviate too much from the frequency of the reference clock signal, avoid large frequency oscillations, and promote the target clock signal to approach the frequency and phase of the reference clock signal. On the other hand, the filtering control module 140 will adjust the adjustment step, thereby adjusting the corrected target frequency control signal according to the adjusted adjustment step to adjust the frequency step of the target clock signal, ensure that the phase speed of the target clock signal is controllably aligned with the phase of the reference clock signal, and finally achieve synchronization of the target clock signal with the reference clock signal. In this way, the frequency adjustment and the phase adjustment with adjustable step size are used at the same time, which can avoid large frequency oscillations and accelerate the loop convergence process.

[0060] In the above, the frequency control signal is first corrected by the digital control module 110 so that the frequency of the target clock signal is close to the frequency of the reference clock signal, and the target frequency control signal is obtained. Then, the filter control module 140 is used to adjust the target frequency control signal according to the adjustment step, so that the frequency of the target clock signal changes according to the corresponding frequency step, and then the phase comparison module 130 is used to obtain the phase difference signal between the target clock signal and the reference clock signal. Based on the phase difference signal, on the one hand, the digital control module 110 is used to correct the target frequency control signal, and on the other hand, the filter control module 140 is used to adjust the adjustment step. In this way, the frequency adjustment is first used to ensure that the frequency of the target clock signal is close to the reference clock signal, and then the frequency and phase adjustment are used to ensure that the phase of the target clock signal is close to the phase of the reference clock signal. The step-by-step adjustment method can avoid large-scale oscillation of the output signal, thereby improving the loop convergence speed and shortening the loop locking time. Subsequently, the frequency adjustment and the phase adjustment with adjustable step size are used at the same time, which can ensure that the frequency of the target clock signal does not deviate too much from the frequency of the reference clock signal, and can also ensure the adjustable frequency step size, further avoiding large-scale frequency oscillation and shortening the overall loop locking time.

[0061] In one embodiment, the target frequency control signal carries a target frequency control word; the digital control module corrects the target frequency control signal to obtain a corrected target frequency control word; the filtering control module adjusts the target frequency control signal to obtain an adjusted target frequency control word; if the phase difference signal indicates that the phase relationship between the target clock signal and the reference clock signal has changed, the digital control module 110 is also used to correct the target frequency control word adjusted by the filtering control module to the target frequency control word before adjustment by the filtering control module; the filtering control module 140 is also used to reduce the adjustment step size.

[0062] It can be understood that the target frequency control word carried by the target frequency control signal corresponds to the frequency of the target clock signal output by the digital control oscillation module 120 one by one, so the correction of the target frequency control signal by the digital control module 110 is the correction of the target frequency control word; when the filter control module 140 adjusts the target frequency control signal, it is the adjustment of the target frequency control word. For example, the target frequency control word can be represented in binary, and if its bit width is 5, it can represent 32 numbers, each number corresponds to a frequency, and by adjusting the size of the target frequency control word, the frequency of the target clock signal can be adjusted accordingly.

[0063] The phase relationship between the target clock signal and the reference clock signal may include the target clock signal leading the reference clock signal, and the target clock signal lagging the reference clock signal; when the target clock signal changes from the leading reference clock signal to the lagging reference clock signal, or the target clock signal changes from the lagging reference clock signal to the leading reference clock signal, it indicates that the phase relationship has changed. In one embodiment, the level of the phase difference signal can be used to characterize whether the target clock signal leads or lags behind the reference clock signal; for example, the phase difference signal can be a rectangular wave signal, when it is at a first level, it can indicate that the target clock signal leads the reference clock signal, and when it is at a second level, it can indicate that the target clock signal lags behind the reference clock signal, wherein one of the first level and the second level is a high level, and the other is a low level.

[0064] It can be understood that the target frequency control word before adjustment by the filtering control module can be the control word obtained when the frequency is roughly locked, and the control word can make the frequency of the target clock signal approach the frequency of the reference clock signal; after obtaining the target frequency control word when the frequency is roughly locked, the filtering control module 140 will adjust the target frequency control word according to the adjustment step size. If the phase relationship between the target clock signal and the reference clock signal changes after the adjustment, it indicates that the phase of the target clock signal is close to the phase of the reference clock signal. At this time, the digital control module 110 corrects the current target frequency control word to the target frequency control word before adjustment by the filtering control module, so that the target clock signal The frequency of the target clock signal approaches the frequency of the reference clock signal again, and the filter control module 140 will reduce the adjustment step, that is, reduce the adjustment amplitude of the target frequency control word; in the next cycle, the filter control module 140 will adjust the target frequency control word according to the reduced adjustment step. If the phase relationship between the target clock signal and the reference clock signal changes again after the adjustment, the digital control module 110 will correct the current target frequency control word to the target frequency control word before adjustment by the filter control module, so that the frequency of the target clock signal approaches the frequency of the reference clock signal again, and the filter control module 140 will reduce the adjustment step again, and so on.

[0065] For example, assuming that the target frequency control word during coarse frequency locking is 8, and the initial value of the adjustment step is 4, in the first adjustment cycle, the target frequency control word after the first adjustment is 8+4=12, if the phase relationship represented by the phase difference signal after the adjustment has not changed, then the second adjustment is continued, and the adjusted target frequency control word is 12+4=16, if the phase relationship represented by the phase difference signal has changed at this time, then the target frequency control word is corrected to 8, the adjustment step is reduced to 3, and then the second adjustment cycle is entered; in the second adjustment cycle, the target frequency control word after the first adjustment is 8+3=11, if the phase relationship represented by the phase difference signal has not changed after the adjustment, then the second adjustment is continued, and the adjusted target frequency control word is 11+3=14, if the phase relationship represented by the phase difference signal has changed at this time, then the target frequency control word is corrected to 8, the adjustment step is reduced to 2, and then the third adjustment is performed, and so on.

[0066] In this way, by continuously correcting the target frequency control word to the control word for coarse frequency locking when the phase is close, the frequency of the target clock signal is always kept close to the frequency of the reference clock signal, avoiding large oscillations of the signal frequency. At the same time, the adjustment step is gradually reduced to avoid large oscillations of the frequency and improve the phase adjustment accuracy, so that the target clock signal gradually approaches the reference clock signal in phase. In this way, through adaptive adjustment of the above-mentioned target frequency control word and adjustment step, coarse phase locking can eventually be achieved.

[0067] In one embodiment, the digital control module 110 is also used to obtain the reduced adjustment step size. If the reduced adjustment step size reaches the first step size threshold, and the frequency of the target clock signal changes according to the frequency step size corresponding to the reduced adjustment step size, the phase difference signal represents that the phase relationship between the target clock signal and the reference clock signal changes, then the target frequency control word is corrected to the average of the target frequency control word at the last correction moment and the target frequency control word at the current moment.

[0068] It can be understood that after the coarse phase adjustment is completed, the frequency and phase of the target clock signal have initially approached the reference clock signal, but the residual gap may still cause the entire system to enter oscillation, thereby increasing the loop convergence time. Therefore, before reaching the synchronization and locking stage, it is necessary to further reduce the frequency and phase gap between the target clock signal and the reference clock signal through the digital controller. Specifically, after the digital control module 110 corrects the target frequency control word to the target frequency control word before adjustment, the filter control module 140 reduces the adjustment step and adjusts the target frequency control word according to the adjusted adjustment step, the digital control module 110 can also obtain the reduced adjustment step. If the reduced adjustment step reaches the first step threshold, the digital control module 110 still corrects the target frequency control word to the target frequency control word before adjustment, and then the filter control module 140 continues to adjust the corrected target frequency control word according to the reduced adjustment step until it is known from the phase difference signal that the phase relationship between the target clock signal and the reference clock signal has changed, then it is considered that the target The phase of the clock signal is closest to the reference clock signal, while the frequency difference is the largest. At this time, the frequency-phase fine adjustment stage is entered. After entering this stage, the filter control module 140 continues to reduce the adjustment step according to the phase difference signal to slow down the convergence speed and improve the convergence accuracy. The digital control module 110 corrects the target frequency control word from the original target frequency control word before adjustment to the target frequency control word at the last correction moment and the target frequency control word at the current moment, so that the frequency of the target clock signal is closer to the frequency of the reference clock signal, thereby accelerating the convergence process of the phase-locked loop; the last correction moment is the moment when the target frequency control word was last corrected.

[0069] For example, assume that the target frequency control word during frequency coarse locking is 8; in the phase coarse adjustment stage, when the phase relationship represented by the phase difference signal changes and the reduced adjustment step reaches the first step threshold, assuming that the target frequency control word is 18, the target frequency control word is corrected from 18 to 8, and the adjustment step is adjusted from 3 to 2, and then the filtering control module 140 continues to adjust the target frequency control word 8 according to the adjustment step 2. When the target frequency control word is adjusted to 16, the phase relationship represented by the phase difference signal changes. At this time, the adjustment step is reduced to 1, and the target frequency control word is corrected to (16+8) / 2=12, and then the filtering control module 140 continues to adjust the target frequency control word 12 according to the adjustment step 1, and so on.

[0070] The first step length threshold may be manually set, which is smaller than the initial value of the adjustment step length. The adjustment step length reaching the first step length threshold may be that the adjustment step length is smaller than or equal to the first step length threshold.

[0071] In this way, the phase of the target clock signal and the reference clock signal is closest and the stage with the largest frequency difference is determined according to the adjustment step size and the phase difference signal. Then, the target frequency control word is corrected to the average value between the target frequency control word at the last correction moment and the target frequency control word at the current moment. This can make the frequency of the target clock signal closer to the frequency of the reference clock signal, thereby accelerating the convergence process of the phase-locked loop.

[0072] In one embodiment, the digital control module 110 is further configured to stop modifying the target frequency control word and control the filter control module 140 to stop reducing the adjustment step if the reduced adjustment step reaches a second step threshold, wherein the second step threshold is smaller than the first step threshold.

[0073] It can be understood that after entering the frequency-phase fine adjustment stage, the digital control module 110 will continue to obtain the reduced adjustment step size. When the reduced adjustment step size reaches the second step size threshold, it is considered that the frequency and phase of the target clock signal are close enough to the reference clock signal at this time. At this time, the waiting lock stage is entered, and the digital control module 110 stops correcting the target frequency control word, and the filter control module 140 stops reducing the adjustment step size. Thereafter, the filter control module 140 continues to adjust the current target frequency control word according to the last reduced adjustment step size, so that the phase of the target clock signal and the phase of the reference clock signal are maintained in a smaller range, and the synchronization of the target clock signal and the reference clock signal is achieved. Among them, the second step size threshold can be artificially set to a value less than the first step size threshold, and the adjustment step size reaching the second step size threshold can be the adjustment step size being less than or equal to the second step size threshold.

[0074] In one embodiment, the digital control module 110 is further used to: obtain a target frequency control word within a first preset time period, and output a lock prompt message if the fluctuation range of the target frequency control word is within a preset range.

[0075] It can be understood that after entering the waiting-to-lock stage, the digital control module 110 can evaluate whether the target clock signal is synchronized with the reference clock signal by the change of the target frequency control word. The first preset time length can be the time length between a previous moment and the current moment, and the value of the first preset time length can be manually set.

[0076] Specifically, the digital control module 110 can store the target frequency control word at each moment. When entering the waiting to be locked stage, the digital control module 110 can obtain the target frequency control word at each moment within the first preset time length, and then determine the fluctuation range according to the difference between the maximum target frequency control word and the minimum target frequency control word, and then determine whether the fluctuation range is within the preset range. If it is within the range, the locking prompt information is output; wherein the locking prompt information can be in the form of a status prompt signal, for example.

[0077] In this way, the method of using the change of the target frequency control word for evaluation is simpler, which is conducive to reducing the complexity of system design, and the evaluation result is accurate.

[0078] In one embodiment, the digital control module 110 is further configured to receive a target clock signal, and if the frequency of the target clock signal exceeds a frequency threshold, control the fully digital phase-locked loop to perform a system reset.

[0079] Specifically, after entering the waiting-to-lock stage, the digital control module 110 will continue to receive the target clock signal to monitor the frequency of the target clock signal. If the frequency exceeds the frequency threshold, it indicates that an abnormal emergency may have occurred (such as a drastic change in chip temperature, etc.), resulting in the output target clock signal being unstable. At this time, the digital control module 110 can output a corresponding control signal to control the digital phase-locked loop to reset the system.

[0080] Among them, the system reset process can be as follows: first, the filtering control module 140 stops adjusting the target frequency control word; the digital control module 110 receives the target clock signal, compares the frequency of the target clock signal with the frequency of the reference clock signal, and corrects the target frequency control word according to the frequency comparison result, until the frequency of the target clock signal is close to the frequency of the reference clock signal, and a new target frequency control word is obtained; further, the filtering control module 140 adjusts the new target frequency control word according to the initially set adjustment step, so that the frequency of the target clock signal changes according to the frequency step corresponding to the adjustment step; the phase comparison module 130 still performs phase comparison to obtain a phase difference signal; based on the phase difference signal, the digital control module 110 also corrects the adjusted new target frequency control word, and the filtering control module 140 also adjusts the adjustment step, wherein the correction process of the target frequency control word and the adjustment process of the adjustment step can refer to the specific description in the above embodiment.

[0081] In one embodiment, Figure 2 As shown, the target frequency control word includes an integer control word and a decimal control word, and the filtering control module 140 includes a filter 141 and a Σ-Δ modulator 142; the filter 141 is respectively connected to the phase comparison module 130 and the digital control module 110, and is used to obtain the decimal control word, and adjust the decimal control word according to the adjustment step to obtain the adjustment control word; the Σ-Δ modulator 142 is respectively connected to the filter 141 and the digital control module 110, and is used to modulate the adjustment control word to obtain the modulated control word, wherein the element average value of the modulated control word is equal to the value of the adjustment control word; the digital control module 110 is also used to obtain the modulated control word, and calculate the sum of the value of each element in the modulated control word and the value of the integer control word, to obtain the target control word, and use the target control word as a new integer control word.

[0082] It can be understood that the target frequency control word includes an integer control word and a decimal control word, and the filter control module 140 adjusts the target frequency control word to adjust the decimal control word of the target frequency control word. The integer control word can be used to control the frequency of the target clock signal to change in integer digits, such as 10MHz, 5MHz; the decimal control word can be used to control the frequency of the target clock signal to change in decimal digits, such as 0.1MHz, 0.2MHz; the digital control oscillation module 120 only responds to the integer control word, so when the digital control module 110 drives the digital control oscillation module 120 to generate a target clock signal of a corresponding frequency, the value of each element of the decimal control word is superimposed on the value of the integer control word, and the obtained new control word is directly transmitted to the digital control oscillation module 120, so that the decimal control word can act on the target clock signal.

[0083] The filter control module 140 adjusts the target frequency control word by first obtaining the decimal control word in the digital control module 110, then adjusting the decimal control word according to the adjustment step, obtaining the new decimal control word and sending it to the digital control module 110, and finally the digital control module 110 corrects the previous target frequency control word.

[0084] Specifically, the filter 141 in the filter control module 140 first obtains the decimal control word, where the decimal control word is represented as a digital sequence, and the value of the decimal control word is the value represented by its sequence, which is also equal to the element average of the decimal control word, and then the decimal control word is adjusted according to the adjustment step size to obtain the adjusted control word. In one embodiment, the adjustment step size corresponds to the integral coefficient of the filter 141. It can be understood that the filter 141 can be a second-order FIR filter 141, which is provided with an integral unit and a proportional unit. The integral coefficient Ki is used to determine the adjustment step size, and the proportional coefficient can be kept unchanged. The decimal control word is adjusted by setting the integral coefficient Ki. Figure 2 The structure of the filter 141 is schematically shown, including two adders, an integration unit i, a proportional unit p, and a delay unit Z. -1 and a gate MUX.

[0085] Furthermore, the Σ-Δ modulator 142 modulates the adjusted fractional control word, and a linear feedback shift register is provided therein, so that the obtained modulated control word can have a certain degree of randomness while ensuring that the value of the modulated control word is the same as that of the fractional control word, so that the frequency of the target clock signal subsequently generated based on the modulated control word will not have excessive side lobes, thereby reducing the noise of the target clock signal at the specified frequency point and suppressing the loop noise.

[0086] Further, after obtaining the modulation control word, the digital control module 110 can calculate the sum of the values ​​of each element in the modulation control word and the value of the integer control word to obtain the target control word, and then use the target control word as a new integer control word, and then the digital control oscillation module 120 directly generates a target clock signal of a corresponding frequency according to the new integer control word. In this way, the modulation control word is generated by the Σ-Δ modulator 142, and the value of the integer control word is superimposed on the modulation control word by the digital control module 110 to obtain a new integer control word, which increases the bit width of the integer control word and improves the accuracy of the system's frequency adjustment, so that the modulated decimal control word can act on the target clock signal, and finally the decimal frequency is adjusted to obtain the target clock signal of the desired frequency.

[0087] For example, assuming that the value of the decimal control word adjusted by the filter 141 is 0.75, the modulated control word obtained after modulation of the decimal control word can be [-2, 0, 1, 4]. Assuming that the value of the integer control word is 60, the target control word is [58, 60, 61, 64]. The value of the target control word is 60.75, which is equal to the sum of the value of the integer control word and the value of the adjusted decimal control word. Therefore, the target control word can be used as a new integer control word at this time, so that the numerically controlled oscillation module 120 can directly generate a new target clock signal according to the new integer control word.

[0088] In one embodiment, the theoretical model based on which the Σ-Δ modulator 142 is implemented may be a MASH structure. For the Σ-Δ modulator 142 of this structure, its quantization noise transfer function in the z-domain may be expressed as the following formula, wherein N represents the order of the Σ-Δ modulator 142. It can be seen from the formula that the higher the order of the Σ-Δ modulator 142, the better the noise shaping effect, but it will also affect the stability of the loop. Therefore, after comprehensive consideration, a third-order MASH structure is adopted here to build the Σ-Δ modulator 142.

[0089] NTF(z)=(1–z -1 ) -N

[0090] The structure of the Σ-Δ modulator 142 can be referred to Figure 3 As shown, firstly, an unordered sequence is generated by a LFSR linear feedback shift register, and then the LFSR output is normalized by a third-order MASH Σ-Δ modulator (without LFSR structure) of the same structure, and then the disturbance is added to the input of the third-order adder of the Σ-Δ modulator 142 to add disturbance to the output of this module and disrupt the periodicity of the output. Among them, the structure of each order modulator in the third-order MASH Σ-Δ modulator is the same and cascaded, and the specific structure of each order modulator is the same as Figure 3 The modulators within the dashed box 100 have the same structure.

[0091] In one embodiment, the filter 141 is further configured to adjust the value of the integer control word if overflow occurs when adjusting the fractional control word.

[0092] It can be understood that when the filter 141 adjusts the decimal control word, the decimal control word may be continuously added to 0.9, and when it is adjusted upward, it may become 0, at this time an overflow occurs, so it is necessary to add 1 to the value of the integer control word in the digital control module 110; similarly, the decimal control word is continuously reduced to 0, and when it is adjusted downward, it may become 0.9, at this time an underflow occurs, so it is necessary to reduce 1 to the value of the integer control word. The filter 141 performs overflow adjustment on the value of the integer control word, and when the filter 141 detects an overflow, the filter 141 sends a corresponding overflow signal to the digital control module 110, thereby instructing the digital control module 110 to perform addition and subtraction operations on the value of the integer control word.

[0093] In this way, by checking the overflow and performing overflow adjustment during the adjustment process of the decimal control word, the accuracy of frequency adjustment can be improved and the time required for system locking can be shortened.

[0094] In one embodiment, the filter 141 is further used to adjust the integral coefficient to adjust the adjustment step size.

[0095] It can be understood that the adjustment step size is determined by the integral coefficient of the filter 141. The filter control module 140 adjusts the adjustment step size, which can be achieved by adjusting the integral coefficient through the filter 141; wherein the integral coefficient corresponds to the adjustment step size, the larger the integral coefficient, the larger the adjustment step size, and the smaller the integral coefficient, the smaller the adjustment step size.

[0096] In one embodiment, the digital control module 110 is also used to count the cycles of the target clock signal within a second preset time length, and compare the counted number of cycles with the reference number of cycles to obtain a frequency comparison result; the reference number of cycles is equal to the product of the second preset time length and the frequency of the reference clock signal.

[0097] The frequency comparison result is used to characterize whether the frequency of the target clock signal is greater than or less than the frequency of the reference clock signal. It can be understood that the digital control module 110 can obtain the frequency comparison result based on the cycle counting method in the same time window in order to compare the frequency of the target clock signal with the frequency of the reference clock signal. Specifically, a preset time length can be set, and the number of cycles of the reference clock signal within the time length range is the reference cycle number. At the same time, the preset time length is used as a time window to count the cycles of the target clock signal to obtain the number of cycles. The frequency comparison result can be obtained based on the relationship between the number of cycles and the number of reference cycles. Among them, if the number of cycles is greater than the number of reference cycles, it indicates that the frequency of the target clock signal is greater than the frequency of the reference clock signal; otherwise, it indicates that the frequency of the target clock signal is less than the frequency of the reference clock signal.

[0098] In one embodiment, the digital control module 110 is also used to obtain the current frequency control word carried by the frequency control signal at the current moment if the frequency of the target clock signal is different from the frequency of the reference clock signal; if the frequency of the target clock signal is greater than the frequency of the reference clock signal, the upper boundary value of the current frequency control word is corrected to the value of the current frequency control word, and the value of the current frequency control word is corrected to an intermediate value between the corrected upper boundary value and the lower boundary value of the current frequency control word; if the frequency of the target clock signal is less than the frequency of the reference clock signal, the lower boundary value is corrected to the value of the current frequency control word, and the value of the current frequency control word is corrected to an intermediate value between the corrected lower boundary value and the upper boundary value; detect the frequency of the corrected target clock signal until the frequency of the corrected target clock signal is the same as the frequency of the reference clock signal, or the current frequency control word is close to the upper boundary value or lower boundary value of the current frequency control word, and obtain the target frequency control word.

[0099] The current frequency control word determines the frequency of the target clock signal at the current moment. It can be understood that the specific process of the digital control module 110 correcting the frequency control signal according to the frequency comparison result to obtain the target frequency control signal can be: if the frequency of the target clock signal is different from the frequency of the reference clock signal, that is, the frequency of the target clock signal is greater than or less than the frequency of the reference clock signal, the current frequency control word carried by the frequency control signal at the current moment is obtained, and then the current frequency control word is continuously adjusted until the frequency of the target clock signal after adjustment is the same as the frequency of the reference clock signal, or the current frequency control word is close to the upper boundary value or lower boundary value of the current frequency control word. The adjustment process includes: if the frequency of the target clock signal is greater than the frequency of the reference clock signal, the upper boundary value is corrected to the value of the current frequency control word, and the value of the current frequency control word is corrected to the middle value between the corrected upper boundary value and the lower boundary value; if the frequency of the target clock signal is less than the frequency of the reference clock signal, the lower boundary value is corrected to the value of the current frequency control word, and the value of the current frequency control word is corrected to the middle value between the corrected lower boundary value and the upper boundary value.

[0100] The initial value of the upper boundary of the current frequency control word is the upper endpoint value of its value range; the initial value of the lower boundary value of the current frequency control word is the lower endpoint value of its value range. The current frequency control word adjacent to its upper boundary value or lower boundary value may be such that the difference between its upper boundary value or lower boundary value is 1. Among them, the middle value between the corrected lower boundary value and the upper boundary value, and the middle value between the corrected upper boundary value and the lower boundary value can be obtained by binary division. The middle value between the two boundary values ​​can be obtained by rounding down half of the sum of the two boundary values.

[0101] Specifically, assuming that the bit width of the frequency control word is 5, its value range is 0 to 31, so its upper boundary value is 31 and the lower boundary value is 0. Assuming that the value of the current frequency control word is 16, if it is judged that the frequency of the target clock signal is less than the frequency of the reference clock signal at this time, it indicates that the current frequency control word needs to be increased. At this time, the lower boundary value is corrected from 0 to 16, and the current frequency control word is corrected from 16 to 23; if the frequency of the corrected target clock signal is still different from the frequency of the reference clock signal, and since 23 is not close to the upper boundary value 31 or the lower boundary value 16, the adjustment process is continued. If it is judged that the frequency of the target clock signal is greater than the frequency of the reference clock signal at this time, it indicates that the current frequency control word needs to be reduced. At this time, the upper boundary value is corrected from 31 to 23, and the current frequency control word is corrected from 23 to an intermediate value between 16 and 23, that is, 19; after correction, the above judgment is continued until the frequency of the corrected target clock signal is the same as the frequency of the reference clock signal, or the current frequency control word is close to its upper boundary value or lower boundary value.

[0102] The binary division method of the above current frequency control word can be referred to Figure 4 By obtaining the latest current frequency control word based on the binary method, the frequency of the target clock signal can be quickly approximated to the frequency of the reference clock signal, and the frequency coarse locking can be achieved, which shortens the frequency coarse locking time and further obtains the target frequency control signal after the frequency coarse locking for subsequent phase locking.

[0103] In one embodiment, the current frequency control word includes a current coarse adjustment control word, a current fine adjustment control word and a current decimal control word; the digital control module 110 corrects the current frequency control word by sequentially correcting the current coarse adjustment control word, the current fine adjustment control word and the current decimal control word until the frequency of the corrected target clock signal is the same as the frequency of the reference clock signal, or the current decimal control word is close to the upper boundary value or the lower boundary value of the current decimal control word, thereby obtaining the target frequency control word.

[0104] Among them, the coarse adjustment control word and the fine adjustment control word together constitute an integer control word. The current coarse adjustment control word can be used to control the frequency of the target clock signal to change by a larger number of digits, such as a change of ten digits; for example, assuming that the coarse adjustment control word is a binary number with a bit width of 5, and its change is 30MHz, then its value range is 0 to 31, and the frequency of the target clock signal changes by 30MHz for every change of 1 in its value. Similarly, the current fine adjustment control word can be used to control the frequency of the target clock signal to change by a smaller number of digits, such as a change of a single digit, such as 5MHz, 2MHz, etc.; the current decimal control word can be used to control the frequency of the target clock signal to change by a decimal digit, such as 0.1MHz, 0.2MHz, etc.

[0105] It can be understood that the specific process of the digital control module 110 correcting the frequency control signal according to the frequency comparison result to obtain the target frequency control signal can be as follows: if the frequency of the target clock signal is different from the frequency of the reference clock signal, that is, the frequency of the target clock signal is greater than or less than the frequency of the reference clock signal, then the current coarse adjustment control word, the current fine adjustment control word and the current decimal control word carried by the frequency control signal at the current moment are obtained, and then the correction process is continuously performed on the current coarse adjustment control word until the frequency of the corrected target clock signal is the same as the frequency of the reference clock signal, or the current coarse adjustment control word is close to the upper boundary value or the lower boundary value of the current coarse adjustment control word; then the current fine adjustment control word is continuously corrected in the same correction method as the coarse adjustment control word until the frequency of the corrected target clock signal is the same as the frequency of the reference clock signal, or the current fine adjustment control word is close to the upper boundary value or the lower boundary value of the current fine adjustment control word; finally, the current decimal control word is continuously corrected in the same correction method as the coarse adjustment control word until the frequency of the corrected target clock signal is the same as the frequency of the reference clock signal, or the current decimal control word is close to the upper boundary value or the lower boundary value of the current decimal control word. The initial values ​​of the upper boundary values ​​of the current coarse adjustment control word, the current fine adjustment control word and the current decimal control word are the upper endpoint values ​​of their value ranges respectively; the initial values ​​of the lower boundary values ​​of the current coarse adjustment control word, the current fine adjustment control word and the current decimal control word are the lower endpoint values ​​of their value ranges respectively. In addition, the current coarse adjustment control word, the current fine adjustment control word and the current decimal control word may have a difference of 1 between their upper boundary value or lower boundary value. The intermediate value between each control word and its upper boundary value, and the intermediate value between each control word and its lower boundary value may be obtained by binary division, and the specific process of binary division of each control word may refer to the binary division process of the current target control word in the above embodiment.

[0106] When the current decimal control word is corrected, that is, the frequency of the corrected target clock signal is the same as the frequency of the reference clock signal, or the current decimal control word is close to the upper boundary value or lower boundary value of the current decimal control word, it is considered that the frequency of the target clock signal is close to the frequency of the reference clock signal. At this time, the corrected current coarse adjustment control word, the current fine adjustment control word and the current decimal control word are further used as the target frequency control word.

[0107] In this way, the latest current coarse control word, current fine control word and current decimal control word are respectively obtained based on the binary method, and each control word is corrected in turn, which can improve the coarse frequency locking accuracy while ensuring the coarse frequency locking speed.

[0108] In one embodiment, Figure 5As shown, the fully digital phase-locked loop further includes a frequency division module 150 , which is connected to the phase comparison module 130 and the digital control oscillation module 120 respectively, and is used to divide the target clock signal and transmit it to the phase comparison module 130 .

[0109] It can be understood that in order to adapt the frequency of the target clock signal to the reference clock signal so that the frequency of the target clock signal is reduced to be close to the frequency of the reference clock signal, the phase comparison module 130 can first divide the target clock signal output by the numerical control oscillation module 120 each time, and then compare the divided target clock signal with the reference clock signal.

[0110] In one embodiment, Figure 6 As shown, the phase comparison module 130 includes a digital phase detector 131 and a latch 132; the digital phase detector 131 is connected to the digital control oscillation module 120, and is used to generate a phase advance signal for characterizing that the reference clock signal leads the target clock signal, and a phase lag signal for characterizing that the reference clock signal lags behind the target clock signal according to the target clock signal and the reference clock signal; the latch 132 is respectively connected to the digital phase detector 131, the filtering control module 140 and the digital control module 110, and is used to latch the phase advance signal and the phase lag signal, and integrate the latched phase advance signal and the phase lag signal to obtain a phase difference signal.

[0111] It can be understood that the digital phase detector 131 can generate a phase advance signal and a phase lag signal based on edge detection, wherein the phase advance signal will have a pulse when the reference clock signal leads the target clock signal, and the phase lag signal will have a pulse when the reference clock signal lags the target clock signal. The waveforms of the phase advance signal and the phase lag signal can be referred to. Figure 7 As shown in the figure, clk_ref represents the reference clock signal, clk_div represents the target clock signal, UP represents the phase advance signal, DOWN represents the phase lag signal, and SIGN represents the phase difference signal.

[0112] Furthermore, the latch 132 may latch the phase advance signal and the phase lag signal, so that the phase advance signal and the phase lag signal are maintained for a sufficiently long time, and then further integrate the phase advance signal and the phase lag signal to obtain a phase difference signal, wherein a high level of the phase difference signal may indicate that the reference clock signal leads the target clock signal, and a low level of the phase difference signal may indicate that the reference clock signal lags the target clock signal. The latch 132 may be an SR latch 132.

[0113] In this way, a phase advance signal and a phase lag signal are first generated by the digital phase detector 131, which can quickly determine the advance and lag conditions of the reference clock signal and the target clock signal. Then, the latch 132 is used to latch and integrate the phase difference signal, and the obtained phase difference signal has high accuracy and can accurately reflect the phase conditions of the reference clock signal and the target clock signal.

[0114] Based on the phase difference signal obtained in the above manner, when the level of the phase difference signal at the current moment does not jump, it can be considered that the phase of the target clock signal is far away from the phase of the reference clock signal; when the level of the phase difference signal at the current moment jumps, it can be considered that the phase of the target clock signal is close to the phase of the reference clock signal.

[0115] In one embodiment, the digital control oscillation module 120 includes a coarse adjustment module and a fine adjustment module. The coarse adjustment module is connected to the digital control module 110 and is used to delay the output clock signal according to the coarse adjustment control word carried by the frequency control signal; the fine adjustment module is respectively connected to the coarse adjustment module and the digital control module 110 and is used to delay the output clock signal output by the coarse adjustment module according to the fine adjustment control word carried by the frequency control signal to obtain a target clock signal; wherein the delay step size of the coarse adjustment module is greater than the delay step size of the fine adjustment module.

[0116] Specifically, the circuit structure diagram of the digital control oscillation module 120 can be referred to Figure 8 As shown, RSTN is a reset signal. When it is set to 1, it starts to oscillate. After passing through a NAND gate, an output clock signal is obtained. The coarse adjustment module may include multiple inverters connected in cascade. Each inverter corresponds to a selector. The selector can select the corresponding inverter to be connected for delay to achieve the delay of the output clock signal. The coarse adjustment control word carried by the frequency control signal (taking the coarse adjustment control word bit width of 5 as an example, it can represent a 32-bit number. After converting it into a pseudo-thermometer code, it can be Figure 8 COA[0], COA[1], ..., COA

[30] in the figure) can control each selector to access the corresponding inverter. Each inverter can achieve a delay step. Therefore, by connecting a certain number of inverters, a delay of corresponding length can be achieved, and finally a signal COA_O after coarse adjustment delay is obtained.

[0117] Similarly, the fine-tuning module may include a plurality of cascade-connected baseline tri-state gates, each of which is connected in parallel with a load tri-state gate, and the fine-tuning control word carried by the frequency control signal (taking the fine-tuning control word bit width of 4 as an example, which can represent a 16-bit number, can be converted into a pseudo-thermometer code to represent a 16-bit number) is used. Figure 8FIN[0], FIN[1]...FIN

[14] in the figure) can control each load tri-state gate to access the corresponding baseline tri-state gate, thereby adjusting the load of the baseline tri-state gate and realizing a delay step of the baseline tri-state gate. Therefore, by accessing a certain number of load tri-state gates, a delay of a corresponding length can be realized, and finally a signal FIN_O after fine-tuning delay is obtained. Among them, the target clock signal can be pulled out by any node, and in one embodiment, it can be pulled out by a node located between the coarse adjustment module and the fine adjustment module.

[0118] In this way, the delay of the clock signal is achieved by adopting coarse adjustment and fine adjustment, and finally the target clock signal is obtained, which ensures the signal frequency adjustment range while improving the adjustment accuracy. In addition, by using a three-state gate chain to implement a fine adjustment module, the linearity between the delay and the control word can be guaranteed.

[0119] It should be understood that the target frequency control signal output by the digital control module 110 carries an integer control word, and the integer control word also includes a coarse adjustment control word and a fine adjustment control word, so as to realize the frequency control of the target signal output by the digital control oscillation module 120. The coarse adjustment control word can be used to control the frequency of the target clock signal to change by a larger number of digits, such as a change of ten digits; the fine adjustment control word can be used to control the frequency of the target clock signal to change by a smaller number of digits, such as a change of one digit.

[0120] Another embodiment of the present invention further provides a fast-locking all-digital phase-locked loop, which is an all-digital phase-locked loop based on a Bang-Bang PFD structure. Fig. 9 As shown, it includes a digital control module 110, a digitally controlled oscillating module 120, a phase comparison module 130, a filtering control module 140 and a frequency division module 150; wherein the phase comparison module 130 includes a digital phase detector 131 and a latch 132, the filtering control module 140 includes a filter 141 and a Σ-Δ modulator 142, and the digitally controlled oscillating module 120 includes a coarse adjustment module (not shown) and a fine adjustment module (not shown). Fig.10 The working process of each module is briefly explained.

[0121] After the phase-locked loop is enabled, the phase-locked loop enters the working state. First, before the frequency is roughly locked, the digital control module 110 outputs a frequency control signal to the digital control oscillation module 120 to drive the digital control oscillation module 120 to output a target clock signal, which is further transmitted to the digital phase detector 131 after the frequency division processing of the frequency division module 150. The digital phase detector 131 generates a phase advance signal for representing that the reference clock signal leads the target clock signal and a phase lag signal for representing that the reference clock signal lags behind the target clock signal according to the target clock signal and the reference clock signal, and then the latch 132 latches the phase advance signal and the phase lag signal, and integrates the latched phase advance signal and the phase lag signal to obtain a phase difference signal.

[0122] Then it begins to enter the frequency coarse locking stage. In this stage, the target frequency control word is corrected based on the binary adjustment method to achieve coarse frequency adjustment. The specific process is: the digital control module 110 determines whether the frequency of the target clock signal is the same as the frequency of the reference clock signal. Specifically, the digital control module 110 counts the cycles of the target clock signal within the set time length, and compares the number of cycles obtained by the count with the number of reference cycles to obtain a frequency comparison result; wherein the number of reference cycles is equal to the product of the preset time length and the frequency of the reference clock signal; when they are different, the coarse control word, fine control word and decimal control word carried by the frequency control signal at the current moment are continuously corrected in sequence until the frequency of the target clock signal after correction is the same as the frequency of the reference clock signal, or each The control word is close to its respective upper boundary value or lower boundary value, and a target frequency control word composed of a coarse adjustment control word, a fine adjustment control word and a decimal control word at the current moment is obtained; wherein the specific correction process of each control word is as follows: if the frequency of the target clock signal is greater than the frequency of the reference clock signal, the upper boundary value of the control word is corrected to the value of the control word, and the value of the control word is corrected to an intermediate value between the corrected upper boundary value and the lower boundary value; if the frequency of the target clock signal is less than the frequency of the reference clock signal, the lower boundary value is corrected to the value of the control word, and the value of the control word is corrected to an intermediate value between the corrected lower boundary value and the upper boundary value.

[0123] After the above frequency coarse locking stage is completed, the phase locking stage begins. The phase locking stage is divided into a phase coarse adjustment stage and a frequency-phase fine adjustment stage.

[0124] In the phase coarse adjustment stage, the filtering control module 140 first adjusts the target frequency control word according to the adjustment step size so that the frequency of the target clock signal changes according to the frequency step size corresponding to the adjustment step size. At the same time, the digital phase detector 131 compares the phase of the target clock signal after the frequency change with the phase of the reference clock signal, and generates a phase advance signal for characterizing that the reference clock signal leads the target clock signal, and a phase lag signal for characterizing that the reference clock signal lags behind the target clock signal; then the latch 132 latches the phase advance signal and the phase lag signal, and integrates the latched phase advance signal and phase lag signal to obtain a phase difference signal. If the phase difference signal indicates that the phase relationship between the target clock signal and the reference clock signal has changed, a coarse phase adjustment is performed, and the digital control module 110 corrects the adjusted target frequency control word to the target frequency control word before adjustment by the filter control module. At the same time, the filter control module 140 gradually reduces the adjustment step based on the decreasing integral coefficient. During this period, the digital control module 110 obtains the reduced adjustment step and compares it with the first step threshold, that is, it obtains the reduced integral coefficient and compares it with the first integral threshold. At the same time, it continues to monitor whether the phase relationship represented by the phase difference signal changes after the frequency of the target clock signal changes according to the frequency step corresponding to the reduced adjustment step.

[0125] Further, if the digital control module 110 detects that the reduced adjustment step reaches the first step threshold, and the frequency of the target clock signal changes according to the frequency step corresponding to the reduced adjustment step, the phase difference signal represents that the phase relationship between the target clock signal and the reference clock signal changes, then the frequency-phase fine adjustment stage is entered. In this stage, the digital control module 110 changes the correction of the target frequency control word in the frequency-phase fine adjustment stage to the correction of the target frequency control word to the mean value between the target frequency control word at the last correction moment and the target frequency control word at the current moment, during which the filter control module 140 still reduces the integral coefficient according to the process of the phase coarse adjustment stage, thereby realizing adaptive adjustment of the integral coefficient and the frequency control word.

[0126] Furthermore, the digital control module 110 continues to obtain the reduced adjustment step and compares it with the second step threshold, that is, obtains the reduced integral coefficient and compares it with the first integral threshold. If the reduced adjustment step reaches the second step threshold, that is, the reduced integral coefficient reaches the second integral threshold, then the target frequency control word is stopped from being corrected, and the filtering control module 140 is controlled to stop reducing the adjustment step and enter the waiting-for-locking stage.

[0127] In the waiting-to-lock stage, the filter control module 140 adjusts the target frequency control word finally obtained based on the fine-tuning integral coefficient, wherein the fine-tuning integral coefficient can be the final integral coefficient at the end of the frequency-phase fine-tuning stage, or a coefficient less than the final integral coefficient; during this period, the proportional coefficient of the filter control module 140 can adopt a fine-tuning proportional coefficient with a smaller value. Furthermore, the digital control module 110 also obtains the target frequency control word within a preset time length for locking judgment; specifically, if the fluctuation range of the target frequency control word is within the preset range, a locking prompt message is output, indicating that the system is locked, and the locking stage is entered at this time. After entering the locking stage, the digital control module 110 continues to monitor the target clock signal. If the frequency of the target clock signal exceeds the frequency threshold, it indicates that the system is abnormal, and the fully digital phase-locked loop is controlled to reset the system.

[0128] Among them, the adjustment process of the target frequency control word by the filter control module 140 according to the adjustment step is: the filter 141 first obtains the decimal control word of the target frequency control word, and then adjusts the decimal control word according to the adjustment step to obtain the adjustment control word; the Σ-Δ modulator 142 modulates the adjustment control word to obtain the modulation control word, wherein the element average value of the modulation control word is equal to the value of the adjustment control word; further, the digital control module 110 obtains the modulation control word, and calculates the sum of the value of each element in the modulation control word and the value of the integer control word, respectively, to obtain the target control word, and uses the target control word as a new integer control word, and then drives the coarse adjustment module in the digital control oscillation module 120 to delay the output clock signal with a larger step length according to the coarse adjustment control word in the integer control word, and drives the fine adjustment module in the digital control oscillation module 120 to delay the output clock signal with a smaller step length according to the fine adjustment control word in the integer control word, and finally realizes the target clock signal. During this period, when the filter 141 adjusts the decimal control word, if overflow occurs, the value of the integer control word is adjusted; the adjustment of the adjustment step by the filter control module 140 is the adjustment of the integral coefficient by the filter 141 .

[0129] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A fast-locking all-digital phase-locked loop, characterized in that: include: A digital control module, used for outputting a frequency control signal; A digital control oscillation module, connected to the digital control module, and configured to output a target clock signal according to the frequency control signal; The digital control module is further used to receive the target clock signal, compare the frequency of the target clock signal with the frequency of the reference clock signal, and correct the frequency control signal according to the frequency comparison result to correct the frequency of the target clock signal output by the digital control oscillation module until the frequency of the target clock signal approaches the frequency of the reference clock signal, thereby obtaining a target frequency control signal; a filtering control module connected to the digital control module and used to adjust the target frequency control signal according to the adjustment step length so that the frequency of the target clock signal changes according to the frequency step length corresponding to the adjustment step length; a phase comparison module connected to the digital control module, the filtering control module and the digital control oscillation module respectively and used to compare the phase of the target clock signal after the frequency change with the phase of the reference clock signal to obtain a phase difference signal; Based on the phase difference signal, the digital control module is also used to correct the target frequency control signal adjusted by the filtering control module, and the filtering control module is also used to adjust the adjustment step to adjust the frequency step until the target clock signal is synchronized with the reference clock signal.

2. The fast-locking all-digital phase-locked loop according to claim 1, characterized in that: The target frequency control signal carries a target frequency control word; the digital control module modifies the target frequency control signal to modify the target frequency control word; the filter control module adjusts the target frequency control signal to adjust the target frequency control word; If the phase difference signal indicates that the phase relationship between the target clock signal and the reference clock signal has changed, the digital control module is also used to correct the target frequency control word after adjustment by the filtering control module to the target frequency control word before adjustment by the filtering control module; the filtering control module is also used to reduce the adjustment step.

3. The fast-locking all-digital phase-locked loop according to claim 2, characterized in that: The digital control module is also used to obtain the reduced adjustment step size. If the reduced adjustment step size reaches the first step size threshold, and the frequency of the target clock signal changes according to the frequency step size corresponding to the reduced adjustment step size, the phase difference signal represents that the phase relationship between the target clock signal and the reference clock signal changes, then the target frequency control word is corrected to the average value between the target frequency control word at the last correction moment and the target frequency control word at the current moment.

4. The fast-locking all-digital phase-locked loop according to claim 3, characterized in that: The digital control module is also used for: If the reduced adjustment step reaches a second step threshold, the target frequency control word is stopped from being corrected, and the filter control module is controlled to stop reducing the adjustment step; wherein the second step threshold is smaller than the first step threshold.

5. The fast-locking all-digital phase-locked loop according to claim 4, characterized in that: The digital control module is further used to: obtain the target frequency control word within a first preset time length, and output locking prompt information if the fluctuation range of the target frequency control word is within a preset range.

6. The fast-locking all-digital phase-locked loop according to claim 5, characterized in that: The digital control module is further configured to receive the target clock signal, and if the frequency of the target clock signal exceeds a frequency threshold, control the fully digital phase-locked loop to perform a system reset.

7. The fast-locking all-digital phase-locked loop according to claim 2, characterized in that: The target frequency control word includes an integer control word and a decimal control word, and the filtering control module includes: A filter, connected to the phase comparison module and the digital control module respectively, for obtaining the fractional control word, and adjusting the fractional control word according to the adjustment step to obtain an adjusted control word; a Σ-Δ modulator, connected to the filter and the digital control module respectively, for modulating the adjustment control word to obtain a modulated control word, wherein an element average of the modulated control word is equal to a value of the adjustment control word; The digital control module is also used to obtain the modulation control word, calculate the sum of the value of each element in the modulation control word and the value of the integer control word, obtain the target control word, and use the target control word as the new integer control word.

8. The fast-locking all-digital phase-locked loop according to claim 7, characterized in that: The filter is further configured to adjust the value of the integer control word by overflow if overflow occurs when adjusting the decimal control word.

9. The fast-locking all-digital phase-locked loop according to claim 7, characterized in that: The filter is further used to adjust the integral coefficient to adjust the adjustment step size.

10. The fast-locking all-digital phase-locked loop according to claim 1, characterized in that: The digital control module is also used to count the cycles of the target clock signal within a second preset time length, and compare the number of cycles counted with the number of reference cycles to obtain the frequency comparison result; the number of reference cycles is equal to the product of the second preset time length and the frequency of the reference clock signal.

11. The fast-locking all-digital phase-locked loop according to claim 1, characterized in that: The digital control module is further configured to obtain a current frequency control word carried by the frequency control signal at a current moment if the frequency of the target clock signal is different from the frequency of the reference clock signal; If the frequency of the target clock signal is greater than the frequency of the reference clock signal, the upper boundary value of the current frequency control word is corrected to the value of the current frequency control word, and the value of the current frequency control word is corrected to an intermediate value between the corrected upper boundary value and the lower boundary value of the current frequency control word; If the frequency of the target clock signal is less than the frequency of the reference clock signal, the lower boundary value is corrected to the value of the current frequency control word, and the value of the current frequency control word is corrected to an intermediate value between the corrected lower boundary value and the upper boundary value; The frequency of the modified target clock signal is detected until the frequency of the modified target clock signal is the same as the frequency of the reference clock signal, or the current frequency control word is close to the upper boundary value or the lower boundary value of the current frequency control word, to obtain the target frequency control word.

12. The fast-locking all-digital phase-locked loop according to claim 11, characterized in that: The current frequency control word includes a current coarse adjustment control word, a current fine adjustment control word and a current decimal control word;The digital control module corrects the current frequency control word by sequentially correcting the current coarse adjustment control word, the current fine adjustment control word and the current fractional control word until the frequency of the corrected target clock signal is the same as the frequency of the reference clock signal, or the current fractional control word is close to the upper boundary value or the lower boundary value of the current fractional control word, thereby obtaining the target frequency control word.

13. The fast-locking all-digital phase-locked loop according to claim 1, characterized in that: The all-digital phase-locked loop also includes: The frequency division module is connected to the phase comparison module and the digital control oscillation module respectively, and is used for dividing the frequency of the target clock signal and then transmitting it to the phase comparison module.

14. The fast-locking all-digital phase-locked loop according to claim 1, characterized in that: The phase comparison module comprises: a digital phase detector connected to the digitally controlled oscillation module, for generating, according to the target clock signal and the reference clock signal, a phase advance signal for indicating that the reference clock signal leads the target clock signal, and a phase lag signal for indicating that the reference clock signal lags behind the target clock signal; The latch is connected to the digital phase detector, the filtering control module and the digital control module respectively, and is used to latch the phase lead signal and the phase lag signal, and integrate the latched phase lead signal and the phase lag signal to obtain the phase difference signal.

15. The all-digital phase-locked loop according to claim 1, characterized in that: The digital controlled oscillation module comprises: A coarse adjustment module, connected to the digital control module, and used to delay the output clock signal according to the coarse adjustment control word carried by the frequency control signal; A fine adjustment module is respectively connected to the coarse adjustment module and the digital control module, and is used to delay the output clock signal output by the coarse adjustment module according to the fine adjustment control word carried by the frequency control signal to obtain the target clock signal; wherein the delay step size of the coarse adjustment module is greater than the delay step size of the fine adjustment module.