A power consumption control method and apparatus

By acquiring the voltage domain temperature in the processor and dynamically adjusting the power consumption threshold to match the current temperature and load, the problem of insufficient flexibility and accuracy of overclocking adjustment strategies in existing technologies is solved, achieving more efficient overclocking performance.

CN116391162BActive Publication Date: 2026-01-16HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202080106862.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-10
Publication Date
2026-01-16
Estimated Expiration
2040-11-10

AI Technical Summary

Technical Problem

Existing technologies, when processors are overclocked, rely on power consumption adjustment strategies based on fixed power consumption thresholds. This results in insufficient flexibility and accuracy in overclocking adjustments, making it unsuitable for different scenarios and failing to effectively combine the interplay between temperature and power consumption.

Method used

By acquiring the voltage domain temperature in the processor, the power consumption threshold is dynamically adjusted to match the current temperature and load. The overall adjustment is based on a combination of temperature and power consumption, avoiding direct triggering of temperature regulation strategies and maintaining overclocking status.

Benefits of technology

It improves the flexibility and accuracy of overclocking adjustments, extends the duration of the processor in overclocked state, and enhances the processor's overclocking performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116391162B_ABST
    Figure CN116391162B_ABST
Patent Text Reader

Abstract

A power consumption control method and device are used to improve the flexibility and accuracy of frequency adjustment. The method comprises the following steps: a power consumption controller acquires the temperature of a first voltage domain in a processor, determines the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain, and adjusts the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain. This method can make the power consumption threshold of the first voltage domain match the current temperature, and the adjustment of the power consumption based on the power consumption threshold actually takes into account the dual influence of power consumption and temperature. Therefore, this method can not only improve the accuracy of frequency adjustment, but also make the power consumption threshold of the first voltage domain change flexibly with the temperature, thereby helping to improve the flexibility of frequency adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of processors, and particularly relates to a power consumption control method and device. BACKGROUND

[0002] When an electronic device is shipped, the components (for example, processor cores) in the electronic device are usually defined with some standard working ranges, such as a rated working frequency, a rated working voltage, and the like. Normally, the processor cores perform processing operations according to the rated working frequency. However, when the processor cores have an overclocking function, if the rated working frequency does not meet the requirements of the current working scenario of the processor cores, the frequency of the processor cores can be increased to above the rated working frequency to improve the processing performance of the processor cores.

[0003] However, when the processor cores are in an overclocking state, the processor cores can run in a high-frequency and high-voltage state for a long time, which can cause the processor cores to overheat or overcurrent, and the like. To solve this problem, the prior art sets a power consumption adjustment strategy in the overclocking state, in which: if the power consumption of the processor cores exceeds a pre-set power consumption threshold, the power consumption of the processor cores is reduced to alleviate the high-frequency and high-voltage state of the processor cores, or the overclocking state of the processor cores is ended. Although this way can avoid the processor cores from overheating or overcurrent, and the like, it adjusts the power consumption based on a fixed power consumption threshold, which not only reduces the flexibility of the overclocking adjustment, but also makes the accuracy of the overclocking adjustment dependent on the set power consumption threshold, which can cause the overclocking adjustment to deviate. SUMMARY

[0004] The present application provides a power consumption control method and device to improve the flexibility and accuracy of the overclocking adjustment.

[0005] In a first aspect, the present application provides a power consumption control method, which is applicable to a power consumption controller, and includes the following steps: the power consumption controller acquires a temperature of a first voltage domain in a processor, determines a power consumption threshold of the first voltage domain according to the temperature of the first voltage domain, and adjusts the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain. When the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain, the power consumption controller can reduce the power consumption of the first voltage domain. In the above design, the power consumption threshold of the first voltage domain is adjusted by combining the temperature of the first voltage domain, so that the power consumption threshold of the first voltage domain can be matched with the current temperature. The adjustment of the power consumption based on the power consumption threshold actually takes into account the dual influence of the power consumption and the temperature, which not only improves the accuracy of the overclocking adjustment, but also enables the power consumption threshold of the first voltage domain to change flexibly with the temperature, thereby helping to improve the flexibility of the overclocking adjustment. Furthermore, compared with a single temperature adjustment strategy or a power consumption adjustment strategy, based on the above method, the power consumption adjustment strategy can be used to maintain the overclocking state of each processor core in the voltage domain by slowly adjusting the power consumption, without directly triggering the temperature adjustment strategy to avoid directly exiting the overclocking state, thereby improving the overclocking performance of the processor.

[0006] In an optional design, the power consumption controller adjusts the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain, including: if the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain, the power consumption controller can reduce the power consumption of the first voltage domain. This method can reduce the power consumption of the first voltage domain in time when the power consumption of the first voltage domain is high, thereby helping to avoid the overcurrent or overheating phenomenon caused by the excessively high power consumption of the first voltage domain.

[0007] In an optional design, the power consumption controller acquires the temperature of the first voltage domain in the processor, including: the power consumption controller first determines each target processor core in the first voltage domain from each processor core of the processor, then acquires the temperature corresponding to each target processor core, and finally takes the highest temperature among the temperatures corresponding to each target processor core as the temperature of the first voltage domain. This design actually adjusts the overall power consumption of the first voltage domain based on the power consumption of the processor core with the highest temperature in the first voltage domain. As long as the processor core with the highest temperature does not appear the overcurrent or overheating phenomenon, the other processor cores in the first voltage domain are also less likely to appear the overcurrent or overheating phenomenon. Therefore, this method can not only adjust the power consumption of the first voltage domain in time, but also has a good adjustment effect.

[0008] In an alternative design, the power consumption controller determines the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain, including: the power consumption controller first determines a target temperature interval in which the temperature of the first voltage domain is located, and then determines the power consumption threshold corresponding to the target temperature interval as the power consumption threshold of the first voltage domain. The target temperature interval can be any of at least two temperature intervals, and each of the at least two temperature intervals can correspond to a power consumption threshold. For any of the at least two temperature intervals, the higher the temperature in the temperature interval, the smaller the power consumption threshold corresponding to the temperature interval. This design reduces the power consumption threshold when the temperature is high, which actually reduces the condition for triggering the power consumption adjustment strategy. This way, the first voltage domain can continue to maintain the overclocking state by slowly reducing power consumption, and the possibility of exiting the overclocking state due to the temperature adjustment strategy is reduced, so this way can maintain each processor core in the first voltage domain in the overclocking state for a long time, which helps to improve the overclocking performance of the processor.

[0009] In an alternative design, the power consumption controller determines the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain, including: the power consumption controller first determines a target temperature interval in which the temperature of the first voltage domain is located, and then determines the power consumption threshold corresponding to the target temperature interval as the power consumption threshold of the first voltage domain. The target temperature interval can be any of at least two temperature intervals, and each of the at least two temperature intervals can correspond to a power consumption threshold. For any of the at least two temperature intervals, the higher the temperature in the temperature interval, the smaller the power consumption threshold corresponding to the temperature interval. This design reduces the power consumption threshold when the temperature is high, which actually reduces the condition for triggering the power consumption adjustment strategy. This way, the first voltage domain can continue to maintain the overclocking state by slowly reducing power consumption, and the possibility of exiting the overclocking state due to the temperature adjustment strategy is reduced, so this way can maintain each processor core in the first voltage domain in the overclocking state for a long time, which helps to improve the overclocking performance of the processor.

[0010] In an alternative design, the adjustment coefficients corresponding to the at least two temperature intervals decrease as the temperature in the temperature interval increases. This design reduces the power consumption threshold as the temperature increases when the load remains unchanged, which helps to maintain the overclocking state of the processor core as much as possible by slowly reducing power consumption, so as to improve the overclocking performance of the processor.

[0011] In a second aspect, the present application provides a power consumption controller, including a monitoring circuit and a processing circuit, the monitoring circuit is used to obtain the temperature of a first voltage domain in a processor, and the processing circuit is used to determine the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain, and adjust the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain.

[0012] In an alternative design, the processing circuitry is specifically configured to: reduce the power consumption of the first voltage domain when the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain.

[0013] In an alternative design, the monitoring circuitry is specifically configured to: first determine target processor cores in the first voltage domain from the processor cores of the processor, and then obtain temperatures corresponding to the target processor cores respectively, and then take the highest temperature among the temperatures corresponding to the target processor cores respectively as the temperature of the first voltage domain.

[0014] In an alternative design, the processing circuitry is specifically configured to: first determine a target temperature interval in which the temperature of the first voltage domain is located, and then determine the power consumption threshold of the first voltage domain as the power consumption threshold corresponding to the target temperature interval. The target temperature interval can be any one of at least two temperature intervals, and each of the at least two temperature intervals can correspond to a power consumption threshold. For any one of the at least two temperature intervals, the higher the temperature in the temperature interval, the smaller the power consumption threshold corresponding to the temperature interval.

[0015] In an alternative design, the processing circuitry is specifically configured to: first determine a target temperature interval in which the temperature of the first voltage domain is located, and then calculate the power consumption threshold of the first voltage domain according to the allocated power consumption of the first voltage domain and an adjustment coefficient corresponding to the target temperature interval. The allocated power consumption of the first voltage domain is the power consumption allocated to the first voltage domain in advance according to the load of the first voltage domain and the total load of the processor. The target temperature interval can be any one of at least two temperature intervals, and each of the at least two temperature intervals can correspond to an adjustment coefficient.

[0016] In an alternative design, the adjustment coefficients corresponding to the at least two temperature intervals can decrease as the temperature in the temperature interval increases.

[0017] In a third aspect, the present application provides a power consumption controller, comprising: an obtaining unit configured to obtain a temperature of a first voltage domain in a processor; a determining unit configured to determine a power consumption threshold of the first voltage domain according to the temperature of the first voltage domain; and an adjusting unit configured to adjust the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain.

[0018] In an alternative design, the adjusting unit is specifically configured to: reduce the power consumption of the first voltage domain when the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain.

[0019] In an alternative design, the obtaining unit is specifically configured to: first determine target processor cores in the first voltage domain from the processor cores of the processor; then obtain temperatures corresponding to the target processor cores respectively; and finally determine the highest temperature among the temperatures corresponding to the target processor cores as the temperature of the first voltage domain.

[0020] In an alternative design, the determining unit is specifically configured to: first determine a target temperature interval in which the temperature of the first voltage domain is located; and then determine the power consumption threshold corresponding to the target temperature interval as the power consumption threshold of the first voltage domain. The target temperature interval can be any one of at least two temperature intervals, and each of the at least two temperature intervals can correspond to a power consumption threshold. For any one of the at least two temperature intervals, the higher the temperature in the temperature interval, the smaller the power consumption threshold corresponding to the temperature interval.

[0021] In an alternative design, the determining unit is specifically configured to: first determine a target temperature interval in which the temperature of the first voltage domain is located; and then calculate the power consumption threshold of the first voltage domain according to the allocated power consumption of the first voltage domain and an adjustment coefficient corresponding to the target temperature interval. The allocated power consumption of the first voltage domain is the power consumption allocated to the first voltage domain in advance according to the load of the first voltage domain and the total load of the processor. The target temperature interval can be any one of at least two temperature intervals, and each of the at least two temperature intervals can correspond to an adjustment coefficient.

[0022] In an alternative design, the adjustment coefficients corresponding to the at least two temperature intervals decrease as the temperature in the temperature interval increases.

[0023] In a fourth aspect, the present application provides a processor, which can include a temperature sensor and a power consumption controller. The temperature sensor is arranged in a first voltage domain of the processor. The power consumption controller can obtain the temperature of the first voltage domain from the temperature sensor, then determine the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain, and finally adjust the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain.

[0024] In an alternative design, the processor can further include at least one processor core and at least one temperature sensor, and the at least one temperature sensor is connected to the at least one processor core respectively. In this case, the temperature sensor connected to any one of the processor cores can obtain the temperature of the processor core and send it to the power consumption controller. The power consumption controller can determine target processor cores in the first voltage domain from the at least one processor core, and then determine the highest temperature among the temperatures corresponding to the target processor cores as the temperature of the first voltage domain.

[0025] In an alternative design, the processor can further include at least one processor core and at least one power consumption regulator, and the at least one power consumption regulator is connected to the at least one processor core respectively. In this case, the power consumption controller can generate the power consumption control instruction and send it to the power consumption regulator connected to each target processor core in the first voltage domain when the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain, and the power consumption regulator connected to any target processor core can reduce the power consumption of the target processor core according to the power consumption control instruction.

[0026] In an alternative design, the power consumption regulator is specifically configured to reduce the frequency of the target processor core according to the power consumption control instruction.

[0027] In an alternative design, the power consumption controller is specifically configured to first determine a target temperature interval in which the temperature of the first voltage domain is located, and then determine the power consumption threshold of the first voltage domain as the power consumption threshold corresponding to the target temperature interval. The target temperature interval can be any of at least two temperature intervals, and each of the at least two temperature intervals can correspond to a power consumption threshold. For any of the at least two temperature intervals, the higher the temperature in the temperature interval, the smaller the power consumption threshold corresponding to the temperature interval.

[0028] In an alternative design, the power consumption controller is specifically configured to first determine a target temperature interval in which the temperature of the first voltage domain is located, and then calculate the power consumption threshold of the first voltage domain using the allocated power consumption of the first voltage domain and the adjustment coefficient corresponding to the target temperature interval. The allocated power consumption of the first voltage domain is the power consumption allocated to the first voltage domain in advance according to the load of the first voltage domain and the total load of the processor. The target temperature interval can be any of at least two temperature intervals, and each of the at least two temperature intervals can correspond to an adjustment coefficient.

[0029] In an alternative design, the processor can further include at least one processor core and at least one power consumption sensor, and the at least one power consumption sensor is connected to the at least one processor core respectively. In this case, the power consumption sensor connected to each processor core can obtain the power consumption of the processor core and send it to the power consumption controller, and the power consumption controller can further determine the load of each processor core according to the power consumption of each processor core and the temperature of each processor core, calculate the load of the first voltage domain according to the load of each processor core in the first voltage domain, and then calculate the total load of the processor according to the load of each processor core included in the processor, and then allocate the power consumption of the processor using the load of the first voltage domain and the total load of the processor to determine the allocated power consumption of the first voltage domain.

[0030] In an alternative design, the adjustment coefficients corresponding to the at least two temperature intervals can decrease as the temperature in the temperature intervals increases.

[0031] In a fifth aspect, the present application provides an electronic device, comprising a processor, which can be coupled with a memory, and the processor can execute a computer program stored in the memory to make the electronic device execute the method according to any one of the first aspect.

[0032] The beneficial effects corresponding to any one of the second aspect to the fifth aspect of the present application can refer to the beneficial effects of any one of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0033] Figure 1 An exemplary structure diagram of a processor provided by the embodiments of the present application is shown;

[0034] Figure 2 An exemplary flow diagram of a power consumption control method provided by the embodiments of the present application is shown;

[0035] Figure 3 An exemplary flow diagram of a power consumption control method provided by the embodiments of the present application is shown;

[0036] Figure 4 An exemplary diagram of the correspondence between each temperature interval and each adjustment coefficient provided by the embodiments of the present application is shown;

[0037] Figure 5 An exemplary diagram of a power consumption adjustment strategy provided by the embodiments of the present application is shown;

[0038] Figure 6 An exemplary structure diagram of a power consumption controller provided by the embodiments of the present application is shown;

[0039] Figure 7 An exemplary structure diagram of another power consumption controller provided by the embodiments of the present application is shown. DETAILED DESCRIPTION

[0040] The various embodiments disclosed in the present application can be applied to electronic devices with super frequency function. In some embodiments of the present application, the electronic device can be a computer device with a processor (such as a central processing unit (CPU)), for example, a desktop computer. It should also be understood that in some other embodiments of the present application, the electronic device can also be a portable electronic device with a processor, such as a mobile phone, a tablet computer, a wearable device with wireless communication function (such as a smart watch), a vehicle-mounted device, etc. Exemplary embodiments of the portable electronic device include but are not limited to mobile phones, tablet computers, smart watches, etc. equipped with a processor (such as a CPU) and a memory (such as a random access memory (RAM) and a read-only memory (ROM)). or other operating systems.

[0041] When a processor in an electronic device has an overclocking function, if the power consumption margin of the processor meets an overclocking starting condition, the processor can operate at a frequency higher than a frequency specified by a manufacturer to increase the processing performance of the processor. However, as the frequency of the processor increases, the power consumption of the processor also increases, and the increased power consumption is in the form of thermal energy, which causes the temperature of the processor to increase. When the heat dissipation capacity of the processor cannot cool the processor in time, the excessively high temperature affects the service life and reliability of the processor.

[0042] To reduce the impact of the overclocking state on the service life and reliability of the processor, a corresponding overclocking adjustment strategy is usually also needed. There are currently two kinds of overclocking adjustment strategies: one is a temperature adjustment strategy, which corresponds to at least one temperature waterline. These temperature waterlines can be pre-set according to the rated temperature of the processor or the bearable temperature of each component in the processor. When the temperature of the processor exceeds a certain temperature waterline, the processor will be downclocked or directly exit the overclocking state to avoid damage to the components in the processor due to excessively high temperature. The other is a power consumption adjustment strategy, which corresponds to at least one power consumption waterline (i.e., a power consumption threshold). These power consumption waterlines can be pre-set according to the rated power consumption of the processor or the bearable power consumption of each component in the processor. When the power consumption of the processor exceeds a certain power consumption waterline, the processor will reduce power consumption or directly exit the overclocking state. However, these two kinds of overclocking adjustment strategies have the following problems: first, the waterlines involved in these two kinds of overclocking adjustment strategies (such as the temperature waterlines or the power consumption waterlines) are all pre-set fixed values. The overclocking adjustment based on fixed waterlines is neither flexible nor accurate, and cannot be used as a general adjustment method in different scenarios. Second, these two kinds of overclocking adjustment strategies are executed independently and do not interfere with each other. However, the work done by the processor is actually also converted into heat dissipation, and the temperature change of the processor directly affects the dynamic power consumption or static power consumption of the processor. This separate adjustment method does not take into account the linkage between temperature and power consumption, and it is difficult to improve the overclocking performance of the processor when the processor is overclocked.

[0043] Therefore, the present application provides a power consumption control method to comprehensively realize overclocking adjustment by combining temperature and power consumption, so as to improve the flexibility and accuracy of overclocking adjustment and improve the overclocking performance of the processor.

[0044] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments.

[0045] The terms "system" and "network" in the embodiments of this application are used interchangeably. "At least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0046] Furthermore, unless otherwise specified, the ordinal numbers such as "first" and "second" mentioned in the embodiments of this application are used to distinguish multiple objects and are not used to limit the priority or importance of multiple objects. For example, "first power consumption threshold" and "second power consumption threshold" are only used to distinguish different power consumption thresholds, and do not indicate that the two power consumption thresholds have different priorities or importance.

[0047] 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. 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.

[0048] It should be understood that the processor 100 described above can be one chip. For example, the processor 100 can be a field programmable gate array (FPGA), can be an application specific integrated circuit (ASIC), can be a system on chip (SoC), can be a central processor unit (CPU), can be a network processor (NP), can be a digital signal processor (DSP), can be a micro controller unit (MCU), can be a programmable logic device (PLD) or other integrated chip. It should be noted that the processor 100 in the embodiments of the present application can also be an integrated circuit chip with a signal processing capability. For example, the processor 100 described above can be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The general purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0049] It is to be understood that the memory (e.g., internal memory and external cache) in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a 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 SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory of the method described herein is intended to include, but not be limited to, these and any other suitable types of memory.

[0050] With continued reference to Figure 1 As shown, in the embodiments of the present application, each processor core (e.g., processor core 10 to processor core 13) in the processor 100 can be located in the same voltage domain, or can be located in different voltage domains, or part of the processor cores can be located in the same voltage domain, and the specific limitation is not made. One or more processor cores located in the same voltage domain can have the same working voltage. For example, assuming that there are voltage domain 1, voltage domain 2 and voltage domain 3 in the processor 100, the processor core 10 is located in the voltage domain 1, the processor core 11 and the processor core 12 are located in the voltage domain 2, and the processor core 13 is located in the voltage domain 3, then the processor core 10 has a first voltage, the processor core 11 and the processor core 12 have a second voltage, and the processor core 13 has a third voltage. The first voltage, the second voltage and the third voltage can be the same or different, and the specific limitation is not made.

[0051] With continued reference to Figure 1As shown, in the embodiment of the present application, the processor can further include a power consumption controller 14, and each processor core can be further provided with a frequency regulator, and the power consumption controller 14 can be in communication connection with the frequency regulator in each processor core. In this way, when a certain processor core is subjected to overclocking adjustment, the power consumption controller 14 can send a frequency control instruction to the frequency regulator of the processor core, so that the frequency regulator of the processor core adjusts the frequency of the processor core according to the frequency control instruction, for example, adjusts to a frequency greater than the maximum frequency set by the manufacturer to make the processor core enter an overclocking state, or adjusts to a frequency lower than the frequency corresponding to the overclocking state to exit the overclocking state. It should be understood that, Figure 1 Only an exemplary description is given, and in other possible examples, the frequency regulator can also be provided in one or several processor cores, in which case the power consumption controller 14 can only control the frequency of the processor core provided with the frequency regulator. Alternatively, the frequency regulator can also be provided in one or more voltage domains, in which case the power consumption controller 14 can control the frequency of the processor core in each voltage domain provided with the frequency regulator. Alternatively, the frequency regulator can also be provided in non-core components, in which case the power consumption controller 14 can not only control the frequency of the processor core, but also control the frequency of the non-core component. Of course, the non-core component referred to here refers to a component that works at a set frequency.

[0052] It should be noted that the power consumption control in the present application can not only include controlling the frequency of the processor core in the overclocking state, but also include controlling the voltage of the processor core in the overclocking state, or other parameters that can affect the overclocking state, such as current, etc., which are not limited in the present application. Exemplarily, when the power consumption control further includes controlling the voltage of the processor core, the power consumption controller 14 can also be connected with the voltage conversion circuit corresponding to each voltage domain, which can be a Buck circuit or a switched capacitor (SC) circuit, and of course can also be other circuits that can realize the function of voltage reduction. The power consumption controller 14 can reduce the working voltage of each processor core in a certain voltage domain by increasing the voltage reduction ratio of the voltage conversion circuit corresponding to the voltage domain, so as to reduce the power consumption of each processor core in the voltage domain, or can increase the working voltage of each processor core in a certain voltage domain by reducing the voltage reduction ratio of the voltage conversion circuit corresponding to the voltage domain, so as to improve the overclocking performance. It should be understood that, Figure 1 The frequency regulator shown can also be replaced by other components that can realize the function of power consumption adjustment, such as a voltage regulator or a current regulator, which can also be collectively referred to as a power consumption regulator, which is not limited in the present application.

[0053] The power consumption control method provided by the embodiment of the present application is exemplarily introduced below by taking the control of the power consumption of each processor core in a voltage domain (assuming the first voltage domain) as an example, and the control of the power consumption of each processor core in other voltage domains or the power consumption of non-processor cores will not be repeated here.

[0054] Figure 2 An exemplary flow diagram corresponding to the power consumption control method provided by the embodiment of the present application is shown in the figure, which is applicable to a power consumption controller, for example Figure 1 the power consumption controller 14 shown in the figure. In the embodiment of the present application, the power consumption controller can execute the following power consumption control method in a periodic manner, Figure 2 An exemplary power consumption control process of the power consumption controller is introduced, for example Figure 2 The method comprises the following steps:

[0055] In step 201, the power consumption controller obtains the temperature of the first voltage domain.

[0056] In step 201, the temperature of the first voltage domain can refer to the temperature of any processor core in the first voltage domain, the average temperature of each processor core in the first voltage domain, or the highest temperature of each processor core in the first voltage domain, which is not limited in particular.

[0057] In an alternative embodiment, when the temperature of the first voltage domain is the highest temperature of each processor core in the first voltage domain, the power consumption controller can first determine each target processor core belonging to the first voltage domain from each processor core of the processor, then obtain the temperature corresponding to each target processor core respectively, and then take the highest temperature among the temperatures corresponding to each target processor core respectively as the temperature of the first voltage domain. This way can only perform targeted temperature acquisition operation on the processor cores in the voltage domain whose power consumption needs to be adjusted, and can not need to obtain the temperature of all processor cores, thereby being more helpful to save resources.

[0058] In step 202, the power consumption controller determines the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain.

[0059] In the embodiments of the present application, when the temperature and power consumption are combined to adjust the frequency, if the temperature threshold corresponding to the temperature adjustment strategy is unchanged, the higher the power consumption threshold (i.e., the power consumption threshold corresponding to the power consumption adjustment strategy) is set, the less likely the power consumption of the processor core reaches the power consumption threshold, and thus the higher the power consumption of the processor core in the frequency state is. The higher power consumption corresponds to a higher temperature, and thus the processor core is more likely to trigger the temperature threshold corresponding to the temperature adjustment strategy, resulting in the processor core being downclocked or directly exiting the frequency state. Based on this, in order to avoid triggering the temperature adjustment strategy as much as possible, in an optional implementation, when the temperature of the first voltage domain is higher, the power consumption controller can set the power consumption threshold of the first voltage domain to be lower. In this way, the power consumption of the first voltage domain is more likely to trigger the power consumption threshold, and thus the processor core in the first voltage domain is more likely to execute the power consumption adjustment strategy to reduce the power consumption. After the power consumption is reduced, the corresponding temperature is also reduced, and thus the temperature of the first voltage domain is less likely to trigger the temperature threshold corresponding to the temperature adjustment strategy, and the processor core in the first voltage domain is less likely to trigger the temperature adjustment strategy. Furthermore, the power consumption adjustment strategy generally adjusts the power consumption in a step-by-step manner (for example, first reducing a small amount of power consumption, and determining whether the reduced power consumption still exceeds the power consumption threshold. If not, the power consumption is not reduced any more. If yes, the power consumption is continuously reduced), and will not directly exit the frequency state. Therefore, by reducing the power consumption threshold when the temperature is high, the condition for triggering the power consumption adjustment strategy is actually reduced. In this way, the first voltage domain can continue to maintain the frequency state by slowly reducing the power consumption, and the possibility of exiting the frequency state due to triggering the temperature adjustment strategy is reduced. Therefore, this method can make the processor cores in the first voltage domain maintain the frequency state for a long time, and helps to improve the frequency performance of the processor.

[0060] In the above embodiments, there are many possible implementations of how to reduce the power consumption threshold of the first voltage domain as the temperature of the first voltage domain increases. For example, in one possible implementation, a certain linear relationship can be set between the temperature increase value of the first voltage domain and the reduction value of the power consumption threshold of the first voltage domain, in which case, the power consumption threshold of the first voltage domain can be reduced by several watts corresponding to the linear relationship for each several degrees of temperature increase of the first voltage domain. For another example, in another possible implementation, several temperature increase value intervals and the power consumption thresholds corresponding to the several temperature increase value intervals can also be set in advance, and when the temperature increase value of the first voltage domain compared to the temperature of the previous period is in a certain temperature increase value interval, the power consumption threshold of the first voltage domain can be set to the power consumption threshold corresponding to the temperature increase value interval. In yet another possible implementation, several temperature intervals and the power consumption thresholds corresponding to the several temperature intervals can also be set in advance, and when the temperature of the first voltage domain is in a certain temperature interval, the power consumption threshold of the first voltage domain can be set to the power consumption threshold corresponding to the temperature interval. There are many possible implementations, which will not be described one by one here.

[0061] In step 203, the power consumption controller adjusts the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain.

[0062] In the embodiments of the present application, the power consumption threshold of the first voltage domain is used to limit the power consumption of the first voltage domain. When the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain, it means that the current power consumption of the first voltage domain is too high, and if the power consumption of the first voltage domain is not reduced, the first voltage domain is likely to overheat or overcurrent. Therefore, in order to avoid such phenomenon, the power consumption controller needs to reduce the power consumption of the first voltage domain when the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain. There are many ways to reduce the power consumption of the first voltage domain, for example, in one case, still referring to the above embodiment, the power consumption of the first voltage domain can be reduced by reducing the operating frequency of the first voltage domain. Figure 1As shown, the power consumption controller can generate a frequency reduction control instruction and send it to the frequency controllers connected to the processor cores in the first voltage domain, so that the frequency controllers reduce the frequency of the processor cores in the first voltage domain according to the frequency reduction control instruction, in this way, the power consumption can be reduced by reducing the frequency. For example, in another case, considering that the processor cores may be in a high-voltage low-frequency state after reducing the frequency, resulting in low power utilization of the processor cores, therefore, the power consumption controller can also reduce the frequency of the processor cores in the first voltage domain and the operating voltage of the first voltage domain synchronously, so that the processor cores are in a low-voltage low-frequency state, and the power utilization of the processor cores is improved. As for how much operating voltage and how much frequency the processor cores are adjusted to, the power consumption controller can refer to the preset corresponding relationship between the frequency and the operating voltage to determine, and the preset corresponding relationship can be pre-packaged in the power consumption controller by the person skilled in the art, and the preset corresponding relationship corresponding to each processor core can be the same or different.

[0063] For example, when the power consumption of the first voltage domain is much smaller than the power consumption threshold of the first voltage domain, there is more power consumption margin in the first voltage domain that is not utilized. In this case, the power consumption controller can also increase the power consumption of the first voltage domain to improve the operating performance of the first voltage domain. For example, the power consumption controller can send a frequency increase control instruction to the frequency controllers connected to the processor cores in the first voltage domain to increase the frequency of the processor cores in the first voltage domain, and considering that the high-frequency state of the processor cores may require high voltage to drive, the power consumption controller can also send a voltage increase control instruction to the voltage conversion circuit corresponding to the first voltage domain to increase the operating voltage of the first voltage domain.

[0064] In the embodiments of the present application, if multiple processor cores are located in the same voltage domain, the operating voltage of the voltage domain is actually the operating voltage corresponding to the processor core with the highest frequency. In this case, the operating voltage of the other processor cores in the voltage domain is the same as that of the processor core with the highest frequency, but the frequency of the other processor cores may be lower than that of the processor core with the highest frequency, which will cause the other processor cores to be in a high-voltage low-frequency state, and the power utilization of the other processor cores is low. In order to avoid this phenomenon, the present application can set each processor core in a voltage domain, so that the operating voltage of each processor core can correspond to the respective frequency, so that the power utilization of each processor core is high.

[0065] In the foregoing embodiments of the present application, by adjusting the power consumption threshold of the voltage domain in combination with the temperature of the voltage domain, the power consumption threshold of the voltage domain can be matched with the current temperature, and the adjustment of the power consumption based on the power consumption threshold actually takes into account the dual influence of the power consumption and the temperature, which not only can improve the accuracy of the overclocking adjustment, but also can make the power consumption threshold of the voltage domain change flexibly with the temperature, thereby also helping to improve the flexibility of the overclocking adjustment. Furthermore, compared with a single temperature adjustment strategy or a power consumption adjustment strategy, based on the manner, the power consumption adjustment strategy can be used as much as possible to maintain the overclocking state of each processor core in the voltage domain by slowly adjusting the power consumption, without directly triggering the temperature adjustment strategy to avoid directly exiting the overclocking state, thereby also improving the overclocking performance of the processor.

[0066] The power consumption control method in the embodiments of the present application will be introduced below with a specific embodiment. In this example, it is assumed that the power consumption controller implements power consumption control by controlling the frequency.

[0067] Figure 3 The specific flowchart of the power consumption control method provided by the embodiments of the present application is exemplarily shown in FIG. 4, as shown in the figure, the method is applicable to a power consumption controller, for example, the power consumption controller 14 as shown in FIG. 3. Figure 3 Figure 1 The power consumption controller 14 as shown in FIG. 3. Figure 3 The power consumption control process of the power consumption controller is exemplarily introduced, as shown in FIG. 5, the method comprises the following steps. Figure 3

[0068] In step 301, the power consumption controller acquires the temperature of each processor core.

[0069] In the embodiments of the present application, the power consumption controller can acquire the temperature of each processor core in multiple ways, and several optional implementation manners are exemplarily introduced below.

[0070] In an optional implementation manner, still referring to FIG. 3, in step 301, the power consumption controller 14 acquires the temperature of each processor core in the voltage domain. Figure 1 ​​As shown, each processor core can also be equipped with a temperature sensor, such as a temperature sensor, which is connected to the power controller via a communication line. Each temperature sensor in each processor core can sample the temperature of its respective processor core according to a first preset period and send the sampled temperature to the power controller via the communication line between the temperature sensor and the power controller. The first preset period can be set by those skilled in the art based on experience. For example, to improve the accuracy of the sampled temperature, the first preset period can be set to 100µm. In this way, each temperature sensor can sample the temperature of its respective processor core every 100µm and send it to the power controller. Using this implementation, the power controller can directly obtain the temperature of each processor core through measurement. Although this method requires temperature sensors to be installed in the processor core, the measured temperature is more accurate, which helps improve the accuracy of power consumption regulation.

[0071] In another alternative implementation, such as Figure 1 As shown, each processor core can also be equipped with a power sensor, which is connected to the power controller via a communication line. The power sensor in each processor core can sample the number of toggles of each signal in the processor core according to a second predetermined period. Then, based on the number of toggles of each signal and the power consumption corresponding to one toggle, the power consumption of each signal within a second predetermined period is determined. The total power consumption of the processor core within a second predetermined period is calculated based on the power consumption of each signal within that period, and then this total power consumption is sent to the power controller via the communication line between the power sensor and the power controller. In this case, the power controller can also determine the temperature corresponding to the total power consumption of the processor core based on a preset power consumption-temperature correlation, and use this temperature as the temperature of the processor core. Using this implementation method, the power controller can obtain the temperature of each processor core through indirect calculation. Although the indirect calculation method is not as accurate as the measurement method, this method eliminates the need to install temperature sensors in the processor core, helping to save space and design costs. It is understandable that "indirectly obtaining the processor core temperature through a power sensor" is only one possible implementation method. In other possible implementation methods, the power controller can also obtain the processor core temperature through other indirect means, such as predicting the processor core temperature through the processor core temperature at various historical moments, etc., which will not be discussed in detail here.

[0072] In yet another alternative implementation, temperature sensors can be provided in a portion of the processor cores, and power consumption sensors can be provided in another portion of the processor cores, so that the temperatures of the processor cores in the first portion can be measured in real time by the temperature sensors, and the temperatures of the processor cores in the second portion can be calculated indirectly by the power consumption measured by the power consumption sensors. In this implementation, the number of processor cores provided with temperature sensors and the number of processor cores provided with power consumption sensors can be determined by those skilled in the art according to experience, which is not limited in the present application.

[0073] In the embodiments of the present application, the provision of temperature sensors or power consumption sensors in each processor core to determine the temperature of each processor core is only an alternative implementation, and in other alternative implementations, shared temperature sensors or shared power consumption sensors can be provided in two or more processor cores. In this case, since the temperature value sampled by the temperature sensor can be the temperature value of a certain point in the two or more processor cores, the power consumption controller can subsequently compensate for the temperature sampled by the temperature sensor according to a certain strategy to obtain the temperature of each processor core. Alternatively, since the power consumption value sampled by the power consumption sensor is the total power consumption of the two or more processor cores, the power consumption controller can subsequently distribute the power consumption sampled by the power consumption sensor according to a certain proportion to obtain the power consumption of each processor core. The specific strategy or proportion used can be determined by those skilled in the art according to experience, which is not described herein.

[0074] In step 302, the power consumption controller selects the processor cores in the first voltage domain from the processor cores, and takes the highest temperature among the temperatures corresponding to the processor cores in the first voltage domain as the temperature of the first voltage domain.

[0075] In step 302 described above, the first voltage domain can be any voltage domain in which a processor core included in the processor is located. The scheme in the present application can only adjust the power consumption of the voltage domain in which a certain processor core is located, can adjust the power consumption of the voltage domain in which a portion of the processor cores is located, or can adjust the power consumption of the voltage domains in which all the processor cores are located respectively, which is not limited in detail.

[0076] For example, after determining the processor cores in the first voltage domain, the power consumption controller can sort the temperatures of these processor cores in descending order, and then take the temperature at the head of the obtained sorting as the temperature of the first voltage domain. Alternatively, the power consumption controller can sort the temperatures of these processor cores in ascending order, and then take the temperature at the tail of the obtained sorting as the temperature of the first voltage domain.

[0077] At step 303, the power consumption controller allocates the power consumption of the processor according to the load of each processor core and the load of each processor core in the first voltage domain, to obtain the allocated power consumption of the first voltage domain.

[0078] In an optional implementation, the load of any processor core can be determined according to the power consumption, frequency and voltage of the processor core. In this implementation, a voltage sampler can also be arranged in each processor core, which can sample the voltage of the processor core at a second set period and report to the power consumption controller. In this case, in each second set period, the power consumption controller can obtain the voltage of the processor core through the voltage sampler, the power consumption of the processor core through the power consumption sensor, and the frequency of the processor core through the frequency regulator. Then, the power consumption controller can calculate the load of the processor core according to the following formula (1.1):

[0079] A = P / (f*V 2 ) ………(1.1)

[0080] Wherein, A is the load of the processor core, P is the power consumption of the processor core, f is the frequency of the processor core, and V is the voltage of the processor core.

[0081] Further, after calculating the load of each processor core, the power consumption controller can first sum up the loads of all processor cores included in the processor to calculate the total load of the processor, and then sum up the loads of processor cores in the same voltage domain to calculate the load of the first voltage domain, and then calculate the ratio of the load of the first voltage domain to the total load of the processor, which indicates the load proportion of the current load in the first voltage domain to the total load in the processor. Generally, the current load in the first voltage domain can be used to indicate the power consumption that the first voltage domain will consume in the future. The greater the current load in the first voltage domain, the more power consumption the first voltage domain is likely to consume in the future. The smaller the current load in the first voltage domain, the less power consumption the first voltage domain is likely to consume in the future. Therefore, the power consumption controller can allocate power consumption to the first voltage domain according to the load proportion of the first voltage domain. For example, the power consumption controller can directly calculate the product of the load proportion of the first voltage domain and the power consumption (such as the rated power consumption or the maximum power consumption, etc.) of the processor, and take the product as the allocated power consumption of the first voltage domain. For another example, the power consumption controller can also first calculate a correction coefficient corresponding to the first voltage domain according to the deviation between the historical allocated power consumption and the historical real power consumption of the first voltage domain, then calculate the product of the load proportion of the first voltage domain and the power consumption of the processor to obtain the allocated power consumption of the first voltage domain before correction, and then correct the allocated power consumption using the correction coefficient, and take the allocated power consumption after correction as the allocated power consumption of the first voltage domain. In this implementation manner, since the allocated power consumption of the first voltage domain is calculated according to the current load of the first voltage domain and the total load of the processor, the allocated power consumption can be matched with the real power consumption that the first voltage domain is likely to consume in the future with a high probability, which can not only allocate sufficient power consumption to the first voltage domain to meet the power consumption demand of the first voltage domain, but also not allocate too much power consumption to the first voltage domain to cause performance waste.

[0082] It should be noted that the above is only an exemplary introduction to an optional implementation manner of allocating power consumption. The present application can also allocate power consumption in other manners: for example, in another optional implementation manner, the power consumption controller can also simulate a power consumption prediction model according to the historical power consumption of the first voltage domain, and then use the power consumption prediction model to predict the future power consumption of the first voltage domain, and take the future power consumption as the allocated power consumption of the first voltage domain. For another example, in another optional implementation manner, the power consumption controller can also predict the future load according to the current load and the historical load of the first voltage domain, and then use the future load to perform the above power consumption allocation scheme. It should be understood that any scheme that can allocate power consumption to each voltage domain can be included in the protection scope of the present application, and the present application will not be repeated here.

[0083] Step 304: The power consumption controller determines the temperature range in which the temperature of the first voltage domain is located, and calculates the power consumption threshold of the first voltage domain using the adjustment coefficient corresponding to the temperature range and the allocated power consumption of the first voltage domain.

[0084] In one alternative implementation, the power consumption controller may also be configured with a preset temperature range [T]. min T max ], preset temperature range [T min T max It can be divided into at least two temperature ranges, and each of the at least two temperature ranges can correspond to an adjustment coefficient. Figure 4 This example illustrates a correspondence diagram between temperature ranges and adjustment coefficients provided in an embodiment of this application. In this example, it is assumed that the temperature ranges in the first column corresponding to the second row to the (n+1)th row are respectively referred to as the first temperature range (T1, T...). max The first temperature range (T1, T2), the second temperature range (T3, T2), the third temperature range (T3, T2), ..., the nth temperature range (T... min T n ],but Figure 4 The N shown i This refers to the temperature coefficient corresponding to the i-th temperature range. Here, i is a positive integer less than or equal to n, n is a positive integer greater than or equal to 2, and T... max >T1>T2>T3>……>T min Continue to refer to Figure 4 As shown, assuming TDP is the allocated power consumption in the voltage domain and PL2 is the power consumption threshold in the voltage domain, then... Figure 4 For example, the product of the allocated power consumption in the voltage domain and the adjustment coefficient corresponding to the temperature range of the voltage domain is used as the power consumption threshold of the voltage domain. In this case, after the power controller determines the temperature of the first voltage domain and calculates the allocated power consumption of the first voltage domain, it can first look up the correspondence to determine the adjustment coefficient corresponding to the temperature range of the first voltage domain, and then directly calculate the product of the adjustment coefficient and the allocated power consumption, using this product as the power consumption threshold of the first voltage domain. According to this implementation, since the allocated power consumption TDP corresponds to the minimum power consumption that the processor will allocate to the first voltage domain, adjustment coefficients N1, N2, N3, ..., N can also be set. n If the value is a real number not less than 1, then by using the adjustment coefficient and the power consumption of the first voltage domain as the power consumption threshold of the first voltage domain, it can be guaranteed that the power consumption threshold of the first voltage domain is not less than the power consumption of the first voltage domain.

[0085] In the above embodiments, at least two adjustment coefficients corresponding to at least two temperature ranges can decrease as the temperature in at least two temperature ranges increases. Corresponding to...Figure 4 In other words, because the temperature in the first temperature interval (T1, T max In other words, because the temperature in the first temperature interval (T1, T min In other words, because the temperature in the first temperature interval (T1, T n In other words, because the temperature in the first temperature interval (T1, T n In other words, because the temperature in the first temperature interval (T1, T n ≥ 1.

[0086] In the embodiment, the preset temperature range [T min , T max ] can be set according to various rules, for example:

[0087] In one possible case, the minimum temperature in the preset temperature range [T min , T max ] can be a relatively small temperature value that is basically impossible to reach, for example, -120 degrees (generally, the processor core is out of service when the temperature of the processor core is not as low as -120 degrees), and correspondingly, the maximum temperature in the preset temperature range [T min , T max ] can be a relatively large temperature value that is basically impossible to reach, for example, 120 degrees (generally, the processor core is out of service when the temperature of the processor core is not as high as 120 degrees). In this case, as long as each processor core in the first voltage domain is in a working state, the temperature of each processor core will inevitably be in the preset temperature range, so the highest temperature in each processor core (i.e., the temperature of the first voltage domain) will also inevitably be in a certain temperature interval in the preset temperature range.

[0088] In another possible case, the preset temperature range [T min , T max ] can be set according to the temperature thresholds used in the temperature adjustment strategy. Each temperature threshold in the temperature adjustment strategy can correspond to a different time dimension, and as the time dimension increases, the temperature threshold corresponding to each time dimension can gradually decrease. Assuming that temperature threshold 1 corresponds to a time dimension of 5 seconds, and temperature threshold 2 corresponds to a time dimension of 0.5 seconds, when the average temperature of a processor core in the past 5 seconds exceeds temperature threshold 1, or the average temperature of the processor core in the past 0.5 seconds (because the time period of 0.5 seconds is very short, it can also be considered as an instantaneous temperature) exceeds temperature threshold 2, it indicates that the temperature of the processor core is high, and the processor core needs to be cooled (for example, frequency reduction and voltage reduction). In this embodiment, the minimum temperature T minmay refer to the lowest temperature in each temperature line, the maximum temperature T in the preset temperature range max may refer to the highest temperature in each temperature line, and the temperature of the first voltage domain can not be in the preset temperature range. In this case, if the temperature of the first voltage domain is lower than the minimum temperature in the preset temperature range, the power consumption controller can directly consider that the temperature belongs to the temperature interval in which the minimum temperature is located, and if the temperature of the first voltage domain is higher than the maximum temperature in the preset temperature range, the power consumption controller can directly consider that the temperature belongs to the temperature interval in which the maximum temperature is located.

[0089] It should be understood that the above is only an exemplary introduction of two possible cases of the preset temperature range. In the embodiments of the present application, the preset temperature range can also be set by those skilled in the art according to experience, which is not limited in the present application.

[0090] Step 305, the power consumption controller adjusts the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain.

[0091] In the embodiments of the present application, when the power consumption of the first voltage domain is greater than the power consumption threshold of the first voltage domain, the power consumption controller can send a frequency reduction control instruction to the frequency adjuster in each processor core in the first voltage domain, so that the frequency adjuster of each processor core in the first voltage domain adjusts the frequency of the processor core to a frequency lower than the current frequency. Wherein, the frequency reduction control instruction can correspond to the following cases:

[0092] In one possible case, the frequency reduction control instruction carries a target frequency reduction frequency, which can be the rated working frequency of the processor core, or other frequency lower than the current frequency. Any frequency adjuster can first parse the target frequency reduction frequency from the frequency reduction control instruction after receiving the frequency reduction control instruction, and then compare the current frequency of the processor core with the target frequency reduction frequency. If the current frequency is higher than the target frequency reduction frequency, the frequency adjuster can reduce the frequency of the processor core to the target frequency reduction frequency, and if the current frequency is lower than the target frequency reduction frequency, the frequency adjuster can not adjust the frequency of the processor core, or increase the frequency of the processor core to the target frequency reduction frequency to improve the processing performance of the processor core as much as possible.

[0093] In another possible case, the frequency reduction control instruction can also be only a frequency reduction instruction, and any frequency adjuster can reduce the frequency of the processor core after receiving the frequency reduction control instruction. Wherein, different frequency adjusters can reduce the frequency of the processor core to the same frequency, or reduce the frequency of the processor core to different frequencies according to their own needs, which is not limited.

[0094] In an optional implementation, when the power consumption of the first voltage domain is far less than the power consumption threshold of the first voltage domain, it indicates that the current power consumption of the first voltage domain is low, which can be caused by that the processor cores in the first voltage domain do not enter the overclocking state, or caused by that the processor cores in the first voltage domain run at a lower frequency, and there is actually still some available thermal margin of the processor cores in the first voltage domain. In this case, in order to fully utilize the thermal margin of the processor cores and improve the processing performance of the processor cores as much as possible under temperature control, the power consumption controller can also send a frequency increasing control instruction to the frequency adjuster in each processor core in the first voltage domain, so that the frequency adjuster of each processor core in the first voltage domain adjusts the frequency of the processor core to a frequency higher than the current frequency. The frequency increasing control instruction can correspond to the following cases:

[0095] In a possible case, the frequency increasing control instruction carries a target frequency increasing frequency, which is set by the power consumption controller according to the power consumption of the first voltage domain. For example, the power consumption controller also stores a correspondence between at least one power consumption and at least one target frequency increasing frequency, and when it is determined to perform the frequency increasing operation on the processor cores in the first voltage domain, the power consumption controller can first query the correspondence to determine the target frequency increasing frequency corresponding to the power consumption of the first voltage domain, and then generate the frequency increasing control instruction based on the target frequency increasing frequency and send it to the frequency adjusters in the processor cores in the first voltage domain. Correspondingly, any frequency adjuster can first parse the target frequency increasing frequency from the frequency increasing control instruction after receiving the frequency increasing control instruction, and then compare the current frequency of the processor core with the target frequency increasing frequency. If the current frequency is lower than the target frequency increasing frequency, the frequency adjuster can increase the frequency of the processor core to the target frequency increasing frequency. If the current frequency is higher than the target frequency increasing frequency, the frequency adjuster can not adjust the frequency of the processor core. In this way, even if there is a processor core in the first voltage domain whose frequency is very high, this way will not continue to increase the frequency of the processor core, thereby helping to maintain the life and stability of the processor core.

[0096] In another possible case, the frequency increasing control instruction can also be only a frequency increasing instruction, and any frequency adjuster can individually increase the frequency of the processor core after receiving the frequency increasing control instruction. Different frequency adjusters can increase the frequency of the processor core to the same frequency, or increase the frequency of the processor core to different frequencies according to their own needs, which is not limited.

[0097] In this embodiment, the power consumption threshold of the first voltage domain can refer to any one or more power consumption thresholds in the power consumption adjustment strategy. In one possible power consumption adjustment strategy, the processor can have at least two power consumption thresholds, each corresponding to a different time dimension. As the time dimension increases, the power consumption threshold corresponding to each time dimension can gradually decrease. Assuming there is a first power consumption threshold and a second power consumption threshold, the first power consumption threshold corresponds to a 0.3-second time dimension (actually the average power consumption within 0.3 seconds, but since 0.3 seconds is a short period, it can also be considered as instantaneous power consumption), and the second power consumption threshold corresponds to a 3-second time dimension, then when the average power consumption of each processor core in the first voltage domain exceeds the second power consumption threshold in the past 3 seconds, or when the average power consumption of each processor core in the first voltage domain exceeds the first power consumption threshold in the past 0.3 seconds, it is necessary to reduce the power consumption of each processor core in the first voltage domain (e.g., by reducing frequency and voltage). This power consumption adjustment strategy integrates power consumption thresholds from multiple time dimensions to achieve power consumption adjustment, which can not only accurately and flexibly limit the power consumption of the first voltage domain, but also maintain the overclocking state of the first voltage domain as much as possible.

[0098] The following is a specific example illustrating the process of adjusting power consumption according to the power consumption adjustment strategy described above:

[0099] Figure 5 An exemplary diagram illustrates a power consumption change scenario where power consumption is adjusted according to the aforementioned power consumption regulation strategy. Figure 5 As shown, this power consumption regulation strategy includes a first power consumption threshold TDP (also known as PL1) and a second power consumption threshold PL2 (also known as Turbo). The time dimension corresponding to the first power consumption threshold TDP is greater than the time dimension corresponding to the second power consumption threshold PL2, and the first power consumption threshold TDP is less than the second power consumption threshold PL2. According to the scheme in this application, the power controller can adjust the ratio of the second power consumption threshold PL2 to the first power consumption threshold TDP in real time based on the temperature of the first voltage domain.

[0100] The higher the temperature of the first voltage domain, the smaller the ratio of the second power consumption threshold PL2 to the first power consumption threshold TDP, thus the closer the second power consumption threshold PL2 is to the first power consumption threshold TDP (e.g., Figure 5 (The power consumption threshold L1 is shown). In this case, even if the first power consumption threshold TDP is not triggered over a long period, the second power consumption threshold PL2 becomes smaller over a short period. Therefore, the instantaneous power consumption of the first voltage domain is more likely to trigger the second power consumption threshold PL2, resulting in a frequency reduction in the first voltage domain. However, this frequency reduction operation does not directly reduce the power consumption of the first voltage domain below the first power consumption threshold TDP, but slowly reduces it until it reaches the second power consumption threshold PL2. Therefore, the first voltage domain only performs frequency reduction and does not exit the overclocking state.

[0101] The lower the temperature of the first voltage domain is, the greater the ratio of the second power consumption threshold PL2 and the first power consumption threshold TDP is, and thus the second power consumption threshold PL2 is farther away from the first power consumption threshold TDP (for example Figure 5 In this case, when the first power consumption threshold TDP in the long time dimension is not triggered, the first voltage domain is less likely to trigger the second power consumption threshold PL2 due to the increase of the second power consumption threshold PL2 in the short time dimension, and thus the first voltage domain can continue to be overclocked until the second power consumption threshold PL2 is reached. In this way, the power consumption of the first voltage domain can be further improved when the temperature is controllable, so as to improve the processing performance of the processor.

[0102] According to the foregoing method, Figure 6 A structural schematic diagram of a power consumption controller 600 provided in the embodiments of the present application is shown, which can be a chip or a circuit, such as a chip or a circuit that can be arranged in a processor. The power consumption controller 600 can correspond to the power consumption controller 14 in the foregoing method. The power consumption controller 600 can implement the steps of the method corresponding to any one or more of the methods shown in the foregoing Figure 2 and Figure 3 As shown in the foregoing Figure 6 , the power consumption controller 600 can include a monitoring circuit 601 and a processing circuit 602. Further, the power consumption controller 600 can also include a bus system, and the monitoring circuit 601 and the processing circuit 602 can be connected through the bus system. In addition, the monitoring circuit 601 can also be connected with the temperature sensor and / or the power consumption sensor of each processor core through the bus system, and the processing circuit 602 can also be connected with the frequency regulator of each processor core through the bus system.

[0103] In the embodiments of the present application, the monitoring circuit 601 can acquire the temperature of the first voltage domain in the processor through the temperature sensor and / or the power consumption sensor of each processor core. Correspondingly, the processing circuit 602 can determine the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain, and then adjust the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain. When the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain, the processing circuit 602 can reduce the power consumption of the first voltage domain.

[0104] The concepts, explanations, detailed descriptions and other steps related to the technical solutions provided in the embodiments of the present application involved in the power consumption controller 600 are described in the foregoing method or other embodiments, and will not be repeated here.

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

[0106] 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 temperature of the first voltage domain in the processor, the determination unit 702 can determine the power consumption threshold of the first voltage domain based on the temperature of the first voltage domain, and the adjustment unit 703 can adjust the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain. For example, when the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain, the power consumption of the first voltage domain is reduced.

[0107] 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 controller 700, please refer to the descriptions of these contents in the foregoing methods or other embodiments, which will not be repeated here.

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

[0109] It should be understood that the division of the power consumption controller 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.

[0110] 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.

[0111] 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 perform...Figures 1 to 5 The method of any one of the illustrated embodiments.

[0112] According to the method provided in the embodiments of the present application, the present application further provides an electronic device, which comprises a processor and a memory, the processor is coupled with the memory, and the processor is used for executing a computer program stored in the memory, so that the electronic device executes the method provided in the embodiments of the present application. Figures 1 to 5 The method of any one of the illustrated embodiments.

[0113] The terms "component," "module," "system," and the like are used in the present description to refer to computer-related entities, hardware, firmware, a combination of hardware and software, software, or the like. For example, a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and / or a computer. By way of illustration, both an application running on a computing device and the computing device can be a component. One or more components can reside within a process and / or thread of execution and a component can be localized, co-resident, and / or distributed among one computer or across multiple computers. In addition, these components can execute from various computer readable media having various data structures stored thereon. The components can communicate by way of local and / or remote processes such as in accordance with a signal having one or more data packets (e.g., data from one component interacting with another component in a local system, distributed system, and / or across a network such as the Internet with other systems via the signal).

[0114] Those skilled in the art can clearly understand that the various illustrative logical blocks and steps described in connection with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. A skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0115] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.

[0116] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the described device embodiments are merely schematic. The division of the units is merely logical function division. There can be other division manners in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0117] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

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

[0119] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

[0120] The above description is merely a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A power consumption control method characterized by comprising: The method comprises: obtaining the temperature of a first voltage domain in a processor; determining a power consumption threshold of the first voltage domain according to the temperature of the first voltage domain; adjusting the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain; wherein the determining of the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain comprises: determining a target temperature interval in which the temperature of the first voltage domain is located; calculating the power consumption threshold of the first voltage domain according to the allocated power consumption of the first voltage domain and an adjustment coefficient corresponding to the target temperature interval; wherein the allocated power consumption of the first voltage domain is the power consumption allocated to the first voltage domain in advance according to the load of the first voltage domain and the total load of the processor; wherein the target temperature interval is any one of at least two temperature intervals, each of the at least two temperature intervals corresponds to an adjustment coefficient, the adjustment coefficients corresponding to the at least two temperature intervals decrease as the temperature in the temperature interval increases, and the lower the adjustment coefficient corresponding to the target temperature interval, the lower the power consumption threshold of the first voltage domain.

2. The method of claim 1, wherein, The adjusting of the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain comprises: when the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain, reducing the power consumption of the first voltage domain.

3. The method of claim 1 or 2, wherein, The obtaining of the temperature of the first voltage domain in the processor comprises: determining target processor cores in the first voltage domain from processor cores of the processor; obtaining temperatures corresponding to the target processor cores respectively; taking the highest temperature among the temperatures corresponding to the target processor cores respectively as the temperature of the first voltage domain.

4. The method of claim 1 or 2, wherein, The determining of the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain comprises: determining a target temperature interval in which the temperature of the first voltage domain is located; determining the power consumption threshold of the first voltage domain as the power consumption threshold corresponding to the target temperature interval; wherein the target temperature interval is any one of at least two temperature intervals, each of the at least two temperature intervals corresponds to a power consumption threshold, and for any one of the at least two temperature intervals, the higher the temperature in the temperature interval, the smaller the power consumption threshold corresponding to the temperature interval.

5. A processor, comprising: The system comprises a temperature sensor and a power consumption controller, the temperature sensor is arranged in a first voltage domain of a processor; the power consumption controller is configured to obtain the temperature of the first voltage domain from the temperature sensor, determine the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain, and adjust the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain; wherein the power consumption controller is specifically configured to: determine a target temperature interval in which the temperature of the first voltage domain is located; calculate the power consumption threshold of the first voltage domain using the allocated power consumption of the first voltage domain and an adjustment coefficient corresponding to the target temperature interval; wherein the allocated power consumption of the first voltage domain is the power consumption allocated to the first voltage domain in advance according to the load of the first voltage domain and the total load of the processor; The target temperature interval is any one of at least two temperature intervals, each of the at least two temperature intervals corresponds to an adjustment coefficient, the adjustment coefficients corresponding to the at least two temperature intervals decrease with the increase of the temperature in the temperature interval, and the lower the adjustment coefficient corresponding to the target temperature interval is, the lower the power consumption threshold of the first voltage domain is.

6. The processor of claim 5, wherein, The processor further includes at least one processor core and at least one temperature sensor connected with the at least one processor core respectively; The temperature sensor connected with any processor core is configured to acquire the temperature of the processor core and send the temperature to the power consumption controller; The power consumption controller is configured to determine target processor cores in the first voltage domain from the at least one processor core, and take the highest temperature among the temperatures corresponding to the target processor cores respectively as the temperature of the first voltage domain.

7. The processor of claim 5, wherein, The processor includes at least one power consumption regulator connected with the at least one processor core respectively; The power consumption controller is specifically configured to generate a power consumption control instruction and send the power consumption control instruction to the power consumption regulator connected with each target processor core in the first voltage domain when the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain; The power consumption regulator connected with any target processor core is configured to reduce the power consumption of the target processor core according to the power consumption control instruction.

8. The processor of claim 7, wherein, The power consumption regulator is specifically configured to: reduce the frequency of the target processor core according to the power consumption control instruction.

9. The processor of any one of claims 5 to 8, wherein, The power consumption controller is specifically configured to: determine a target temperature interval in which the temperature of the first voltage domain is located; determine the power consumption threshold corresponding to the target temperature interval as the power consumption threshold of the first voltage domain; The target temperature interval is any one of at least two temperature intervals, each of the at least two temperature intervals corresponds to a power consumption threshold, and for any one of the at least two temperature intervals, the higher the temperature in the temperature interval is, the smaller the power consumption threshold corresponding to the temperature interval is.

10. The processor of claim 9, wherein, The processor further includes at least one power consumption sensor connected with the at least one processor core respectively; The power consumption sensor connected with each processor core is configured to acquire the power consumption of the processor core and send the power consumption to the power consumption controller; The power consumption controller is further configured to determine the load of each processor core according to the power consumption of each processor core and the temperature of each processor core, calculate the load of the first voltage domain according to the loads of the processor cores in the first voltage domain, calculate the total load of the processor according to the loads of the processor cores included in the processor, and allocate the power consumption of the processor using the load of the first voltage domain and the total load of the processor to determine the allocated power consumption of the first voltage domain.

11. An electronic device, comprising: The electronic device comprises a processor coupled with a memory, the processor being configured to execute a computer program stored in the memory to cause the electronic device to perform the method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • Chip system and related device

    CN111783375A