Dynamic voltage frequency regulation circuit and method, chip and electronic equipment

By setting the voltage regulation frequency that matches the voltage regulation frequency with the voltage regulation time length in dynamic voltage frequency adjustment, the problems of timing violations and voltage overshoot during dynamic voltage frequency adjustment are solved, and the reliability of voltage regulation and frequency regulation is improved.

CN119002610AActive Publication Date: 2024-11-22HEFEI CHIPSEA ELECTRONICS TECH CO LTD

Patent Information

Application Number
CN202310577771.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-18
Publication Date
2024-11-22
Estimated Expiration
2043-05-18

AI Technical Summary

Technical Problem

During the dynamic voltage frequency adjustment process, the prior art is prone to timing violations and voltage overshoot problems, resulting in the circuit not working normally.

Method used

By setting the voltage regulation frequency that matches the time when performing the first voltage regulation, the clock frequency of the working clock signal is adjusted to the voltage regulation frequency before voltage regulation, and the working voltage signal is adjusted to the target voltage at the voltage regulation frequency. After the adjustment is completed, adjust the clock frequency to the target frequency to avoid the rising edge of the clock, and reduce timing violations and voltage overshoot.

Benefits of technology

It effectively avoids timing violations and voltage overshoot during the voltage regulation process, and improves the reliability of the voltage regulation and frequency regulation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119002610A_ABST
    Figure CN119002610A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a dynamic voltage frequency adjusting circuit and method, a chip and electronic equipment. According to the embodiment of the invention, when the voltage frequency is adjusted, the clock module is controlled based on the work clock signal to adjust the clock frequency of the work clock signal to the voltage adjusting frequency, and the voltage adjusting frequency is matched with the duration of executing one-time voltage adjustment by the voltage module; controlling a voltage module to adjust the voltage of the working voltage signal to a target voltage based on the working clock signal after the voltage is adjusted to the voltage adjusting frequency; and after the voltage is adjusted to the target voltage, the clock module is controlled to adjust the clock frequency of the work clock signal to the target frequency based on the work clock signal. By adopting the embodiment of the invention, the conditions of time sequence violation and voltage overshoot in the voltage regulation process can be at least partially avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of circuit technology, and in particular to a dynamic voltage and frequency regulation circuit, method, chip and electronic device. Background Art

[0002] DVFS (Dynamic Voltage and Frequency Scaling) is a technology that balances performance and power consumption by dynamically adjusting the operating voltage and operating clock frequency. For example, under the condition of meeting performance requirements, power consumption can be reduced by adjusting the operating voltage and operating clock frequency. DVFS can be used as a system-level low-power design technology for chips.

[0003] In the related art, the following adjustment sequence is usually adopted: when the voltage and frequency need to be increased, the voltage should be increased to the target voltage first, and then the frequency should be increased to the target frequency; when the voltage and frequency need to be reduced, the frequency should be reduced to the target frequency first, and then the voltage should be reduced to the target voltage. However, during the research and development process, the inventors found that in some cases, there would be problems such as timing violations during the adjustment process. Summary of the invention

[0004] In view of the above problems, the embodiments of the present application provide a dynamic voltage and frequency adjustment circuit, method, chip and electronic device to solve the above technical problems.

[0005] In the first aspect, the embodiment of the present application provides a dynamic voltage frequency adjustment circuit, including: a voltage module, which is used to output a working voltage signal of a target module; a clock module, which is used to output a working clock signal of the target module; a control module, which is used to: when adjusting the voltage frequency, control the clock module based on the working clock signal to adjust the clock frequency of the working clock signal to the voltage adjustment frequency, wherein the voltage adjustment frequency matches the duration of a voltage adjustment performed by the voltage module; after adjusting to the voltage adjustment frequency, control the voltage module based on the working clock signal to adjust the voltage of the working voltage signal to the target voltage; after adjusting to the target voltage, control the clock module based on the working clock signal to adjust the clock frequency of the working clock signal to the target frequency. The voltage adjustment is performed at the voltage adjustment frequency, and the voltage adjustment frequency matches the duration of performing a voltage adjustment, the voltage adjustment process can avoid the rising edge of the clock, and can at least partially avoid timing violations and voltage overshoots in the voltage adjustment process.

[0006] Optionally, half a clock cycle corresponding to the voltage regulation frequency matches the duration of a voltage regulation performed by the voltage module.

[0007] Optionally, the target frequency is selected from a plurality of preset operating frequencies, the voltage regulation frequency is different from the plurality of preset operating frequencies, and the voltage regulation frequency is less than any preset operating frequency.

[0008] Optionally, the control module is used to determine a voltage sequence according to the voltage change amplitude between the current voltage and the target voltage after adjusting to the voltage regulation frequency; control the voltage module to perform voltage regulation according to the voltage sequence to adjust the working voltage signal to the target voltage; wherein the voltage sequence includes the target voltage; or the voltage sequence includes the target voltage and one or more intermediate voltages with amplitudes between the current voltage and the target voltage.

[0009] Optionally, the target voltage is selected from a plurality of preset operating voltages, and the intermediate voltage is selected from the plurality of preset operating voltages.

[0010] Optionally, the control module includes: a first register; a second register; a voltage regulating unit, used to write voltage data to the first register, and to write first control data to the second register; wherein the first register and the second register are read and written based on a working clock signal; the second register outputs a voltage regulation enable signal based on the first control data; and a voltage module, used to adjust the voltage of the working voltage signal to the voltage corresponding to the voltage data based on the voltage regulation enable signal.

[0011] Optionally, the control module also includes: a first delay unit, used to delay the voltage regulation enable signal for a first time length; a voltage module, used to adjust the voltage of the working voltage signal to a voltage corresponding to the voltage data based on the delayed voltage regulation enable signal.

[0012] Optionally, the voltage regulating unit is used to, when performing at least two voltage adjustments to gradually adjust the working voltage signal to the target voltage: write voltage data corresponding to this voltage adjustment into the first register, and write first control data into the second register; after detecting the voltage corresponding to the voltage data output by the voltage module, or after delaying at least one clock cycle corresponding to the working clock signal, write voltage data corresponding to the next voltage adjustment into the first register, and write the first control data into the second register.

[0013] Optionally, the control module includes: a third register; a fourth register; a frequency modulation unit, used to write frequency data to the third register, and to write second control data to the fourth register; wherein the third register and the fourth register are read and written based on the working clock signal; the fourth register outputs a frequency modulation enable signal based on the second control data; and a clock module, used to adjust the clock frequency of the working clock signal to the frequency corresponding to the frequency data based on the frequency modulation enable signal.

[0014] Optionally, the control module further includes: a second delay unit, used to delay the frequency modulation enable signal for a second time period; wherein the clock module is used to adjust the clock frequency of the working clock signal to a frequency corresponding to the frequency data based on the frequency modulation enable signal.

[0015] In the second aspect, the embodiment of the present application provides a dynamic voltage frequency adjustment method, including: when adjusting the voltage frequency, controlling the clock module to adjust the clock frequency of the working clock signal to the voltage regulation frequency, wherein the voltage regulation frequency matches the duration of a voltage regulation performed by the voltage module; after adjusting to the voltage regulation frequency, controlling the voltage module to adjust the voltage of the working voltage signal to the target voltage based on the working clock signal; after adjusting to the target voltage, controlling the clock module to adjust the clock frequency of the working clock signal to the target frequency based on the working clock signal. The voltage regulation is performed at the voltage regulation frequency, and the voltage regulation frequency matches the duration of a voltage regulation, and the voltage regulation process can avoid the rising edge of the clock, and can at least partially avoid timing violations and voltage overshoots during the voltage regulation process.

[0016] Optionally, after adjusting to the voltage regulation frequency, the voltage module is controlled based on the working clock signal to adjust the voltage of the working voltage signal to the target voltage, including: after adjusting to the voltage regulation frequency, determining a voltage sequence for voltage regulation according to the voltage change amplitude between the current voltage and the target voltage; controlling the voltage module to perform voltage regulation according to the voltage sequence to adjust the working voltage signal to the target voltage; wherein the voltage sequence includes the target voltage; or the voltage sequence includes the target voltage and one or more intermediate voltages with amplitudes between the current voltage and the target voltage.

[0017] Optionally, a voltage regulation is performed based on a working clock signal to control a voltage module, including: writing voltage data corresponding to this voltage regulation into a first register, and writing first control data into a second register; wherein the first register and the second register are read and written based on the working clock signal; the second register outputs a voltage regulation enable signal based on the first control data; and a voltage module is used to adjust the voltage of the working voltage signal to the voltage corresponding to the voltage data based on the voltage regulation enable signal.

[0018] Optionally, in the case of performing at least two voltage adjustments, after writing the voltage data corresponding to this voltage adjustment into the first register and writing the first control data into the second register, it also includes: after detecting the voltage corresponding to the voltage data output by the voltage module, or after delaying at least one clock cycle corresponding to a working clock signal, writing the voltage data corresponding to the next voltage adjustment into the first register and writing the first control data into the second register.

[0019] In a third aspect, an embodiment of the present application further provides a chip, comprising the above-mentioned dynamic voltage and frequency adjustment circuit.

[0020] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising a device body and a chip as described above disposed in the device body.

[0021] In a fifth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the above-mentioned dynamic voltage and frequency adjustment method.

[0022] The dynamic voltage frequency adjustment circuit, method, chip and electronic device provided in the embodiments of the present application consider that the voltage adjustment to stability is a process and there is a certain switching time. The voltage adjustment frequency is set to match the duration of a voltage adjustment. Before the voltage adjustment, the clock frequency of the working clock signal is first adjusted to the voltage adjustment frequency, and the voltage of the working voltage signal is adjusted to the target voltage at the voltage adjustment frequency. After the voltage adjustment is completed, the clock frequency of the working clock signal is adjusted to the target frequency. The voltage adjustment is performed at the voltage adjustment frequency, and the voltage adjustment frequency matches the duration of a voltage adjustment. The voltage adjustment process can avoid the rising edge of the clock, and can at least partially avoid timing violations and voltage overshoots during the voltage adjustment process.

[0023] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 A structural block diagram of an exemplary electronic system provided by an embodiment of the present application is shown.

[0026] Figure 2 An exemplary signal timing is shown where the voltage regulation process is not compatible with the clock frequency.

[0027] Figure 3 The structure block diagram of the dynamic voltage frequency adjustment circuit provided in the embodiment of the present application is shown.

[0028] Figure 4 A structural block diagram of an exemplary dynamic voltage-frequency adjustment circuit provided in an embodiment of the present application is shown.

[0029] Figure 5 A structural block diagram of an electronic system provided in an embodiment of the present application is shown.

[0030] Fig. 6A An exemplary signal timing for adjusting the clock frequency from F0 to the voltage regulation frequency is shown.

[0031] Figure 6BAn exemplary signal timing for adjusting the voltage from V0 to V1 is shown.

[0032] Figure 6C An exemplary signal timing for adjusting the voltage from V1 to V2 is shown.

[0033] Fig.6D An exemplary signal timing for adjusting the clock frequency from the voltage regulation frequency to F2 is shown.

[0034] Figure 7 A flow chart of a dynamic voltage and frequency adjustment method provided in an embodiment of the present application is shown.

[0035] Figure 8 A flow chart of an exemplary dynamic voltage-frequency adjustment method provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0036] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0037] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0038] In the embodiments of the present application, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.

[0039] Moreover, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0040] In the description of the embodiments of the present application, words such as "example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "example" or "for example" in the embodiments of the present application is not to be interpreted as being more preferred or having more advantages than another embodiment or design. The use of words such as "example" or "for example" is intended to present relative concepts in a clear manner.

[0041] In addition, the "plurality" in the embodiments of the present application refers to two or more than two. In view of this, in the embodiments of the present application, "plurality" can also be understood as "at least two". "At least one" can be understood as one or more, for example, one, two or more. For example, including at least one means including one, two or more, and there is no limit on which ones are included. For example, including at least one of A, B and C, then A, B, C, A and B, A and C, B and C, or A, B and C can be included.

[0042] It should be noted that, in the embodiments of the present application, "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / ", unless otherwise specified, generally indicates that the associated objects before and after are in an "or" relationship.

[0043] It should be noted that in the embodiments of the present application, "connection" can be understood as electrical connection, and the connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be either a direct connection between A and B or an indirect connection between A and B through one or more other electrical components.

[0044] DVFS is a technology that balances performance and power consumption by dynamically adjusting the operating voltage and operating clock frequency. Figure 1 An exemplary application scenario of the embodiments of the present application is described.

[0045] like Figure 1 As shown, Figure 1 The electronic system 10 provided by the embodiment of the present application is schematically shown. The electronic system 10 may be a system on chip (SOC), etc., and can realize dynamic voltage and frequency adjustment. Figure 1 As shown, the electronic system 10 may include: a load calculation unit 11, a target voltage calculation unit 12, a target frequency calculation unit 13 and an adjustment unit 14. It should be understood that Figure 1 Only an exemplary block diagram for implementing dynamic voltage and frequency adjustment is shown, and the embodiment of the present application does not limit the part of the electronic system 10.

[0046] The load calculation unit 11 is used to collect signals related to the system load and calculate the system load. The load calculation unit 11 can be implemented by software or hardware. Exemplarily, the software implementation can place hooks in the core call of the operating system, especially the scheduler, to judge the system load based on the frequency of its call. Exemplarily, the hardware implementation can calculate the current system load by collecting some core signal interrupt lines, caches, memory bus usage, etc. It should be understood that the embodiment of the present application does not limit the implementation method of the load calculation unit 11.

[0047] The target voltage calculation unit 12 is used to determine the target voltage according to the system load. The target frequency calculation unit 13 is used to determine the target frequency according to the system load. In some possible embodiments, for the same system, the higher the frequency, the higher the required voltage. As an implementation, the target frequency calculation unit 13 is used to determine the target frequency according to the system load, and the target voltage calculation unit 12 is used to determine the target voltage according to the target frequency.

[0048] As a possible implementation, the target frequency calculation unit 13 predicts the performance required by the system in the next time period based on the current load of the system. There are a variety of prediction algorithms to choose from, and this prediction can be implemented by software or hardware. The target frequency calculation unit 13 converts the predicted performance into the required frequency (i.e., the target frequency), and the target voltage calculation unit 12 is used to determine the target voltage based on the target frequency. It should be understood that the embodiment of the present application does not limit the implementation of the target voltage calculation unit 12 and the target frequency calculation unit 13.

[0049] The adjustment unit 14 is used to adjust the working voltage to the target voltage and the working clock frequency to the target frequency. In the related art, the following adjustment sequence is usually adopted: when the voltage and frequency need to be increased, the voltage should be increased to the target voltage first, and then the frequency should be increased to the target frequency; when the voltage and frequency need to be reduced, the frequency should be reduced to the target frequency first, and then the voltage should be reduced to the target voltage.

[0050] Voltage regulation is a process, and it usually takes a certain amount of time for the output voltage to reach a stable state. In some cases, the rising edge of the clock may appear outside the allowable range of the operating voltage before the output voltage stabilizes, resulting in a clock violation. In addition, if the rising edge of the clock appears near the lowest voltage point during the voltage regulation process, the circuit module will cause excessive load when operating, which may cause the output voltage to overshoot, and then exceed the allowable range of the operating voltage, making the circuit module unable to work normally.

[0051] For example, Figure 2 Figure 1 shows several situations where the operating clock frequency is not appropriate during the output voltage regulation process. Figure 2As shown, the voltage regulation process is to step down the voltage from V1 to V2. In this example, the voltage is allowed to have a certain floating range. The floating threshold voltage corresponding to V1 is V1th (for example, V1th is V1*(1-10%)), which means that the output voltage is between V1 and V1th, which is the allowed range of the working voltage; the floating threshold voltage corresponding to V2 is V2th (for example, V2th is V2*(1-10%)), which means that the output voltage is between V2 and V2th, which is the allowed range of the working voltage.

[0052] A situation like Figure 2 As shown in the working clock signal CLK0, the output voltage corresponding to the rising edge P0 of CLK0 is VP0, which is less than V1th and outside the allowable range of the working voltage. Figure 2 As shown in the working clock signal CLK1, the output voltage corresponding to the rising edge P1 of CLK1 is VP1, which is less than V2th and outside the allowable range of the working voltage. The situation corresponding to CLK0 and CLK1 may cause timing violation problems. Another situation is as follows Figure 2 As shown in the working clock signal CLK2, the output voltage corresponding to the rising edge P2 of CLK2 is VP2, and VP2 is near the minimum voltage V3 during the process of stepping down from V1 to V2. In the case corresponding to CLK2, the circuit module will cause excessive load when working, which may cause the output voltage to overshoot, and then exceed the allowable range of the working voltage, making the circuit module unable to work normally.

[0053] The embodiment of the present application relates to an improvement of the adjustment unit 14 to solve at least part of the above technical problems. The embodiment of the present application is described below in conjunction with the accompanying drawings.

[0054] The embodiment of the present application provides a dynamic voltage frequency adjustment circuit, which sets a voltage adjustment frequency that matches the duration of performing a voltage adjustment. Before voltage adjustment, the clock frequency of the working clock signal is first adjusted to the voltage adjustment frequency, and the voltage of the working voltage signal is adjusted to the target voltage at the voltage adjustment frequency. After the voltage adjustment is completed, the clock frequency of the working clock signal is adjusted to the target frequency. The voltage adjustment is performed at the voltage adjustment frequency, and the voltage adjustment frequency matches the duration of performing a voltage adjustment. The voltage adjustment process can avoid the rising edge of the clock, and can at least partially avoid timing violations and voltage overshoots during the voltage adjustment process.

[0055] Figure 3 The dynamic voltage frequency adjustment circuit 300 provided in the embodiment of the present application is shown. Figure 3As shown, the dynamic voltage frequency adjustment circuit 300 includes: a voltage module 310, a clock module 320 and a control module 330. The voltage module 310 is used to output the working voltage signal of the target module; the clock module 320 is used to output the working clock signal of the target module; the control module 330 is used to control the clock module 310 to adjust the clock frequency of the working clock signal to the voltage adjustment frequency based on the working clock signal when the voltage frequency is adjusted, wherein the voltage adjustment frequency matches the duration of the voltage module 320 performing a voltage adjustment; after adjusting to the voltage adjustment frequency, the voltage module 320 is controlled to adjust the voltage of the working voltage signal to the target voltage based on the working clock signal; after adjusting to the target voltage, the clock module 310 is controlled to adjust the clock frequency of the working clock signal to the target frequency based on the working clock signal.

[0056] In this embodiment, the voltage module 310 performs a voltage regulation, which refers to the process in which the voltage module 310 adjusts the working voltage signal from one voltage to another voltage, for example, adjusting the working voltage from 5V to 3V. The voltage regulation frequency matches the duration of the voltage module 310 performing a voltage regulation, which means that the duration of the clock cycle corresponding to the voltage regulation frequency is greater than or equal to the duration required for the voltage module 310 to perform a voltage regulation, so as to complete a voltage regulation within a clock cycle corresponding to the voltage regulation frequency. In other words, the voltage regulation starts after the rising edge of the clock cycle, and reaches the allowed range of the working voltage before the rising edge of the clock in the next clock cycle. Furthermore, the voltage regulation can be started after the rising edge of the clock cycle, and the target voltage can be reached before the rising edge of the clock in the next clock cycle.

[0057] For example, when adjusting the operating voltage from 5V to 3V, the target voltage of the operating voltage signal is 3V. After the operating voltage signal reaches 3*(1-10%)V (i.e., 2.7V), the system can work normally. The allowable range of the operating voltage is a voltage greater than 2.7V, that is, the voltage adjustment starts after the rising edge of the clock cycle and reaches 2.7V before the rising edge of the clock in the next clock cycle.

[0058] For example, when adjusting the operating voltage from 5V to 3V, the voltage adjustment may be started after the rising edge of a clock cycle, and the target voltage, ie, 3V, may be reached before the rising edge of the clock in the next clock cycle.

[0059] In this embodiment, voltage regulation is performed at the voltage regulation frequency and can be completed within a clock cycle corresponding to the voltage regulation frequency. Therefore, the voltage regulation process can avoid the clock rising edge, avoid timing violations and voltage overshoots during the voltage regulation process, and improve the reliability of the voltage and frequency regulation process.

[0060] When the voltage is not within the allowed range at the falling edge of the clock, the clock tree may flip. In some embodiments, in order to avoid the occurrence of a falling edge of the clock during the voltage regulation process, the half clock cycle corresponding to the voltage regulation frequency matches the duration of a voltage regulation performed by the voltage module. In other words, a voltage regulation process is completed within the half clock cycle corresponding to the voltage regulation frequency, that is, the voltage regulation starts after the rising edge of the clock cycle, and reaches the allowed range of the operating voltage before the falling edge of the same clock cycle. Through this embodiment, the voltage output can be stabilized before the falling edge of the clock, that is, the voltage corresponding to the falling edge of the clock is not within the allowed range of the operating voltage.

[0061] The larger the voltage change amplitude, the longer the time required for voltage regulation. In this embodiment, the voltage regulation frequency can be set according to the voltage change amplitude of the possible voltage regulation process. The voltage regulation frequency can be pre-set according to the voltage change amplitude of the possible voltage regulation process. For example, the time required for voltage regulation of the voltage change amplitude of the possible voltage regulation process can be tested, and the voltage regulation frequency can be determined based on the time obtained by the test.

[0062] In some embodiments, the target frequency is selected from a plurality of preset operating frequencies, and the voltage regulation frequency is different from the plurality of preset operating frequencies, and the voltage regulation frequency is less than any of the preset operating frequencies.

[0063] As an implementation method, the maximum voltage change amplitude involved in a single voltage regulation can be determined, and based on the duration required for the maximum voltage change amplitude, the duration of a clock cycle corresponding to the voltage regulation frequency can be determined. Through this implementation method, any voltage regulation process can use the same voltage regulation frequency, and at this voltage regulation frequency, most of the voltage regulation processes can be completed within one or half a clock cycle. For example, the duration corresponding to the maximum voltage change amplitude of the voltage regulation process is t1, and the clock cycle corresponding to the voltage regulation frequency is T1, then T1 can be set to be greater than or equal to t1. For another example, the duration corresponding to the maximum voltage change amplitude of the voltage regulation process is t2, and the clock cycle corresponding to the voltage regulation frequency is T2, then T2 / 2 can be set to be greater than or equal to t2, so that most of the voltage regulation processes are completed within half a clock cycle corresponding to the voltage regulation frequency.

[0064] Exemplarily, the operating voltages output by the voltage module 320 are V1, V2, V3 and V4 from small to large. The maximum voltage change amplitude of the voltage regulation process is adjusted from V1 to V4, the time length from V1 to V4 is t14, and one clock cycle corresponding to the voltage regulation frequency is T1, then T1 can be set to be greater than or equal to t14, or T1 / 2 can be set to be greater than or equal to t14.

[0065] As another implementation, multiple voltage regulation frequencies may be set, and the control module 330 selects a corresponding voltage regulation frequency according to the voltage variation amplitude of the voltage regulation, so that the voltage regulation frequency matches the duration of the voltage regulation process.

[0066] In some embodiments, the control module 330 determines the voltage sequence of voltage regulation according to the voltage change amplitude between the current voltage and the target voltage, and controls the voltage module 320 to perform voltage regulation according to the voltage sequence to adjust the operating voltage signal to the target voltage. In some cases, the voltage sequence includes the target voltage, that is, the operating voltage signal is adjusted from the current voltage to the target voltage through one adjustment. In some cases, the voltage sequence includes the target voltage and one or more intermediate voltages with amplitudes between the current voltage and the target voltage. At this time, the voltage regulation is gradual, which means that the current voltage is adjusted to the target voltage in multiple times through one or more intermediate voltages between the current voltage and the target voltage, rather than adjusting from the current voltage to the target voltage once, thereby reducing the voltage change amplitude of each voltage regulation. In this case, it is possible to avoid setting the voltage regulation frequency too low.

[0067] As an example, the current operating voltage is V1, and the target operating voltage is V2. Compared with directly adjusting the operating voltage from V1 to V2, in this example, the operating voltage can be adjusted to one or more intermediate voltages between V1 and V2 in sequence. For example, the intermediate voltage is V3, and the voltage adjustment process includes V1 to V3 and V3 to V2; for another example, the intermediate voltages are V3 and V4, and the voltage adjustment process includes V1 to V3, V3 to V4, and V4 to V2.

[0068] As an embodiment, the target voltage is selected from a plurality of preset operating voltages. The intermediate voltage in the voltage sequence is selected from the plurality of preset operating voltages. Exemplarily, the control module 330 may be used to determine the number of voltage adjustments according to the number of preset operating voltages between the current voltage and the target voltage, so as to gradually adjust the operating voltage signal to the target voltage.

[0069] As an example, when there are multiple preset operating voltages between the current voltage and the target voltage, the voltage can be adjusted in sequence. Optionally, when boosting, the current voltage is adjusted to adjacent preset operating voltages in order from small to large until the target voltage is adjusted. Optionally, when reducing the voltage, the current voltage is adjusted to adjacent preset operating voltages in order from large to small until the target voltage is adjusted.

[0070] For example, the voltage levels supported by dynamic voltage regulation include successively increasing voltages V1, V2, V3, and V4. When adjusting the working voltage from V1 to V2, there is no preset working voltage between V1 and V2, and the working voltage is adjusted to V2 through one voltage adjustment. When adjusting the working voltage from V1 to V4, there are two preset working voltages between V1 and V4, namely V2 and V3. V1 can be adjusted to V2 first, then V2 can be adjusted to V3, and finally V3 can be adjusted to V4, so that the working voltage is adjusted from V1 to V4 through three voltage adjustments; or, V1 can be adjusted to V3 first, and then V3 can be adjusted to V4, so that the working voltage is adjusted from V1 to V4 through two voltage adjustments.

[0071] In some embodiments, the target frequency is selected from a plurality of preset operating frequencies, and the clock frequency of the operating clock signal is one of the plurality of preset operating frequencies. The target voltage is selected from a plurality of preset operating voltages, and the voltage of the operating voltage signal is one of the plurality of preset operating voltages. As an embodiment, a plurality of preset operating frequencies have a corresponding relationship with a plurality of preset operating voltages. For example, the preset operating frequencies include F0, F1, and F2, and the preset operating voltages include V0, V1, and V2, wherein F0 corresponds to V0, i.e., operates at the clock frequency F0 and the operating voltage V0; similarly, F1 corresponds to V1, and F2 corresponds to V2.

[0072] An exemplary implementation of the control module 330 controlling the voltage module 310 and the clock module 320 is described below.

[0073] In some embodiments, Figure 4 As shown, the control module 330 includes: a first register 331, a second register 332 and a voltage regulating unit 333. The first register 331 and the second register 332 are read and written based on the working clock signal. The voltage regulating unit 333 is used to write voltage data to the first register 331 and write first control data to the second register 332. The second register 332 outputs a voltage regulating enable signal based on the first control data. Usually, the voltage data is first written to the first register 331, and then the first control data is written to the second register 332, so that the voltage module 310 correctly obtains the voltage adjusted this time. The voltage module 310 is used to adjust the voltage of the working voltage signal to the voltage corresponding to the voltage data based on the voltage regulating enable signal.

[0074] As an implementation mode, the voltage regulating unit 333 is used to, when performing at least two voltage adjustments to gradually adjust the working voltage signal to the target voltage, write the voltage data corresponding to this voltage adjustment to the first register 331, and write the first control data to the second register 332, so that the voltage module 310 performs this voltage adjustment; after detecting that the voltage module 310 outputs the voltage corresponding to the voltage data, write the voltage data corresponding to the next voltage adjustment to the first register 331, and write the first control data to the second register 332, so that the voltage module 310 performs the next voltage adjustment. The embodiment of the present application does not limit the manner in which the voltage module 310 outputs the voltage corresponding to the voltage data.

[0075] As another embodiment, the voltage regulating unit 333 is used to, when performing at least two voltage adjustments to gradually adjust the working voltage signal to the target voltage: write the voltage data corresponding to this voltage adjustment to the first register 331, and write the first control data to the second register 332, so that the voltage module 310 performs this voltage adjustment; after delaying at least one clock cycle corresponding to the working clock signal (whose clock frequency is the voltage regulation frequency), write the voltage data corresponding to the next voltage adjustment to the first register 331, and write the first control data to the second register 332, so that the voltage module 310 performs the next voltage adjustment. Since the voltage module 310 can perform a voltage adjustment within one or half a clock cycle corresponding to the voltage regulation frequency, after delaying at least one clock cycle corresponding to the voltage regulation frequency, it can be considered that this voltage adjustment has been completed. Therefore, this embodiment can control the timing of multiple voltage adjustments in a delayed manner.

[0076] As an implementation method, Figure 4 As shown, the control module 330 includes a third register 334, a fourth register 335 and a frequency modulation unit 336. The third register 334 and the fourth register 335 are read and written based on the working clock signal. The frequency modulation unit 336 is used to write frequency data to the third register 334 and write second control data to the fourth register 335. The fourth register 335 outputs a frequency modulation enable signal based on the second control data. The clock module 320 is used to adjust the clock frequency of the working clock signal to the frequency corresponding to the frequency data based on the frequency modulation enable signal.

[0077] In some embodiments, Figure 4 As shown, the control module 330 also includes: a first delay unit 337, which is used to delay the voltage regulation enable signal for a first time length. The voltage module 310 is used to adjust the voltage of the working voltage signal to the voltage corresponding to the voltage data based on the delayed voltage regulation enable signal. Through this implementation, voltage regulation can be avoided at the rising edge of the clock.

[0078] In some embodiments, Figure 4 As shown, the control module 330 also includes: a second delay unit 338, which is used to delay the frequency modulation enable signal for a second time period. The clock module 320 is used to adjust the clock frequency of the working clock signal to the frequency corresponding to the frequency data based on the delayed frequency modulation enable signal. Through this implementation, frequency modulation can be avoided at the rising edge of the clock.

[0079] In some embodiments, the control module 330 may delay the signal between the third register 334 and the clock module 320. In some embodiments, the control module 330 may delay the signal between the first register 331 and the voltage module 310. This embodiment of the application is not limited to this.

[0080] Figure 5 The electronic system 500 including the dynamic voltage and frequency adjustment circuit provided in the embodiment of the present application is shown. The electronic system 500 may include a system on chip (SOC), etc., which is not limited in the embodiment of the present application. Figure 5 As shown, the electronic system 500 includes: a low dropout regulator (LDO) 510 (equivalent to the voltage module 310), a clock generator (CG) 520 (equivalent to the clock module 320), an LDO configuration register 531 (equivalent to the first register 331), an LDO enable register 532 (equivalent to the second register 332), a CG configuration register 541 (equivalent to the third register 334), a CG enable register 542 (equivalent to the fourth register 335), and a software system 550.

[0081] LDO 510 is used to output the operating voltage signal (i.e. Figure 5 As an implementation, the operating voltage signal is selected from a plurality of preset operating voltages.

[0082] The clock generator 520 is used to output the working clock signal of the core 560 (ie Figure 5 As an implementation, the operating clock signal is selected from a voltage regulation frequency and a plurality of preset operating frequencies, and the voltage regulation frequency is different from the plurality of preset operating frequencies and is less than any of the preset operating frequencies.

[0083] The LDO configuration register 531, the LDO enable register 532, the CG configuration register 541, and the CG enable register 542 are read and written based on the operating clock signal. The LDO 510 operates using the operating clock signal.

[0084] like Figure 5As shown, the software system 550 includes a regulating module 551 (equivalent to the voltage regulating unit 333 and the frequency regulating unit 336). The regulating module 551 is used to control the LDO 510 and the clock generator 520. In this embodiment, the regulating module 551 includes program instructions.

[0085] The regulation module 551 can be used for: when adjusting the voltage frequency, controlling the clock generator 520 to adjust the clock frequency of the working clock signal to the voltage regulation frequency based on the working clock signal, wherein the voltage regulation frequency matches the duration of a voltage regulation performed by the voltage module; after adjusting to the voltage regulation frequency, controlling the LDO 510 to adjust the voltage of the working voltage signal to the target voltage based on the working clock signal (whose clock frequency is the voltage regulation frequency); after adjusting to the target voltage, controlling the clock generator 520 to adjust the clock frequency of the working clock signal to the target frequency based on the working clock signal.

[0086] In some embodiments, the regulation module 551 can be used to: after adjusting to the voltage regulation frequency, determine a voltage sequence for voltage regulation according to the voltage change amplitude between the current voltage and the target voltage, wherein the voltage sequence includes the target voltage, or the target voltage and one or more intermediate voltages with amplitudes between the current voltage and the target voltage; and control the LDO 510 to perform voltage regulation a corresponding number of times according to the voltage sequence to gradually adjust the operating voltage signal to the target voltage.

[0087] As an implementation manner, the target voltage is selected from a plurality of preset operating voltages, and the middle voltage in the voltage sequence is selected from the plurality of preset operating voltages.

[0088] For any voltage regulation, the regulation module 551 is used to write voltage data to the LDO configuration register 531, and write voltage regulation enable data (equivalent to the first control data) to the LDO enable register 532. The LDO enable register 532 outputs an LDO enable signal (equivalent to the voltage regulation enable signal) based on the voltage regulation enable data. LDO 510 is used to adjust the voltage of the working voltage signal to the voltage corresponding to the voltage data based on the LDO enable signal. Generally, the voltage data is first written to the LDO configuration register 531, and then the voltage regulation enable data is written to the LDO enable register 532, that is, the program instruction for writing the voltage data is executed before the program instruction for writing the voltage regulation enable data. LDO 510 first obtains the voltage data, and then adjusts the voltage of the working voltage signal to the voltage corresponding to the voltage data based on the LDO enable signal.

[0089] For any frequency adjustment, the adjustment module 551 is used to write frequency data to the CG configuration register 541, and to write frequency modulation enable data (equivalent to the second control data) to the CG enable register 542. The CG enable register 542 outputs a CG enable signal (equivalent to the frequency modulation enable signal) based on the frequency modulation enable data. The clock generator 520 is used to adjust the clock frequency of the working clock signal to the frequency corresponding to the frequency data based on the CG enable signal. Generally, the frequency data is first written to the CG configuration register 541, and then the frequency modulation enable data is written to the CG enable register 542. The clock generator 520 first obtains the frequency data, and then adjusts the clock frequency of the working clock signal to the frequency corresponding to the frequency data based on the CG enable signal.

[0090] In some implementations, the CG enable signal and the LDO enable signal may be delayed. Figure 5 The corresponding delay module is not shown in Figure 4 Block diagram of the .

[0091] For the implementation method of determining the target voltage and the target frequency, it can be seen that the aforementioned Figure 1 For example, Figure 5 An implementation method implemented by software is shown, such as Figure 5 As shown, the software system 550 includes: a load calculation module 552 and a target frequency and target voltage calculation module 553. Exemplarily, the load calculation module 552 can determine the load of the system according to the frequency of its call by placing a hook in the core call of the operating system, especially the scheduler. Exemplarily, the target frequency and target voltage calculation module 553 predicts the performance required by the system in the next time period based on the current load of the system, converts the predicted performance into the required frequency (i.e., the target frequency), and determines the target voltage based on the target frequency. The embodiments of the present application do not limit the implementation method for determining the target voltage and target frequency.

[0092] Combine the following FIG. 6A to FIG. 6D right Figure 5 The signal and data timing in the voltage and frequency modulation process of the electronic system shown is exemplified.

[0093] The clock frequency of the working clock signal is selected from F0, F1 and F2, the voltage of the working voltage signal is selected from V0, V1 and V2, and the voltage regulation frequency is Fm. FIG. 6A to FIG. 6D The process of reducing the clock frequency of the operating frequency signal from F0 to F2 and reducing the voltage of the operating voltage signal from V0 to V2 is shown.

[0094] The current voltage is V0, and the current clock frequency is F0. The load calculation module 552 determines the system load, and the target frequency and target voltage calculation module 553 determines the target frequency as F2 and the target voltage as V2 based on the system load, that is, the clock frequency of the working clock signal is reduced from F0 to F2, and the voltage of the working voltage signal is reduced from V0 to V2.

[0095] refer to Fig. 6A As shown, when the current voltage is V0, the voltage data of the LDO configuration register 531 corresponds to V0; when the current clock frequency is F0, the frequency data of the CG configuration register 541 corresponds to F0. No voltage or frequency regulation is performed, and both the CG enable signal and the LDO enable signal are at a low level. When voltage or frequency regulation is performed, the clock frequency of the working clock signal is first adjusted to the voltage regulation frequency (Fm), as shown in FIG. Fig. 6A As shown, the adjustment module 551 writes the frequency data corresponding to Fm to the CG configuration register 541, and then the adjustment module 551 writes the frequency modulation enable data to the CG enable register 542, instructing the clock generator 520 to perform frequency modulation. After the frequency modulation enable data is written to the enable register 542, the CG enable signal changes from a low level to a high level, and the clock generator 520 performs frequency modulation when the CG enable signal is at a high level. The clock generator 520 adjusts the clock frequency of the working clock signal to the voltage modulation frequency based on the frequency data in the CG configuration register 541, and thereafter the clock period of the working clock signal corresponds to the voltage modulation frequency. In addition, as Fig. 6A As shown, the voltage data in the LDO configuration register 531 remains corresponding to V0, the LDO enable signal remains at a low level, and the voltage of the operating voltage signal output by the LDO 510 is V0.

[0096] After the frequency is adjusted to the voltage regulation frequency, the frequency data in the CG configuration register 541 remains corresponding to the voltage regulation frequency, the CG enable signal is at a low level, and the clock generator 520 outputs the working clock signal, and the clock frequency is maintained at the voltage regulation frequency. Then the voltage regulation process is entered. The regulation module 551 determines the voltage sequence, the current voltage is V0, the target voltage is V2, and there is a preset working voltage V1 between V0 and V2. Therefore, the voltages in the voltage sequence include V1 and V2, that is, the voltage regulation process is: Figure 6B V0 is adjusted to V1 as shown, and Figure 6C V1 is shown adjusted to V2.

[0097] Figure 6B FIG. 4 shows the process of adjusting the voltage of the working voltage signal from V0 to V1. Figure 6BAs shown, the regulation module 551 writes the voltage data corresponding to V1 to the LDO configuration register 531, and then writes the voltage regulation enable data to the LDO enable register 532, instructing the LDO 510 to perform voltage regulation. The LDO 510 starts to regulate the voltage when the LDO enable signal is at a high level. Figure 6B As shown, LDO 510 adjusts the LDO output from V0 to V1 within a half clock cycle corresponding to the voltage regulation frequency. After the voltage is adjusted from V0 to V1, the voltage regulation enable data is written to the LDO enable register 532, so that the LDO enable signal changes from a high level to a low level, and the LDO output of LDO510 is maintained at V1.

[0098] After determining that the voltage is adjusted from V0 to V1, the process of adjusting the voltage from V1 to V2 is entered, and the two processes may be separated by one or more clock cycles. The implementation method of determining whether the voltage is adjusted from V0 to V1 is described above and will not be repeated here.

[0099] Figure 6C FIG. 4 shows the process of adjusting the voltage of the working voltage signal from V1 to V2. Figure 6C As shown, the regulation module 551 writes the voltage data corresponding to V2 to the LDO configuration register 531, and then writes the voltage regulation enable data to the LDO enable register 532, instructing the LDO 510 to perform voltage regulation, and the LDO enable register 532 outputs the LDO enable signal as a high level. The LDO 510 starts to regulate the voltage when the LDO enable signal is at a high level. Figure 6B As shown, LDO 510 adjusts the LDO output from V1 to V2 within a half clock cycle corresponding to the voltage regulation frequency. After the voltage is adjusted from V1 to V2, the voltage regulation enable data is written to the LDO enable register 532, so that the LDO enable signal changes from a high level to a low level, and the LDO output of LDO 510 is maintained at V2.

[0100] go through Figure 6B and Figure 6C After two voltage adjustments, the working voltage signal is adjusted from V0 to V2, and the LDO output is V2. After the voltage adjustment is completed, the clock frequency of the working clock signal is adjusted from the voltage adjustment frequency to the target frequency, that is, F2. Fig.6D FIG. 4 shows the process of adjusting the frequency from the voltage regulation frequency Fm to F2, as shown in FIG. Fig.6DAs shown, the adjustment module 551 writes the frequency data corresponding to F2 to the CG configuration register 541, and the frequency data in the CG configuration register 541 changes from corresponding to Fm to corresponding to F2. The adjustment module 551 writes the frequency modulation enable data to the CG enable register 542, instructing the clock generator 520 to perform frequency modulation, and the CG enable register 542 outputs the CG enable signal as a high level. The clock generator 520 starts frequency modulation when the CG enable signal is at a high level. The clock generator 520 adjusts the clock frequency of the working clock signal to F2. Thereafter, the CG enable signal changes from a high level to a low level, and the clock frequency of the working clock signal is maintained at F2.

[0101] In addition, see Figures 6A to 6D As shown, the LDO enable signal and the CG enable signal are delayed, that is, Figures 6A to 6D As shown, the rising edges of the LDO enable signal and the CG enable signal have a certain delay relative to the rising edge of SYSCLK, and the falling edges of the LDO enable signal and the CG enable signal have a certain delay relative to the falling edge of SYSCLK.

[0102] The embodiment of the present application also provides a dynamic voltage frequency adjustment method. A voltage adjustment frequency that matches the duration of performing a voltage adjustment is set. Before voltage adjustment, the clock frequency of the working clock signal is first adjusted to the voltage adjustment frequency. At the voltage adjustment frequency, the voltage of the working voltage signal is adjusted to the target voltage. After the voltage adjustment is completed, the clock frequency of the working clock signal is adjusted to the target frequency. Voltage adjustment is performed at the voltage adjustment frequency, and the voltage adjustment frequency matches the duration of performing a voltage adjustment. The voltage adjustment process can avoid the rising edge of the clock, and can at least partially avoid timing violations and voltage overshoots during the voltage adjustment process.

[0103] Figure 7 A flow chart of a dynamic voltage frequency adjustment method provided in an embodiment of the present application is shown. Figure 7 As shown, the method includes steps S701 to S703.

[0104] Step S701, when adjusting the voltage frequency, the clock module is controlled to adjust the clock frequency of the working clock signal to the voltage adjustment frequency, wherein the voltage adjustment frequency matches the duration of a voltage adjustment performed by the voltage module.

[0105] Step S702, after adjusting to the voltage regulation frequency, controlling the voltage module based on the working clock signal to adjust the voltage of the working voltage signal to the target voltage.

[0106] Step S703, after adjusting to the target voltage, controlling the clock module based on the working clock signal to adjust the clock frequency of the working clock signal to the target frequency.

[0107] In this embodiment, the voltage module performs a voltage regulation, which refers to the process in which the voltage module regulates the working voltage signal from one voltage to another voltage, for example, regulating the working voltage from 5V to 3V. The voltage regulation frequency matches the duration of the voltage module performing a voltage regulation, which means that the duration of the clock cycle corresponding to the voltage regulation frequency is greater than or equal to the duration required for the voltage module to perform a voltage regulation, so as to complete a voltage regulation within a clock cycle corresponding to the voltage regulation frequency. In other words, the voltage regulation starts after the rising edge of the clock cycle, and reaches the allowed range of the working voltage before the rising edge of the clock in the next clock cycle.

[0108] In this embodiment, voltage regulation is performed at the voltage regulation frequency and can be completed within a clock cycle corresponding to the voltage regulation frequency. Therefore, the voltage regulation process can avoid the clock rising edge, avoid timing violations and voltage overshoots during the voltage regulation process, and improve the reliability of the voltage and frequency regulation process.

[0109] In some embodiments, in order to avoid the occurrence of a falling edge of the clock during the voltage regulation process, the half clock cycle corresponding to the voltage regulation frequency matches the duration of a voltage regulation performed by the voltage module. In other words, a voltage regulation process is completed within a half clock cycle corresponding to the voltage regulation frequency, that is, the voltage regulation starts after the rising edge of the clock cycle, and reaches the allowable range of the operating voltage before the falling edge of the same clock cycle. Through this embodiment, the voltage output can be stabilized before the falling edge of the clock, that is, the voltage corresponding to the falling edge of the clock is not within the allowable range of the operating voltage.

[0110] The larger the voltage variation amplitude is, the longer the time required for voltage regulation is. In this embodiment, the voltage regulation frequency can be set according to the voltage variation amplitude of the possible voltage regulation process.

[0111] In some embodiments, the target frequency is selected from a plurality of preset operating frequencies, the voltage regulation frequency is different from the plurality of preset operating frequencies, and the voltage regulation frequency is less than any of the preset operating frequencies.

[0112] As an implementation method, step S701 may include: after adjusting to the voltage regulation frequency, determining the voltage sequence of voltage regulation according to the voltage change amplitude between the current voltage and the target voltage; controlling the voltage module to perform a corresponding number of voltage adjustments according to the voltage sequence to adjust the working voltage signal to the target voltage. In some cases, the voltage sequence includes the target voltage, that is, the working voltage signal is adjusted from the current voltage to the target voltage through one adjustment. In some cases, the voltage sequence includes the target voltage and one or more intermediate voltages with amplitudes between the current voltage and the target voltage. At this time, the voltage regulation is gradual, which means that the current voltage is adjusted to the target voltage in multiple times through one or more intermediate voltages between the current voltage and the target voltage, rather than adjusting from the current voltage to the target voltage once, thereby reducing the voltage change amplitude of each voltage regulation. In this case, it is possible to avoid setting the voltage regulation frequency too low.

[0113] As an embodiment, the target voltage is selected from a plurality of preset working voltages, and the intermediate voltage in the voltage sequence is selected from the plurality of preset working voltages. Exemplarily, it can be used to determine the number of voltage adjustments according to the number of preset working voltages whose magnitudes are between the current voltage and the target voltage, so as to gradually adjust the working voltage signal to the target voltage.

[0114] As an example, when there are multiple preset operating voltages between the current voltage and the target voltage, the voltage can be adjusted in sequence. Optionally, when boosting, the current voltage is adjusted to adjacent preset operating voltages in order from small to large until the target voltage is adjusted. Optionally, when reducing the voltage, the current voltage is adjusted to adjacent preset operating voltages in order from large to small until the target voltage is adjusted.

[0115] As an implementation method, step S702 may include: writing voltage data corresponding to this voltage adjustment into a first register, and writing first control data into a second register; wherein the first register and the second register are read and written based on a working clock signal; the second register outputs a voltage adjustment enable signal based on the first control data; and a voltage module is used to adjust the voltage of the working voltage signal to the voltage corresponding to the voltage data based on the voltage adjustment enable signal.

[0116] In the case of performing at least two voltage adjustments, as an implementation method, after writing the voltage data corresponding to this voltage adjustment into the first register and writing the first control data into the second register in step S702, it also includes: after detecting the voltage corresponding to the voltage data output by the voltage module, writing the voltage data corresponding to the next voltage adjustment into the first register and writing the first control data into the second register.

[0117] In the case of performing at least two voltage adjustments, as another implementation, after writing the voltage data corresponding to this voltage adjustment into the first register and writing the first control data into the second register in step S702, it also includes: after delaying at least one clock cycle corresponding to the working clock signal, writing the voltage data corresponding to the next voltage adjustment into the first register and writing the first control data into the second register.

[0118] In some embodiments, performing a frequency adjustment includes: writing frequency data to a third register, and writing second control data to a fourth register; wherein the third register and the fourth register are read and written based on a working clock signal; the fourth register outputs a frequency modulation enable signal based on the second control data; and the clock module adjusts the clock frequency of the working clock signal to the frequency corresponding to the frequency data based on the frequency modulation enable signal.

[0119] Figure 8 A flow chart of a dynamic voltage frequency adjustment method provided in an embodiment of the present application is shown. Figure 8 As shown, it includes steps S801 to S806.

[0120] Step S801, collecting signals related to the system load and calculating the system load.

[0121] Step S802, determining a target frequency and a target voltage according to the system load.

[0122] Exemplarily, based on the current load of the system, the performance required by the system in the next time period is predicted, the predicted performance is converted into a target frequency, and the target voltage is determined based on the target frequency.

[0123] The target frequency is selected from a plurality of preset operating frequencies.

[0124] The target voltage selects a plurality of preset operating voltages.

[0125] After determining the target frequency and target voltage, the frequency and voltage regulation process begins.

[0126] Step S803, adjusting the clock frequency of the working clock signal to the voltage regulation frequency.

[0127] After the clock frequency of the working clock signal is adjusted to the voltage regulation frequency, the clock frequency of the working clock signal changes from the current frequency to the voltage regulation frequency, and the clock period corresponding to the working clock signal is the clock period corresponding to the voltage regulation frequency.

[0128] Exemplarily, when it is detected that the clock frequency of the working clock signal changes to the voltage regulation frequency, it is confirmed that the clock frequency of the working clock signal is adjusted to the voltage regulation frequency. Exemplarily, at least one clock cycle may be delayed.

[0129] Step S804: determining a voltage sequence based on a voltage variation amplitude between the current operating voltage and the target voltage.

[0130] The voltage sequence includes: a target voltage, or a target voltage and one or more intermediate voltages.

[0131] The one or more intermediate voltages are preset working voltages between the target voltage and the current voltage.

[0132] Step S805 , controlling the voltage module to perform voltage regulation for a corresponding number of times according to the voltage sequence, so as to gradually adjust the working voltage signal to the target voltage.

[0133] Controlling the voltage module to perform a voltage adjustment based on the working clock signal includes: writing voltage data corresponding to the current voltage adjustment into the first register, and writing first control data into the second register. The first register and the second register are read and written based on the working clock signal; the second register outputs a voltage adjustment enable signal based on the first control data; the voltage module adjusts the voltage of the working voltage signal to the voltage corresponding to the voltage data based on the voltage adjustment enable signal.

[0134] Exemplarily, when the voltage module is controlled by program instructions, the program instructions for writing the voltage data are executed before the program instructions for writing the first control data.

[0135] In the case of performing at least two voltage adjustments, after writing the voltage data corresponding to this voltage adjustment into the first register and writing the first control data into the second register, it also includes: after detecting the voltage corresponding to the voltage data output by the voltage module, or after delaying at least one clock cycle corresponding to a working clock signal, writing the voltage data corresponding to the next voltage adjustment into the first register and writing the first control data into the second register.

[0136] Exemplarily, when the voltage module is controlled by program instructions, the program instructions can be used to determine whether the voltage output by the voltage module is the voltage corresponding to the voltage data, or a delay can be performed by the program instructions, and the program instructions for the next voltage adjustment can be executed after the delay is reached.

[0137] Step S806: After adjusting to the target voltage, controlling the clock module based on the working clock signal to adjust the clock frequency of the working clock signal to the target frequency.

[0138] An embodiment of the present application also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the above-mentioned dynamic voltage and frequency adjustment method.

[0139] The embodiment of the present application also provides a chip, which includes the above-mentioned dynamic voltage frequency adjustment circuit. The chip is also called an integrated circuit (IC), and the chip can be but is not limited to a SOC (System on Chip) chip or a SIP (system in package) chip. The chip sets a voltage regulation frequency that matches the duration of performing a voltage regulation. Before the voltage regulation, the clock frequency of the working clock signal is first adjusted to the voltage regulation frequency, and the voltage of the working voltage signal is adjusted to the target voltage at the voltage regulation frequency. After the voltage regulation is completed, the clock frequency of the working clock signal is adjusted to the target frequency. It can at least partially avoid timing violations and voltage overshoots during the voltage regulation process.

[0140] The embodiment of the present application also provides an electronic device, which includes a device body and a chip as described above provided in the device body. The electronic device may be, but is not limited to, a weight scale, a body fat scale, a nutrition scale, an infrared electronic thermometer, a pulse oximeter, a human body composition analyzer, a mobile power supply, a wireless charger, a fast charger, a car charger, an adapter, a display, a USB (Universal Serial Bus) docking station, a stylus, a true wireless headset, a car central control screen, a car, a smart wearable device, a mobile terminal, and a smart home device. Smart wearable devices include, but are not limited to, smart watches, smart bracelets, and cervical massagers. Mobile terminals include, but are not limited to, smart phones, laptops, tablet computers, and POS (point of sales terminal). Smart home devices include, but are not limited to, smart sockets, smart rice cookers, smart sweepers, and smart lights. The chip sets a voltage regulation frequency that matches the duration of a voltage regulation. Before voltage regulation, the clock frequency of the working clock signal is adjusted to the voltage regulation frequency, the voltage of the working voltage signal is adjusted to the target voltage at the voltage regulation frequency, and after the voltage regulation is completed, the clock frequency of the working clock signal is adjusted to the target frequency. This can at least partially avoid timing violations and voltage overshoots during the voltage regulation process.

[0141] The above are only preferred embodiments of the present application, and are not intended to limit the present application in any form. Although the present application has been disclosed as above with preferred embodiments, it is not intended to limit the present application. Any technical personnel in the field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present application. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.

Claims

1. A dynamic voltage frequency adjustment circuit, characterized in that: include: A voltage module, used to output the working voltage signal of the target module; A clock module, used for outputting a working clock signal of the target module; Control module for: During voltage frequency regulation, the clock module is controlled based on the working clock signal to regulate the clock frequency of the working clock signal to a voltage regulation frequency, wherein the voltage regulation frequency matches the duration of a voltage regulation performed by the voltage module; After being adjusted to the voltage regulation frequency, controlling the voltage module based on the working clock signal to adjust the voltage of the working voltage signal to a target voltage; After being adjusted to the target voltage, the clock module is controlled based on the working clock signal to adjust the clock frequency of the working clock signal to the target frequency.

2. The dynamic voltage frequency adjustment circuit according to claim 1, characterized in that: The half clock cycle corresponding to the voltage regulation frequency matches the duration of a voltage regulation performed by the voltage module.

3. The dynamic voltage frequency adjustment circuit according to claim 1, characterized in that: The target frequency is selected from a plurality of preset operating frequencies, the voltage regulation frequency is different from the plurality of preset operating frequencies, and the voltage regulation frequency is less than any of the preset operating frequencies.

4. The dynamic voltage frequency adjustment circuit according to claim 1, characterized in that: The control module is used for: After adjusting to the voltage regulation frequency, determining a voltage sequence for voltage regulation according to a voltage variation amplitude between a current voltage and a target voltage; Controlling the voltage module to perform voltage regulation according to the voltage sequence to adjust the operating voltage signal to the target voltage; wherein the voltage sequence includes the target voltage; or The voltage sequence includes: the target voltage, and one or more intermediate voltages having amplitudes between a current voltage and the target voltage.

5. The dynamic voltage frequency adjustment circuit according to claim 4, characterized in that: The target voltage is selected from a plurality of preset operating voltages, and the intermediate voltage is selected from the plurality of preset operating voltages.

6. The dynamic voltage frequency adjustment circuit according to any one of claims 1 to 5, characterized in that: The control module comprises: First register; Second register; A voltage regulating unit, used to write voltage data into the first register, and write first control data into the second register; wherein the first register and the second register are read and written based on the working clock signal; and the second register outputs a voltage regulation enable signal based on the first control data; The voltage module is used to adjust the voltage of the working voltage signal to the voltage corresponding to the voltage data based on the voltage regulation enable signal.

7. The dynamic voltage frequency adjustment circuit according to claim 6, characterized in that: The control module further includes: a first delay unit, configured to delay the voltage regulation enable signal for a first time length; Wherein, the voltage module is used to adjust the voltage of the working voltage signal to the voltage corresponding to the voltage data based on the delayed voltage regulation enable signal.

8. The dynamic voltage frequency adjustment circuit according to claim 6, characterized in that: The voltage regulating unit is used to gradually adjust the operating voltage signal to the target voltage by performing at least two voltage adjustments: Writing voltage data corresponding to the current voltage adjustment into the first register, and writing first control data into the second register; After detecting that the voltage module outputs the voltage corresponding to the voltage data, or after delaying at least one clock cycle corresponding to the working clock signal, the voltage data corresponding to the next voltage adjustment is written to the first register, and the first control data is written to the second register.

9. The dynamic voltage frequency adjustment circuit according to any one of claims 1 to 5, characterized in that: The control module comprises: The third register; Fourth register; A frequency modulation unit, used to write frequency data into the third register, and write second control data into the fourth register; wherein the third register and the fourth register are read and written based on the working clock signal; and the fourth register outputs a frequency modulation enable signal based on the second control data; The clock module is used to adjust the clock frequency of the working clock signal to the frequency corresponding to the frequency data based on the frequency modulation enable signal.

10. The dynamic voltage frequency adjustment circuit according to claim 9, characterized in that: The control module further includes: A second delay unit, used for delaying the frequency modulation enable signal for a second time length; Wherein, the clock module is used to adjust the clock frequency of the working clock signal to the frequency corresponding to the frequency data based on the delayed frequency modulation enable signal.

11. A dynamic voltage frequency adjustment method, characterized in that: include: During voltage frequency regulation, the control clock module regulates the clock frequency of the working clock signal to the voltage regulation frequency, wherein the voltage regulation frequency matches the duration of a voltage regulation performed by the voltage module; After being adjusted to the voltage regulation frequency, controlling the voltage module to adjust the voltage of the working voltage signal to a target voltage based on the working clock signal; After being adjusted to the target voltage, the clock module is controlled based on the working clock signal to adjust the clock frequency of the working clock signal to the target frequency.

12. The dynamic voltage frequency adjustment method according to claim 11, characterized in that: After adjusting to the voltage regulation frequency, controlling the voltage module to adjust the voltage of the working voltage signal to the target voltage based on the working clock signal includes: After adjusting to the voltage regulation frequency, determining a voltage sequence for voltage regulation according to a voltage variation amplitude between a current voltage and a target voltage; Controlling the voltage module to perform voltage regulation according to the voltage sequence to adjust the operating voltage signal to the target voltage; wherein the voltage sequence includes the target voltage; or The voltage sequence includes the target voltage and one or more intermediate voltages having amplitudes between a current voltage and the target voltage.

13. The dynamic voltage frequency adjustment method according to claim 12, characterized in that: Controlling the voltage module to perform a voltage adjustment based on the working clock signal includes: Writing voltage data corresponding to the current voltage regulation into the first register, and writing first control data into the second register; wherein the first register and the second register are read and written based on the working clock signal; and the second register outputs a voltage regulation enable signal based on the first control data; The voltage module is used to adjust the voltage of the working voltage signal to the voltage corresponding to the voltage data based on the voltage regulation enable signal.

14. The dynamic voltage frequency adjustment method according to claim 13, characterized in that: In the case of performing at least two voltage adjustments, after writing the voltage data corresponding to the current voltage adjustment into the first register and writing the first control data into the second register, the process further includes: After detecting that the voltage module outputs the voltage corresponding to the voltage data, or after delaying at least one clock cycle corresponding to the working clock signal, the voltage data corresponding to the next voltage adjustment is written to the first register, and the first control data is written to the second register.

15. A chip, characterized in that: The invention comprises a dynamic voltage frequency regulating circuit according to any one of claims 1 to 10.

16. An electronic device, characterized in that: The invention comprises a device body and the chip as claimed in claim 15 arranged in the device body.

17. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 11 to 14.

Citation Information

Patent Citations

  • Method and device for dynamically adjusting voltage and / or frequency of encoding and decoding processor

    CN111342937A

  • System on chip and method for regulating voltage and frequency

    CN114185837A

  • Baseband chip, voltage adjusting method and terminal equipment

    CN114527819A

  • Clock frequency adjusting device and method and electronic equipment

    CN114527830A

  • Apparatuses and methods for providing power for memory refresh operations

    US10438646B1

Cited By

  • Electronic equipment control method and device, server, medium and program product

    CN120723129A