WO2011153721A1 - Method and apparatus for adjusting frequncies - Google Patents

Method and apparatus for adjusting frequncies Download PDF

Info

Publication number
WO2011153721A1
WO2011153721A1 PCT/CN2010/074667 CN2010074667W WO2011153721A1 WO 2011153721 A1 WO2011153721 A1 WO 2011153721A1 CN 2010074667 W CN2010074667 W CN 2010074667W WO 2011153721 A1 WO2011153721 A1 WO 2011153721A1
Authority
WO
WIPO (PCT)
Prior art keywords
clock
frequency
branch
adjustment period
last
Prior art date
Application number
PCT/CN2010/074667
Other languages
French (fr)
Chinese (zh)
Inventor
郑伟
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2011153721A1 publication Critical patent/WO2011153721A1/en

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03LAUTOMATIC CONTROL, STARTING, SYNCHRONISATION OR STABILISATION OF GENERATORS OF ELECTRONIC OSCILLATIONS OR PULSES
    • H03L7/00Automatic control of frequency or phase; Synchronisation
    • H03L7/06Automatic control of frequency or phase; Synchronisation using a reference signal applied to a frequency- or phase-locked loop

Definitions

  • the present invention relates to the field of digital products, and more particularly to a method and apparatus for adjusting frequency.
  • Clock signals are found in almost all digital products. Depending on the requirements and application scenarios, the requirements for performance specifications such as clock accuracy and stability are also different. In most applications, the device's local clock source does not need to be functioning externally, and the clock's performance metrics can meet the demand. In contrast, the industrial measurement and communication field requires high performance specifications for clocks. In most cases, it is necessary to use an auxiliary means to calibrate the clock, for example, using a cesium atomic clock or satellite timing as a reference to adjust the clock frequency.
  • the clock source sends the clock to the phase-locked loop and adjusts the output to the desired frequency.
  • Most phase-locked loops can adjust the frequency of the clock source to a preset value and output multiple clocks of the same frequency and different phases.
  • this method cannot dynamically adjust the clock source frequency.
  • the technical problem to be solved by the present invention is to provide a method and apparatus for adjusting the frequency, which can dynamically adjust the frequency of the clock source.
  • a method of adjusting a frequency including:
  • the frequency synthesizing module outputs a first clock of the last sampling period, the control module inputs a reference clock of the last sampling period and a first clock of the last sampling period, and outputs the reference clock according to the reference clock and the first clock The length of the generated adjustment period;
  • the phase-locked loop module inputs a source clock of the current sampling period, and outputs a second clock of a current sampling period according to a preset multiplication factor, and each branch has a predetermined phase difference;
  • the frequency synthesis module inputs the second clock, sequentially selects each branch of the second clock, performs frequency synthesis according to the duration of the adjustment period, a preset frequency combination coefficient, and outputs a current adjustment week.
  • the first clock of the period The first clock of the period.
  • the method further includes: the control module configuring a frequency multiplication coefficient of the phase locked loop module according to a frequency of the reference clock and a frequency of the source clock;
  • the control module configures a total number of branches of the second clock and a phase difference between each branch of the second clock according to an accuracy requirement of a frequency of the first clock;
  • the control module configures a frequency combining coefficient of the frequency synthesizing module according to a frequency of the reference clock and a frequency multiplication coefficient of the phase locked loop.
  • the frequency synthesizing module inputs the second clock, sequentially selects each branch of the second clock, performs frequency synthesis according to the duration of the adjustment period, a preset combining frequency coefficient, and outputs a first clock of the current adjustment period.
  • the steps include:
  • Step 31 The frequency synthesizing module receives the duration of the adjustment period from the control module.
  • Step 32 The frequency synthesizing module determines whether the branch of the second clock selected in the last adjustment period is the last one, if The branch of the second clock selected in the last adjustment period is the last one, and step 33 is performed. If the branch of the second clock selected in the previous adjustment period is not the last one, proceed to step 34;
  • Step 33 switching to the first branch of the second clock, frequency synthesis by the first branch of the second clock of the current adjustment period, and then proceeding to step 35;
  • Step 34 switching to the next branch of the second clock, performing frequency synthesis by the next branch of the second clock of the current adjustment period, and then performing step 35;
  • Step 35 After the duration of the adjustment period, enter a next adjustment period.
  • the step of performing frequency synthesis by the first branch of the second clock of the current adjustment period includes:
  • the step of performing frequency synthesis by the next branch of the second clock of the current adjustment period includes:
  • control module inputting the reference clock of the last sampling period and the first clock of the previous sampling period, and outputting the duration of the adjustment period generated according to the reference clock and the first clock,
  • the control module calculates an absolute value of a difference between a frequency of a reference clock of the last sample period and a frequency of a first clock of the last sample period to generate a frequency difference value
  • the control module generates and outputs an adjustment period according to the frequency difference, the frequency of the second clock, the total number of branches of the second clock, and the frequency of the reference clock.
  • the duration T of the adjustment period is l/(
  • R is the frequency of the reference clock of the last adjustment period
  • D is the first period of the previous adjustment period
  • M is the frequency of the second clock
  • N is the total number of branches of the second clock.
  • the phase difference between the n-1th branch and the nth branch of the second clock is ⁇ / ⁇ , where ⁇ is the branch number of the second clock, 0 ⁇ n ⁇ N, and ⁇ is the second clock The total number of branches.
  • an apparatus for adjusting a frequency includes: a control module, a phase locked loop module, and a frequency synthesizing module; wherein
  • the control module is configured to: input a reference clock of the last sample period and a first clock of the last sample period output by the frequency synthesis module, and output an adjustment period generated according to the reference clock and the first clock Length of time;
  • the phase-locked loop module is configured to: input a source clock of a current sampling period, and output a second clock of a current sampling period according to a preset multiplication factor, and each of the branches has a predetermined phase difference;
  • the frequency synthesis module is configured to: input the second clock, and select the second clock in sequence Each of the branches, and frequency synthesis according to the duration of the adjustment period and the preset frequency coefficient, and outputs the first clock of the current adjustment period.
  • the control module is further configured to: configure a frequency multiplication coefficient of the phase locked loop module according to a frequency of the reference clock and a frequency of the source clock; configured to configure the frequency according to an accuracy requirement of a frequency of the first clock a total number of branches of the second clock and a phase difference between the branches of the second clock; and configuring the combination of the frequency synthesis module according to a frequency of the reference clock and a frequency multiplication coefficient of the phase locked loop Frequency factor.
  • the frequency synthesis module includes:
  • a receiving submodule configured to receive a duration of the adjustment period from the control module; and a determining submodule configured to determine whether the branch of the second clock selected by the last adjustment period is the last path, and generate a determination result ;
  • a switching sub-module configured to switch to the first branch of the second clock when the determination result is that the branch of the second clock selected by the last adjustment period is the last one, when the determination result Switching to the next branch of the second clock when the branch of the second clock selected for the last adjustment period is not the last one;
  • a frequency synthesizing subunit configured to: when the judging result is that the branch of the second clock selected in the last adjustment period is the last one, the frequency is performed by the first branch of the second clock of the current adjustment period Synthesizing; when the result of the determination is that the branch of the second clock selected in the previous adjustment period is not the last one, the frequency is synthesized by the next branch of the second clock of the current adjustment period; the timing sub-module, It is set to enter the next adjustment period after the duration of the adjustment period.
  • the frequency synthesizing subunit is further configured to output a square wave;
  • the number of occurrences of the rising edge of the first branch of the second clock of the current adjustment period reaches the sum Triggering the high level of the square wave; when the number of falling edges of the first branch of the second clock of the current adjustment period reaches the reciprocal of the combining coefficient, triggering the Square wave level;
  • the result of the determination is that the branch of the second clock selected in the last adjustment period is not the last one
  • the number of occurrences reaches a high level of the square wave when the reciprocal of the frequency combining coefficient is reached;
  • the number of falling edges of the next branch of the second clock of the current adjustment period reaches a reciprocal of the combining frequency coefficient, Triggering a low level of the square wave; the reciprocal of the combining frequency coefficient is a natural number.
  • the control module includes:
  • phase detector module configured to calculate an absolute value of a difference between a frequency of a reference clock of the last sample period and a frequency of a first clock of the last sample period to generate a frequency difference value
  • the adjustment submodule is configured to generate and output an adjustment period according to the frequency difference, the frequency of the second clock, the total number of branches of the second clock, and the frequency of the reference clock.
  • Embodiments of the present invention have the following beneficial effects:
  • the frequency of the first clock of the output of the current adjustment period is adjusted, and the output frequency can be dynamically adjusted, which is relatively simple.
  • FIG. 1 is a schematic flow chart of an embodiment of a method for adjusting a frequency according to the present invention
  • FIG. 2 is a schematic flow chart of another embodiment of a method for adjusting a frequency according to the present invention
  • FIG. 3 is a schematic structural diagram of an embodiment of a frequency adjustment device according to the present invention
  • FIG. 5 is a schematic flow chart of an application scenario of the frequency adjustment device illustrated in FIG. 4;
  • an embodiment of a method for adjusting a frequency according to the present invention includes: Step 11: A control module configures the phase lock according to a frequency of the reference clock and a frequency of the source clock. The multiplication factor of the ring module;
  • Step 12 The control module configures the foregoing according to an accuracy requirement of a frequency of the first clock a total number of branches of the second clock and a phase difference between the branches of the second clock;
  • Step 13 The control module configures a frequency combining coefficient of the frequency synthesizing module according to a frequency of the reference clock and a frequency multiplication coefficient of the phase locked loop.
  • Step 14 The frequency synthesizing module outputs a first clock of the last sampling period, and the control module inputs a reference clock of the last sampling period and a first clock of the previous sampling period, and outputs the reference clock according to the reference clock.
  • Step 15 The phase-locked loop module inputs a source clock of the current sampling period, and outputs a second clock of a current sampling period according to a preset multiplication factor, and each branch has a predetermined phase difference; and then respectively jumps Go to step 16 and step 14; in step 14, start the loop from the next sample cycle; step 16, the frequency synthesis module inputs the second clock, and sequentially selects each branch of the second clock, according to the The duration of the adjustment period and the preset combination coefficient are used for frequency synthesis, and the first clock of the current adjustment period is output.
  • the frequency of the first clock of the output of the current adjustment period is adjusted, and the output frequency can be dynamically adjusted, which is relatively simple.
  • control module inputting the reference clock of the last sampling period and the first clock of the previous sampling period, and outputting the duration of the adjustment period generated according to the reference clock and the first clock,
  • the control module calculates an absolute value of a difference between a frequency of a reference clock of the last sample period and a frequency of a first clock of the last sample period to generate a frequency difference value
  • the control module generates and outputs an adjustment period according to the frequency difference, the frequency of the second clock, the total number of branches of the second clock, and the frequency of the reference clock.
  • the duration T of the adjustment period is l/(
  • the last adjustment period is the previous sampling period.
  • Step 21 A control module configures the lock according to a frequency of the reference clock and a frequency of the source clock. a multiplication factor of the phase loop module, the multiplication factor being a positive integer;
  • Step 22 The control module configures a total number of branches of the second clock and a phase difference between each branch of the second clock according to an accuracy requirement of a frequency of the first clock.
  • Step 23 The control module configures a frequency combining coefficient of the frequency synthesizing module according to a frequency of the reference clock and a frequency multiplication coefficient of the phase locked loop, where the combining frequency coefficient is a reciprocal of a positive integer.
  • Step 24 The control module inputs a reference clock of the last sample period and a first clock of the last sample period output by the frequency synthesis module, and outputs a duration of the adjustment period generated according to the reference clock and the first clock;
  • Step 25 The phase-locked loop module inputs a source clock of the current sampling period, and outputs a second clock of a current sampling period according to a preset multiplication factor, and each branch has a predetermined phase difference; and then respectively jumps Go to step 26 and step 24; in step 24, start the loop from the next sample cycle; step 26, the frequency synthesis module receives the duration of the adjustment period from the control module; step 27, the frequency synthesis The module determines whether the branch of the second clock selected in the last adjustment period is the last one, if yes, proceed to step 28, otherwise proceed to step 29;
  • Step 28 Switch to the first branch of the second clock, perform frequency synthesis by the first branch of the second clock of the current adjustment period, and then proceed to step 210; Step 29, switch to the second clock The next branch, the frequency is synthesized by the next branch of the second clock of the current adjustment period, and then proceeds to step 210;
  • Step 210 After the duration of the adjustment period, enter the next adjustment period, and then jump to step 26. In step 26, the loop begins from the next adjustment period.
  • the step of performing frequency synthesis by the first branch of the second clock of the current adjustment period is specifically:
  • the frequency of the source clock output from the clock source is S Hz
  • the phase-locked loop outputs the second clock with the frequency of N
  • the frequency of the adjusted first clock generated according to the second clock with the frequency of MHz is D.
  • the preset frequency of the reference frequency is RHz.
  • Step 1 Adjust the phase and frequency of the second clock whose output frequency is the MHz of the phase-locked loop to be an integer multiple of the frequency of the reference clock, and the clock phase of the first branch of the second clock is 0 degrees.
  • the clock phase of the second branch is ⁇ / ⁇
  • the clock phase of the third branch is 2 ⁇ / ⁇ ... and so on
  • the clock phase of the second branch is ( ⁇ -1) ⁇ / ⁇ .
  • Step 2 Perform phase discrimination with the first clock of the adjusted D Hz using a reference clock with a preset frequency of R Hz, and obtain a frequency difference (RD) Hz of the two clocks; calculate according to the frequency difference (RD) Hz
  • the compensation value of the first clock D Hz, the compensation formula is as follows: The number of compensations per second
  • Step 4 Repeat step 3 after adjusting the period l/(
  • a frequency adjustment device includes: a control module 31, a phase locked loop module 32, and a frequency synthesizing module 33.
  • the control module 31 is configured to: input a reference clock of the last sample period and a first clock of the last sample period output by the frequency synthesis module, and output an adjustment period generated according to the reference clock and the first clock duration;
  • the phase locked loop module 32 is configured to: input a source clock of the current sampling period, according to a preset multiple a frequency coefficient, a second clock that outputs a predetermined total number of branches and each of the branches has a predetermined phase difference of the current sampling period;
  • the frequency synthesizing module 33 is configured to: input the second clock, sequentially select each branch of the second clock, perform frequency synthesis according to the duration of the adjustment period, a preset combining frequency coefficient, and output current adjustment The first clock of the cycle.
  • the control module 31 is further configured to: configure a frequency multiplication coefficient of the phase locked loop module according to a frequency of the reference clock and a frequency of the source clock; configured to configure the frequency according to a frequency accuracy requirement of the first clock a total number of branches of the second clock and a phase difference between the branches of the second clock; and configuring the combination of the frequency synthesis module according to a frequency of the reference clock and a frequency multiplication coefficient of the phase locked loop Frequency factor.
  • the frequency of the first clock of the output of the current adjustment period is adjusted, and the output frequency can be dynamically adjusted, which is relatively simple.
  • the control module 31 includes:
  • phase detector module configured to calculate an absolute value of a difference between a frequency of a reference clock of the last sample period and a frequency of a first clock of the last sample period to generate a frequency difference value
  • the adjustment submodule is configured to generate and output an adjustment period according to the frequency difference, the frequency of the second clock, the total number of branches of the second clock, and the frequency of the reference clock.
  • the frequency synthesis module 33 includes:
  • a receiving submodule configured to receive a duration of the adjustment period from the control module; and a determining submodule configured to determine whether the branch of the second clock selected by the last adjustment period is the last path, and generate a determination result ;
  • a switching sub-module configured to switch to the first branch of the second clock when the determination result is that the branch of the second clock selected by the last adjustment period is the last one, when the determination result Switching to the next branch of the second clock when the branch of the second clock selected for the last adjustment period is not the last one;
  • the frequency synthesizing subunit which is set to be the last adjustment when the judgment result is The first branch of the second clock of the current adjustment period when the branch of the second clock of the period selection is the last one Performing frequency synthesis; when the result of the determination is that the branch of the second clock selected in the last adjustment period is not the last one, the frequency is synthesized by the next branch of the second clock of the current adjustment period;
  • the module is set to enter the next adjustment period after the duration of the adjustment period.
  • the frequency synthesis subunit is also arranged to output a square wave. Specifically, when the determining result is that the branch of the second clock selected in the last adjustment period is the last one, when the rising edge of the first branch of the second clock of the current adjustment period occurs, the number of occurrences reaches a high level of the square wave when the reciprocal of the frequency combining coefficient is reached; when the number of falling edges of the first branch of the second clock of the current adjustment period reaches a reciprocal of the combining frequency coefficient, Triggering a low level of the square wave; when the determining result is that the branch of the second clock selected in the last adjustment period is not the last one, when the next branch of the second clock of the current adjustment period When the number of rising edges of the rising edge reaches the reciprocal of the combining frequency coefficient, the high level of the square wave is triggered; when the falling edge of the next branch of the second clock of the current adjustment period occurs, the number reaches When the reciprocal of the combining coefficient is used, the low level of the square wave is triggered; the
  • the duration T of the adjustment period is l/(
  • R is the frequency of the reference clock of the last adjustment period
  • D is the first period of the previous adjustment period
  • M is the frequency of the second clock
  • N is the total number of branches of the second clock.
  • the phase difference between the n-1th branch and the nth branch of the second clock is ⁇ / ⁇ , where ⁇ is the branch number of the second clock, 0 ⁇ n ⁇ N, and ⁇ is the second clock The total number of branches.
  • phase detecting sub-module 41 is configured to perform phase-collection statistics on the synthesized frequency and the reference clock.
  • the adjustment sub-module 42 initializes the phase-locked loop module, sends configuration information (such as a multiplication factor, etc.) to the phase-locked loop, and dynamically adjusts the adjustment information of the frequency synthesis module according to the phase-detection result (for example, a frequency-combination coefficient, etc.);
  • the ring module 43 is for multiplying the source clock of the clock source to a higher frequency;
  • the frequency synthesis module 44 is configured to generate the second clock of the high frequency to generate the first clock of the low frequency.
  • FIG. 5 is a schematic flow chart of an application scenario of the device for adjusting frequency according to FIG. The following description describes the application scenario of the frequency synthesizing apparatus according to the present invention with reference to Figs. 4 and 5.
  • Step 51 Configure the second clock outputted by the phase-locked loop module 43 to be 200 MHz according to the reference clock 5.0000001 MHz, so that the second clock is a common multiple of the reference clock and the source clock. (In this application scenario, the integer bit of the reference clock frequency is selected. ), configuring the input and output points of the frequency synthesis module 44 Don't be 200MHz and 5MHz, 5 ⁇ is first generated by the first branch count of the second clock. There are 4 second clocks for adjustment; that is, the multiplication factor is 20 and the combining frequency is 1/40.
  • Step 52 the phase detector sub-module 41 performs phase-collecting statistics on the 5 MHz first clock and the reference clock 5.0000001 MHz output by the frequency synthesizing module 44;
  • Step 53 The adjustment sub-module 42 processes the phase-detection value, and calculates the compensation times per second and the compensated frequency difference of the frequency synthesis module 44 according to the above, which are 16 times and 0.00625 Hz respectively; Step 54 The sub-module 42 sends the adjustment information to the frequency synthesis module 44, and updates in real time according to the latest preset reference clock;
  • Step 55 the frequency synthesis module 44 according to the adjustment information to obtain an adjustment interval of 0.0625 seconds;
  • Step 56 determine whether the current 5MHz is the fourth clock count, if yes, proceed to step 57, otherwise proceed to step 58;
  • Step 57 the 5MHz clock is switched from the second clock count to the first split clock count, and step 59 is performed;
  • Step 58 the 5MHz clock is switched from the second clock count to the next split clock count, and step 59 is performed;
  • Step 59 After adjusting the period of time, proceed to step 55.
  • the present invention provides a method and apparatus for adjusting a frequency that dynamically adjusts the clock source frequency.
  • H has no clock source of 10 MHz, and the clock source has an adjustment range of 10 MHz ⁇ 50 Hz, and when 10 MHz + 60 Hz is desired. Due to the limited adjustment range of the clock source itself, this frequency is not achieved, and the common phase-locked loop corresponds to an input frequency of 10 MHz ⁇ 50 Hz. In the above way, it is easy to implement.
  • the frequency multiplication coefficient of the phase locked loop is a ratio between the frequency of the output clock of the phase locked loop and the frequency of the input clock, and may be a positive integer; the frequency combining coefficient of the frequency synthesizing module is the output clock of the frequency synthesizing module.
  • the ratio between the frequency and the frequency of the input clock can be the reciprocal of a positive integer.
  • the steps of the foregoing embodiments may be implemented by a program to instruct related hardware, and the program may be stored in a computer readable storage medium.
  • the method includes the steps of the foregoing method embodiment, such as: a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (No. RAM) and so on.
  • sequence numbers of the steps are not used to limit the sequence of the steps.
  • the steps of the steps are changed without any creative work. It is also within the scope of the invention.
  • the method and apparatus for adjusting a frequency provided by the present invention can dynamically adjust a clock source frequency.
  • Combining a plurality of high-frequency clocks of different phases to synthesize a low-frequency clock can realize not only high-precision frequency synthesis but also low frequency.
  • the fine adjustment can effectively improve the performance and performance indexes of the output clock, reduce the overall cost of the clock system, and can be used in various clock frequency recovery applications, and has strong versatility.

Landscapes

  • Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)

Abstract

A method and an apparatus for adjusting frequencies are provided, which relate to the field of digital products to resolve the technical problem in the prior art that the clock source frequencies can not be dynamically adjusted. The method includes: a frequency synthesis module outputs a first clock of the last sampling cycle, a control module receives a reference clock of the last sampling cycle and the first clock of the last sampling cycle and outputs the time length of a adjustment cycle generated according to the reference clock and the first clock; a phase-locked loop module receives a source clock of the current sampling cycle, and outputs a second clock of the current sampling cycle according to a predetermined frequency-doubling coefficient, the second clock contains a predetermined total number of shunts and there are predetermined phase differences among all the shunts; the frequency synthesis module receives the second clock, and selects each shunt of the second clock in turn, carries out frequency synthesis according to the time length of the adjustment cycle and a predetermined frequency synthesis coefficient, outputs the first clock of the current adjustment cycle. The method and the apparatus can dynamically adjust the frequencies of the clock source.

Description

调整频率的方法和装置  Method and device for adjusting frequency
技术领域 Technical field
本发明涉及数字产品领域, 特别是指一种调整频率的方法和装置。  The present invention relates to the field of digital products, and more particularly to a method and apparatus for adjusting frequency.
背景技术 Background technique
时钟信号几乎在所有数字产品中都存在。 根据需求和应用场景的不同, 对时钟的精确度和稳定度等性能指标的要求也不同。 在大多数应用中, 设备 本地的时钟源并不需要由外界作用就能正常工作, 时钟的性能指标也能满足 需求。 相对而言, 工业测量和通信领域对时钟的性能指标要求较高, 在多数 情况下, 需要利用辅助手段对时钟进行校准, 例如, 使用铷原子钟或者卫星 授时作为参考, 来调整时钟频率。  Clock signals are found in almost all digital products. Depending on the requirements and application scenarios, the requirements for performance specifications such as clock accuracy and stability are also different. In most applications, the device's local clock source does not need to be functioning externally, and the clock's performance metrics can meet the demand. In contrast, the industrial measurement and communication field requires high performance specifications for clocks. In most cases, it is necessary to use an auxiliary means to calibrate the clock, for example, using a cesium atomic clock or satellite timing as a reference to adjust the clock frequency.
在时钟系统中, 时钟源将时钟送入锁相环, 按照期望的频率调整后输出。 大部分锁相环能够将时钟源的频率按照预设定值进行调整, 并输出多路同样 频率不同相位的时钟, 但这种方法不能动态调整时钟源频率。  In a clock system, the clock source sends the clock to the phase-locked loop and adjusts the output to the desired frequency. Most phase-locked loops can adjust the frequency of the clock source to a preset value and output multiple clocks of the same frequency and different phases. However, this method cannot dynamically adjust the clock source frequency.
发明内容 Summary of the invention
本发明要解决的技术问题是提供一种调整频率的方法和装置, 能够动态 调整时钟源的频率。  The technical problem to be solved by the present invention is to provide a method and apparatus for adjusting the frequency, which can dynamically adjust the frequency of the clock source.
为解决上述技术问题, 本发明的实施例提供技术方案如下:  In order to solve the above technical problem, the embodiments of the present invention provide the following technical solutions:
一方面, 提供一种调整频率的方法, 包括:  In one aspect, a method of adjusting a frequency is provided, including:
频率合成模块输出上一釆样周期的第一时钟, 控制模块输入上一釆样周 期的参考时钟和所述上一釆样周期的第一时钟, 输出根据所述参考时钟和所 述第一时钟生成的调整周期的时长;  The frequency synthesizing module outputs a first clock of the last sampling period, the control module inputs a reference clock of the last sampling period and a first clock of the last sampling period, and outputs the reference clock according to the reference clock and the first clock The length of the generated adjustment period;
锁相环模块输入当前釆样周期的源时钟, 根据预设的倍频系数, 输出预 定分路总数且各分路具有预定相位差的当前釆样周期的第二时钟;  The phase-locked loop module inputs a source clock of the current sampling period, and outputs a second clock of a current sampling period according to a preset multiplication factor, and each branch has a predetermined phase difference;
频率合成模块输入所述第二时钟, 依次选择所述第二时钟的各个分路, 根据所述调整周期的时长、 预设的合频系数进行频率合成, 输出当前调整周 期的第一时钟。 The frequency synthesis module inputs the second clock, sequentially selects each branch of the second clock, performs frequency synthesis according to the duration of the adjustment period, a preset frequency combination coefficient, and outputs a current adjustment week. The first clock of the period.
在所述频率合成模块输出上一釆样周期的第一时钟, 控制模块输入上一 釆样周期的参考时钟和所述上一釆样周期的第一时钟 , 输出根据所述参考时 钟和所述第一时钟生成的调整周期的时长的步骤之前, 所述方法还包括: 所述控制模块根据所述参考时钟的频率和所述源时钟的频率, 配置所述 锁相环模块的倍频系数;  And outputting, by the frequency synthesizing module, a first clock of the last sampling period, the control module inputs a reference clock of the last sampling period and a first clock of the last sampling period, and outputs the reference clock according to the reference clock Before the step of adjusting the duration of the first clock, the method further includes: the control module configuring a frequency multiplication coefficient of the phase locked loop module according to a frequency of the reference clock and a frequency of the source clock;
所述控制模块根据所述第一时钟的频率的精度要求, 配置所述第二时钟 的分路总数以及所述第二时钟的各分路之间的相位差;  The control module configures a total number of branches of the second clock and a phase difference between each branch of the second clock according to an accuracy requirement of a frequency of the first clock;
所述控制模块根据所述参考时钟的频率和所述锁相环的倍频系数, 配置 所述频率合成模块的合频系数。  The control module configures a frequency combining coefficient of the frequency synthesizing module according to a frequency of the reference clock and a frequency multiplication coefficient of the phase locked loop.
所述频率合成模块输入所述第二时钟, 依次选择所述第二时钟的各个分 路, 根据所述调整周期的时长、 预设的合频系数进行频率合成, 输出当前调 整周期的第一时钟的步骤包括:  The frequency synthesizing module inputs the second clock, sequentially selects each branch of the second clock, performs frequency synthesis according to the duration of the adjustment period, a preset combining frequency coefficient, and outputs a first clock of the current adjustment period. The steps include:
步骤 31 , 所述频率合成模块从所述控制模块接收所述调整周期的时长; 步骤 32 , 所述频率合成模块判断上一调整周期选择的所述第二时钟的分 路是否是最后一路, 若上一调整周期选择的所述第二时钟的分路是最后一路 则进行步骤 33 , 若上一调整周期选择的所述第二时钟的分路不是最后一路则 进行步骤 34;  Step 31: The frequency synthesizing module receives the duration of the adjustment period from the control module. Step 32: The frequency synthesizing module determines whether the branch of the second clock selected in the last adjustment period is the last one, if The branch of the second clock selected in the last adjustment period is the last one, and step 33 is performed. If the branch of the second clock selected in the previous adjustment period is not the last one, proceed to step 34;
步骤 33 , 切换至所述第二时钟的第一分路, 由当前调整周期的所述第二 时钟的第一分路进行频率合成, 然后进行步骤 35;  Step 33, switching to the first branch of the second clock, frequency synthesis by the first branch of the second clock of the current adjustment period, and then proceeding to step 35;
步骤 34 , 切换至所述第二时钟的下一分路, 由当前调整周期的所述第二 时钟的下一分路进行频率合成, 然后进行步骤 35;  Step 34, switching to the next branch of the second clock, performing frequency synthesis by the next branch of the second clock of the current adjustment period, and then performing step 35;
步骤 35 , 在所述调整周期的时长后, 进入下一调整周期。  Step 35: After the duration of the adjustment period, enter a next adjustment period.
所述由当前调整周期的所述第二时钟的第一分路进行频率合成的步骤包 括:  The step of performing frequency synthesis by the first branch of the second clock of the current adjustment period includes:
输出方波, 当当前调整周期的所述第二时钟的第一分路的上升沿出现的 数量达到所述合频系数的倒数时, 触发所述方波的高电平; 当当前调整周期 的所述第二时钟的第一分路的下降沿出现的数量达到所述合频系数的倒数 时, 触发所述方波的低电平; Outputting a square wave, when the number of rising edges of the first branch of the second clock of the current adjustment period reaches a reciprocal of the combining coefficient, triggering a high level of the square wave; when the current adjustment period is The number of falling edges of the first branch of the second clock reaches the reciprocal of the combining coefficient Triggering a low level of the square wave;
所述由当前调整周期的所述第二时钟的下一分路进行频率合成的步骤包 括:  The step of performing frequency synthesis by the next branch of the second clock of the current adjustment period includes:
输出方波, 当当前调整周期的所述第二时钟的下一分路的上升沿出现的 数量达到所述合频系数的倒数时, 触发所述方波的高电平; 当当前调整周期 的所述第二时钟的下一分路的下降沿出现的数量达到所述合频系数的倒数 时, 触发所述方波的低电平; 所述合频系数的倒数为自然数。  Outputting a square wave, when the number of rising edges of the next branch of the second clock of the current adjustment period reaches a reciprocal of the combining coefficient, triggering a high level of the square wave; when the current adjustment period is When the number of falling edges of the next branch of the second clock reaches the reciprocal of the combining coefficient, the low level of the square wave is triggered; the reciprocal of the combining coefficient is a natural number.
所述控制模块输入上一釆样周期的参考时钟和所述上一釆样周期的第一 时钟, 输出根据所述参考时钟和所述第一时钟生成的调整周期的时长的步骤 包括:  And the step of the control module inputting the reference clock of the last sampling period and the first clock of the previous sampling period, and outputting the duration of the adjustment period generated according to the reference clock and the first clock,
所述控制模块计算所述上一釆样周期的参考时钟的频率和所述上一釆样 周期的第一时钟的频率之间的差的绝对值, 生成频率差值;  The control module calculates an absolute value of a difference between a frequency of a reference clock of the last sample period and a frequency of a first clock of the last sample period to generate a frequency difference value;
所述控制模块根据所述频率差值、 所述第二时钟的频率、 所述第二时钟 的分路总数以及所述参考时钟的频率, 生成调整周期的时长并输出。  The control module generates and outputs an adjustment period according to the frequency difference, the frequency of the second clock, the total number of branches of the second clock, and the frequency of the reference clock.
所述调整周期的时长 T为 l/(| R - D | x /R x N) , 其中, R为上一调整周期 的所述参考时钟的频率, D为上一调整周期的所述第一时钟的频率, M为所 述第二时钟的频率, N为所述第二时钟的分路总数。  The duration T of the adjustment period is l/(| R - D | x /R x N), where R is the frequency of the reference clock of the last adjustment period, and D is the first period of the previous adjustment period The frequency of the clock, M is the frequency of the second clock, and N is the total number of branches of the second clock.
所述第二时钟的第 n-1分路与第 n分路之间的相位差为 π /Ν, 其中, η为 第二时钟的分路序号, 0≤n<N, Ν为第二时钟的分路总数。  The phase difference between the n-1th branch and the nth branch of the second clock is π /Ν, where η is the branch number of the second clock, 0≤n<N, and Ν is the second clock The total number of branches.
另一方面, 提供一种调整频率的装置, 包括: 控制模块、 锁相环模块以 及频率合成模块; 其中,  In another aspect, an apparatus for adjusting a frequency includes: a control module, a phase locked loop module, and a frequency synthesizing module; wherein
所述控制模块设置成: 输入上一釆样周期的参考时钟和所述频率合成模 块输出的上一釆样周期的第一时钟 , 输出根据所述参考时钟和所述第一时钟 生成的调整周期的时长;  The control module is configured to: input a reference clock of the last sample period and a first clock of the last sample period output by the frequency synthesis module, and output an adjustment period generated according to the reference clock and the first clock Length of time;
所述锁相环模块设置成: 输入当前釆样周期的源时钟, 根据预设的倍频 系数, 输出预定分路总数且各分路具有预定相位差的当前釆样周期的第二时 钟; 以及  The phase-locked loop module is configured to: input a source clock of a current sampling period, and output a second clock of a current sampling period according to a preset multiplication factor, and each of the branches has a predetermined phase difference; and
所述频率合成模块设置成: 输入所述第二时钟, 依次选择所述第二时钟 的各个分路, 并根据所述调整周期的时长、 预设的合频系数进行频率合成, 输出当前调整周期的第一时钟。 The frequency synthesis module is configured to: input the second clock, and select the second clock in sequence Each of the branches, and frequency synthesis according to the duration of the adjustment period and the preset frequency coefficient, and outputs the first clock of the current adjustment period.
所述控制模块还设置成:根据所述参考时钟的频率和所述源时钟的频率, 配置所述锁相环模块的倍频系数; 根据所述第一时钟的频率的精度要求, 配 置所述第二时钟的分路总数以及所述第二时钟的各分路之间的相位差; 以及 根据所述参考时钟的频率和所述锁相环的倍频系数, 配置所述频率合成模块 的合频系数。  The control module is further configured to: configure a frequency multiplication coefficient of the phase locked loop module according to a frequency of the reference clock and a frequency of the source clock; configured to configure the frequency according to an accuracy requirement of a frequency of the first clock a total number of branches of the second clock and a phase difference between the branches of the second clock; and configuring the combination of the frequency synthesis module according to a frequency of the reference clock and a frequency multiplication coefficient of the phase locked loop Frequency factor.
所述频率合成模块包括:  The frequency synthesis module includes:
接收子模块, 其设置成从所述控制模块接收所述调整周期的时长; 判断子模块, 其设置成判断上一调整周期选择的所述第二时钟的分路是 否是最后一路, 生成判断结果;  a receiving submodule, configured to receive a duration of the adjustment period from the control module; and a determining submodule configured to determine whether the branch of the second clock selected by the last adjustment period is the last path, and generate a determination result ;
切换子模块, 其设置成当所述判断结果为上一调整周期选择的所述第二 时钟的分路是最后一路时, 切换至所述第二时钟的第一分路, 当所述判断结 果为上一调整周期选择的所述第二时钟的分路不是最后一路时, 切换至所述 第二时钟的下一分路;  a switching sub-module, configured to switch to the first branch of the second clock when the determination result is that the branch of the second clock selected by the last adjustment period is the last one, when the determination result Switching to the next branch of the second clock when the branch of the second clock selected for the last adjustment period is not the last one;
频率合成子单元, 其设置成当所述判断结果为上一调整周期选择的所述 第二时钟的分路是最后一路时, 由当前调整周期的所述第二时钟的第一分路 进行频率合成; 当所述判断结果为上一调整周期选择的所述第二时钟的分路 不是最后一路时,由当前调整周期的所述第二时钟的下一分路进行频率合成; 定时子模块, 其设置成在所述调整周期的时长后, 进入下一调整周期。 所述频率合成子单元还设置成输出方波;  a frequency synthesizing subunit, configured to: when the judging result is that the branch of the second clock selected in the last adjustment period is the last one, the frequency is performed by the first branch of the second clock of the current adjustment period Synthesizing; when the result of the determination is that the branch of the second clock selected in the previous adjustment period is not the last one, the frequency is synthesized by the next branch of the second clock of the current adjustment period; the timing sub-module, It is set to enter the next adjustment period after the duration of the adjustment period. The frequency synthesizing subunit is further configured to output a square wave;
当所述判断结果为上一调整周期选择的所述第二时钟的分路是最后一路 时, 当当前调整周期的所述第二时钟的第一分路的上升沿出现的数量达到所 述合频系数的倒数时, 触发所述方波的高电平; 当当前调整周期的所述第二 时钟的第一分路的下降沿出现的数量达到所述合频系数的倒数时, 触发所述 方波的氏电平;  When the result of the determination is that the branch of the second clock selected in the last adjustment period is the last one, the number of occurrences of the rising edge of the first branch of the second clock of the current adjustment period reaches the sum Triggering the high level of the square wave; when the number of falling edges of the first branch of the second clock of the current adjustment period reaches the reciprocal of the combining coefficient, triggering the Square wave level;
当所述判断结果为上一调整周期选择的所述第二时钟的分路不是最后一 路时, 当当前调整周期的所述第二时钟的下一分路的上升沿出现的数量达到 所述合频系数的倒数时, 触发所述方波的高电平; 当当前调整周期的所述第 二时钟的下一分路的下降沿出现的数量达到所述合频系数的倒数时, 触发所 述方波的低电平; 所述合频系数的倒数为自然数。 When the result of the determination is that the branch of the second clock selected in the last adjustment period is not the last one, when the rising edge of the next branch of the second clock of the current adjustment period occurs, the number of occurrences reaches a high level of the square wave when the reciprocal of the frequency combining coefficient is reached; when the number of falling edges of the next branch of the second clock of the current adjustment period reaches a reciprocal of the combining frequency coefficient, Triggering a low level of the square wave; the reciprocal of the combining frequency coefficient is a natural number.
所述控制模块包括:  The control module includes:
鉴相子模块, 其设置成计算所述上一釆样周期的参考时钟的频率和所述 上一釆样周期的第一时钟的频率之间的差的绝对值, 生成频率差值;  a phase detector module configured to calculate an absolute value of a difference between a frequency of a reference clock of the last sample period and a frequency of a first clock of the last sample period to generate a frequency difference value;
调整子模块, 其设置成根据所述频率差值、 所述第二时钟的频率、 所述 第二时钟的分路总数以及所述参考时钟的频率,生成调整周期的时长并输出。 本发明的实施例具有以下有益效果:  The adjustment submodule is configured to generate and output an adjustment period according to the frequency difference, the frequency of the second clock, the total number of branches of the second clock, and the frequency of the reference clock. Embodiments of the present invention have the following beneficial effects:
上述方案中, 根据上一周期输出的第一时钟的频率和参考时钟的频率之 间的差值, 调整当前调整周期的输出的第一时钟的频率, 能够动态调整输出 频率, 实现比较简单。  In the above solution, according to the difference between the frequency of the first clock outputted by the previous cycle and the frequency of the reference clock, the frequency of the first clock of the output of the current adjustment period is adjusted, and the output frequency can be dynamically adjusted, which is relatively simple.
附图概述 BRIEF abstract
图 1为本发明所述的调整频率的方法一实施例的流程示意图;  1 is a schematic flow chart of an embodiment of a method for adjusting a frequency according to the present invention;
图 2为本发明所述的调整频率的方法另一实施例的流程示意图; 图 3是本发明所述的调整频率的装置的一实施例的结构示意图; 图 4是本发明所述的调整频率的装置的另一实施例的结构示意图; 图 5是图 4所述的调整频率的装置的应用场景的流程示意图。  2 is a schematic flow chart of another embodiment of a method for adjusting a frequency according to the present invention; FIG. 3 is a schematic structural diagram of an embodiment of a frequency adjustment device according to the present invention; FIG. 5 is a schematic flow chart of an application scenario of the frequency adjustment device illustrated in FIG. 4;
本发明的较佳实施方式 Preferred embodiment of the invention
为使本发明的实施例要解决的技术问题、 技术方案和优点更加清楚, 下 面将结合附图及具体实施例进行详细描述。  The technical problems, the technical solutions, and the advantages of the embodiments of the present invention will be more clearly described in the accompanying drawings.
如图 1所示, 为本发明所述的一种调整频率的方法的一实施例, 包括: 步骤 11 , 控制模块根据所述参考时钟的频率和所述源时钟的频率, 配置 所述锁相环模块的倍频系数;  As shown in FIG. 1 , an embodiment of a method for adjusting a frequency according to the present invention includes: Step 11: A control module configures the phase lock according to a frequency of the reference clock and a frequency of the source clock. The multiplication factor of the ring module;
步骤 12, 所述控制模块根据所述第一时钟的频率的精度要求, 配置所述 第二时钟的分路总数以及所述第二时钟的各分路之间的相位差; Step 12: The control module configures the foregoing according to an accuracy requirement of a frequency of the first clock a total number of branches of the second clock and a phase difference between the branches of the second clock;
步骤 13 , 所述控制模块根据所述参考时钟的频率和所述锁相环的倍频系 数, 配置所述频率合成模块的合频系数。  Step 13: The control module configures a frequency combining coefficient of the frequency synthesizing module according to a frequency of the reference clock and a frequency multiplication coefficient of the phase locked loop.
步骤 14, 频率合成模块输出上一釆样周期的第一时钟, 控制模块输入上 一釆样周期的参考时钟和所述上一釆样周期的第一时钟, 输出根据所述参考 时钟和所述第一时钟生成的调整周期的时长;  Step 14. The frequency synthesizing module outputs a first clock of the last sampling period, and the control module inputs a reference clock of the last sampling period and a first clock of the previous sampling period, and outputs the reference clock according to the reference clock. The length of the adjustment period generated by the first clock;
步骤 15,锁相环模块输入当前釆样周期的源时钟,根据预设的倍频系数, 输出预定分路总数且各分路具有预定相位差的当前釆样周期的第二时钟; 然 后分别跳转到步骤 16和步骤 14; 在步骤 14中, 从下一釆样周期开始循环; 步骤 16, 频率合成模块输入所述第二时钟, 依次选择所述第二时钟的各 个分路, 根据所述调整周期的时长、 预设的合频系数进行频率合成, 输出当 前调整周期的第一时钟。  Step 15. The phase-locked loop module inputs a source clock of the current sampling period, and outputs a second clock of a current sampling period according to a preset multiplication factor, and each branch has a predetermined phase difference; and then respectively jumps Go to step 16 and step 14; in step 14, start the loop from the next sample cycle; step 16, the frequency synthesis module inputs the second clock, and sequentially selects each branch of the second clock, according to the The duration of the adjustment period and the preset combination coefficient are used for frequency synthesis, and the first clock of the current adjustment period is output.
上述方案中, 根据上一周期输出的第一时钟的频率和参考时钟的频率之 间的差值, 调整当前调整周期的输出的第一时钟的频率, 能够动态调整输出 频率, 实现比较简单。  In the above solution, according to the difference between the frequency of the first clock outputted by the previous cycle and the frequency of the reference clock, the frequency of the first clock of the output of the current adjustment period is adjusted, and the output frequency can be dynamically adjusted, which is relatively simple.
所述控制模块输入上一釆样周期的参考时钟和所述上一釆样周期的第一 时钟, 输出根据所述参考时钟和所述第一时钟生成的调整周期的时长的步骤 包括:  And the step of the control module inputting the reference clock of the last sampling period and the first clock of the previous sampling period, and outputting the duration of the adjustment period generated according to the reference clock and the first clock,
所述控制模块计算所述上一釆样周期的参考时钟的频率和所述上一釆样 周期的第一时钟的频率之间的差的绝对值, 生成频率差值;  The control module calculates an absolute value of a difference between a frequency of a reference clock of the last sample period and a frequency of a first clock of the last sample period to generate a frequency difference value;
所述控制模块根据所述频率差值、 所述第二时钟的频率、 所述第二时钟 的分路总数以及所述参考时钟的频率, 生成调整周期的时长并输出。  The control module generates and outputs an adjustment period according to the frequency difference, the frequency of the second clock, the total number of branches of the second clock, and the frequency of the reference clock.
所述调整周期的时长 T为 l/(| R - D | x /RxN) ,其中, R为上一调整周期的 所述参考时钟的频率, D为上一调整周期的所述第一时钟的频率, M为所述 第二时钟的频率, N为所述第二时钟的分路总数。 其中, 上一调整周期即为 上一釆样周期。  The duration T of the adjustment period is l/(| R - D | x /RxN), where R is the frequency of the reference clock of the last adjustment period, and D is the first clock of the previous adjustment period Frequency, M is the frequency of the second clock, and N is the total number of branches of the second clock. Among them, the last adjustment period is the previous sampling period.
所述第二时钟的第 n-1分路与第 n分路之间的相位差为 π /Ν, 其中, η为 第二时钟的分路序号, 0≤n<N, Ν为第二时钟的分路总数。 如图 2所示, 为本发明所述的一种调整频率的方法的另一实施例, 包括: 步骤 21 , 控制模块根据所述参考时钟的频率和所述源时钟的频率, 配置 所述锁相环模块的倍频系数, 所述倍频系数为正整数; The phase difference between the n-1th branch and the nth branch of the second clock is π /Ν, where η is the branch number of the second clock, 0≤n<N, and Ν is the second clock The total number of branches. As shown in FIG. 2, another embodiment of a method for adjusting a frequency according to the present invention includes: Step 21: A control module configures the lock according to a frequency of the reference clock and a frequency of the source clock. a multiplication factor of the phase loop module, the multiplication factor being a positive integer;
步骤 22, 所述控制模块根据所述第一时钟的频率的精度要求, 配置所述 第二时钟的分路总数以及所述第二时钟的各分路之间的相位差;  Step 22: The control module configures a total number of branches of the second clock and a phase difference between each branch of the second clock according to an accuracy requirement of a frequency of the first clock.
步骤 23 , 所述控制模块根据所述参考时钟的频率和所述锁相环的倍频系 数, 配置所述频率合成模块的合频系数, 所述合频系数为正整数的倒数。  Step 23: The control module configures a frequency combining coefficient of the frequency synthesizing module according to a frequency of the reference clock and a frequency multiplication coefficient of the phase locked loop, where the combining frequency coefficient is a reciprocal of a positive integer.
步骤 24, 控制模块输入上一釆样周期的参考时钟和频率合成模块输出的 上一釆样周期的第一时钟, 输出根据所述参考时钟和所述第一时钟生成的调 整周期的时长;  Step 24: The control module inputs a reference clock of the last sample period and a first clock of the last sample period output by the frequency synthesis module, and outputs a duration of the adjustment period generated according to the reference clock and the first clock;
步骤 25 ,锁相环模块输入当前釆样周期的源时钟,根据预设的倍频系数, 输出预定分路总数且各分路具有预定相位差的当前釆样周期的第二时钟; 然 后分别跳转到步骤 26和步骤 24; 在步骤 24中, 从下一釆样周期开始循环; 步骤 26, 所述频率合成模块从所述控制模块接收所述调整周期的时长; 步骤 27 , 所述频率合成模块判断上一调整周期选择的所述第二时钟的分 路是否是最后一路, 若是则进行步骤 28, 否则进行步骤 29;  Step 25: The phase-locked loop module inputs a source clock of the current sampling period, and outputs a second clock of a current sampling period according to a preset multiplication factor, and each branch has a predetermined phase difference; and then respectively jumps Go to step 26 and step 24; in step 24, start the loop from the next sample cycle; step 26, the frequency synthesis module receives the duration of the adjustment period from the control module; step 27, the frequency synthesis The module determines whether the branch of the second clock selected in the last adjustment period is the last one, if yes, proceed to step 28, otherwise proceed to step 29;
步骤 28, 切换至所述第二时钟的第一分路, 由当前调整周期的所述第二 时钟的第一分路进行频率合成, 然后进行步骤 210; 步骤 29, 切换至所述第二时钟的下一分路, 由当前调整周期的所述第二 时钟的下一分路进行频率合成, 然后进行步骤 210;  Step 28: Switch to the first branch of the second clock, perform frequency synthesis by the first branch of the second clock of the current adjustment period, and then proceed to step 210; Step 29, switch to the second clock The next branch, the frequency is synthesized by the next branch of the second clock of the current adjustment period, and then proceeds to step 210;
步骤 210 , 在所述调整周期的时长后, 进入下一调整周期, 然后跳转到 步骤 26。 在步骤 26中, 从下一调整周期开始循环。  Step 210: After the duration of the adjustment period, enter the next adjustment period, and then jump to step 26. In step 26, the loop begins from the next adjustment period.
所述由当前调整周期的所述第二时钟的第一分路进行频率合成的步骤具 体为:  The step of performing frequency synthesis by the first branch of the second clock of the current adjustment period is specifically:
输出方波, 当当前调整周期的所述第二时钟的第一分路的上升沿出现的 数量达到所述合频系数时, 触发所述方波的高电平; 当当前调整周期的所述 第二时钟的第一分路的下降沿出现的数量达到所述合频系数的倒数时, 触发 所述方波的低电平; 所述由当前调整周期的所述第二时钟的下一分路进行频率合成的步骤具 体为: Outputting a square wave, when the number of rising edges of the first branch of the second clock of the current adjustment period reaches the frequency combination coefficient, triggering a high level of the square wave; when the current adjustment period is When the number of falling edges of the first branch of the second clock reaches the reciprocal of the combining coefficient, triggering the low level of the square wave; The step of performing frequency synthesis by the next branch of the second clock of the current adjustment period is specifically:
输出方波, 当当前调整周期的所述第二时钟的下一分路的上升沿出现的 数量达到所述合频系数时, 触发所述方波的高电平; 当当前调整周期的所述 第二时钟的下一分路的下降沿出现的数量达到所述合频系数的倒数时, 触发 所述方波的低电平; 所述合频系数的倒数为自然数。  Outputting a square wave, when the number of rising edges of the next branch of the second clock of the current adjustment period reaches the combined frequency coefficient, triggering a high level of the square wave; when the current adjustment period is When the number of falling edges of the next branch of the second clock reaches the reciprocal of the combining coefficient, the low level of the square wave is triggered; the reciprocal of the combining coefficient is a natural number.
以下描述本发明所述的调整频率的方法的应用场景。 4艮设, 时钟源输出 的源时钟的频率为 S Hz, 锁相环输出 N路频率为 MHz的第二时钟, 根据频 率为 MHz的第二时钟生成的调整后的第一时钟的频率为 D Hz, 参考频率的 预设定频率为 RHz。 所述方法包括如下步骤:  The application scenario of the method for adjusting the frequency according to the present invention is described below. 4: The frequency of the source clock output from the clock source is S Hz, the phase-locked loop outputs the second clock with the frequency of N, and the frequency of the adjusted first clock generated according to the second clock with the frequency of MHz is D. Hz, the preset frequency of the reference frequency is RHz. The method includes the following steps:
步骤 1, 调整锁相环的 N路输出频率为 MHz的第二时钟的相位和频率, 使其为参考时钟的频率 R Hz的整数倍, 第二时钟的第一分路的时钟相位为 0 度, 第二分路的时钟相位为 π/Ν, 第三分路的时钟相位为 2π/Ν...以此类推, 第 Ν分路的时钟相位为 (Ν-1) π/Ν。 首先使用第一分路时钟计数, 生成频 率为 D Hz的第一时钟;  Step 1: Adjust the phase and frequency of the second clock whose output frequency is the MHz of the phase-locked loop to be an integer multiple of the frequency of the reference clock, and the clock phase of the first branch of the second clock is 0 degrees. The clock phase of the second branch is π/Ν, the clock phase of the third branch is 2π/Ν... and so on, and the clock phase of the second branch is (Ν-1) π/Ν. First using the first shunt clock to generate a first clock with a frequency of D Hz;
步骤 2, 使用预设定频率为 R Hz的参考时钟与调整后的 D Hz的第一时 钟进行鉴相, 并得出两个时钟的频差 (R-D) Hz; 根据频差 (R-D) Hz计算 第一时钟 D Hz的补偿值, 补偿公式如下: 每秒补偿次数| ?-/)|>^/^ , 每 次补偿的频率差 R/(MxN) Hz; 每次补偿的频率差指示调整频率的精度; 步骤 3 ,平滑过渡至下一分路时钟计数,来输出频率为 D Hz的第一时钟, 若当前为第 N分路时钟计数, 则跳至第一分路时钟进行计数;  Step 2: Perform phase discrimination with the first clock of the adjusted D Hz using a reference clock with a preset frequency of R Hz, and obtain a frequency difference (RD) Hz of the two clocks; calculate according to the frequency difference (RD) Hz The compensation value of the first clock D Hz, the compensation formula is as follows: The number of compensations per second | ?-/)|>^/^ , the frequency difference of each compensation R / (MxN) Hz; The frequency difference of each compensation indicates the adjustment frequency Accuracy; Step 3, smooth transition to the next shunt clock count to output the first clock with a frequency of D Hz, if the current N-th branch clock counts, jump to the first shunt clock for counting;
步骤 4, 在调整周期 l/(|R-D|x /RxN)秒之后, 重复步骤 3。  Step 4. Repeat step 3 after adjusting the period l/(|R-D|x /RxN) seconds.
如图 3所示, 为本发明所述的一种调整频率的装置, 包括: 控制模块 31、 锁相环模块 32以及频率合成模块 33。  As shown in FIG. 3, a frequency adjustment device according to the present invention includes: a control module 31, a phase locked loop module 32, and a frequency synthesizing module 33.
所述控制模块 31设置成:输入上一釆样周期的参考时钟和频率合成模块 输出的上一釆样周期的第一时钟 , 输出根据所述参考时钟和所述第一时钟生 成的调整周期的时长;  The control module 31 is configured to: input a reference clock of the last sample period and a first clock of the last sample period output by the frequency synthesis module, and output an adjustment period generated according to the reference clock and the first clock duration;
所述锁相环模块 32设置成: 输入当前釆样周期的源时钟, 根据预设的倍 频系数, 输出预定分路总数且各分路具有预定相位差的当前釆样周期的第二 时钟; The phase locked loop module 32 is configured to: input a source clock of the current sampling period, according to a preset multiple a frequency coefficient, a second clock that outputs a predetermined total number of branches and each of the branches has a predetermined phase difference of the current sampling period;
所述频率合成模块 33设置成: 输入所述第二时钟,依次选择所述第二时 钟的各个分路, 并根据所述调整周期的时长、预设的合频系数进行频率合成, 输出当前调整周期的第一时钟。  The frequency synthesizing module 33 is configured to: input the second clock, sequentially select each branch of the second clock, perform frequency synthesis according to the duration of the adjustment period, a preset combining frequency coefficient, and output current adjustment The first clock of the cycle.
所述控制模块 31还设置成:根据所述参考时钟的频率和所述源时钟的频 率, 配置所述锁相环模块的倍频系数; 根据所述第一时钟的频率精度要求, 配置所述第二时钟的分路总数以及所述第二时钟的各分路之间的相位差; 以 及根据所述参考时钟的频率和所述锁相环的倍频系数, 配置所述频率合成模 块的合频系数。  The control module 31 is further configured to: configure a frequency multiplication coefficient of the phase locked loop module according to a frequency of the reference clock and a frequency of the source clock; configured to configure the frequency according to a frequency accuracy requirement of the first clock a total number of branches of the second clock and a phase difference between the branches of the second clock; and configuring the combination of the frequency synthesis module according to a frequency of the reference clock and a frequency multiplication coefficient of the phase locked loop Frequency factor.
上述方案中, 根据上一周期输出的第一时钟的频率和参考时钟的频率之 间的差值, 调整当前调整周期的输出的第一时钟的频率, 能够动态调整输出 频率, 实现比较简单。  In the above solution, according to the difference between the frequency of the first clock outputted by the previous cycle and the frequency of the reference clock, the frequency of the first clock of the output of the current adjustment period is adjusted, and the output frequency can be dynamically adjusted, which is relatively simple.
所述控制模块 31包括:  The control module 31 includes:
鉴相子模块, 其设置成计算所述上一釆样周期的参考时钟的频率和所述 上一釆样周期的第一时钟的频率之间的差的绝对值, 生成频率差值;  a phase detector module configured to calculate an absolute value of a difference between a frequency of a reference clock of the last sample period and a frequency of a first clock of the last sample period to generate a frequency difference value;
调整子模块, 其设置成根据所述频率差值、 所述第二时钟的频率、 所述 第二时钟的分路总数以及所述参考时钟的频率,生成调整周期的时长并输出。 所述频率合成模块 33包括:  The adjustment submodule is configured to generate and output an adjustment period according to the frequency difference, the frequency of the second clock, the total number of branches of the second clock, and the frequency of the reference clock. The frequency synthesis module 33 includes:
接收子模块, 其设置成从所述控制模块接收所述调整周期的时长; 判断子模块, 其设置成判断上一调整周期选择的所述第二时钟的分路是 否是最后一路, 生成判断结果;  a receiving submodule, configured to receive a duration of the adjustment period from the control module; and a determining submodule configured to determine whether the branch of the second clock selected by the last adjustment period is the last path, and generate a determination result ;
切换子模块, 其设置成当所述判断结果为上一调整周期选择的所述第二 时钟的分路是最后一路时, 切换至所述第二时钟的第一分路, 当所述判断结 果为上一调整周期选择的所述第二时钟的分路不是最后一路时, 切换至所述 第二时钟的下一分路; 频率合成子单元, 其设置成当所述判断结果为上一调整周期选择的所述 第二时钟的分路是最后一路时, 由当前调整周期的所述第二时钟的第一分路 进行频率合成; 当所述判断结果为上一调整周期选择的所述第二时钟的分路 不是最后一路时,由当前调整周期的所述第二时钟的下一分路进行频率合成; 定时子模块, 其设置成在所述调整周期的时长后, 进入下一调整周期。 所述频率合成子单元还设置成输出方波。 具体地, 当所述判断结果为上 一调整周期选择的所述第二时钟的分路是最后一路时, 当当前调整周期的所 述第二时钟的第一分路的上升沿出现的数量达到所述合频系数的倒数时, 触 发所述方波的高电平; 当当前调整周期的所述第二时钟的第一分路的下降沿 出现的数量达到所述合频系数的倒数时, 触发所述方波的低电平; 当所述判 断结果为上一调整周期选择的所述第二时钟的分路不是最后一路时, 当当前 调整周期的所述第二时钟的下一分路的上升沿出现的数量达到所述合频系数 的倒数时, 触发所述方波的高电平; 当当前调整周期的所述第二时钟的下一 分路的下降沿出现的数量达到所述合频系数的倒数时, 触发所述方波的低电 平; 所述合频系数的倒数为自然数。 a switching sub-module, configured to switch to the first branch of the second clock when the determination result is that the branch of the second clock selected by the last adjustment period is the last one, when the determination result Switching to the next branch of the second clock when the branch of the second clock selected for the last adjustment period is not the last one; the frequency synthesizing subunit, which is set to be the last adjustment when the judgment result is The first branch of the second clock of the current adjustment period when the branch of the second clock of the period selection is the last one Performing frequency synthesis; when the result of the determination is that the branch of the second clock selected in the last adjustment period is not the last one, the frequency is synthesized by the next branch of the second clock of the current adjustment period; The module is set to enter the next adjustment period after the duration of the adjustment period. The frequency synthesis subunit is also arranged to output a square wave. Specifically, when the determining result is that the branch of the second clock selected in the last adjustment period is the last one, when the rising edge of the first branch of the second clock of the current adjustment period occurs, the number of occurrences reaches a high level of the square wave when the reciprocal of the frequency combining coefficient is reached; when the number of falling edges of the first branch of the second clock of the current adjustment period reaches a reciprocal of the combining frequency coefficient, Triggering a low level of the square wave; when the determining result is that the branch of the second clock selected in the last adjustment period is not the last one, when the next branch of the second clock of the current adjustment period When the number of rising edges of the rising edge reaches the reciprocal of the combining frequency coefficient, the high level of the square wave is triggered; when the falling edge of the next branch of the second clock of the current adjustment period occurs, the number reaches When the reciprocal of the combining coefficient is used, the low level of the square wave is triggered; the reciprocal of the combining coefficient is a natural number.
所述调整周期的时长 T为 l/(| R - D | x /R x N) , 其中, R为上一调整周期 的所述参考时钟的频率, D为上一调整周期的所述第一时钟的频率, M为所 述第二时钟的频率, N为所述第二时钟的分路总数。  The duration T of the adjustment period is l/(| R - D | x /R x N), where R is the frequency of the reference clock of the last adjustment period, and D is the first period of the previous adjustment period The frequency of the clock, M is the frequency of the second clock, and N is the total number of branches of the second clock.
所述第二时钟的第 n-1分路与第 n分路之间的相位差为 π /Ν, 其中, η为 第二时钟的分路序号, 0≤n<N, Ν为第二时钟的分路总数。  The phase difference between the n-1th branch and the nth branch of the second clock is π /Ν, where η is the branch number of the second clock, 0≤n<N, and Ν is the second clock The total number of branches.
图 4是本发明所述的调整频率的装置的另一实施例的结构示意图; 本发 明所述的调整频率的装置中,鉴相子模块 41用于将合成的频率与参考时钟进 行鉴相统计;调整子模块 42对锁相环模块初始化,给锁相环发送配置信息(例 如倍频系数等) , 根据鉴相结果动态配置调整频率合成模块的调整信息 (例 如合频系数等) ; 锁相环模块 43用于将时钟源的源时钟倍频至更高的频率; 频率合成模块 44用于将高频率的第二时钟计数生成低频率的第一时钟。 图 5 是图 4所述的调整频率的装置的应用场景的流程示意图。 以下描述结合图 4 和图 5, 描述本发明所述的频率合成装置的应用场景。  4 is a schematic structural diagram of another embodiment of the apparatus for adjusting frequency according to the present invention; in the apparatus for adjusting frequency according to the present invention, the phase detecting sub-module 41 is configured to perform phase-collection statistics on the synthesized frequency and the reference clock. The adjustment sub-module 42 initializes the phase-locked loop module, sends configuration information (such as a multiplication factor, etc.) to the phase-locked loop, and dynamically adjusts the adjustment information of the frequency synthesis module according to the phase-detection result (for example, a frequency-combination coefficient, etc.); The ring module 43 is for multiplying the source clock of the clock source to a higher frequency; the frequency synthesis module 44 is configured to generate the second clock of the high frequency to generate the first clock of the low frequency. FIG. 5 is a schematic flow chart of an application scenario of the device for adjusting frequency according to FIG. The following description describes the application scenario of the frequency synthesizing apparatus according to the present invention with reference to Figs. 4 and 5.
步骤 51 , 根据参考时钟 5.0000001MHz, 配置锁相环模块 43输出的第二 时钟为 200MHz, 使得第二时钟为参考时钟和源时钟的公倍数; (本应用场 景中, 选取参考时钟的频率的整数位), 配置频率合成模块 44的输入输出分 别为 200MHz和 5MHz , 5ΜΗζ首先由第二时钟的第一分路计数生成, 共有 4 路第二时钟用于调整; 也就是说, 倍频系数为 20, 合频系数为 1/40。 Step 51: Configure the second clock outputted by the phase-locked loop module 43 to be 200 MHz according to the reference clock 5.0000001 MHz, so that the second clock is a common multiple of the reference clock and the source clock. (In this application scenario, the integer bit of the reference clock frequency is selected. ), configuring the input and output points of the frequency synthesis module 44 Don't be 200MHz and 5MHz, 5ΜΗζ is first generated by the first branch count of the second clock. There are 4 second clocks for adjustment; that is, the multiplication factor is 20 and the combining frequency is 1/40.
步骤 52, 鉴相子模块 41对频率合成模块 44输出的 5MHz第一时钟和参 考时钟 5.0000001MHz进行鉴相统计;  Step 52, the phase detector sub-module 41 performs phase-collecting statistics on the 5 MHz first clock and the reference clock 5.0000001 MHz output by the frequency synthesizing module 44;
步骤 53 , 调整子模块 42对鉴相值进行处理, 根据上文所述的计算出频 率合成模块 44的每秒补偿次数及补偿的频率差,其分别为 16次和 0.00625Hz; 步骤 54, 调整子模块 42将调整信息送入频率合成模块 44, 并实时根据 最新的预设参考时钟进行更新;  Step 53: The adjustment sub-module 42 processes the phase-detection value, and calculates the compensation times per second and the compensated frequency difference of the frequency synthesis module 44 according to the above, which are 16 times and 0.00625 Hz respectively; Step 54 The sub-module 42 sends the adjustment information to the frequency synthesis module 44, and updates in real time according to the latest preset reference clock;
步骤 55 , 频率合成模块 44根据调整信息得到调整间隔为 0.0625秒; 步骤 56, 判断当前的 5MHz是否为第四路时钟计数, 若是则进行步骤 57 否则进行步骤 58;  Step 55, the frequency synthesis module 44 according to the adjustment information to obtain an adjustment interval of 0.0625 seconds; Step 56, determine whether the current 5MHz is the fourth clock count, if yes, proceed to step 57, otherwise proceed to step 58;
步骤 57 , 5MHz时钟由第二时钟计数切换至第一分路时钟计数, 进行步 骤 59;  Step 57, the 5MHz clock is switched from the second clock count to the first split clock count, and step 59 is performed;
步骤 58, 5MHz时钟由第二时钟计数切换至下一分路时钟计数, 进行步 骤 59;  Step 58, the 5MHz clock is switched from the second clock count to the next split clock count, and step 59 is performed;
步骤 59, 在调整周期时长后, 进行步骤 55。  Step 59: After adjusting the period of time, proceed to step 55.
本发明提供了一种调整频率的方法和装置, 能够动态调整时钟源频率。 釆用多个不同相位的高频率时钟合成低频率时钟。 不仅能够实现高精度的频 率合成, 而且能够实现低频率的微调。 可以有效地提高输出时钟的精度和稳 定性等性能指标, 降低时钟系统整体成本, 并可以用于各种时钟频率恢复的 应用场合, 具有艮强的通用性。 在上述实施例中, H没时钟源为 10MHz, 时 钟源的调整范围为 10MHz±50Hz, 而当期望得到 10MHz+60Hz的时候。 由于 时钟源自身的调整范围有限, 达不到这个频率, 同时普通锁相环对应到 10MHz±50Hz的输入频率也 4艮难输出期望得到的频率。 而通过上述方式, 则 很容易实现。  The present invention provides a method and apparatus for adjusting a frequency that dynamically adjusts the clock source frequency.合成 Combine high frequency clocks with multiple different phases to synthesize low frequency clocks. Not only can high-precision frequency synthesis be achieved, but also low-frequency fine-tuning can be achieved. It can effectively improve the performance and performance indicators such as the accuracy and stability of the output clock, reduce the overall cost of the clock system, and can be used in various clock frequency recovery applications, with a strong versatility. In the above embodiment, H has no clock source of 10 MHz, and the clock source has an adjustment range of 10 MHz ± 50 Hz, and when 10 MHz + 60 Hz is desired. Due to the limited adjustment range of the clock source itself, this frequency is not achieved, and the common phase-locked loop corresponds to an input frequency of 10 MHz ± 50 Hz. In the above way, it is easy to implement.
所述锁相环的倍频系数为锁相环的输出时钟的频率和输入时钟的频率之 间的比值, 可以为正整数; 所述频率合成模块的合频系数为频率合成模块的 输出时钟的频率和输入时钟的频率之间的比值, 可以为正整数的倒数。 所述方法实施例是与所述装置实施例相对应的 , 在方法实施例中未详细 描述的部分参照装置实施例中相关部分的描述即可, 在装置实施例中未详细 描述的部分参照方法实施例中相关部分的描述即可。 The frequency multiplication coefficient of the phase locked loop is a ratio between the frequency of the output clock of the phase locked loop and the frequency of the input clock, and may be a positive integer; the frequency combining coefficient of the frequency synthesizing module is the output clock of the frequency synthesizing module. The ratio between the frequency and the frequency of the input clock can be the reciprocal of a positive integer. The method embodiment is corresponding to the device embodiment, and the portion not described in detail in the method embodiment may refer to the description of the relevant part in the device embodiment, and the partial reference method not described in detail in the device embodiment. The description of the relevant parts in the embodiment can be.
本领域普通技术人员可以理解, 实现上述实施例方法中的全部或部分步 骤是可以通过程序来指令相关的硬件来完成, 所述的程序可以存储于一计算 机可读取存储介质中, 该程序在执行时, 包括如上述方法实施例的步骤, 所 述的存储介质,如:磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM ) 或随机存 ϋ己忆体 ( Random Access Memory, RAM )等。  It will be understood by those skilled in the art that all or part of the steps of the foregoing embodiments may be implemented by a program to instruct related hardware, and the program may be stored in a computer readable storage medium. When executed, the method includes the steps of the foregoing method embodiment, such as: a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (No. RAM) and so on.
在本发明各方法实施例中, 所述各步骤的序号并不能用于限定各步骤的 先后顺序, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 对各步骤的先后变化也在本发明的保护范围之内。  In the method embodiments of the present invention, the sequence numbers of the steps are not used to limit the sequence of the steps. For those skilled in the art, the steps of the steps are changed without any creative work. It is also within the scope of the invention.
以上所述是本发明的优选实施方式, 应当指出, 对于本技术领域的普通 技术人员来说, 在不脱离本发明所述原理的前提下, 还可以作出若干改进和 润饰, 这些改进和润饰也应视为本发明的保护范围。  The above is a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention.
工业实用性 本发明提供的调整频率的方法和装置, 能够动态调整时钟源频率; 釆用 多个不同相位的高频率时钟合成低频率时钟, 不仅能够实现高精度的频率合 成, 而且能够实现低频率的微调, 可以有效地提高输出时钟的精度和稳定性 等性能指标, 降低时钟系统整体成本, 并可以用于各种时钟频率恢复的应用 场合, 具有很强的通用性。 INDUSTRIAL APPLICABILITY The method and apparatus for adjusting a frequency provided by the present invention can dynamically adjust a clock source frequency. 合成 Combining a plurality of high-frequency clocks of different phases to synthesize a low-frequency clock can realize not only high-precision frequency synthesis but also low frequency. The fine adjustment can effectively improve the performance and performance indexes of the output clock, reduce the overall cost of the clock system, and can be used in various clock frequency recovery applications, and has strong versatility.

Claims

权 利 要 求 书 Claim
1. 一种调整频率的方法, 包括: 1. A method of adjusting frequency, including:
频率合成模块输出上一釆样周期的第一时钟, 控制模块输入上一釆样周 期的参考时钟和所述上一釆样周期的第一时钟, 输出根据所述参考时钟和所 述第一时钟生成的调整周期的时长;  The frequency synthesizing module outputs a first clock of the last sampling period, the control module inputs a reference clock of the last sampling period and a first clock of the last sampling period, and outputs the reference clock according to the reference clock and the first clock The length of the generated adjustment period;
锁相环模块输入当前釆样周期的源时钟, 根据预设的倍频系数, 输出预 定分路总数且各分路具有预定相位差的当前釆样周期的第二时钟;  The phase-locked loop module inputs a source clock of the current sampling period, and outputs a second clock of a current sampling period according to a preset multiplication factor, and each branch has a predetermined phase difference;
所述频率合成模块输入所述第二时钟, 依次选择所述第二时钟的各个分 路, 根据所述调整周期的时长、 预设的合频系数进行频率合成, 输出当前调 整周期的第一时钟。  The frequency synthesizing module inputs the second clock, sequentially selects each branch of the second clock, performs frequency synthesis according to the duration of the adjustment period, a preset combining frequency coefficient, and outputs a first clock of the current adjustment period. .
2. 根据权利要求 1所述的调整频率的方法, 其中, 在所述频率合成模块 输出上一釆样周期的第一时钟, 控制模块输入上一釆样周期的参考时钟和所 述上一釆样周期的第一时钟, 输出根据所述参考时钟和所述第一时钟生成的 调整周期的时长的步骤之前, 所述方法还包括:  2. The method of adjusting a frequency according to claim 1, wherein the frequency synthesizing module outputs a first clock of a last sampling period, and the control module inputs a reference clock of the last sampling period and the previous one The first clock of the sample period, before the step of outputting the length of the adjustment period generated according to the reference clock and the first clock, the method further includes:
所述控制模块根据所述参考时钟的频率和所述源时钟的频率, 配置所述 锁相环模块的倍频系数;  The control module configures a frequency multiplication coefficient of the phase locked loop module according to a frequency of the reference clock and a frequency of the source clock;
所述控制模块根据所述第一时钟的频率的精度要求, 配置所述第二时钟 的分路总数以及所述第二时钟的各分路之间的相位差;  The control module configures a total number of branches of the second clock and a phase difference between each branch of the second clock according to an accuracy requirement of a frequency of the first clock;
所述控制模块根据所述参考时钟的频率和所述锁相环的倍频系数, 配置 所述频率合成模块的合频系数。  The control module configures a frequency combining coefficient of the frequency synthesizing module according to a frequency of the reference clock and a frequency multiplication coefficient of the phase locked loop.
3. 根据权利要求 1所述的调整频率的方法, 其中, 所述频率合成模块输 入所述第二时钟, 依次选择所述第二时钟的各个分路, 根据所述调整周期的 时长、 预设的合频系数进行频率合成, 输出当前调整周期的第一时钟的步骤 包括:  The method for adjusting a frequency according to claim 1, wherein the frequency synthesizing module inputs the second clock, and sequentially selects each branch of the second clock, according to the duration of the adjustment period, preset The frequency combining coefficient performs frequency synthesis, and the steps of outputting the first clock of the current adjustment period include:
步骤 31 , 所述频率合成模块从所述控制模块接收所述调整周期的时长; 步骤 32, 所述频率合成模块判断上一调整周期选择的所述第二时钟的分 路是否是最后一路, 若上一调整周期选择的所述第二时钟的分路是最后一路 则进行步骤 33 , 若上一调整周期选择的所述第二时钟的分路不是最后一路则 进行步骤 34; Step 31: The frequency synthesizing module receives the duration of the adjustment period from the control module. Step 32: The frequency synthesizing module determines whether the branch of the second clock selected in the last adjustment period is the last one, if The split of the second clock selected in the last adjustment period is the last one Then proceed to step 33, if the branch of the second clock selected in the last adjustment period is not the last one, proceed to step 34;
步骤 33 , 切换至所述第二时钟的第一分路, 由当前调整周期的所述第二 时钟的第一分路进行频率合成, 然后进行步骤 35;  Step 33, switching to the first branch of the second clock, frequency synthesis by the first branch of the second clock of the current adjustment period, and then proceeding to step 35;
步骤 34 , 切换至所述第二时钟的下一分路, 由当前调整周期的所述第二 时钟的下一分路进行频率合成, 然后进行步骤 35;  Step 34, switching to the next branch of the second clock, performing frequency synthesis by the next branch of the second clock of the current adjustment period, and then performing step 35;
步骤 35 , 在所述调整周期的时长后, 进入下一调整周期。  Step 35: After the duration of the adjustment period, enter a next adjustment period.
4. 根据权利要求 3所述的调整频率的方法, 其中,  4. The method of adjusting a frequency according to claim 3, wherein
所述由当前调整周期的所述第二时钟的第一分路进行频率合成的步骤包 括:  The step of performing frequency synthesis by the first branch of the second clock of the current adjustment period includes:
输出方波, 当当前调整周期的所述第二时钟的第一分路的上升沿出现的 数量达到所述合频系数的倒数时, 触发所述方波的高电平; 当当前调整周期 的所述第二时钟的第一分路的下降沿出现的数量达到所述合频系数的倒数 时, 触发所述方波的低电平;  Outputting a square wave, when the number of rising edges of the first branch of the second clock of the current adjustment period reaches a reciprocal of the combining coefficient, triggering a high level of the square wave; when the current adjustment period is The low level of the square wave is triggered when the number of falling edges of the first branch of the second clock reaches the reciprocal of the combining frequency coefficient;
所述由当前调整周期的所述第二时钟的下一分路进行频率合成的步骤包 括:  The step of performing frequency synthesis by the next branch of the second clock of the current adjustment period includes:
输出方波, 当当前调整周期的所述第二时钟的下一分路的上升沿出现的 数量达到所述合频系数的倒数时, 触发所述方波的高电平; 当当前调整周期 的所述第二时钟的下一分路的下降沿出现的数量达到所述合频系数的倒数 时, 触发所述方波的低电平; 所述合频系数的倒数为自然数。  Outputting a square wave, when the number of rising edges of the next branch of the second clock of the current adjustment period reaches a reciprocal of the combining coefficient, triggering a high level of the square wave; when the current adjustment period is When the number of falling edges of the next branch of the second clock reaches the reciprocal of the combining coefficient, the low level of the square wave is triggered; the reciprocal of the combining coefficient is a natural number.
5. 根据权利要求 3所述的调整频率的方法, 其中, 所述控制模块输入上 一釆样周期的参考时钟和所述上一釆样周期的第一时钟 , 输出根据所述参考 时钟和所述第一时钟生成的调整周期的时长的步骤包括:  The method for adjusting a frequency according to claim 3, wherein the control module inputs a reference clock of a last sampling period and a first clock of the last sampling period, and outputs according to the reference clock and the The steps of the duration of the adjustment period generated by the first clock include:
所述控制模块计算所述上一釆样周期的参考时钟的频率和所述上一釆样 周期的第一时钟的频率之间的差的绝对值, 生成频率差值;  The control module calculates an absolute value of a difference between a frequency of a reference clock of the last sample period and a frequency of a first clock of the last sample period to generate a frequency difference value;
所述控制模块根据所述频率差值、 所述第二时钟的频率、 所述第二时钟 的分路总数以及所述参考时钟的频率, 生成调整周期的时长并输出。  The control module generates and outputs an adjustment period according to the frequency difference, the frequency of the second clock, the total number of branches of the second clock, and the frequency of the reference clock.
6. 根据权利要求 5所述的调整频率的方法, 其中, 所述调整周期的时长 T为 l/(| R - D | xMRxN) , 其中, R为上一调整周期的所述参考时钟的频率, D 为上一调整周期的所述第一时钟的频率, M为所述第二时钟的频率, N为所 述第二时钟的分路总数。 6. The method of adjusting a frequency according to claim 5, wherein a duration of the adjustment period T is l/(| R - D | xMRxN) , where R is the frequency of the reference clock of the last adjustment period, D is the frequency of the first clock of the last adjustment period, and M is the second The frequency of the clock, N is the total number of branches of the second clock.
7. 根据权利要求 3 所述的调整频率的方法, 其中, 所述第二时钟的第 n-1分路与第 n分路之间的相位差为 π /Ν, 其中, η为第二时钟的分路序号,The method for adjusting a frequency according to claim 3, wherein a phase difference between an n-1th branch and an nth branch of the second clock is π /Ν, where η is a second clock The serial number of the branch,
0<n<N, Ν为第二时钟的分路总数。 0<n<N, Ν is the total number of branches of the second clock.
8. 一种调整频率的装置, 包括: 控制模块、 锁相环模块以及频率合成模 块; 其中,  8. A device for adjusting a frequency, comprising: a control module, a phase locked loop module, and a frequency synthesizing module; wherein
所述控制模块设置成: 输入上一釆样周期的参考时钟和所述频率合成模 块输出的上一釆样周期的第一时钟, 输出根据所述参考时钟和所述第一时钟 生成的调整周期的时长;  The control module is configured to: input a reference clock of the last sample period and a first clock of the last sample period output by the frequency synthesis module, and output an adjustment period generated according to the reference clock and the first clock Length of time;
所述锁相环模块设置成: 输入当前釆样周期的源时钟, 根据预设的倍频 系数, 输出预定分路总数且各分路具有预定相位差的当前釆样周期的第二时 钟; 以及  The phase-locked loop module is configured to: input a source clock of a current sampling period, and output a second clock of a current sampling period according to a preset multiplication factor, and each of the branches has a predetermined phase difference; and
所述频率合成模块设置成: 输入所述第二时钟, 依次选择所述第二时钟 的各个分路, 并根据所述调整周期的时长、 预设的合频系数进行频率合成, 输出当前调整周期的第一时钟。  The frequency synthesizing module is configured to: input the second clock, sequentially select each branch of the second clock, perform frequency synthesis according to the duration of the adjustment period, a preset frequency combination coefficient, and output a current adjustment period. The first clock.
9. 根据权利要求 8所述的调整频率的装置, 其中, 所述控制模块还设置 成: 根据所述参考时钟的频率和所述源时钟的频率, 配置所述锁相环模块的 倍频系数; 根据所述第一时钟的频率的精度要求, 配置所述第二时钟的分路 总数以及所述第二时钟的各分路之间的相位差; 以及根据所述参考时钟的频 率和所述锁相环的倍频系数, 配置所述频率合成模块的合频系数。  The apparatus for adjusting a frequency according to claim 8, wherein the control module is further configured to: configure a frequency multiplication coefficient of the phase locked loop module according to a frequency of the reference clock and a frequency of the source clock Configuring a total number of branches of the second clock and a phase difference between the branches of the second clock according to an accuracy requirement of a frequency of the first clock; and according to a frequency of the reference clock and the The multiplication factor of the phase locked loop, and the frequency combining coefficient of the frequency synthesis module is configured.
10. 根据权利要求 8所述的调整频率的装置, 其中, 所述频率合成模块 包括:  10. The apparatus for adjusting a frequency according to claim 8, wherein the frequency synthesizing module comprises:
接收子模块, 其设置成从所述控制模块接收所述调整周期的时长; 判断子模块, 其设置成判断上一调整周期选择的所述第二时钟的分路是 否是最后一路, 生成判断结果;  a receiving submodule, configured to receive a duration of the adjustment period from the control module; and a determining submodule configured to determine whether the branch of the second clock selected by the last adjustment period is the last path, and generate a determination result ;
切换子模块, 其设置成当所述判断结果为上一调整周期选择的所述第二 时钟的分路是最后一路时, 切换至所述第二时钟的第一分路, 当所述判断结 果为上一调整周期选择的所述第二时钟的分路不是最后一路时, 切换至所述 第二时钟的下一分路; 频率合成子单元, 其设置成当所述判断结果为上一调整周期选择的所述 第二时钟的分路是最后一路时, 由当前调整周期的所述第二时钟的第一分路 进行频率合成; 当所述判断结果为上一调整周期选择的所述第二时钟的分路 不是最后一路时,由当前调整周期的所述第二时钟的下一分路进行频率合成; 定时子模块, 其设置成在所述调整周期的时长后, 进入下一调整周期。a switching submodule, configured to be the second selected when the determination result is the last adjustment period When the branch of the clock is the last one, switching to the first branch of the second clock, when the result of the determination is that the branch of the second clock selected in the previous adjustment period is not the last one, switch to the a next branch of the second clock; a frequency synthesizing subunit configured to be configured by the current adjustment period when the branch of the second clock selected by the determination result is the last one of the last adjustment period The first branch of the second clock performs frequency synthesis; when the result of the determination is that the branch of the second clock selected in the previous adjustment period is not the last one, the next clock of the current adjustment period is next The frequency division performs frequency synthesis; the timing sub-module is set to enter the next adjustment period after the duration of the adjustment period.
11. 根据权利要求 10所述的调整频率的装置, 其中, 所述频率合成子单 元还设置成输出方波; 11. The apparatus for adjusting a frequency according to claim 10, wherein the frequency synthesizing subunit is further configured to output a square wave;
当所述判断结果为上一调整周期选择的所述第二时钟的分路是最后一路 时, 当当前调整周期的所述第二时钟的第一分路的上升沿出现的数量达到所 述合频系数的倒数时, 触发所述方波的高电平; 当当前调整周期的所述第二 时钟的第一分路的下降沿出现的数量达到所述合频系数的倒数时, 触发所述 方波的低电平;  When the result of the determination is that the branch of the second clock selected in the last adjustment period is the last one, the number of occurrences of the rising edge of the first branch of the second clock of the current adjustment period reaches the sum Triggering the high level of the square wave; when the number of falling edges of the first branch of the second clock of the current adjustment period reaches the reciprocal of the combining coefficient, triggering the Square wave low level;
当所述判断结果为上一调整周期选择的所述第二时钟的分路不是最后一 路时, 当当前调整周期的所述第二时钟的下一分路的上升沿出现的数量达到 所述合频系数的倒数时, 触发所述方波的高电平; 当当前调整周期的所述第 二时钟的下一分路的下降沿出现的数量达到所述合频系数的倒数时, 触发所 述方波的低电平; 所述合频系数的倒数为自然数。  When the result of the determination is that the branch of the second clock selected in the last adjustment period is not the last one, the number of occurrences of the rising edge of the next branch of the second clock of the current adjustment period reaches the sum Triggering the high level of the square wave; when the number of falling edges of the next branch of the second clock of the current adjustment period reaches the reciprocal of the combining coefficient, triggering the The low level of the square wave; the reciprocal of the combined frequency coefficient is a natural number.
12.根据权利要求 10所述的调整频率的装置,其中,所述控制模块包括: 鉴相子模块, 其设置成计算所述上一釆样周期的参考时钟的频率和所述 上一釆样周期的第一时钟的频率之间的差的绝对值, 生成频率差值;  12. The frequency adjustment apparatus of claim 10, wherein the control module comprises: a phase discrimination sub-module configured to calculate a frequency of the reference clock of the last sample period and the previous sample Generating a frequency difference value by the absolute value of the difference between the frequencies of the first clock of the cycle;
调整子模块, 其设置成根据所述频率差值、 所述第二时钟的频率、 所述 第二时钟的分路总数以及所述参考时钟的频率,生成调整周期的时长并输出。  The adjustment submodule is configured to generate and output an adjustment period according to the frequency difference, the frequency of the second clock, the total number of branches of the second clock, and the frequency of the reference clock.
PCT/CN2010/074667 2010-06-10 2010-06-29 Method and apparatus for adjusting frequncies WO2011153721A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010196934.9 2010-06-10
CN2010101969349A CN102281063A (en) 2010-06-10 2010-06-10 Method and device for adjusting frequencies

Publications (1)

Publication Number Publication Date
WO2011153721A1 true WO2011153721A1 (en) 2011-12-15

Family

ID=45097476

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/074667 WO2011153721A1 (en) 2010-06-10 2010-06-29 Method and apparatus for adjusting frequncies

Country Status (2)

Country Link
CN (1) CN102281063A (en)
WO (1) WO2011153721A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9563227B2 (en) * 2013-02-06 2017-02-07 Nvidia Corporation Approach to clock frequency modulation of a fixed frequency clock source
CN103412615B (en) * 2013-08-22 2018-02-09 中国航天科工集团第三研究院第八三五七研究所 A kind of impulse- free robustness self-adaptation clock switching method for UART interface chip
CN104639042B (en) * 2014-12-24 2017-11-17 聚辰半导体(上海)有限公司 Low-power consumption is adjustable frequency multiplier
CN104954721B (en) * 2015-06-15 2018-07-24 中国航空无线电电子研究所 A kind of DVI video reception coding/decoding methods based on FPGA
US11526193B2 (en) 2019-03-07 2022-12-13 Skyworks Solutions, Inc. Maintaining the correct time when counter values are transferred between clock domains
CN113268104B (en) * 2021-05-27 2023-09-26 瑞芯微电子股份有限公司 Clock counting synchronization method and device
CN116743121B (en) * 2023-08-16 2023-10-27 沐曦集成电路(上海)有限公司 Clock selection system for digital frequency synthesizer

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1447556A (en) * 2002-03-22 2003-10-08 印芬龙科技股份有限公司 Calculating circuit for calculating sampling phase error
CN101242258A (en) * 2007-02-06 2008-08-13 汤姆森许可贸易公司 Device for generating counter signals and device for reconstructing clock signals
US20090041104A1 (en) * 2006-06-27 2009-02-12 Bogdan John W Phase and Frequency Recovery Techniques

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6748549B1 (en) * 2000-06-26 2004-06-08 Intel Corporation Clocking an I/O buffer, having a selectable phase difference from the system clock, to and from a remote I/O buffer clocked in phase with the system clock
US7180339B2 (en) * 2004-04-26 2007-02-20 Analog Devices, Inc. Synthesizer and method for generating an output signal that has a desired period
CN101540606B (en) * 2009-02-20 2011-10-26 中国科学院微电子研究所 Frequency synthesizer based on multi-channel sampling and frequency synthesis method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1447556A (en) * 2002-03-22 2003-10-08 印芬龙科技股份有限公司 Calculating circuit for calculating sampling phase error
US20090041104A1 (en) * 2006-06-27 2009-02-12 Bogdan John W Phase and Frequency Recovery Techniques
CN101242258A (en) * 2007-02-06 2008-08-13 汤姆森许可贸易公司 Device for generating counter signals and device for reconstructing clock signals

Also Published As

Publication number Publication date
CN102281063A (en) 2011-12-14

Similar Documents

Publication Publication Date Title
WO2011153721A1 (en) Method and apparatus for adjusting frequncies
US7825719B2 (en) System and method for wideband phase-adjustable common excitation
CN101547296B (en) Delay locked loop circuit and method
KR102427375B1 (en) Phase lock loop circuit having a wide bandwidth
RU2011103161A (en) ELECTRONIC CIRCUIT, ELECTRONIC DEVICE AND METHOD OF DIGITAL SIGNAL PROCESSING
US11095291B2 (en) Time measurement circuit, system having a PWM signal generator circuit and a time measurement circuit, and corresponding integrated circuit
JP5899244B2 (en) Reference frequency generator and sine wave output method
JP2001119291A (en) Frequency measuring circuit
US8536911B1 (en) PLL circuit, method of controlling PLL circuit, and digital circuit
JP2017118192A5 (en) Timing signal generating apparatus and electronic device
US7675333B2 (en) Multi-phase delay locked loop with equally-spaced phases over a wide frequency range and method thereof
JP2010021686A (en) Digital phase detector and digital phase-locked loop circuit
KR100414864B1 (en) Digital Counter and Digital PLL Circuit
WO2006052416A2 (en) Method and apparatus for a digital-to-phase converter
TW201316150A (en) Multi-phase clock generation system and clock calibration thereof
JP2004032586A (en) Multiplied pll circuit
JP2018042032A (en) Receiver
KR101628160B1 (en) Phase generator based on delay lock loop circuit and delay locking method thereof
JPH11261522A (en) Pulse density modulating device
KR101430796B1 (en) Phase-frequency decector proving frequency multiplying, phase locked loop comprising the phase-frequency decector, and clock and data recovery circuit comprising the phase-frequency decector
EP1514371B1 (en) Frame boundary discriminator
JP5803568B2 (en) Phase synchronization circuit and phase synchronization circuit control method
JP3246459B2 (en) Clock synchronization method and clock synchronization circuit
JPH04207520A (en) Synchronization system for asynchronous clock pulse
KR102223652B1 (en) Apparatus and Method for Sub Sampling Clock

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10852714

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10852714

Country of ref document: EP

Kind code of ref document: A1