WO2022099477A1 - Power consumption control method and device - Google Patents

Power consumption control method and device Download PDF

Info

Publication number
WO2022099477A1
WO2022099477A1 PCT/CN2020/127874 CN2020127874W WO2022099477A1 WO 2022099477 A1 WO2022099477 A1 WO 2022099477A1 CN 2020127874 W CN2020127874 W CN 2020127874W WO 2022099477 A1 WO2022099477 A1 WO 2022099477A1
Authority
WO
WIPO (PCT)
Prior art keywords
power consumption
temperature
voltage domain
processor
processor core
Prior art date
Application number
PCT/CN2020/127874
Other languages
French (fr)
Chinese (zh)
Inventor
胡荻
郭东之
库特拉德米特罗
刘臻
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2020/127874 priority Critical patent/WO2022099477A1/en
Priority to CN202080106862.6A priority patent/CN116391162A/en
Publication of WO2022099477A1 publication Critical patent/WO2022099477A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power

Definitions

  • the present application relates to the technical field of processors, and in particular, to a power consumption control method and apparatus.
  • the components in the electronic device are usually defined with some standard operating ranges, such as a rated operating frequency, a rated operating voltage, and the like.
  • the processor core performs processing operations at the rated operating frequency.
  • the processor core has an overclocking function, if the rated operating frequency does not meet the requirements of the current working scenario of the processor core, the frequency of the processor core can be increased above the rated operating frequency to improve the processing efficiency of the processor core. performance.
  • the processor core when the processor core is in an overclocked state, the processor core may run at a high frequency and high voltage for a long time, resulting in overheating or overcurrent of the processor core.
  • the prior art sets a power consumption adjustment strategy in the overclocking state, in this strategy: if the power consumption of the processor core exceeds a preset power consumption threshold, reduce the power consumption of the processor core power consumption to ease the high frequency and high voltage state of the processor core, or end the overclocking state of the processor core.
  • this method can prevent the processor core from overheating or overcurrent, it adjusts power consumption based on a fixed power consumption threshold, which not only reduces the flexibility of overclocking adjustment, but also makes the accuracy of overclocking adjustment dependent on The power consumption threshold set may cause deviations in overclocking adjustment.
  • the present application provides a power consumption control method and device to improve the flexibility and accuracy of overclocking adjustment.
  • the present application provides a power consumption control method, which is applicable to a power consumption controller.
  • the method includes: the power consumption controller first obtains the temperature of a first voltage domain in the processor, and then according to the first voltage domain The temperature of the first voltage domain determines the power consumption threshold of the first voltage domain, and then adjusts the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain. Wherein, when the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain, the power consumption controller may reduce the power consumption of the first voltage domain.
  • the power consumption threshold of the first voltage domain can be matched with the current temperature, and the actual power consumption can be adjusted based on the power consumption threshold. Considering the dual effects of power consumption and temperature, this can not only improve the accuracy of overclocking adjustment, but also make the power consumption threshold of the first voltage domain change flexibly with the change of temperature, which also helps to improve the overclocking adjustment. flexibility.
  • 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, while Do not directly trigger the temperature adjustment strategy to avoid directly exiting the overclocking state, thereby improving the overclocking performance of the processor.
  • 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 controller detects that the power consumption of the first voltage domain exceeds the first voltage domain
  • the power consumption threshold of the voltage domain can reduce the power consumption of the first voltage domain. In this way, the power consumption of the first voltage domain can be reduced in time when the power consumption of the first voltage domain is relatively high, thereby helping to avoid the occurrence of overcurrent or overheating caused by the excessively high power consumption of the first voltage domain.
  • the power consumption controller acquires the temperature of the first voltage domain in the processor, including: the power consumption controller first determines the temperature in the first voltage domain from each processor core of the processor. Each target processor core then acquires the temperature corresponding to each target processor core, and then uses 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 at the highest temperature in the first voltage domain. As long as the processor core at the highest temperature does not experience overheating, then the first There is a high probability that other processor cores in the voltage domain will not experience overcurrent and overheating. Therefore, this method can not only adjust the power consumption of the first power domain in time, but also has a better adjustment effect.
  • 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 range 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 may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to a power consumption threshold. For any one of the at least two temperature intervals: when the temperature in the temperature interval is higher, the power consumption threshold corresponding to the temperature interval is also smaller.
  • This design reduces the power consumption threshold when the temperature is high, which actually reduces the conditions for triggering the power consumption adjustment strategy, which not only enables the first voltage domain to continue to maintain the overclocking state by slowly reducing power consumption, but also reduces the trigger temperature adjustment.
  • the strategy leads to the possibility of exiting the overclocking state, so this method can try to keep 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.
  • 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 range 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 distribution 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 pre-allocated by the power consumption controller for the first voltage domain according to the load of the first voltage domain and the total load of the processor.
  • the target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to an adjustment coefficient.
  • the design uses the temperature range and the power distribution to determine the power consumption threshold, which can not only match the power consumption threshold to the current temperature, but also make it match the current load. Therefore, adjusting the power consumption based on the power consumption threshold can better meet the needs of the current working environment .
  • the adjustment coefficients corresponding to the at least two temperature intervals decrease as the temperature in the temperature intervals increases.
  • the design will reduce the power consumption threshold as the temperature increases, which helps to maintain the overclocking state of the processor core as much as possible by slowly reducing the power consumption, so as to improve the overclocking performance of the processor.
  • the present application provides a power consumption controller, including a monitoring circuit and a processing circuit, where the monitoring circuit is used to obtain the temperature of the first voltage domain in the processor, and the processing circuit is used to determine the first voltage domain according to the temperature of the first voltage domain.
  • a power consumption threshold of the voltage domain, and the power consumption of the first voltage domain is adjusted based on the power consumption threshold of the first voltage domain.
  • the processing circuit is specifically configured to: reduce the power consumption of the first voltage domain when the power consumption of the first voltage domain exceeds a power consumption threshold of the first voltage domain.
  • the monitoring circuit is specifically used to: first determine each target processor core in the first voltage domain from each processor core of the processor, and then obtain the corresponding corresponding temperature, and then the highest temperature among the temperatures corresponding to the respective target processor cores is taken as the temperature of the first voltage domain.
  • the processing circuit is specifically configured to: first determine the target temperature range in which the temperature of the first voltage domain is located, and then determine the power consumption threshold corresponding to the target temperature range as the power consumption threshold of the first voltage domain .
  • the target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to a power consumption threshold. For any one of the at least two temperature intervals: when the temperature in the temperature interval is higher, the power consumption threshold corresponding to the temperature interval is smaller.
  • the processing circuit is specifically configured to: first determine the target temperature range in which the temperature of the first voltage domain is located, and then calculate the corresponding adjustment coefficient according to the allocated power consumption of the first voltage domain and the target temperature range.
  • the power consumption threshold of the first voltage domain is obtained.
  • the allocated power consumption of the first voltage domain is the power consumption pre-allocated for the first voltage domain according to the load of the first voltage domain and the total load of the processor.
  • the target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to an adjustment coefficient.
  • the adjustment coefficients corresponding to the at least two temperature intervals may decrease as the temperature in the temperature intervals increases.
  • the present application provides a power consumption controller, comprising: an acquisition unit, configured to acquire a temperature of a first voltage domain in a processor; a determination unit, configured to determine the first voltage domain according to the temperature of the first voltage domain The power consumption threshold of the first voltage domain; the adjusting unit, configured to adjust the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain.
  • 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 a power consumption threshold of the first voltage domain.
  • the obtaining unit is specifically configured to: first determine each target processor core in the first voltage domain from each processor core of the processor, and then obtain the corresponding corresponding target processor cores temperature, and then the highest temperature among the temperatures corresponding to the respective target processor cores is taken as the temperature of the first voltage domain.
  • the determining unit is specifically configured to: first determine the target temperature range in which the temperature of the first voltage domain is located, and then determine the power consumption threshold corresponding to the target temperature range as the power consumption threshold of the first voltage domain .
  • the target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to a power consumption threshold. For any one of the at least two temperature intervals: when the temperature in the temperature interval is higher, the power consumption threshold corresponding to the temperature interval is smaller.
  • the determining unit is specifically configured to: first determine the target temperature interval in which the temperature of the first voltage domain is located, and then calculate the corresponding adjustment coefficient according to the allocated power consumption of the first voltage domain and the target temperature interval.
  • the power consumption threshold of the first voltage domain is obtained.
  • the allocated power consumption of the first voltage domain is the power consumption pre-allocated for the first voltage domain according to the load of the first voltage domain and the total load of the processor.
  • the target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to an adjustment coefficient.
  • the adjustment coefficients corresponding to the at least two temperature intervals decrease as the temperature in the temperature intervals increases.
  • the present application provides a processor.
  • the processor may include a temperature sensor and a power consumption controller.
  • the temperature sensor is disposed in a first voltage domain of the processor.
  • the power consumption controller may acquire 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 then adjust the power consumption threshold of the first voltage domain based on the power consumption threshold of the first voltage domain. Power consumption in the voltage domain.
  • the processor may further include at least one processor core and at least one temperature sensor, and the at least one temperature sensor is respectively connected to the at least one processor core.
  • a temperature sensor connected to any processor core can acquire the temperature of the processor core and send it to the power consumption controller, and the power consumption controller can determine that the temperature of the at least one processor core is at the first voltage each target processor core in the domain, and then use the highest temperature among the temperatures corresponding to each target processor core as the temperature of the first voltage domain.
  • the processor may further include at least one processor core and at least one power consumption regulator, and the at least one power consumption regulator is respectively connected to the at least one processor core.
  • the power consumption controller may generate a power consumption control instruction and send it 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.
  • the connected power consumption regulator, the power consumption regulator connected with any target processor core can reduce the power consumption of the target processor core according to the power consumption control instruction.
  • the power consumption regulator is specifically configured to: reduce the frequency of the target processor core according to the power consumption control instruction.
  • the power consumption controller is specifically configured to: first determine the target temperature range in which the temperature of the first voltage domain is located, and then determine the power consumption threshold corresponding to the target temperature range as the power consumption of the first voltage domain consumption threshold.
  • the target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to a power consumption threshold. For any one of the at least two temperature intervals: when the temperature in the temperature interval is higher, the power consumption threshold corresponding to the temperature interval is smaller.
  • the power consumption controller is specifically configured to: first determine the target temperature range in which the temperature of the first voltage domain is located, and then use the distribution power consumption of the first voltage domain and the adjustment coefficient corresponding to the target temperature range , and calculate the power consumption threshold of the first voltage domain.
  • the allocated power consumption of the first voltage domain is the power consumption pre-allocated for the first voltage domain according to the load of the first voltage domain and the total load of the processor.
  • the target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to an adjustment coefficient.
  • the processor may further include at least one processor core and at least one power consumption sensor, and the at least one power consumption sensor is respectively connected to the at least one processor core.
  • 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 also and the temperature of each processor core, determine the load of each processor core, and 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 load of the first voltage domain according to the load of each processor core included in the processor.
  • the load of the processor core is calculated to obtain the total load of the processor, and then the power consumption of the processor is distributed using the load of the first voltage domain and the total load of the processor to determine the distributed power consumption of the first voltage domain.
  • the adjustment coefficients corresponding to the at least two temperature intervals may decrease as the temperature in the temperature intervals increases.
  • the present application provides an electronic device, including a processor, which can be coupled to a memory, and the processor can execute a computer program stored in the memory to cause the electronic device to perform any one of the above-mentioned first aspects. the method described.
  • FIG. 1 exemplarily shows a schematic structural diagram of a processor provided by an embodiment of the present application
  • FIG. 2 exemplarily shows a schematic flowchart corresponding to a power consumption control method provided by an embodiment of the present application
  • FIG. 3 exemplarily shows a specific flowchart of a power consumption control method provided by an embodiment of the present application
  • FIG. 4 exemplarily shows a corresponding relationship diagram of each temperature interval and each adjustment coefficient provided by an embodiment of the present application
  • FIG. 5 exemplarily shows a schematic diagram of a power consumption adjustment strategy provided by an embodiment of the present application
  • FIG. 6 exemplarily shows a schematic structural diagram of a power consumption controller provided by an embodiment of the present application
  • FIG. 7 exemplarily shows a schematic structural diagram of another power consumption controller provided by an embodiment of the present application.
  • the electronic device may be a computer device having a processor (such as a central processing unit (CPU)), such as a desktop computer. It should also be understood that, in some other embodiments of the present application, the electronic device may also be a portable electronic device with a processor, such as a mobile phone, a tablet computer, a wearable device (such as a smart watch) with a wireless communication function, a vehicle-mounted device Wait. Exemplary embodiments of portable electronic devices include, but are not limited to, carry-on Or portable electronic devices with other operating systems.
  • the processor in the electronic device has the overclocking function
  • the processor can increase its frequency to operate at a frequency higher than the frequency specified by the manufacturer to increase the processing power of the processor. performance.
  • the power consumption of the processor will also increase accordingly, and the increased power consumption is manifested in the form of thermal energy, which increases the temperature of the processor.
  • the processor cannot be cooled in time, the excessively high temperature will affect the life and reliability of the processor.
  • overclocking adjustment strategy which corresponds to at least one temperature waterline. These temperature waterlines can be preset according to the rated temperature of the processor or the withstand temperature of each component in the processor. When the temperature of the processor exceeds a certain temperature water line, the processor will be underclocked or directly exit the overclocking state to avoid damage to the components in the processor due to excessive temperature.
  • the other is a power consumption adjustment strategy, which corresponds to at least one power consumption watermark (ie, a power consumption threshold), and these power consumption watermarks can be adjusted according to the rated power consumption of the processor or the acceptable power consumption of various components in the processor. Pre-set, when the power consumption of the processor exceeds a certain power consumption threshold, the processor will reduce the power consumption or directly exit the overclocking state.
  • these two overclocking adjustment strategies have the following problems: First, the various waterlines (such as various temperature waterlines or various power consumption waterlines) involved in these two overclocking adjustment strategies are preset Fixed value, the overclocking adjustment based on a fixed waterline is neither flexible nor accurate, and cannot be used as a general adjustment method in different scenarios.
  • the present application provides a power consumption control method for comprehensively implementing overclocking adjustment in combination with temperature and power consumption, so as to improve the overclocking performance of the processor while improving the flexibility and accuracy of the overclocking adjustment.
  • system and “network” in the embodiments of the present application may be used interchangeably.
  • At least one means one or more, and “plurality” means two or more.
  • And/or which describes the association relationship of the associated objects, indicates that there can be three kinds of relationships, for example, A and/or B, which can indicate: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an “or” relationship.
  • At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • At least one item (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
  • ordinal numbers such as “first” and “second” mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the priority or importance of multiple objects.
  • the first power consumption threshold and the second power consumption threshold are only for differentiating different power consumption thresholds, and do not indicate the difference in priority or importance of the two power consumption thresholds.
  • FIG. 1 exemplarily shows a schematic structural diagram of a processor provided by an embodiment of the present application.
  • the processor 100 may include at least one processor core, such as a processor core 10 , a processor core 11 , a processor core 12 and a processor core 13 .
  • the processor 100 may also include non-core components, such as general-purpose units (including counters, decoders, signal generators, etc.), accelerator units, input/output control units, interface units, internal memory, and external buffers.
  • each processor core and non-core components may be connected through a communication bus (not shown in FIG. 1 ), so as to realize the data transmission operation.
  • the above-mentioned processor 100 may be a chip.
  • the processor 100 may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), or a system on chip (SoC). It can be a central processing unit (CPU), a network processor (NP), a digital signal processing circuit (DSP), or a microcontroller (microcontroller). unit, MCU), it can also be a programmable logic device (PLD) or other integrated chips.
  • the processor 100 in this embodiment of the present application may also be an integrated circuit chip, which has a signal processing capability.
  • the processor 100 described above may 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 devices, discrete gate or transistor logic devices, Discrete hardware components.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be random access memory (RAM), which acts as an external cache.
  • RAM random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous DRAM
  • SDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • direct rambus RAM direct rambus RAM
  • each processor core in the processor 100 may all be located in the same voltage domain, or may be located in different voltage domains, respectively. Some processor cores may also be located in the same voltage domain, which is not specifically limited. One or more processor cores located in the same voltage domain may have the same operating voltage. For example, assuming that there are voltage domain 1, voltage domain 2 and voltage domain 3 in processor 100, processor core 10 is located in voltage domain 1, processor core 11 and processor core 12 are located in voltage domain 2, and processor core 13 is located in voltage domain 2. In voltage domain 3, the processor core 10 has the first voltage, the processor core 11 and the processor core 12 have the second voltage, and the processor core 13 has the third voltage. The first voltage, the second voltage and the third voltage may be the same or different, which are not specifically limited.
  • the processor may further include a power consumption controller 14, and each processor core may also be provided with a frequency regulator, and the power consumption controller 14 may be associated with each processor.
  • the frequency regulator communication connection in the core in this way, when overclocking a certain processor core, 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 control instruction according to the frequency control instruction.
  • the frequency of the processor core for example, is adjusted to be higher than the maximum frequency set by the manufacturer to make the processor core enter the overclocking state, or adjusted to be lower than the frequency corresponding to the overclocking state to exit the overclocking state. It should be understood that FIG.
  • the frequency regulator may be set only in one or several processor cores.
  • the power consumption controller 14 may only A processor core provided with a frequency regulator performs frequency control.
  • frequency regulators may also be set in one or more voltage domains.
  • the power consumption controller 14 may separately perform frequency control on the processor cores in each voltage domain where the frequency regulators are set.
  • a frequency regulator may also be set in the non-core components.
  • the power consumption controller 14 can not only control the frequency of the processor core, but also control the frequency of the non-core components.
  • the non-core components mentioned here refer to the components that work according to the set frequency.
  • the power consumption control in this application may 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 specifically limited in this application.
  • the power consumption controller 14 may also be connected to a voltage conversion circuit corresponding to each voltage domain, and the voltage conversion circuit may be a Buck circuit or a switched capacitor (Switched capacitor). Capacitor, SC) circuit, and of course other circuits that can realize the step-down function.
  • the power consumption controller 14 can reduce the operating voltage of each processor core located in the voltage domain by increasing the step-down ratio of the voltage conversion circuit corresponding to a certain voltage domain, so as to reduce the operating voltage of each processor located in the voltage domain
  • the power consumption of the core can also be increased by reducing the step-down ratio of the voltage conversion circuit corresponding to a certain voltage domain to increase the operating voltage of each processor core located in the voltage domain, so as to improve the overclocking performance.
  • the frequency regulator shown in FIG. 1 can also be replaced with other components that can realize the power consumption adjustment function, such as a voltage regulator or a current regulator, and of course, they can also be collectively referred to as power consumption regulators, which is also referred to in this application. There is no specific limitation.
  • the power consumption control method in this application is described below by taking controlling the power consumption of each processor core in one voltage domain (assuming the first voltage domain) as an example, aiming at controlling the power consumption of each processor core in other voltage domains or The power consumption of non-processor cores will not be described in detail.
  • FIG. 2 exemplarily shows a schematic flowchart corresponding to a power consumption control method provided by an embodiment of the present application, and the method is applicable to a power consumption controller, such as the power consumption controller 14 shown in FIG. 1 .
  • the power consumption controller may execute the following power consumption control methods in a periodic manner.
  • FIG. 2 exemplarily describes the primary power consumption control process of the power consumption controller. As shown in FIG. 2 , the method includes:
  • Step 201 the power consumption controller acquires the temperature of the first voltage domain.
  • the temperature of the first voltage domain may refer to the temperature of any processor core located in the first voltage domain, or may refer to the average temperature of each processor core located in the first voltage domain, or It may refer to the highest temperature of each processor core located in the first voltage domain, which is not specifically limited.
  • the power consumption controller may first determine from each processor core of the processor For each target processor core belonging to the first voltage domain, the temperature corresponding to each target processor core is obtained, and the highest temperature among the temperatures corresponding to each target processor core is used as the temperature of the first voltage domain. In this way, a targeted temperature acquisition operation can be performed only on the processor core in the voltage domain whose power consumption needs to be adjusted, and it is not necessary to acquire the temperature of all the processor cores, which is more helpful for saving resources.
  • 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.
  • the higher the power consumption threshold ie the power consumption waterline corresponding to the power consumption adjustment strategy
  • the power consumption of the processor core is less likely to reach the power consumption threshold, so the power consumption of the processor core in the overclocking state is higher, and the higher the power consumption, the higher the temperature, so the processor core The easier it is to trigger the temperature waterline corresponding to the temperature adjustment strategy, causing the processor core to downclock or directly exit the overclocking state.
  • the power consumption controller may set the power consumption threshold of the first voltage domain to be lower, so that , the power consumption of the first voltage domain is more likely to trigger the power consumption threshold, so it is easier for the processor core in the first voltage domain to execute the power consumption adjustment strategy to reduce power consumption, and the temperature corresponding to the reduced power consumption will also be Therefore, the temperature of the first voltage domain is less likely to trigger the temperature water line corresponding to the temperature adjustment strategy, and the processor core in the first voltage domain is less likely to trigger the temperature adjustment strategy.
  • the power consumption adjustment strategy is generally to adjust the power consumption in a step-by-step way of reducing the power consumption (for example, reduce a small power consumption first, and determine whether the reduced power consumption still exceeds the power consumption threshold, if not, then No longer reduce power consumption, if it still exceeds, continue to reduce power consumption), and will not directly exit the overclocking state, so this method reduces the power consumption threshold when the temperature is high, which actually reduces the conditions for triggering the power consumption adjustment strategy. , so that the first voltage domain can continue to maintain the overclocking state by slowly reducing power consumption, and it can also reduce the possibility of triggering the temperature adjustment strategy to exit the overclocking state.
  • the processor core is maintained in an overclocked state for a long time, which helps to improve the overclocking performance of the processor.
  • a certain linear relationship may be set between the temperature rise value of the first voltage domain and the power consumption threshold reduction value of the first voltage domain.
  • the first voltage The power consumption threshold of the first voltage domain can be reduced by several watts corresponding to the linear relationship for every few degrees of increase in the temperature of the domain.
  • several temperature rise value intervals and power consumption thresholds corresponding to the several temperature rise value intervals may also be preset.
  • the power consumption threshold of the first voltage domain may be set to the power consumption threshold corresponding to the temperature rise value interval.
  • several temperature ranges and power consumption thresholds corresponding to these several temperature ranges may also be preset, and when the temperature of the first voltage domain is in a certain temperature range, the first voltage The power consumption threshold of the domain is set to the power consumption threshold corresponding to the temperature range.
  • 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.
  • the power consumption threshold of the first voltage domain is used to limit the power consumption of the first voltage domain.
  • 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.
  • the power consumption controller may generate a frequency reduction control command and send it to a device located in the first voltage domain.
  • Each frequency controller connected to each processor core enables each frequency controller to reduce the frequency of each processor core in the first voltage domain according to the frequency reduction control instruction. In this way, power consumption can be reduced by frequency reduction.
  • the power consumption controller can also simultaneously reduce the frequency and be in the first place. The frequency of each processor core in the voltage domain and the working voltage of the first voltage domain are used to keep the processor core in a low-voltage and low-frequency state and improve the power utilization rate of the processor core.
  • the power consumption controller can determine the corresponding relationship between the preset frequency and operating voltage.
  • the preset corresponding relationship can be determined by those skilled in the art in advance.
  • the preset corresponding relationship corresponding to each processor core may be the same or different.
  • the power consumption controller can also increase the power consumption of the first voltage domain, so as to improve the working performance of the first voltage domain.
  • the power consumption controller can send up-frequency control instructions to each frequency controller connected to each processor core in the first voltage domain to increase the frequency of each processor core in the first voltage domain, and considering that the processor The high frequency state of the core may be driven by a high voltage, so the power consumption controller can also simultaneously send a boost control command to the voltage conversion circuit corresponding to the first voltage domain to increase the working voltage of the first voltage domain.
  • the working voltage of the voltage domain is actually the working voltage corresponding to the processor core with the highest frequency.
  • the operating voltage of other processor cores in this voltage domain is the same as the operating voltage of the processor core with the highest frequency, but the frequency of other processor cores may be lower than the frequency of the processor core with the highest frequency, which It will cause other processor cores to be in a high voltage and low frequency state, and the power utilization of other processor cores is low.
  • the present application can set each processor core to be located in a voltage domain, so that the working voltage of each processor core can correspond to its own frequency, so that the power utilization rate of each processor core can be higher.
  • the power consumption threshold of the voltage domain can be matched with the current temperature, and adjusting the power consumption based on the power consumption threshold actually considers
  • this can not only improve the accuracy of overclocking adjustment, but also make the power consumption threshold of the voltage domain change flexibly with temperature changes, which also helps to improve the flexibility of overclocking adjustment.
  • 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, while Do not directly trigger the temperature adjustment strategy to avoid directly exiting the overclocking state, thereby improving the overclocking performance of the processor.
  • the power consumption control method in the embodiment of the present application is described below with a specific embodiment. In this example, it is assumed that the power consumption controller implements power consumption control by controlling the frequency.
  • FIG. 3 exemplarily shows a specific flowchart of a power consumption control method provided by an embodiment of the present application.
  • the method is applicable to a power consumption controller, such as the power consumption controller 14 shown in FIG. 1 .
  • Fig. 3 exemplifies the primary power consumption control process of the power consumption controller.
  • the method includes:
  • Step 301 the power consumption controller acquires the temperature of each processor core.
  • the power consumption controller may acquire the temperature of each processor core in various ways, and several optional implementation manners are exemplarily introduced below.
  • each processor core may also be provided with a temperature sensor, such as a temperature sensor, and the temperature sensor and the power consumption controller are connected through a communication line.
  • a temperature sensor such as a temperature sensor
  • Each temperature sensor set in each processor core can sample the temperature of each processor core according to the first set period, and send the sampled temperature to the power consumption through the communication line between the temperature sensor and the power consumption controller.
  • the first set period can be set by those skilled in the art based on experience. For example, in order to improve the accuracy of the sampling temperature, the first set period can be set to 100um. In this way, each temperature sensor can sample the location every 100um.
  • the temperature of the processor core is sent to the power controller.
  • the power consumption controller can directly obtain the temperature of each processor core through a measurement method. Although a temperature sensor needs to be set in the processor core in this method, the measured temperature is more accurate, which is helpful for improving the Accuracy of power regulation.
  • each processor core may further be provided with a power consumption sensor, and the power consumption sensor and the power consumption controller are also connected through a communication line.
  • the power consumption sensor set in each processor core can sample the number of inversions of each signal in the processor core according to the second set period, and then according to the number of inversions of each signal and the power consumption corresponding to one inversion of the signal , determine the power consumption of each signal in a second set period, calculate the total power consumption of the processor core in a second set period according to the power consumption of each signal in a second set period, and then The total power consumption is sent to the power consumption controller through the communication line preceding the power consumption sensor and the power consumption controller.
  • the power consumption controller may also determine the temperature corresponding to the total power consumption of the processor core according to the preset corresponding relationship between power consumption and temperature, and use the temperature as the temperature of the processor core.
  • the power consumption controller can obtain the temperature of each processor core through indirect calculation.
  • the indirect calculation method is not as accurate as the measurement method, this method does not need to be installed in the processor core.
  • Temperature sensor to help save processor core footprint and design cost. It can be understood that "obtaining the temperature of the processor core indirectly through the power consumption sensor" is only an optional implementation manner, and in other optional implementation manners, the power consumption controller may also acquire the processor core through other indirect methods.
  • the temperature of the processor core for example, predicting the temperature of the processor core through the temperature of the processor core at various historical moments, etc., will not be introduced too much here.
  • a temperature sensor may also be set in a part of the processor cores, and a power consumption sensor may be set in another part of the processor cores, so that the The temperature can be measured in real time through a temperature sensor, and the temperature of another part of the processor core can be indirectly calculated through the power consumption measured in real time by the power consumption sensor.
  • the number of processor cores for setting the temperature sensor and the number of processor cores for setting the power consumption sensor can be determined by those skilled in the art based on experience, which is not specifically limited in this application.
  • "setting a temperature sensor or a power consumption sensor in each processor core to determine the temperature of each processor core” is only an optional implementation manner, and in other optional implementation manners , it is also possible to set a shared temperature sensor or a shared power consumption sensor in two or more processor cores.
  • the power consumption controller can subsequently compensate the temperature sensor sampling according to a certain strategy temperature to get the temperature of each processor core.
  • the power consumption controller can subsequently distribute the power consumption sampled by the power consumption sensor according to a certain proportion. to get the power consumption of each processor core.
  • the specific strategy or ratio to be used can be set by those skilled in the art based on experience, which will not be described here.
  • Step 302 the power consumption controller selects each processor core 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 first temperature. temperature in a voltage domain.
  • the first voltage domain may be a voltage domain where any processor core included in the processor is located.
  • the solution in this application can only adjust the power consumption of the voltage domain where a certain processor core is located, or can adjust the power consumption of the voltage domain where some processor cores are located, and can also adjust the voltage domain where all the processor cores are located at the same time. Power consumption adjustment is performed separately, which is not specifically limited.
  • the power consumption controller may sort the temperatures of these processor cores in descending order of temperature, and then sort the temperatures of the processor cores in the obtained order.
  • the temperature of the team head is taken as the temperature of the first voltage domain.
  • the power consumption controller may sort the temperatures of these processor cores in ascending order of temperature, and then use the temperature at the end of the queue in the obtained sorting as the temperature of the first voltage domain.
  • Step 303 the power consumption controller allocates the power consumption of the processors according to the load of each processor core and the load of each processor core in the first voltage domain, and obtains the allocated power consumption of the first voltage domain.
  • the load of any processor core may be determined according to the power consumption, frequency and voltage of the processor core.
  • each processor core may further be provided with a voltage sampler, and the voltage sampler may also sample the voltage of the processor core where it is located according to the second set period and report it to the power consumption controller.
  • the power consumption controller can obtain the voltage of the processor core through the voltage collector, obtain the power consumption of the processor core through the power consumption sensor, and obtain the power consumption of the processor core through the frequency regulator. After obtaining the frequency of the processor core, the power consumption controller can calculate the load of the processor core according to the following formula (1.1):
  • 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
  • V is the voltage of the processor core.
  • the power consumption controller can first add up the loads of all the processor cores included in the processor to calculate the total load of the processor, and then calculate the total load of the processor.
  • the loads of the processor cores in the same voltage domain are summed to obtain the load of the first voltage domain, and then the ratio of the load of the first voltage domain to the total load of the processor can be calculated, and this ratio marks the first
  • the current load in the voltage domain accounts for the load proportion of the total load in the processor.
  • the current load in the first voltage domain can be used to indicate the power consumption to be consumed by the first voltage domain in the future. When the current load in the first voltage domain is larger, it means that the first voltage domain may consume power in the future. Consume greater power consumption.
  • the power consumption controller may allocate power consumption to the first voltage domain by utilizing the load ratio of the first voltage domain. For example, the power consumption controller may directly calculate the product of the load proportion occupied by the first voltage domain and the power consumption of the processor (for example, rated power consumption or maximum power consumption, etc.), and use the product as the allocated power of the first voltage domain. consumption.
  • the power consumption controller may first calculate the correction coefficient corresponding to the first voltage domain according to the deviation between the historical allocated power consumption of the first voltage domain and the historical real power consumption, and then calculate the load proportion occupied by the first voltage domain and The product of the power consumption of the processor obtains the allocated power consumption of the first voltage domain before correction, and then uses the correction coefficient to correct the allocated power consumption, and uses the corrected allocated power consumption as the allocated power consumption of the first voltage domain.
  • 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 match the likely future consumption of the first voltage domain with a high probability. Real power consumption, this method can allocate enough power consumption to the first voltage domain to meet the power consumption requirement of the first voltage domain, and will not allocate too much power consumption to the first voltage domain to cause performance waste.
  • the power consumption controller may first obtain a power consumption prediction model according to historical power consumption simulation in the first voltage domain, and then use the power consumption prediction model.
  • the power consumption prediction model predicts the future power consumption of the first voltage domain, and uses the future power consumption as the allocated power consumption of the first voltage domain.
  • the power consumption controller may also predict the future load according to the current load and historical load of the first voltage domain, and then execute the above-mentioned power consumption distribution scheme using the future load. It should be understood that as long as the solutions that can allocate power consumption for each voltage domain can be included in the protection scope of the present application, the present application will not describe them one by one.
  • Step 304 the power consumption controller determines the temperature range in which the temperature of the first voltage domain is located, and uses the adjustment coefficient corresponding to the temperature range and the allocated power consumption of the first voltage domain to calculate the power consumption threshold of the first voltage domain.
  • a preset temperature range [T min , T max ] may also be set in the power consumption controller, and the preset temperature range [T min , T max ] may be divided into at least Two temperature intervals, each of the at least two temperature intervals may correspond to an adjustment coefficient.
  • FIG. 4 exemplarily shows a corresponding relationship diagram of each temperature interval and each adjustment coefficient provided by an embodiment of the present application. In this example, it is assumed that the values in the first column corresponding to the second row to the n+1th row are The temperature intervals are referred to as the first temperature interval (T 1 , T max ], the second temperature interval (T 2 , T 1 ], the third temperature interval (T 3 , T 2 ], ..., the nth temperature interval, respectively.
  • Ni shown in Figure 4 refers to the temperature coefficient corresponding to the i -th temperature interval.
  • i is a positive integer less than or equal to n
  • n is greater than or equal to 2 A positive integer
  • Fig. 4 Exemplarily, the product of the distribution power consumption of the voltage domain and the adjustment coefficient corresponding to the temperature interval in which the temperature of the voltage domain is located is used as the power consumption threshold of the voltage domain.
  • the power consumption controller is determining the temperature of the first voltage domain. And after calculating the distributed power consumption of the first voltage domain, the corresponding relationship can be queried to determine the adjustment coefficient corresponding to the temperature range in which the first voltage domain is located, and then the product of the adjustment coefficient and the distributed power consumption can be directly calculated, and the The product is used as the power consumption threshold of the first voltage domain.
  • the adjustment coefficient N 1 and the adjustment coefficient N can also be set. 2.
  • the adjustment coefficient N 3 , ..., the adjustment coefficient N n is a real number not less than 1, so that the adjustment coefficient and the power consumption allocated to the first voltage domain are used as the power consumption threshold of the first voltage domain, so that the first voltage can be guaranteed
  • the power consumption threshold of the domain is not less than the allocated power consumption of the first voltage domain.
  • the at least two adjustment coefficients corresponding to the at least two temperature intervals may decrease as the temperature in the at least two temperature intervals increases.
  • Fig. 4 that is: since the temperature in the first temperature interval (T 1 , T max ]>the temperature in the second temperature interval (T 2 , T 1 ]> the third temperature interval (T 3 , Temperature in T 2 ] >... > temperature in the nth temperature interval (T min , T n ], therefore, adjustment coefficient N 1 , adjustment coefficient N 2 , adjustment coefficient N 3 , ..., adjustment coefficient N n Decrease in sequence, namely: N 1 >N 2 >N 3 >... >N n ⁇ 1.
  • the preset temperature range [T min , T max ] can be set according to various rules, for example:
  • the minimum temperature in the preset temperature range [T min , T max ] can be a small temperature value that is basically impossible to reach, such as -120 degrees (generally, the processor core The processor core will crash when the temperature has not yet dropped to -120 degrees), correspondingly, the maximum temperature in the preset temperature range [T min , T max ] can be a larger temperature that is basically impossible to reach value, such as 120 degrees (generally, the processor core fails when the temperature of the processor core has not reached 120 degrees).
  • the temperature of each processor core is bound to be within the preset temperature range, so that the highest temperature in each processor core (that is, the first The temperature of the voltage domain) is bound to be within a certain temperature range in the preset temperature range.
  • the preset temperature range [T min , T max ] can be set according to each temperature water line used in the temperature adjustment strategy.
  • Each temperature waterline in the temperature adjustment strategy may correspond to different time dimensions, and as the time dimension increases, the temperature waterline corresponding to each time dimension may gradually decrease.
  • the temperature waterline 1 corresponds to the time dimension of 5 seconds
  • the temperature waterline 2 corresponds to the time dimension of 0.5 seconds
  • the minimum temperature T min in the preset temperature range may refer to the lowest temperature in each temperature water line
  • the maximum temperature T max in the preset temperature range may refer to the highest temperature in each temperature water line temperature
  • the temperature of the first voltage domain may not be within the preset temperature range.
  • the power consumption controller can directly consider that the temperature belongs to the temperature range where the minimum temperature is located. If the temperature is higher than the maximum temperature in the preset temperature range, the power consumption controller may directly consider that the temperature belongs to the temperature range where the maximum temperature is located.
  • the preset temperature range may also be set by those skilled in the art based on experience, which is not specifically limited in the present application.
  • 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.
  • the power consumption controller may send a frequency reduction signal to the frequency regulator in each processor core in the first voltage domain
  • the control instruction is used to cause the frequency regulator of each processor core in the first voltage domain to adjust the frequency of the processor core where it is located to a frequency lower than the current frequency.
  • the frequency reduction control command can correspond to the following situations:
  • the frequency reduction control instruction carries a target frequency reduction frequency
  • the target frequency reduction frequency can be the rated operating frequency of the processor core, or another frequency lower than the current frequency.
  • any frequency regulator can first analyze the target frequency reduction frequency from the frequency reduction control command, and then compare the current frequency of the processor core where it is located and the target frequency reduction frequency, if the current frequency If the frequency is higher than the target frequency reduction frequency, the frequency regulator can reduce the frequency of the processor core where it is located to the target frequency reduction frequency. If the current frequency is lower than the target frequency reduction frequency, the frequency regulator can not adjust the frequency of the processor core. frequency, or increase the frequency of the processor core where it is located to the target downclock frequency to maximize the processing performance of the processor core.
  • the frequency reduction control instruction may also be just a frequency reduction instruction, and after receiving the frequency reduction control instruction, any frequency regulator may lower the frequency of the processor core where it is located.
  • the different frequency regulators can down-clock their respective processor cores to the same frequency, or down-convert their respective processor cores to different frequencies according to their own needs, which is not specifically limited.
  • the power consumption of the first voltage domain when the power consumption of the first voltage domain is much smaller than the power consumption threshold of the first voltage domain, it indicates that the current power consumption of the first voltage domain is relatively low, which may be due to the fact that the first voltage domain is in the first voltage domain. This is caused by the fact that the processor cores in the first voltage domain do not enter the overclocking state, or it may be caused by the fact that the processor cores in the first voltage domain are running at a lower frequency. There is also some thermal headroom available.
  • the power consumption controller may
  • the frequency regulator in the processor core sends an up-frequency control instruction, so that the frequency regulator of each processor core in the first voltage domain adjusts the frequency of the processor core where it is located to a frequency higher than the current frequency.
  • the up-frequency control command can correspond to the following situations:
  • the up-conversion control instruction carries a target up-conversion frequency
  • the target up-conversion frequency is set by the power consumption controller according to the power consumption of the first voltage domain.
  • the power consumption controller also stores A correspondence between at least one power consumption and at least one target up-conversion frequency.
  • the power consumption controller may first query the correspondence to determine the first voltage
  • the target upscaling frequency corresponding to the power consumption of the domain is generated, and then an upscaling control instruction is generated based on the target upscaling frequency, and sent to each frequency regulator in each processor core in the first voltage domain.
  • any frequency regulator can first obtain the target upscaling frequency from the upscaling control instruction, and then compare the current frequency of the processor core where it is located and the target upscaling frequency, If the current frequency is lower than the target upscaling frequency, the frequency regulator can increase the frequency of the processor core where it is located to the target upscaling frequency; if the current frequency is higher than the target upscaling frequency, the frequency regulator can not adjust the processing frequency of the processor core. In this way, even if the frequency of a certain processor core is very high in the first voltage domain, this method will not continue to increase the frequency of the processor core, thereby helping to maintain the lifespan and stability of the processor core.
  • the up-frequency control instruction can also be just an up-frequency instruction.
  • any frequency regulator can up-frequency the processor core where it is located.
  • the different frequency regulators can up-convert their respective processor cores to the same frequency, or can up-convert their respective processor cores to different frequencies according to their own needs, which is not specifically limited.
  • the power consumption threshold of the first voltage domain may refer to any one or any multiple power consumption thresholds in the power consumption adjustment strategy.
  • the processor may correspond to at least two power consumption thresholds, and the at least two power consumption thresholds respectively correspond to different time dimensions.
  • the power consumption threshold can be gradually reduced.
  • the first power consumption threshold corresponds to the time dimension of 0.3 seconds (actually it is the average power consumption within 0.3 seconds, but the period of 0.3 seconds is short, so it can also be considered as Instantaneous power consumption)
  • the second power consumption threshold corresponds to the time dimension of 3 seconds, then when the average power consumption of each processor core in the first voltage domain in the past 3 seconds exceeds the second power consumption threshold, or in the first voltage domain
  • the power consumption of each processor core in the first voltage domain needs to be reduced (eg, frequency reduction and step-down).
  • This power consumption adjustment strategy integrates power consumption thresholds of multiple time dimensions to realize 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.
  • FIG. 5 exemplarily shows a schematic diagram of a power consumption change in which power consumption is adjusted according to the above-mentioned power consumption adjustment strategy.
  • the power consumption adjustment strategy there are a first power consumption threshold TDP (also referred to as PL1 ) and The second power consumption threshold PL2 (also called 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 smaller than the second power consumption threshold PL2.
  • the power consumption controller can adjust the ratio of the second power consumption threshold PL2 to the first power consumption threshold TDP in real time according to the temperature of the first voltage domain:
  • the ratio of the second power consumption threshold PL2 to the first power consumption threshold TDP is smaller, so that the second power consumption threshold PL2 is closer to the first power consumption threshold TDP (for example, as shown in FIG. 5 ).
  • the instantaneous power consumption in the first voltage domain is easier to trigger The second power consumption threshold PL2, thereby causing the first voltage domain to be down-converted.
  • this frequency reduction operation does not directly reduce the power consumption of the first voltage domain to below the first power consumption threshold TDP, but slowly reduces until it reaches the second power consumption threshold PL2, so the first voltage domain only performs Downclocking without exiting overclocking state.
  • the ratio of the second power consumption threshold PL2 to the first power consumption threshold TDP is larger, so that the second power consumption threshold PL2 is farther away from the first power consumption threshold TDP (for example, as shown in FIG. 5 ).
  • the power consumption waterline L4 In this case, when the first power consumption threshold TDP in the long time dimension is not triggered, since the value of the second power consumption threshold PL2 in the short time dimension becomes larger, the instantaneous power consumption in the first voltage domain is higher. It is not easy to trigger the second power consumption threshold PL2, so that the first voltage domain can continue to be up-converted until it reaches the second power consumption threshold PL2. This way helps to further increase the power consumption of the first voltage domain when the temperature is controllable, so as to improve the processing performance of the processor.
  • FIG. 6 is a schematic structural diagram of a power consumption controller 600 provided by an embodiment of the present application.
  • the power consumption controller 600 may be a chip or a circuit, such as a chip or a circuit that may be provided in a processor.
  • the power consumption controller 600 may correspond to the power consumption controller 14 in the above method.
  • the power consumption controller 600 may implement the steps of any one or more of the corresponding methods shown in FIG. 2 and FIG. 3 above.
  • the power consumption controller 600 may include a monitoring circuit 601 and a processing circuit 602 .
  • the power consumption controller 600 may further include a bus system, and the monitoring circuit 601 and the processing circuit 602 may be connected through the bus system.
  • the monitoring circuit 601 can also be connected to the temperature sensor and/or the power consumption sensor of each processor core through the bus system
  • the processing circuit 602 can also be connected to the frequency regulator of each processor core through the bus system.
  • the monitoring circuit 601 may acquire the temperature of the first voltage domain in the processor through a temperature sensor and/or a power consumption sensor of each processor core.
  • the processing circuit 602 may 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. Wherein, 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.
  • FIG. 7 is a schematic structural diagram of another power consumption controller 700 provided by an embodiment of the present application.
  • the power consumption controller 700 may be a chip or a circuit, such as a chip or a circuit that may be provided in a processor.
  • the power consumption controller 700 may correspond to the power consumption controller 14 in the above method.
  • the power consumption controller 700 may implement the steps of any one or more of the corresponding methods shown in FIG. 2 and FIG. 3 above.
  • the power consumption controller 700 may include an acquisition unit 701 , a determination unit 702 and an adjustment unit 703 .
  • the acquiring unit 701 may be a receiving unit or a receiver when receiving information, and the receiving unit or the receiver may be a radio frequency circuit.
  • the obtaining unit 701 may obtain the temperature of the first voltage domain in the processor
  • the determining unit 702 may determine the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain
  • the adjusting unit 703 may be based on the first voltage domain
  • the power consumption threshold of the first voltage domain adjusts the power consumption 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.
  • each unit in the above-mentioned power consumption controller 700 may refer to the implementation of the corresponding method embodiments, which will not be repeated here.
  • the above division of the units of the power consumption controller 700 is only a division of logical functions, and may be fully or partially integrated into one physical entity in actual implementation, or may be physically separated.
  • the acquiring unit 701 may be implemented by the monitoring circuit 601 in FIG. 6 above
  • the determining unit 702 and the adjusting unit 703 may be implemented by the processing circuit 602 in FIG. 6 above.
  • the present application also provides a computer program product, the computer program product includes: computer program code, when the computer program code is run on a computer, the computer is made to execute the steps shown in FIG. 1 to FIG. 5 .
  • the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores program codes, and when the program codes are run on a computer, the computer is made to execute FIG. 1 to FIG. 5 .
  • the present application also provides an electronic device, the electronic device includes a processor, the processor is coupled to a memory, and the processor is configured to execute a computer program stored in the memory, so that the electronic device executes FIG. 1 To the method of any one of the embodiments shown in FIG. 5 .
  • a component may be, but is not limited to, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer.
  • an application running on a computing device and the computing device may be components.
  • One or more components may reside within a process and/or thread of execution, and a component may be localized on one computer and/or distributed between two or more computers.
  • these components can execute from various computer readable media having various data structures stored thereon.
  • a component may, for example, be based on a signal having one or more data packets (eg, data from two components interacting with another component between a local system, a distributed system, and/or a network, such as the Internet interacting with other systems via signals) Communicate through local and/or remote processes.
  • data packets eg, data from two components interacting with another component between a local system, a distributed system, and/or a network, such as the Internet interacting with other systems via signals
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may 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: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Abstract

A power consumption control method and device, for use in improving flexibility and accuracy of overclocking adjustment. The method comprises: a power consumption controller first obtains the 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 then adjusts power consumption of the first voltage domain on the basis of the power consumption threshold of the first voltage domain. The method allows for matching of the power consumption threshold of the first voltage domain and the current temperature; adjusting power consumption on the basis of the power consumption threshold actually considers the dual effects of the power consumption and the temperature; and therefore, the method can not only improve the accuracy of overclocking adjustment, but also enable the power consumption threshold of the first voltage domain to flexibly change along with the change of the temperature, thereby further allowing for improvement of the flexibility of overclocking adjustment.

Description

一种功耗控制方法及装置Method and device for controlling power consumption 技术领域technical field
本申请涉及处理器技术领域,尤其涉及一种功耗控制方法及装置。The present application relates to the technical field of processors, and in particular, to a power consumption control method and apparatus.
背景技术Background technique
在电子设备出厂时,电子设备中的元件(例如处理器核心)通常定义有一些标准的工作范围,例如额定工作频率、额定工作电压等。正常情况下处理器核心都是按照额定工作频率来执行处理操作。然而,当处理器核心具有超频功能时,若额定工作频率不满足处理器核心当前的工作场景的需求,则可以将处理器核心的频率提高至额定工作频率之上,以提高处理器核心的处理性能。When an electronic device leaves the factory, the components in the electronic device (for example, a processor core) are usually defined with some standard operating ranges, such as a rated operating frequency, a rated operating voltage, and the like. Under normal circumstances, the processor core performs processing operations at the rated operating frequency. However, when the processor core has an overclocking function, if the rated operating frequency does not meet the requirements of the current working scenario of the processor core, the frequency of the processor core can be increased above the rated operating frequency to improve the processing efficiency of the processor core. performance.
然而,当处理器核心处于超频状态时,处理器核心可能会长时间以高频高压的状态运行,从而导致处理器核心出现过热或过流等现象。为了解决这个问题,现有技术在超频状态下设置了一种功耗调节策略,在该策略中:如果处理器核心的功耗超过预先设定的功耗阈值,则降低该处理器核心的功耗,以缓和处理器核心的高频高压状态,或结束处理器核心的超频状态。虽然这种方式能够避免处理器核心出现过热或过流等现象,但是其基于固定的功耗阈值来调节功耗,这不仅会降低超频调节的灵活性,还会使超频调节的准确性依赖于所设置的功耗阈值,有可能导致超频调节出现偏差。However, when the processor core is in an overclocked state, the processor core may run at a high frequency and high voltage for a long time, resulting in overheating or overcurrent of the processor core. In order to solve this problem, the prior art sets a power consumption adjustment strategy in the overclocking state, in this strategy: if the power consumption of the processor core exceeds a preset power consumption threshold, reduce the power consumption of the processor core power consumption to ease the high frequency and high voltage state of the processor core, or end the overclocking state of the processor core. Although this method can prevent the processor core from overheating or overcurrent, it adjusts power consumption based on a fixed power consumption threshold, which not only reduces the flexibility of overclocking adjustment, but also makes the accuracy of overclocking adjustment dependent on The power consumption threshold set may cause deviations in overclocking adjustment.
发明内容SUMMARY OF THE INVENTION
本申请提供一种功耗控制方法及装置,用以提高超频调节的灵活性和准确性。The present application provides a power consumption control method and device to improve the flexibility and accuracy of overclocking adjustment.
第一方面,本申请提供一种功耗控制方法,该方法适用于功耗控制器,该方法包括:功耗控制器先获取处理器中的第一电压域的温度,再根据第一电压域的温度确定第一电压域的功耗阈值,然后基于第一电压域的功耗阈值调节第一电压域的功耗。其中,当第一电压域的功耗超过第一电压域的功耗阈值时,功耗控制器可以降低第一电压域的功耗。在上述设计中,通过结合第一电压域的温度来调节第一电压域的功耗阈值,能使第一电压域的功耗阈值与当前的温度相匹配,基于该功耗阈值调节功耗实际上考虑到了功耗和温度的双重影响,这不仅能提高超频调节的准确性,还能使第一电压域的功耗阈值随着温度的变化而灵活变化,从而还有助于提高超频调节的灵活性。更进一步的,相对于单一的温度调节策略或功耗调节策略来说,基于该方式,还能尽量利用功耗调节策略通过缓慢调节功耗来维持电压域中各处理器核心的超频状态,而不直接触发温度调节策略以避免直接退出超频状态,从而还能提升处理器的超频性能。In a first aspect, the present application provides a power consumption control method, which is applicable to a power consumption controller. The method includes: the power consumption controller first obtains the temperature of a first voltage domain in the processor, and then according to the first voltage domain The temperature of the first voltage domain determines the power consumption threshold of the first voltage domain, and then adjusts the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain. Wherein, when the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain, the power consumption controller may reduce the power consumption of the first voltage domain. In the above design, by adjusting the power consumption threshold of the first voltage domain in combination with the temperature of the first voltage domain, the power consumption threshold of the first voltage domain can be matched with the current temperature, and the actual power consumption can be adjusted based on the power consumption threshold. Considering the dual effects of power consumption and temperature, this can not only improve the accuracy of overclocking adjustment, but also make the power consumption threshold of the first voltage domain change flexibly with the change of temperature, which also helps to improve the overclocking adjustment. flexibility. Further, compared with a single temperature adjustment strategy or power consumption adjustment strategy, based on this method, 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, while Do not directly trigger the temperature adjustment strategy to avoid directly exiting the overclocking state, thereby improving the overclocking performance of the processor.
在一种可选地设计中,功耗控制器基于第一电压域的功耗阈值调节第一电压域的功耗,包括:功耗控制器如果检测到第一电压域的功耗超过第一电压域的功耗阈值,则可以降低第一电压域的功耗。这种方式能在第一电压域的功耗较高时及时降低第一电压域的功耗,从而有助于避免第一电压域的功耗过高而导致过流或过热现象发生。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 controller detects that the power consumption of the first voltage domain exceeds the first voltage domain The power consumption threshold of the voltage domain can reduce the power consumption of the first voltage domain. In this way, the power consumption of the first voltage domain can be reduced in time when the power consumption of the first voltage domain is relatively high, thereby helping to avoid the occurrence of overcurrent or overheating caused by the excessively high power consumption of the first voltage domain.
在一种可选地设计中,功耗控制器获取处理器中的第一电压域的温度,包括:功耗控制器先从处理器的各处理器核心中确定出处于第一电压域中的各目标处理器核心,然后获取各目标处理器核心分别对应的温度,之后将各目标处理器核心分别对应的温度中的最高 温度作为第一电压域的温度。该设计实际上是基于第一电压域中处于最高温度的处理器核心的功耗来调节第一电压域的整体功耗,只要处于最高温度的处理器核心不出现过流过热现象,那么第一电压域中的其它处理器核心也大概率不会出现过流过热现象,因此这种方式不仅能及时调节第一电源域的功耗,还能具有较好地调节效果。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 the temperature in the first voltage domain from each processor core of the processor. Each target processor core then acquires the temperature corresponding to each target processor core, and then uses 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 at the highest temperature in the first voltage domain. As long as the processor core at the highest temperature does not experience overheating, then the first There is a high probability that other processor cores in the voltage domain will not experience overcurrent and overheating. Therefore, this method can not only adjust the power consumption of the first power domain in time, but also has a better adjustment effect.
在一种可选地设计中,功耗控制器根据第一电压域的温度确定第一电压域的功耗阈值,包括:功耗控制器先确定第一电压域的温度所处的目标温度区间,再将该目标温度区间所对应的功耗阈值确定为第一电压域的功耗阈值。其中,目标温度区间可以为至少两个温度区间中的任一温度区间,至少两个温度区间中的每个温度区间可以对应一个功耗阈值。针对于至少两个温度区间中的任一温度区间:当该温度区间中的温度越高时,该温度区间所对应的功耗阈值也就越小。该设计在温度较高时降低功耗阈值,实际上降低了触发功耗调节策略的条件,这样既能使第一电压域通过缓慢降低功耗的方式继续维持超频状态,又能降低触发温度调节策略导致退出超频状态的可能性,因此这种方式能尽量让第一电压域中的各处理器核心长时间地维持在超频状态,有助于提高处理器的超频性能。In an optional 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 range 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 may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to a power consumption threshold. For any one of the at least two temperature intervals: when the temperature in the temperature interval is higher, the power consumption threshold corresponding to the temperature interval is also smaller. This design reduces the power consumption threshold when the temperature is high, which actually reduces the conditions for triggering the power consumption adjustment strategy, which not only enables the first voltage domain to continue to maintain the overclocking state by slowly reducing power consumption, but also reduces the trigger temperature adjustment. The strategy leads to the possibility of exiting the overclocking state, so this method can try to keep 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.
在一种可选地设计中,功耗控制器根据第一电压域的温度确定第一电压域的功耗阈值,包括:功耗控制器先确定第一电压域的温度所处的目标温度区间,再根据第一电压域的分配功耗和目标温度区间对应的调节系数,计算得到第一电压域的功耗阈值。其中,第一电压域的分配功耗为功耗控制器根据第一电压域的负载和处理器的总负载预先为第一电压域分配的功耗。其中,目标温度区间可以为至少两个温度区间中的任一温度区间,至少两个温度区间中的每个温度区间可以对应一个调节系数。该设计利用温度区间和分配功耗来确定功耗阈值,不仅能使功耗阈值匹配当前温度,还能使其匹配当前负载,因此基于该功耗阈值调节功耗更能满足当前的工作环境需求。In an optional 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 range 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 distribution 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 pre-allocated by the power consumption controller for the first voltage domain according to the load of the first voltage domain and the total load of the processor. The target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to an adjustment coefficient. The design uses the temperature range and the power distribution to determine the power consumption threshold, which can not only match the power consumption threshold to the current temperature, but also make it match the current load. Therefore, adjusting the power consumption based on the power consumption threshold can better meet the needs of the current working environment .
在一种可选地设计中,至少两个温度区间对应的调节系数随着温度区间中的温度升高而降低。该设计在负载不变的情况下,会随着温度的升高而降低功耗阈值,有助于通过缓慢降低功耗的方式尽量维持处理器核心的超频状态,以提高处理器的超频性能。In an optional design, the adjustment coefficients corresponding to the at least two temperature intervals decrease as the temperature in the temperature intervals increases. Under the condition of constant load, the design will reduce the power consumption threshold as the temperature increases, which helps to maintain the overclocking state of the processor core as much as possible by slowly reducing the power consumption, so as to improve the overclocking performance of the processor.
第二方面,本申请提供一种功耗控制器,包括监测电路和处理电路,监测电路用于获取处理器中的第一电压域的温度,处理电路用于根据第一电压域的温度确定第一电压域的功耗阈值,基于第一电压域的功耗阈值调节第一电压域的功耗。In a second aspect, the present application provides a power consumption controller, including a monitoring circuit and a processing circuit, where the monitoring circuit is used to obtain the temperature of the first voltage domain in the processor, and the processing circuit is used to determine the first voltage domain according to the temperature of the first voltage domain. A power consumption threshold of the voltage domain, and the power consumption of the first voltage domain is adjusted based on the power consumption threshold of the first voltage domain.
在一种可选地设计中,处理电路具体用于:在第一电压域的功耗超过第一电压域的功耗阈值时,降低第一电压域的功耗。In an optional design, the processing circuit is specifically configured to: reduce the power consumption of the first voltage domain when the power consumption of the first voltage domain exceeds a power consumption threshold of the first voltage domain.
在一种可选地设计中,监测电路具体用于:先从处理器的各处理器核心中确定出处于第一电压域中的各目标处理器核心,再获取各目标处理器核心分别对应的温度,之后将各目标处理器核心分别对应的温度中的最高温度作为第一电压域的温度。In an optional design, the monitoring circuit is specifically used to: first determine each target processor core in the first voltage domain from each processor core of the processor, and then obtain the corresponding corresponding temperature, and then the highest temperature among the temperatures corresponding to the respective target processor cores is taken as the temperature of the first voltage domain.
在一种可选地设计中,处理电路具体用于:先确定第一电压域的温度所处的目标温度区间,再将目标温度区间对应的功耗阈值确定为第一电压域的功耗阈值。其中,目标温度区间可以为至少两个温度区间中的任一温度区间,至少两个温度区间中的每个温度区间可以对应一个功耗阈值。针对于至少两个温度区间中的任一温度区间:当该温度区间中的温度越高时,该温度区间对应的功耗阈值越小。In an optional design, the processing circuit is specifically configured to: first determine the target temperature range in which the temperature of the first voltage domain is located, and then determine the power consumption threshold corresponding to the target temperature range as the power consumption threshold of the first voltage domain . The target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to a power consumption threshold. For any one of the at least two temperature intervals: when the temperature in the temperature interval is higher, the power consumption threshold corresponding to the temperature interval is smaller.
在一种可选地设计中,处理电路具体用于:先确定第一电压域的温度所处的目标温度区间,再根据第一电压域的分配功耗和目标温度区间对应的调节系数,计算得到第一电压域的功耗阈值。其中,第一电压域的分配功耗为根据第一电压域的负载和处理器的总负载 预先为第一电压域分配的功耗。其中,目标温度区间可以为至少两个温度区间中的任一温度区间,至少两个温度区间中的每个温度区间可以对应一个调节系数。In an optional design, the processing circuit is specifically configured to: first determine the target temperature range in which the temperature of the first voltage domain is located, and then calculate the corresponding adjustment coefficient according to the allocated power consumption of the first voltage domain and the target temperature range. The power consumption threshold of the first voltage domain is obtained. The allocated power consumption of the first voltage domain is the power consumption pre-allocated for the first voltage domain according to the load of the first voltage domain and the total load of the processor. The target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to an adjustment coefficient.
在一种可选地设计中,至少两个温度区间对应的调节系数可以随着温度区间中的温度升高而降低。In an optional design, the adjustment coefficients corresponding to the at least two temperature intervals may decrease as the temperature in the temperature intervals increases.
第三方面,本申请提供一种功耗控制器,包括:获取单元,用于获取处理器中的第一电压域的温度;确定单元,用于根据第一电压域的温度确定第一电压域的功耗阈值;调节单元,用于基于第一电压域的功耗阈值调节第一电压域的功耗。In a third aspect, the present application provides a power consumption controller, comprising: an acquisition unit, configured to acquire a temperature of a first voltage domain in a processor; a determination unit, configured to determine the first voltage domain according to the temperature of the first voltage domain The power consumption threshold of the first voltage domain; the adjusting unit, configured to adjust the power consumption of the first voltage domain based on the power consumption threshold of the first voltage domain.
在一种可选地设计中,调节单元具体用于:在第一电压域的功耗超过第一电压域的功耗阈值时,降低第一电压域的功耗。In an optional 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 a power consumption threshold of the first voltage domain.
在一种可选地设计中,获取单元具体用于:先从处理器的各处理器核心中确定出处于第一电压域中的各目标处理器核心,再获取各目标处理器核心分别对应的温度,之后将各目标处理器核心分别对应的温度中的最高温度作为第一电压域的温度。In an optional design, the obtaining unit is specifically configured to: first determine each target processor core in the first voltage domain from each processor core of the processor, and then obtain the corresponding corresponding target processor cores temperature, and then the highest temperature among the temperatures corresponding to the respective target processor cores is taken as the temperature of the first voltage domain.
在一种可选地设计中,确定单元具体用于:先确定第一电压域的温度所处的目标温度区间,再将目标温度区间对应的功耗阈值确定为第一电压域的功耗阈值。其中,目标温度区间可以为至少两个温度区间中的任一温度区间,至少两个温度区间中的每个温度区间可以对应一个功耗阈值。针对于至少两个温度区间中的任一温度区间:当该温度区间中的温度越高时,该温度区间对应的功耗阈值越小。In an optional design, the determining unit is specifically configured to: first determine the target temperature range in which the temperature of the first voltage domain is located, and then determine the power consumption threshold corresponding to the target temperature range as the power consumption threshold of the first voltage domain . The target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to a power consumption threshold. For any one of the at least two temperature intervals: when the temperature in the temperature interval is higher, the power consumption threshold corresponding to the temperature interval is smaller.
在一种可选地设计中,确定单元具体用于:先确定第一电压域的温度所处的目标温度区间,再根据第一电压域的分配功耗和目标温度区间对应的调节系数,计算得到第一电压域的功耗阈值。其中,第一电压域的分配功耗为根据第一电压域的负载和处理器的总负载预先为第一电压域分配的功耗。其中,目标温度区间可以为至少两个温度区间中的任一温度区间,至少两个温度区间中的每个温度区间可以对应一个调节系数。In an optional design, the determining unit is specifically configured to: first determine the target temperature interval in which the temperature of the first voltage domain is located, and then calculate the corresponding adjustment coefficient according to the allocated power consumption of the first voltage domain and the target temperature interval. The power consumption threshold of the first voltage domain is obtained. The allocated power consumption of the first voltage domain is the power consumption pre-allocated for the first voltage domain according to the load of the first voltage domain and the total load of the processor. The target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to an adjustment coefficient.
在一种可选地设计中,至少两个温度区间对应的调节系数随着温度区间中的温度升高而降低。In an optional design, the adjustment coefficients corresponding to the at least two temperature intervals decrease as the temperature in the temperature intervals increases.
第四方面,本申请提供一种处理器,该处理器可以包括温度感应器和功耗控制器,温度感应器设置于处理器的第一电压域。其中,功耗控制器可以从温度感应器获取第一电压域的温度,然后根据第一电压域的温度确定第一电压域的功耗阈值,之后基于第一电压域的功耗阈值调节第一电压域的功耗。In a fourth aspect, the present application provides a processor. The processor may include a temperature sensor and a power consumption controller. The temperature sensor is disposed in a first voltage domain of the processor. The power consumption controller may acquire 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 then adjust the power consumption threshold of the first voltage domain based on the power consumption threshold of the first voltage domain. Power consumption in the voltage domain.
在一种可选地设计中,处理器还可以包括至少一个处理器核心和至少一个温度感应器,至少一个温度感应器分别与至少一个处理器核心连接。在这种情况下,与任一处理器核心连接的温度感应器可以获取处理器核心的温度并发送给功耗控制器,功耗控制器可以从至少一个处理器核心中确定出处于第一电压域中的各目标处理器核心,然后将各目标处理器核心分别对应的温度中的最高温度作为第一电压域的温度。In an optional design, the processor may further include at least one processor core and at least one temperature sensor, and the at least one temperature sensor is respectively connected to the at least one processor core. In this case, a temperature sensor connected to any processor core can acquire the temperature of the processor core and send it to the power consumption controller, and the power consumption controller can determine that the temperature of the at least one processor core is at the first voltage each target processor core in the domain, and then use the highest temperature among the temperatures corresponding to each target processor core as the temperature of the first voltage domain.
在一种可选地设计中,处理器还可以包括至少一个处理器核心和至少一个功耗调节器,至少一个功耗调节器分别与至少一个处理器核心连接。在这种情况下,功耗控制器可以在第一电压域的功耗超过第一电压域的功耗阈值时,生成功耗控制指令并发送给处于第一电压域中的各目标处理器核心所连接的功耗调节器,与任一目标处理器核心连接的功耗调节器可以根据功耗控制指令降低目标处理器核心的功耗。In an optional design, the processor may further include at least one processor core and at least one power consumption regulator, and the at least one power consumption regulator is respectively connected to the at least one processor core. In this case, the power consumption controller may generate a power consumption control instruction and send it 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 The connected power consumption regulator, the power consumption regulator connected with any target processor core can reduce the power consumption of the target processor core according to the power consumption control instruction.
在一种可选地设计中,功耗调节器具体用于:根据功耗控制指令,降低目标处理器核心的频率。In an optional design, the power consumption regulator is specifically configured to: reduce the frequency of the target processor core according to the power consumption control instruction.
在一种可选地设计中,功耗控制器具体用于:先确定第一电压域的温度所处的目标温度区间,再将目标温度区间对应的功耗阈值确定为第一电压域的功耗阈值。其中,目标温度区间可以为至少两个温度区间中的任一温度区间,至少两个温度区间中的每个温度区间可以对应一个功耗阈值。针对于至少两个温度区间中的任一温度区间:当该温度区间中的温度越高时,该温度区间对应的功耗阈值越小。In an optional design, the power consumption controller is specifically configured to: first determine the target temperature range in which the temperature of the first voltage domain is located, and then determine the power consumption threshold corresponding to the target temperature range as the power consumption of the first voltage domain consumption threshold. The target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to a power consumption threshold. For any one of the at least two temperature intervals: when the temperature in the temperature interval is higher, the power consumption threshold corresponding to the temperature interval is smaller.
在一种可选地设计中,功耗控制器具体用于:先确定第一电压域的温度所处的目标温度区间,再使用第一电压域的分配功耗和目标温度区间对应的调节系数,计算得到第一电压域的功耗阈值。其中,第一电压域的分配功耗为根据第一电压域的负载和处理器的总负载预先为第一电压域分配的功耗。其中,目标温度区间可以为至少两个温度区间中的任一温度区间,至少两个温度区间中的每个温度区间可以对应一个调节系数。In an optional design, the power consumption controller is specifically configured to: first determine the target temperature range in which the temperature of the first voltage domain is located, and then use the distribution power consumption of the first voltage domain and the adjustment coefficient corresponding to the target temperature range , and calculate the power consumption threshold of the first voltage domain. The allocated power consumption of the first voltage domain is the power consumption pre-allocated for the first voltage domain according to the load of the first voltage domain and the total load of the processor. The target temperature interval may be any one of the at least two temperature intervals, and each of the at least two temperature intervals may correspond to an adjustment coefficient.
在一种可选地设计中,处理器还可以包括至少一个处理器核心和至少一个功耗感应器,至少一个功耗感应器分别与至少一个处理器核心连接。在这种情况下,与每个处理器核心连接的功耗感应器可以获取该处理器核心的功耗并发送给功耗控制器,功耗控制器还可以根据每个处理器核心的功耗和每个处理器核心的温度,确定每个处理器核心的负载,并根据处于第一电压域中的各处理器核心的负载计算得到第一电压域的负载,然后根据处理器所包括的各处理器核心的负载计算得到处理器的总负载,之后使用第一电压域的负载和处理器的总负载分配处理器的功耗,以确定第一电压域的分配功耗。In an optional design, the processor may further include at least one processor core and at least one power consumption sensor, and the at least one power consumption sensor is respectively connected to the at least one processor core. 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 also and the temperature of each processor core, determine the load of each processor core, and 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 load of the first voltage domain according to the load of each processor core included in the processor. The load of the processor core is calculated to obtain the total load of the processor, and then the power consumption of the processor is distributed using the load of the first voltage domain and the total load of the processor to determine the distributed power consumption of the first voltage domain.
在一种可选地设计中,至少两个温度区间对应的调节系数可以随着温度区间中的温度升高而降低。In an optional design, the adjustment coefficients corresponding to the at least two temperature intervals may decrease as the temperature in the temperature intervals increases.
第五方面,本申请提供一种电子设备,包括处理器,该处理器可以与存储器耦合,该处理器可以通过执行存储器中存储的计算机程序,以使得电子设备执行如上述第一方面任一项所述的方法。In a fifth aspect, the present application provides an electronic device, including a processor, which can be coupled to a memory, and the processor can execute a computer program stored in the memory to cause the electronic device to perform any one of the above-mentioned first aspects. the method described.
本申请上述第二方面至第五方面中任一项所对应的有益效果,具体可以参照上述第一方面中任一项所述的有益效果,此处不再重复赘述。For the beneficial effects corresponding to any one of the above-mentioned second aspect to the fifth aspect of the present application, reference may be made to the beneficial effect described in any one of the above-mentioned first aspect, which will not be repeated here.
附图说明Description of drawings
图1示例性示出本申请实施例提供的一种处理器的结构示意图;FIG. 1 exemplarily shows a schematic structural diagram of a processor provided by an embodiment of the present application;
图2示例性示出本申请实施例提供的一种功耗控制方法对应的流程示意图;FIG. 2 exemplarily shows a schematic flowchart corresponding to a power consumption control method provided by an embodiment of the present application;
图3示例性示出本申请实施例提供的一种功耗控制方法的具体流程示意图;FIG. 3 exemplarily shows a specific flowchart of a power consumption control method provided by an embodiment of the present application;
图4示例性示出本申请实施例提供的一种各温度区间和各调节系数的对应关系图;FIG. 4 exemplarily shows a corresponding relationship diagram of each temperature interval and each adjustment coefficient provided by an embodiment of the present application;
图5示例性示出本申请实施例提供的一种功耗调节策略示意图;FIG. 5 exemplarily shows a schematic diagram of a power consumption adjustment strategy provided by an embodiment of the present application;
图6示例性示出本申请实施例提供的一种功耗控制器的结构示意图;FIG. 6 exemplarily shows a schematic structural diagram of a power consumption controller provided by an embodiment of the present application;
图7示例性示出本申请实施例提供的另一种功耗控制器的结构示意图。FIG. 7 exemplarily shows a schematic structural diagram of another power consumption controller provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请所公开的各个实施例可以应用于具有超频功能的电子设备中。在本申请一些实施例中,电子设备可以是具有处理器(诸如中央处理器(central processing unit,CPU))的计算机设备,例如台式计算机。还应当理解的是,在本申请其他一些实施例中,电子设备也可以是具有处理器的便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可 穿戴设备(如智能手表)、车载设备等。便携式电子设备的示例性实施例包括但不限于搭载
Figure PCTCN2020127874-appb-000001
或者其它操作系统的便携式电子设备。
Various embodiments disclosed in this application may be applied to electronic devices with overclocking functions. In some embodiments of the present application, the electronic device may be a computer device having a processor (such as a central processing unit (CPU)), such as a desktop computer. It should also be understood that, in some other embodiments of the present application, the electronic device may also be a portable electronic device with a processor, such as a mobile phone, a tablet computer, a wearable device (such as a smart watch) with a wireless communication function, a vehicle-mounted device Wait. Exemplary embodiments of portable electronic devices include, but are not limited to, carry-on
Figure PCTCN2020127874-appb-000001
Or portable electronic devices with other operating systems.
当电子设备中的处理器具备超频功能时,如果处理器的功耗裕量满足超频启动条件,则处理器可以将其频率提升至高于厂方所规定的频率运作,以调高处理器的处理性能。然而,随着处理器的频率的提升,处理器的功耗也会相应增大,而增大的功耗又以热能的形式表现出来,使得处理器的温度升高,当处理器的散热能力无法及时对处理器进行降温时,过高的温度则会影响处理器的寿命和可靠性。When the processor in the electronic device has the overclocking function, if the power consumption margin of the processor meets the overclocking startup condition, the processor can increase its frequency to operate at a frequency higher than the frequency specified by the manufacturer to increase the processing power of the processor. performance. However, as the frequency of the processor increases, the power consumption of the processor will also increase accordingly, and the increased power consumption is manifested in the form of thermal energy, which increases the temperature of the processor. When the processor cannot be cooled in time, the excessively high temperature will affect the life and reliability of the processor.
为了降低超频状态对处理器的寿命和可靠性的影响,通常还需要设置对应的超频调节策略。目前存在如下两种超频调节策略:一种是温度调节策略,该策略对应至少一个温度水线,这些温度水线可以根据处理器的额定温度或处理器中各部件的可承受温度而预先设置,当处理器的温度超过某一温度水线时,处理器会降频或直接退出超频状态,以避免处理器中的部件处于过高温度而损坏。另一种是功耗调节策略,该策略对应至少一个功耗水线(即功耗阈值),这些功耗水线可以根据处理器的额定功耗或处理器中各部件的可承受功耗而预先设置,当处理器的功耗超过某一功耗水线时,处理器会降低功耗或直接退出超频状态。然而,这两种超频调节策略存在如下问题:首先,这两种超频调节策略中所涉及到的各项水线(例如各项温度水线或各项功耗水线)都是预先设置好的固定值,基于固定的水线进行超频调节不论是灵活性还是准确性都不高,无法作为不同场景下的通用调节方式。其次,这两种超频调节策略在超频调节时各自执行且互不干涉。然而,处理器所做的功实际上也会对应转化为散热,而处理器的温度变化也会直接影响处理器的动态功耗或静态功耗。这种单独调节的方式并未考虑到温度和功耗的联动作用,很难在对处理器进行超频调节时提升处理器的超频性能。In order to reduce the impact of the overclocking state on the lifespan and reliability of the processor, it is usually necessary to set a corresponding overclocking adjustment policy. At present, there are two overclocking adjustment strategies as follows: one is a temperature adjustment strategy, which corresponds to at least one temperature waterline. These temperature waterlines can be preset according to the rated temperature of the processor or the withstand temperature of each component in the processor. When the temperature of the processor exceeds a certain temperature water line, the processor will be underclocked or directly exit the overclocking state to avoid damage to the components in the processor due to excessive temperature. The other is a power consumption adjustment strategy, which corresponds to at least one power consumption watermark (ie, a power consumption threshold), and these power consumption watermarks can be adjusted according to the rated power consumption of the processor or the acceptable power consumption of various components in the processor. Pre-set, when the power consumption of the processor exceeds a certain power consumption threshold, the processor will reduce the power consumption or directly exit the overclocking state. However, these two overclocking adjustment strategies have the following problems: First, the various waterlines (such as various temperature waterlines or various power consumption waterlines) involved in these two overclocking adjustment strategies are preset Fixed value, the overclocking adjustment based on a fixed waterline is neither flexible nor accurate, and cannot be used as a general adjustment method in different scenarios. Secondly, these two overclocking adjustment strategies are executed independently of each other during overclocking adjustment. However, the work done by the processor will actually be converted into heat dissipation, and the temperature change of the processor will also directly affect 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 overclocking the processor.
有鉴于此,本申请提供一种功耗控制方法,用以结合温度和功耗综合实现超频调节,以在提高超频调节的灵活性和准确性的同时,提升处理器的超频性能。In view of this, the present application provides a power consumption control method for comprehensively implementing overclocking adjustment in combination with temperature and power consumption, so as to improve the overclocking performance of the processor while improving the flexibility and accuracy of the overclocking adjustment.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments.
本申请实施例中的术语“系统”和“网络”可被互换使用。“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。The terms "system" and "network" in the embodiments of the present application may be used interchangeably. "At least one" means one or more, and "plurality" means two or more. "And/or", which describes the association relationship of the associated objects, indicates that there can be three kinds of relationships, for example, A and/or B, which can indicate: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A, B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one item (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
以及,除非有特别说明,本申请实施例提及“第一”、“第二”等序数词是用于对多个对象进行区分,不用于限定多个对象的优先级或者重要程度。例如,第一功耗阈值、第二功耗阈值,只是为了区分不同的功耗阈值,而并不是表示这两个功耗阈值的优先级或者重要程度等的不同。And, unless otherwise specified, ordinal numbers such as "first" and "second" mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the priority or importance of multiple objects. For example, the first power consumption threshold and the second power consumption threshold are only for differentiating different power consumption thresholds, and do not indicate the difference in priority or importance of the two power consumption thresholds.
图1示例性示出本申请实施例提供的一种处理器的结构示意图。如图1所示,该处理器100可以包括至少一个处理器核心,例如处理器核心10、处理器核心11、处理器核心12和处理器核心13。处理器100中还可以包括非核心部件,例如通用单元(包括计数器、译码器和信号发生器等)、加速器单元、输入/输出控制单元、接口单元、内部存储器和外 部缓存器等。其中,各个处理器核心和非核心部件之间可以通过通信总线(图1中未进行示意)进行连接,以实现数据的传输操作。FIG. 1 exemplarily shows a schematic structural diagram of a processor provided by an embodiment of the present application. As shown in FIG. 1 , the processor 100 may include at least one processor core, such as a processor core 10 , a processor core 11 , a processor core 12 and a processor core 13 . The processor 100 may also include non-core components, such as general-purpose units (including counters, decoders, signal generators, etc.), accelerator units, input/output control units, interface units, internal memory, and external buffers. Wherein, each processor core and non-core components may be connected through a communication bus (not shown in FIG. 1 ), so as to realize the data transmission operation.
应理解,上述处理器100可以是一个芯片。例如,该处理器100可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。应注意,本申请实施例中的处理器100还可以是一种集成电路芯片,具有信号的处理能力。例如,上述的处理器100可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that the above-mentioned processor 100 may be a chip. For example, the processor 100 may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), or a system on chip (SoC). It can be a central processing unit (CPU), a network processor (NP), a digital signal processing circuit (DSP), or a microcontroller (microcontroller). unit, MCU), it can also be a programmable logic device (PLD) or other integrated chips. It should be noted that the processor 100 in this embodiment of the present application may also be an integrated circuit chip, which has a signal processing capability. For example, the processor 100 described above may 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 devices, discrete gate or transistor logic devices, Discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
可以理解,本申请实施例中的存储器(例如内部存储器和外部缓存器)可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory (for example, the internal memory and the external buffer) in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory may be random access memory (RAM), which acts as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synchlink DRAM, SLDRAM) ) and direct memory bus random access memory (direct rambus RAM, DR RAM). It should be noted that the memory of the methods described herein is intended to include, but not be limited to, these and any other suitable types of memory.
继续参照图1所示,本申请实施例中,处理器100中的各处理器核心(例如处理器核心10至处理器核心13)可以都位于同一电压域,也可以分别位于不同的电压域,还可以部分处理器核心位于同一电压域,具体不作限定。位于同一电压域中的一个或多个处理器核心可以具有同一工作电压。示例来说,假设处理器100中存在电压域1、电压域2和电压域3,处理器核心10位于电压域1,处理器核心11和处理器核心12位于电压域2,处理器核心13位于电压域3,则处理器核心10具有第一电压,处理器核心11和处理器核心12具有第二电压,处理器核心13具有第三电压。第一电压、第二电压和第三电压可以相同,也可以不同,具体不作限定。Continuing to refer to FIG. 1 , in this embodiment of the present application, each processor core in the processor 100 (for example, the processor core 10 to the processor core 13 ) may all be located in the same voltage domain, or may be located in different voltage domains, respectively. Some processor cores may also be located in the same voltage domain, which is not specifically limited. One or more processor cores located in the same voltage domain may have the same operating voltage. For example, assuming that there are voltage domain 1, voltage domain 2 and voltage domain 3 in processor 100, processor core 10 is located in voltage domain 1, processor core 11 and processor core 12 are located in voltage domain 2, and processor core 13 is located in voltage domain 2. In voltage domain 3, the processor core 10 has the first voltage, the processor core 11 and the processor core 12 have the second voltage, and the processor core 13 has the third voltage. The first voltage, the second voltage and the third voltage may be the same or different, which are not specifically limited.
继续参照图1所示,本申请实施例中,处理器中还可以包括功耗控制器14,每个处理器核心中还可以设置有频率调节器,功耗控制器14可以与每个处理器核心中的频率调节器通信连接。如此,在对某个处理器核心进行超频调节时,功耗控制器14可以向该处理器核心的频率调节器发送频率控制指令,以使该处理器核心的频率调节器根据频率控制指令调节该处理器核心的频率,例如调节为大于厂商设置的最大频率以使该处理器核心进入超频状态,或者调节为低于超频状态对应的频率以退出超频状态。应理解,图1只是一种示例性地说明,在其它可能的示例中,也可以只在一个或几个处理器核心中设置频率调节 器,这种情况下,功耗控制器14可以仅对设置有频率调节器的处理器核心进行频率控制。或者,也可以在一个或多个电压域中设置频率调节器,这种情况下,功耗控制器14可以分别对设置有频率调节器的每个电压域中的处理器核心进行频率控制。或者,还可以在非核心部件中设置频率调节器,这种情况下,功耗控制器14不仅可以对处理器核心的频率进行控制,还可以对非核心部件的频率进行控制。当然,此处所述的非核心部件是指按照设定的频率工作的部件。Continuing to refer to FIG. 1 , in this embodiment of the present application, the processor may further include a power consumption controller 14, and each processor core may also be provided with a frequency regulator, and the power consumption controller 14 may be associated with each processor. The frequency regulator communication connection in the core. In this way, when overclocking a certain processor core, 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 control instruction according to the frequency control instruction. The frequency of the processor core, for example, is adjusted to be higher than the maximum frequency set by the manufacturer to make the processor core enter the overclocking state, or adjusted to be lower than the frequency corresponding to the overclocking state to exit the overclocking state. It should be understood that FIG. 1 is only an exemplary illustration. In other possible examples, the frequency regulator may be set only in one or several processor cores. In this case, the power consumption controller 14 may only A processor core provided with a frequency regulator performs frequency control. Alternatively, frequency regulators may also be set in one or more voltage domains. In this case, the power consumption controller 14 may separately perform frequency control on the processor cores in each voltage domain where the frequency regulators are set. Alternatively, a frequency regulator may also be set in the non-core components. In this 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 components. Of course, the non-core components mentioned here refer to the components that work according to the set frequency.
需要说明的是,本申请中的功耗控制除了可以包括在超频状态下控制处理器核心的频率之外,还可以包括在超频状态下控制处理器核心的电压,或其它能够影响超频状态的参数,例如电流等,本申请对此不作具体限定。示例性地,当功耗控制还包括控制处理器核心的电压时,功耗控制器14还可以与每个电压域所对应的电压转换电路连接,电压转换电路可以为Buck电路或开关电容(Switched Capacitor,SC)电路,当然还可以为其它能够实现降压功能的电路。功耗控制器14可以通过增大某一电压域所对应的电压转换电路的降压比例来降低位于该电压域中的各处理器核心的工作电压,以降低位于该电压域中的各处理器核心的功耗,也可以通过减小某一电压域所对应的电压转换电路的降压比例来增大位于该电压域中的各处理器核心的工作电压,以提高超频性能。应理解,图1所示意出的频率调节器也可以替换为能够实现功耗调节功能的其它部件,例如电压调节器或电流调节器,当然也可以统称为功耗调节器,本申请对此也不作具体限定。It should be noted that, in addition to controlling the frequency of the processor core in the overclocking state, the power consumption control in this application may 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 specifically limited in this application. Exemplarily, when the power consumption control further includes controlling the voltage of the processor core, the power consumption controller 14 may also be connected to a voltage conversion circuit corresponding to each voltage domain, and the voltage conversion circuit may be a Buck circuit or a switched capacitor (Switched capacitor). Capacitor, SC) circuit, and of course other circuits that can realize the step-down function. The power consumption controller 14 can reduce the operating voltage of each processor core located in the voltage domain by increasing the step-down ratio of the voltage conversion circuit corresponding to a certain voltage domain, so as to reduce the operating voltage of each processor located in the voltage domain The power consumption of the core can also be increased by reducing the step-down ratio of the voltage conversion circuit corresponding to a certain voltage domain to increase the operating voltage of each processor core located in the voltage domain, so as to improve the overclocking performance. It should be understood that the frequency regulator shown in FIG. 1 can also be replaced with other components that can realize the power consumption adjustment function, such as a voltage regulator or a current regulator, and of course, they can also be collectively referred to as power consumption regulators, which is also referred to in this application. There is no specific limitation.
下面以控制一个电压域(假设第一电压域)中的各处理器核心的功耗为例介绍本申请中的功耗控制方法,针对于控制其它电压域中的各处理器核心的功耗或非处理器核心的功耗则不再进行赘述。The power consumption control method in this application is described below by taking controlling the power consumption of each processor core in one voltage domain (assuming the first voltage domain) as an example, aiming at controlling the power consumption of each processor core in other voltage domains or The power consumption of non-processor cores will not be described in detail.
图2示例性示出本申请实施例提供的一种功耗控制方法对应的流程示意图,该方法适用于功耗控制器,例如图1所示意的功耗控制器14。本申请实施例中,功耗控制器可以按照周期方式执行如下功耗控制方法,图2示例性介绍功耗控制器的一次功耗控制过程,如图2所示,该方法包括:FIG. 2 exemplarily shows a schematic flowchart corresponding to a power consumption control method provided by an embodiment of the present application, and the method is applicable to a power consumption controller, such as the power consumption controller 14 shown in FIG. 1 . In this embodiment of the present application, the power consumption controller may execute the following power consumption control methods in a periodic manner. FIG. 2 exemplarily describes the primary power consumption control process of the power consumption controller. As shown in FIG. 2 , the method includes:
步骤201,功耗控制器获取第一电压域的温度。 Step 201, the power consumption controller acquires the temperature of the first voltage domain.
在上述步骤201中,第一电压域的温度可以是指位于第一电压域中的任一处理器核心的温度,也可以是指位于第一电压域中的各处理器核心的平均温度,还可以是指位于第一电压域中的各处理器核心的最高温度,具体不作限定。In the above step 201, the temperature of the first voltage domain may refer to the temperature of any processor core located in the first voltage domain, or may refer to the average temperature of each processor core located in the first voltage domain, or It may refer to the highest temperature of each processor core located in the first voltage domain, which is not specifically limited.
在一种可选地实施方式中,当第一电压域的温度为第一电压域中的各处理器核心的最高温度时,功耗控制器可以先从处理器的各处理器核心中确定出属于第一电压域的各目标处理器核心,然后获取各目标处理器核心分别对应的温度,进而将各目标处理器核心分别对应的温度中的最高温度作为第一电压域的温度。这种方式可以只对需调节功耗的电压域中的处理器核心进行针对性的温度获取操作,而可以无需获取全部的处理器核心的温度,从而更有助于节省资源。In an optional implementation manner, 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 may first determine from each processor core of the processor For each target processor core belonging to the first voltage domain, the temperature corresponding to each target processor core is obtained, and the highest temperature among the temperatures corresponding to each target processor core is used as the temperature of the first voltage domain. In this way, a targeted temperature acquisition operation can be performed only on the processor core in the voltage domain whose power consumption needs to be adjusted, and it is not necessary to acquire the temperature of all the processor cores, which is more helpful for saving resources.
步骤202,功耗控制器根据第一电压域的温度确定第一电压域的功耗阈值。 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.
本申请实施例中,在结合温度和功耗进行超频调节时,如果温度调节策略对应的温度水线不变,则当功耗阈值(即功耗调节策略对应的功耗水线)设置的越高时,处理器核心的功耗越不容易达到该功耗阈值,因此处理器核心在超频状态下的功耗也就越高,越高的功耗会对应越高的温度,从而处理器核心越容易触发温度调节策略对应的温度水线,导致该处理器核心降频或直接退出超频状态。基于此,为了尽量避免触发温度调节策略,在一 种可选地实施方式中,当第一电压域的温度越高时,功耗控制器可以设置第一电压域的功耗阈值越低,这样,第一电压域的功耗就越容易触发该功耗阈值,从而第一电压域中的处理器核心越容易执行功耗调节策略以降低功耗,而功耗降低后所对应的温度也会降低,因此第一电压域的温度也就越不容易触发温度调节策略所对应的温度水线,第一电压域中的处理器核心越不容易触发温度调节策略。更进一步的,功耗调节策略一般是按照逐级降低功耗的方式来调节功耗(例如先降低很小的功耗,并确定降低后的功耗是否还超过功耗阈值,若不超过则不再降低功耗,若还是超过则继续降低功耗),而不会直接退出超频状态,因此这种方式在温度较高时减小功耗阈值,实际上降低了触发功耗调节策略的条件,这样既能使第一电压域通过缓慢降低功耗的方式继续维持超频状态,又能降低触发温度调节策略导致退出超频状态的可能性,因此这种方式能尽量让第一电压域中的各处理器核心长时间地维持在超频状态,有助于提高处理器的超频性能。In this embodiment of the present application, when overclocking is adjusted in combination with temperature and power consumption, if the temperature waterline corresponding to the temperature adjustment strategy remains unchanged, the higher the power consumption threshold (ie the power consumption waterline corresponding to the power consumption adjustment strategy) is set. When it is high, the power consumption of the processor core is less likely to reach the power consumption threshold, so the power consumption of the processor core in the overclocking state is higher, and the higher the power consumption, the higher the temperature, so the processor core The easier it is to trigger the temperature waterline corresponding to the temperature adjustment strategy, causing the processor core to downclock or directly exit the overclocking state. Based on this, in order to avoid triggering the temperature adjustment strategy as much as possible, in an optional implementation manner, when the temperature of the first voltage domain is higher, the power consumption controller may set the power consumption threshold of the first voltage domain to be lower, so that , the power consumption of the first voltage domain is more likely to trigger the power consumption threshold, so it is easier for the processor core in the first voltage domain to execute the power consumption adjustment strategy to reduce power consumption, and the temperature corresponding to the reduced power consumption will also be Therefore, the temperature of the first voltage domain is less likely to trigger the temperature water line corresponding to the temperature adjustment strategy, and the processor core in the first voltage domain is less likely to trigger the temperature adjustment strategy. Further, the power consumption adjustment strategy is generally to adjust the power consumption in a step-by-step way of reducing the power consumption (for example, reduce a small power consumption first, and determine whether the reduced power consumption still exceeds the power consumption threshold, if not, then No longer reduce power consumption, if it still exceeds, continue to reduce power consumption), and will not directly exit the overclocking state, so this method reduces the power consumption threshold when the temperature is high, which actually reduces the conditions for triggering the power consumption adjustment strategy. , so that the first voltage domain can continue to maintain the overclocking state by slowly reducing power consumption, and it can also reduce the possibility of triggering the temperature adjustment strategy to exit the overclocking state. The processor core is maintained in an overclocked state for a long time, which helps to improve the overclocking performance of the processor.
在上述实施方式中,如何随着第一电压域的温度升高而降低第一电压域的功耗阈值,有很多可能的实现方式。例如,在一种可能的实现方式中,可以设置第一电压域的温度升高值和第一电压域的功耗阈值减小值之间具有某种线性关系,这种情况下,第一电压域的温度每升高几度,则第一电压域的功耗阈值就可以减小该线性关系所对应的几瓦特。又例如,在另一种可能的实现方式中,也可以预先设置几个温度升高值区间和这几个温度升高值区间所对应的功耗阈值,当第一电压域的温度相比于上一周期的温度的升高值处于某一温度升高值区间时,可以将第一电压域的功耗阈值设置为该温度升高值区间所对应的功耗阈值。在又一种可能的实现方式中,还可以预先设置几个温度区间和这几个温度区间所对应的功耗阈值,当第一电压域的温度处于某一温度区间时,可以将第一电压域的功耗阈值设置为该温度区间所对应的功耗阈值。可能的实现方式有很多,此处不再一一赘述。In the above-mentioned embodiments, there are many possible implementation manners 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 a possible implementation manner, a certain linear relationship may be set between the temperature rise value of the first voltage domain and the power consumption threshold reduction value of the first voltage domain. In this case, the first voltage The power consumption threshold of the first voltage domain can be reduced by several watts corresponding to the linear relationship for every few degrees of increase in the temperature of the domain. For another example, in another possible implementation manner, several temperature rise value intervals and power consumption thresholds corresponding to the several temperature rise value intervals may also be preset. When the temperature of the first voltage domain is compared to When the temperature rise value of the previous cycle is within a temperature rise value interval, the power consumption threshold of the first voltage domain may be set to the power consumption threshold corresponding to the temperature rise value interval. In another possible implementation manner, several temperature ranges and power consumption thresholds corresponding to these several temperature ranges may also be preset, and when the temperature of the first voltage domain is in a certain temperature range, the first voltage The power consumption threshold of the domain is set to the power consumption threshold corresponding to the temperature range. There are many possible implementations, which will not be repeated here.
步骤203,功耗控制器基于第一电压域的功耗阈值调节第一电压域的功耗。 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.
本申请实施例中,第一电压域的功耗阈值用于对第一电压域的功耗进行限制。当第一电压域的功耗超过第一电压域的功耗阈值时,说明第一电压域的当前功耗过高,如果不降低第一电压域的功耗,则第一电压域很可能会出现过热或过流等现象。因此,为了避免这种现象发生,功耗控制器需要在第一电压域的功耗超过第一电压域的功耗阈值时降低第一电压域的功耗。其中,降低第一电压域的功耗的方式有多种,例如在一种情况下,继续参照图1所示,功耗控制器可以生成降频控制指令并发送给位于第一电压域中的各处理器核心所连接的各频率控制器,以使各频率控制器根据降频控制指令降低第一电压域中的各处理器核心的频率,这种方式能通过降频来降低功耗。又例如,在又一种情况下,考虑到处理器核心在降低频率后可能会处于高压低频状态,导致处理器核心的电能利用率不高,因此,功耗控制器也可以同步降低处于第一电压域中的各处理器核心的频率和第一电压域的工作电压,以使处理器核心处于低压低频状态,提高处理器核心的电能利用率。至于具体将处理器核心调整为多大的工作电压和多大的频率,则可以由功耗控制器参照预设的频率和工作电压的对应关系进行确定,这个预设的对应关系可以由本领域技术人员预先封装在功耗控制器的内部,每个处理器核心对应的该预设的对应关系可以相同,也可以不同。In this embodiment 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. If the power consumption of the first voltage domain is not reduced, the first voltage domain may Overheating or overcurrent occurs. Therefore, in order to avoid this 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, continuing to refer to FIG. 1 , the power consumption controller may generate a frequency reduction control command and send it to a device located in the first voltage domain. Each frequency controller connected to each processor core enables each frequency controller to reduce the frequency of each processor core in the first voltage domain according to the frequency reduction control instruction. In this way, power consumption can be reduced by frequency reduction. For another example, in another case, considering that the processor core may be in a high-voltage and low-frequency state after reducing the frequency, resulting in a low power utilization rate of the processor core, the power consumption controller can also simultaneously reduce the frequency and be in the first place. The frequency of each processor core in the voltage domain and the working voltage of the first voltage domain are used to keep the processor core in a low-voltage and low-frequency state and improve the power utilization rate of the processor core. As for the specific operating voltage and frequency to be adjusted for the processor core, the power consumption controller can determine the corresponding relationship between the preset frequency and operating voltage. The preset corresponding relationship can be determined by those skilled in the art in advance. Packaged inside the power consumption controller, the preset corresponding relationship corresponding to each processor core may be the same or different.
示例性地,当第一电压域的功耗比第一电压域的功耗阈值小很多时,第一电压域中存在较多的功耗裕量没有利用起来。这种情况下,功耗控制器还可以提高第一电压域的功耗,以提高第一电压域的工作性能。例如功耗控制器可以向位于第一电压域中的各处理器核心所连接的各频率控制器发送升频控制指令来提高第一电压域中的各处理器核心的频率,且 考虑到处理器核心的高频状态可能需要高压来带动,因此功耗控制器还可以同时向第一电压域所对应的电压转换电路发送升压控制指令来提高第一电压域的工作电压。Exemplarily, when the power consumption of the first voltage domain is much smaller than the power consumption threshold of the first voltage domain, more power consumption margins in the first voltage domain are not utilized. In this case, the power consumption controller can also increase the power consumption of the first voltage domain, so as to improve the working performance of the first voltage domain. For example, the power consumption controller can send up-frequency control instructions to each frequency controller connected to each processor core in the first voltage domain to increase the frequency of each processor core in the first voltage domain, and considering that the processor The high frequency state of the core may be driven by a high voltage, so the power consumption controller can also simultaneously send a boost control command to the voltage conversion circuit corresponding to the first voltage domain to increase the working voltage of the first voltage domain.
本申请实施例中,如果多个处理器核心位于同一电压域,则该电压域的工作电压实际上为频率最高的处理器核心所对应的工作电压。这种情况下,位于该电压域中的其它处理器核心的工作电压与频率最高的处理器核心的工作电压相同,但是其它处理器核心的频率可能比频率最高的处理器核心的频率低,这会导致其它处理器核心处于高压低频状态,其它处理器核心的电能利用率较低。为了避免这种现象发生,本申请可以设置每个处理器核心位于一个电压域,如此,每个处理器核心的工作电压都能与各自的频率相对应,从而每个处理器核心的电能利用率都能较高。In this embodiment of the present application, if multiple processor cores are located in the same voltage domain, the working voltage of the voltage domain is actually the working voltage corresponding to the processor core with the highest frequency. In this case, the operating voltage of other processor cores in this voltage domain is the same as the operating voltage of the processor core with the highest frequency, but the frequency of other processor cores may be lower than the frequency of the processor core with the highest frequency, which It will cause other processor cores to be in a high voltage and low frequency state, and the power utilization of other processor cores is low. In order to avoid this phenomenon, the present application can set each processor core to be located in a voltage domain, so that the working voltage of each processor core can correspond to its own frequency, so that the power utilization rate of each processor core can be higher.
在本申请的上述实施例中,通过结合电压域的温度来调节电压域的功耗阈值,能使电压域的功耗阈值与当前的温度相匹配,基于该功耗阈值调节功耗实际上考虑到了功耗和温度的双重影响,这不仅能提高超频调节的准确性,还能使电压域的功耗阈值随着温度的变化而灵活变化,从而还有助于提高超频调节的灵活性。更进一步的,相对于单一的温度调节策略或功耗调节策略来说,基于该方式,还能尽量利用功耗调节策略通过缓慢调节功耗来维持电压域中各处理器核心的超频状态,而不直接触发温度调节策略以避免直接退出超频状态,从而还能提升处理器的超频性能。In the above-mentioned 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 adjusting the power consumption based on the power consumption threshold actually considers When it comes to the dual effects of power consumption and temperature, this can not only improve the accuracy of overclocking adjustment, but also make the power consumption threshold of the voltage domain change flexibly with temperature changes, which also helps to improve the flexibility of overclocking adjustment. Further, compared with a single temperature adjustment strategy or power consumption adjustment strategy, based on this method, 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, while Do not directly trigger the temperature adjustment strategy to avoid directly exiting the overclocking state, thereby improving the overclocking performance of the processor.
下面以一个具体的实施例来介绍本申请实施例中的功耗控制方法。在该示例中,假设功耗控制器通过控制频率来实现功耗控制。The power consumption control method in the embodiment of the present application is described below with a specific embodiment. In this example, it is assumed that the power consumption controller implements power consumption control by controlling the frequency.
图3示例性示出本申请实施例提供的一种功耗控制方法的具体流程示意图,如图3所示,该方法适用于功耗控制器,例如图1所示意的功耗控制器14。图3示例性介绍功耗控制器的一次功耗控制过程,如图3所示,该方法包括:FIG. 3 exemplarily shows a specific flowchart of a power consumption control method provided by an embodiment of the present application. As shown in FIG. 3 , the method is applicable to a power consumption controller, such as the power consumption controller 14 shown in FIG. 1 . Fig. 3 exemplifies the primary power consumption control process of the power consumption controller. As shown in Fig. 3, the method includes:
步骤301,功耗控制器获取各处理器核心的温度。 Step 301, the power consumption controller acquires the temperature of each processor core.
本申请实施例中,功耗控制器可以通过多种方式获取各处理器核心的温度,下面示例性介绍几种可选地实施方式。In this embodiment of the present application, the power consumption controller may acquire the temperature of each processor core in various ways, and several optional implementation manners are exemplarily introduced below.
在一种可选地实施方式中,继续参照图1所示,每个处理器核心中还可以设置有温度感应器,例如温度传感器,温度感应器与功耗控制器之间通过通信线路连接。各处理器核心中设置的各温度感应器都可以按照第一设定周期采样各处理器核心的温度,并通过温度感应器和功耗控制器之间的通信线路将采样的温度发送给功耗控制器。其中,第一设定周期可以由本领域技术人员根据经验进行设置,例如为了提高采样温度的准确性,可以设置第一设定周期为100um,如此,各温度感应器每隔100um就可以采样一次所在的处理器核心的温度并发送给功耗控制器。采用该种实施方式,功耗控制器可以通过测量方式直接获取各处理器核心的温度,这种方式虽然要在处理器核心中设置温度感应器,但是测量得到的温度较为准确,有助于提高功耗调节的准确性。In an optional implementation manner, continuing to refer to FIG. 1 , each processor core may also be provided with a temperature sensor, such as a temperature sensor, and the temperature sensor and the power consumption controller are connected through a communication line. Each temperature sensor set in each processor core can sample the temperature of each processor core according to the first set period, and send the sampled temperature to the power consumption through the communication line between the temperature sensor and the power consumption controller. controller. The first set period can be set by those skilled in the art based on experience. For example, in order to improve the accuracy of the sampling temperature, the first set period can be set to 100um. In this way, each temperature sensor can sample the location every 100um. The temperature of the processor core is sent to the power controller. With this implementation, the power consumption controller can directly obtain the temperature of each processor core through a measurement method. Although a temperature sensor needs to be set in the processor core in this method, the measured temperature is more accurate, which is helpful for improving the Accuracy of power regulation.
在另一种可选地实施方式中,如图1所示,每个处理器核心中还可以设置有功耗感应器,功耗感应器与功耗控制器之间也通过通信线路连接。每个处理器核心中设置的功耗感应器可以按照第二设定周期采样该处理器核心中每个信号的翻转次数,然后根据每个信号的翻转次数和该信号翻转一次所对应的功耗,确定每个信号在一个第二设定周期内的功耗,根据各个信号在一个第二设定周期内的功耗计算得到处理器核心在一个第二设定周期内的总功耗,进而通过功耗感应器和功耗控制器之前的通信线路将该总功耗发送给功耗控制器。这种情况下,功耗控制器还可以根据预设的功耗与温度的对应关系,确定出该处理器 核心的总功耗所对应的温度,将该温度作为该处理器核心的温度。采用该种实施方式,功耗控制器可以通过间接计算方式获取各处理器核心的温度,虽然间接计算方式在准确性上没有测量方式来的准确,但是这种方式可以不用在处理器核心中安装温度感应器,有助于节省处理器核心的占用空间和设计成本。可以理解的,“通过功耗感应器间接获取处理器核心的温度”只是一种可选地实施方式,在其它可选地实施方式中,功耗控制器也可以通过其它间接方式获取处理器核心的温度,例如通过处理器核心在各个历史时刻的温度预测处理器核心的温度等,此处不作过多介绍。In another optional implementation manner, as shown in FIG. 1 , each processor core may further be provided with a power consumption sensor, and the power consumption sensor and the power consumption controller are also connected through a communication line. The power consumption sensor set in each processor core can sample the number of inversions of each signal in the processor core according to the second set period, and then according to the number of inversions of each signal and the power consumption corresponding to one inversion of the signal , determine the power consumption of each signal in a second set period, calculate the total power consumption of the processor core in a second set period according to the power consumption of each signal in a second set period, and then The total power consumption is sent to the power consumption controller through the communication line preceding the power consumption sensor and the power consumption controller. In this case, the power consumption controller may also determine the temperature corresponding to the total power consumption of the processor core according to the preset corresponding relationship between power consumption and temperature, and use the temperature as the temperature of the processor core. With this implementation, the power consumption 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 does not need to be installed in the processor core. Temperature sensor to help save processor core footprint and design cost. It can be understood that "obtaining the temperature of the processor core indirectly through the power consumption sensor" is only an optional implementation manner, and in other optional implementation manners, the power consumption controller may also acquire the processor core through other indirect methods. The temperature of the processor core, for example, predicting the temperature of the processor core through the temperature of the processor core at various historical moments, etc., will not be introduced too much here.
在又一种可选地实施方式中,还可以在各处理器核心中的一部分处理器核心中设置温度感应器,在另一部分处理器核心中设置功耗感应器,这样,一部分处理器核心的温度可以通过温度感应器实时测量得到,而另一部分处理器核心的温度则可以通过功耗感应器实时测量的功耗间接计算得到。在该实施方式中,设置温度感应器的处理器核心的数量和设置功耗感应器的处理器核心的数量可以由本领域技术人员根据经验决定,本申请对此不作具体限定。In another optional implementation manner, a temperature sensor may also be set in a part of the processor cores, and a power consumption sensor may be set in another part of the processor cores, so that the The temperature can be measured in real time through a temperature sensor, and the temperature of another part of the processor core can be indirectly calculated through the power consumption measured in real time by the power consumption sensor. In this embodiment, the number of processor cores for setting the temperature sensor and the number of processor cores for setting the power consumption sensor can be determined by those skilled in the art based on experience, which is not specifically limited in this application.
本申请实施例中,“在每个处理器核心中设置温度感应器或功耗感应器以确定每个处理器核心的温度”仅是一种可选地实施方式,在其它可选地实施方式中,也可以在两个或两个以上的处理器核心中设置共享的温度感应器或共享的功耗感应器。这种情况下,由于温度感应器采样的温度值可能是两个或两个以上的处理器核心中的某一点的温度值,因此功耗控制器后续还可以按照某种策略补偿温度感应器采样的温度,以得到每个处理器核心的温度。或者,由于功耗感应器采样的功耗值是两个或两个以上的处理器核心的总功耗,因此功耗控制器后续还可以按照某种比例分配功耗感应器采样的功耗,以得到每个处理器核心的功耗。关于具体使用何种策略或比例,可以由本领域技术人员根据经验进行设置,此处不再介绍。In this embodiment of the present application, "setting a temperature sensor or a power consumption sensor in each processor core to determine the temperature of each processor core" is only an optional implementation manner, and in other optional implementation manners , it is also possible to set a shared temperature sensor or a shared power consumption sensor in two or more processor cores. In this case, since the temperature value sampled by the temperature sensor may be the temperature value at a certain point in two or more processor cores, the power consumption controller can subsequently compensate the temperature sensor sampling according to a certain strategy temperature to get the temperature of each processor core. Alternatively, since the power consumption value sampled by the power consumption sensor is the total power consumption of 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 get the power consumption of each processor core. The specific strategy or ratio to be used can be set by those skilled in the art based on experience, which will not be described here.
步骤302,功耗控制器从各处理器核心中选择出处于第一电压域中的各处理器核心,将处于第一电压域中的各处理器核心所对应的各温度中的最高温度作为第一电压域的温度。 Step 302, the power consumption controller selects each processor core 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 first temperature. temperature in a voltage domain.
在上述步骤302中,第一电压域可以为处理器所包括的任一处理器核心所在的电压域。本申请中的方案可以只对某一处理器核心所在的电压域进行功耗调节,也可以对部分处理器核心所在的电压域进行功耗调节,还可以同时对所有处理器核心所在的电压域分别进行功耗调节,具体不作限定。In the foregoing step 302, the first voltage domain may be a voltage domain where any processor core included in the processor is located. The solution in this application can only adjust the power consumption of the voltage domain where a certain processor core is located, or can adjust the power consumption of the voltage domain where some processor cores are located, and can also adjust the voltage domain where all the processor cores are located at the same time. Power consumption adjustment is performed separately, which is not specifically limited.
示例性地,在确定出处于第一电压域中的各处理器核心之后,功耗控制器可以按照温度从高到低的顺序对这些处理器核心的温度进行排序,然后将得到的排序中位于队首的温度作为第一电压域的温度。或者,功耗控制器可以按照温度从低到高的顺序对这些处理器核心的温度进行排序,然后将得到的排序中位于队尾的温度作为第一电压域的温度。Exemplarily, after determining the processor cores in the first voltage domain, the power consumption controller may sort the temperatures of these processor cores in descending order of temperature, and then sort the temperatures of the processor cores in the obtained order. The temperature of the team head is taken as the temperature of the first voltage domain. Alternatively, the power consumption controller may sort the temperatures of these processor cores in ascending order of temperature, and then use the temperature at the end of the queue in the obtained sorting as the temperature of the first voltage domain.
步骤303,功耗控制器根据各处理器核心的负载和处于第一电压域中的各处理器核心的负载,对处理器的功耗进行分配,得到第一电压域的分配功耗。 Step 303 , the power consumption controller allocates the power consumption of the processors according to the load of each processor core and the load of each processor core in the first voltage domain, and obtains the allocated power consumption of the first voltage domain.
在一种可选地实施方式中,任一处理器核心的负载可以根据该处理器核心的功耗、频率和电压来确定。在该种实施方式中,每个处理器核心中还可以设置有电压采样器,电压采样器也可以按照第二设定周期采样所在的处理器核心的电压并上报给功耗控制器。这种情况下,在每个第二设定周期内,功耗控制器可以通过电压采集器获取到处理器核心的电压,通过功耗感应器获取到处理器核心的功耗,通过频率调节器获取到处理器核心的频率, 之后,功耗控制器可以按照如下公式(1.1)计算得到处理器核心的负载:In an optional implementation manner, the load of any processor core may be determined according to the power consumption, frequency and voltage of the processor core. In this embodiment, each processor core may further be provided with a voltage sampler, and the voltage sampler may also sample the voltage of the processor core where it is located according to the second set period and report it 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 collector, obtain the power consumption of the processor core through the power consumption sensor, and obtain the power consumption of the processor core through the frequency regulator. After obtaining the frequency of the processor core, the power consumption controller can calculate the load of the processor core according to the following formula (1.1):
A=P/(f*V 2)………(1.1) A=P/(f*V 2 )......(1.1)
其中,A为处理器核心的负载,P为处理器核心的功耗,f为处理器核心的频率,V为处理器核心的电压。Among them, 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.
更进一步的,在计算出每个处理器核心的负载后,功耗控制器可以先对处理器所包括的全部处理器核心的负载进行加和,以计算得到处理器的总负载,然后再对处于同一电压域中的各处理器核心的负载进行加和,以计算得到第一电压域的负载,之后可以计算第一电压域的负载和处理器的总负载的比值,该比值标志着第一电压域中的当前负载占据处理器中的总负载的负载比例。通常情况下,第一电压域中的当前负载能够用于指示第一电压域未来将消耗的功耗情况,当第一电压域中的当前负载越大时,意味着第一电压域未来可能会消耗更大的功耗,当第一电压域中的当前负载越小时,意味着第一电压域未来可能会消耗更小的功耗。因此,功耗控制器可以利用第一电压域的负载比例来为第一电压域分配功耗。例如,功耗控制器可以直接计算第一电压域所占据的负载比例和处理器的功耗(例如额定功耗或最大功耗等)的乘积,并将该乘积作为第一电压域的分配功耗。又例如,功耗控制器也可以先根据第一电压域的历史分配功耗和历史真实功耗的偏差计算得到第一电压域对应的纠正系数,再计算第一电压域所占据的负载比例和处理器的功耗的乘积得到第一电压域在未纠正之前的分配功耗,然后使用该纠正系数纠正该分配功耗,将纠正之后的分配功耗作为第一电压域的分配功耗。在该实现方式中,由于第一电压域的分配功耗根据第一电压域的当前负载和处理器的总负载计算得到,因此该分配功耗能大概率匹配第一电压域未来可能会消耗的真实功耗,这种方式既能为第一电压域分配足够的功耗以满足第一电压域的功耗需求,又不会为第一电压域分配过多的功耗从而造成性能浪费。Further, after calculating the load of each processor core, the power consumption controller can first add up the loads of all the processor cores included in the processor to calculate the total load of the processor, and then calculate the total load of the processor. The loads of the processor cores in the same voltage domain are summed to obtain the load of the first voltage domain, and then the ratio of the load of the first voltage domain to the total load of the processor can be calculated, and this ratio marks the first The current load in the voltage domain accounts for the load proportion of the total load in the processor. Generally, the current load in the first voltage domain can be used to indicate the power consumption to be consumed by the first voltage domain in the future. When the current load in the first voltage domain is larger, it means that the first voltage domain may consume power in the future. Consume greater power consumption. When the current load in the first voltage domain is smaller, it means that the first voltage domain may consume less power consumption in the future. Therefore, the power consumption controller may allocate power consumption to the first voltage domain by utilizing the load ratio of the first voltage domain. For example, the power consumption controller may directly calculate the product of the load proportion occupied by the first voltage domain and the power consumption of the processor (for example, rated power consumption or maximum power consumption, etc.), and use the product as the allocated power of the first voltage domain. consumption. For another example, the power consumption controller may first calculate the correction coefficient corresponding to the first voltage domain according to the deviation between the historical allocated power consumption of the first voltage domain and the historical real power consumption, and then calculate the load proportion occupied by the first voltage domain and The product of the power consumption of the processor obtains the allocated power consumption of the first voltage domain before correction, and then uses the correction coefficient to correct the allocated power consumption, and uses the corrected allocated power consumption 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 match the likely future consumption of the first voltage domain with a high probability. Real power consumption, this method can allocate enough power consumption to the first voltage domain to meet the power consumption requirement of the first voltage domain, and will not allocate too much power consumption to the first voltage domain to cause performance waste.
需要说明的是,上述内容只是示例性介绍一种分配功耗的可选地实施方式。本申请还可以采用其它方式分配功耗:例如,在另一种可选地实施方式中,功耗控制器也可以先根据第一电压域的历史功耗模拟得到功耗预测模型,然后使用该功耗预测模型预测第一电压域的未来功耗,将该未来功耗作为第一电压域的分配功耗。例如,在又一种可选地实施方式中,功耗控制器也可以根据第一电压域的当前负载和历史负载预测未来负载,然后使用未来负载执行上述功耗分配方案。应理解,只要能为各电压域分配功耗的方案都可以包含在本申请的保护范围内,本申请对此不再一一赘述。It should be noted that the above content is merely an example to introduce an optional implementation manner of allocating power consumption. The present application may also allocate power consumption in other ways: for example, in another optional implementation manner, the power consumption controller may first obtain a power consumption prediction model according to historical power consumption simulation in the first voltage domain, and then use the power consumption prediction model. The power consumption prediction model predicts the future power consumption of the first voltage domain, and uses the future power consumption as the allocated power consumption of the first voltage domain. For example, in another optional implementation manner, the power consumption controller may also predict the future load according to the current load and historical load of the first voltage domain, and then execute the above-mentioned power consumption distribution scheme using the future load. It should be understood that as long as the solutions that can allocate power consumption for each voltage domain can be included in the protection scope of the present application, the present application will not describe them one by one.
步骤304,功耗控制器确定第一电压域的温度所在的温度区间,使用该温度区间对应的调节系数和第一电压域的分配功耗,计算得到第一电压域的功耗阈值。 Step 304 , the power consumption controller determines the temperature range in which the temperature of the first voltage domain is located, and uses the adjustment coefficient corresponding to the temperature range and the allocated power consumption of the first voltage domain to calculate the power consumption threshold of the first voltage domain.
在一种可选地实施方式中,功耗控制器中还可以设置有一个预设的温度范围[T min,T max],预设的温度范围[T min,T max]可以被划分为至少两个温度区间,至少两个温度区间中的每个温度区间可以对应一个调节系数。图4示例性示出本申请实施例提供的一种各温度区间和各调节系数的对应关系图,在该示例中,假设将第二行至第n+1行所对应的第一列中的温度区间分别称为第1个温度区间(T 1,T max]、第2个温度区间(T 2,T 1]、第3个温度区间(T 3,T 2]、……、第n个温度区间(T min,T n],则图4所示意出的N i是指第i个温度区间对应的温度系数。其中,i为小于或等于n的正整数,n为大于或等于2的正整数,T max>T 1>T 2>T 3>……>T min。继续参照图4所示,假设TDP为电压域的分配功耗,PL 2为电压域的功耗阈值,则图4示例性将电压域的分配功耗和电压域的温度所在的温度区间对应的调节系数的乘积作为电压域的功耗阈值。这种情况下,功耗控制器在确定 第一电压域的温度并计算得到第一电压域的分配功耗后,可以先查询该对应关系以确定出第一电压域所在的温度区间对应的调节系数,然后可以直接计算调节系数和分配功耗的乘积,将该乘积作为第一电压域的功耗阈值。按照该实施方式,由于分配功耗TDP对应为处理器将会分配给第一电压域的最小功耗,因此还可以设置调节系数N 1、调节系数N 2、调节系数N 3、……、调节系数N n为不小于1的实数,这样,将调节系数和第一电压域的分配功耗作为第一电压域的功耗阈值,可以保证第一电压域的功耗阈值不小于第一电压域的分配功耗。 In an optional implementation manner, a preset temperature range [T min , T max ] may also be set in the power consumption controller, and the preset temperature range [T min , T max ] may be divided into at least Two temperature intervals, each of the at least two temperature intervals may correspond to an adjustment coefficient. FIG. 4 exemplarily shows a corresponding relationship diagram of each temperature interval and each adjustment coefficient provided by an embodiment of the present application. In this example, it is assumed that the values in the first column corresponding to the second row to the n+1th row are The temperature intervals are referred to as the first temperature interval (T 1 , T max ], the second temperature interval (T 2 , T 1 ], the third temperature interval (T 3 , T 2 ], ..., the nth temperature interval, respectively. temperature interval (T min , T n ], then Ni shown in Figure 4 refers to the temperature coefficient corresponding to the i -th temperature interval. Among them, i is a positive integer less than or equal to n, and n is greater than or equal to 2 A positive integer, T max >T 1 >T 2 >T 3 >...>T min . Continue to refer to Fig. 4 , assuming that TDP is the allocated power consumption of the voltage domain, and PL 2 is the power consumption threshold of the voltage domain, then Fig. 4 Exemplarily, the product of the distribution power consumption of the voltage domain and the adjustment coefficient corresponding to the temperature interval in which the temperature of the voltage domain is located is used as the power consumption threshold of the voltage domain. In this case, the power consumption controller is determining the temperature of the first voltage domain. And after calculating the distributed power consumption of the first voltage domain, the corresponding relationship can be queried to determine the adjustment coefficient corresponding to the temperature range in which the first voltage domain is located, and then the product of the adjustment coefficient and the distributed power consumption can be directly calculated, and the The product is used as the power consumption threshold of the first voltage domain. According to this embodiment, since the allocated power consumption TDP corresponds to the minimum power consumption that the processor will allocate to the first voltage domain, the adjustment coefficient N 1 and the adjustment coefficient N can also be set. 2. The adjustment coefficient N 3 , ..., the adjustment coefficient N n is a real number not less than 1, so that the adjustment coefficient and the power consumption allocated to the first voltage domain are used as the power consumption threshold of the first voltage domain, so that the first voltage can be guaranteed The power consumption threshold of the domain is not less than the allocated power consumption of the first voltage domain.
在上述实施方式中,至少两个温度区间所对应的至少两个调节系数可以随着至少两个温度区间中的温度的升高而降低。对应在图4中,即:由于第1个温度区间(T 1,T max]中的温度>第2个温度区间(T 2,T 1]中的温度>第3个温度区间(T 3,T 2]中的温度>……>第n个温度区间(T min,T n]中的温度,因此,调节系数N 1、调节系数N 2、调节系数N 3、……、调节系数N n依次降低,即:N 1>N 2>N 3>……>N n≥1。 In the above embodiment, the at least two adjustment coefficients corresponding to the at least two temperature intervals may decrease as the temperature in the at least two temperature intervals increases. Corresponding to Fig. 4, that is: since the temperature in the first temperature interval (T 1 , T max ]>the temperature in the second temperature interval (T 2 , T 1 ]> the third temperature interval (T 3 , Temperature in T 2 ] >... > temperature in the nth temperature interval (T min , T n ], therefore, adjustment coefficient N 1 , adjustment coefficient N 2 , adjustment coefficient N 3 , ..., adjustment coefficient N n Decrease in sequence, namely: N 1 >N 2 >N 3 >... >N n ≥1.
本申请实施例中,预设的温度范围[T min,T max]可以按照多种规则来设置,例如: In the embodiment of the present application, the preset temperature range [T min , T max ] can be set according to various rules, for example:
在一种可能的情况下,预设的温度范围[T min,T max]中的最小温度可以是一个基本不可能达到的较小的温度值,例如-120度(一般来说,处理器核心的温度还没有低到-120度时处理器核心就宕机了),对应的,预设的温度范围[T min,T max]中的最大温度可以是一个基本不可能达到的较大的温度值,例如120度(一般来说,处理器核心的温度还没有高到120度时处理器核心就故障了)。这种情况下,只要第一电压域中的各处理器核心处于工作状态,各处理器核心的温度就必然会处于预设的温度范围内,从而各处理器核心中的最高温度(即第一电压域的温度)也就必然会处于预设的温度范围中的某一温度区间内。 In a possible case, the minimum temperature in the preset temperature range [T min , T max ] can be a small temperature value that is basically impossible to reach, such as -120 degrees (generally, the processor core The processor core will crash when the temperature has not yet dropped to -120 degrees), correspondingly, the maximum temperature in the preset temperature range [T min , T max ] can be a larger temperature that is basically impossible to reach value, such as 120 degrees (generally, the processor core fails when the temperature of the processor core has not reached 120 degrees). In this case, as long as each processor core in the first voltage domain is in the working state, the temperature of each processor core is bound to be within the preset temperature range, so that the highest temperature in each processor core (that is, the first The temperature of the voltage domain) is bound to be within a certain temperature range in the preset temperature range.
在另一种可能的情况下,预设的温度范围[T min,T max]可以根据温度调节策略中所使用的各温度水线来进行设置。温度调节策略中的各温度水线可以分别对应不同的时间维度,随着时间维度的增大,各时间维度所对应的温度水线可以逐渐变小。假设温度水线1对应5秒的时间维度,温度水线2对应0.5秒的时间维度,则当处理器核心在过去5秒的平均温度超过温度水线1,或者处理器核心在过去0.5秒的平均温度(由于0.5秒的时段非常短,因此也可以认为是瞬时温度)超过温度水线2时,说明该处理器核心的温度较高,需要对该处理器核心进行降温(例如降频降压)。在该实施方式中,预设的温度范围中的最小温度T min可以是指各温度水线中的最低温度,预设的温度范围中的最大温度T max可以是指各温度水线中的最高温度,而第一电压域的温度可能并不处于预设的温度范围内。在这种情况下,如果第一电压域的温度低于预设的温度范围中的最小温度,则功耗控制器可以直接认为该温度属于最小温度所在的温度区间,如果第一电压域的温度高于预设的温度范围中的最大温度,则功耗控制器可以直接认为该温度属于最大温度所在的温度区间。 In another possible situation, the preset temperature range [T min , T max ] can be set according to each temperature water line used in the temperature adjustment strategy. Each temperature waterline in the temperature adjustment strategy may correspond to different time dimensions, and as the time dimension increases, the temperature waterline corresponding to each time dimension may gradually decrease. Assuming that the temperature waterline 1 corresponds to the time dimension of 5 seconds, and the temperature waterline 2 corresponds to the time dimension of 0.5 seconds, then when the average temperature of the processor core in the past 5 seconds exceeds the temperature waterline 1, or the temperature of the processor core in the past 0.5 seconds When the average temperature (because the period of 0.5 seconds is very short, it can also be regarded as an instantaneous temperature) exceeds the temperature waterline 2, it means that the temperature of the processor core is high, and the processor core needs to be cooled down (for example, frequency reduction and voltage reduction). ). In this embodiment, the minimum temperature T min in the preset temperature range may refer to the lowest temperature in each temperature water line, and the maximum temperature T max in the preset temperature range may refer to the highest temperature in each temperature water line temperature, and the temperature of the first voltage domain may not be within 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 range where the minimum temperature is located. If the temperature is higher than the maximum temperature in the preset temperature range, the power consumption controller may directly consider that the temperature belongs to the temperature range where the maximum temperature is located.
应理解,上述只是示例性介绍预设的温度范围的两种可能情况。在本申请实施例中,预设的温度范围也可以由本领域技术人员根据经验进行设置,本申请对此不作具体限定。It should be understood that the above are just two possible situations for the preset temperature range to be exemplified. In the embodiments of the present application, the preset temperature range may also be set by those skilled in the art based on experience, which is not specifically limited in the present application.
步骤305,功耗控制器基于第一电压域的功耗阈值调节第一电压域的功耗。 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.
本申请实施例中,当第一电压域的功耗大于第一电压域的功耗阈值时,功耗控制器可以向处于第一电压域的每个处理器核心中的频率调节器发送降频控制指令,以使处于第一电压域的每个处理器核心的频率调节器将所在的处理器核心的频率调节为低于当前频率的一个频率。其中,降频控制指令可以对应如下情况:In this embodiment 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 may send a frequency reduction signal to the frequency regulator in each processor core in the first voltage domain The control instruction is used to cause the frequency regulator of each processor core in the first voltage domain to adjust the frequency of the processor core where it is located to a frequency lower than the current frequency. Among them, the frequency reduction control command can correspond to the following situations:
在一种可能的情况下,降频控制指令中携带有一个目标降频频率,目标降频频率可以 为处理器核心的额定工作频率,或者其它低于当前频率的一个频率。任一频率调节器在接收到该降频控制指令后,可以先从该降频控制指令中解析得到目标降频频率,然后对比所在的处理器核心的当前频率和目标降频频率,如果当前频率高于目标降频频率,则频率调节器可以将所在的处理器核心的频率降低至目标降频频率,如果当前频率低于目标降频频率,则频率调节器可以不调节所在的处理器核心的频率,或者将所在的处理器核心的频率提升至该目标降频频率,以尽量提升处理器核心的处理性能。In a possible case, the frequency reduction control instruction carries a target frequency reduction frequency, and the target frequency reduction frequency can be the rated operating frequency of the processor core, or another frequency lower than the current frequency. After receiving the frequency reduction control command, any frequency regulator can first analyze the target frequency reduction frequency from the frequency reduction control command, and then compare the current frequency of the processor core where it is located and the target frequency reduction frequency, if the current frequency If the frequency is higher than the target frequency reduction frequency, the frequency regulator can reduce the frequency of the processor core where it is located to the target frequency reduction frequency. If the current frequency is lower than the target frequency reduction frequency, the frequency regulator can not adjust the frequency of the processor core. frequency, or increase the frequency of the processor core where it is located to the target downclock frequency to maximize the processing performance of the processor core.
在另一种可能的情况下,降频控制指令也可以只是一个降频指示,任一频率调节器在接收到该降频控制指令后,可以各自对所在的处理器核心进行降频。其中,不同频率调节器可以将各自所在的处理器核心降频到同一频率,也可以按照自己的需求将各自所在的处理器核心降频到不同频率,具体不作限定。In another possible situation, the frequency reduction control instruction may also be just a frequency reduction instruction, and after receiving the frequency reduction control instruction, any frequency regulator may lower the frequency of the processor core where it is located. Wherein, the different frequency regulators can down-clock their respective processor cores to the same frequency, or down-convert their respective processor cores to different frequencies according to their own needs, which is not specifically limited.
在一种可选地实施方式中,当第一电压域的功耗远小于第一电压域的功耗阈值时,说明第一电压域的当前功耗较低,这可能是由于处于第一电压域中的处理器核心并没有进入超频状态而导致的,也可能是处于第一电压域中的处理器核心运行在一种较低的频率而导致的,第一电压域中的处理器核心实际上还存在部分可利用的热裕量。这种情况下,为了充分利用这些处理器核心的热裕量,以在温度可控的情况下尽量提高处理器核心的处理性能,功耗控制器还可以向处于第一电压域的每个处理器核心中的频率调节器发送升频控制指令,以使处于第一电压域的每个处理器核心的频率调节器将所在的处理器核心的频率调节为高于当前频率的一个频率。其中,升频控制指令可以对应如下情况:In an optional implementation manner, when the power consumption of the first voltage domain is much smaller than the power consumption threshold of the first voltage domain, it indicates that the current power consumption of the first voltage domain is relatively low, which may be due to the fact that the first voltage domain is in the first voltage domain. This is caused by the fact that the processor cores in the first voltage domain do not enter the overclocking state, or it may be caused by the fact that the processor cores in the first voltage domain are running at a lower frequency. There is also some thermal headroom available. In this case, in order to make full use of the thermal headroom of these processor cores to maximize the processing performance of the processor cores under temperature controllable conditions, the power consumption controller may The frequency regulator in the processor core sends an up-frequency control instruction, so that the frequency regulator of each processor core in the first voltage domain adjusts the frequency of the processor core where it is located to a frequency higher than the current frequency. Among them, the up-frequency control command can correspond to the following situations:
在一种可能的情况下,升频控制指令中携带有一个目标升频频率,目标升频频率由功耗控制器根据第一电压域的功耗而设置,例如功耗控制器中还存储有至少一个功耗和至少一个目标升频频率的对应关系,在确定要对处于第一电压域中的处理器核心执行升频操作时,功耗控制器可以先查询该对应关系确定出第一电压域的功耗所对应的目标升频频率,然后基于该目标升频频率生成升频控制指令,并发送给出处于第一电压域的各处理器核心中的各频率调节器。对应的,任一频率调节器在接收到该升频控制指令后,可以先从该升频控制指令中解析得到目标升频频率,然后对比所在的处理器核心的当前频率和目标升频频率,如果当前频率低于目标升频频率,则频率调节器可以将所在的处理器核心的频率提高至目标升频频率,如果当前频率高于目标升频频率,则频率调节器可以不调节所在的处理器核心的频率。如此,即使第一电压域中存在某一处理器核心的频率非常大,这种方式也不会继续提高该处理器核心的频率,从而有助于维护该处理器核心的寿命和稳定性。In a possible case, the up-conversion control instruction carries a target up-conversion frequency, and the target up-conversion frequency 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 up-conversion frequency. When determining that an up-conversion operation is to be performed on the processor core in the first voltage domain, the power consumption controller may first query the correspondence to determine the first voltage The target upscaling frequency corresponding to the power consumption of the domain is generated, and then an upscaling control instruction is generated based on the target upscaling frequency, and sent to each frequency regulator in each processor core in the first voltage domain. Correspondingly, after receiving the upscaling control instruction, any frequency regulator can first obtain the target upscaling frequency from the upscaling control instruction, and then compare the current frequency of the processor core where it is located and the target upscaling frequency, If the current frequency is lower than the target upscaling frequency, the frequency regulator can increase the frequency of the processor core where it is located to the target upscaling frequency; if the current frequency is higher than the target upscaling frequency, the frequency regulator can not adjust the processing frequency of the processor core. In this way, even if the frequency of a certain processor core is very high in the first voltage domain, this method will not continue to increase the frequency of the processor core, thereby helping to maintain the lifespan and stability of the processor core.
在另一种可能的情况下,升频控制指令也可以只是一个升频指示,任一频率调节器在接收到该升频控制指令后,可以各自对所在的处理器核心进行升频。其中,不同频率调节器可以将各自所在的处理器核心升频到同一频率,也可以按照自己的需求将各自所在的处理器核心升频到不同频率,具体不作限定。In another possible situation, the up-frequency control instruction can also be just an up-frequency instruction. After receiving the up-frequency control instruction, any frequency regulator can up-frequency the processor core where it is located. Wherein, the different frequency regulators can up-convert their respective processor cores to the same frequency, or can up-convert their respective processor cores to different frequencies according to their own needs, which is not specifically limited.
本申请实施例中,第一电压域的功耗阈值可以是指功耗调节策略中的任一个或任意多个功耗阈值。在一种可能的功耗调节策略中,处理器可以对应有至少两个功耗阈值,至少两个功耗阈值分别对应不同的时间维度,随着时间维度的增大,各时间维度所对应的功耗阈值可以逐渐变小。假设存在第一功耗阈值和第二功耗阈值,第一功耗阈值对应0.3秒的时间维度(实际上是0.3秒内的平均功耗,但是0.3秒的时段较短,因此也可以认为是瞬时功耗),第二功耗阈值对应3秒的时间维度,则当第一电压域中的各处理器核心在过去3秒的平均功耗超过第二功耗阈值,或者第一电压域中的各处理器核心在过去0.3秒的平均 功耗超过第一功耗阈值时,都需要降低第一电压域中的各处理器核心的功耗(例如降频降压)。这种功耗调节策略综合多个时间维度的功耗阈值实现功耗调节,不仅能准确灵活地限制第一电压域的功耗,还能尽量维持第一电压域的超频状态。In this embodiment of the present application, the power consumption threshold of the first voltage domain may refer to any one or any multiple power consumption thresholds in the power consumption adjustment strategy. In a possible power consumption adjustment strategy, the processor may correspond to at least two power consumption thresholds, and the at least two power consumption thresholds respectively correspond to different time dimensions. The power consumption threshold can be gradually reduced. Assuming that there are a first power consumption threshold and a second power consumption threshold, the first power consumption threshold corresponds to the time dimension of 0.3 seconds (actually it is the average power consumption within 0.3 seconds, but the period of 0.3 seconds is short, so it can also be considered as Instantaneous power consumption), the second power consumption threshold corresponds to the time dimension of 3 seconds, then when the average power consumption of each processor core in the first voltage domain in the past 3 seconds exceeds the second power consumption threshold, or in the first voltage domain When the average power consumption of each of the processor cores in the past 0.3 seconds exceeds the first power consumption threshold, the power consumption of each processor core in the first voltage domain needs to be reduced (eg, frequency reduction and step-down). This power consumption adjustment strategy integrates power consumption thresholds of multiple time dimensions to realize 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.
下面以一个具体的示例介绍按照上述功耗调节策略调节功耗的过程:The following describes the process of adjusting power consumption according to the above power consumption adjustment strategy with a specific example:
图5示例性示出按照上述功耗调节策略调节功耗的一种功耗变化示意图,如图5所示,该功耗调节策略中存在第一功耗阈值TDP(也可以称为PL1)和第二功耗阈值PL2(也可以称为Turbo),第一功耗阈值TDP对应的时间维度大于第二功耗阈值PL2对应的时间维度,第一功耗阈值TDP小于第二功耗阈值PL2。按照本申请中的方案,功耗控制器可以根据第一电压域的温度实时调节第二功耗阈值PL2和第一功耗阈值TDP的比例:FIG. 5 exemplarily shows a schematic diagram of a power consumption change in which power consumption is adjusted according to the above-mentioned power consumption adjustment strategy. As shown in FIG. 5 , in the power consumption adjustment strategy, there are a first power consumption threshold TDP (also referred to as PL1 ) and The second power consumption threshold PL2 (also called 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 smaller than the second power consumption threshold PL2. According to the solution in this application, the power consumption controller can adjust the ratio of the second power consumption threshold PL2 to the first power consumption threshold TDP in real time according to the temperature of the first voltage domain:
当第一电压域的温度越高时,第二功耗阈值PL2和第一功耗阈值TDP的比例越小,从而第二功耗阈值PL2越接近第一功耗阈值TDP(例如图5所示意的功耗水线L1)。这种情况下,即使长时间维度下的第一功耗阈值TDP没有被触发,由于短时间维度下的第二功耗阈值PL2取值变小,因此第一电压域的瞬时功耗越容易触发第二功耗阈值PL2,从而导致第一电压域降频。但是这种降频操作并不会直接将第一电压域的功耗降低至第一功耗阈值TDP以下,而是缓慢降低直至降低至第二功耗阈值PL2,因此第一电压域只是执行了降频而并没有退出超频状态。When the temperature of the first voltage domain is higher, the ratio of the second power consumption threshold PL2 to the first power consumption threshold TDP is smaller, so that the second power consumption threshold PL2 is closer to the first power consumption threshold TDP (for example, as shown in FIG. 5 ). The power consumption waterline L1). In this case, even if the first power consumption threshold TDP in the long time dimension is not triggered, because the value of the second power consumption threshold PL2 in the short time dimension becomes smaller, the instantaneous power consumption in the first voltage domain is easier to trigger The second power consumption threshold PL2, thereby causing the first voltage domain to be down-converted. However, this frequency reduction operation does not directly reduce the power consumption of the first voltage domain to below the first power consumption threshold TDP, but slowly reduces until it reaches the second power consumption threshold PL2, so the first voltage domain only performs Downclocking without exiting overclocking state.
当第一电压域的温度越低时,第二功耗阈值PL2和第一功耗阈值TDP的比例越大,从而第二功耗阈值PL2越远离第一功耗阈值TDP(例如图5所示意的功耗水线L4)。这种情况下,当长时间维度下的第一功耗阈值TDP没有被触发时,由于短时间维度下的第二功耗阈值PL2取值变大,因此第一电压域的瞬时功耗就越不容易触发第二功耗阈值PL2,从而第一电压域可以继续进行升频,直至升频至第二功耗阈值PL2。这种方式有助于在温度可控时进一步提高第一电压域的功耗,以提高处理器的处理性能。When the temperature of the first voltage domain is lower, the ratio of the second power consumption threshold PL2 to the first power consumption threshold TDP is larger, so that the second power consumption threshold PL2 is farther away from the first power consumption threshold TDP (for example, as shown in FIG. 5 ). The power consumption waterline L4). In this case, when the first power consumption threshold TDP in the long time dimension is not triggered, since the value of the second power consumption threshold PL2 in the short time dimension becomes larger, the instantaneous power consumption in the first voltage domain is higher. It is not easy to trigger the second power consumption threshold PL2, so that the first voltage domain can continue to be up-converted until it reaches the second power consumption threshold PL2. This way helps to further increase the power consumption of the first voltage domain when the temperature is controllable, so as to improve the processing performance of the processor.
根据前述方法,图6为本申请实施例提供的功耗控制器600的结构示意图,该功耗控制器600可以为芯片或电路,比如可设置于处理器中的芯片或电路。该功耗控制器600可以对应上述方法中的功耗控制器14。该功耗控制器600可以实现如上图2和图3中所示的任一项或任多项对应的方法的步骤。如图6所示,该功耗控制器600可以包括监测电路601和处理电路602。进一步的,该功耗控制器600还可以包括总线系统,监测电路601和处理电路602可以通过总线系统连接。且,监测电路601还可以通过总线系统与每个处理器核心的温度感应器和/或功耗感应器连接,处理电路602还可以通过总线系统与每个处理器核心的频率调节器连接。According to the foregoing method, FIG. 6 is a schematic structural diagram of a power consumption controller 600 provided by an embodiment of the present application. The power consumption controller 600 may be a chip or a circuit, such as a chip or a circuit that may be provided in a processor. The power consumption controller 600 may correspond to the power consumption controller 14 in the above method. The power consumption controller 600 may implement the steps of any one or more of the corresponding methods shown in FIG. 2 and FIG. 3 above. As shown in FIG. 6 , the power consumption controller 600 may include a monitoring circuit 601 and a processing circuit 602 . Further, the power consumption controller 600 may further include a bus system, and the monitoring circuit 601 and the processing circuit 602 may be connected through the bus system. Moreover, the monitoring circuit 601 can also be connected to 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 to the frequency regulator of each processor core through the bus system.
本申请实施例中,监测电路601可以通过每个处理器核心的温度感应器和/或功耗感应器,获取处理器中的第一电压域的温度。对应的,处理电路602可以根据第一电压域的温度确定第一电压域的功耗阈值,然后基于第一电压域的功耗阈值调节第一电压域的功耗。其中,当第一电压域的功耗超过所述第一电压域的功耗阈值时,处理电路602可以降低第一电压域的功耗。In this embodiment of the present application, the monitoring circuit 601 may acquire the temperature of the first voltage domain in the processor through a temperature sensor and/or a power consumption sensor of each processor core. Correspondingly, the processing circuit 602 may 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. Wherein, 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.
该功耗控制器600所涉及的与本申请实施例提供的技术方案相关的概念,解释和详细说明及其他步骤请参见前述方法或其他实施例中关于这些内容的描述,此处不做赘述。For the concepts related to the technical solutions provided by the embodiments of the present application involved in the power consumption controller 600, please refer to the descriptions of the foregoing methods or other embodiments for explanations, detailed descriptions, and other steps, which will not be repeated here.
根据前述方法,图7为本申请实施例提供的又一种功耗控制器700的结构示意图,该功耗控制器700可以为芯片或电路,比如可设置于处理器中的芯片或电路。该功耗控制器700可以对应上述方法中的功耗控制器14。该功耗控制器700可以实现如上图2和图3中 所示的任一项或任多项对应的方法的步骤。如图7所示,该功耗控制器700可以包括获取单元701、确定单元702和调节单元703。According to the foregoing method, FIG. 7 is a schematic structural diagram of another power consumption controller 700 provided by an embodiment of the present application. The power consumption controller 700 may be a chip or a circuit, such as a chip or a circuit that may be provided in a processor. The power consumption controller 700 may correspond to the power consumption controller 14 in the above method. The power consumption controller 700 may implement the steps of any one or more of the corresponding methods shown in FIG. 2 and FIG. 3 above. As shown in FIG. 7 , the power consumption controller 700 may include an acquisition unit 701 , a determination unit 702 and an adjustment unit 703 .
本申请实施例中,获取单元701在接收信息时可以为接收单元或接收器,此接收单元或接收器可以为射频电路。具体实施中,获取单元701可以获取处理器中的第一电压域的温度,确定单元702可以根据第一电压域的温度确定第一电压域的功耗阈值,调节单元703可以基于第一电压域的功耗阈值调节第一电压域的功耗,例如在第一电压域的功耗超过第一电压域的功耗阈值时,降低第一电压域的功耗。In this embodiment of the present application, the acquiring unit 701 may be a receiving unit or a receiver when receiving information, and the receiving unit or the receiver may be a radio frequency circuit. In a specific implementation, the obtaining unit 701 may obtain the temperature of the first voltage domain in the processor, the determining unit 702 may determine the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain, and the adjusting unit 703 may be based on the first voltage domain The power consumption threshold of the first voltage domain adjusts the power consumption 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.
该功耗控制器700所涉及的与本申请实施例提供的技术方案相关的概念,解释和详细说明及其他步骤请参见前述方法或其他实施例中关于这些内容的描述,此处不做赘述。For the concepts related to the technical solutions provided by the embodiments of the present application involved in the power consumption controller 700, please refer to the descriptions of the foregoing methods or other embodiments for explanations and detailed descriptions and other steps, which will not be repeated here.
可以理解的是,上述功耗控制器700中各个单元的功能可以参考相应方法实施例的实现,此处不再赘述。It can be understood that, the functions of each unit in the above-mentioned power consumption controller 700 may refer to the implementation of the corresponding method embodiments, which will not be repeated here.
应理解,以上功耗控制器700的单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。本申请实施例中,获取单元701可以由上述图6的监测电路601实现,确定单元702和调节单元703可以由上述图6的处理电路602实现。It should be understood that the above division of the units of the power consumption controller 700 is only a division of logical functions, and may be fully or partially integrated into one physical entity in actual implementation, or may be physically separated. In this embodiment of the present application, the acquiring unit 701 may be implemented by the monitoring circuit 601 in FIG. 6 above, and the determining unit 702 and the adjusting unit 703 may be implemented by the processing circuit 602 in FIG. 6 above.
根据本申请实施例提供的方法,本申请还提供一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当该计算机程序代码在计算机上运行时,使得该计算机执行图1至图5所示实施例中任意一个实施例的方法。According to the method provided by the embodiment of the present application, the present application also provides a computer program product, the computer program product includes: computer program code, when the computer program code is run on a computer, the computer is made to execute the steps shown in FIG. 1 to FIG. 5 . The method of any one of the illustrated embodiments.
根据本申请实施例提供的方法,本申请还提供一种计算机可读存储介质,该计算机可读介质存储有程序代码,当该程序代码在计算机上运行时,使得该计算机执行图1至图5所示实施例中任意一个实施例的方法。According to the method provided by the embodiment of the present application, the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores program codes, and when the program codes are run on a computer, the computer is made to execute FIG. 1 to FIG. 5 . The method of any one of the illustrated embodiments.
根据本申请实施例提供的方法,本申请还提供一种电子设备,该电子设备包括处理器,处理器与存储器耦合,处理器用于执行存储器中存储的计算机程序,以使得该电子设备执行图1至图5所示实施例中任意一个实施例的方法。According to the method provided by the embodiment of the present application, the present application also provides an electronic device, the electronic device includes a processor, the processor is coupled to a memory, and the processor is configured to execute a computer program stored in the memory, so that the electronic device executes FIG. 1 To the method of any one of the embodiments shown in FIG. 5 .
在本说明书中使用的术语“部件”、“模块”、“系统”等用于表示计算机相关的实体、硬件、固件、硬件和软件的组合、软件、或执行中的软件。例如,部件可以是但不限于,在处理器上运行的进程、处理器、对象、可执行文件、执行线程、程序和/或计算机。通过图示,在计算设备上运行的应用和计算设备都可以是部件。一个或多个部件可驻留在进程和/或执行线程中,部件可位于一个计算机上和/或分布在两个或更多个计算机之间。此外,这些部件可从在上面存储有各种数据结构的各种计算机可读介质执行。部件可例如根据具有一个或多个数据分组(例如来自与本地系统、分布式系统和/或网络间的另一部件交互的二个部件的数据,例如通过信号与其它系统交互的互联网)的信号通过本地和/或远程进程来通信。The terms "component", "module", "system" and the like are used in this specification to refer to a computer-related entity, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component may be, but is not limited to, 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 may be components. One or more components may reside within a process and/or thread of execution, and a component may be localized on one computer and/or distributed between two or more computers. In addition, these components can execute from various computer readable media having various data structures stored thereon. A component may, for example, be based on a signal having one or more data packets (eg, data from two components interacting with another component between a local system, a distributed system, and/or a network, such as the Internet interacting with other systems via signals) Communicate through local and/or remote processes.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各种说明性逻辑块(illustrative logical block)和步骤(step),能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the various illustrative logical blocks and steps described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware accomplish. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may 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: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (15)

  1. 一种功耗控制方法,其特征在于,所述方法包括:A power consumption control method, characterized in that the method comprises:
    获取处理器中的第一电压域的温度;obtaining the temperature of the first voltage domain in the processor;
    根据所述第一电压域的温度确定所述第一电压域的功耗阈值;determining the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain;
    基于所述第一电压域的功耗阈值调节所述第一电压域的功耗。The power consumption of the first voltage domain is adjusted based on the power consumption threshold of the first voltage domain.
  2. 如权利要求1所述的方法,其特征在于,所述基于所述第一电压域的功耗阈值调节所述第一电压域的功耗,包括:The method of claim 1, wherein the adjusting 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, the power consumption of the first voltage domain is reduced.
  3. 如权利要求1或2所述的方法,其特征在于,所述获取处理器中的第一电压域的温度,包括:The method according to claim 1 or 2, wherein the acquiring the temperature of the first voltage domain in the processor comprises:
    从所述处理器的各处理器核心中确定出处于所述第一电压域中的各目标处理器核心;Determine each target processor core in the first voltage domain from each processor core of the processor;
    获取所述各目标处理器核心分别对应的温度;obtaining the temperatures corresponding to the respective target processor cores;
    将所述各目标处理器核心分别对应的温度中的最高温度作为所述第一电压域的温度。The highest temperature among the temperatures corresponding to the respective target processor cores is used as the temperature of the first voltage domain.
  4. 如权利要求1至3中任一项所述的方法,其特征在于,所述根据所述第一电压域的温度确定所述第一电压域的功耗阈值,包括:The method according to any one of claims 1 to 3, wherein the determining the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain comprises:
    确定所述第一电压域的温度所处的目标温度区间;determining a target temperature range in which the temperature of the first voltage domain is located;
    将所述目标温度区间对应的功耗阈值确定为所述第一电压域的功耗阈值;determining 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, and each temperature interval in the at least two temperature intervals corresponds to a power consumption threshold. Any temperature interval: when the temperature in the temperature interval is higher, the power consumption threshold corresponding to the temperature interval is smaller.
  5. 如权利要求1至4中任一项所述的方法,其特征在于,所述根据所述第一电压域的温度确定所述第一电压域的功耗阈值,包括:The method according to any one of claims 1 to 4, wherein the determining the power consumption threshold of the first voltage domain according to the temperature of the first voltage domain comprises:
    确定所述第一电压域的温度所处的目标温度区间;determining a target temperature range in which the temperature of the first voltage domain is located;
    根据所述第一电压域的分配功耗和所述目标温度区间对应的调节系数,计算得到所述第一电压域的功耗阈值;其中,所述第一电压域的分配功耗是根据所述第一电压域的负载和所述处理器的总负载预先为所述第一电压域分配的功耗;According to the allocated power consumption of the first voltage domain and the adjustment coefficient corresponding to the target temperature interval, the power consumption threshold of the first voltage domain is calculated; wherein, the allocated power consumption of the first voltage domain is based on the the power consumption pre-allocated for the first voltage domain by 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, and each of the at least two temperature intervals corresponds to an adjustment coefficient.
  6. 如权利要求5所述的方法,其特征在于,所述至少两个温度区间对应的调节系数随着温度区间中的温度升高而降低。The method of claim 5, wherein the adjustment coefficients corresponding to the at least two temperature intervals decrease as the temperature in the temperature interval increases.
  7. 一种处理器,其特征在于,包括温度感应器和功耗控制器;所述温度感应器设置于所述处理器的第一电压域;A processor, characterized in that it includes 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 is configured to obtain the temperature of the first voltage domain from the temperature sensor, determine a power consumption threshold of the first voltage domain according to the temperature of the first voltage domain, and based on the temperature of the first voltage domain The power consumption threshold of the first voltage domain adjusts the power consumption of the first voltage domain.
  8. 如权利要求7所述的处理器,其特征在于,所述处理器还包括至少一个处理器核心和至少一个温度感应器,所述至少一个温度感应器分别与所述至少一个处理器核心连接;The processor of claim 7, wherein the processor further comprises at least one processor core and at least one temperature sensor, and the at least one temperature sensor is respectively connected to the at least one processor core;
    与任一处理器核心连接的所述温度感应器,用于获取所述处理器核心的温度并发送给 所述功耗控制器;The temperature sensor connected to any processor core is used to acquire the temperature of the processor core and send it to the power consumption controller;
    所述功耗控制器,用于从所述至少一个处理器核心中确定出处于所述第一电压域中的各目标处理器核心,将所述各目标处理器核心分别对应的温度中的最高温度作为所述第一电压域的温度。The power consumption controller is configured to determine each target processor core in the first voltage domain from the at least one processor core, and determine the highest temperature among the temperatures corresponding to the target processor cores respectively. temperature as the temperature of the first voltage domain.
  9. 如权利要求7或8所述的处理器,其特征在于,所述处理器还包括至少一个处理器核心和至少一个功耗调节器,所述至少一个功耗调节器分别与所述至少一个处理器核心连接;The processor of claim 7 or 8, wherein the processor further comprises at least one processor core and at least one power consumption regulator, the at least one power consumption regulator being respectively associated with the at least one processor server core connection;
    所述功耗控制器,具体用于在所述第一电压域的功耗超过所述第一电压域的功耗阈值时,生成功耗控制指令并发送给处于所述第一电压域中的各目标处理器核心所连接的所述功耗调节器;The power consumption controller is specifically configured to, when the power consumption of the first voltage domain exceeds the power consumption threshold of the first voltage domain, generate a power consumption control instruction and send it to the power consumption control command in the first voltage domain. the power consumption regulator connected to each target processor core;
    与任一目标处理器核心连接的所述功耗调节器,用于根据所述功耗控制指令降低所述目标处理器核心的功耗。The power consumption regulator connected to any target processor core is configured to reduce the power consumption of the target processor core according to the power consumption control instruction.
  10. 如权利要求9所述的处理器,其特征在于,所述功耗调节器具体用于:The processor of claim 9, wherein the power consumption regulator is specifically used for:
    根据所述功耗控制指令,降低所述目标处理器核心的频率。According to the power consumption control instruction, the frequency of the target processor core is reduced.
  11. 如权利要求7至10中任一项所述的处理器,其特征在于,所述功耗控制器具体用于:The processor according to any one of claims 7 to 10, wherein the power consumption controller is specifically configured to:
    确定所述第一电压域的温度所处的目标温度区间;determining a target temperature range in which the temperature of the first voltage domain is located;
    将所述目标温度区间对应的功耗阈值确定为所述第一电压域的功耗阈值;determining 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, and each temperature interval in the at least two temperature intervals corresponds to a power consumption threshold. Any temperature interval: when the temperature in the temperature interval is higher, the power consumption threshold corresponding to the temperature interval is smaller.
  12. 如权利要求7至10中任一项所述的处理器,其特征在于,所述功耗控制器具体用于:The processor according to any one of claims 7 to 10, wherein the power consumption controller is specifically configured to:
    确定所述第一电压域的温度所处的目标温度区间;determining a target temperature range in which the temperature of the first voltage domain is located;
    使用所述第一电压域的分配功耗和所述目标温度区间对应的调节系数,计算得到所述第一电压域的功耗阈值;其中,所述第一电压域的分配功耗是根据所述第一电压域的负载和所述处理器的总负载预先为所述第一电压域分配的功耗;Using the allocated power consumption of the first voltage domain and the adjustment coefficient corresponding to the target temperature interval, the power consumption threshold of the first voltage domain is calculated; wherein, the allocated power consumption of the first voltage domain is based on the the power consumption pre-allocated for the first voltage domain by 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, and each of the at least two temperature intervals corresponds to an adjustment coefficient.
  13. 如权利要求12所述的处理器,其特征在于,所述处理器还包括至少一个处理器核心和至少一个功耗感应器,所述至少一个功耗感应器分别与所述至少一个处理器核心连接;The processor of claim 12, wherein the processor further comprises at least one processor core and at least one power consumption sensor, the at least one power consumption sensor being respectively associated with the at least one processor core connect;
    与每个处理器核心连接的所述功耗感应器,用于获取所述处理器核心的功耗并发送给所述功耗控制器;The power consumption sensor connected to each processor core is used to obtain the power consumption of the processor core and send it 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; The load of each processor core in a voltage domain is calculated to obtain the load of the first voltage domain, and the total load of the processor is calculated according to the load of each processor core included in the processor; The load of a voltage domain and the total load of the processor distribute the power consumption of the processor to determine the distributed power consumption of the first voltage domain.
  14. 如权利要求12或13所述的处理器,其特征在于,所述至少两个温度区间对应的 调节系数随着温度区间中的温度升高而降低。The processor of claim 12 or 13, wherein the adjustment coefficients corresponding to the at least two temperature intervals decrease as the temperature in the temperature interval increases.
  15. 一种电子设备,其特征在于,包括处理器,所述处理器与存储器耦合,所述处理器用于执行所述存储器中存储的计算机程序,以使得所述电子设备执行如权利要求1至6中任一项所述的方法。An electronic device, characterized in that it comprises a processor, which is coupled to a memory, and the processor is configured to execute a computer program stored in the memory, so that the electronic device executes the execution as claimed in claims 1 to 6 The method of any one.
PCT/CN2020/127874 2020-11-10 2020-11-10 Power consumption control method and device WO2022099477A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/127874 WO2022099477A1 (en) 2020-11-10 2020-11-10 Power consumption control method and device
CN202080106862.6A CN116391162A (en) 2020-11-10 2020-11-10 Power consumption control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/127874 WO2022099477A1 (en) 2020-11-10 2020-11-10 Power consumption control method and device

Publications (1)

Publication Number Publication Date
WO2022099477A1 true WO2022099477A1 (en) 2022-05-19

Family

ID=81601900

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/127874 WO2022099477A1 (en) 2020-11-10 2020-11-10 Power consumption control method and device

Country Status (2)

Country Link
CN (1) CN116391162A (en)
WO (1) WO2022099477A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185364A (en) * 2022-09-09 2022-10-14 北京智芯微电子科技有限公司 Intelligent device and power consumption management method thereof
CN115877938A (en) * 2022-12-23 2023-03-31 摩尔线程智能科技(北京)有限责任公司 Control method, device, equipment, storage medium and program product of GPU
CN116095801A (en) * 2023-04-13 2023-05-09 中国电信股份有限公司浙江分公司 High-reliability energy-saving method and device for base station equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170139462A1 (en) * 2013-05-31 2017-05-18 Amazon Technologies, Inc. Datacenter power management optimizations
CN107992183A (en) * 2017-12-18 2018-05-04 联想(北京)有限公司 A kind of optimization method and electronic equipment of CPU power consumption limit value
CN110876180A (en) * 2018-08-31 2020-03-10 Oppo广东移动通信有限公司 Power consumption processing method and device, electronic equipment and computer readable medium
CN111324198A (en) * 2020-03-18 2020-06-23 深圳市亿晟科技有限公司 Method for dynamically adjusting frequency and voltage of android device according to load
CN111783375A (en) * 2020-06-30 2020-10-16 Oppo广东移动通信有限公司 Chip system and related device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170139462A1 (en) * 2013-05-31 2017-05-18 Amazon Technologies, Inc. Datacenter power management optimizations
CN107992183A (en) * 2017-12-18 2018-05-04 联想(北京)有限公司 A kind of optimization method and electronic equipment of CPU power consumption limit value
CN110876180A (en) * 2018-08-31 2020-03-10 Oppo广东移动通信有限公司 Power consumption processing method and device, electronic equipment and computer readable medium
CN111324198A (en) * 2020-03-18 2020-06-23 深圳市亿晟科技有限公司 Method for dynamically adjusting frequency and voltage of android device according to load
CN111783375A (en) * 2020-06-30 2020-10-16 Oppo广东移动通信有限公司 Chip system and related device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185364A (en) * 2022-09-09 2022-10-14 北京智芯微电子科技有限公司 Intelligent device and power consumption management method thereof
CN115877938A (en) * 2022-12-23 2023-03-31 摩尔线程智能科技(北京)有限责任公司 Control method, device, equipment, storage medium and program product of GPU
CN115877938B (en) * 2022-12-23 2024-01-12 摩尔线程智能科技(北京)有限责任公司 GPU control method, device, equipment, storage medium and program product
CN116095801A (en) * 2023-04-13 2023-05-09 中国电信股份有限公司浙江分公司 High-reliability energy-saving method and device for base station equipment

Also Published As

Publication number Publication date
CN116391162A (en) 2023-07-04

Similar Documents

Publication Publication Date Title
WO2022099477A1 (en) Power consumption control method and device
US9590639B2 (en) Semiconductor device and control method
EP3084607B1 (en) Multi-core dynamic workload management
US11360540B2 (en) Processor core energy management
US8495397B2 (en) Computer system capable of adjusting operating frequency dynamically
US20190107874A1 (en) Method and Apparatus for Managing Global Chip Power on a Multicore System on Chip
JP6748625B2 (en) Current regulating equipment, system, method and computer readable recording medium for electronic device regulating electric power drawn from an external power source
CN107003685B (en) Maximum current protection of system
EP2804076A2 (en) Adaptively Limiting a Maximum Operating Frequency in a Multicore Processor
CN108292161B (en) Integrated circuit thermal throttling of thermal sensor maximum temperature with workload adaptation
US9117511B2 (en) Control circuits for asynchronous circuits
WO2019133106A1 (en) Accurate voltage control to enhance power performance of circuits
WO2022051990A1 (en) Power supply method and apparatus, electronic device, and readable storage medium
Grenat et al. 4.2 Increasing the performance of a 28nm x86-64 microprocessor through system power management
WO2017176341A1 (en) Dynamic voltage regulator sensing and reference voltage setting techniques for multiple gated loads
US9268393B2 (en) Enforcing a power consumption duty cycle in a processor
US11372464B2 (en) Adaptive parameterization for maximum current protection
WO2022110199A1 (en) Power consumption control apparatus, processor, and power consumption control method
CN200969053Y (en) Power supply apparatus having intelligent type cooling control function
US20210208659A1 (en) Apparatus and method to detect power supply security attack and risk mitigation
CN115051002A (en) Heat dissipation control method and device, computer equipment and storage medium
WO2022036712A1 (en) Frequency control method and device
WO2021035229A2 (en) Apparatus and method for determining a baseline voltage and ring oscillator code
WO2022041251A1 (en) Power budget allocation method and related device
WO2023004816A1 (en) Power consumption adjustment method and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20961036

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20961036

Country of ref document: EP

Kind code of ref document: A1