A power consumption adjusting method and device

CN117296022BActive Publication Date: 2026-10-20HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202180097649.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-13
Publication Date
2026-10-20
Estimated Expiration
2041-05-13

AI Technical Summary

Technical Problem

虽然这种方式能够在处理器核心的使用过程中进行调频调压,但是其使用基于实验或经验设置的固定的功耗来调节频率和电压,显然调节的灵活性并不好,且还会使调频调压的准确性依赖于实验或人为经验,有可能导致调节结果出现偏差

Benefits of technology

[0040]上述第二方面至第五方面中任一项设计的有益效果,可以参照上述第一方面中相应设计所能达到的有益效果,本申请对此不再一一重复赘述。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117296022B_ABST
    Figure CN117296022B_ABST
Patent Text Reader

Abstract

A power consumption adjusting method and device are used to improve the flexibility and accuracy of frequency and voltage adjustment. The method comprises: a power consumption regulator obtaining current power consumption of a first voltage domain in a processor, determining reference power consumption of the first voltage domain at each corresponding frequency and voltage according to the current power consumption, and then adjusting the frequency and voltage of each processor core in the first voltage domain with reference to the reference power consumption of the first voltage domain at each corresponding frequency and voltage. By determining the reference power consumption for frequency and voltage adjustment of the processor core in the first voltage domain according to the current power consumption of the first voltage domain, the frequency and voltage adjusted based on the reference power consumption can meet the real demand of the processor core, effectively improving the accuracy of frequency and voltage adjustment, and the frequency of the processor core can change flexibly with the change of the power consumption state of the voltage domain, effectively improving the flexibility of frequency and voltage adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of processor technology, and in particular to a power consumption regulation method and apparatus. Background Technology

[0002] When a processor leaves the factory, its components (such as the processor core) are typically defined with standard operating ranges, such as rated operating frequency and rated operating voltage. Under normal circumstances, the processor core performs processing operations according to its rated operating frequency and voltage. However, the rated operating frequency and voltage may not allow the processor core to achieve optimal performance. For example, prolonged operation at low frequency and low voltage may waste the processor core's processing power, while prolonged operation at high frequency and high voltage may lead to overheating or overcurrent risks, compromising the processor core's safety. Therefore, how to flexibly adjust the processor core's frequency and voltage requires further research.

[0003] In existing technologies, to achieve flexible frequency and voltage adjustment of the processor core, an adjustment strategy is proposed: various power consumption parameters for frequency and voltage adjustment are pre-set through experiments or based on human experience. During processor core operation, a suitable target power consumption is found from these parameters based on the current state of the processor core, and the processor core's frequency and voltage are adjusted to correspond to the target power consumption. While this method allows for frequency and voltage adjustment during processor core operation, it uses fixed power consumption parameters set experimentally or empirically to adjust the frequency and voltage. This obviously lacks flexibility and makes the accuracy of frequency and voltage adjustment dependent on experiments or human experience, potentially leading to deviations in the adjustment results. Summary of the Invention

[0004] This application provides a power consumption regulation method and apparatus to improve the flexibility and accuracy of frequency and voltage regulation.

[0005] Firstly, this application provides a power consumption regulation method applicable to a power consumption regulator. The method includes: the power consumption regulator acquiring the current power consumption of a first voltage domain in a processor; determining a reference power consumption of the first voltage domain at each corresponding frequency and voltage based on the current power consumption; and then adjusting the frequency and voltage of each processor core located in the first voltage domain by referring to the reference power consumption of the first voltage domain at each corresponding frequency and voltage. In the above design, by determining the reference power consumption for frequency and voltage regulation of the processor cores in the first voltage domain by referring to the current power consumption of the first voltage domain, the reference power consumption can accurately represent the actual needs of the processor cores in the first voltage domain at the current moment. This helps to ensure that the frequency and voltage adjusted based on the reference power consumption meet the actual needs of the processor cores, effectively improving the accuracy of frequency and voltage regulation. Furthermore, by adjusting the frequency and voltage of each processor core in the first voltage domain according to the current power consumption of the first voltage domain, the frequency of the processor cores can also flexibly change with the power consumption state of the voltage domain, thereby further improving the flexibility of frequency and voltage regulation.

[0006] In one possible design, before obtaining the current power consumption of the first voltage domain in the processor, the power regulator can first determine whether the highest temperature of the processor core in the first voltage domain is greater than a preset temperature threshold. If it is greater, the operation of obtaining the current power consumption of the first voltage domain is performed; if it is not greater, no power regulation is required. This design can not only adjust the power consumption of all processor cores in the first voltage domain in a timely manner when the processor cores in the first voltage domain reach an unsafe temperature state, but also minimize unnecessary resource waste by the power regulator.

[0007] In one possible design, the power regulator determines the reference power consumption of the first voltage domain at various corresponding frequencies and voltages based on the current power consumption. This includes: the power regulator acquiring the current frequency and current voltage of the first voltage domain; and, based on the current power consumption, current frequency, and current voltage, predicting the reference power consumption of the first voltage domain at each corresponding frequency and voltage according to a preset correspondence between power consumption, frequency, and voltage. In this design, using the current power consumption, current frequency, and current voltage to calculate the reference power consumption at other frequencies and voltages helps to accurately match the actual state of the first voltage domain, facilitating flexible updates to the reference power consumption.

[0008] In one possible design, the preset correspondence between power consumption, frequency, and voltage may include a preset dynamic correspondence between power consumption, frequency, and voltage. In this case, the power regulator can predict the reference power consumption of the first voltage domain at each corresponding frequency and voltage as follows: Based on the dynamic power consumption, current frequency, and current voltage in the current power consumption, the power regulator calculates the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage according to the preset dynamic power consumption, frequency, and voltage correspondence. Then, it directly sums the static power consumption in the current power consumption with the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage to obtain the reference power consumption of the first voltage domain at each corresponding frequency and voltage. This design uses the current static power consumption as the static power consumption of the first voltage domain at each corresponding frequency and voltage, eliminating the need to expend resources on static power consumption conversion, allowing for faster determination of the reference power consumption, and improving the efficiency of power regulation.

[0009] In one possible design, the preset correspondence between power consumption, frequency, and voltage may include a preset dynamic power consumption, frequency, and voltage correspondence, as well as a preset static power consumption, frequency, voltage, and temperature correspondence. In this case, the power regulator can predict the reference power consumption of the first voltage domain at each corresponding frequency and voltage in the following way: The power regulator first calculates the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage according to the preset dynamic power consumption, frequency, and voltage correspondence, based on the dynamic power consumption, current frequency, and current voltage in the current power consumption. Then, it obtains the current temperature of the first voltage domain and calculates the static power consumption of the first voltage domain at each corresponding frequency and voltage at the current temperature according to the preset static power consumption, frequency, voltage, and temperature correspondence, based on the static power consumption, current frequency, current voltage, and current temperature in the current power consumption. Finally, it sums the dynamic power consumption and static power consumption of the first voltage domain at each corresponding frequency and voltage to obtain the reference power consumption of the first voltage domain at each corresponding frequency and voltage. In addition to using a preset correspondence to calculate dynamic power consumption, this design also uses a preset correspondence to calculate static power consumption, which helps to calculate a more accurate static power consumption at each corresponding frequency and voltage, effectively improving the accuracy of power consumption regulation.

[0010] In one possible design, the power regulator adjusts the frequency and voltage of each processor core in the first voltage domain by referring to the reference power consumption at each corresponding frequency and voltage of the first voltage domain. This includes: the power regulator first determines the budget power consumption of the first voltage domain, then obtains a maximum reference power consumption that is not greater than the budget power consumption from each reference power consumption, and adjusts the frequency and voltage of each processor core in the first voltage domain according to the frequency and voltage corresponding to the maximum reference power consumption. The budget power consumption of the first voltage domain can characterize the maximum power consumption configuration supported by the first voltage domain. For example, it can be calculated using a preset temperature control algorithm based on the current and expected temperatures of the first voltage domain, so that the budget power consumption can meet the temperature control requirements of the first voltage domain. Thus, by adjusting the power consumption of the first voltage domain by referring to the maximum reference power consumption that is not greater than the budget power consumption, the total power consumption of the first voltage domain can be maximized while ensuring that it does not exceed the maximum capacity of the first voltage domain. This helps to fully utilize the power margin of the first voltage domain to improve its processing performance.

[0011] In one possible design, if all reference power consumptions are greater than the budgeted power consumption of the first voltage domain, it means that the current power consumption of the first voltage domain is very high, and the first voltage domain may be in a high-frequency, high-voltage state for a long time. In this case, the power regulator can obtain the minimum reference power consumption from each reference power consumption, and adjust the frequency and voltage of each processor core in the first voltage domain according to the frequency and voltage corresponding to the minimum reference power consumption, so as to reduce the frequency and voltage of the first voltage domain, alleviate the long-term high-voltage, high-frequency state of the first voltage domain, and try to avoid the phenomenon of overcurrent or overheating in the first voltage domain.

[0012] Secondly, this application provides a power consumption regulator, comprising: a monitoring circuit for acquiring the current power consumption of a first voltage domain in a processor; and a processing circuit for determining a reference power consumption of the first voltage domain at each corresponding frequency and voltage based on the current power consumption, and adjusting the frequency and voltage of each processor core located in the first voltage domain by referring to the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

[0013] In one possible design, before the monitoring circuit obtains the current power consumption of the first voltage domain in the processor, it can also obtain the temperature of each processor core located in the first voltage domain. If the highest temperature of each processor core is greater than a preset temperature threshold, the operation of obtaining the current power consumption of the first voltage domain is performed.

[0014] In one possible design, the monitoring circuit can also acquire the current frequency and current voltage of the first voltage domain. The processing circuit can predict the reference power consumption of the first voltage domain at each corresponding frequency and voltage based on the current power consumption, current frequency, and current voltage, according to a preset correspondence between power consumption, frequency, and voltage.

[0015] In one possible design, the preset correspondence between power consumption, frequency, and voltage may include a preset correspondence between dynamic power consumption, frequency, and voltage. In this case, the processing circuit can predict the reference power consumption of the first voltage domain at each corresponding frequency and voltage in the following way: the processing circuit calculates the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage according to the preset correspondence between dynamic power consumption, frequency, and voltage based on the dynamic power consumption, current frequency, and current voltage in the current power consumption, and then directly sums the static power consumption in the current power consumption and the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage to obtain the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

[0016] In one possible design, the preset correspondence between power consumption, frequency, and voltage may include a preset dynamic power consumption, frequency, and voltage correspondence, as well as a preset static power consumption, frequency, voltage, and temperature correspondence. In this case, the processing circuit can predict the reference power consumption of the first voltage domain at each corresponding frequency and voltage in the following way: The processing circuit first calculates the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage according to the preset dynamic power consumption, frequency, and voltage correspondence, based on the dynamic power consumption, current frequency, and current voltage in the current power consumption. Then, it obtains the current temperature of the first voltage domain and calculates the static power consumption of the first voltage domain at each corresponding frequency and voltage at the current temperature according to the preset static power consumption, frequency, voltage, and temperature correspondence, based on the static power consumption, current frequency, current voltage, and current temperature in the current power consumption. Finally, it sums the dynamic power consumption and static power consumption of the first voltage domain at each corresponding frequency and voltage to obtain the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

[0017] In one possible design, the processing circuitry is specifically used to: determine the budgeted power consumption of a first voltage domain, obtain a maximum reference power consumption not exceeding the budgeted power consumption from various reference power consumptions, and adjust the frequency and voltage of each processor core located in the first voltage domain according to the frequency and voltage corresponding to the maximum reference power consumption. The budgeted power consumption of the first voltage domain can characterize the maximum power consumption configuration supported by the first voltage domain, and can be calculated, for example, using a preset temperature control algorithm based on the current and expected temperatures of the first voltage domain.

[0018] In one possible design, the processing circuit is further configured to: if each reference power consumption is greater than the budget power consumption of the first voltage domain, obtain the minimum reference power consumption from each reference power consumption, and adjust the frequency and voltage of each processor core located in the first voltage domain according to the frequency and voltage corresponding to the minimum reference power consumption.

[0019] Thirdly, embodiments of this application provide a power consumption regulator, comprising: an acquisition unit for acquiring the current power consumption of a first voltage domain in a processor; a determination unit for determining a reference power consumption of the first voltage domain at each corresponding frequency and voltage based on the current power consumption; and an adjustment unit for adjusting the frequency and voltage of each processor core located in the first voltage domain with reference to the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

[0020] In one possible design, before the acquisition unit acquires the current power consumption of the first voltage domain in the processor, the determination unit may also determine that the highest temperature of each processor core located in the first voltage domain is greater than a preset temperature threshold.

[0021] In one possible design, the acquisition unit can also acquire the current frequency and current voltage of the first voltage domain, and the determination unit can predict the reference power consumption of the first voltage domain at each corresponding frequency and voltage according to the current power consumption, current frequency and current voltage, and according to the preset correspondence between power consumption, frequency and voltage.

[0022] In one possible design, the preset correspondence between power consumption, frequency, and voltage may include a preset correspondence between dynamic power consumption, frequency, and voltage. In this case, the determining unit can predict the reference power consumption of the first voltage domain at each corresponding frequency and voltage in the following way: based on the dynamic power consumption, current frequency, and current voltage in the current power consumption, calculate the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage according to the preset correspondence between dynamic power consumption, frequency, and voltage, and then directly sum the static power consumption in the current power consumption and the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage to obtain the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

[0023] In one possible design, the preset correspondence between power consumption, frequency, and voltage may include a preset dynamic power consumption, frequency, and voltage correspondence, as well as a preset static power consumption, frequency, voltage, and temperature correspondence. In this case, the determining unit can predict the reference power consumption of the first voltage domain at each corresponding frequency and voltage in the following manner: First, based on the dynamic power consumption, current frequency, and current voltage in the current power consumption, calculate the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage according to the preset dynamic power consumption, frequency, and voltage correspondence; then, obtain the current temperature of the first voltage domain, and based on the static power consumption, current frequency, current voltage, and current temperature in the current power consumption, calculate the static power consumption of the first voltage domain at each corresponding frequency and voltage at the current temperature according to the preset static power consumption, frequency, voltage, and temperature correspondence; finally, sum the dynamic power consumption and static power consumption of the first voltage domain at each corresponding frequency and voltage to obtain the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

[0024] In one possible design, the adjustment unit is specifically used to: determine the budgeted power consumption of the first voltage domain, obtain a maximum reference power consumption not exceeding the budgeted power consumption from various reference power consumptions, and adjust the frequency and voltage of each processor core located in the first voltage domain according to the frequency and voltage corresponding to the maximum reference power consumption. The budgeted power consumption of the first voltage domain can characterize the maximum power consumption configuration supported by the first voltage domain, and can be calculated, for example, using a preset temperature control algorithm based on the current temperature and expected temperature of the first voltage domain.

[0025] In one possible design, the adjustment unit is also used to: if each reference power consumption is greater than the budget power consumption of the first voltage domain, obtain the minimum reference power consumption from each reference power consumption, and adjust the frequency and voltage of each processor core located in the first voltage domain according to the frequency and voltage corresponding to the minimum reference power consumption.

[0026] Fourthly, this application provides a processor, including a power regulator, M processor cores located in a first voltage domain, and a power sensor connected to the M processor cores. The power regulator is also connected to the power sensor, where M is a positive integer. The power sensor is used to send the power consumption of the connected processor cores to the power regulator. The power regulator is used to obtain the current power consumption of the first voltage domain based on the power consumption sent by the power sensor, determine the reference power consumption of the first voltage domain at each corresponding frequency and voltage based on the current power consumption of the first voltage domain, and then adjust the frequency and voltage of the M processor cores with reference to the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

[0027] In this application, the power consumption sensor and the M processor cores can be connected in any of the following ways:

[0028] In one possible connection method, there can be one power sensor connected to M processor cores. In this case, the power sensor senses the total power consumption of the M processor cores and sends it to the power regulator, so that the power regulator can directly use the power consumption received from the power sensor as the current power consumption of the first voltage domain. Thus, by setting a corresponding power sensor for each voltage domain, the total power consumption of all processor cores in the corresponding voltage domain can be sensed directly through a single power sensor, which helps save processor layout space and the computing resources of the power regulator.

[0029] In another possible connection method, the number of power sensors can be M, each connected to one of the M processor cores. In this case, each of the M power sensors can send the power consumption of its respective connected processor core to the power regulator. The power regulator then sums the M power consumption data sent by the M processor cores to obtain the current power consumption in the first voltage domain. Thus, by assigning a corresponding power sensor to each processor core, the true power consumption of each processor core can be detected more accurately, contributing to improved accuracy in power regulation.

[0030] In another possible connection method, the number of power sensors can be P, where P is any integer greater than 1 and less than M. Any one of the P power sensors can be connected to one or more of the M processor cores, and the union of the processor cores connected to the P power sensors contains the M processor cores. Different power sensors can be connected to the same processor core or to completely different processor cores; there is no specific limitation. The power consumption calculation method related to this connection method can be directly referred to the two connection methods described above, and will not be repeated here.

[0031] In one possible design, the processor may also include M temperature sensors connected to each of the M processor cores, and a power regulator is also connected to the M temperature sensors. Each temperature sensor connected to any processor core can send the temperature of that core to the power regulator. Before obtaining the current power consumption of the first voltage domain in the processor, the power regulator can also determine that the highest temperature of the M processor cores is greater than a preset temperature threshold.

[0032] In one possible design, the processor may further include a frequency modulation actuator and a voltage regulation actuator connected to M processor cores respectively, and a power regulator connected to both the frequency modulation actuator and the voltage regulation actuator. The power regulator can determine the target frequency and target voltage of the M processor cores by referring to the reference power consumption of the first voltage domain at each corresponding frequency and voltage. It then generates a frequency modulation command based on the target frequency and sends it to the frequency modulation actuator, and generates a voltage regulation command based on the target voltage and sends it to the voltage regulation actuator. This allows the frequency modulation actuator to adjust the frequency of the M processor cores to the target frequency according to the frequency modulation command, and the voltage regulation actuator to adjust the voltage of the M processor cores to the target voltage according to the voltage regulation command.

[0033] In one possible design, the processor may further include M frequency modulation actuators connected to M processor cores, and voltage regulation actuators connected to the M processor cores respectively. A power regulator is also connected to the M frequency modulation actuators and the voltage regulation actuators. The power regulator can determine the target frequency and target voltage of the M processor cores by referring to the reference power consumption of the first voltage domain at each corresponding frequency and voltage. It generates a frequency modulation command based on the target frequency and sends it to the M frequency modulation actuators, and generates a voltage regulation command based on the target voltage and sends it to the voltage regulation actuators. This allows the frequency modulation actuator connected to any processor core to adjust the frequency of the connected processor core to the target frequency according to the frequency modulation command, and the voltage regulation actuator to adjust the voltage of the M processor cores to the target voltage according to the voltage regulation command.

[0034] In one possible design, the frequency modulation actuator can also send the current frequency of the connected processor core to the power regulator, and the voltage modulation actuator can also send the current voltage of the connected processor core to the power regulator. The power regulator can predict the reference power consumption of the first voltage domain at each corresponding frequency and voltage according to the current power consumption, current frequency and current voltage, and according to the preset correspondence between power consumption, frequency and voltage.

[0035] In one possible design, the preset correspondence between power consumption, frequency, and voltage may include a preset correspondence between dynamic power consumption, frequency, and voltage. In this case, the power regulator can calculate the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage based on the dynamic power consumption, current frequency, and current voltage in the current power consumption, according to the preset correspondence between dynamic power consumption, frequency, and voltage. Then, it sums the static power consumption in the current power consumption and the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage to obtain the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

[0036] In one possible design, the preset correspondence between power consumption, frequency, and voltage may include a preset dynamic power consumption, frequency, and voltage correspondence, as well as a preset static power consumption, frequency, voltage, and temperature correspondence. In this case, the power regulator can calculate the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage based on the dynamic power consumption, current frequency, and current voltage in the current power consumption, according to the preset dynamic power consumption, frequency, and voltage correspondence, and obtain the current temperature of the first voltage domain. Based on the static power consumption, current frequency, current voltage, and current temperature in the current power consumption, according to the preset static power consumption, frequency, voltage, and temperature correspondence, it can calculate the static power consumption of the first voltage domain at each corresponding frequency and voltage at the current temperature. Then, it sums the dynamic power consumption and static power consumption of the first voltage domain at each corresponding frequency and voltage to obtain the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

[0037] In one possible design, the power regulator can determine the budget power consumption of the first voltage domain and obtain a maximum reference power consumption that is not greater than the budget power consumption from each reference power consumption. Then, it adjusts the frequency and voltage of each processor core located in the first voltage domain according to the frequency and voltage corresponding to the maximum reference power consumption.

[0038] In one possible design, if the power regulator determines that each reference power consumption is greater than the budget power consumption, it can obtain the minimum reference power consumption from each reference power consumption and adjust the frequency and voltage of each processor core located in the first voltage domain according to the frequency and voltage corresponding to the minimum reference power consumption.

[0039] Fifthly, this application provides an electronic device including a processor coupled to a memory, the processor being configured to execute a computer program stored in the memory, such that the electronic device performs the method described in any of the designs of the first aspect above.

[0040] The beneficial effects of any of the designs in the second to fifth aspects mentioned above can be referred to the beneficial effects that the corresponding designs in the first aspect mentioned above can achieve, and this application will not repeat them one by one. Attached Figure Description

[0041] Figure 1 An exemplary schematic diagram of a processor provided in an embodiment of this application is shown;

[0042] Figure 2 This diagram illustrates a voltage domain partitioning method provided in an embodiment of this application.

[0043] Figure 3 An exemplary flowchart is shown below, corresponding to a power consumption adjustment method provided in an embodiment of this application.

[0044] Figure 4 This illustration shows a schematic diagram of the filling process for a real-time power consumption model table provided in an embodiment of this application;

[0045] Figure 5 An exemplary flowchart is shown corresponding to another power consumption adjustment method provided in an embodiment of this application;

[0046] Figure 6 An exemplary schematic diagram of a power consumption regulator provided in an embodiment of this application is shown;

[0047] Figure 7 An exemplary schematic diagram of another power regulator provided in an embodiment of this application is shown. Detailed Implementation

[0048] The power consumption regulation scheme disclosed in this application can be applied to electronic devices with processing functions. In some embodiments of this application, the power consumption regulator can be an electronic device or a separate unit. When the power consumption regulator is a separate unit, the unit can be embedded in the electronic device and can adjust the frequency and voltage of one or more processor cores of the electronic device to fully utilize the junction temperature and power margin of the processor core while avoiding overheating or overcurrent. In other embodiments of this application, the power consumption regulator can also be a unit packaged inside the electronic device to implement the power consumption regulation function of the electronic device. The electronic device can be a computer device with a processor, such as a desktop computer, personal computer, or server. It should also be understood that the electronic device can also be a portable electronic device with a processor, such as a mobile phone, tablet computer, wearable device with wireless communication function (such as a smartwatch), in-vehicle device, etc. Exemplary embodiments of portable electronic devices include, but are not limited to, carrying... Or other portable electronic devices with different operating systems. These portable electronic devices can also include, for example, laptops with touch-sensitive surfaces (such as touch panels).

[0049] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific operational methods in the method embodiments can also be applied to the device embodiments or system embodiments. Furthermore, in the description of this application, "at least one" refers to one or more, and "multiple" refers to two or more. Therefore, in the embodiments of this invention, "multiple" can also be understood as "at least two". "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / ", unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, it should be understood that in the description of this application, terms such as "first" and "second" are only used for distinguishing the descriptive purpose and should not be construed as indicating or implying relative importance or order.

[0050] It should be noted that in the embodiments of this application, "connection" can be understood as electrical connection. 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 a direct connection between A and B, or an indirect connection between A and B through one or more other electrical components, such as A and B being connected. Alternatively, A can be directly connected to C, and C can be directly connected to B, with A and B connected through C. In some scenarios, "connection" can also be understood as coupling, such as electromagnetic coupling between two inductors. In short, the connection between A and B enables the transmission of electrical energy between A and B.

[0051] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0052] Figure 1 This illustration shows a schematic diagram of the structure of a processor provided in an embodiment of this application. Figure 1 As shown, the processor 100 may include at least one processor core, such as processor core 10, processor core 11, processor core 12, and processor core 13. At least one processor core serves as the core component of the processor 100, used to implement the processing functions of the processor 100. The processor 100 may also include non-core components, such as general-purpose units (including counters, decoders, and signal generators), accelerometer units, input / output control units, interface units, internal memory, and external caches. The various processor cores and non-core components can communicate with each other via a communication bus (…). Figure 1 (Not illustrated in the diagram) A connection is established to enable data transmission.

[0053] It should be understood that the processor 100 described above may include one or more chips, such as a system-on-a-chip (SoC) or a chipset formed by multiple chips. The processor 100 may also include at least one processing unit (also referred to as at least one processing subsystem), which may be distributed across different chips or integrated onto a single chip. The at least one processing unit may include a central processing unit (CPU) and a graphics processing unit (GPU), and may also include an application processor (AP), a modem processor, an image signal processor (ISP), a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU), etc.

[0054] In this embodiment, each processing unit in the processor 100 may include one or more processor cores. When multiple processor cores are included, the multiple processor cores can be divided into one or more voltage domains, where voltage domains are also called core clusters, and processor cores located in the same voltage domain have the same operating voltage. For example, Figure 2This diagram illustrates a voltage domain division method according to an embodiment of this application. Assuming that processor 100 contains voltage domain 1, voltage domain 2, and voltage domain 3, processor core 10 is located in voltage domain 1, processor cores 11 and 12 are located in voltage domain 2, and processor core 13 is located in voltage domain 3, then processor cores 10 and 13 can each have their own independent operating voltage, while processor cores 11 and 12 can have the same operating voltage. Furthermore, the individual operating voltages of processor core 10 and 13, as well as the common operating voltage of processor cores 11 and 12, can be the same or different, without limitation. In addition, processor cores within the same voltage domain can be of the same type, such as processor cores 11 and 12 both being CPU cores, or they can be of different types, such as processor core 11 being a CPU core and processor core 12 being a GPU core, without further limitation.

[0055] Continue to refer to Figure 1 As shown in the embodiments of this application, the processor 100 may further include a power regulator 14, frequency modulation actuators disposed in each processor core (e.g., frequency modulation actuator 101 disposed in processor core 10, frequency modulation actuator 111 disposed in processor core 11, frequency modulation actuator 121 disposed in processor core 12, and frequency modulation actuator 131 disposed in processor core 13), and voltage regulation actuators disposed in each voltage domain (e.g., ... Figure 1 The diagram shows voltage regulators 151 (located in voltage domain 1), 152 (located in voltage domain 2), and 153 (located in voltage domain 3). Each voltage regulator in each voltage domain can be connected to a processor core within that voltage domain. For example, voltage regulator 152 in voltage domain 2 is connected to both processor core 11 and processor core 12 within voltage domain 2. The power regulator 14 can be connected to both the frequency regulator in each processor core and the voltage regulator in each voltage domain. Thus, when frequency and voltage adjustments are needed for a specific processor core, the power regulator 14 can send a frequency adjustment command to the frequency regulator in that processor core, instructing it to adjust the core's frequency accordingly. It can also send a voltage adjustment command to the voltage regulator in the voltage domain containing that processor core, instructing it to adjust the operating voltage of each processor core within that voltage domain.

[0056] It should be understood that Figure 1This is merely an illustrative example. In other possible examples, a frequency modulation actuator shared by all processor cores in each voltage domain can be set. In this case, the processor cores in each voltage domain not only have the same voltage but also the same power. The power regulator 14 can uniformly regulate the frequency of all processor cores in a voltage domain by adjusting the frequency of the voltage domain with the frequency modulation actuator. Alternatively, frequency modulation and voltage regulation actuators can be set in non-core components. In this case, the power regulator 14 can regulate not only the frequency and voltage of the processor cores but also the frequency and voltage of the non-core components. Of course, the non-core components mentioned here refer to components that operate at a set frequency. Alternatively, a frequency modulation actuator can be set only in one or a few processor cores. In this case, the power regulator 14 can only regulate the frequency of the processor core with the frequency modulation actuator.

[0057] The following example, using a frequency actuator in each processor core, illustrates how to adjust the frequency and voltage of each processor core within a voltage domain. It should be understood that adjusting the frequency and voltage of processor cores in other voltage domains, adjusting the frequency and voltage of non-processor cores, or adjusting the frequency and voltage of processor cores within a voltage domain when a frequency actuator is set in each voltage domain, can all be performed by analogy, and this application will not repeat the details.

[0058] Furthermore, the power consumption regulation scheme in this application can be executed in any of the following modes: periodic mode, trigger mode, or a combination of periodic and trigger modes. When executed in the periodic mode, the power consumption regulator adjusts the frequency and voltage of each processor core in the voltage domain once every preset period, following the steps in the following embodiments. When executed in the trigger mode, the power consumption regulator can monitor the state of the voltage domain in real time. When it determines that the state at a certain moment meets the preset trigger conditions, it adjusts the frequency and voltage of each processor core in the voltage domain according to the steps in the following embodiments. When executed in the periodic + trigger mode, the power consumption regulator monitors the state of the voltage domain once every preset period. If the monitored state meets the preset trigger conditions, it adjusts the frequency and voltage of each processor core in the voltage domain according to the steps in the following embodiments. If the monitored state does not meet the preset trigger conditions, it exits monitoring and waits for the next preset period to resume monitoring. For the specific implementation process of the periodic and / or trigger modes, please refer to the following embodiments, which will not be described here.

[0059] Example 1

[0060] Figure 3This illustration shows a flowchart of a power consumption regulation method provided in an embodiment of this application. This method is applicable to power consumption regulators, such as... Figure 1 The power consumption regulator 14 is shown. Figure 3 An example is given of a power regulation process of a power regulator, such as... Figure 3 As shown, the method includes:

[0061] Step 301: The power regulator obtains the current power consumption of the first voltage domain in the processor.

[0062] In step 301 above, the current power consumption of the first voltage domain can refer to the current total power consumption of each processor core located in the first voltage domain, the current average power consumption of each processor core located in the first voltage domain, or the current highest power consumption of each processor core located in the first voltage domain. The specific power consumption is not limited.

[0063] The following example illustrates an implementation scheme for obtaining the current total power consumption of the first voltage domain, using the current power consumption of the first voltage domain as the current total power consumption of each processor core in the first voltage domain:

[0064] Continue to refer to Figure 1 As shown, each processor core can also be equipped with a power sensor. The power sensors in each processor core are connected to the power regulator 14. For example, processor core 10 has a power sensor 102, processor core 11 has a power sensor 112, processor core 12 has a power sensor 122, and processor core 13 has a power sensor 132. Power sensors 102, 112, 122, and 132 are connected to the power regulator 14 via a bus. In implementation, the power sensor in each processor core can accumulate the power consumption of that processor core during the current sampling period. When the reporting time for the current sampling period arrives, the power consumption of that processor core during the current sampling period is reported to the power regulator 14. Then, in the next sampling period, the power consumption of that processor core is re-accumulated and awaits reporting. After receiving the power consumption reported by each processor core, the power regulator 14 can first determine the target processor cores belonging to the first voltage domain from the processor cores, and then accumulate the power consumption consumed by each target processor core in the current sampling period to obtain the current total power consumption of the first voltage domain.

[0065] Understandably, the above essentially involves setting a power sensor in each processor core to determine the current power consumption of each core; this is only one possible implementation. In another possible implementation, a shared power sensor can be set in two or more processor cores. For example, a power sensor can be set directly in the first voltage domain for all processor cores in that domain to share. This power sensor accumulates the total power consumption consumed by all processor cores in the first voltage domain within a sampling period and then reports the result. Thus, the power consumption received by the power regulator is the current total power consumption of the first voltage domain. Therefore, whether a separate power sensor is set in each processor core or a shared power sensor is set in a voltage domain, the current power consumption of the voltage domain can be obtained through direct sampling using the power sensor, which helps improve the accuracy of obtaining the current power consumption.

[0066] In the above implementation scheme, if the power regulator executes the power regulation method in a periodic manner, the current sampling period can correspond to a preset periodic period. The power sensor can sample the power consumption of the processor core or the first voltage domain in each periodic period according to the preset period and actively report it to the power regulator. Alternatively, if the power regulator executes the power regulation method in the above triggering manner, the current sampling period can correspond to the period from the last triggering time to the current triggering time. After determining that the state of the first voltage domain at a certain moment meets the preset triggering condition, the power regulator can send a request message to the power sensor to request the power sensor to send the power consumption collected from the moment the request message was received to the current moment to the power regulator. Alternatively, if the power regulator executes the power regulation method according to the above-mentioned periodic + trigger method, then: the current sampling period can correspond to a preset periodic period. The power sensor actively reports the power consumption to the power regulator according to the preset periodic period. After receiving the power consumption in each period, the power regulator also needs to determine whether the state of the first voltage domain meets the preset trigger condition. If so, the current power consumption is determined based on the power consumption received in that period. If not, it continues to wait for the next report from the power sensor until a report is made and it is determined that the state of the first voltage domain meets the preset trigger condition. Then, the power regulator determines the current power consumption based on all the power consumption received since the last trigger. Alternatively, the current sampling period can also correspond to the period between the last trigger time and the current trigger time. The difference from the above trigger method is that the power regulator monitors whether the first voltage domain triggers the power regulation strategy according to the preset period. Therefore, the duration of the current sampling period corresponds to a multiple of the preset period duration.

[0067] For example, the preset trigger condition can be at least one of the following:

[0068] Content 1: The temperature of the first voltage domain is greater than a preset temperature threshold. The temperature of the first voltage domain can be the average temperature or the highest temperature of each processor core within that domain. Preferably, it can be set to the highest temperature of each processor core, so that the processor core with the most severe temperature environment in the first voltage domain can be used to uniformly regulate the power consumption of each processor core in the first voltage domain, thereby reducing the temperature of each processor core and effectively improving the safety of each processor core in the first voltage domain. The preset temperature threshold refers to the minimum temperature at which power consumption regulation is required. It can be set by those skilled in the art based on experience or obtained through prior experimentation, and is typically set to a temperature between 75°C and 80°C.

[0069] Content 2: The load of the first voltage domain exceeds a preset load threshold. The load of the first voltage domain can be the total load, average load, or maximum load of all processor cores within the first voltage domain. Preferably, it can be set to the total load of all processor cores, so as to balance the power consumption of each processor core within the first voltage domain by referring to the overall load situation of the first voltage domain, thereby achieving the purpose of balancing the load distribution of the first voltage domain.

[0070] Content 3: The power consumption of the first voltage domain is greater than a preset power consumption threshold. The power consumption of the first voltage domain can be the total power consumption, average power consumption, or maximum power consumption of all processor cores within the first voltage domain. Preferably, it can be set to the total power consumption of all processor cores, so that when the total power consumption of the first voltage domain is high, the overall power consumption of the first voltage domain can be reduced by centrally adjusting the power consumption of each processor core within the first voltage domain.

[0071] In the example above, by setting trigger conditions for the power consumption regulation scheme, the power consumption regulator can only perform power consumption regulation when the trigger conditions are met (such as high temperature, heavy load, or high power consumption). When the trigger conditions are not met, power consumption regulation can be stopped, which helps to save unnecessary resource waste while performing necessary regulation operations.

[0072] Step 302: The power consumption regulator determines the reference power consumption of the first voltage domain at each corresponding frequency and voltage based on the current power consumption of the first voltage domain.

[0073] In step 302 above, the frequency, voltage, and power consumption of the first voltage domain can have a preset correlation. Besides acquiring the current power consumption of the first voltage domain, the power regulator can also acquire the current frequency and current voltage of the first voltage domain (for example, the power sensor can report the current frequency and current voltage to the power regulator while reporting the current power consumption, or the power regulator can acquire the current frequency and current voltage through interaction with the frequency modulation actuator and the voltage modulation actuator; the specific method is not limited). Then, based on the current frequency, current voltage, and current power consumption of the first voltage domain, and according to the preset correlation, the reference power consumption of the first voltage domain at various corresponding other frequencies and other voltages is calculated. These other frequencies and other voltages in the first voltage domain can be any of the following:

[0074] The first type uses a pre-set fixed frequency and fixed voltage;

[0075] The second method is calculated based on preset interval granularity and number of gears. For example, when the interval granularity corresponding to the frequency is 10KHz and the interval granularity corresponding to the voltage is 0.1V, if the current frequency is 200KHz, the current voltage is 2.5V, and the number of gears is 7, then the corresponding other frequencies and other voltages can be: 170KHz and 2.2V, 180KHz and 2.3V, 190KHz and 2.4V, 200KHz and 2.5V, 210KHz and 2.6V, 220KHz and 2.7V, and 230KHz and 2.8V.

[0076] The third method is based on preset interval granularity, upper frequency limit, and lower frequency limit. For example, when the interval granularity corresponding to the frequency is 10KHz and the interval granularity corresponding to the voltage is 0.1V, if the current frequency is 200KHz, the current voltage is 2.5V, the upper frequency limit is 225KHz, and the lower frequency limit is 155KHz, then the corresponding other frequencies and other voltages can be: 160KHz and 2.1V, 170KHz and 2.2V, 180KHz and 2.3V, 190KHz and 2.4V, 200KHz and 2.5V, 210KHz and 2.6V, and 220KHz and 2.7V.

[0077] The fourth method is based on preset interval granularity, upper voltage limit, and lower voltage limit. For example, when the interval granularity corresponding to the frequency is 10kHz and the interval granularity corresponding to the voltage is 0.1V, if the current frequency is 200kHz, the current voltage is 2.5V, the upper voltage limit is 3.05V, and the lower voltage limit is 2.15V, then the corresponding other frequencies and other voltages can be: 170kHz and 2.2V, 180kHz and 2.3V, 190kHz and 2.4V, 200kHz and 2.5V, 210kHz and 2.6V, 220kHz and 2.7V, 230kHz and 2.8V, 240kHz and 2.9V, and 250kHz and 3.0V.

[0078] It should be understood that the corresponding other frequencies and voltages in different voltage domains can be the same or different. Even if the same calculation rules are set in different voltage domains, the calculated other frequencies and voltages may also be different because the current voltage and current frequency corresponding to different voltage domains at the same time may not be the same.

[0079] In an alternative implementation, the power regulator may also maintain a real-time power consumption model table, which stores the corresponding frequencies and voltages in the first voltage domain, so that the power regulator can directly calculate the corresponding reference power consumption according to the corresponding frequencies and voltages stored in the table. Figure 4 This example illustrates a flowchart of filling a real-time power consumption model table according to an embodiment of this application. It is assumed that the corresponding other frequencies and other voltages are the third type described above. Figure 4 Figure (A) illustrates the real-time power consumption model table in the unfilled state. Figure 4 Figure (B) illustrates the real-time power consumption model table calculated based on the current frequency and voltage, and then filled in with the power consumption data for other frequencies and voltages. Figure 4 Figure (C) illustrates the real-time power consumption model table after calculating and filling in the reference power consumption corresponding to other frequencies and voltages based on the current frequency, current voltage, and current power consumption. (Refer to...) Figure 4 (A) to Figure 4 As shown in (C), the first column of the real-time power consumption model table corresponds to frequency, the second column corresponds to voltage, and the third column corresponds to reference power consumption.

[0080] like Figure 4 As shown in (A), in the unfilled state, the real-time power consumption model table has a specified lower frequency limit F filled in the second row of the first column. X In the last row of the first column, fill in a specified upper frequency limit F. Y All other cells are blank;

[0081] like Figure 4 As shown in (B), after obtaining the current frequency F I Current voltage V I and current power consumption P I Then, the power regulator will adjust the current frequency F. I Current voltage V I and current power consumption P I Fill in the corresponding positions in the real-time power consumption model table, and then calculate based on the current frequency F. I and current voltage V I Based on the preset interval granularity, the value at the upper frequency limit F is calculated. X and frequency lower limit F Y The other frequencies and voltages within the defined range are then entered into the real-time power consumption model table. At this point, the frequencies in each row of the first column of the real-time power consumption model table are entered, the voltages in each row of the second column are entered except for the second and last rows, and the voltages in each row of the third column are entered except for the row containing the current power consumption.

[0082] like Figure 4 As shown in (C), the power consumption regulator adjusts according to the current frequency F. I Current voltage V I and current power consumption P I According to the preset correlation, the reference power consumption corresponding to each other frequency and voltage is calculated and filled into the real-time power consumption model table. The specific method for calculating the reference power consumption at other frequencies and voltages will be described in Example 2 below, and will not be explained here. After filling in the reference power consumption corresponding to each other frequency and voltage, the reference power consumption in all rows of the third column of the real-time power consumption model table is filled in, except for the second and last rows. At this point, the power regulator obtains the updated real-time power consumption model table.

[0083] It should be pointed out that, Figure 4 (A) to Figure 4Figure (C) illustrates the update process during the initial filling of the real-time power consumption model table. After the first update, the table is essentially filled. Therefore, subsequent updates can either modify the data already entered in the table or clear the table before entering new data; there are no restrictions. Furthermore, when the power regulator adjusts power consumption periodically, it refreshes the real-time power consumption model table every preset period based on the current power consumption of the first voltage domain acquired within that period. When the power regulator adjusts power consumption via a trigger mechanism, it temporarily interrupts the current process and refreshes the real-time power consumption model table based on the current power consumption of the first voltage domain whenever it detects that the state of the first voltage domain meets a preset trigger condition, before resuming the current process.

[0084] It should be understood that the power consumption model table in the embodiments of this application can be stored in the processor's memory unit (e.g., Figure 1In the external cache or internal memory, the power regulator can perform operations such as retrieving, filling, modifying, and deleting power model tables by accessing memory cells. A memory cell can be a single memory or a group of memory, or a single register, a group of registers, or a register file. The memory can be volatile or non-volatile, or a combination of both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory cells of the methods described herein are intended to include, but are not limited to, these and any other suitable types of memory.

[0085] Step 303: The power regulator adjusts the frequency and voltage of each processor core in the first voltage domain by referring to the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

[0086] In step 303 above, the power regulator can adjust the frequency and voltage in various ways. For example, in one approach, the power regulator can first use the historical power consumption of the first voltage domain in various historical periods to predict the future power consumption of the first voltage domain in the future, and then search for, based on the predicted future power consumption, the following... Figure 4The reference power consumptions shown in (C) are used to find the maximum target reference power consumption that is not greater than the future power consumption. Assuming the target reference power consumption is P2, the power regulator can adjust the frequency and voltage of the first voltage domain according to the frequency F2 and voltage V2 corresponding to the target reference power consumption P2. Alternatively, in another approach, the power regulator can allocate power consumption to each voltage domain based on factors such as the temperature and load of the processor cores within each voltage domain. After determining the budget power consumption allocated to the first voltage domain, it searches for the maximum target reference power consumption that is not greater than the future power consumption. Figure 4 The reference power consumptions shown in (C) are used to find the maximum target reference power consumption that is not greater than the budget power consumption, and the frequency and voltage of the first voltage domain are adjusted in the manner described above. Alternatively, in another approach, the power regulator can directly determine the budget power consumption of the first voltage domain based on factors such as the temperature and load of the processor cores included in the first voltage domain, and adjust the frequency and voltage of the first voltage domain according to the budget power consumption in the manner described above. There are many possible implementations, which will not be elaborated upon here.

[0087] For example, in Figure 4 When searching among the various reference power consumptions shown in (C), considering that the reference power consumptions in the diagram increase sequentially from top to bottom, and the target reference power consumption to be searched is the maximum reference power consumption that is less than or equal to the future power consumption or the budgeted power consumption, the power regulator can choose from... Figure 4 Starting from the second-to-last row of the third column shown in (C), search upwards until a reference power consumption less than or equal to the future or budgeted power consumption is found. This reference power consumption is then used as the target reference power consumption. Of course, the power regulator can also start from... Figure 4 Starting from the third row of the third column shown in (C), search sequentially from top to bottom until a reference power consumption greater than the future power consumption or the budgeted power consumption is found. Then, take the reference power consumption located in the row above the reference power consumption as the target reference power consumption.

[0088] For example, continue to refer to Figure 1 and Figure 2As shown, assuming the first voltage domain is voltage domain 2, since voltage domain 2 contains processor core 11 and processor core 12, the specific implementation process of power regulator 14 adjusting the frequency and voltage of the first voltage domain according to the frequency F2 and voltage V2 corresponding to the target reference power consumption P2 includes: power regulator 14 generates a frequency modulation command based on frequency F2 and sends the frequency modulation command to frequency modulation executor 111 in processor core 11 and frequency modulation executor 121 in processor core 12, to instruct frequency modulation executor 111 to adjust the frequency of processor core 11 to frequency F2, and to instruct frequency modulation executor 121 to adjust the frequency of processor core 12 to frequency F2; power regulator 14 generates a voltage adjustment command based on voltage V2 and sends the voltage adjustment command to voltage adjustment executor 152, to instruct voltage adjustment executor 152 to adjust the operating voltage of voltage domain 2 to voltage V2, and the operating voltage V2 of voltage domain 2 is used as input to processor core 11 and processor core 12.

[0089] It should be understood that, in addition to adjusting the frequency and voltage, the power consumption regulator in the embodiments of this application can also adjust other parameters that can affect the power consumption state, such as current, etc. This application does not make specific limitations on this.

[0090] In the first embodiment described above, a reference power consumption for frequency and voltage adjustment of the processor cores in the first voltage domain is determined by referring to the current power consumption of the first voltage domain. This ensures that the reference power consumption accurately matches the actual needs of the processor cores in the first voltage domain at the current moment, thereby helping to ensure that the frequency and voltage adjusted based on the reference power consumption meet the actual needs of the processor cores and effectively improving the accuracy of frequency and voltage adjustment. Furthermore, by adjusting the frequency and voltage of each processor core in the first voltage domain according to the current power consumption of the first voltage domain, the frequency of the processor cores can also flexibly change with the power consumption state of the voltage domain, further improving the flexibility of frequency and voltage adjustment.

[0091] The following describes the specific implementation of the power consumption adjustment method in this application based on Embodiment 2.

[0092]

Example 2

[0093] Figure 5 This illustration shows a flowchart of another power consumption regulation method provided in an embodiment of this application. This method is applicable to power consumption regulators, such as... Figure 1 The power consumption regulator 14 is shown. Figure 5 An example is given of a power regulation process of a power regulator, such as... Figure 5 As shown, the method includes:

[0094] Step 501: The power regulator obtains the temperature of each processor core.

[0095] For example, continue to refer to Figure 1 As shown, each processor core can also be equipped with a temperature sensor. For example, processor core 10 has a temperature sensor 103, processor core 11 has a temperature sensor 113, processor core 12 has a temperature sensor 123, and processor core 13 has a temperature sensor 133. Temperature sensors 103, 113, 123, and 133 are connected to the power regulator 14 via a bus. In implementation, the temperature sensors in each processor core can sample the temperature of each processor core according to a preset sampling period and send the sampled temperature to the power regulator 14 via the bus. This example can directly obtain the temperature of each processor core through measurement, which helps to improve the accuracy of temperature acquisition.

[0096] It should be understood that the above example actually involves setting a temperature sensor in each processor core to determine the temperature of each processor core; this is only one optional implementation. In another optional implementation, a shared temperature sensor can be set in two or more processor cores. In this approach, since the temperature value sampled by the temperature sensor may be the temperature value of a point in two or more processor cores, the power regulator can subsequently compensate for the temperature sampled by the temperature sensor according to a certain strategy to obtain the temperature of each processor core. The specific strategy used can be set by those skilled in the art based on experience, and will not be described here.

[0097] Step 502: The power regulator determines whether the highest temperature of the processor core located in the first voltage domain is greater than the preset temperature threshold. If yes, then proceed to step 503; otherwise, proceed to step 502.

[0098] In step 502 above, when the temperature of all processor cores in the first voltage domain is not greater than the preset temperature threshold, it means that the current temperature of the first voltage domain is low, and the temperature difference between the current temperature and the desired temperature is large. Even if the processor cores in the first voltage domain operate at a higher frequency and higher voltage, it is highly unlikely that their temperature will suddenly increase to an unsafe state. In this case, the power regulator can end the analysis of the first voltage domain and continue to monitor the temperature of the first voltage domain until it is determined that the temperature of a certain processor core in the first voltage domain has reached the preset temperature threshold, at which point it starts power regulation of the first voltage domain. This method can not only adjust the power consumption of all processor cores in the first voltage domain in a timely manner when the processor core in the first voltage domain reaches an unsafe temperature state, but also minimize unnecessary resource waste by the power regulator.

[0099] Step 503: The power consumption regulator obtains the current power consumption, current frequency, and current voltage of the first voltage domain.

[0100] For example, assuming each processor core is equipped with a power sensor, the power regulator can receive the power consumption reported by the power sensor in each processor core, and then accumulate the power consumption reported by each processor core in the first voltage domain as the current power consumption of the first voltage domain. The power sensor may include a static power sensor and a dynamic power sensor. The static power sensor samples and reports the static power consumption of the processor core during the current sampling period, so that the power regulator can accumulate the current static power consumption of the first voltage domain. The dynamic power sensor samples and reports the dynamic power consumption of the processor core during the current sampling period, so that the power regulator can accumulate the current dynamic power consumption of the first voltage domain. The sampling process of the static power consumption sensor can be specifically described as follows: The static power consumption sensor maintains a preset static power consumption model (specifically represented by a preset correspondence between static power consumption, frequency, voltage, and temperature). The static power consumption sensor senses the instantaneous frequency, instantaneous voltage, and instantaneous temperature of the processor core in each instantaneous period and inputs them into the static power consumption model to obtain the output instantaneous static power consumption. Then, the instantaneous static power consumption of the processor core in each instantaneous period within the current sampling period is accumulated to obtain the static power consumption of the processor core in the current sampling period. The sampling process of the dynamic power consumption sensor can be specifically described as follows: The dynamic power consumption sensor monitors the behavior of signals appearing in the processor core in real time. Based on the behavior of each signal appearing in the processor core within the current sampling period, the dynamic power consumption of the processor core within the current sampling period is statistically obtained.

[0101] Furthermore, assuming each processor core has a frequency actuator and each voltage domain has a voltage actuator, the power regulator can also obtain the current frequency of the first voltage domain by communicating with the frequency actuator in any processor core within the first voltage domain, and obtain the current voltage of the first voltage domain by communicating with the voltage actuator within the first voltage domain. Alternatively, assuming each voltage domain has a shared frequency actuator and voltage actuator, the power regulator can also obtain the current frequency of the first voltage domain by communicating with the frequency actuator within the first voltage domain, and obtain the current voltage of the first voltage domain by communicating with the voltage actuator within the first voltage domain.

[0102] Step 504: The power consumption regulator predicts the reference power consumption of the first voltage domain at each corresponding frequency and voltage according to the current power consumption, current frequency, and current voltage of the first voltage domain, following a preset correspondence between power consumption, frequency, and voltage. The preset correspondence between power consumption, frequency, and voltage can be set by those skilled in the art based on experience, or it can be obtained a priori through experiments; no specific limitation is imposed.

[0103] In an optional implementation, the preset correspondence between power consumption, frequency, and voltage may include a preset dynamic correspondence between power consumption, frequency, and voltage, which typically satisfies the following formula (1.1):

[0104] P D FV 2 =C……(1.1)

[0105] Among them, P D Where F is the dynamic power consumption, V is the frequency, and C is the voltage.

[0106] Based on the above formula (1.1), it can be seen that the product of dynamic power consumption, frequency, and the square of voltage remains constant. Therefore, if the current dynamic power consumption is P... ID The current frequency is F I The current voltage is V I Then any corresponding frequency F J and voltage V J The corresponding dynamic power consumption P JD It can satisfy the following formula (1.2):

[0107]

[0108] Thus, the power regulator accumulates the current dynamic power consumption P in the first voltage domain. ID Then, based on the current dynamic power consumption P ID Current frequency F I and current voltage V I According to the above formula (1.2), the voltage in the first voltage domain can be calculated as follows: Figure 4 The dynamic power consumption P at each corresponding frequency and voltage is shown in (B). 1D P 2D ... P KD .

[0109] Furthermore, the power regulator accumulates the current static power consumption P in the first voltage domain. IS Then, the current static power consumption P can be directly set. IS As the first voltage domain, in such Figure 4 The static power P at each corresponding frequency and voltage is shown in (B). 1S P 2S ... P KS And sum the dynamic power consumption and static power consumption at each corresponding frequency and voltage to obtain the reference power consumption at each corresponding frequency and voltage (i.e., P1 = P). 1D +P 1S P2 = P 2D +P 2S , ..., PK =P KD +P KS Then, the reference power consumption at each corresponding frequency and voltage is used to refresh the display. Figure 4 The real-time power consumption model table shown in (B) is obtained as follows. Figure 4 The updated real-time power consumption model table is shown in (C).

[0110] It should be noted that directly using the current static power consumption as the static power consumption of the first voltage domain at each corresponding frequency and voltage eliminates the need for resource-intensive static power consumption conversion, allowing for faster determination of the reference power consumption and improving power regulation efficiency. However, this is only one optional implementation method. In another optional implementation, the preset correspondence between power consumption, frequency, and voltage may also include a preset correspondence between static power consumption, frequency, voltage, and temperature. This correspondence is obtained by testing the first voltage domain under no-load conditions using a quiescent supply current (IDDQ) test scheme. It typically also includes the static path of the first voltage domain, which characterizes the inherent power consumption of the first voltage domain under no-load conditions due to leakage current of internal components; this path is generally a constant. In practice, the power regulator accumulates the current static power consumption P of the first voltage domain. IS Then, based on the current static power consumption P IS Current frequency F I Current voltage V I and the current temperature T I Based on the preset correspondence between static power consumption, frequency, voltage, and temperature, the static power consumption P of the first voltage domain at each corresponding frequency and voltage can be calculated. 1S P 2S ... P KS Then, by summing the dynamic power consumption and static power consumption at each corresponding frequency and voltage in the above manner, a reference power consumption at each corresponding frequency and voltage is obtained. This embodiment utilizes a preset correspondence to calculate static power consumption, which can calculate a more accurate static power consumption at each corresponding frequency and voltage, thus helping to improve the accuracy of power consumption regulation.

[0111] Step 505, the power regulator determines the budgeted power consumption of the first voltage domain.

[0112] In step 505 above, the power regulator can determine the budgeted power consumption of the first voltage domain in any of the following ways:

[0113] In Method 1, the power regulator substitutes the current temperature of each processor core in the first voltage domain, along with the temperature change between the current and historical temperatures of each processor core, into a Proportional-Integral-Derivative (PID) control algorithm to obtain the budgeted power consumption for the first voltage domain output by the PID control algorithm. Logically, the PID control algorithm corresponds to a mathematical expression where the dependent variable is the budgeted power consumption, and the independent variables are the current temperature and temperature change of each processor core. The parameters in the mathematical expression can include proportional, integral, and derivative parameters, which are pre-determined through multiple experiments based on the desired temperature. In the PID control algorithm, if the deviation between the current temperature and the desired temperature of each processor core is positive, the first voltage domain will correspond to a smaller budgeted power consumption. This aims to reduce the heat generation of the processor cores by lowering their power consumption when the current temperature is higher than the desired temperature, thus bringing the processor core temperature closer to the desired temperature. If the deviation between the current temperature and the desired temperature of each processor core is negative, the first voltage domain will correspond to a larger budget power consumption in order to improve the processing performance of the processor core by increasing the power consumption of the processor core when the current temperature is lower than the desired temperature.

[0114] In the second method, the power regulator pre-determines the correspondence between the temperature of the first voltage domain and the optimal expected power consumption based on multiple experiments (e.g., a correspondence table or a correspondence graph). In this way, the power regulator can directly look up the correspondence based on the current temperature of the first voltage domain to obtain the optimal budget power consumption corresponding to the current temperature.

[0115] In method three, the power regulator inputs the current temperature of each processor core and the temperature change of each processor core (both current and historical) into the PID control algorithm to obtain the total budgeted power consumption of the processor output by the PID control algorithm. Then, based on the current power consumption of the first voltage domain and the current total power consumption of each voltage domain contained in the processor, it determines the proportion of the current power consumption of the first voltage domain to the current total power consumption of the processor. This proportion is used as the power consumption allocation ratio corresponding to the first voltage domain. The total budgeted power consumption of the processor is allocated according to this power consumption allocation ratio to obtain the budgeted power consumption corresponding to the first voltage domain.

[0116] It should be understood that the above content is only an example of several possible ways to determine the budget power consumption. In actual operation, other determination methods can also be selected. For example, the budget power consumption of the first voltage domain issued by the operating system can be obtained directly, or the total budget power consumption required in the above determination method three issued by the operating system can be obtained, or the power consumption allocation ratio required in the above determination method three issued by the operating system can be obtained, and then the subsequent operations can be performed according to the above determination method three, etc. This application does not make specific limitations in this regard.

[0117] Step 506: The power regulator finds the maximum reference power consumption that is not greater than the budget power consumption in the first voltage domain from among the various reference power consumptions.

[0118] When there is a maximum reference power consumption that is not greater than the budget power consumption among the various reference power consumptions, the search is successful and step 507 is executed.

[0119] If all reference power consumptions are greater than the budgeted power consumption, the search fails, and step 508 is executed.

[0120] Step 507: The power regulator adjusts the frequency and voltage of each processor core located in the first voltage domain by referring to the frequency and voltage corresponding to the maximum reference power consumption that is not greater than the budget power consumption.

[0121] In steps 506 and 507 above, since each reference power consumption is calculated based on the current power consumption of the first voltage domain, each reference power consumption reflects the actual demand of the first voltage domain at the current moment. Therefore, by adjusting the power consumption of the first voltage domain by referring to the maximum reference power consumption that is not greater than the budgeted power consumption, the total power consumption of the first voltage domain can be maximized while ensuring that it does not exceed the budgeted power consumption (i.e., meeting temperature control requirements). This helps to fully utilize the power consumption margin of the first voltage domain to improve its processing performance. Experiments have shown that, compared with the reference power consumption set based on experiments or human experience in existing solutions, under the same total power consumption budget for the first voltage domain, the power consumption adjustment method in this application can not only control the total power consumption of the first voltage domain within the budgeted power consumption, but also improve the processing performance of the first voltage domain by 5-10%.

[0122] Step 508: The power regulator adjusts the frequency and voltage of each processor core located in the first voltage domain by referring to the frequency and voltage corresponding to the minimum reference power consumption among the various reference power consumptions.

[0123] In steps 506 and 508 above, when all the reference power consumption is greater than the budget power consumption, it means that the current power consumption of the first voltage domain is very high. The first voltage domain may be in a high-frequency and high-voltage state for a long time. Therefore, by using the minimum reference power consumption among the various reference power consumptions to adjust the power consumption of the first voltage domain, the frequency and voltage of the first voltage domain can actually be reduced, alleviating the long-term high-voltage and high-frequency state of the first voltage domain and avoiding overcurrent or overheating in the first voltage domain as much as possible.

[0124] In the second embodiment described above, by calculating the reference power consumption of the first voltage domain at other corresponding frequencies and voltages using the current power consumption, current frequency, and current voltage of the first voltage domain, the reference power consumption can be set based on the actual needs of the first voltage domain. This allows for accurate adjustment of the frequency and voltage of the first voltage domain using the reference power consumption that meets the actual needs. Furthermore, by calculating the reference power consumption for voltage and frequency regulation in the current scenario using the current power consumption, the adjustment result can be made applicable to the current scenario of the first voltage domain, helping to make this power consumption regulation scheme compatible with various possible scenarios. In addition, by using the maximum reference power consumption, which is not greater than the budgeted power consumption, for voltage and frequency regulation, it is helpful to fully utilize the power margin of the first voltage domain and maximize the processing performance of the first voltage domain while ensuring that the total power consumption of the first voltage domain does not exceed the budgeted power consumption.

[0125] It should be noted that both Embodiment 1 and Embodiment 2 above use voltage domains as the basic unit, adjusting the frequency and voltage of each processor core within the same voltage domain to be consistent. This method can effectively balance the power consumption of each processor core within the voltage domain. It should be understood that in another embodiment, the processor core can also be used as the basic unit for frequency and voltage adjustment. Each processor core maintains its own real-time power consumption model table. After determining the voltage and frequency of each processor core within the same voltage domain according to the method in Embodiment 1 or Embodiment 2 above, the voltage of that voltage domain can be adjusted to its maximum value. Furthermore, considering that if the frequency of other processor cores remains low after increasing the voltage, it may result in wasted energy, the frequency of other processor cores can be increased simultaneously if the temperature of the first voltage domain allows, to fully utilize the available energy in the first voltage domain and improve the processing power of other processor cores. Alternatively, in yet another embodiment, the processing unit can be used as the basic unit for frequency and voltage adjustment, adjusting the voltage and frequency of all processor cores within each voltage domain of a processing unit to be consistent according to the method in Embodiment 1 or Embodiment 2 above. Many possible extension schemes exist, and this application will not list them all.

[0126] According to the aforementioned method, Figure 6This is a schematic diagram of the power regulator 600 provided in an embodiment of this application. The power regulator 600 can be a chip or a circuit, such as a chip or circuit that can be disposed in a processor. The power regulator 600 can correspond to the power regulator 14 in the above method. The power regulator 600 can achieve the above... Figure 3 or Figure 5 The steps of the method corresponding to any one or more of the items shown. Figure 6 As shown, the power regulator 600 may include a monitoring circuit 601 and a processing circuit 602. Furthermore, the power regulator 600 may also include a bus system, through which the monitoring circuit 601 and the processing circuit 602 can be connected. Moreover, the monitoring circuit 601 may also be connected via the bus system to the power sensor and temperature sensor of each processor core, and the processing circuit 602 may also be connected via the bus system to the regulating actuator of each processor core and the voltage actuator in each voltage domain.

[0127] In this embodiment, the monitoring circuit 601 can obtain the current power consumption of the first voltage domain in the processor through the power consumption sensor of each processor core. Correspondingly, the processing circuit 602 can determine the reference power consumption of the first voltage domain at each corresponding frequency and voltage based on the current power consumption of the first voltage domain, and then adjust the frequency and voltage of each processor core located in the first voltage domain by referring to the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

[0128] For the concepts, explanations, detailed descriptions, and other steps related to the technical solutions provided in the embodiments of this application involving the power consumption regulator 600, please refer to the descriptions of these contents in the foregoing methods or other embodiments, which will not be repeated here.

[0129] According to the aforementioned method, Figure 7 This is a schematic diagram of another power regulator 700 provided in an embodiment of this application. The power regulator 700 can be a chip or circuit, such as a chip or circuit that can be disposed in a processor. This power regulator 700 can correspond to the power regulator 14 in the above method. This power regulator 700 can achieve the above... Figure 3 or Figure 5 The steps of the method corresponding to any one or more of the items shown. Figure 7 As shown, the power consumption regulator 700 may include an acquisition unit 701, a determination unit 702, and an adjustment unit 703.

[0130] In this embodiment, the acquisition unit 701 can be a receiving unit or a receiver when receiving information, and this receiving unit or receiver can be a radio frequency circuit. In specific implementation, the acquisition unit 701 can acquire the current power consumption of the first voltage domain in the processor, the determination unit 702 can determine the reference power consumption of the first voltage domain at each corresponding frequency and voltage based on the current power consumption of the first voltage domain, and the adjustment unit 703 can adjust the frequency and voltage of each processor core located in the first voltage domain by referring to the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

[0131] For the concepts, explanations, detailed descriptions, and other steps related to the technical solutions provided in the embodiments of this application involving the power regulator 700, please refer to the descriptions of these contents in the foregoing methods or other embodiments, which will not be repeated here.

[0132] It is understood that the functions of each unit in the power consumption regulator 700 described above can be referred to the implementation of the corresponding method embodiments, and will not be repeated here.

[0133] It should be understood that the division of the power regulator 700 units described above is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. In this embodiment, the acquisition unit 701 can be derived from the above-described... Figure 6 The monitoring circuit 601 is implemented, and the determining unit 702 and the adjusting unit 703 can be implemented by the above. Figure 6 The processing circuit 602 is used for implementation.

[0134] According to the method provided in the embodiments of this application, this application also provides a computer program product, which includes: computer program code, which, when run on a computer, causes the computer to execute... Figures 1 to 5 The method of any one of the embodiments shown.

[0135] According to the method provided in the embodiments of this application, this application also provides a computer-readable storage medium storing program code, which, when run on a computer, causes the computer to execute... Figures 1 to 5 The method of any one of the embodiments shown.

[0136] According to the method provided in the embodiments of this application, this application also provides an electronic device, which includes a processor coupled to a memory. The processor is configured to execute a computer program stored in the memory, thereby causing the electronic device to perform... Figures 1 to 5 The method of any one of the embodiments shown.

[0137] The terms “component,” “module,” “system,” etc., used in this specification are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process and / or an execution thread, and components may be located on a single computer and / or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).

[0138] Those skilled in the art will recognize that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0139] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0140] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0141] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0142] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0143] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0144] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A power consumption regulation method, characterized in that, The method includes: Get the current power consumption of the first voltage domain in the processor; Obtain the current frequency and current voltage of the first voltage domain. Based on the dynamic power consumption, the current frequency and the current voltage in the current power consumption, calculate the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage according to the preset correspondence between dynamic power consumption, frequency and voltage. By summing the static power consumption in the current power consumption and the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage, a reference power consumption of the first voltage domain at each corresponding frequency and voltage is obtained; or, the current temperature of the first voltage domain is obtained, and based on the static power consumption, the current frequency, the current voltage, and the current temperature in the current power consumption, according to a preset correspondence between static power consumption, frequency, voltage, and temperature, the static power consumption of the first voltage domain at each corresponding frequency and voltage at the current temperature is calculated, and the dynamic power consumption and static power consumption of the first voltage domain at each corresponding frequency and voltage are summed to obtain a reference power consumption of the first voltage domain at each corresponding frequency and voltage. The frequency and voltage of each processor core located in the first voltage domain are adjusted by referring to the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

2. The method as described in claim 1, characterized in that, Before obtaining the current power consumption of the first voltage domain in the processor, the method further includes: It is determined that the highest temperature of the processor core located in the first voltage domain is greater than a preset temperature threshold.

3. The method as described in claim 1 or 2, characterized in that, The step of adjusting the frequency and voltage of each processor core located in the first voltage domain by referring to the reference power consumption of the first voltage domain at each corresponding frequency and voltage includes: Determine the budgeted power consumption of the first voltage domain; Obtain the maximum reference power consumption that is not greater than the budgeted power consumption from each reference power consumption; Adjust the frequency and voltage of each processor core located in the first voltage domain according to the frequency and voltage corresponding to the maximum reference power consumption.

4. The method as described in claim 3, characterized in that, The method further includes: If all the reference power consumptions are greater than the budget power consumption, then the minimum reference power consumption is obtained from the reference power consumptions, and the frequency and voltage of each processor core located in the first voltage domain are adjusted according to the frequency and voltage corresponding to the minimum reference power consumption.

5. A processor, characterized in that, The system includes a power regulator, M processor cores located in a first voltage domain, a power sensor connected to the M processor cores, a frequency modulation actuator and a voltage regulation actuator respectively connected to the M processor cores, and the power regulator is also connected to the power sensor, the frequency modulation actuator and the voltage regulation actuator; wherein M is a positive integer; The power consumption sensor is used to send the power consumption of the connected processor core to the power consumption regulator. The frequency modulation actuator is used to send the current frequency of the connected processor core to the power regulator; The voltage regulator is used to send the current voltage of the connected processor core to the power regulator. The power regulator is configured to: obtain the current power consumption of the first voltage domain based on the power consumption sent by the power consumption sensor; calculate the reference power consumption of the first voltage domain at each corresponding frequency and voltage according to a preset correspondence between dynamic power consumption, frequency, and voltage, based on the dynamic power consumption, current frequency, and current voltage in the current power consumption; sum the static power consumption in the current power consumption and the dynamic power consumption of the first voltage domain at each corresponding frequency and voltage to obtain the reference power consumption of the first voltage domain at each corresponding frequency and voltage; or obtain the current temperature of the first voltage domain; calculate the static power consumption of the first voltage domain at each corresponding frequency and voltage at the current temperature based on the static power consumption, current frequency, current voltage, and current temperature, according to a preset correspondence between static power consumption, frequency, voltage, and temperature, and sum the dynamic power consumption and static power consumption of the first voltage domain at each corresponding frequency and voltage to obtain the reference power consumption of the first voltage domain at each corresponding frequency and voltage; and adjust the frequency and voltage of the M processor cores with reference to the reference power consumption of the first voltage domain at each corresponding frequency and voltage.

6. The processor as described in claim 5, characterized in that, The number of power sensors is M, and each of the M power sensors is connected to one of the M processor cores. The power regulator is specifically used to obtain the current power consumption of the first voltage domain by summing the M power consumption values ​​of the M processor cores sent by the M power sensors.

7. The processor as described in claim 5 or 6, characterized in that, The processor also includes M temperature sensors that are connected one-to-one with the M processor cores, and the power regulator is also connected to the M temperature sensors. The temperature sensor connected to any processor core is used to send the temperature of the connected processor core to the power regulator. The power regulator is also used to determine, before acquiring the current power consumption of the first voltage domain in the processor, that the highest temperature of the M processor cores is greater than a preset temperature threshold.

8. The processor as described in claim 5 or 6, characterized in that, The power consumption regulator is specifically used to determine the target frequency and target voltage of the M processor cores by referring to the reference power consumption of the first voltage domain at each corresponding frequency and voltage, generate a frequency modulation command based on the target frequency and send it to the frequency modulation actuator, and generate a voltage regulation command based on the target voltage and send it to the voltage regulation actuator. The frequency modulation actuator is used to adjust the frequency of the M processor cores to the target frequency according to the frequency modulation instruction; The voltage regulator actuator is used to adjust the voltage of the M processor cores to the target voltage according to the voltage regulation command.

9. The processor as described in claim 5 or 6, characterized in that, The processor also includes M frequency modulation actuators connected to the M processor cores, and voltage regulation actuators connected to the M processor cores respectively. The power regulator is also connected to the M frequency modulation actuators and the voltage regulation actuators. The power consumption regulator is specifically used to determine the target frequency and target voltage of the M processor cores by referring to the reference power consumption of the first voltage domain at each corresponding frequency and voltage, generate a frequency modulation command based on the target frequency and send it to the M frequency modulation actuators, and generate a voltage regulation command based on the target voltage and send it to the voltage regulation actuators. The frequency modulation actuator connected to any processor core is used to adjust the frequency of the connected processor core to the target frequency according to the frequency modulation command; The voltage regulator actuator is used to adjust the voltage of the M processor cores to the target voltage according to the voltage regulation command.

10. The processor as described in claim 5 or 6, characterized in that, The power consumption regulator is specifically used for: Determine the budgeted power consumption of the first voltage domain; Obtain the maximum reference power consumption that is not greater than the budgeted power consumption from each reference power consumption; Adjust the frequency and voltage of each processor core located in the first voltage domain according to the frequency and voltage corresponding to the maximum reference power consumption.

11. The processor as claimed in claim 10, characterized in that, The power consumption regulator is also used for: If all the reference power consumptions are greater than the budget power consumption, then the minimum reference power consumption is obtained from the reference power consumptions, and the frequency and voltage of each processor core located in the first voltage domain are adjusted according to the frequency and voltage corresponding to the minimum reference power consumption.

12. An electronic device, characterized in that, The device includes a processor coupled to a memory, the processor being configured to execute a computer program stored in the memory to cause the electronic device to perform the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method and apparatus for adjusting the voltage and frequency to minimize power dissipation in a multiprocessor system

    CN1739080A

  • Method of performing dynamic voltage and frequency scaling based on power step

    US20210081027A1