CN111384947A - Method, circuit and clock generating device for preventing clock overshoot - Google Patents
Method, circuit and clock generating device for preventing clock overshoot Download PDFInfo
- Publication number
- CN111384947A CN111384947A CN201811648517.6A CN201811648517A CN111384947A CN 111384947 A CN111384947 A CN 111384947A CN 201811648517 A CN201811648517 A CN 201811648517A CN 111384947 A CN111384947 A CN 111384947A
- Authority
- CN
- China
- Prior art keywords
- phase
- frequency
- locked loop
- signal
- loop
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 22
- 230000009467 reduction Effects 0.000 claims abstract description 71
- 238000001514 detection method Methods 0.000 claims description 35
- 230000008859 change Effects 0.000 claims description 20
- 238000006243 chemical reaction Methods 0.000 claims 4
- 238000010586 diagram Methods 0.000 description 12
- 230000010355 oscillation Effects 0.000 description 11
- 238000013016 damping Methods 0.000 description 10
- 229920000729 poly(L-lysine) polymer Polymers 0.000 description 9
- 239000003990 capacitor Substances 0.000 description 8
- 230000008569 process Effects 0.000 description 5
- 230000000630 rising effect Effects 0.000 description 4
- 206010057249 Phagocytosis Diseases 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000008782 phagocytosis Effects 0.000 description 3
- 230000003111 delayed effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03L—AUTOMATIC CONTROL, STARTING, SYNCHRONISATION OR STABILISATION OF GENERATORS OF ELECTRONIC OSCILLATIONS OR PULSES
- H03L7/00—Automatic control of frequency or phase; Synchronisation
- H03L7/06—Automatic control of frequency or phase; Synchronisation using a reference signal applied to a frequency- or phase-locked loop
- H03L7/08—Details of the phase-locked loop
- H03L7/081—Details of the phase-locked loop provided with an additional controlled phase shifter
- H03L7/0812—Details of the phase-locked loop provided with an additional controlled phase shifter and where no voltage or current controlled oscillator is used
- H03L7/0814—Details of the phase-locked loop provided with an additional controlled phase shifter and where no voltage or current controlled oscillator is used the phase shifting device being digitally controlled
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03L—AUTOMATIC CONTROL, STARTING, SYNCHRONISATION OR STABILISATION OF GENERATORS OF ELECTRONIC OSCILLATIONS OR PULSES
- H03L7/00—Automatic control of frequency or phase; Synchronisation
- H03L7/06—Automatic control of frequency or phase; Synchronisation using a reference signal applied to a frequency- or phase-locked loop
- H03L7/16—Indirect frequency synthesis, i.e. generating a desired one of a number of predetermined frequencies using a frequency- or phase-locked loop
- H03L7/18—Indirect frequency synthesis, i.e. generating a desired one of a number of predetermined frequencies using a frequency- or phase-locked loop using a frequency divider or counter in the loop
Landscapes
- Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)
Abstract
Description
技术领域technical field
本发明涉及锁相环领域,尤其涉及一种防止时钟过冲的方法、电路及时钟产生装置。The present invention relates to the field of phase-locked loops, and in particular, to a method, a circuit and a clock generating device for preventing clock overshoot.
背景技术Background technique
锁相环路是一种反馈控制电路,称为锁相环(Phase-Locked Loop,简称PLL)。他利用外部输入的参考信号控制环路内部振荡信号的频率和相位。在处理电子信号过程中,因锁相环可以实现输出信号频率对输入信号频率的自动跟踪,所以锁相环通常广泛应用于闭环跟踪电路。在时钟领域,时钟锁相环被广泛应用于时钟的生成。A phase-locked loop is a feedback control circuit called a phase-locked loop (Phase-Locked Loop, PLL for short). He uses the external input reference signal to control the frequency and phase of the oscillating signal inside the loop. In the process of processing electronic signals, because the phase-locked loop can automatically track the frequency of the output signal to the frequency of the input signal, the phase-locked loop is usually widely used in closed-loop tracking circuits. In the field of clocks, clock phase-locked loops are widely used in clock generation.
如图1所示,时钟锁相环通常由几个部分组成:鉴相器PD、环路滤波器LPF、压控振荡器VCO、环路分频器LPDIV及后分频器PSTDIV,该后分频器PSTDIV可以让时钟输出范围更为广泛,或者是大幅度减小压控振荡器VCO的工作范围,因此可以降低设计难度,提高可靠性。As shown in Figure 1, the clock phase-locked loop usually consists of several parts: phase detector PD, loop filter LPF, voltage-controlled oscillator VCO, loop divider LPDIV and post-divider PSTDIV. The frequency converter PSTDIV can make the clock output range wider, or greatly reduce the working range of the voltage controlled oscillator VCO, so it can reduce the design difficulty and improve the reliability.
鉴相器PD,是一个完成相位比较的单元。其作用是比较输入信号Fin和反馈信号Fback之间的相位差。它的输出电压正比于两个输入信号之相位差。The phase detector PD is a unit that completes phase comparison. Its function is to compare the phase difference between the input signal Fin and the feedback signal Fback. Its output voltage is proportional to the phase difference between the two input signals.
低通滤波器LPF,是一个有源或无源低通滤波器。其作用是滤除鉴相器输出电压中的高频分量(包括混频及其他的高频噪声),起到平滑滤波的作用,最终输出控制信号Vc。通常由电阻、电容或电感等组成,有时也包含运算放大器。Low-pass filter LPF, is an active or passive low-pass filter. Its function is to filter out the high-frequency components (including mixing and other high-frequency noises) in the output voltage of the phase detector, play the role of smoothing and filtering, and finally output the control signal Vc. Usually consists of resistors, capacitors or inductors, etc., and sometimes includes operational amplifiers.
压控振荡器VCO,是一个振荡频率受控制电压控制的振荡器,其振荡频率与控制电压之间成线性关系。振荡器VCO根据控制信号Vc输出对应的振荡频率Fosc。The voltage controlled oscillator VCO is an oscillator whose oscillation frequency is controlled by a control voltage, and there is a linear relationship between the oscillation frequency and the control voltage. The oscillator VCO outputs the corresponding oscillation frequency Fosc according to the control signal Vc.
环路分频器LPDIV,决定了输入和振荡时钟的倍率,可是整数也可以是小数。关系是Fosc=N(lpdiv)*Fin。The loop divider LPDIV determines the multiplier of the input and oscillation clock, but the integer can also be a decimal. The relationship is Fosc=N(lpdiv)*Fin.
后分频器PSTDIV,重新决定Fosc需要做如何调整后再输出,可以是整数也可以是小数,最终时钟输出Fout=[N(lpdiv)/N(pstdiv)]*Fin。The post-scaler PSTDIV, re-determines how the Fosc needs to be adjusted before outputting, which can be an integer or a decimal, and the final clock output Fout=[N(lpdiv)/N(pstdiv)]*Fin.
通常来说,PLL时钟锁定后,由于反馈时钟与输入时钟的相位差稳定,因此能够输出稳定的时钟。当我们要改变PLL的输出频率Fout时,只需改变环路分频器对应的分频系数REG_LOOP和后分频器对应的分频系数REG_POST。Generally speaking, after the PLL clock is locked, since the phase difference between the feedback clock and the input clock is stable, a stable clock can be output. When we want to change the output frequency Fout of the PLL, we only need to change the frequency division coefficient REG_LOOP corresponding to the loop divider and the frequency division coefficient REG_POST corresponding to the post divider.
众所周知,描述二阶锁相环的方程是一个二阶非线性微分方程。二阶锁相环系统中压控振荡器VCO可以看成是一个理想的积分器。所以从系统的角度来看,如果低通滤波器LPF是一阶的,则锁相环PLL可以看成一个二阶系统。对一个二阶系统而言,存在固有频率ωn、阻尼系数ξ。如果突然改变系统内部的参数都将根据系统的特性发生一次本征的阻尼振荡。在同样的LPF条件下,VCO灵敏度越高,ξ越小,锁定很快,但是阻尼振荡的幅度就愈大;ξ越大,阻尼振荡的幅度就愈小,大于1时就没有阻尼振荡,但是锁定时间变得很长。由于阻尼因子无法准确控制,而通常PLL需要尽快锁定,因此输出存在一定幅度的振荡阻尼振荡。It is well known that the equation describing a second-order phase-locked loop is a second-order nonlinear differential equation. The voltage-controlled oscillator VCO in the second-order phase-locked loop system can be regarded as an ideal integrator. So from the system point of view, if the low-pass filter LPF is first-order, the phase-locked loop PLL can be regarded as a second-order system. For a second-order system, there are natural frequencies ωn and damping coefficients ξ. If the parameters inside the system are suddenly changed, an intrinsic damping oscillation will occur according to the characteristics of the system. Under the same LPF conditions, the higher the VCO sensitivity, the smaller the ξ, the faster the locking, but the larger the amplitude of the damping oscillation; the larger the ξ, the smaller the amplitude of the damping oscillation, and when it is greater than 1, there is no damping oscillation, but The lock time becomes very long. Since the damping factor cannot be accurately controlled, and usually the PLL needs to lock as quickly as possible, there is a certain amplitude of oscillation damping oscillation in the output.
当系统改变分频比后,PLL需要重新锁定,锁定行为需要一定时间。一般PLL,在锁定范围内的其二阶响应特性用阻尼因子表征。较快的锁定,阻尼因子小,出现较大的过冲;即使选取普通的阻尼因子0.45到0.7,也还是存在一定程度的过冲。When the system changes the frequency division ratio, the PLL needs to be locked again, and the locking behavior takes a certain time. In general PLLs, their second-order response characteristics in the locked range are characterized by a damping factor. The faster the locking, the smaller the damping factor, the larger the overshoot occurs; even if the common damping factor is selected from 0.45 to 0.7, there is still a certain degree of overshoot.
理论上和实际中,常规的过冲不会大于非常大,例如10%-20%。因此若系统提供足够安全裕度,是不会带来的太大问题。Theoretically and in practice, the conventional overshoot will not be larger than very large, such as 10%-20%. Therefore, if the system provides enough safety margin, it will not bring too much problem.
后分频器有个非常明显的特征:由于他不在环路内,不具有二阶系统的环路带宽特性,相对输出Fout是冲击式的瞬间响应,因此直接影响输出,在很多情况下将带来严重过冲问题。The post-frequency divider has a very obvious feature: because it is not in the loop and does not have the loop bandwidth characteristics of the second-order system, the relative output Fout is an impulsive instantaneous response, so it directly affects the output, and in many cases will bring serious overshoot problem.
结合图2,假设:输入时钟12.5MHz,时钟生成关系:Fout=[N(lpdiv)/N(pstdiv)]*Fin,系统要求时钟从375MHz提高到387.5MHz,仅需提高12.5MHz,频率切换是通过改变环路分频器和后分频器的分频系数实现的:切换前,环路分频系数为60,后分频系数为2;切换后,环路分频系数变为31,后分频系数变为1。在频率切换过程中,Fosc的频率只能通过环路来逐渐改变,环路滤波器有固定的带宽,Vc控制振荡器逐渐从750MHz变为387.5MHz;而后分频系数却能够瞬间从2变为1,从而导致Fout直接从当前的375MHz变为750MHz,因此引起了严重的过冲,系统经过长时间的巨大过冲后才稳定到387.5MHz。若后级CPU无法运行在如此高的频率,例如最多只能工作在500MHz频率,则将直接导致死机。Combined with Figure 2, it is assumed: the input clock is 12.5MHz, the clock generation relationship is: Fout=[N(lpdiv)/N(pstdiv)]*Fin, the system requires the clock to be increased from 375MHz to 387.5MHz, and only needs to be increased by 12.5MHz, and the frequency switching is It is realized by changing the frequency division coefficients of the loop divider and the post divider: before switching, the loop frequency division coefficient is 60, and the post frequency division coefficient is 2; after switching, the loop frequency division coefficient becomes 31, and the latter The frequency division factor becomes 1. In the process of frequency switching, the frequency of Fosc can only be gradually changed through the loop. The loop filter has a fixed bandwidth, and the Vc controlled oscillator gradually changes from 750MHz to 387.5MHz; however, the post-division coefficient can instantly change from 2 to 2. 1, which causes Fout to directly change from the current 375MHz to 750MHz, thus causing a serious overshoot, and the system stabilizes to 387.5MHz after a long period of huge overshoot. If the post-level CPU cannot run at such a high frequency, for example, it can only work at a frequency of 500MHz at most, it will directly lead to a crash.
假如CPU在1V下,最高工作频率仅为500MHz(虽然对于375MHz已经有非常大裕度),那么上面PLL的过冲频率750MH就必然导致系统出错。为了不让系统崩溃,就要求大幅度调高电压。但是也不少情况下,即使调高电压,CPU运行速度也无法一直提高,例如无法变快100%。If the CPU is under 1V, the maximum operating frequency is only 500MHz (although there is already a very large margin for 375MHz), then the overshoot frequency of the above PLL of 750MH will inevitably lead to system errors. In order to prevent the system from crashing, a large voltage increase is required. However, in many cases, even if the voltage is increased, the running speed of the CPU cannot be improved all the time, for example, it cannot be 100% faster.
发明内容SUMMARY OF THE INVENTION
本发明要解决的技术问题在于,针对现有技术中在通过改变环路分频器和后分频器的分频系数来调整PLL输出时钟时会发生过冲的缺陷,提供一种防止时钟过冲的方法、电路及时钟产生装置,可降低过冲风险。The technical problem to be solved by the present invention is that, in view of the defect in the prior art that overshoot occurs when the PLL output clock is adjusted by changing the frequency division coefficients of the loop frequency divider and the post-frequency divider, a method to prevent the clock from overshooting is provided. The method, circuit and clock generation device for overshoot can reduce the risk of overshoot.
本发明解决其技术问题所采用的技术方案是:构造一种防止时钟过冲的方法,应用在带后分频的锁相环中,所述锁相环包括鉴相器、低通滤波器、压控振荡器、环路分频器和后分频器,在通过改变环路分频器的分频系数及后分频器的分频系数来改变锁相环的输出信号的频率时,进行以下步骤:The technical solution adopted by the present invention to solve the technical problem is: constructing a method for preventing clock overshoot, which is applied in a phase-locked loop with post-frequency division, and the phase-locked loop includes a phase detector, a low-pass filter, The voltage controlled oscillator, the loop frequency divider and the post frequency divider are used to change the frequency of the output signal of the phase-locked loop by changing the frequency division coefficient of the loop frequency divider and the frequency division coefficient of the post frequency divider. The following steps:
获取锁相环的后分频控制信号,并判断所述后分频控制信号是否发生变化;Obtain the post-frequency division control signal of the phase-locked loop, and determine whether the post-frequency division control signal changes;
在所述后分频控制信号发生变化时,获取锁相环的输入信号和反馈信号,并根据所述输入信号及所述反馈信号确定锁相环的当前状态,所述锁相环的状态包括锁定状态和失锁状态;When the post-frequency division control signal changes, the input signal and feedback signal of the phase-locked loop are acquired, and the current state of the phase-locked loop is determined according to the input signal and the feedback signal, and the state of the phase-locked loop includes: Locked state and unlocked state;
在当前状态为失锁状态时,对锁相环的输出信号进行降频处理,并将降频处理后的信号作为时钟信号;When the current state is an out-of-lock state, the output signal of the phase-locked loop is subjected to frequency reduction processing, and the signal after frequency reduction processing is used as a clock signal;
在当前状态为锁定状态时,直接将锁相环的输出信号作为时钟信号。When the current state is the locked state, the output signal of the phase-locked loop is directly used as the clock signal.
优选地,获取锁相环的后分频控制信号,并判断所述后分频控制信号是否发生变化,包括:Preferably, acquiring the post-frequency division control signal of the phase-locked loop, and judging whether the post-frequency division control signal has changed, includes:
获取锁相环的后分频控制信号及环路分频控制信号,并判断所述后分频控制信号及所述环路分频控制信号是否发生变化。Obtain the post-frequency division control signal and the loop frequency division control signal of the phase-locked loop, and determine whether the post-frequency division control signal and the loop frequency division control signal change.
优选地,根据所述输入信号及所述反馈信号确定锁相环的当前状态,包括:Preferably, the current state of the phase-locked loop is determined according to the input signal and the feedback signal, including:
将所述输入信号与所述反馈信号进行比较,并判断两者的差异是否小于阈值;Comparing the input signal with the feedback signal, and judging whether the difference between the two is less than a threshold;
若预设时段内两者的差异均小于阈值,则确定锁相环的当前状态为锁定状态;If the difference between the two within the preset period is less than the threshold, it is determined that the current state of the phase-locked loop is the locked state;
若预设时段内两者的差异不小于阈值,则确定锁相环的当前状态为失锁状态。If the difference between the two within the preset time period is not less than the threshold, it is determined that the current state of the phase-locked loop is an out-of-lock state.
优选地,对锁相环的输出信号进行降频处理,包括:Preferably, frequency reduction processing is performed on the output signal of the phase-locked loop, including:
通过降频装置对锁相环的输出信号进行降频处理,而且,满足以下条件:The output signal of the phase-locked loop is subjected to frequency reduction processing by the frequency reduction device, and the following conditions are met:
N(safdiv)≥N(lpdiv)/N(lpdiv_new),N(safdiv)≥N(lpdiv)/N(lpdiv_new),
其中,N(safdiv)为所述降频装置的降频系数,N(lpdiv)为环路分频器改变前的分频系数,N(lpdiv_new)为环路分频器改变后的分频系数。Wherein, N(safdiv) is the frequency reduction coefficient of the frequency reduction device, N(lpdiv) is the frequency division coefficient before the loop frequency divider is changed, and N(lpdiv_new) is the frequency division coefficient after the loop frequency divider is changed .
本发明还构造一种防止时钟过冲的电路,应用在带后分频的锁相环中,所述锁相环包括鉴相器、低通滤波器、压控振荡器、环路分频器和后分频器,所述防止时钟过冲的电路包括:The invention also constructs a circuit for preventing clock overshoot, which is applied in a phase-locked loop with post-frequency division, and the phase-locked loop includes a phase detector, a low-pass filter, a voltage-controlled oscillator, and a loop frequency divider and a postscaler, the circuit for preventing clock overshoot includes:
控制检测模块,用于获取锁相环的后分频控制信号,并判断所述后分频控制信号是否发生变化;a control detection module, used for acquiring the post-frequency division control signal of the phase-locked loop, and judging whether the post-frequency division control signal changes;
状态检测模块,用于在所述后分频控制信号发生变化时,获取锁相环的输入信号和反馈信号,并根据所述输入信号及所述反馈信号确定锁相环的当前状态,所述锁相环的状态包括锁定状态和失锁状态;The state detection module is used to obtain the input signal and feedback signal of the phase-locked loop when the post-frequency division control signal changes, and determine the current state of the phase-locked loop according to the input signal and the feedback signal, and the The state of the phase-locked loop includes a locked state and an unlocked state;
安全降频模块,用于在当前状态为失锁状态时,对锁相环的输出信号进行降频处理,并将降频处理后的信号作为时钟信号;在当前状态为锁定状态时,直接将锁相环的输出信号作为时钟信号。The safety frequency reduction module is used to perform frequency reduction processing on the output signal of the phase-locked loop when the current state is the loss-of-lock state, and use the frequency-reduced signal as the clock signal; when the current state is the locked state, directly convert the The output signal of the phase-locked loop is used as the clock signal.
优选地,所述控制检测模块包括第三延时器及同或门,其中,所述第三延时器的输入端连接所述后分频器的控制端,以用于输入后分频控制信号,所述第三延时器的输出端连接所述同或门的第一输入端,所述同或门的第二输入端连接所述后分频器的控制端,所述同或门的输出端连接所述状态检测模块。Preferably, the control and detection module includes a third delay device and an OR gate, wherein the input end of the third delay device is connected to the control end of the post-frequency divider for inputting the post-frequency divider control signal, the output end of the third delay device is connected to the first input end of the XOR gate, the second input end of the XOR gate is connected to the control end of the post-frequency divider, the XOR gate The output end is connected to the state detection module.
优选地,所述状态检测模块包括:第一延时器、第二延时器、第一D触发器、第二D触发器和与门,其中,所述第一延时器的输入端连接锁相环的输入端,以用于输入锁相环的输入信号,所述第一延时器的输出端连接所述第一D触发器的时钟端,所述第一D触发器的数据输入端连接锁相环的反馈端,以用于输入锁相环的反馈信号,所述第一D触发器的数据输出端连接所述与门的第一输入端;所述第二延时器的输入端连接锁相环的反馈端,以用于输入锁相环的反馈信号,所述第二延时器的输出端连接所述第二D触发器的时钟端,所述第二D触发器的数据输入端连接锁相环的输入端,以用于输入锁相环的输入信号,所述第二D触发器的数据输出端连接所述与门的第二输入端,所述与门的输出端用于输出状态信号,所述第一D触发器和所述第二D触发器的复位端分别连接所述同或门的输出端。优选地,所述安全降频模块包括降频装置和切换开关,所述降频装置的输入端及所述切换开关的第一输入端均连接锁相环的输出端,以用于输入锁相环的输出信号,所述降频装置的输出端连接所述切换开关的第二输入端,所述切换开关的控制端连接所述与门的输出端,所述切换开关的输出端用于输出时钟信号。Preferably, the state detection module includes: a first delay device, a second delay device, a first D flip-flop, a second D flip-flop and an AND gate, wherein the input end of the first delay device is connected to The input terminal of the phase-locked loop is used to input the input signal of the phase-locked loop, the output terminal of the first delay device is connected to the clock terminal of the first D flip-flop, and the data input of the first D flip-flop is The terminal is connected to the feedback terminal of the phase-locked loop for inputting the feedback signal of the phase-locked loop, the data output terminal of the first D flip-flop is connected to the first input terminal of the AND gate; The input end is connected to the feedback end of the phase-locked loop for inputting the feedback signal of the phase-locked loop, the output end of the second delay device is connected to the clock end of the second D flip-flop, the second D flip-flop The data input end of the second D flip-flop is connected to the input end of the phase-locked loop for inputting the input signal of the phase-locked loop, the data output end of the second D flip-flop is connected to the second input end of the AND gate, the The output terminal is used for outputting a state signal, and the reset terminals of the first D flip-flop and the second D flip-flop are respectively connected to the output terminal of the XOR gate. Preferably, the safety frequency reduction module includes a frequency reduction device and a switch, and the input terminal of the frequency reduction device and the first input terminal of the switch switch are both connected to the output terminal of the phase-locked loop for inputting the phase-locked loop. The output signal of the loop, the output terminal of the frequency reduction device is connected to the second input terminal of the switch, the control terminal of the switch switch is connected to the output terminal of the AND gate, and the output terminal of the switch switch is used for output clock signal.
优选地,还包括:Preferably, it also includes:
降频控制模块,用于在所述后分频控制信号发生变化时,根据锁相环的环路分频控制信号获取环路分频器改变后的分频系数,并根据环路分频器改变前的分频系数及改变后的分频系数确定所述降频装置的降频系数,而且,所述降频装置的降频系数满足以下条件:The frequency reduction control module is used to obtain the frequency division coefficient changed by the loop frequency divider according to the loop frequency division control signal of the phase-locked loop when the post frequency division control signal changes, and according to the loop frequency divider The frequency division coefficient before the change and the frequency division coefficient after the change determine the frequency reduction coefficient of the frequency reduction device, and the frequency reduction coefficient of the frequency reduction device satisfies the following conditions:
N(safdiv)≥N(lpdiv)/N(lpdiv_new),N(safdiv)≥N(lpdiv)/N(lpdiv_new),
其中,N(safdiv)为所述降频装置的降频系数,N(lpdiv)为环路分频器改变前的分频系数,N(lpdiv_new)为环路分频器改变后的分频系数。Wherein, N(safdiv) is the frequency reduction coefficient of the frequency reduction device, N(lpdiv) is the frequency division coefficient before the loop frequency divider is changed, and N(lpdiv_new) is the frequency division coefficient after the loop frequency divider is changed .
本发明还构造一种时钟产生装置,包括锁相环,所述锁相环包括鉴相器、低通滤波器、压控振荡器、环路分频器和后分频器,其特征在于,所述时钟产生装置还包括以上所述的防止时钟过冲的电路。The present invention also constructs a clock generation device, comprising a phase-locked loop, the phase-locked loop comprising a phase detector, a low-pass filter, a voltage-controlled oscillator, a loop frequency divider and a post-frequency divider, characterized in that: The clock generating apparatus further includes the above-mentioned circuit for preventing clock overshoot.
实施本发明的技术方案,在通过改变环路分频器和后分频器的分频系数来调整锁相环输出信号的频率时,若检测到后分频器的分频系数改变,则可根据输入信号和反馈信号判断当前处于失锁状态还是锁定状态,并且在失锁状态下,对锁相环的输出信号进行降频处理,以消除过冲的风险。一旦判断出处于锁定状态,就输出已经稳定的目标频率信号。因此,每次频率切换时间都是自适应的、是系统最短的,而且,在切换期间,还能以零成本向系统提供当前能提供的最高速安全时钟,发挥CPU处理能力,从而以最高速、安全的频率运行后续软件程序。因此,相比现有技术,能够更低成本、更可靠、更快速提供可用时钟,能提高软件运行效能,节省功耗。Implementing the technical scheme of the present invention, when adjusting the frequency of the phase-locked loop output signal by changing the frequency division coefficients of the loop frequency divider and the post-frequency divider, if it is detected that the frequency-division coefficient of the post-frequency divider is changed, it can be adjusted. According to the input signal and the feedback signal, it is judged whether it is currently in an out-of-lock state or in a locked state, and in the out-of-lock state, the output signal of the phase-locked loop is frequency-reduced to eliminate the risk of overshoot. Once it is judged that it is in the locked state, the stable target frequency signal is output. Therefore, each frequency switching time is self-adaptive and the shortest in the system. Moreover, during the switching period, the highest-speed safe clock currently available can be provided to the system at zero cost, and the processing power of the CPU can be used to achieve the highest speed. , Run subsequent software programs at a safe frequency. Therefore, compared with the prior art, a usable clock can be provided at a lower cost, more reliably, and faster, the software running efficiency can be improved, and power consumption can be saved.
附图说明Description of drawings
为了更清楚地说明本发明实施例,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。附图中:In order to illustrate the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, which are common in the art. As far as technical personnel are concerned, other drawings can also be obtained based on these drawings without any creative effort. In the attached picture:
图1是现有技术的一种锁相环的逻辑结构图;Fig. 1 is the logical structure diagram of a kind of phase-locked loop of the prior art;
图2是图1中的锁相环在重新锁定的过程中时钟信号与时间的仿真图;Fig. 2 is the simulation diagram of clock signal and time in the process of re-locking of the phase-locked loop in Fig. 1;
图3是本发明防止时钟过冲的方法实施例一的流程图;3 is a flowchart of Embodiment 1 of the method for preventing clock overshoot according to the present invention;
图4是采用图3中的方法后锁相环在重新锁定的过程中时钟信号与时间的仿真图;Fig. 4 is the simulation diagram of clock signal and time in the process of relocking after adopting the method in Fig. 3;
图5是本发明时钟产生装置实施例一的逻辑结构图;FIG. 5 is a logical structure diagram of Embodiment 1 of the clock generating apparatus of the present invention;
图6是图5中控制检测模块实施例一的逻辑结构图;Fig. 6 is the logical structure diagram of the first embodiment of the control detection module in Fig. 5;
图7是图5中状态检测模块实施例一的逻辑结构图;Fig. 7 is the logical structure diagram of the first embodiment of the state detection module in Fig. 5;
图8是图5中状态检测模块实施例二的逻辑结构图;Fig. 8 is the logical structure diagram of the second embodiment of the state detection module in Fig. 5;
图9是图5中状态检测模块实施例三的逻辑结构图;Fig. 9 is the logical structure diagram of the third embodiment of the state detection module in Fig. 5;
图10是图5中状态检测模块实施例四的逻辑结构图;Fig. 10 is the logical structure diagram of the fourth embodiment of the state detection module in Fig. 5;
图11是图5中状态检测模块实施例五的逻辑结构图;Fig. 11 is the logical structure diagram of the fifth embodiment of the state detection module in Fig. 5;
图12是图5中安全降频模块实施例一的逻辑结构图。FIG. 12 is a logical structural diagram of Embodiment 1 of the safety frequency reduction module in FIG. 5 .
具体实施方式Detailed ways
下面结合附图详细说明本发明的具体实施方式。The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
在此记载的具体实施方式/实施例为本发明的特定的具体实施方式,用于说明本发明的构思,均是解释性和示例性的,不应解释为对本发明实施方式及本发明范围的限制。除在此记载的实施例外,本领域技术人员还能够基于本申请权利要求书和说明书所公开的内容采用显而易见的其它技术方案,这些技术方案包括采用对在此记载的实施例的做出任何显而易见的替换和修改的技术方案,都在本发明的保护范围之内。The specific implementations/examples described herein are specific implementations of the present invention, and are used to illustrate the concept of the present invention. They are all illustrative and exemplary, and should not be construed as limiting the implementation of the present invention and the scope of the present invention. limit. In addition to the embodiments described herein, those skilled in the art can also adopt other obvious technical solutions based on the contents disclosed in the claims and the description of the present application, and these technical solutions include any obvious technical solutions to the embodiments described herein. The technical solutions of replacement and modification are all within the protection scope of the present invention.
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict.
图3是本发明防止时钟过冲的方法实施例一的流程图,该实施例的方法应用在带后分频的锁相环中,该锁相环包括鉴相器、低通滤波器、压控振荡器、环路分频器和后分频器。在该实施例中,在通过改变环路分频器的分频系数及后分频器的分频系数来改变锁相环输出信号的频率时,进行以下步骤:3 is a flowchart of Embodiment 1 of the method for preventing clock overshoot according to the present invention. The method of this embodiment is applied to a phase-locked loop with post-frequency division. The phase-locked loop includes a phase detector, a low-pass filter, a voltage controlled oscillator, loop divider and postscaler. In this embodiment, when changing the frequency of the phase-locked loop output signal by changing the frequency dividing coefficient of the loop frequency divider and the frequency dividing coefficient of the post-frequency divider, the following steps are performed:
步骤S10.获取锁相环的后分频控制信号,并判断所述后分频控制信号是否发生变化;Step S10. Obtain the post-frequency division control signal of the phase-locked loop, and determine whether the post-frequency division control signal changes;
在该步骤中,若监测到后分频控制信号有变化,则可发出一简单的脉冲信号。In this step, if a change in the post-frequency division control signal is monitored, a simple pulse signal can be sent out.
步骤S20.在所述后分频控制信号发生变化时,获取锁相环的输入信号和反馈信号,并根据所述输入信号及所述反馈信号确定锁相环的当前状态,所述锁相环的状态包括锁定状态和失锁状态;Step S20. When the post-frequency division control signal changes, obtain the input signal and the feedback signal of the phase-locked loop, and determine the current state of the phase-locked loop according to the input signal and the feedback signal, and the phase-locked loop The state includes locked state and unlocked state;
在该步骤中,首先需说明的是,锁相环在锁定状态下,其输入信号和反馈信号的上升沿是对齐的(相位差恒定)。而当环路分频器的分频系数改变后,锁相环的反馈信号就会发生变化,通过检测反馈信号的变化(输入信号的频率不变)就可确定当前状态是处于锁定状态,还是处于失锁状态。In this step, it should be noted first that when the phase-locked loop is in a locked state, the rising edges of the input signal and the feedback signal are aligned (the phase difference is constant). When the frequency division coefficient of the loop frequency divider is changed, the feedback signal of the phase-locked loop will change. in an out-of-lock state.
步骤S30.在当前状态为失锁状态时,对锁相环的输出信号进行降频处理,并将降频处理后的信号作为时钟信号;Step S30. When the current state is an out-of-lock state, down-frequency processing is performed on the output signal of the phase-locked loop, and the down-frequency processed signal is used as a clock signal;
在该步骤中,锁相环在失锁状态下由于会发生过冲,所以可对锁相环在失锁状态下的输出信号进行降频处理,即,将阻尼振荡频率强制降低,然后再作为时钟信号,可降低过冲风险。In this step, since overshoot will occur in the phase-locked loop in the out-of-lock state, the output signal of the phase-locked loop in the out-of-lock state can be down-frequency processed, that is, the damped oscillation frequency is forcibly reduced, and then used as clock signal to reduce the risk of overshoot.
步骤S30.在当前状态为锁定状态时,直接将锁相环的输出信号作为时钟信号。Step S30. When the current state is the locked state, the output signal of the phase-locked loop is directly used as the clock signal.
结合图4,首先,假设锁相环的输入信号的频率为12.5MHz,时钟生成关系:Fout=[N(lpdiv)/N(pstdiv)]*Fin,系统要求时钟从375MHz提高到387.5MHz,频率切换是通过改变环路分频器和后分频器的分频系数实现的:切换前,环路分频器的分频系数为60,后分频器的分频系数为2;切换后,环路分频器的分频系数变为31,后分频器的分频系数变为1。从图中可明显看出,在失锁状态下,由于采用对输出信号进行了降频,所以原来的过冲频率点750MHz并未出现而且,锁相环在重新稳定后输出频率为387.5MHz的输出信号。Combining with Figure 4, first, assuming that the frequency of the input signal of the phase-locked loop is 12.5MHz, the clock generation relationship is: Fout=[N(lpdiv)/N(pstdiv)]*Fin, the system requires the clock to be increased from 375MHz to 387.5MHz, and the frequency The switching is achieved by changing the frequency division coefficients of the loop divider and the post divider: before switching, the frequency division coefficient of the loop divider is 60, and the frequency division coefficient of the post divider is 2; The division factor of the loop divider becomes 31, and the division factor of the post divider becomes 1. It can be seen from the figure that in the loss-of-lock state, the original overshoot frequency of 750MHz does not appear due to the frequency reduction of the output signal. Moreover, the output frequency of the phase-locked loop is 387.5MHz after re-stabilization output signal.
实施该实施例的技术方案,在通过改变环路分频器和后分频器的分频系数来调整锁相环输出信号的频率时,若检测到后分频器的分频系数改变,则可根据输入信号和反馈信号判断当前处于失锁状态还是锁定状态,并且在失锁状态下,对锁相环的输出信号进行降频处理,以消除过冲的风险。一旦判断出处于锁定状态,就输出已经稳定的目标频率信号。因此,每次频率切换时间都是自适应的、是系统最短的,而且,在切换期间,还能以零成本向系统提供当前能提供的最高速安全时钟,发挥CPU处理能力,从而以最高速、安全的频率运行后续软件程序。因此,相比现有技术,能够更低成本、更可靠、更快速提供可用时钟,能提高软件运行效能,节省功耗。Implementing the technical solution of this embodiment, when adjusting the frequency of the phase-locked loop output signal by changing the frequency division coefficients of the loop frequency divider and the post frequency divider, if it is detected that the frequency division coefficient of the post frequency divider changes, then According to the input signal and the feedback signal, it can be judged whether it is currently in an out-of-lock state or in a locked state, and in the out-of-lock state, the output signal of the phase-locked loop is frequency-reduced to eliminate the risk of overshoot. Once it is judged that it is in the locked state, the stable target frequency signal is output. Therefore, each frequency switching time is self-adaptive and the shortest in the system. Moreover, during the switching period, the highest-speed safe clock currently available can be provided to the system at zero cost, and the processing power of the CPU can be used to achieve the highest speed. , Run subsequent software programs at a safe frequency. Therefore, compared with the prior art, a usable clock can be provided at a lower cost, more reliably, and faster, the software running efficiency can be improved, and power consumption can be saved.
在一个可选实施例中,步骤S10为:获取锁相环的后分频控制信号及环路分频控制信号,并判断所述后分频控制信号及所述环路分频控制信号是否发生变化。在该实施例中,可同时获取后分频控制信号及环路分频控制信号,并判断这两个信号是否变化,因为一般情况下,后分频控制信号及环路分频控制信号是同时发出的。当然,在其它实施例中,也可仅获取并检测后分频控制信号,因为即使不捕捉环路分频控制信号,也能在步骤S20中通过检测锁相环的输入信号和反馈信号来判断环路分频控制信号是否发生变化。In an optional embodiment, step S10 is: acquiring the post-frequency division control signal and the loop frequency division control signal of the phase-locked loop, and judging whether the post-frequency division control signal and the loop frequency division control signal occur Variety. In this embodiment, the post-frequency division control signal and the loop frequency division control signal can be obtained at the same time, and it is determined whether these two signals change, because in general, the post-frequency division control signal and the loop frequency division control signal are at the same time dispatched. Of course, in other embodiments, only the post-frequency division control signal may be acquired and detected, because even if the loop frequency division control signal is not captured, it can be determined by detecting the input signal and the feedback signal of the phase-locked loop in step S20. Whether the loop frequency division control signal changes.
在一个可选实施例中,步骤S20中,可根据以下方式确定锁相环的当前状态:将所述输入信号与所述反馈信号进行比较,并判断两者的差异是否小于阈值;若预设时段内两者的差异均小于阈值,则确定锁相环的当前状态为锁定状态;若预设时段内两者的差异不小于阈值,则确定锁相环的当前状态为失锁状态。In an optional embodiment, in step S20, the current state of the phase-locked loop may be determined according to the following methods: comparing the input signal with the feedback signal, and judging whether the difference between the two is less than a threshold; if preset If the difference between the two during the period is less than the threshold, the current state of the phase-locked loop is determined to be the locked state; if the difference between the two within the preset time period is not less than the threshold, the current state of the phase-locked loop is determined to be the out-of-lock state.
需要说明的是,阈值的确定与PLL的特性以及对锁定精度要求等有关,可以根据需要设置,例如振荡器的一个时钟周期。It should be noted that the determination of the threshold is related to the characteristics of the PLL and the requirements for locking accuracy, etc., and can be set as required, for example, one clock cycle of the oscillator.
在一个可选实施例中,步骤S30中,可根据以下方式进行降频处理:通过降频装置对锁相环的输出信号进行降频处理,而且,满足以下条件:In an optional embodiment, in step S30, frequency reduction processing may be performed in the following manner: frequency reduction processing is performed on the output signal of the phase-locked loop by a frequency reduction device, and the following conditions are met:
N(safdiv)≥N(lpdiv)/N(lpdiv_new),N(safdiv)≥N(lpdiv)/N(lpdiv_new),
其中,N(safdiv)为所述降频装置的降频系数,N(lpdiv)为环路分频器改变前的分频系数,N(lpdiv_new)为环路分频器改变后的分频系数。Wherein, N(safdiv) is the frequency reduction coefficient of the frequency reduction device, N(lpdiv) is the frequency division coefficient before the loop frequency divider is changed, and N(lpdiv_new) is the frequency division coefficient after the loop frequency divider is changed .
在该实施例中,由于锁相环中后分频器的存在,根据Fout=[N(lpdiv)/N(pstdiv)]*Fin,其中,Fin为锁相环的输入信号的频率,Fout为锁相环的输出信号的频率,N(lpdiv)为环路分频器的分频系数,N(pstdiv)为后分频器的分频系数。当后分频器的分频系数调整为N(pstdiv_new)时,压控振荡器的输出频率Fosc并没有立刻变化,依然是Fosc=N(lpdiv)*Fin。因此,输出信号的频率瞬间变化为Fout_over=[N(lpdiv)/N(pstdiv_new)]*Fin,过冲频率相对最终输出频率之比就是K=Fout_over/Fout_new=N(lpdiv)/N(lpdiv_new)。当降频系数N(safdiv)大于等于K时,刚刚好没有过冲。由于每次切换时环路分频器的分频系数的数值范围是不同的,可以每次通过计算将对应的K值,当然,也可以将可K值简单设定为:lpdiv(max)/lpdiv(min)。In this embodiment, due to the existence of the post-frequency divider in the phase-locked loop, according to Fout=[N(lpdiv)/N(pstdiv)]*Fin, where Fin is the frequency of the input signal of the phase-locked loop, and Fout is The frequency of the output signal of the phase-locked loop, N(lpdiv) is the frequency division coefficient of the loop frequency divider, and N(pstdiv) is the frequency division coefficient of the post-frequency divider. When the frequency division coefficient of the post-scaler is adjusted to N(pstdiv_new), the output frequency Fosc of the voltage-controlled oscillator does not change immediately, and is still Fosc=N(lpdiv)*Fin. Therefore, the frequency of the output signal changes instantaneously as Fout_over=[N(lpdiv)/N(pstdiv_new)]*Fin, and the ratio of the overshoot frequency to the final output frequency is K=Fout_over/Fout_new=N(lpdiv)/N(lpdiv_new) . When the frequency reduction coefficient N (safdiv) is greater than or equal to K, there is just no overshoot. Since the numerical range of the frequency division coefficient of the loop frequency divider is different each time it is switched, the corresponding K value can be calculated each time. Of course, the K value can also be simply set as: lpdiv(max)/ lpdiv(min).
另外,还需说明的是,对于带后分频的锁相环,如果仅通过改变其环路分频器的分频系数来改变输出信号的频率,即,后分频器的分频系数没有变化,理论上要将输出信号的频率降低X倍就可以,根据实际电路,常规的过冲只会在10%-20%之间,因此,只需设置X大于1.1就可消除过冲风险,优选地,X可选择1.5。因此,对于带后分频的锁相环,如果一些应用场景要求其仅通过改变其环路分频器的分频系数来改变输出信号的频率,而另一些应用场景要求通过同时改变其环路分频器和后分频器的分频系数来改变输出信号的频率,则关于降频装置的降频系数N(safdiv),只要保证其大于X和K两者中的较大者即可。In addition, it should be noted that for a phase-locked loop with post-frequency division, if the frequency of the output signal is changed only by changing the frequency-division coefficient of its loop frequency divider, that is, the frequency-division coefficient of the post-frequency divider does not In theory, the frequency of the output signal should be reduced by X times. According to the actual circuit, the conventional overshoot will only be between 10% and 20%. Therefore, it is only necessary to set X greater than 1.1 to eliminate the risk of overshoot. Preferably, X can be selected as 1.5. Therefore, for a phase-locked loop with post-frequency division, if some application scenarios require it to change the frequency of the output signal only by changing the frequency division coefficient of its loop divider, while other application scenarios require it to change the frequency of its loop simultaneously The frequency division coefficient of the frequency divider and the post-frequency divider is used to change the frequency of the output signal. As for the frequency reduction coefficient N (safdiv) of the frequency reduction device, it is only necessary to ensure that it is greater than the larger of X and K.
图5是本发明时钟产生装置实施例一的逻辑结构图,该实施例的时钟产生装置包括锁相环10及防止时钟过冲的电路。其中,该锁相环10为带后分频的锁相环,且具体包括鉴相器11、低通滤波器12、压控振荡器13、环路分频器14和后分频器15,应理解,锁相环10中的鉴相器11、低通滤波器12、压控振荡器13、环路分频器14和后分频器15的功能、具体实现及逻辑关系可以采用本领域的公知做法,在此不做赘述。防止时钟过冲的电路具体包括控制检测模块40、状态检测模块20及安全降频模块30,而且,控制检测模块40用于获取锁相环的后分频控制信号,并判断所述后分频控制信号是否发生变化;状态检测模块20用于在所述后分频控制信号发生变化时,获取锁相环的输入信号和反馈信号,并根据所述输入信号及所述反馈信号确定锁相环的当前状态,所述锁相环的状态包括锁定状态和失锁状态;安全降频模块30用于在当前状态为失锁状态时,对锁相环的输出信号进行降频处理,并将降频处理后的信号作为时钟信号;在当前状态为锁定状态时,直接将锁相环的输出信号作为时钟信号。FIG. 5 is a logical structure diagram of Embodiment 1 of the clock generation apparatus of the present invention. The clock generation apparatus of this embodiment includes a phase-locked loop 10 and a circuit for preventing clock overshoot. The phase-locked loop 10 is a phase-locked loop with post-frequency division, and specifically includes a phase detector 11, a low-pass filter 12, a voltage-controlled oscillator 13, a loop frequency divider 14 and a
在该实施例中,结合图5,控制检测模块40接收后分频器控制信号REG_POST;若监测到该信号有变化,则向状态检测模块20发出一信号,例如为一简单的脉冲信号,状态检测模块20通过比较输入信号Fin和反馈时钟Fback,并根据两者的差异大小输出状态信号LCK,例如,LCK为0代表失锁状态,LCK为1代表锁定状态。安全降频模块30根据锁定状态信号LCK来决定是否对后分频器15的输出信号进行降频处理,待重新锁定后才直接输出后分频器15的输出信号。In this embodiment, with reference to FIG. 5 , the
在一个可选实施例中,状态检测模块20用于将所述输入信号与所述反馈信号进行比较,并判断两者的差异是否小于阈值,若预设时段内两者的差异均小于阈值,即,一定时间内一直满足要求则表示锁定,此时,确定锁相环的当前状态为锁定状态;若预设时段内两者的差异不小于阈值,则确定锁相环的当前状态为失锁状态。In an optional embodiment, the
在一个可选实施例中,结合图6,控制检测模块包括第三延时器41及同或门42,其中,第三延时器41的输入端连接后分频器的控制端,以用于输入后分频控制信号REG_POST,第三延时器41的输出端连接同或门42的第一输入端,同或门42的第二输入端连接后分频器的控制端,同或门42的输出端用于输出复位信号Rst,并连接至状态检测模块。在该实施例中,只要后分频控制信号REG_POST发生了变化,那么同或门42就会产生一个时间宽度为第三延时器42的延时时间大小的负脉冲。In an optional embodiment, referring to FIG. 6 , the control detection module includes a third delay device 41 and an
在一个可选实施例中,结合图7,该实施例的状态检测模块采用交叉延时锁存结构来实现,具体地,该状态检测模块包括:第一延时器21、第二延时器22、第一D触发器23、第二D触发器24和与门25,关于第一延时器21和第二延时器22,需说明的是,其延时时间应大于D触发器的建立时间,且小于输出信号的周期,在实际应用中,两个延时器的延时时间可设计在合理范围内。在该实施例中,第一延时器21的输入端连接锁相环的输入端,以用于输入锁相环的输入信号Fin,第一延时器21的输出端连接第一D触发器23的时钟端,第一D触发器23的数据输入端连接锁相环的反馈端,以用于输入锁相环的反馈信号Fback,第一D触发器23的数据输出端连接与门25的第一输入端;第二延时器22的输入端连接锁相环的反馈端,以用于输入锁相环的反馈信号Fback,第二延时器22的输出端连接第二D触发器24的时钟端,第二D触发器24的数据输入端连接锁相环的输入端,以用于输入锁相环的输入信号Fin,第二D触发器24的数据输出端连接与门25的第二输入端,与门25的输出端用于输出状态信号LCK,第一D触发器23和第二D触发器24的复位端分别连接同或门42的输出端,以用于输入复位信号。In an optional embodiment, with reference to FIG. 7 , the state detection module of this embodiment is implemented by a cross-delayed latch structure. Specifically, the state detection module includes: a first delay device 21 , a second delay device 22. The first D flip-
需要说明的是,本申请中的连接关系包括但不限于两个输入端基于用于接收相同输入信号而产生的连接关系,输出端与输入端连接产生的连接关系等。It should be noted that the connection relationship in this application includes, but is not limited to, the connection relationship between the two input ends based on receiving the same input signal, the connection relationship between the output end and the input end, and the like.
下面结合图5-7说明锁相环的状态检测工作过程:锁相环在锁定期间输入信号Fin和反馈信号Fback的上升沿是对齐的(相位差恒定),延迟任何一方的上升沿都能抓取到对方的高电平,两个D触发器23、24的输出信号始终都是1。当后分频器的分频系数改变,即,后分频控制信号改变时,两个D触发器23、24会短暂地复位以下,然后,由于环路分频器的分频系数改变,所以,锁相环的输出信号Fback就发生变化,其新的上升沿会与输入信号Fin相差一个或多个输出信号Fosc的周期。若是锁相环调高输出频率,即分频系数增大(例如从N变为N+K),则Fback将比Fin延迟K个周期,此时,第一D触发器23将输出0,从而使与门25输出的LCK信号为0,即,发出失锁信号。接着,输出信号Fosc在环路的作用下逐渐加快直到发生过冲,这时,反馈信号Fback的边沿将会领先输入信号Fin的边沿,第二D触发器24又将输出0,从而使与门25继续输出的LCK信号为0。只有在反馈信号Fback与输入信号Fin的边沿重新对齐到一定范围内时,两个D触发器23、24才又输出1,从而使与门输出的LCK信号为1,即,发出锁定信号。The state detection process of the phase-locked loop is described below in conjunction with Figure 5-7: the rising edge of the input signal Fin and the feedback signal Fback of the phase-locked loop are aligned during the locking period (the phase difference is constant), and the rising edge of either side can be delayed. When the high level of the other side is obtained, the output signals of the two D flip-
在一个可选实施例中,参照图8,该实施例的状态检测模块包括:异或门221、脉冲吞噬模块222和反相器223,所述异或门221的第一输入端用于输入所述锁相环的输入信号Fin,所述异或门221的第二输入端用于输入所述锁相环的反馈信号Fback,所述异或门221的输出端与所述脉冲吞噬模块222的输入端连接,所述脉冲吞噬模块222的输出端与所述反相器223的输入端连接,所述反相器223的输出端与所述安全降频模块30的控制端连接,用于输出状态信号LCK至所述安全降频模块30。In an optional embodiment, referring to FIG. 8 , the state detection module of this embodiment includes: an
在一个可选实施例中,参照图9,该实施例的状态检测模块包括:异或门231、电阻R1、电容C1和反相器232,所述异或门231的第一输入端用于输入所述锁相环的输入信号Fin,所述异或门231的第二输入端用于输入所述锁相环的反馈信号Fback,所述异或门231的输出端与所述电阻R1的一端连接,所述电阻R1的另一端分别与所述电容C1的一端以及所述反相器232的输入端连接,所述电容C1的另一端接地,所述反相器232的输出端与所述安全降频模块30的控制端连接,用于输出状态信号LCK至所述安全降频模块30。In an optional embodiment, referring to FIG. 9 , the state detection module of this embodiment includes: an exclusive OR
在一个可选实施例中,参照图10,该实施例的状态检测模块包括:异或门241、延时单元242、与门243和反相器244,所述异或门241的第一输入端用于输入所述锁相环的输入信号Fin,所述异或门241的第二输入端用于输入所述锁相环的反馈信号Fback,所述异或门241的输出端分别与所述延时单元242的输入端和所述与门243的第一输入端连接,所述延时单元242的输出端与所述与门243的第二输入端连接,所述与门243的输出端与反相器244的输入端连接,所述反相器244的输出端与所述安全降频模块30的控制端连接,用于输出状态信号LCK至所述安全降频模块30。In an optional embodiment, referring to FIG. 10 , the state detection module of this embodiment includes: an
在一个可选实施例中,参照图11,该实施例的状态检测模块包括:异或门251、PMOS管M1、NMOS管M2、电容C2及延时单元252,所述异或门251的第一输入端用于输入所述锁相环的输入信号Fin,所述异或门251的第二输入端用于输入所述锁相环的反馈信号Fback,所述异或门251的输出端分别与PMOS管M1及NMOS管M2的栅极连接,所述PMOS管M1的源极分别与电源端和所述电容C2的一端连接,所述NMOS管M2的源极与地之间连接一个恒流源,所述PMOS管M1和NMOS管M2的漏极相连接后,再分别与所述电容C2的另一端及延时单元252的输入端相连,延时单元252的输出端作为状态检测模块的输出端与所述安全降频模块的控制端连接,用于输出状态信号LCK至所述安全降频模块。延时单元252可由缓存来实现。本实施例中,可选地,可省去延时单元252,即,所述PMOS管M1的漏极、NMOS管M2的漏极及电容C2的另一端相连接后作为状态检测模块的输出端,用于输出状态信号LCK至所述安全降频模块。In an optional embodiment, referring to FIG. 11 , the state detection module of this embodiment includes: an exclusive OR
在一个可选实施例中,结合图12,该实施例的安全降频模块包括降频装置31和切换开关32,其中,降频装置31的输入端及切换开关32的第一输入端均连接锁相环的输出端,以用于输入锁相环的输出信号,即,后分频器的输出信号Fpst,降频装置31的输出端连接切换开关32的第二输入端,切换开关32的控制端连接与门25的输出端,切换开关32的输出端用于输出时钟信号Fout。In an optional embodiment, with reference to FIG. 12 , the safety frequency reduction module of this embodiment includes a
进一步地,本发明的防止时钟过冲的电路还可包括降频控制模块,该降频控制模块用于在所述后分频控制信号发生变化时,根据锁相环的环路分频控制信号获取环路分频器改变后的分频系数,并根据环路分频器改变前的分频系数及改变后的分频系数确定所述降频装置的降频系数,而且,所述降频装置的降频系数满足以下条件:Further, the circuit for preventing clock overshoot of the present invention may further include a frequency reduction control module, and the frequency reduction control module is used to divide the frequency of the control signal according to the loop frequency of the phase-locked loop when the post-frequency division control signal changes. Obtain the frequency division coefficient after the loop frequency divider is changed, and determine the frequency reduction coefficient of the frequency reduction device according to the frequency division coefficient before the loop frequency divider is changed and the frequency division coefficient after the change, and the frequency reduction The frequency reduction factor of the device meets the following conditions:
N(safdiv)≥N(lpdiv)/N(lpdiv_new),N(safdiv)≥N(lpdiv)/N(lpdiv_new),
其中,N(safdiv)为所述降频装置的降频系数,N(lpdiv)为环路分频器改变前的分频系数,N(lpdiv_new)为环路分频器改变后的分频系数。Wherein, N(safdiv) is the frequency reduction coefficient of the frequency reduction device, N(lpdiv) is the frequency division coefficient before the loop frequency divider is changed, and N(lpdiv_new) is the frequency division coefficient after the loop frequency divider is changed .
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何纂改、等同替换、改进等,均应包含在本发明的权利要求范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the scope of the claims of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811648517.6A CN111384947A (en) | 2018-12-30 | 2018-12-30 | Method, circuit and clock generating device for preventing clock overshoot |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811648517.6A CN111384947A (en) | 2018-12-30 | 2018-12-30 | Method, circuit and clock generating device for preventing clock overshoot |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111384947A true CN111384947A (en) | 2020-07-07 |
Family
ID=71218403
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811648517.6A Pending CN111384947A (en) | 2018-12-30 | 2018-12-30 | Method, circuit and clock generating device for preventing clock overshoot |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111384947A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111384946A (en) * | 2018-12-30 | 2020-07-07 | 炬芯(珠海)科技有限公司 | Method, circuit and clock generating device for preventing clock overshoot of phase-locked loop |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08172355A (en) * | 1994-12-20 | 1996-07-02 | Fujitsu General Ltd | Pll circuit |
US20080174349A1 (en) * | 2007-01-19 | 2008-07-24 | Faraday Technology Corporation | Wide-locking range phase locked loop circuit using adaptive post division technique |
CN103078636A (en) * | 2012-12-27 | 2013-05-01 | 四川和芯微电子股份有限公司 | Phase-locked loop system |
CN104426544A (en) * | 2013-08-30 | 2015-03-18 | 恩智浦有限公司 | Clock synchronizer for aligning remote devices |
CN108306638A (en) * | 2018-01-19 | 2018-07-20 | 北京时代民芯科技有限公司 | A kind of configurable lock detecting circuit suitable for charge pump phase lock loop |
CN209283210U (en) * | 2018-12-30 | 2019-08-20 | 炬芯(珠海)科技有限公司 | The circuit for preventing phase-locked loop clock from overshooting |
CN111384946A (en) * | 2018-12-30 | 2020-07-07 | 炬芯(珠海)科技有限公司 | Method, circuit and clock generating device for preventing clock overshoot of phase-locked loop |
-
2018
- 2018-12-30 CN CN201811648517.6A patent/CN111384947A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08172355A (en) * | 1994-12-20 | 1996-07-02 | Fujitsu General Ltd | Pll circuit |
US20080174349A1 (en) * | 2007-01-19 | 2008-07-24 | Faraday Technology Corporation | Wide-locking range phase locked loop circuit using adaptive post division technique |
CN103078636A (en) * | 2012-12-27 | 2013-05-01 | 四川和芯微电子股份有限公司 | Phase-locked loop system |
CN104426544A (en) * | 2013-08-30 | 2015-03-18 | 恩智浦有限公司 | Clock synchronizer for aligning remote devices |
CN108306638A (en) * | 2018-01-19 | 2018-07-20 | 北京时代民芯科技有限公司 | A kind of configurable lock detecting circuit suitable for charge pump phase lock loop |
CN209283210U (en) * | 2018-12-30 | 2019-08-20 | 炬芯(珠海)科技有限公司 | The circuit for preventing phase-locked loop clock from overshooting |
CN111384946A (en) * | 2018-12-30 | 2020-07-07 | 炬芯(珠海)科技有限公司 | Method, circuit and clock generating device for preventing clock overshoot of phase-locked loop |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111384946A (en) * | 2018-12-30 | 2020-07-07 | 炬芯(珠海)科技有限公司 | Method, circuit and clock generating device for preventing clock overshoot of phase-locked loop |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7265637B2 (en) | Startup/yank circuit for self-biased phase-locked loops | |
US8253454B2 (en) | Phase lock loop with phase interpolation by reference clock and method for the same | |
US20100259305A1 (en) | Injection locked phase lock loops | |
US20080180185A1 (en) | VCO amplitude control | |
JPH02244820A (en) | Pll circuit | |
CN105024693B (en) | A kind of low spurious phase-locked loop frequency integrator circuit | |
KR101252048B1 (en) | A Frequency-Phase-Locked Loop with a Self-Noise Suppressing Voltage Controlled Oscillator | |
US6525612B2 (en) | Mode control of PLL circuit | |
CN111384948A (en) | Frequency switching method, circuit and clock generating device for output signal of phase-locked loop | |
US8373511B2 (en) | Oscillator circuit and method for gain and phase noise control | |
CN111384947A (en) | Method, circuit and clock generating device for preventing clock overshoot | |
US8686799B2 (en) | Low noise wide range voltage-controlled oscillator with transistor feedback | |
US6954510B2 (en) | Phase-locked loop lock detector circuit and method of lock detection | |
CN102185607B (en) | Phase difference detection method, device and circuit in phase-locked loop circuit | |
CN114244350A (en) | Charge-accelerated pump and phase-locked loop and method of operating the same | |
US9467154B2 (en) | Low power and integrable on-chip architecture for low frequency PLL | |
CN111384946A (en) | Method, circuit and clock generating device for preventing clock overshoot of phase-locked loop | |
US11742863B2 (en) | Phase-locked loop circuit | |
US20080111637A1 (en) | Voltage controlled oscillator and pll having the same | |
CN112953527A (en) | Phase-locked loop structure and electronic equipment capable of being locked quickly | |
JP3781725B2 (en) | Phase-locked loop circuit | |
JP2014236410A (en) | Pll circuit | |
Dinesh et al. | A Survey on ADPLL Components and their effects upon Power, Frequency and Resolution | |
KR101833163B1 (en) | Apparatus and method for injection-locked frequency multiply | |
Patel et al. | Design and analysis of phase-locked loop and performance parameters |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: Zone C, floor 1, plant 1, No.1, Keji 4th Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province 519085 Applicant after: ACTIONS TECHNOLOGY Co.,Ltd. Address before: 519085 High-tech Zone, Tangjiawan Town, Zhuhai City, Guangdong Province Applicant before: ACTIONS (ZHUHAI) TECHNOLOGY Co.,Ltd. |
|
CB02 | Change of applicant information |