CN-122018632-A - Working frequency adjusting method, processor and electronic equipment
Abstract
The application provides a working frequency adjusting method, a processor and electronic equipment, which relate to the field of integrated circuits, wherein the working frequency adjusting method is applied to a frequency and voltage modulation module, the frequency and voltage modulation module is connected with the processor, the processor comprises a phase-locked loop, and the working frequency adjusting method comprises the steps of receiving an adjusting instruction of the working frequency; the adjusting instruction is used for indicating a target working frequency required by the processor, and adjusting the frequency of the clock signal output by the phase-locked loop to the target frequency under the condition that the phase-locked loop operates, wherein the target frequency is the clock frequency for enabling the processor to work on the target working frequency. The method can effectively reduce the possible abnormal problems in the frequency and voltage regulation process of the processor.
Inventors
- Ai Xueting
- MA XIAO
Assignees
- 上海天数智芯半导体股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20250820
Claims (13)
- 1. The working frequency adjusting method is characterized by being applied to a frequency and voltage adjusting module, wherein the frequency and voltage adjusting module is connected with a processor, the processor comprises a phase-locked loop, and the working frequency adjusting method comprises the following steps: Receiving an adjustment instruction for the working frequency, wherein the adjustment instruction is used for indicating the target working frequency required by the processor; and under the condition that the phase-locked loop operates, adjusting the frequency of the output clock signal of the phase-locked loop to a target frequency, wherein the target frequency is the clock frequency for enabling the processor to work at the target working frequency.
- 2. The method for adjusting an operating frequency as claimed in claim 1, wherein, The adjusting instruction comprises a frequency modulation type and a target frequency modulation amplitude, wherein the frequency modulation type is frequency up-conversion or frequency down-conversion, and the target frequency modulation amplitude is the variation amplitude of the processor from the initial working frequency to the target working frequency; the adjusting the frequency of the phase-locked loop output clock signal to a target frequency includes: determining frequency modulation times and last frequency modulation amplitude based on a preset step length and the target frequency modulation amplitude, wherein the preset step length is a preset frequency amplitude for carrying out single adjustment on working frequency; The relation among the preset step length, the target frequency modulation amplitude, the frequency modulation frequency and the last frequency modulation amplitude satisfies that X=Mxa+Y, wherein X is the target frequency modulation amplitude, Y is the last frequency modulation amplitude, a is the preset step length, Y is smaller than a, the frequency modulation frequency is M+N times, N is 0 when Y is 0, N is 1 when Y is not 0, and M is equal to 0 or an integer larger than 0; The following first procedure is performed M times: adjusting working voltage and the phase-locked loop based on the frequency modulation type and the preset step length; after performing the first process M times, performing the following second process N times: And adjusting the working voltage and the phase-locked loop based on the frequency modulation type and the last frequency modulation amplitude so that the frequency of the clock signal output by the phase-locked loop is the target frequency.
- 3. The method of operating frequency adjustment according to claim 2, wherein adjusting the phase-locked loop based on the frequency modulation type and the preset step size comprises: adjusting the feedback frequency division ratio of the phase-locked loop based on the frequency modulation type so that the frequency variation amplitude of the clock signal output by the phase-locked loop corresponds to the preset step length; Adjusting the phase-locked loop based on the frequency modulation type and the last frequency modulation amplitude, including: adjusting the feedback frequency division ratio of the phase-locked loop based on the frequency modulation type so that the frequency variation amplitude of the clock signal output by the phase-locked loop corresponds to the last frequency modulation amplitude; And if the frequency modulation type is frequency reduction, reducing the feedback frequency division ratio of the phase-locked loop so as to reduce the frequency of the phase-locked loop output clock signal.
- 4. The method according to claim 2, wherein the frequency modulation type in the adjustment instruction is frequency up-conversion; the first process further comprises: after adjusting the working voltage based on the frequency modulation type and the preset step length, waiting for a first preset delay time before adjusting the phase-locked loop based on the frequency modulation type and the preset step length, wherein the first preset delay time is a preset required time length for stabilizing the working voltage after adjusting the working voltage; And, the second process further comprises: After adjusting the operating voltage based on the type of frequency modulation and the last frequency modulation amplitude, waiting for the first preset delay before adjusting the phase locked loop based on the type of frequency modulation and the last frequency modulation amplitude.
- 5. The method according to claim 4, wherein the frequency modulation type in the adjustment command is down-conversion; the first process includes: And adjusting the working voltage based on the frequency modulation type and the preset step length after adjusting the phase-locked loop based on the frequency modulation type and the preset step length, wherein the first process or the second process is allowed to be performed next time under the state that the working voltage is not stable.
- 6. The operating frequency adjustment method of claim 2, wherein prior to said adjusting an operating voltage and said phase-locked loop based on said frequency modulation type, said preset step size, said method further comprises: acquiring a protection voltage band, wherein the protection voltage band is a voltage value corresponding to frequency fluctuation of an output clock signal after a preset phase-locked loop is adjusted; Adjusting the working voltage based on the frequency modulation type and the preset step length comprises the following steps: adjusting the working voltage based on the frequency modulation type, the protection voltage band and the preset step length; and adjusting the operating voltage based on the frequency modulation type and the last frequency modulation amplitude, including: adjusting working voltage based on the frequency modulation type, the protection voltage band and the last frequency modulation amplitude; The second process and the mth first process when N is 0, further include: And canceling the protection voltage band on the working voltage.
- 7. The operating frequency adjustment method of claim 6, wherein prior to cancelling the guard voltage band on the operating voltage, the method further comprises: and waiting for a second preset time length, wherein the second preset time length is the waiting time required by outputting a stable frequency clock signal after the preset phase-locked loop adjusts the frequency.
- 8. The method according to claim 6, wherein the frequency modulation type in the adjustment command is an up-conversion; the adjusting the working voltage based on the frequency modulation type, the protection voltage band and the preset step length comprises the following steps: The working voltage is adjusted to be the sum of the current working voltage, the voltage corresponding to the preset step length and the protection voltage band; Correspondingly, the adjusting the working voltage based on the frequency modulation type, the protection voltage band and the last frequency modulation amplitude comprises: the working voltage is adjusted to be the sum of the current working voltage, the voltage corresponding to the last frequency modulation amplitude and the protection voltage band; Said cancelling said guard voltage band at said operating voltage comprises: And subtracting a voltage value corresponding to the protection voltage band on the basis of the adjusted working voltage.
- 9. The method for adjusting an operating frequency as claimed in claim 6, wherein, The step of adjusting the working voltage based on the frequency modulation type, the protection voltage band and the preset step length comprises the following steps: The working voltage is adjusted to be the sum of the working voltage corresponding to the intermediate working frequency and the protection voltage band, wherein the intermediate working frequency is the frequency after the preset step length is adjusted; if the N is 1, canceling the protection voltage band on the working voltage comprises adjusting the working voltage to be the voltage corresponding to the target working frequency when the working voltage is adjusted based on the frequency modulation type, the protection voltage band and the last frequency modulation amplitude; And if the N is 0, canceling the protection voltage band on the working voltage, wherein the step of adjusting the working voltage to be the voltage corresponding to the target working frequency comprises the step of adjusting the working voltage based on the frequency modulation type, the protection voltage band and the preset step size for the Mth time.
- 10. The method according to claim 6, wherein the guard voltage band is greater than a voltage value corresponding to a difference between a frequency fluctuation peak of the clock signal output by the phase-locked loop and the adjusted operating frequency after the phase-locked loop adjusts the voltage corresponding to the preset step.
- 11. The method for adjusting an operating frequency according to claim 2, wherein the preset step size is smaller than a minimum frequency variation amplitude of the phase-locked loop in which the phase-locked loop is out of lock.
- 12. A processor comprising a processor, a memory, and a control unit, characterized by comprising the following steps: A working module; the phase-locked loop is connected with the working module and is used for providing a clock signal corresponding to the working frequency for the working module; The frequency and voltage modulation module is connected with the phase-locked loop and is used for executing the working frequency adjustment method according to any one of claims 1-11.
- 13. An electronic device comprising the processor of claim 12.
Description
Working frequency adjusting method, processor and electronic equipment Technical Field The application relates to the field of integrated circuits, and particularly provides a working frequency adjusting method, a processor and electronic equipment. Background The DVFS (Dynamic Voltage and Frequency Scaling, dynamically adjusting voltage and frequency) technique can dynamically adjust the operating frequency and power supply voltage of the processor according to the real-time load condition of the processor, so as to achieve the effects of reducing power consumption, improving performance of the processor, and the like. Some processor-controlled clock signals are provided by a phase-locked loop, and thus adjusting the processor's operating frequency requires adjusting the phase-locked loop to change the clock signal output by the phase-locked loop. When the phase-locked loop is adjusted, the currently used clock source is required to be switched from the phase-locked loop to the reference clock, then the phase-locked loop is disabled to adjust the phase-locked loop in the disabled state, and the clock source is switched from the reference clock back to the phase-locked loop after the phase-locked loop is adjusted. Where the reference clock is typically a low frequency clock, for example, some reference clocks are 25MHz in frequency. And, the clock source may have a problem of 0 clock when switching between the phase locked loop and the reference clock, that is, a problem that the clock signal is 0 occurs in a short time. If a large number of tasks are issued to the processor by the upper layer application in the process of adjusting the working frequency, and operations such as calculation, data transmission, writing may be performed in each module of the processor, at this time, the frequency of the processor suddenly drops to be very low or even 0, which may cause abnormal problems such as system locking, data back pressure, data loss and the like of the processor. Disclosure of Invention In view of the above, the present application is directed to a method for adjusting an operating frequency, a processor and an electronic device, so as to reduce abnormal problems possibly caused in the frequency and voltage adjustment process of the processor. The first application provides a working frequency adjusting method which is applied to a frequency modulation and voltage adjustment module, wherein the frequency modulation and voltage adjustment module is connected with a processor, the processor comprises a phase-locked loop, the working frequency adjusting method comprises the steps of receiving an adjusting instruction for the working frequency, the adjusting instruction is used for indicating a target working frequency required by the processor, and under the condition that the phase-locked loop operates, the frequency of a clock signal output by the phase-locked loop is adjusted to be a target frequency, and the target frequency is the clock frequency enabling the processor to work on the target working frequency. In the embodiment of the application, the phase-locked loop is not forbidden in the frequency modulation process, and the clock source is not switched to the reference clock, but the phase-locked loop is used as the clock source of the processor, so that the processor can work with the high-frequency clock provided by the phase-locked loop in the frequency modulation process, the situation that the clock frequency used by the processor is too low or even 0 due to the switching of the clock source in the process of adjusting the working frequency is effectively reduced, and the abnormal situation caused by the fact that the working frequency of the processor is too low or 0 can be effectively reduced, and task execution cannot be met. In an embodiment, the adjustment instruction includes a frequency adjustment type and a target frequency adjustment amplitude, the frequency adjustment type is frequency up or frequency down, the target frequency adjustment amplitude is a change amplitude of the processor from an initial working frequency to the target working frequency, the adjusting the frequency of the phase-locked loop output clock signal to the target frequency includes determining a frequency adjustment number of times and a last frequency adjustment amplitude based on a preset step size, the preset step size is a preset frequency amplitude for performing a single adjustment on the working frequency, wherein a relation among the preset step size, the target frequency adjustment amplitude, the frequency adjustment number of times and the last frequency adjustment amplitude satisfies x=mxa+y, the X is the target frequency adjustment amplitude, the Y is the last frequency adjustment amplitude, the a is a preset step size, the Y is smaller than the a, the frequency adjustment number of times is m+n times, N is 0 when Y is not 0, N is 1, the M is equal to or an integer larger than 0, performing M ti