Frequency calibration method and system based on jump search, medium and equipment

By adopting a jump search-based method in VCO frequency calibration, the step length is dynamically adjusted to achieve frequency calibration, the problem of long frequency calibration time in the prior art is solved, the calibration efficiency and accuracy are improved, and it is suitable for a wide frequency range.

CN120150696APending Publication Date: 2025-06-13HEFEI UNIV OF TECH

Patent Information

Application Number
CN202510223454.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing VCO frequency calibration methods have a long calibration time, especially in the case of a wide frequency range, resulting in failure of system link training and failure of chips.

Method used

The frequency calibration method based on jump search is adopted, and the output clock frequency of the oscillator is controlled by obtaining the voltage, frequency detection and indication signal output are performed, and the step size of the calculation logic is dynamically adjusted to achieve fast and accurate frequency calibration.

Benefits of technology

Compared with linear search and PLL methods, the jump search method significantly shortens the calibration time, is suitable for a wide frequency range, improves the efficiency and accuracy of frequency calibration, and reduces hardware complexity and resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120150696A_ABST
    Figure CN120150696A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a system, a medium and equipment for frequency calibration based on jump search. The method comprises the following steps: acquiring the output clock frequency of a voltage control oscillator; performing frequency detection on the clock frequency, judging whether the current frequency is greater than the target frequency, less than the target frequency or within the target frequency range, and outputting a corresponding indication signal; according to the indication signal output by the frequency detection module, the step length of the calculation logic is adjusted, and the calibration result is fed back to the voltage control oscillator, and the problem that the calibration time of the VCO in large-range frequency calibration is too long is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of frequency calibration, and specifically provides a method, system, medium and device for frequency calibration based on jump search. Background Art

[0002] The currently commonly used methods for frequency calibration of a voltage controlled oscillator (VCO) are as follows:

[0003] 1. Linear search method

[0004] Starting from the lowest frequency, the control voltage is gradually increased to linearly scan all possible frequency points until the target frequency is found. Although it is simple to implement, the calibration time is long and the efficiency is low. If the frequency range is wide, the time consumption will increase significantly. However, in the HDMI or DP protocol, if the VCO calibration time is too long, it will cause the system link training to fail, resulting in an inability to establish a stable path, and will also cause the chip to fail the consistency CTS test, affecting the promotion to the client.

[0005] 2. Frequency calibration based on a phase locked loop (PLL)

[0006] The VCO frequency is locked to the reference frequency through the PLL, and the feedback characteristic of the PLL is used to automatically adjust the control voltage of the VCO. Although the degree of automation is high and the accuracy is high. However, the hardware implementation is complex, and the locking time of the PLL may be long.

[0007] In the prior art, the invention patent with the patent publication number CN102545894A discloses a method and device for fast frequency positioning of a phase locked loop. This method divides the entire operating frequency into many frequency bands. Through direct frequency search, it first determines which frequency band the target frequency is in. After determining the frequency band, the system clock directly jumps to a suitable initial frequency, and then only needs to adjust the phase within a very small range to obtain the final system clock frequency. However, the technical problem solved by this patent is fast frequency positioning. The frequency comparator can only judge whether the current clock is too fast or too slow for a certain frequency point, and the frequency automatic search controller uses stimulation algorithms including the exhaustive method from small to large or from large to small, and the successive approximation method to search for the ideal coefficient. Summary of the Invention

[0008] The technical problem to be solved by the present invention is: to solve the problem of long calibration time of the current VCO frequency calibration method.

[0009] To solve the above technical problem, the present invention provides the following technical solutions:

[0010] A method for frequency calibration based on jump search, comprising:

[0011] Obtain the output clock frequency of the voltage controlled oscillator;

[0012] Perform frequency detection on the clock frequency, determine whether the current frequency is greater than, less than, or within the target frequency range, and output a corresponding indication signal;

[0013] According to the indication signal output by the frequency detection module, adjust the step size of the calculation logic, and feedback the calibration result to the voltage controlled oscillator.

[0014] In an embodiment of the present invention, the frequency detection module outputs a corresponding indication signal, including:

[0015] Use the crystal oscillator clock as the reference clock;

[0016] Configure the detection window length Lref based on the reference clock, the number of counts Nref of the target frequency in the detection window length, and the error threshold Nth through the first register;

[0017] Count the number of rising edges Nmea of the measurement clock within the detection window length Lref;

[0018] If Nref–Nth≤Nmea≤Nref+Nth, it is determined that the frequency is locked, the detected frequency is within the target frequency range, and the signal mid is output for indication;

[0019] If Nmea<Nreff-Nth, the signal less is output for indication, the detected frequency is less than the target frequency, and the error result Ndiff=Nreff-Nth–Nmea is output;

[0020] If Nmea>Nreff+Nth, the signal more is output for indication, the detected frequency is greater than the target frequency, and the error result Ndiff=Nmea–Nreff-Nth is output.

[0021] In an embodiment of the present invention, the jump search module outputs a frequency calibration result, including:

[0022] S31, Configure the initial step size Nstep, the calibration maximum value Amax, the calibration minimum value Amin, and the initial calibration value Minit0 in the second register; set last_status=mid

[0023] S32, Output the calibration value Maj=Minit to the voltage controlled oscillator;

[0024] S33, Wait for feedback from the frequency detection module;

[0025] S34, Store the indication signal feedback by the frequency detection module into current_status;

[0026] S35. If the current frequency detection indication current_status = less, use the current calibration value Maj t plus the current step size Nstep t , and output the calibration result Maj t+1 = Maj t + Nstep t ; t and t + 1 represent the current moment and the next moment respectively;

[0027] S36. If the current frequency detection indication current_status = more, use the current calibration value Maj t minus the current step size Nstep t , and output the calibration result Maj t+1 = Maj t - Nstep t ;

[0028] S37. Set last_status = current_status;

[0029] S38. Feed back the calibration result to the voltage controlled oscillator;

[0030] S39. Wait for the feedback from the frequency detection module;

[0031] S310. Store the indication signal of the frequency detection feedback into current_status. If the result of the received frequency detection indication of the frequency magnitude is different from the previous time, divide the step size Nstep by 2; if the step size Nstep is not a multiple of 2, the operation result needs to be rounded down;

[0032] S311. Repeat steps S35 to S310 until the step size Nstep finally becomes 0.

[0033] In an embodiment of the present invention, during the repetition of steps S35 to S310, when the step size Nstep is 1, let the error result Ndiff when the step size Nstep is 1 1 be equal to the current error result Ndiff t , and the calibration value Maj when the step size Nstep is 1 1 be equal to the current calibration value Maj t .

[0034] In an embodiment of the present invention, S312. When the step size Nstep is 0, compare the current error result Ndiff t with the error result Ndiff when the step size Nstep is 1 1 :

[0035] If Ndifft >Ndiff 1 then output the current calibration result Maj t = Maj 1 ;

[0036] If Ndiff t ≤ Ndiff 1 then maintain the calibration result Maj of the day t Output.

[0037] In an embodiment of the present invention, the error threshold Nth can control the target frequency to be a fixed frequency value or a frequency range.

[0038] The present invention also provides a system for frequency calibration based on jump search, applying the method for frequency calibration based on jump search as described above, including:

[0039] A VCO module for obtaining the output clock frequency of a voltage-controlled oscillator;

[0040] A frequency detection module for detecting the frequency of the output clock frequency of the VCO module, determining whether the current frequency is greater than, less than or within the target frequency range, and outputting a corresponding indication signal;

[0041] A jump search module for adjusting the step size of the calculation logic according to the indication signal output by the frequency detection module and feeding back the calibration result to the voltage-controlled oscillator.

[0042] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the method steps for frequency calibration based on jump search as described above are implemented.

[0043] The present invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method steps for frequency calibration based on jump search as described above are implemented, and at the same time, the compatibility of the present invention with different system requirements can be improved.

[0044] Compared with the prior art, the beneficial effects of the present invention are:

[0045] The present invention uses an optimized jump search method to jump-scan the frequency through a predefined step size and narrow the step size for precise adjustment when approaching the target frequency. It is faster than linear search, suitable for a wider frequency range, and can optimize the time consumption to a certain extent. And by comparing the value of the previous measurement result with the current measurement result when approaching the target frequency and selecting the calibration result closer to the target frequency for output, the disadvantage of possibly skipping the target frequency is compensated.

[0046] The present invention only uses two modules, namely frequency detection and jump search, with low implementation complexity, less resource occupancy, strong portability and small computational load. The algorithm is easy to implement and does not require complex filters or feedback mechanisms. By dynamically adjusting the step size, the jump search method can adapt to different adjustment stages with high flexibility. In some applications, the adjustment range of the PLL may be limited, especially when the adjustment range of the VCO is very wide. However, the optimized jump search method in the present invention can flexibly set the step size and search range according to requirements to adapt to different frequency adjustment needs, especially performing well in a relatively wide adjustment range. It well solves the pain point that in a certain chip area for PLL calibration, expanding the frequency locking range sacrifices the frequency locking time, and shortening the frequency locking time sacrifices the frequency locking range.

[0047] Compared with the exhaustive search method from small to large and from large to small, the jump search method has a significant speed advantage. When searching in a large range, the number of searches can be greatly reduced. Compared with the successive approximation method that needs to save additional gradient information, the value of the objective function and the position of each iteration, the jump search method has low memory requirements and only needs to save the current search position and step size. Moreover, the optimized jump search method of this solution can adjust the step size in real time, so it can maintain high precision and repair the original disadvantage of low precision. And the jump search method of the present invention is superior to the successive approximation method in terms of search speed hardware implementation and consumption of hardware resources. And the jump search method of this invention has low implementation complexity and can greatly reduce the time cost in research and development. At the same time, through the method of combining software and hardware, the compatibility of the present invention in different system requirements is greatly improved.

[0048] Therefore, the present invention better solves the problem of too long calibration time for the VCO in large-range frequency calibration. And it can not only calibrate the frequency to a certain fixed point, but also calibrate the frequency to a certain required range to meet the system requirements. By measuring the clock output by the current VCO through frequency detection, judging the current frequency and outputting the current detection result, the jump search module will use the result of the current frequency detection module to adjust the step size of the calculation logic and judge whether to perform logical increase or logical decrease to generate a calibration result, and feedback this result to the VCO module to achieve the purpose of frequency calibration. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a flowchart of a method for frequency calibration based on jump search according to an embodiment of the present invention.

[0050] Figure 2 It is a block diagram of a method for frequency calibration based on jump search according to an embodiment of the present invention.

[0051] Figure 3 It is a block diagram of a system for frequency calibration based on jump search according to an embodiment of the present invention. Detailed implementation manners

[0052] For the convenience of those skilled in the art to understand the technical solution of the present invention, the technical solution of the present invention will be further described below with reference to the accompanying drawings of the specification.

[0053] The terms "first" and "second" are only used for descriptive purposes, and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present application, "a plurality" means two or more, unless otherwise specifically defined.

[0054] Please refer to Figure 1 and Figure 2 As shown, the present invention provides a method for frequency calibration based on jump search, including:

[0055] S10. Obtain the output clock frequency of the voltage-controlled oscillator.

[0056] S20. Perform frequency detection on the clock frequency, determine whether the current frequency is greater than, less than or within the target frequency range, and output corresponding indication signals.

[0057] In an embodiment of the present invention, the frequency detection module outputs corresponding indication signals, including:

[0058] S21. Use the crystal oscillator clock as the reference clock.

[0059] S22. Configure the detection window length Lref based on the reference clock, the number of counts Nref of the target frequency in the detection window length, and the error threshold Nth through the first register.

[0060] S23. Count the number of rising edges Nmea of the measurement clock within the detection window length Lref.

[0061] S24. If Nref–Nth≤Nmea≤Nref+Nth, it is determined that the frequency is locked, the detected frequency is within the target frequency range, and the signal mid is output for indication.

[0062] S25. If Nmea<Nreff-Nth, the signal less is output for indication, the detected frequency is less than the target frequency, and the error result Ndiff = Nreff-Nth–Nmea is output.

[0063] S26. If Nmea>Nreff+Nth, the signal more is output for indication, the detected frequency is greater than the target frequency, and the error result Ndiff = Nmea–Nreff-Nth is output.

[0064] In this embodiment, through the above steps, the frequency detection method can complete high-precision detection of different frequencies. If there are requirements for PPM of the detected frequency, the conditions for frequency locking can also be relaxed by configuring registers. At the same time, if the target clock frequency fluctuates within a certain frequency range, the range of the frequency range can also be adjusted by setting the error threshold Nth. That is, the error threshold Nth of the present application can control the target frequency to be a fixed frequency value or a frequency range. Or it can be understood that when the set error threshold Nth is equal to 0, it is a fixed frequency value, and when the error threshold Nth is not equal to 0, it is a frequency range.

[0065] S30. According to the indication signal output by the frequency detection module, adjust the step size of the calculation logic, and feedback the calibration result to the voltage controlled oscillator.

[0066] In an embodiment of the present invention, the jump search module outputs a frequency calibration result, including:

[0067] S31. Configure the initial step size Nstep, calibration maximum value Amax, calibration minimum value Amin, and initial calibration value Minit0 in the second register; set last_status = mid

[0068] S32. Output the calibration value Maj = Minit to the voltage controlled oscillator;

[0069] S33. Wait for feedback from the frequency detection module;

[0070] S34. Store the indication signal feedback by the frequency detection module in current_status;

[0071] S35. If the current frequency detection indication current_status = less, use the current calibration value Maj t plus the current step size Nstep t , and output the calibration result Maj t+1 = Maj t + Nstep t ; t and t + 1 are the current moment and the next moment respectively;

[0072] S36. If the current frequency detection indication current_status = more, use the current calibration value Maj t minus the current step size Nstep t , and output the calibration result Maj t+1 = Maj t - Nstep t ;

[0073] S37. Set last_status = current_status;

[0074] In S38, the calibration result is fed back to the voltage controlled oscillator;

[0075] In S39, wait for the feedback from the frequency detection module;

[0076] In S310, store the indication signal fed back by the frequency detection into current_status. If the result of the frequency detected and indicated frequency size received is different from the previous time, divide the step size Nstep by 2; if the step size Nstep is not a multiple of 2, the result of the operation needs to be rounded down;

[0077] In S311, repeat steps S35 to S310 until the step size Nstep finally becomes 0.

[0078] In this embodiment, during the repetition of steps S35 to S310, when the step size Nstep is 1, the error result Ndiff when the step size Nstep is 1 1 is equal to the current error result Ndiff t , and the calibration value Maj when the step size Nstep is 1 1 is equal to the current calibration value Maj t .

[0079] In this embodiment, when the jump search module outputs the frequency calibration result, it further includes: S312, when the step size Nstep is 0, compare the current error result Ndiff t with the error result Ndiff when the step size Nstep is 1 1 :

[0080] If Ndiff t >Ndiff 1 , then output the current calibration result Maj t =Maj 1 , if Ndiff t ≤Ndiff 1 , then keep the current calibration result Maj t output. The purpose of this step is to prevent the calibrated result Maj value adjusted by the jump search from deviating from the optimal range.

[0081] In this embodiment, the specific process can be summarized as follows:

[0082] Initialize step S21 in the frequency detection method;

[0083] Adjust the step S31 in the jump search method according to the clock frequency of the VCO;

[0084] Execute steps S32 to S311 in the jump search method according to the real-time clock frequency of the VCO;

[0085] When Nstep is 0, end the process and jump to step S312 in the jump search method.

[0086] Please refer to Figure 3 As shown, the present invention also provides a system for frequency calibration based on jump search, which applies the method for frequency calibration based on jump search described above, including:

[0087] A VCO module for obtaining the output clock frequency of a voltage-controlled oscillator.

[0088] A frequency detection module for detecting the frequency of the output clock frequency of the VCO module, determining whether the current frequency is greater than the target frequency, less than the target frequency, or within the target frequency range, and outputting a corresponding indication signal.

[0089] A jump search module for adjusting the step size of the calculation logic according to the indication signal output by the frequency detection module and feeding back the calibration result to the voltage-controlled oscillator.

[0090] The present invention also proposes a computer-readable storage medium storing a computer program, which when executed by a processor, implements the method steps for frequency calibration based on jump search as described above. The computer-readable storage medium can be an electronic medium, a magnetic medium, an optical medium, an electromagnetic medium, an infrared medium, or a semiconductor system or a propagation medium. The computer-readable storage medium can also include semiconductor or solid-state memories, magnetic tapes, removable computer disks, random access memories (RAMs), read-only memories (ROMs), hard disks, and optical disks. The optical disks can include compact disc-read only memories (CD-ROMs), compact disc-read / write (CD-RWs), and DVDs.

[0091] The present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the method steps of frequency calibration based on jump search as described above are implemented. The processor may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field-programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components; the memory may include a random access memory (RAM for short), and may also include a non-volatile memory, such as at least one disk memory. The memory may also be an internal memory of the random access memory (RAM) type. The processor and the memory may be integrated into one or more independent circuits or hardware, such as: an application specific integrated circuit (ASIC). It should be noted that when the computer program in the memory is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. At the same time, the content of the first register and the second register can be flexibly changed according to system requirements, so that the present invention has excellent compatibility for various system requirements, and has good controllability and portability during the chip R & D process, saving chip costs.

[0092] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be embraced within the present invention, and any reference signs in the claims should not be regarded as limiting the claims involved.

[0093] The above-described embodiments merely represent the implementation manners of the invention. The protection scope of the present invention is not limited to the above embodiments only. For those skilled in the art, without departing from the concept of the present invention, several modifications and improvements can be made, and these all fall within the protection scope of the present invention.

Claims

1. A method for frequency calibration based on jump search, characterized in that: Including: Obtain the output clock frequency of the voltage controlled oscillator; Perform frequency detection on the clock frequency, determine whether the current frequency is greater than the target frequency, less than the target frequency, or within the target frequency range, and output corresponding indication signals; According to the indication signals output by the frequency detection module, adjust the step size of the calculation logic and feedback the calibration result to the voltage controlled oscillator.

2. The method for frequency calibration based on jump search according to claim 1, characterized in that: The frequency detection module outputs corresponding indication signals, including: Use the crystal oscillator clock as the reference clock; Configure the detection window length Lref based on the reference clock, the number of counts Nref of the target frequency within the detection window length, and the error threshold Nth through the first register; Count the number of rising edges Nmea of the measurement clock within the detection window length Lref; If Nref–Nth ≤ Nmea ≤ Nref+Nth, it is determined that the frequency is locked, the detected frequency is within the target frequency range, and the signal mid is output for indication; If Nmea < Nreff-Nth, the signal less is output for indication, the detected frequency is less than the target frequency, and the error result Ndiff = Nreff-Nth–Nmea is output; If Nmea > Nreff+Nth, the signal more is output for indication, the detected frequency is greater than the target frequency, and the error result Ndiff = Nmea–Nreff-Nth is output.

3. The method for frequency calibration based on jump search according to claim 1, characterized in that: The jump search module outputs the frequency calibration result, including: S31, Configure the initial step size Nstep, the calibration maximum value Amax, the calibration minimum value Amin, and the initial calibration value Minit0 in the second register; Set last_status = mid S32, Output the calibration value Maj = Minit to the voltage controlled oscillator; S33, Wait for feedback from the frequency detection module; S34, Store the indication signal feedback by the frequency detection module into current_status; S35, if the current frequency detection indicates current_status=less, use the current calibration value Maj t Add the current step size Nstep t , output calibration result Maj t+1 =Maj t +Nstep t ; t, t+1 are the current moment and the next moment respectively; S36, if the current frequency detection indicates current_status=more, use the current calibration value Maj t Subtract the current step size Nstep t , output calibration result Maj t+1 =Maj t -Nstep t ; S37, Set last_status = current_status; S38, Feedback the calibration result to the voltage controlled oscillator; S39, Wait for feedback from the frequency detection module; S310, Store the indication signal feedback by the frequency detection into current_status. If the result of the frequency detection indication frequency size received is different from the previous time, divide the step size Nstep by 2. If the step size Nstep is not a multiple of 2, the calculation result needs to be rounded down; S311, Repeat steps S35~S310 until the step size Nstep is finally 0.

4. The method for frequency calibration based on jump search according to claim 3, characterized in that: During the repetition of steps S35 to S310, when the step length Nstep is 1, the error result Ndiff1 when the step length Nstep is 1 is set equal to the current error result Ndiff t , and the calibration value Maj1 when the step size Nstep is 1 is equal to the current calibration value Maj t .

5. The method for frequency calibration based on jump search according to claim 4, characterized in that: S312, when the step length Nstep is 0, compare the current error result Ndiff t The size of the error result Ndiff1 when the step size Nstep is 1: If Ndiff t >Ndiff1, then output the current calibration result Maj t =Maj1; If Ndiff t ≤Ndiff1, then keep the calibration result Maj of the day t Output.

6. The method for frequency calibration based on jump search according to claim 2, characterized in that: The error threshold Nth can control the target frequency to be a fixed frequency value or a frequency range.

7. A system for frequency calibration based on jump search, characterized in that: Applying the method for frequency calibration based on jump search according to any one of claims 1-6, including: A VCO module for obtaining the output clock frequency of the voltage controlled oscillator; A frequency detection module for performing frequency detection on the output clock frequency of the VCO module, determining whether the current frequency is greater than the target frequency, less than the target frequency, or within the target frequency range, and outputting corresponding indication signals; A jump search module for adjusting the step size of the calculation logic according to the indication signals output by the frequency detection module and feedbacking the calibration result to the voltage controlled oscillator.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the method steps for frequency calibration based on jump search as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method steps of performing frequency calibration based on jump search as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method for realizing rapid frequency positioning of phase-locked loops and device

    CN102545894A

Cited By

  • Frequency calibration method, electronic device, storage medium and computer program product

    CN121217106A