WO2021232266A1 - 芯片的控制方法和控制装置 - Google Patents

芯片的控制方法和控制装置 Download PDF

Info

Publication number
WO2021232266A1
WO2021232266A1 PCT/CN2020/091177 CN2020091177W WO2021232266A1 WO 2021232266 A1 WO2021232266 A1 WO 2021232266A1 CN 2020091177 W CN2020091177 W CN 2020091177W WO 2021232266 A1 WO2021232266 A1 WO 2021232266A1
Authority
WO
WIPO (PCT)
Prior art keywords
temperature
power consumption
temperature detection
detection point
chip
Prior art date
Application number
PCT/CN2020/091177
Other languages
English (en)
French (fr)
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/091177 priority Critical patent/WO2021232266A1/zh
Priority to CN202080101051.7A priority patent/CN115668097A/zh
Publication of WO2021232266A1 publication Critical patent/WO2021232266A1/zh

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/16Constructional details or arrangements
    • G06F1/20Cooling means
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of chips, and specifically to a control method and control device of a chip.
  • a system on a chip may also be referred to as a processor chip, and includes multiple subsystems.
  • SOC system on a chip
  • a temperature threshold can be set for the chip, and the target temperature can be understood as the maximum temperature limit for the safe operation of the chip.
  • the increase in chip temperature is caused by power consumption. The higher the frequency of the subsystem, the higher the power consumption and the higher the chip temperature.
  • the system power consumption margin can be determined according to the difference between the detected temperature and the temperature threshold, and the system power consumption margin can be allocated to each subsystem. Since the temperature of the chip changes in real time, in order to reduce the waste of the performance of the chip and improve the safety of the chip work, it is necessary to perform frequent temperature detection, which occupies a lot of processor resources.
  • the present application provides a chip control method and control device, which can reduce the loss of chip performance while controlling the temperature of the chip.
  • a method for controlling a chip includes at least one subsystem, and at least one first temperature detection point is provided on the chip.
  • the method includes: using the relationship between each first temperature detection point
  • the model determines the first power consumption information.
  • the relationship model of the first temperature detection point is used to represent the relationship between the power consumption information and the predicted temperature of the first temperature detection point.
  • the power consumption information is used to indicate the power consumption of each subsystem.
  • the first power consumption information makes the first predicted temperature determined by using the relationship model of each first temperature detection point less than or equal to the preset temperature threshold of the first temperature detection point. Controlling the chip to operate according to the first power consumption information.
  • the first power consumption information is such that the first predicted temperature determined by using the relationship model of each first temperature detection point is less than or equal to the preset temperature threshold of the first temperature detection point.
  • the adjustment of the chip temperature does not depend on the high-frequency detection of the chip temperature, which can reduce the occupation of processor resources.
  • the at least one subsystem includes multiple subsystems, and the power consumption of each subsystem indicated by the first power consumption information satisfies a first association relationship.
  • the chip may include multiple subsystems.
  • the power consumption of each subsystem is determined according to the power consumption relationship among multiple subsystems, which can make the control of the chip more precise.
  • the method further includes: acquiring current frequency information of the chip, where the current frequency information is used to indicate current operating frequencies of multiple subsystems of the chip, and
  • the first association relationship is that the ratio between the operating frequencies of the multiple subsystems is equal to the ratio between the current operating frequencies of the multiple subsystems indicated by the current frequency information, and the power consumption of each subsystem is equal to the ratio between the operating frequencies of the multiple subsystems.
  • the frequency of the system satisfies the second correlation.
  • the second association relationship can be expressed as the relationship between power consumption, frequency, and operating voltage. Power consumption is positively correlated with operating voltage, and power consumption is positively correlated with frequency. When the working voltage is constant, the power consumption corresponds to the frequency one-to-one.
  • a plurality of temperature detection points are provided on the chip, the plurality of temperature detection points include the at least one first temperature detection point, and the preset value of each temperature detection point is Assuming that the temperature thresholds are equal, the at least one first temperature detection point is a temperature detection point with the highest current temperature among the plurality of temperature detection points.
  • all or part of the temperature detection points may be used as the first temperature detection points.
  • the preset temperature thresholds of the detection points of each temperature detection point are equal.
  • the temperature detection point with the highest temperature is the easiest to reach the preset temperature threshold of the detection point.
  • One or more temperature detection points with the highest temperature may be used as the first temperature detection point to determine the first power consumption information. Therefore, the difficulty of determining the first power consumption information can be reduced, and the amount of calculation can be reduced.
  • the method further includes: acquiring second power consumption information, where the second power consumption information is used to indicate the current power consumption of each subsystem.
  • the chip is detected to obtain the actual temperature of the i-th first temperature detection point in the at least one first temperature detection point, where i is a positive integer.
  • the relationship model of the i-th first temperature detection point is adjusted, so that the relationship between the i-th first temperature detection point is adjusted
  • the third predicted temperature determined by the model and the second power consumption information is equal to the actual temperature.
  • the determining the first power consumption information using the relationship model of each first temperature detection point includes: determining the first power consumption information using the adjusted relationship model of the i-th first temperature detection point, The first power consumption information enables the first predicted temperature determined by using the adjusted relationship model of the i-th first temperature detection point to be less than or equal to the preset temperature threshold of the i-th first temperature detection point.
  • the change in ambient temperature affects the heat dissipation efficiency of the chip, thereby affecting the temperature of the chip.
  • the relational model is adjusted so that the relational model can adapt to changes in ambient temperature and can respond to changes in power consumption in a timely manner when the power consumption of one or more subsystems changes stepwise.
  • the second power consumption information is further used to indicate a third association relationship between power consumption and time of each of the subsystems for a preset period of time before the current moment.
  • the relationship model of the i-th first temperature detection point is used to determine third power consumption information according to the second power consumption information, where the third power consumption information includes that each of the subsystems is before the current moment.
  • the relationship model of the i-th first temperature detection point is further used to determine the first predicted temperature according to the third power consumption information.
  • the relationship model is used to determine the first predicted temperature, which can improve the accuracy of the temperature prediction.
  • the relationship model of the i-th first temperature detection point is used to determine the window period corresponding to each of the subsystems according to the third association relationship.
  • the relationship model of the i-th first temperature detection point is adjusted according to the difference, so that according to the adjusted i-th first temperature detection point
  • the relationship model and the first predicted temperature determined by the first power consumption information are equal to the actual temperature, including: when the difference is less than or equal to a preset difference threshold, adjusting the difference according to the difference
  • the relationship model of the i-th first temperature detection point is adjusted according to the difference, so that according to the adjusted i-th first temperature detection point
  • the relationship model and the first predicted temperature determined by the first power consumption information are equal to the actual temperature, including: when the difference is less than or equal to a preset difference threshold, adjusting the difference according to the difference
  • the relationship model of the i-th first temperature detection point is adjusted according to the difference, so that according to the adjusted i-th first temperature detection point
  • the relationship model and the first predicted temperature determined by the first power consumption information are equal to the actual temperature, including: when the difference is less than or equal to a preset difference threshold, adjusting the difference according to
  • adjusting the relationship model of the i-th first temperature detection point can increase the i-th first temperature detection point.
  • the stability and reliability of the relationship model of the temperature detection point can increase the i-th first temperature detection point.
  • the relationship model of the i-th first temperature detection point when the difference is less than or equal to a preset difference threshold, adjust the relationship model of the i-th first temperature detection point according to the difference , Including: when the difference is less than or equal to the preset difference threshold, updating the number of triggers, the number of triggers being used to indicate that the difference is less than or equal to the preset difference threshold within a preset length of time When the number of triggers is less than or equal to the preset number of times, adjust the relationship model of the i-th first temperature detection point according to the difference.
  • the power consumption of each subsystem of the chip may change in real time according to demand. Within a period of time, the power consumption of each subsystem may increase and decrease frequently. At this time, the power consumption model of the temperature detection point cannot respond to the changes in power consumption in time. . In the preset time length, when the number of triggers to adjust the relationship model of the temperature detection point exceeds the preset number of times, the relationship model of the temperature detection point is no longer adjusted, so that in the case of frequent sudden increases and sudden drops in power consumption , No longer adjust the relationship model of temperature detection points, reducing the waste of resources.
  • At least one temperature detection point is provided on the chip, the at least one temperature detection point includes the at least one first temperature detection point, and the method further includes: acquiring Training power consumption information and jth training measurement temperature, the training power consumption information is used to indicate the power consumption of the at least one subsystem, and the jth training measurement temperature is used to instruct the chip to follow the training power consumption information During operation, the temperature of the j-th temperature detection point in the at least one temperature detection point, j is a positive integer. Input the training power consumption information into the original relational model to obtain the j-th training predicted temperature.
  • the parameters of the original relationship model are adjusted to minimize the difference between the jth training predicted temperature and the jth training measured temperature to obtain the at least A relationship model of the j-th temperature detection point in a temperature detection point.
  • the relational model is obtained through training, and the relational model can accurately reflect the relationship between the power consumption information and the predicted temperature.
  • the relationship model of each first temperature detection point is used to indicate the magnitude of the influence of the power consumption of each subsystem on the predicted temperature of the first temperature detection point.
  • the power consumption of the subsystem is adjusted to make the adjustment of the power consumption more accurate.
  • the influence of the power consumption of each subsystem on the predicted temperature of the temperature detection point can be expressed in the form of weights.
  • the weight can be expressed as a coefficient of the power consumption of each subsystem in the relationship model of the temperature detection point.
  • a chip control device which includes a determination module and a control module.
  • the chip includes at least one subsystem, and at least one first temperature detection point is provided on the chip.
  • the determining module is used to determine the first power consumption information using the relationship model of each first temperature detection point, and the relationship model of each first temperature detection point is used to represent the power consumption information and the prediction of the first temperature detection point
  • the power consumption information is used to indicate the power consumption of each subsystem, and the first power consumption information makes the first predicted temperature determined by the relationship model of each first temperature detection point less than or It is equal to the preset temperature threshold of the first temperature detection point.
  • the control module is used to control the chip to operate according to the first power consumption information.
  • the at least one subsystem includes multiple subsystems, and the power consumption of each subsystem indicated by the first power consumption information satisfies a first association relationship.
  • the control device further includes an acquisition module configured to acquire current frequency information of the chip, and the current frequency information is used to indicate the current frequency of multiple subsystems of the chip.
  • Working frequency The correlation is that the ratio between the operating frequencies of the multiple subsystems is equal to the ratio between the current operating frequencies of the multiple subsystems indicated by the current frequency information, and the power consumption of each subsystem is equal to the ratio between the operating frequencies of the multiple subsystems.
  • the frequency of the system satisfies the second correlation.
  • multiple temperature detection points are provided on the chip, the multiple temperature detection points include the at least one first temperature detection point, and each temperature detection point is preset The temperature thresholds are equal, and the at least one first temperature detection point is at least one temperature detection point with the highest temperature among the plurality of temperature detection points.
  • the control device further includes an acquisition module configured to acquire second power consumption information, and the second power consumption information is used to indicate the current power consumption of each of the subsystems. Power consumption.
  • the control device further includes a detection module configured to detect the chip to obtain the actual temperature of the i-th first temperature detection point in the at least one first temperature detection point, where i is a positive integer.
  • the determining module is further configured to determine the second predicted temperature of the i-th first temperature detection point according to the relationship model of the i-th first temperature detection point and the second power consumption information.
  • the control device further includes an adjustment module configured to adjust the relationship model of the i-th first temperature detection point according to the difference between the second predicted temperature and the actual temperature, so that according to the adjustment The following relationship model of the i-th first temperature detection point and the third predicted temperature determined by the second power consumption information are equal to the actual temperature.
  • the determining module is configured to determine, according to the adjusted relationship model of the i-th first temperature detection point, the first power consumption information and the first power consumption information such that the adjusted first temperature detection point is used
  • the first predicted temperature determined by the relationship model of the i first temperature detection points is less than or equal to the preset temperature threshold of the i-th first temperature detection point.
  • the second power consumption information is used to indicate a third association relationship between power consumption and time of each of the subsystems for a preset period of time before the current moment.
  • the relationship model of the i-th first temperature detection point is used to determine third power consumption information according to the second power consumption information, where the third power consumption information includes that each of the subsystems is before the current moment.
  • the relationship model of the i-th first temperature detection point is further used to determine the second predicted temperature according to the third power consumption information.
  • the relationship model of the i-th first temperature detection point is used to determine the window time period corresponding to each of the subsystems according to the third association relationship.
  • the adjustment module is configured to, when the difference value is less than or equal to a preset difference value threshold, adjust the i-th first temperature detection according to the difference value Point relational model.
  • control device further includes an update module configured to update the number of triggers when the difference is less than or equal to the preset difference threshold, and the trigger The number of times is used to indicate the number of times that the difference value is less than or equal to the preset difference value threshold within a preset time length.
  • the adjustment module is configured to adjust the relationship model of the i-th first temperature detection point according to the difference when the number of triggering times is less than or equal to the preset number of times.
  • At least one temperature detection point is provided on the chip, and the at least one temperature detection point includes the at least one first temperature detection point.
  • the control device also includes an acquisition module and a training module.
  • the acquisition module is configured to acquire training power consumption information and a jth training measurement temperature
  • the training power consumption information is used to indicate the power consumption of the at least one subsystem
  • the jth training measurement temperature is used to indicate the
  • the temperature of the j-th temperature detection point in the at least one temperature detection point, j is a positive integer.
  • the training module is used to input the training power consumption information into the original relational model to obtain the j-th training predicted temperature.
  • the training module is further configured to adjust the parameters of the original relationship model according to the jth training predicted temperature and the jth training measured temperature, so that the jth training predicted temperature and the jth training measured temperature Minimize the difference to obtain the relationship model of the j-th temperature detection point.
  • the relationship model of each first temperature detection point is used to indicate the magnitude of the influence of the power consumption of each subsystem on the predicted temperature of the first temperature detection point.
  • a chip control device including a memory and a processor.
  • the chip includes at least one subsystem, and at least one first temperature detection point is provided on the chip.
  • the memory is used to store program instructions.
  • the processor is configured to: use the relationship model of each first temperature detection point to determine first power consumption information, and the relationship model of each first temperature detection point is used to represent power consumption information And the predicted temperature of the first temperature detection point, the power consumption information is used to indicate the power consumption of each sub-system, and the first power consumption information enables the use of the power consumption of each first temperature detection point
  • the first predicted temperature determined by the relationship model is less than or equal to the preset temperature threshold of the first temperature detection point; and the chip is controlled to operate according to the first power consumption information.
  • the at least one subsystem includes multiple subsystems, and the power consumption of each subsystem indicated by the first power consumption information satisfies a first association relationship.
  • the processor is further configured to: obtain current frequency information of the chip, where the current frequency information is used to indicate the current operating frequencies of multiple subsystems of the chip;
  • An association relationship is that the ratio between the operating frequencies of the multiple subsystems is equal to the ratio between the current operating frequencies of the multiple subsystems indicated by the current frequency information, and the power consumption of each subsystem is equal to that of the subsystems.
  • the frequency satisfies the second association relationship.
  • multiple temperature detection points are provided on the chip, the multiple temperature detection points include the at least one first temperature detection point, and each temperature detection point is preset The temperature thresholds are equal, and the at least one first temperature detection point is at least one temperature detection point with the highest temperature among the plurality of temperature detection points.
  • the processor is further configured to: obtain second power consumption information, where the second power consumption information is used to indicate the current power consumption of each of the subsystems.
  • the processor is further configured to detect the chip to obtain the actual temperature of the i-th first temperature detection point in the at least one first temperature detection point, where i is a positive integer.
  • the processor is further configured to determine a second predicted temperature of the i-th first temperature detection point according to the relationship model of the i-th first temperature detection point and the second power consumption information.
  • the processor is further configured to adjust the relationship model of the i-th first temperature detection point according to the difference between the second predicted temperature and the actual temperature, so that according to the adjusted i-th The relationship model of a temperature detection point and the third predicted temperature determined by the second power consumption information are equal to the actual temperature.
  • the first power consumption information is determined so that the adjusted i-th first temperature detection point is used
  • the first predicted temperature determined by the relationship model is less than or equal to the preset temperature threshold of the i-th first temperature detection point.
  • the second power consumption information is further used to indicate a third association relationship between power consumption and time of each of the subsystems for a preset period of time before the current moment.
  • the relationship model of the i-th first temperature detection point is used to determine third power consumption information according to the second power consumption information, where the third power consumption information includes that each of the subsystems is before the current moment.
  • the relationship model of the i-th first temperature detection point is further used to determine the second predicted temperature according to the third power consumption information.
  • the relationship model of the i-th first temperature detection point is used to determine the window time period corresponding to each of the subsystems according to the third association relationship.
  • the processor is further configured to: when the difference is less than or equal to a preset difference threshold, adjust the i-th first temperature detection point according to the difference Relational model.
  • the processor is further configured to: when the difference is less than or equal to the preset difference threshold, update the number of triggers, where the number of triggers is used to indicate a preset length of time The number of times the difference is less than or equal to the preset difference threshold.
  • the processor is further configured to adjust the relationship model of the i-th first temperature detection point according to the difference when the number of triggering times is less than or equal to a preset number of times.
  • At least one temperature detection point is provided on the chip, and the at least one temperature detection point includes the at least one first temperature detection point.
  • the processor is further configured to obtain training power consumption information and a jth training measurement temperature, where the training power consumption information is used to indicate the power consumption of the at least one subsystem, and the jth training measurement temperature is used to indicate the chip
  • the temperature of the j-th temperature detection point in the at least one temperature detection point, j is a positive integer.
  • the training power consumption information is input into the original relational model to obtain the j-th training predicted temperature.
  • the processor is further configured to adjust the parameters of the original relationship model according to the jth training predicted temperature and the jth training measured temperature, so that the difference between the jth training predicted temperature and the jth training measured temperature is Minimized to obtain the relationship model of the j-th temperature detection point.
  • the relationship model of each first temperature detection point is used to indicate the magnitude of the influence of the power consumption of each subsystem on the predicted temperature of the first temperature detection point.
  • an electronic device which includes a chip and the chip control device described in the second or third aspect.
  • a computer program storage medium characterized in that the computer program storage medium has program instructions, and when the program instructions are executed by a processor, the processor executes the chip control method described above .
  • a chip system wherein the chip system includes at least one processor, and when a program instruction is executed in the at least one processor, the at least one processor is caused to execute the aforementioned The control method of the chip.
  • Fig. 1 is a schematic structural diagram of a chip.
  • FIG. 2 is a schematic flowchart of a method for controlling a chip provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a method for establishing a relationship model provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another chip control method provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • Fig. 6 is a schematic structural diagram of a control device provided by an embodiment of the present application.
  • Fig. 7 is a schematic structural diagram of another control device provided by an embodiment of the present application.
  • the electronic device includes a processor chip.
  • the processor may include a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor (image signal processor).
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • NPU neural-network processing unit
  • the GPU is an image processing microprocessor, which is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations and is used for graphics rendering.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the system on a chip integrates a variety of processors.
  • the absolute performance of the various components in the SOC such as CPU, GPU, NPU and other processors, how to maximize the performance of each component in the SOC under the constraints of the heat dissipation of the whole machine, has an important impact on the performance of electronic devices.
  • the system-on-chip may also be referred to as a processor chip.
  • the power consumption of each subsystem in the chip will affect the temperature of the chip.
  • One or more temperature sensors can be set in the chip, and each temperature sensor is used to detect the temperature of a temperature detection point.
  • the change in temperature at each temperature detection point is caused by the change in the power consumption of the surrounding subsystems.
  • the temperature of the chip is positively related to the power consumption of each subsystem. When the power consumption of the subsystem increases, the temperature of the chip increases. When the power consumption of the subsystem decreases, the temperature of the chip decreases.
  • the power consumption of the subsystem includes static power consumption and dynamic power consumption. Both static power consumption and dynamic power consumption are related to the manufacturing process of the chip, the operating voltage and temperature of the subsystem, and so on. Dynamic power consumption is also affected by the operating frequency. The higher the operating frequency, the greater the dynamic power consumption.
  • a safe temperature can be set for each temperature detection point to control the temperature of the chip below the safe temperature.
  • the safe temperature of multiple temperature detection points can be the same or different.
  • Figure 1 is a schematic structural diagram of a SOC.
  • the SOC includes multiple subsystems. Each temperature sensor is used for temperature detection of a subsystem.
  • a method for adjusting the power consumption of a chip Through dynamic voltage and frequency scaling (DVFS) technology, when the detection temperature of a certain temperature sensor reaches a first preset temperature, the temperature of the subsystem corresponding to the temperature sensor is reduced. The frequency reaches the first preset value; when the detected temperature of the temperature sensor drops to the second preset temperature, the frequency of the subsystem corresponding to the temperature sensor is increased to the second preset value. In this way, the temperature of each area of the SOC is adjusted.
  • DVFS dynamic voltage and frequency scaling
  • the time interval for the temperature sensor to detect the temperature is too long, it is easy to produce temperature overshoot, causing the temperature of the subsystem to exceed the safe value and the temperature control fails. If the time interval of temperature detection is too small, it will occupy more resources of the processor, and frequent adjustment of the subsystem frequency will also cause performance loss.
  • Each sub-system adjusts its frequency according to its own temperature, so that the coordination between each sub-system may be affected, resulting in a waste of sub-system performance, and the overall performance of the SOC will be affected.
  • Another method of adjusting the power consumption of the chip is through the difference between the temperature detected at one temperature detection point and the target control temperature, or the maximum value of the temperature detected at multiple temperature detection points and the target control temperature The difference between, calculate the system power consumption margin.
  • the obtained system power consumption margin is then allocated to each subsystem according to the current frequency of each subsystem.
  • the sum of the power consumption allocated to each subsystem is equal to the system power consumption margin.
  • Proportion-integral-differential coefficient (PID) algorithm can be used to adjust the temperature of the system.
  • Kp is the preset coefficient
  • Tset the target control temperature
  • Tdp the maximum temperature detected at multiple temperature detection points
  • Tdp the maximum heat dissipation power of the chip.
  • the target control temperature Tset can be slightly lower than the safe working temperature of the chip.
  • the power consumption of different subsystems contributes differently to the same temperature sensor.
  • the magnitude of the influence of each subsystem on the temperature of the temperature detection point corresponding to the maximum temperature is different.
  • the system power consumption margin Pb is allocated to each subsystem, so that the sum of the increase in power consumption of each subsystem is the system power consumption margin Pb, which will cause misallocation and waste the performance of the chip.
  • the power consumption of the subsystems varies greatly under different working conditions.
  • the power consumption of the subsystem is large, more heat is generated, and the area where the subsystem is located heats up faster.
  • the power consumption of the sub-system is small, the heat generated is less, and the area where the sub-system is located warms up slowly or decreases in temperature. Since Kp is a preset coefficient, when (Tset-T) is the same value, the power consumption of the subsystem affects the speed of temperature rise.
  • the value of the preset coefficient Kp is large, when the time interval for temperature detection of the temperature sensor is too large, it is easy to produce temperature overshoot, causing one or more temperature detection points to exceed the safe working temperature of the chip, and the temperature control becomes invalid; The time interval of temperature detection is too small, which takes up more resources of the processor, and frequent adjustment of the frequency of the subsystem will also cause performance loss.
  • the above-mentioned method for adjusting the power consumption of the chip passively adjusts the power consumption of the subsystem in the chip according to the difference between the detected temperature and the target temperature. In the case of low detection frequency, in order to ensure that the temperature of the chip does not exceed the safe working temperature, the performance of the chip will be low.
  • the embodiment of the present application provides a method for adjusting the temperature of the chip, which can improve the performance of the chip while avoiding frequent temperature detection of the temperature detection point, thereby improving the system performance.
  • the chip control method provided in the embodiments of this application can be applied to mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, and super mobiles.
  • AR augmented reality
  • VR virtual reality
  • UMPC ultra-mobile personal computers
  • PDAs personal digital assistants
  • FIG. 2 is a schematic flowchart of a method for controlling a chip provided by an embodiment of the present application.
  • the embodiment of the present application adjusts the power consumption of each subsystem in the chip by predicting the temperature of the temperature detection point in the chip.
  • the chip includes at least one subsystem. At least one temperature detection point is provided on the chip.
  • At least one temperature detection point can be set in the area where each subsystem in the chip is located. Since each subsystem generates heat during operation, by setting at least one temperature detection point in the area where each subsystem is located, the power consumption of each subsystem can be adjusted more accurately, thereby ensuring the safe operation of the chip and improving The performance of the chip.
  • the relationship model of each temperature detection point can be obtained.
  • the relationship model of each temperature detection point is used to represent the relationship between the power consumption information and the predicted temperature of the temperature detection point.
  • Power consumption information is used to indicate the power consumption of each subsystem.
  • the power consumption of each subsystem can be controlled independently.
  • each subsystem can be independent of each other.
  • the CPU, GPU, NPU, etc. can be integrated on a chip, each serving as a subsystem.
  • the functions of the subsystems may also have a certain relevance. For example, an area in the CPU whose power consumption can be independently controlled can be used as a subsystem.
  • the relationship model of the temperature detection point may only be used to represent the relationship between the power consumption information and the predicted temperature of the temperature detection point.
  • the relationship model of a temperature detection point may not include time-related parameters. That is to say, the relationship model of the temperature detection point can be understood as a relationship model when the power consumption of each subsystem is stable, that is, the relationship model can be expressed in multiple The relationship between the power consumption information and the predicted temperature when the power consumption of each subsystem basically remains unchanged.
  • the relationship model of the temperature detection point may represent the power consumption information, the relationship between the temperature of the temperature detection point at the current moment, and the predicted temperature of the temperature detection point at the next moment.
  • the length of time between the current moment and the next moment may be a preset value.
  • the power consumption information and the temperature of the temperature detection point at the current time are input into the relationship model, and the predicted temperature of the temperature detection point at the next time.
  • dynamic temperature prediction can be performed when the power consumption of each subsystem is unstable.
  • the relationship model of the temperature detection point represents the relationship between the power consumption information and the predicted temperature when the system frequency is stable, which can reduce the complexity of the relationship model.
  • the relationship model of temperature detection points can be obtained from other electronic devices.
  • the relationship model of the temperature detection points can also be established by the electronic device that performs step S210 to step S220.
  • the relationship model of the temperature detection point can be used to express the influence of the power consumption of each subsystem on the predicted temperature of the temperature detection point.
  • the relationship model of the temperature detection point can be expressed as a functional relationship between the power consumption information and the predicted temperature of the temperature detection point.
  • the influence of the power consumption of each subsystem on the predicted temperature can be expressed by weights.
  • the weight can be expressed as the coefficient of each subsystem in the relational model.
  • the relational model of the temperature detection points can be obtained through training or obtained through formula solving. Compared with the method of solving the parameters in the formula, determining the relationship model of the temperature detection point through training can make the relationship model of the temperature detection point more accurate.
  • step S210 to step S220 may be performed.
  • step S210 the first power consumption information is determined by using the relationship model of each first temperature detection point.
  • the first power consumption information makes the first predicted temperature determined by using the relationship model of each first temperature detection point less than or equal to the preset temperature threshold of the first temperature detection point.
  • the first power consumption information is input into the relationship model of the first temperature detection point, and the first predicted temperature of the temperature detection point can be obtained. For each first temperature detection point, the first predicted temperature of the temperature detection point is less than or equal to the preset temperature threshold of the temperature detection point.
  • the preset temperature threshold of the first temperature detection point may be less than or equal to the maximum temperature of the first temperature detection point during the safe operation of the chip.
  • the preset temperature threshold of the first temperature detection point may be referred to as the rated temperature of the first temperature detection point.
  • a certain temperature margin can be set for the safe operation of the chip, that is, the preset temperature threshold is slightly smaller than the maximum temperature of the first temperature detection point during the safe operation of the chip, so as to ensure the safe operation of the chip.
  • the performance of the chip can be maximized.
  • One or more temperature detection points can be set on the chip. Each temperature detection point in all or part of the temperature detection points may be used as the first temperature detection point.
  • the first power consumption information can make use of the relationship model of each temperature detection point
  • the determined first predicted temperature is less than or equal to the preset temperature threshold of the temperature detection point.
  • the chip includes multiple temperature detection points, only part of the temperature detection points may be used as the first temperature detection points.
  • the preset temperature thresholds of the detection points of each temperature detection point are equal.
  • the temperature detection point with the highest temperature is the easiest to reach the preset temperature threshold of the detection point.
  • One or more temperature detection points with the highest temperature may be used as the first temperature detection point, or a temperature detection point whose temperature exceeds a preset value may be used as the first temperature detection point.
  • the temperature detection point with the highest temperature may be used as the first temperature detection point.
  • Taking some temperature detection points as the first temperature detection points can reduce the difficulty of determining the first power consumption information and reduce the amount of calculation.
  • the first power consumption information can be determined by using the relationship model of the first temperature detection point.
  • the first association relationship can also be obtained.
  • the power consumption of each subsystem indicated by the first power consumption information satisfies the first association relationship.
  • the first association relationship may be the ratio between the power consumption of each subsystem, the first association relationship may also be the ratio between the frequencies of each subsystem, and the first association relationship may also include the power consumption values of part of the subsystems.
  • the power consumption of each sub-system and the frequency of the sub-system satisfy the second association relationship.
  • the power consumption of the subsystem is positively correlated with the voltage of the subsystem, and the power consumption of the subsystem is positively correlated with the frequency of the subsystem.
  • the operating voltage generally remains unchanged.
  • the power consumption of the subsystem corresponds to the frequency of the subsystem one-to-one.
  • the adjustment of the power consumption of each sub-system of the chip can also be understood as the adjustment of the frequency of each sub-system.
  • step S210 the first association relationship can be obtained.
  • the first association relationship is used to indicate the relationship between the power consumption of each subsystem indicated by the first power consumption information.
  • the first association relationship may be preset or determined according to the current operating conditions of the chip.
  • the current frequency information of the chip can be obtained.
  • the current frequency information is used to indicate the current operating frequencies of multiple subsystems of the chip.
  • the first association relationship may be that the ratio between the operating frequencies of the multiple subsystems is equal to the ratio between the current operating frequencies of the multiple subsystems indicated by the current frequency information.
  • the first power consumption information can make the ratio between the operating frequencies of the various subsystems basically unchanged.
  • the current operating frequency of each subsystem may be the operating frequency of the subsystem at the current moment.
  • the frequency ratio of each subsystem may be determined according to the requirements of the running program. Compared with other power consumption adjustment methods, in the process of adjusting the frequency of each subsystem according to the temperature, keeping the ratio between the operating frequencies of each subsystem unchanged can reduce the impact on chip performance.
  • the power consumption corresponding to the first temperature detection point can be determined according to the preset temperature threshold of each first temperature detection point. information.
  • the power consumption information corresponding to each first temperature detection point makes the first predicted temperature of the first temperature detection point equal to the preset temperature threshold of the first temperature detection point.
  • first power consumption information is determined.
  • the power consumption information indicating the minimum power consumption of each subsystem may be the first power consumption information.
  • the first power consumption information needs to make the ratio between the operating frequencies of the subsystems the same as the ratio between the operating frequencies of the subsystems indicated by the current frequency information, after obtaining the current frequency information , According to the current frequency information, the predicted temperature of each first temperature detection point can be calculated.
  • step S211a to step S213 may be performed.
  • step S211a the power consumption of each subsystem is increased.
  • the increased power consumption of each subsystem makes the ratio between the frequencies of each subsystem unchanged.
  • step S212 the power consumption of each subsystem after the increase is input into the relationship model of each first temperature detection point to determine the predicted temperature of each first temperature detection point corresponding to the power consumption of each subsystem after the increase.
  • step S213 the magnitude relationship between the predicted temperature of each first temperature detection point and the preset temperature threshold of the temperature detection point is determined.
  • step S211 to step S213 are executed again. If the predicted temperature of at least one first temperature detection point is greater than or equal to the preset temperature threshold of the first temperature detection point, stop increasing the power consumption of each subsystem.
  • step S212 When the predicted temperature of each first temperature detection point is not greater than the preset temperature threshold value of the temperature detection point, and there is at least one first temperature detection point whose predicted temperature is equal to the preset temperature threshold value of the first temperature detection point, change When step S212 is performed this time, the power consumption of each subsystem of the relationship model of each first temperature detection point is input as the power consumption indicated by the first power consumption information.
  • the power consumption of each subsystem of the relationship model of each first temperature detection point when step S212 was last performed As the power consumption indicated by the first power consumption information.
  • step S211 the power consumption of each subsystem increases, so that each time the increase in the frequency of each subsystem is equal or unequal.
  • step S211b is performed to reduce the power consumption of each subsystem. Then, step S212 and step S213 are performed.
  • step S211b to step S213 are executed again.
  • the power consumption is the power consumption indicated by the first power consumption information.
  • the ratio between the operating frequencies of the various subsystems can also be adjusted, which is not limited in the embodiment of the present application.
  • step S220 the chip is controlled to operate according to the first power consumption information.
  • the chip can be controlled to operate according to the first power consumption information to achieve optimal performance. It is also possible to control the frequency of the subsystems of the chip according to the program or other requirements of the system, so that the power consumption of each subsystem is less than the power consumption of the subsystem indicated by the first power consumption information.
  • the relationship model of each first temperature detection point is used to determine the first power consumption information.
  • the first power consumption information makes the first predicted temperature of each first temperature detection point less than that of the temperature detection point. Preset temperature threshold. According to the first power consumption information, the power consumption of each subsystem is adjusted, thereby controlling the temperature of the chip, ensuring the safe operation of the chip, and better exerting the performance of the chip without frequent detection of the temperature at the temperature detection point.
  • the change of the ambient temperature will affect the heat dissipation capacity of the chip at any time, and considering the influence of the change of the ambient temperature on the relationship model of the temperature detection point, the temperature adjustment of the chip can be made more accurate.
  • the second power consumption information may be obtained, where the second power consumption information is used to indicate the current power consumption of each subsystem.
  • the second power consumption information may be obtained by detection.
  • the first power consumption information determined at the last moment may also be used as the second power consumption information at the current moment.
  • the second power consumption information can be input into the relationship model of the temperature detection point to determine the second predicted temperature of the temperature detection point.
  • the adjusted temperature detection point relationship model may be used to determine the first power consumption information, the first power consumption information
  • the first predicted temperature determined by using the adjusted relationship model of the temperature detection point is less than or equal to the preset temperature threshold of the temperature detection point.
  • the second predicted temperature and the actual temperature are compared, and the difference between the two is fed back to the relationship model of the temperature detection point, so that the relationship model of the temperature detection point can be adjusted and calibrated according to the slowly changing ambient temperature.
  • the power consumption of the chip is adjusted subsequently, the power consumption of the chip subsystem is adjusted according to the adjusted relationship model, so as to improve the accuracy of the power consumption adjustment.
  • adjusting the relationship model of the temperature detection points according to the difference between the second predicted temperature and the actual temperature can make the relationship model of the temperature detection points after adjustment more accurate.
  • the power consumption of the various subsystems of the chip may change according to the requirements of the running programs and so on for the various subsystems of the chip. Therefore, it may not be accurate to use the first power consumption information determined at the last moment as the second power consumption information at the current moment.
  • the power consumption of each subsystem of the chip can be detected to obtain the second power consumption information.
  • the second predicted temperature can be more in line with the operating conditions of the chip, so that the adjustment of the relationship model of the temperature detection points is more accurate.
  • the relationship model is adjusted, so that the relationship model can adapt to changes in ambient temperature, and can respond to power consumption in a more timely manner when the power consumption of one or more subsystems changes stepwise The change.
  • the second power consumption information can be used to indicate the power consumption of the subsystem at the current time, or it can be used to indicate the average power consumption of the subsystem in a preset time period before the current time, and it can also be used to indicate the subsystem’s power consumption before the current time.
  • the third correlation between the power consumption of the time period and the time is a third correlation between the power consumption of the time period and the time.
  • the third association relationship may include the power consumption value at each time point in the preset time period, and may also include one or more of the power consumption change range, the power consumption change frequency, and the like.
  • the preset time period before the current time may be adjacent to the current time, or there may be a short time interval from the current time.
  • the relationship model of the temperature detection point may determine the third power consumption information according to the second power consumption information.
  • the third power consumption information may include the average power consumption of each of the subsystems in the window period corresponding to the subsystem before the current moment.
  • the preset time period includes the window time period.
  • the window time period can be the same as the preset time period. Or, the window time period may include only a part of the preset time period.
  • the relationship model is used to determine the second predicted temperature according to the average power consumption in the window period, and the relationship model of the temperature detection point is adjusted according to the second predicted temperature, which can improve the relationship model of the temperature detection point Accuracy.
  • the relationship model may determine the window time period according to the second power consumption information, so that the accuracy of the relationship model of the temperature detection point may be further improved.
  • the relationship model of the temperature detection points may include a window determination model.
  • the window determination model may be used to determine the window time period according to the second power consumption information.
  • the window determination model may be a linear model. For example, one or more of the magnitude of change in power consumption and the frequency of change in the second power consumption information may be proportional to the length of the window period, and the window determination model may be based on the magnitude of change in power consumption in the second power consumption information. , Change frequency, etc., determine the length of the window time period, and use the time period of that length before the current moment as the window time period.
  • the window determination model can also be expressed as the correspondence between the range of the power consumption change in the second power consumption information and the length of the window time period. According to the amplitude range in which the range of power consumption changes in the second power consumption information, the length of the window period corresponding to the amplitude range can be determined. The time period of this length before the current time can be used as the window time period.
  • the window determination model can also be a neural network model.
  • a neural network can be composed of neural units.
  • a neural unit can refer to an arithmetic unit that takes x s and intercept 1 as inputs.
  • the output of the arithmetic unit can be expressed as:
  • s 1, 2,...n, n is a natural number greater than 1
  • W s is the weight of x s
  • b is the bias of the neural unit.
  • f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into an output signal.
  • the output signal of the activation function can be used as the input of the next convolutional layer, and the activation function can be a sigmoid function.
  • a neural network is a network formed by connecting multiple above-mentioned single neural units together, that is, the output of one neural unit can be the input of another neural unit.
  • the input of each neural unit can be connected with the local receptive field of the previous layer to extract the characteristics of the local receptive field.
  • the local receptive field can be a region composed of several neural units.
  • the window determination model can be obtained through training.
  • For the training process of the window determination model refer to the description of FIG. 3 for details.
  • the window determination model may determine the window time period according to the second power consumption information.
  • the window determination model can only change the length of the window time period, that is, the current time can be used as the end time of the window time period, and the length of the window time period can be changed to determine the window time period.
  • the window determination model can also change the start time and end time of the window period. The embodiment of the application does not limit this.
  • the relationship model may be adjusted when the difference between the second predicted temperature and the actual temperature is less than or equal to the preset difference threshold. Conversely, when the difference between the first predicted temperature and the actual temperature is greater than the preset difference threshold, the relationship model is no longer adjusted.
  • the change of ambient temperature is slow, and the range of change is small, and the impact on the relationship model is very small. From the perspective of the impact of ambient temperature changes on the relationship model, the preset difference threshold can be set to improve the relationship model. accuracy.
  • the change of power consumption is random. By setting the preset difference threshold, excessive correction of the relationship model can be avoided, and the stability and reliability of the relationship model can be improved.
  • the number of triggers can be recorded.
  • the number of triggers is used to indicate the number of times that the difference between the first predicted temperature and the actual temperature is less than or equal to the preset difference threshold within the preset time length.
  • the number of triggers may be updated when the difference is less than or equal to the preset difference threshold.
  • the relationship between the trigger times and the preset times can be judged.
  • the relationship model of the temperature detection point is adjusted. Conversely, when the number of triggers is greater than the preset number, the adjustment of the relationship model of the temperature detection point is stopped.
  • the power consumption of the subsystem changes frequently according to the needs of data processing. Because temperature changes are slow, it is relatively lagging compared with changes in power consumption.
  • the power consumption of the subsystem increases or decreases irregularly, it can be adjusted according to the relationship model and cannot follow the changes in the power consumption of the subsystem in time, and cannot accurately predict the temperature of each temperature detection point in the chip. You can stop the relationship Model adjustment.
  • the power consumption of the subsystem can be adjusted according to the relationship model obtained before step S210.
  • FIG. 3 is a schematic flowchart of a method for establishing a relationship model of temperature detection points provided by an embodiment of the present application.
  • step S410 the control chip operates.
  • the chip may be a processor chip in an electronic device such as a mobile phone or a computer.
  • one or more programs can be controlled to run.
  • the program may include, for example, an application program frequently used by the user.
  • step S420 multiple sets of training data are acquired.
  • Each set of training data includes training power consumption information and training measurement temperature.
  • Training power consumption information is used to indicate the power consumption of each subsystem in the chip.
  • the training measurement temperature may indicate the temperature of the chip when the chip runs according to the training power consumption information.
  • the training power consumption information and training measurement temperature can be determined during the operation of the chip. For example, training power consumption information and training measurement temperature can be recorded at fixed time intervals.
  • the training measurement temperature may be the time at which the training power consumption information is recorded, and the temperature at the temperature detection point.
  • the embodiment of the present application does not limit the acquisition method of training power consumption information.
  • the frequency of the chip subsystem can be obtained. According to the frequency of the subsystem and the correlation between frequency and power consumption, the power consumption of the subsystem can be determined.
  • the power consumption information sent by the detection device can also be received.
  • the detection device can be used to detect the power consumption of the subsystem.
  • the detection device can be a hardware device.
  • the training power consumption information may indicate the instantaneous value of the power consumption of each subsystem at the moment when the training power consumption information is recorded.
  • the power consumption x i of the i-th subsystem may be the power consumption of the i-th subsystem at the time when the actual temperature of the detection point is detected.
  • the training power consumption information may also indicate the average power consumption of each subsystem in a certain period of time before the time when the power consumption information is recorded.
  • the power consumption x i of the i-th subsystem may also be the average power consumption of the i-th subsystem in a period of time before the time when the actual temperature of the detection point is detected.
  • the training power consumption information may also be used to indicate the relationship between the power consumption and time of each subsystem within a preset length of time before the time when the power consumption information is recorded.
  • the training power consumption information indicates the average value of the power consumption of each subsystem, which can improve the accuracy of the established relationship model.
  • the training measurement temperature can be expressed as T j1 .
  • step S430 a relationship model is established based on multiple sets of training data.
  • the relationship model of the j-th detection point is established.
  • the predicted temperature T j at the j-th detection point can be expressed as:
  • T j [a 0j ,a 1j ,...,a nj ] ⁇ [x 0 ,x 1 ,...,x n ] T +c j
  • n is the number of subsystems in the chip
  • x 0 , x 1 ,..., x n are the power consumption of n subsystems
  • a 0j , a 1j ,..., a nj are x 0
  • the coefficients of x 1 ,..., x n are all constants
  • c j is a constant.
  • the power consumption of each subsystem indicated by the training power consumption information, and the training measurement temperature T j1 corresponding to the training power consumption information can be brought into the expression of the predicted temperature T j , and solved to obtain the parameter a 0j ,a 1j ,...,a nj and c j .
  • machine learning can also be used to determine the relationship model of each temperature detection point.
  • the original relationship model can be obtained.
  • the original relational model can be a linear model or a neural network model.
  • steps S431 to S432 can be executed.
  • step S431 the training power consumption information can be input to the original relational model to obtain the training prediction temperature at that moment.
  • step S432 according to the error between the training predicted temperature and the training measured temperature T j1 corresponding to the training predicted temperature, the parameters of the original relationship model are adjusted to minimize the error.
  • step S433 using the adjusted parameter value, return and continue to perform step S431 and step S432 until the obtained error gradually converges, that is, the relationship model of the j-th temperature detection point after the training is obtained.
  • the relationship model of the j-th temperature detection point is used to determine the power consumption of each subsystem according to the training power consumption information.
  • the preset time period includes the window time period.
  • the relationship model of the j-th temperature detection point is also used to determine the training predicted temperature according to the average power consumption of each subsystem in the window period corresponding to the subsystem.
  • each set of training data includes training power consumption information and training measurement temperature.
  • the training power consumption information is input into the original relational model to obtain the training predicted temperature, and the training power consumption information is used to indicate the power consumption of multiple subsystems of the chip. Then, according to the training predicted temperature and the training measured temperature, the parameters of the original relationship model are adjusted to minimize the difference between the training predicted temperature and the training measured temperature.
  • the original relationship model may be a linear model, a corresponding relationship model, a neural network model, or the like.
  • adjusting the parameters of the original relationship model may be adjusting the parameters of the linear model, the parameters of the corresponding relationship model, or the parameters of the neural network model.
  • step S410 to step S430 a relationship model of temperature detection points can be established.
  • the device for training the relationship model of the temperature detection point and the device for executing the control method of the chip shown in FIG. 2 may be the same or different.
  • the device that executes the chip control method shown in FIG. 2 may obtain the trained relationship model before performing step S210.
  • the two devices can communicate, so that the device performing the method described in FIG. 2 obtains temperature detection Point relational model. Therefore, the relationship model of the temperature detection point can be applied to the control method of the chip shown in FIG. 2.
  • FIG. 4 is a schematic flowchart of a method for controlling a chip provided by an embodiment of the present application.
  • the chip may be an SOC, for example, and includes multiple subsystems.
  • a subsystem can be understood as one or more processors, or can also be understood as an area where part of the hardware circuits of one or more processors are located.
  • the frequency of each subsystem can be controlled independently.
  • the relationship model of each temperature detection point is used to represent the relationship between the power consumption of each subsystem and the predicted temperature of the temperature detection point. Therefore, the relationship model of each temperature detection point can also be understood as used to represent the relationship between the frequency of each subsystem and the predicted temperature of the temperature detection point.
  • the frequency set F0 can be acquired.
  • the frequency set F0 includes a plurality of frequency information. Each frequency information can be used to indicate the frequency of a subsystem at time t0.
  • the multiple frequency information in the frequency set F0 corresponds to multiple subsystems of the chip one-to-one.
  • the embodiment of the present application does not limit the way of obtaining frequency information.
  • the frequency information can be obtained in a fixed period.
  • the frequency of each subsystem can be obtained from the hardware device used for frequency statistics.
  • the frequency information may be determined according to the corresponding relationship between power consumption and frequency.
  • the corresponding relationship between power consumption and frequency of each subsystem can be the same or different. Can detect the power consumption of each subsystem.
  • the frequency of the subsystem can be determined.
  • the static power consumption of the subsystem can be determined by detecting the leakage current of the subsystem, that is, the integrated circuit quiescent current (IDDQ).
  • the static power consumption of the subsystem can also be determined according to parameters such as process voltage temperature (process, voltage, temperature, PVT).
  • Dynamic power consumption and static power consumption can be obtained separately.
  • Power consumption can be the sum of dynamic power consumption and static power consumption.
  • the power consumption of the subsystem can be determined through the detection of dynamic power consumption and static power consumption.
  • the power consumption of the subsystem can be determined by detecting the power current or ground current of the subsystem.
  • a threshold value set can obtain T a.
  • T a set of thresholds may include a preset temperature threshold for each temperature detection point. Multiple temperature detection points can be scattered on the chip. For each temperature detection point, the temperature of the detection point can be detected by a temperature sensor.
  • the preset temperature threshold of each temperature detection point can be equal or unequal. For example, the preset temperature threshold of each temperature detection point is equal, and the highest safe temperature at which the chip works normally can be used as the preset temperature threshold of each temperature detection point.
  • step S301 the relationship model of each temperature detection point is used to determine the frequency set F1.
  • the ratios between the frequencies in the frequency set F1 and the frequency set F0 are equal. Further, the set of frequencies F1 such that the predicted temperature of each detecting point is less than or equal to the preset temperature of the temperature detection point threshold set in the threshold value of T a.
  • the frequency F1 is set in accordance with the relational model of each temperature detection point, the ratio between the respective set of frequencies in the frequency F0, and a threshold determined by the set of T a.
  • the predicted temperature of the detection point of at least one temperature detection point is equal to the preset temperature threshold of the temperature detection point.
  • the predicted temperature of the detection point of each temperature detection point is determined according to the frequency set F1 and the relationship model of the temperature detection point. Equality can also be approximately equal.
  • the relationship model of temperature detection points may not include time-related parameters, that is, the relationship model of each temperature detection point can be understood as a relationship model when the power consumption of each subsystem is stable, that is, each temperature detection
  • the point relationship model can represent the relationship between the power consumption of multiple subsystems and the predicted temperature of the temperature detection point under the condition that the power consumption of multiple subsystems remains basically unchanged.
  • the temperature of the temperature detection point can be predicted according to the power consumption of each subsystem.
  • the relationship model of each temperature detection point may also include time-related parameters.
  • the relationship model of each temperature detection point can also dynamically predict the temperature of each temperature detection point when the power consumption of the subsystem is unstable.
  • the relationship model of the temperature detection point may include the power consumption of multiple subsystems, the relationship between the real-time temperature of the detection point of the temperature detection point, and the predicted temperature of the detection point of the temperature detection point after a preset length of time. That is to say, the temperature detection value of the temperature detection point at time t0 and the power consumption of multiple subsystems are input into the relationship model of the temperature detection point, and the relationship model of the temperature detection point can predict the temperature detection point at time t0 temperature.
  • the relationship model of the temperature detection point represents the relationship between the power consumption of multiple subsystems and the predicted temperature of the temperature detection point when the system frequency is stable, which can reduce the complexity of the relationship model of the temperature detection point.
  • the relationship between the power consumption of multiple subsystems and the predicted temperature of the temperature detection point when the relationship model indicates that the power consumption of the subsystem is stable is described as an example.
  • the length of time between time t0 and time t1 can be a preset value or any value.
  • the frequency set F1 can be determined according to the ratio between the frequencies in the frequency set F0 and the relationship model of each temperature detection point.
  • the preset temperature threshold of the temperature detection point is used as the predicted temperature, and a set of frequencies of the temperature detection point can be determined.
  • the frequency set includes the frequencies of the various subsystems. The ratio between the frequency of each subsystem in the frequency set and each frequency in the frequency set F0 is equal.
  • the frequency set where the minimum frequency value is located can make the detection point of each temperature detection point The predicted temperature does not exceed the preset temperature threshold of the temperature detection point. Therefore, the frequency set with the smallest frequency value can be used as the frequency set F1.
  • multiple frequency sets may be determined according to the ratio between the frequencies of the various subsystems indicated by the frequency set F0.
  • the ratio between the frequencies of the various subsystems indicated by each frequency set is the same as the ratio indicated by the frequency set F0.
  • the relationship model of each temperature detection point is used to determine the predicted temperature set corresponding to the multiple frequency sets.
  • the predicted temperature set corresponding to each frequency set is used to indicate the predicted temperature of each temperature detection point when the chip operates according to the frequency set.
  • Multiple predicted temperature sets can be expressed as T1+1', T2+1', T3+1', T4+1', etc., respectively.
  • T1+1', T2+1', T3+1', T4+1', etc. at least one of the predicted temperature of each detection point does not exceed the preset temperature threshold of the temperature detection point In the predicted temperature set, determine a predicted temperature set.
  • the predicted temperature set T1+1' may be determined according to the frequency set F0 and the relationship model of each temperature detection point. Then, it can be judged whether the temperature of each temperature detection point in the predicted temperature set T1+1' is less than the preset temperature threshold of the temperature detection point. When the temperature of each temperature detection point in T1+1' is less than the preset temperature threshold of the temperature detection point, gradually increase the frequency of each subsystem to obtain multiple frequency sets and one-to-one correspondence with the multiple frequency sets The multiple predicted temperature sets T2+1', T3+1', T4+1' and so on.
  • Temperature detection spots in the relational model can be expressed by a function, for example, the temperature detection point j on the predicted temperature T + 1 'j and each subsystem relationship model can be expressed as a linear function by:
  • T+1' j [a 0j ,a 1j ,...,a nj ] ⁇ [x 0 ,x 1 ,...,x n ] T +c j
  • n is the number of subsystems in the chip
  • x 0 , x 1 ,..., x n are the power consumption of n subsystems
  • a 0j , a 1j ,..., a nj are x 0
  • the coefficients of x 1 ,...,x n , a 0j , a 1j ,..., a nj and c j are constants.
  • the temperature of each temperature detection point of the chip can be actively predicted, so that there is no need to perform frequent detection of the temperature of each temperature detection point.
  • the temperature of the chip The power consumption (that is, the frequency) is adjusted to make the chip work in a safe working range and make the chip show higher performance.
  • the relationship model can be used to actively determine the operating frequency of the chip according to the preset temperature threshold of the temperature detection point to achieve adaptive control. Avoid the response lag of temperature control, avoid the occurrence of under-damping or over-damping, and improve the working stability of the chip.
  • the influence of each subsystem on the temperature of each temperature detection point can be expressed by a linear function, and the influence of each subsystem can be expressed by a coefficient.
  • step S302 is performed, and the control chip operates according to the frequency set F1.
  • the chip can be controlled to operate according to the frequency set F1. Or, according to the functional requirements of each sub-system, each sub-system can be controlled to operate at a state lower than the corresponding frequency in the frequency set F1.
  • step S301 to step S302 the adjustment of the chip frequency is realized.
  • the relationship model of the temperature detection point can be adjusted according to the difference between the predicted temperature value of the temperature detection point and the actual temperature value of the temperature detection point. From step S303 to step S305, taking the chip operating according to the frequency set F1 between time t0 and time t1 as an example, the adjustment of the relationship between the power consumption of each subsystem in the relationship model and the predicted temperature of each detection point will be explained.
  • step S303 the chip is measured to obtain the actual temperature set T+1 at time t1.
  • the actual temperature set T+1 includes the actual temperature of each temperature detection point at time t1.
  • step S304 according to the actual temperature set T+1 and the predicted temperature set T+1', the difference between the actual temperature and the predicted temperature at each temperature detection point is calculated.
  • the predicted temperature set T+1' may be the predicted temperature set corresponding to the frequency set F1 determined in step S301.
  • the predicted temperature of the temperature detection point is the predicted temperature of the temperature detection point in the predicted temperature set T+1'.
  • the predicted temperature set corresponding to the frequency set F1 may be used as the predicted temperature set T+1' and stored.
  • the frequency of each subsystem may change as needed.
  • the frequency set F1' may be obtained at the time t1, and the frequency set F1' includes the frequency corresponding to the average power consumption of each subsystem in the window period before the time t1.
  • the predicted temperature set T+1' can be determined.
  • the predicted temperature set T+1' includes the predicted temperature of each temperature detection point determined according to the frequency set F1' using the relationship model of each temperature detection point.
  • Determining the predicted temperature set T+1' according to the frequency set F1' can make the predicted temperature set T+1' more in line with the actual operating conditions of the various subsystems of the chip.
  • the difference between the predicted temperature and the actual temperature of each temperature detection point is calculated.
  • step S305 according to the difference between the predicted temperature and the actual temperature of each temperature detection point, the relationship model of the temperature detection point is adjusted.
  • the predicted temperature of the temperature detection point determined according to the adjusted relationship model of the temperature detection point is equal to the actual temperature of the temperature detection point.
  • the relationship model between the predicted temperature T+1' j and each subsystem at the j-th temperature detection point can be expressed by a linear function as:
  • T+1' j [a 0j ,a 1j ,...,a nj ] ⁇ [x 0 ,x 1 ,...,x n ] T +c j
  • the constant term c j in the relationship model of the j-th temperature detection point can be adjusted, so that the predicted temperature of the temperature detection point determined according to the adjusted relationship model of the j-th temperature detection point is the same as the actual temperature of the temperature detection point. equal.
  • the difference between the predicted temperature of each temperature detection point and the actual temperature of the temperature detection point is fed back to the relationship model of the temperature detection point, so that the temperature detection is based on the influence of the slowly changing environmental temperature on the relationship model of the temperature detection point.
  • the point of the relationship model is calibrated.
  • the power consumption of each subsystem may be in a state of change.
  • control each subsystem to run according to the frequency set F1.
  • the operating frequency of each subsystem may be adjusted according to the running program and other conditions. For example, changes in the number and types of running programs may increase or decrease the frequency of some subsystems, thereby changing the power consumption of each subsystem.
  • the difference between the predicted temperature of the temperature detection point and the actual temperature of the detection point at time t1 can be based on the temperature detection point relationship model.
  • the constant term c j is adjusted.
  • the temperature detection point j is the predicted temperature detection point T + 1 'j of the expression may be considered environmental temperature.
  • the influence of the ambient temperature can be reflected by the difference between the predicted temperature T+1' j at the j-th temperature detection point and the actual temperature T+1 j , that is, error j.
  • the relationship model of the temperature detection point can be adjusted to accelerate the convergence and improve the relationship model of the temperature detection point. Corresponding changes.
  • the relationship model can be adjusted according to the difference. Conversely, when the difference between the first predicted temperature and the actual temperature is greater than the preset difference threshold, the relationship model is no longer adjusted.
  • the difference is less than or equal to the preset difference threshold, and it can also be understood that the absolute value of the difference is less than or equal to the preset difference threshold.
  • FIG. 5 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • the SOC chip includes multiple subsystems such as CPU, GPU, NPU, and multiple temperature detection points.
  • the control device 1000 is used to execute the method described in FIG. 2 or FIG. 4.
  • the control device 1000 can also be used to execute the method shown in FIG. 3.
  • the control device 1000 may be located on the SOC chip. If the frequency of the control device 1000 can be individually controlled, the control device 1000 can also be used as a subsystem.
  • the control device 1000 may also be located on other chips, which is not limited in the embodiment of the present application.
  • Each subsystem can send the current frequency f0 of the subsystem to the control device 1000, so that the control device 1000 can obtain the frequency set F0 and complete step S301.
  • the control device 1000 determines the frequency set F1
  • it can send the control frequency f1 of each subsystem in the frequency set F1 to the subsystem, thereby implementing step S302 to control each subsystem Operate according to the control frequency f1 of this subsystem.
  • the control device 1000 may also perform step S303 to obtain the actual temperature of each temperature detection point.
  • control device 1000 may perform step S304 to calculate the difference between the predicted temperature and the actual temperature of the temperature detection point. After that, the control device 1000 may perform step S305 to adjust the relationship model of the temperature detection point.
  • the temperature of the temperature detection point can be predicted according to the actual power consumption changes of each subsystem of the new product.
  • the control device 1000 may also obtain the change of the power consumption of each subsystem with time in the preset time period, so as to predict the temperature of each temperature detection point. Therefore, the relationship model of the temperature detection point can be adjusted according to the difference between the predicted temperature and the actual temperature of the temperature detection point.
  • control device 1000 will be described below with reference to FIGS. 6 and 7.
  • Fig. 6 is a schematic structural diagram of a chip control device provided by an embodiment of the present application.
  • the chip includes at least one subsystem, and at least one first temperature detection point is provided on the chip.
  • the control device 1000 includes a determination module 1110 and a control module 1120.
  • the determining module 1110 is configured to determine first power consumption information using the relationship model of each first temperature detection point, and the relationship model of each first temperature detection point is used to indicate the power consumption information and the relationship between the first temperature detection point Predict the relationship between the temperatures, the power consumption information is used to indicate the power consumption of each of the subsystems, and the first power consumption information makes the first predicted temperature determined by using the relationship model of each first temperature detection point less than Or equal to the preset temperature threshold of the first temperature detection point.
  • the control module 1120 is configured to control the chip to operate according to the first power consumption information.
  • the at least one subsystem includes multiple subsystems, and the power consumption of each subsystem indicated by the first power consumption information satisfies a first association relationship.
  • control device 1000 further includes an acquisition module configured to acquire current frequency information of the chip, and the current frequency information is used to indicate current operating frequencies of multiple subsystems of the chip.
  • the first association relationship is that the ratio between the operating frequencies of the multiple subsystems is equal to the ratio between the current operating frequencies of the multiple subsystems indicated by the current frequency information.
  • the power consumption of each sub-system and the frequency of the sub-system satisfy the second correlation.
  • multiple temperature detection points are provided on the chip, the multiple temperature detection points include the at least one first temperature detection point, and a preset temperature threshold of each temperature detection point is equal.
  • the at least one first temperature detection point is at least one temperature detection point with the highest temperature among the plurality of temperature detection points.
  • control device 1000 further includes an acquisition module configured to acquire second power consumption information, and the second power consumption information is used to indicate the current power consumption of each of the subsystems.
  • the control device 1000 further includes a detection module configured to detect the chip to obtain the actual temperature of the i-th first temperature detection point in the at least one first temperature detection point, and i is a positive integer.
  • the determining module 1110 is further configured to determine the second predicted temperature of the i-th first temperature detection point according to the relationship model of the i-th first temperature detection point and the second power consumption information.
  • the control device 1000 further includes an adjustment module configured to adjust the relationship model of the i-th first temperature detection point according to the difference between the second predicted temperature and the actual temperature, so that according to The adjusted relationship model of the i-th first temperature detection point and the third predicted temperature determined by the second power consumption information are equal to the actual temperature.
  • the determining module 1110 is configured to determine the first power consumption information according to the adjusted relationship model of the i-th first temperature detection point.
  • the first power consumption information enables the first predicted temperature determined by using the adjusted relationship model of the i-th first temperature detection point to be less than or equal to the preset temperature threshold of the i-th first temperature detection point.
  • the second power consumption information is used to indicate a third association relationship between power consumption and time of each of the subsystems for a preset period of time before the current moment.
  • the relationship model of the i-th first temperature detection point is used to determine third power consumption information according to the second power consumption information, where the third power consumption information includes that each of the subsystems is before the current moment The average power consumption in a window time period corresponding to the subsystem, where the preset time period includes the window time period.
  • the relationship model of the i-th first temperature detection point is also used to determine the second predicted temperature according to the third power consumption information.
  • the relationship model of the i-th first temperature detection point is used to determine the window time period corresponding to each of the subsystems according to the third association relationship.
  • the adjustment module is configured to adjust the relationship model of the i-th first temperature detection point according to the difference when the difference is less than or equal to a preset difference threshold.
  • control device 1000 further includes an update module configured to update the number of triggers when the difference is less than or equal to the preset difference threshold, and the number of triggers is used to indicate a preset time The number of times the difference is less than or equal to the preset difference threshold within the length.
  • the adjustment module is configured to adjust the relationship model of the i-th first temperature detection point according to the difference when the number of triggering times is less than or equal to the preset number of times.
  • At least one temperature detection point is provided on the chip, and the at least one temperature detection point includes the at least one first temperature detection point.
  • the control device 1000 also includes an acquisition module and a training module.
  • the acquisition module is further configured to acquire training power consumption information and a j-th training measurement temperature, where the training power consumption information is used to indicate the power consumption of the at least one subsystem, and the j-th training measurement temperature is used to indicate all
  • the temperature of the j-th temperature detection point in the at least one temperature detection point, j is a positive integer.
  • the training module is configured to input the training power consumption information into the original relational model to obtain the j-th training predicted temperature
  • the training module is further configured to adjust the parameters of the original relationship model according to the jth training predicted temperature and the jth training measured temperature, so that the jth training predicted temperature and the jth training measured temperature Minimize the difference to obtain the relationship model of the j-th temperature detection point.
  • the relationship model of each first temperature detection point is used to indicate the magnitude of the influence of the power consumption of each subsystem on the predicted temperature of the first temperature detection point.
  • Fig. 7 is a schematic structural diagram of a chip control device provided by an embodiment of the present application.
  • the chip includes at least one subsystem, and at least one first temperature detection point is provided on the chip.
  • the control device 1000 includes a memory 1210 and a processor 1220.
  • the memory 1210 is used to store program instructions.
  • the processor 1220 is configured to:
  • the relationship model of each first temperature detection point is used to determine the first power consumption information, and the relationship model of each first temperature detection point is used to represent the relationship between the power consumption information and the predicted temperature of the first temperature detection point
  • the power consumption information is used to indicate the power consumption of each subsystem, and the first power consumption information makes the first predicted temperature determined by using the relationship model of each first temperature detection point less than or equal to the first The preset temperature threshold of the temperature detection point;
  • the at least one subsystem includes multiple subsystems, and the power consumption of each subsystem indicated by the first power consumption information satisfies a first association relationship.
  • the processor 1220 is further configured to obtain current frequency information of the chip, where the current frequency information is used to indicate current operating frequencies of multiple subsystems of the chip.
  • the first association relationship is that the ratio between the operating frequencies of the multiple subsystems is equal to the ratio between the current operating frequencies of the multiple subsystems indicated by the current frequency information.
  • the power consumption of each sub-system and the frequency of the sub-system satisfy the second correlation.
  • multiple temperature detection points are provided on the chip, the multiple temperature detection points include the at least one first temperature detection point, and a preset temperature threshold of each temperature detection point is equal.
  • the at least one first temperature detection point is at least one temperature detection point with the highest temperature among the plurality of temperature detection points.
  • the processor 1220 is further configured to obtain second power consumption information, where the second power consumption information is used to indicate the current power consumption of each of the subsystems.
  • the processor 1220 is further configured to detect the chip to obtain the actual temperature of the i-th first temperature detection point in the at least one first temperature detection point, where i is a positive integer.
  • the processor 1220 is further configured to determine a second predicted temperature of the i-th first temperature detection point according to the relationship model of the i-th first temperature detection point and the second power consumption information.
  • the processor 1220 is further configured to determine the first power consumption information according to the adjusted relationship model of the i-th first temperature detection point, and the first power consumption information enables the use of the adjusted
  • the first predicted temperature determined by the relationship model of the i-th first temperature detection point is less than or equal to the preset temperature threshold of the i-th first temperature detection point.
  • the processor 1220 is further configured to determine the first power consumption information according to the adjusted relationship model of the i-th first temperature detection point.
  • the first power consumption information enables the first predicted temperature determined by using the adjusted relationship model of the i-th first temperature detection point to be less than or equal to the preset temperature threshold of the i-th first temperature detection point.
  • the second power consumption information is further used to indicate a third association relationship between the power consumption and time of each of the subsystems for a preset period of time before the current moment.
  • the relationship model of the i-th first temperature detection point is used to determine third power consumption information according to the second power consumption information, where the third power consumption information includes that each of the subsystems is before the current moment The average power consumption in a window time period corresponding to the subsystem, where the preset time period includes the window time period.
  • the relationship model of the i-th first temperature detection point is further used to determine the second predicted temperature according to the third power consumption information.
  • the relationship model of the i-th first temperature detection point is used to determine the window time period corresponding to each of the subsystems according to the third association relationship.
  • the processor 1220 is further configured to: when the difference value is less than or equal to a preset difference value threshold, adjust the relationship model of the i-th first temperature detection point according to the difference value.
  • the processor 1220 is further configured to: when the difference value is less than or equal to the preset difference value threshold, update the number of triggers, and the number of triggers is used to indicate that the difference is less than or equal to the preset time length. The number of times equal to the preset difference threshold.
  • the processor 1220 is further configured to: when the number of triggering times is less than or equal to a preset number of times, adjust the relationship model of the i-th first temperature detection point according to the difference.
  • At least one temperature detection point is provided on the chip, and the at least one temperature detection point includes the at least one first temperature detection point.
  • the processor 1220 is further configured to obtain training power consumption information and a jth training measurement temperature, where the training power consumption information is used to indicate the power consumption of the at least one subsystem, and the jth training measurement temperature is used to indicate the When the chip runs according to the training power consumption information, the temperature of the j-th temperature detection point in the at least one temperature detection point, j is a positive integer.
  • the processor 1220 is further configured to input the training power consumption information into the original relational model to obtain the j-th training predicted temperature.
  • the processor 1220 is further configured to adjust the parameters of the original relational model according to the jth training predicted temperature and the jth training measured temperature, so that the difference between the jth training predicted temperature and the jth training measured temperature is The difference is minimized to obtain the relationship model of the j-th temperature detection point.
  • the relationship model of each first temperature detection point is used to indicate the magnitude of the influence of the power consumption of each subsystem on the predicted temperature of the first temperature detection point.
  • An embodiment of the present application also provides an electronic device, which includes a chip and the aforementioned chip control device.
  • An embodiment of the present application further provides a computer program storage medium, which is characterized in that the computer program storage medium has program instructions, and when the program instructions are executed by a processor, the processor executes the control method of the chip described above.
  • An embodiment of the present application further provides a chip system, characterized in that the chip system includes at least one processor, and when the program instructions are executed in the at least one processor, the at least one processor is caused to execute the foregoing The control method of the chip.
  • At least one refers to one or more
  • multiple refers to two or more.
  • And/or describes the association relationship of the associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean the existence of A alone, A and B at the same time, and B alone. Among them, A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects before and after are in an “or” relationship.
  • “The following at least one item” and similar expressions refer to any combination of these items, including any combination of single items or plural items.
  • At least one of a, b, and c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.
  • the disclosed system, device, and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, 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 the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disks or optical disks and other media that can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

一种芯片的控制方法和装置,所述芯片包括至少一个子系统,所述芯片上设置有至少一个第一温度检测点。所述方法包括:利用每个第一温度检测点的关系模型,确定第一功耗信息,第一功耗信息使得利用每个第一温度检测点的关系模型确定的第一预测温度小于或等于该第一温度检测点的预设温度阈值(S210)。每个第一温度检测点的关系模型用于表示功耗信息和第一温度检测点的预测温度之间的关系。功耗信息用于指示每个子系统的功耗。之后,控制所述芯片根据第一功耗信息运行(S220)。根据每个第一温度检测点的关系模型,确定芯片中的子系统的功耗,在芯片的控制过程中无需对温度检测点的温度的进行频繁检测。

Description

芯片的控制方法和控制装置 技术领域
本申请涉及芯片领域,具体涉及芯片的控制方法和控制装置。
背景技术
片上系统(system on a chip,SOC)也可以称为处理器芯片,包括多个子系统。一般情况下,子系统的频率越高,子系统的处理能力越强。
为了保证芯片的正常工作,避免芯片损坏,可以为芯片设置温度阈值,目标温度可以理解为芯片安全工作的最高温度限制。芯片温度的升高是由于功耗引起的。子系统的频率越高,功耗越大,芯片温度越高。
为了芯片安全工作,可以根据检测的温度与温度阈值之间的差异,确定系统功耗裕量,并将系统功耗裕量分配给各个子系统。由于芯片的温度实时变化,为了减少芯片的性能的浪费,提高芯片工作的安全性,需要频繁进行温度的检测,对处理器的资源占用较多。
发明内容
本申请提供一种芯片的控制方法和控制装置,能够在对芯片的温度进行控制的同时,降低芯片性能的损失。
第一方面,提供一种芯片的控制方法,所述芯片包括至少一个子系统,所述芯片上设置有至少一个第一温度检测点,所述方法包括:利用每个第一温度检测点的关系模型,确定第一功耗信息。所述第一温度检测点的关系模型用于表示功耗信息和所述第一温度检测点的预测温度之间的关系。所述功耗信息用于指示每个子系统的功耗。所述第一功耗信息使得利用每个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第一温度检测点的预设温度阈值。控制所述芯片根据所述第一功耗信息运行。
利用每个第一温度检测点的关系模型,确定第一功耗信息并控制芯片根据第一功耗信息运行。第一功耗信息使得,利用每个第一温度检测点的关系模型确定的第一预测温度小于或等于该第一温度检测点的预设温度阈值。对芯片温度的调整不依赖于对芯片温度的高频检测,能够减小对处理器资源的占用。
结合第一方面,在一些可能的实现方式中,所述至少一个子系统包括多个子系统,所述第一功耗信息指示的所述每个子系统的功耗满足第一关联关系。
芯片可以包括多个子系统。根据多个子系统之间功耗的关联关系,确定每个子系统的功耗,可以使得对芯片的控制更加精确。
结合第一方面,在一些可能的实现方式中,所述方法还包括:获取所述芯片的当前频率信息,所述当前频率信息用于指示所述芯片的多个子系统当前的工作频率,所述第一关联关系为,所述多个子系统的工作频率之间的比例等于所述当前频率信息指示的所述多个子系统当前的工作频率之间的比例,每个子系统的功耗与所述子系统的频率满足第二关联 关系。
在对各个子系统的功耗进行调整时,不改变各个子系统工作频率之间的比例,可以降低功耗调整对芯片整体性能的影响。
对于每个子系统,第二关联关系可以表示为功耗与频率、工作电压的关系。功耗与工作电压正相关,功耗与频率正相关。当工作电压一定时,功耗与频率一一对应。
结合第一方面,在一些可能的实现方式中,所述芯片上设置有多个温度检测点,所述多个温度检测点包括所述至少一个第一温度检测点,每个温度检测点的预设温度阈值相等,所述至少一个第一温度检测点为所述多个温度检测点中当前温度最高的一个温度检测点。
当芯片包括多个温度检测点时,可以将全部或部分温度检测点作为第一温度检测点。
可以使得每个温度检测点的温度均不超过该温度检测点的检测点预设温度阈值。
芯片包括多个温度检测点时,一般情况下,每个温度检测点的检测点预设温度阈值相等。温度最高的温度检测点中最容易达到检测点预设温度阈值。可以将温度最高的一个或多个温度检测点作为第一温度检测点,确定第一功耗信息。从而,可以降低第一功耗信息确定的难度,减小计算量。
结合第一方面,在一些可能的实现方式中,所述方法还包括;获取第二功耗信息,所述第二功耗信息用于指示所述每个子系统当前的功耗。对所述芯片进行检测以获得所述至少一个第一温度检测点中第i个第一温度检测点的实际温度,i为正整数。根据所述第i个第一温度检测点的关系模型,以及所述第二功耗信息,确定所述第i个第一温度检测点的第二预测温度。根据所述第一预测温度与所述实际温度之间差值,调整所述第i个第一温度检测点的关系模型,以使得根据调整后的所述第i个第一温度检测点的关系模型和所述第二功耗信息确定的第三预测温度与所述实际温度相等。所述利用每个第一温度检测点的关系模型,确定第一功耗信息,包括:利用调整后的所述第i个第一温度检测点的关系模型,确定所述第一功耗信息,所述第一功耗信息使得利用调整后的所述第i个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第i个第一温度检测点的预设温度阈值。
环境温度的变化影响芯片的散热效率,从而对芯片的温度产生影响。根据实际温度与预测温度的差值,对关系模型进行调整,从而使得关系模型能够适应环境温度的变化,并在一个或多个子系统的功耗存在台阶式变化时能够及时响应功耗的变化。
结合第一方面,在一些可能的实现方式中,所述第二功耗信息还用于指示每个所述子系统在当前时刻之前预设时间段的功耗与时间的第三关联关系。所述第i个第一温度检测点的关系模型用于,根据所述第二功耗信息,确定第三功耗信息,所述第三功耗信息包括每个所述子系统在当前时刻之前所述子系统对应的窗口时间段中的平均功耗,所述预设时间段包括所述窗口时间段。所述第i个第一温度检测点的关系模型还用于,根据第三功耗信息,确定所述第一预测温度。
根据预设时间段内功耗的平均值,利用关系模型确定第一预测温度,能够提高温度预测的准确性。
结合第一方面,在一些可能的实现方式中,所述第i个第一温度检测点的关系模型用于,根据所述第三关联关系,确定每个所述子系统对应的窗口时间段。
根据预设时间段内每个所述子系统的功耗与时间的关联关系,调整用于确定第一预测温度的窗口时间段,使得第一预测温度更加准确,从而对温度检测点的关系模型的调整更加准确。
结合第一方面,在一些可能的实现方式中,所述根据所述差值,调整所述第i个第一温度检测点的关系模型,以使得根据调整后的第i个第一温度检测点的关系模型和所述第一功耗信息确定的第一预测温度与所述实际温度相等,包括:当所述差值小于或等于预设差值阈值时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
在第i个第一温度检测点的实际温度与第一预测温度的差值小于预设差值阈值的情况下,调整第i个第一温度检测点的关系模型,可以提高第i个第一温度检测点的关系模型的稳定性和可靠性。
结合第一方面,在一些可能的实现方式中,所述当所述差值小于或等于预设差值阈值时,根据所述差值,调整所述第i个第一温度检测点的关系模型,包括:当所述差值小于或等于所述预设差值阈值时,更新触发次数,所述触发次数用于指示预设时间长度内所述差值小于或等于所述预设差值阈值的次数;当所述触发次数小于或等于预设次数时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
芯片各个子系统的功耗可能根据需求实时变化,在一段时间内,各个子系统的功耗可能频繁的突增和突降,此时,温度检测点的功耗模型无法及时响应功耗的变化。在预设时间长度内,触发对温度检测点的关系模型进行调整的次数超过预设次数时,不再对温度检测点的关系模型进行调整,从而在功耗频繁的突增和突降情况下,不再对温度检测点的关系模型进行调整,减小对资源的浪费。
结合第一方面,在一些可能的实现方式中,所述芯片上设置有至少一个温度检测点,所述至少一个温度检测点包括所述至少一个第一温度检测点,所述方法还包括:获取训练功耗信息和第j训练测量温度,所述训练功耗信息用于指示所述至少一个子系统的功耗,所述第j训练测量温度用于指示所述芯片按照所述训练功耗信息运行时,所述至少一个温度检测点中第j温度检测点的温度,j为正整数。将训练功耗信息输入原始关系模型,以得到第j训练预测温度。根据所述第j训练预测温度和所述第j训练测量温度,调整原始关系模型的参数,使得所述第j训练预测温度和所述第j训练测量温度的差异最小化,以得到所述至少一个温度检测点中第j个温度检测点的关系模型。
与通过公式求解得到的关系模型相比,通过训练的方式得到关系模型,关系模型能够准确地反映功耗信息和预测温度之间的关系。
结合第一方面,在一些可能的实现方式中,每个第一温度检测点的关系模型用于表示每个子系统的功耗对所述第一温度检测点的预测温度的影响大小。
根据每个子系统的功耗对温度检测点的预测温度的影响大小,对子系统的功耗进行调整,使得对功耗的调整更加准确。每个子系统的功耗对温度检测点的预测温度的影响大小可以通过权重的形式表示。权重可以表示为温度检测点的关系模型中每个子系统的功耗的系数。
第二方面,提供一种芯片的控制装置,包括确定模块和控制模块。所述芯片包括至少一个子系统,所述芯片上设置有至少一个第一温度检测点。确定模块用于,利用每个第一温度检测点的关系模型,确定第一功耗信息,每个第一温度检测点的关系模型用于表示功 耗信息和所述第一温度检测点的预测温度之间的关系,所述功耗信息用于指示所述每个子系统的功耗,所述第一功耗信息使得利用每个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第一温度检测点的预设温度阈值。控制模块用于,控制所述芯片根据所述第一功耗信息运行。
结合第二方面,在一些可能的方式中,所述至少一个子系统包括多个子系统,所述第一功耗信息指示的所述每个子系统的功耗满足第一关联关系。
结合第二方面,在一些可能的方式中,控制装置还包括获取模块,所述获取模块用于获取所述芯片的当前频率信息,所述当前频率信息用于指示所述芯片的多个子系统当前的工作频率。所述关联关系为,所述多个子系统的工作频率之间的比例等于所述当前频率信息指示的所述多个子系统当前的工作频率之间的比例,每个子系统的功耗与所述子系统的频率满足第二关联关系。
结合第二方面,在一些可能的方式中,所述芯片上设置有多个温度检测点,所述多个温度检测点包括所述至少一个第一温度检测点,每个温度检测点的预设温度阈值相等,所述至少一个第一温度检测点为所述多个温度检测点中温度最高的至少一个温度检测点。
应当理解,在一些实施例中,芯片上仅有一个第一温度检测点。
结合第二方面,在一些可能的方式中,控制装置还包括获取模块,所述获取模块用于获取第二功耗信息,所述第二功耗信息用于指示每个所述子系统当前的功耗。控制装置还包括检测模块,所述检测模块用于对所述芯片进行检测以获得所述至少一个第一温度检测点中第i个第一温度检测点的实际温度,i为正整数。确定模块还用于,根据所述第i个第一温度检测点的关系模型,以及所述第二功耗信息,确定所述第i个第一温度检测点的第二预测温度。控制装置还包括调整模块,所述调整模块用于,根据所述第二预测温度与所述实际温度之间差值,调整所述第i个第一温度检测点的关系模型,以使得根据调整后的所述第i个第一温度检测点的关系模型和所述第二功耗信息确定的第三预测温度与所述实际温度相等。所述确定模块用于,根据所述调整后的所述第i个第一温度检测点的关系模型,确定所述第一功耗信息所述第一功耗信息使得利用调整后的所述第i个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第i个第一温度检测点的预设温度阈值。
结合第二方面,在一些可能的方式中,所述第二功耗信息用于指示每个所述子系统在当前时刻之前预设时间段的功耗与时间的第三关联关系。所述第i个第一温度检测点的关系模型用于,根据所述第二功耗信息,确定第三功耗信息,所述第三功耗信息包括每个所述子系统在当前时刻之前所述子系统对应的窗口时间段中的平均功耗,所述预设时间段包括所述窗口时间段。所述第i个第一温度检测点的关系模型还用于,根据所述第三功耗信息,确定所述第二预测温度。
结合第二方面,在一些可能的方式中,所述第i个第一温度检测点的关系模型用于,根据所述第三关联关系,确定每个所述子系统对应的窗口时间段。
结合第二方面,在一些可能的方式中,所述调整模块用于,当所述差值小于或等于预设差值阈值时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
结合第二方面,在一些可能的方式中,控制装置还包括更新模块,所述更新模块用于,当所述差值小于或等于所述预设差值阈值时,更新触发次数,所述触发次数用于指示预设 时间长度内所述差值小于或等于所述预设差值阈值的次数。所述调整模块用于,当所述触发次数小于或等于预设次数时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
结合第二方面,在一些可能的方式中,所述芯片上设置有至少一个温度检测点,所述至少一个温度检测点包括所述至少一个第一温度检测点。控制装置还包括获取模块和训练模块。所述获取模块用于,获取训练功耗信息和第j训练测量温度,所述训练功耗信息用于指示所述至少一个子系统的功耗,所述第j训练测量温度用于指示所述芯片按照所述训练功耗信息运行时,所述至少一个温度检测点中第j个温度检测点的温度,j为正整数。所述训练模块用于,将所述训练功耗信息输入原始关系模型,以得到第j训练预测温度。所述训练模块还用于,根据所述第j训练预测温度和所述第j训练测量温度,调整所述原始关系模型的参数,使得所述第j训练预测温度和所述第j训练测量温度的差异最小化,以得到所述第j个温度检测点的关系模型。
结合第二方面,在一些可能的方式中,每个第一温度检测点的关系模型用于表示每个子系统的功耗对所述第一温度检测点的预测温度的影响大小。
第三方面,提供一种芯片的控制装置,包括存储器和处理器。所述芯片包括至少一个子系统,所述芯片上设置有至少一个第一温度检测点。存储器用于存储程序指令。当所述存储器存储的程序被执行时,处理器用于:利用每个第一温度检测点的关系模型,确定第一功耗信息,每个第一温度检测点的关系模型用于表示功耗信息和所述第一温度检测点的预测温度之间的关系,所述功耗信息用于指示所述每个子系统的功耗,所述第一功耗信息使得利用每个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第一温度检测点的预设温度阈值;控制所述芯片根据所述第一功耗信息运行。
结合第三方面,在一些可能的方式中,所述至少一个子系统包括多个子系统,所述第一功耗信息指示的所述每个子系统的功耗满足第一关联关系。
结合第三方面,在一些可能的方式中,处理器还用于:获取所述芯片的当前频率信息,所述当前频率信息用于指示所述芯片的多个子系统当前的工作频率;所述第一关联关系为,所述多个子系统的工作频率之间的比例等于所述当前频率信息指示的所述多个子系统当前的工作频率之间的比例,每个子系统的功耗与所述子系统的频率满足第二关联关系。
结合第三方面,在一些可能的方式中,所述芯片上设置有多个温度检测点,所述多个温度检测点包括所述至少一个第一温度检测点,每个温度检测点的预设温度阈值相等,所述至少一个第一温度检测点为所述多个温度检测点中温度最高的至少一个温度检测点。
结合第三方面,在一些可能的方式中,处理器还用于:获取第二功耗信息,所述第二功耗信息用于指示每个所述子系统当前的功耗。处理器还用于:对所述芯片进行检测以获得所述至少一个第一温度检测点中第i个第一温度检测点的实际温度,i为正整数。处理器还用于:根据所述第i个第一温度检测点的关系模型,以及所述第二功耗信息,确定所述第i个第一温度检测点的第二预测温度。处理器还用于:根据所述第二预测温度与所述实际温度之间差值,调整所述第i个第一温度检测点的关系模型,以使得根据调整后的所述第i个第一温度检测点的关系模型和所述第二功耗信息确定的第三预测温度与所述实际温度相等。根据所述调整后的所述第i个第一温度检测点的关系模型,确定所述第一功耗信息所述第一功耗信息使得利用调整后的所述第i个第一温度检测点的关系模型确定的第 一预测温度小于或等于所述第i个第一温度检测点的预设温度阈值。
结合第三方面,在一些可能的方式中,所述第二功耗信息还用于指示每个所述子系统在当前时刻之前预设时间段的功耗与时间的第三关联关系。所述第i个第一温度检测点的关系模型用于,根据所述第二功耗信息,确定第三功耗信息,所述第三功耗信息包括每个所述子系统在当前时刻之前所述子系统对应的窗口时间段中的平均功耗,所述预设时间段包括所述窗口时间段。所述第i个第一温度检测点的关系模型还用于,根据所述第三功耗信息,确定所述第二预测温度。
结合第三方面,在一些可能的方式中,所述第i个第一温度检测点的关系模型用于,根据所述第三关联关系,确定每个所述子系统对应的窗口时间段。
结合第三方面,在一些可能的方式中,处理器还用于:当所述差值小于或等于预设差值阈值时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
结合第三方面,在一些可能的方式中,处理器还用于:当所述差值小于或等于所述预设差值阈值时,更新触发次数,所述触发次数用于指示预设时间长度内所述差值小于或等于所述预设差值阈值的次数。处理器还用于:当所述触发次数小于或等于预设次数时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
结合第三方面,在一些可能的方式中,所述芯片上设置有至少一个温度检测点,所述至少一个温度检测点包括所述至少一个第一温度检测点。处理器还用于:获取训练功耗信息和第j训练测量温度,所述训练功耗信息用于指示所述至少一个子系统的功耗,所述第j训练测量温度用于指示所述芯片按照所述训练功耗信息运行时,所述至少一个温度检测点中第j个温度检测点的温度,j为正整数。将所述训练功耗信息输入原始关系模型,以得到第j训练预测温度。处理器还用于:根据所述第j训练预测温度和所述第j训练测量温度,调整所述原始关系模型的参数,使得所述第j训练预测温度和所述第j训练测量温度的差异最小化,以得到所述第j个温度检测点的关系模型。
结合第三方面,在一些可能的方式中,每个第一温度检测点的关系模型用于表示每个子系统的功耗对所述第一温度检测点的预测温度的影响大小。
第四方面,提供一种电子设备,其包括芯片和第二方面或第三方面所述的芯片的控制装置。
第五方面,提供一种计算机程序存储介质,其特征在于,所述计算机程序存储介质具有程序指令,当所述程序指令被处理器执行时,使得处理器执行前文中所述的芯片的控制方法。
第六方面,提供一种芯片系统,其特征在于,所述芯片系统包括至少一个处理器,当程序指令在所述至少一个处理器中执行时,使得所述至少一个处理器执行前文中所述的芯片的控制方法。
附图说明
图1是一种芯片的示意性结构图。
图2是本申请实施例提供的一种芯片的控制方法的示意性流程图。
图3是本申请实施例提供的一种关系模型建立方法的示意性流程图。
图4是本申请实施例提供的另一种芯片的控制方法的示意性流程图。
图5是本申请实施例提供的一种芯片的示意性结构图。
图6是本申请实施例提供的一种控制装置的示意性结构图。
图7是本申请实施例提供的另一种控制装置的示意性结构图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
制约智能手机等电子设备性能及用户体验的主要因素。
电子设备包括处理器芯片。处理器可以包括中央处理器(central processing unit,CPU)、应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用。
片上系统(system on a chip,SOC)集成了多种处理器。SOC中各个组件诸如CPU、GPU、NPU等处理器的绝对性能,如何在整机散热的约束下最大的发挥SOC内各个组件最大性能,对电子设备性能具有重要影响。
片上系统也可以称为处理器芯片。芯片中每个子系统的功耗都会对芯片的温度产生影响。
芯片中可以设置一个或多个温度传感器,每个温度传感器用于对一个温度检测点进行温度的检测。每个温度检测点温度的变化是由于周围的子系统的功耗的变化引起的。芯片的温度与各个子系统的功耗正相关。当子系统的功耗增加时,芯片的温度升高。当子系统的功耗减小时,芯片的温度降低。
子系统的功耗包括静态功耗和动态功耗。静态功耗和动态功耗均与芯片的制造工艺、子系统的工作的电压和温度等有关。动态功耗还受到工作频率的影响。工作频率越高,动态功耗越大。
芯片温度过高可能导致芯片损坏。为了避免芯片温度过高,可以为每个温度检测点设置安全温度,控制芯片的温度在安全温度之下。多个温度检测点的安全温度可以相同或不同。
子系统的频率越高,子系统的处理能力越强。不合理的温度调节方案,会影响芯片的性能。
图1是一种SOC的示意性结构图。
SOC包括多个子系统。每个温度传感器用于对一个子系统进行温度检测。
一种芯片的功耗调整的方法,通过动态电压频率调整(dynamic voltage and frequency scaling,DVFS)技术,当某个温度传感器的检测温度达到第一预设温度,降低该温度传 感器对应的子系统的频率至第一预设值;当该温度传感器的检测温度降低至第二预设温度,升高该温度传感器对应的子系统的频率至第二预设值。从而对SOC各个区域的温度进行调整。
如果温度传感器进行温度检测的时间间隔过大,很容易产生温度过冲,导致子系统温度超过安全值,温控失效。如果温度检测的时间间隔过小,对处理器的资源占用较多,并且频繁子系统频率的调整也会造成性能的损失。
各个子系统分别根据自身的温度进行频率调整,使得各个子系统之间的配合可能受到影响,造成子系统性能的浪费,SOC整体的性能会受到影响。
另一种芯片的功耗调整的方法,通过在一个温度侦测点检测的温度与目标控制温度之间的差值,或者在多个温度侦测点的检测得到的温度最大值与目标控制温度之间的差值,计算系统功耗裕量。将得到的系统功耗裕量再按照当前各个子系统的频率,将系统功耗裕量分配给各个子系统。分配给各个子系统的功耗之和等于系统功耗裕量。最后对于每个子系统,根据功耗-频率对照表,确定子系统的频率增加量,从而达到系统温控的目的。
可以采用比例积分微分(proportion–integral-differential coefficient,PID)算法,对系统的温度进行调整。系统功耗裕量Pb可以表示为:Pb=Kp(Tset-T)+tdp,其中,Kp为预设系数,Tset为目标控制温度,T为在多个温度检测点的检测得到的温度最大值,tdp为芯片的散热功率最大值。为了避免各个子系统的功耗突然上升,导致芯片温度过高,目标控制温度Tset可以略小于芯片的安全工作温度。
一方面,不同子系统的功耗对同一个温度感应器的贡献度不同。也就是说,各个子系统对温度最大值对应的温度侦测点的温度影响的大小不同。在进行功耗分配时,将系统功耗裕量Pb分配给各个子系统,使得各个子系统功耗增加量之和为系统功耗裕量Pb,会造成分配失准,芯片的性能存在浪费。
另外,不同的工作情况下,子系统的功耗差异较大。当子系统的功耗较大时,产生的热量较多,子系统所在区域升温较快。当子系统的功耗较小时,产生的热量较少,子系统所在区域升温较慢或温度降低。由于Kp为预设系数,在(Tset-T)为同一数值的情况下,子系统的功耗大小影响温度升高的速度。
如果预设系数Kp数值较小,存在芯片的性能存在浪费。
如果预设系数Kp数值较大,在温度传感器进行温度检测的时间间隔过大时,很容易产生温度过冲,导致一个或多个温度检测点的超过芯片的安全工作温度,温控失效;在温度检测的时间间隔过小时,对处理器的资源占用较多,并且子系统频率的频繁调整也会造成性能的损失。
上述芯片的功耗调整的方法,根据检测的温度与目标温度之间的差异,对芯片中子系统的功耗进行被动地调整。在检测频率较低的情况下,为了保证芯片的温度不超安全工作温度,会导致芯片的性能较低。
为了解决上述问题,本申请实施例提供了一种芯片的温度调整方法,能够在提高芯片性能的同时,避免对温度检测点的频繁温度检测,从而提高系统性能。
本申请实施例提供的芯片的控制方法,可以应用于手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人 数字助理(personal digital assistant,PDA)等电子设备上,本申请实施例对电子设备的具体类型不作任何限制。
图2是本申请实施例提供的一种芯片的控制方法的示意性流程图。本申请实施例通过对芯片中的温度检测点的温度的预测,调整芯片中各个子系统的功耗。
芯片包括至少一个子系统。芯片上设置有至少一个温度检测点。
一种优选的方案,芯片中每个子系统所在的区域可以设置至少一个温度检测点。由于每个子系统运行时均会产生热量,通过在每个子系统所在的区域设置至少一个温度检测点,可以对各个子系统的功耗可以更准确地进行调整,从而确保芯片的安全运行,并提高芯片的性能。
在步骤S210之前,可以获取各个温度检测点的关系模型。每个温度检测点的关系模型用于表示功耗信息和该温度检测点的预测温度之间的关系。功耗信息用于表示各个子系统的功耗。
每个子系统的功耗可以独立控制。
每个子系统的功能可以相互独立。例如,CPU、GPU、NPU等可以集成在一个芯片上,分别作为一个子系统。子系统的功能也可以具有一定关联性,例如,可以将CPU中功耗可独立控制的一个区域作为一个子系统。
温度检测点的关系模型可以仅用于表示功耗信息与该温度检测点的预测温度之间的关系。一个温度检测点的关系模型中可以不包括与时间有关的参数,也就是说,温度检测点的关系模型可以理解为各个子系统功耗稳定的情况下的关系模型,即关系模型可以表示在多个子系统的功耗基本保持不变的情况下,功耗信息与预测温度之间的关系。
或者,温度检测点的关系模型可以表示功耗信息、当前时刻温度检测点的温度与下一时刻温度检测点的预测温度之间的关系。当前时刻与下一时刻之间的时间长度可以为预设值。将功耗信息和当前时刻温度检测点的温度输入关系模型,下一时刻温度检测点的预测温度。根据温度检测点的关系模型,可以在各个子系统功耗不稳定的情况下,进行动态的温度预测。
温度检测点的关系模型表示系统频率稳定的情况下,功耗信息与预测温度之间的关系,可以降低关系模型的复杂度。
可以从其他电子设备获取温度检测点的关系模型。也可以由执行步骤S210至步骤S220的电子设备建立温度检测点的关系模型。
温度检测点的关系模型可以用于表示每个子系统的功耗对该温度检测点预测温度的影响大小。
温度检测点的关系模型可以表示为功耗信息和该温度检测点的预测温度之间的函数关系。每个子系统的功耗对预测温度的影响大小可以通过权重表示。权重可以表示为关系模型中每个子系统的系数。
温度检测点的关系模型可以是训练得到的,也可以是公式求解得到的。与求解公式中参数的方式相比,通过训练的方式确定温度检测点的关系模型,可以使得温度检测点的关系模型更加准确。
温度检测点的关系模型的建立过程可以参见图3的说明。
在获取温度检测点的关系模型之后,可以进行步骤S210至步骤S220。
在步骤S210,利用每个第一温度检测点的关系模型,确定第一功耗信息。
其中,第一功耗信息使得利用每个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第一温度检测点的预设温度阈值。
将第一功耗信息输入第一温度检测点的关系模型,可以得到的该温度检测点的第一预测温度。对于每个第一温度检测点,该温度检测点的第一预测温度小于或等于该温度检测点的预设温度阈值。
第一温度检测点的预设温度阈值可以小于或等于芯片的安全工作时第一温度检测点的温度最大值。第一温度检测点的预设温度阈值可以称为第一温度检测点的额定温度。
可以为芯片的安全工作设置一定温度余量,即使得预设温度阈值略小于芯片的安全工作时第一温度检测点的温度最大值,保证芯片的安全工作。
预设温度阈值等于芯片的安全工作时第一温度检测点的温度最大值时,可以最大化芯片性能。
芯片上可以设置一个或多个温度检测点。可以将全部或部分温度检测点中的每个温度检测点作为第一温度检测点。
当芯片包括多个温度检测点时,如果将该多个温度检测点中的每个温度检测点均作为第一温度检测点,则第一功耗信息可以使得利用每个温度检测点的关系模型确定的第一预测温度小于或等于所述温度检测点的预设温度阈值。
综合考虑各个温度检测点的温度情况,对各个子系统的功耗进行调整,能够最大化芯片的性能。
当芯片包括多个温度检测点时,也可以仅将部分温度检测点作为第一温度检测点。
一般情况下,每个温度检测点的检测点预设温度阈值相等。温度最高的温度检测点中最容易达到检测点预设温度阈值。可以将温度最高的一个或多个温度检测点作为第一温度检测点,或者,将温度超过预设值的温度检测点作为第一温度检测点。例如,可以将温度最高的一个温度检测点作为第一温度检测点。
将部分温度检测点作为第一温度检测点,可以降低第一功耗信息确定的难度,减小计算量。
当芯片仅包括一个子系统时,利用第一温度检测点的关系模型,可以确定第一功耗信息。
当芯片包括多个子系统时,还可以获取第一关联关系。第一功耗信息指示的每个子系统的功耗满足第一关联关系。例如,第一关联关系可以是每个子系统的功耗之间的比例,第一关联关系也可以是每个子系统频率之间的比例,第一关联关系还可以包括部分子系统的功耗值。
应当理解,每个子系统的功耗与该子系统的频率满足第二关联关系。子系统的功耗与子系统的电压正相关,子系统的功耗与子系统的频率正相关。对于一个子系统,工作电压一般保持不变,此时,子系统的功耗与子系统的频率一一对应。对芯片的各个子系统的功耗的调整,也可以理解为对各个子系统频率的调整。
当芯片中存在多个子系统时,在步骤S210之前,可以获取第一关联关系。
第一关联关系用于指示第一功耗信息指示的各个子系统的功耗之间的关系。
第一关联关系可以是预设置的,也可以根据当前芯片的运行情况确定的。
在进行步骤S210之前,可以获取芯片的当前频率信息。当前频率信息用于指示所述芯片的多个子系统当前的工作频率。
第一关联关系可以是多个子系统的工作频率之间的比例等于所述当前频率信息指示的所述多个子系统当前的工作频率之间的比例。
应当理解,等于也可以是约等于。第一功耗信息可以使得各个子系统的工作频率之间的比例基本不变。
每个子系统当前的工作频率可以是子系统在当前时刻的工作频率。各个子系统的频率的比例可能是根据正在运行程序的需求确定的。与其他的功耗调整方式相比,在根据温度对各个子系统的频率进行调整的过程中,保持各个子系统工作频率之间的比例不变,可以降低对芯片性能的影响。
具体地,在一种可能的实现方式中,利用每个第一温度检测点的关系模型,可以根据每个第一温度检测点的预设温度阈值,确定该第一温度检测点对应的功耗信息。每个第一温度检测点对应的功耗信息使得该第一温度检测点的第一预测温度等于该第一温度检测点的预设温度阈值。
在多个第一温度检测点对应的功耗信息中,确定第一功耗信息。
例如,第一功耗信息满足第一关联关系时,可以将多个第一温度检测点对应的功耗信息中,指示的每个子系统的功耗最小的功耗信息为第一功耗信息。
在另一种可能的实现方式中,由于第一功耗信息需要使得子系统的工作频率之间的比例与当前频率信息指示的子系统的工作频率之间的比例相同,在获取当前频率信息之后,可以根据当前频率信息,计算每个第一温度检测点的预测温度。
如果每个第一温度检测点的预测温度小于该第一温度检测点的预设温度阈值,在第一功耗信息的确定过程中,可以进行步骤S211a至步骤S213。
在步骤S211a,增加每个子系统的功耗。每个子系统增加后的功耗使得各个子系统的频率之间的比例不变。
在步骤S212,将增加后各个子系统的功耗输入每个第一温度检测点的关系模型,以确定增加后各个子系统的功耗对应的每个第一温度检测点的预测温度。
在步骤S213,判断每个第一温度检测点的预测温度与该温度检测点的预设温度阈值之间的大小关系。
如果每个第一温度检测点的预测温度均小于该第一温度检测点的预设温度阈值,再次执行步骤S211至步骤S213。如果存在至少一个第一温度检测点的预测温度大于或等于该第一温度检测点的预设温度阈值,停止对各个子系统的功耗的增加。
当每个第一温度检测点的预测温度均不大于该温度检测点的预设温度阈值,存在至少一个第一温度检测点的预测温度等于该第一温度检测点的预设温度阈值时,将本次进行步骤S212时输入各个第一温度检测点的关系模型的各个子系统的功耗作为第一功耗信息指示的功耗。
当存在至少一个第一温度检测点的预测温度大于该第一温度检测点的预设温度阈值时,将上一次进行步骤S212时输入各个第一温度检测点的关系模型的各个子系统的功耗作为第一功耗信息指示的功耗。
每次进行步骤S211时,每个子系统的功耗的增加,可以使得每次各个子系统频率的 增加量相等或不等。
如果每个第一温度检测点的预测温度大于该第一温度检测点的预设温度阈值,进行步骤S211b,减小每个子系统的功耗。之后进行步骤S212和步骤S213。
当存在至少一个第一温度检测点的预测温度均大于该第一温度检测点的预设温度阈值时,再次执行步骤S211b至步骤S213。
当每个第一温度检测点的预测温度均小于或等于该第一温度检测点的预设温度阈值时,将本次进行S212时输入各个第一温度检测点的关系模型的各个子系统的功耗作为第一功耗信息指示的功耗。
当然,在一些情况下,也可以对各个子系统的工作频率之间的比例进行调整,本申请实施例对此不作限制。
在步骤S220,控制所述芯片根据所述第一功耗信息运行。
可以控制芯片按照第一功耗信息运行,以实现最优的性能。也可以根据程序或系统的其他需求,控制芯片的子系统的频率,使得每个子系统的功耗小于第一功耗信息指示的该子系统的功耗。
通过步骤S210至步骤S220,利用每个第一温度检测点的关系模型,确定第一功耗信息,第一功耗信息使得每个第一温度检测点的第一预测温度小于该温度检测点的预设温度阈值。根据第一功耗信息,调整各个子系统的功耗,从而控制芯片的温度,保证芯片安全工作,并且较好的发挥芯片的性能,无需对温度检测点的温度进行频繁的检测。
进一步地,环境温度的变化会随时影响芯片的散热能力,考虑环境温度的变化对温度检测点的关系模型的影响,可以使得芯片的温度调整更加精确。
应当理解,可以对芯片上设置的全部或部分温度检测点的温度模型进行调整。
可以获取第二功耗信息,所述第二功耗信息用于指示每个子系统当前的功耗。
第二功耗信息可以是检测得到的。也可以将上一时刻确定的第一功耗信息作为当前时刻的第二功耗信息。
可以检测温度检测点在当前时刻的实际温度。
可以将第二功耗信息输入温度检测点的关系模型,以确定温度检测点的第二预测温度。
计算第二预测温度与实际温度之间的差值,调整温度检测点的关系模型,以使得根据调整后的温度检测点的关系模型和第二功耗信息确定的第三预测温度与实际温度相等。
如果调整的关系模型对应的温度检测点为第一温度检测点,则在进行步骤S210时,可以利用调整后的温度检测点的关系模型,确定所述第一功耗信息,第一功耗信息使得利用调整后的该温度检测点的关系模型确定的第一预测温度小于或等于该温度检测点的预设温度阈值。
比较第二预测温度与实际温度,将两者之间的差值反馈至温度检测点的关系模型,从而可以根据变化缓慢的环境温度,对温度检测点的关系模型进行调整和校准。在后续进行对芯片的功耗进行调整时,根据调整后的关系模型进行芯片子系统功耗的调整,从而提高功耗调整的准确性。
另外,温度变化是缓慢的,与功耗的变化相比相对滞后。当某个子系统根据数据处理的需要,功耗突然增加时,将第二预测温度与实际温度之间的差值反馈至温度检测点的关 系模型,可以使得温度检测点的关系模型适应功耗台阶式变化的情况,更加准确的反映出现功耗台阶式变化的情况下功耗信息和预测温度之间的关系,使得温度预测更加准确。
因此,根据第二预测温度与实际温度之间差值,调整温度检测点的关系模型,可以使得根据调整后的温度检测点的关系模型更加准确。
在上一时刻与当前时刻之间,根据运行的程序等对于芯片的各个子系统的需求,芯片的各个子系统的功耗可能发生变化。因此,将上一时刻确定的第一功耗信息作为当前时刻的第二功耗信息可能并不准确。
可以对芯片各个子系统的功耗进行检测,以获得第二功耗信息。
通过检测获取第二功耗信息,可以使得第二预测温度更符合芯片的运行情况,从而对温度检测点的关系模型的调整更准确。
根据实际温度与第二预测温度的差值,对关系模型进行调整,从而使得关系模型能够适应环境温度的变化,并在一个或多个子系统的功耗存在台阶式变化时能够更加及时响应功耗的变化。
第二功耗信息可以用于指示当前时刻子系统的功耗,也可以用于指示当前时刻之前的预设时间段内子系统的功耗平均值,还可以用于指示子系统在当前时刻之前预设时间段的功耗与时间的第三关联关系。
第三关联关系,可以包括预设时间段内各个时间点的功耗值,还可以包括功耗变化幅度、功耗变化频率等中的一种或多种。
当前时刻之前的预设时间段,可以与当前时刻相邻,也可以与当前时刻有较短的时间间隔。
具体地,第二功耗信息用于指示第三关联关系时,温度检测点的关系模型可以根据第二功耗信息,确定第三功耗信息。
第三功耗信息可以包括每个所述子系统在当前时刻之前所述子系统对应的窗口时间段中的平均功耗。预设时间段包括窗口时间段。
窗口时间段可以与预设时间段相同。或者,窗口时间段可以仅包括预设时间段中的一部分。
由于温度的变化具有滞后性,根据窗口时间段内功耗的平均值,利用关系模型确定第二预测温度,并根据第二预测温度调整温度检测点的关系模型,能够提高温度检测点的关系模型的准确性。
在一些实施例中,关系模型可以根据第二功耗信息,确定窗口时间段,从而可以进一步提高温度检测点的关系模型的准确性。
温度检测点的关系模型可以包括窗口确定模型。窗口确定模型可以用于根据第二功耗信息,确定窗口时间段。窗口确定模型可以是线性模型。例如,第二功耗信息中功耗的变化幅度、变化频率等中的一个或多个,可以与窗口时间段的长度成正比,窗口确定模型可以根据第二功耗信息中功耗的变化幅度、变化频率等,确定窗口时间段的长度,将当前时刻之前该长度的时间段作为窗口时间段。
窗口确定模型也可以表示为第二功耗信息中功耗的变化幅度范围与窗口时间段的长度之间的对应关系。根据第二功耗信息中功耗的变化幅度所在的幅度范围,可以确定与该幅度范围对应的窗口时间段的长度。可以将当前时刻之前该长度的时间段作为窗口时间 段。
窗口确定模型也可以是神经网络模型。神经网络可以是由神经单元组成的,神经单元可以是指以x s和截距1为输入的运算单元,该运算单元的输出可以表示为:
Figure PCTCN2020091177-appb-000001
其中,s=1、2、……n,n为大于1的自然数,W s为x s的权重,b为神经单元的偏置。f为神经单元的激活函数(activation functions),用于将非线性特性引入神经网络中,来将神经单元中的输入信号转换为输出信号。该激活函数的输出信号可以作为下一层卷积层的输入,激活函数可以是sigmoid函数。神经网络是将多个上述单一的神经单元联结在一起形成的网络,即一个神经单元的输出可以是另一个神经单元的输入。每个神经单元的输入可以与前一层的局部接受域相连,来提取局部接受域的特征,局部接受域可以是由若干个神经单元组成的区域。
窗口确定模型可以是训练得到的。窗口确定模型的训练过程具体可以参见图3的说明。
窗口确定模型可以根据第二功耗信息,确定窗口时间段。窗口确定模型可以仅改变窗口时间段的长度,即可以以当前时刻为窗口时间段的结束时刻,改变窗口时间段的长度,以确定窗口时间段。或者,窗口确定模型还可以改变窗口时间段的起始时刻和结束时刻。本申请实施例对此不作限定。
示例性地,可以在第二预测温度与实际温度之间的差值小于或等于预设差值阈值时,调整关系模型。反之,当第一预测温度与实际温度之间的差值大于预设差值阈值时,不再进行对关系模型的调整。
环境温度的变化是缓慢的,且变化范围很小,对关系模型的影响很小,从环境温度变化对关系模型的影响的角度考虑,可以通过预设差值阈值的设置,可以提高关系模型的准确性。
功耗的变化具有随机性,通过预设差值阈值的设置,可以避免对关系模型的过度修正,提高关系模型的稳定性和可靠性。
另外,可以在第一预测温度与实际温度之间的差值的正负连续变化的情况下,停止对关系模型的调整。
示例性地,可以记录触发次数。触发次数用于指示预设时间长度内第一预测温度与实际温度之间的差值小于或等于所述预设差值阈值的次数。
可以在所述差值小于或等于所述预设差值阈值时,更新触发次数。
可以判断触发次数与预设次数的大小关系。
当触发次数小于或等于预设次数时,调整温度检测点的关系模型。反之,当触发次数大于预设次数时,停止对温度检测点的关系模型的调整。
在一些情况下,根据数据处理的需要,子系统的功耗频繁的变化。因为温度变化是缓慢的,与功耗的变化相比相对滞后。当子系统的功耗出现无规律的增大、减小反复变化时,对根据关系模型调整无法及时跟随子系统的功耗变化,不能准确预测芯片中各个温度检测点的温度,可以停止对关系模型的调整。可以根据在步骤S210之前获取的关系模型,对子系统的功耗进行调整。
图3是本申请实施例提供的一种温度检测点的关系模型建立方法的示意性流程图。
在步骤S410,控制芯片运行。
例如,芯片可以是手机、计算机等电子设备中的处理器芯片。可以根据用户的需求,控制一种或多种程序运行。程序例如可以包括用户常用的应用程序。
在步骤S420,获取多组训练数据。每组训练数据包括训练功耗信息和训练测量温度。
训练功耗信息用于指示芯片中各个子系统的功耗。
训练测量温度可以指示所述芯片按照训练功耗信息运行时所述芯片的温度。
可以在芯片运行过程中,确定训练功耗信息和训练测量温度。例如,可以按照固定的时间间隔记录训练功耗信息和训练测量温度。
训练测量温度可以是记录训练功耗信息的时刻,温度检测点的温度。
本申请实施例对训练功耗信息的获取方式不作限定。
可以获取芯片子系统的频率。根据子系统的频率,以及频率与功耗的关联关系,可以确定子系统的功耗。
也可以接收检测装置发送的功耗信息。检测装置可以用于对子系统的功耗进行检测。检测装置可以是的硬件设备。
训练功耗信息可以指示记录训练功耗信息的时刻各个子系统的功耗的瞬时值。第i子系统的功耗x i可以是对检测点实际温度进行检测的时刻第i子系统的功耗。
训练功耗信息也可以指示记录功耗信息的时刻之前的一定时间段内各个子系统的功耗的平均值。第i子系统的功耗x i也可以是对检测点实际温度进行检测的时刻之前一段时间内第i子系统的平均功耗。
训练功耗信息还可以用于指示记录功耗信息的时刻之前的预设时间长度内,各个子系统的功耗与时间的关联关系。
由于温度的变化具有滞后性,很短的时间长度内功耗的突然增加或降低对温度几乎不会产生影响。因此,训练功耗信息指示各个子系统的功耗的平均值,可以提高建立的关系模型的准确性。
对于第j温度检测点,训练测量温度可以表示为T j1
在步骤S430,根据多组训练数据,建立关系模型。
以第j温度检测点为例进行说明。
根据训练功耗信息和训练测量温度T j1,建立第j检测点的关系模型。例如,第j检测点的预测温度T j可以表示为:
T j=[a 0j,a 1j,...,a nj]×[x 0,x 1,...,x n] T+c j
其中,n为芯片中子系统的数量,x 0,x 1,...,x n分别为n个子系统的功耗,a 0j,a 1j,...,a nj为分别为x 0,x 1,...,x n的系数,均为常数,c j为常数。
可以将各个时间节点时,训练功耗信息指示的各个子系统的功耗,以及该训练功耗信息对应的训练测量温度T j1的带入预测温度T j的表达式,进行求解以得到参数a 0j,a 1j,...,a nj和c j
或者,也可以通过机器学习的方式,确定每个温度检测点的关系模型。
具体地,对于第j温度检测点,可以获取原始关系模型。原始关系模型可以是线性模型,也可以是神经网络模型。对于每组训练数据,可以执行步骤S431至步骤S432。
在步骤S431,可以将训练功耗信息输入原始关系模型,以得到该时刻的训练预测温 度。
在步骤S432,根据该训练预测温度和该训练预测温度对应的训练测量温度T j1之间的误差,调整原始关系模型的参数,以最小化该误差。
在步骤S433,使用调整后的参数值,返回继续执行步骤S431和步骤S432直到得到的误差逐渐收敛,即得到训练完成的第j温度检测点的关系模型。
当训练功耗信息可以用于指示每个子系统在预设时间长度内的功耗随时间的变化情况时,第j温度检测点的关系模型用于,根据训练功耗信息,确定每个子系统在该子系统对应的窗口时间段中的平均功耗。预设时间段包括窗口时间段。之后,第j温度检测点的关系模型还用于,根据每个子系统在该子系统对应的窗口时间段中的平均功耗,确定所述训练预测温度。
也就是说,对第j温度检测点的关系模型进行训练,可以获取多组训练数据,每组训练数据包括训练功耗信息和训练测量温度。
对于每组训练数据,将训练功耗信息输入原始关系模型,以得到训练预测温度,所述训练功耗信息用于指示所述芯片的多个子系统的功耗。然后根据所述训练预测温度和训练测量温度,调整原始关系模型的参数,使得所述训练预测温度和所述训练测量温度的差异最小化。
对于每组训练数据,执行上述步骤,从而得到训练后的关系模型。
应当理解,原始关系模型可以是线性模型、对应关系模型或者神经网络模型等。相对应的,调整原始关系模型的参数,可以是调整线性模型中的参数,对应关系模型中的参数,或者神经网络模型的参数等。
通过步骤S410至步骤S430,可以建立温度检测点的关系模型。
应当理解,训练温度检测点的关系模型的设备与用于执行图2所示的芯片的控制方法的设备可以相同或不同。执行图2所示的芯片的控制方法的设备,可以在进行步骤S210之前,获取训练后的关系模型。
当执行图3所述的方法的设备与执行图2所述的方法的设备不是相同的设备的情况下,这两个设备可以进行通信,从而使得执行图2所述的方法的设备获取温度检测点的关系模型。从而,温度检测点的关系模型可以应用在图2所示的芯片的控制方法中。
图4是本申请实施例提供的一种芯片的控制方法的示意性流程图。
芯片例如可以是SOC,包括多个子系统。一个子系统可以理解为一个或多个处理器,或者也可以理解为一个或多个处理器的部分硬件电路所在的区域。每个子系统的频率可以独立控制。
每个子系统的工作电压不变,则每个子系统的频率与功耗一一对应。
芯片上设置有多个温度检测点,每个温度检测点的关系模型用于表示各个子系统的功耗与该温度检测点的预测温度之间的关系。因此,每个温度检测点的关系模型也可以理解为用于表示各个子系统的频率与该温度检测点的预测温度之间的关系。
在步骤S301之前,可以获取频率集合F0。
频率集合F0包括多个频率信息。每个频率信息可以用于表示一个子系统在时刻t0的频率。频率集合F0中的多个频率信息与芯片的多个子系统一一对应。
本申请实施例对频率信息的获取方式不作限定。可以按照固定周期获取频率信息。
可以从用于进行频率统计的硬件设备中获取每个子系统的频率。
频率信息可以是根据功耗和频率的对应关系确定的。每个子系统的功耗与频率的对应关系可以相同或不同。可以检测各个子系统的功耗。
通过获取子系统的功耗,以及该子系统功耗和频率的对应关系,可以确定该子系统的频率。
可以通过对子系统漏电流即集成电路静态电流(integrated circuit quiescent current,IDDQ)的检测,确定子系统的静态功耗。也可以根据工艺电压温度(process,voltage,temperature,PVT)等参数,确定子系统的静态功耗。
动态功耗和静态功耗可以分别获取。功耗可以是动态功耗和静态功耗之和。可以通过对动态功耗和静态功耗的检测,确定子系统的功耗。
可以通过对子系统电源电流或地电流的检测,确定子系统的功耗。
在进行步骤S301之前,可以获取阈值集合T a
阈值集合T a可以包括每个温度检测点的预设温度阈值。多个温度检测点可以分散的设置在芯片上。对于每个温度检测点,可以通过温度传感器进行检测点温度的检测。每个温度检测点的预设温度阈值可以相等或不相等。例如,每个温度检测点的预设温度阈值相等,可以将芯片正常工作的最高安全温度作为每个温度检测点的预设温度阈值。
在步骤S301,利用各个温度检测点的关系模型,确定频率集合F1。频率集合F1和频率集合F0中的各个频率之间的比例相等。并且,频率集合F1使得每个检测点的预测温度小于或等于该温度检测点在阈值集合T a中的预设温度阈值。
可以理解为,频率集合F1是根据各个温度检测点的关系模型,频率集合F0中各个频率之间的比例,以及阈值集合T a确定的。
至少一个温度检测点的检测点预测温度与该温度检测点的预设温度阈值相等。每个温度检测点的检测点预测温度是根据频率集合F1以及该温度检测点的关系模型确定的。相等,也可以是近似相等。
温度检测点的关系模型中可以不包括与时间有关的参数,也就是说,每个温度检测点的关系模型可以理解为各个子系统的功耗稳定的情况下的关系模型,即每个温度检测点的关系模型可以表示在多个子系统的功耗基本保持不变的情况下,多个子系统的功耗与该温度检测点的检测点预测温度之间的关系。
利用功耗稳定的情况下一个温度检测点的关系模型,根据各个子系统的功耗,可以对温度检测点的温度进行预测。
或者,每个温度检测点的关系模型也可以包括与时间相关的参数。每个温度检测点的关系模型也可以在子系统功耗不稳定的情况下,对各个温度检测点的检测点温度进行动态的预测。温度检测点的关系模型可以包括多个子系统的功耗、该温度检测点的检测点实时温度与预设时间长度后该温度检测点的检测点预测温度之间的关系。也就是说,将温度检测点的在时刻t0的上一时刻的温度检测值以及多个子系统的功耗输入温度检测点的关系模型,温度检测点的关系模型可以在预测时刻t0该温度检测点的温度。
温度检测点的关系模型表示系统频率稳定的情况下,多个子系统的功耗与该温度检测点的预测温度之间的关系,可以降低温度检测点的关系模型的复杂度。下面,以关系模型表示子系统功耗稳定的情况下,多个子系统的功耗与该温度检测点的预测温度之间的关系 为例进行说明。
由于温度检测点的关系模型与时间无关,时刻t0与时刻t1之间的时间长度可以是预设值,也可以是任意值。
将阈值集合T a作为各个温度检测点的预测温度最大值,根据频率集合F0中的各个频率之间的比例,以及各个温度检测点的关系模型,可以确定频率集合F1。
在一些实施例中,根据每个温度检测点的关系模型,将该温度检测点的预设温度阈值作为预测温度,可以确定该温度检测点对一组频率集合。该频率集合包括各个子系统的频率。该频率集合中的各个子系统的频率与频率集合F0中的各个频率之间的比例相等。
在多个温度检测点对应的多个频率集合中,由于各个子系统的频率之间的比例相等,因此对于任一个子系统,最小频率值所在的频率集合能够使得每个温度检测点的检测点预测温度不超过该温度检测点的预设温度阈值。因此,可以将频率值最小的频率集合作为频率集合F1。
在另一些实施例中,可以根据频率集合F0指示的各个子系统的频率之间的比例,确定多个频率集合。每个频率集合指示的各个子系统的频率之间的比例与频率集合F0指示的比例相同。
利用各个温度检测点的关系模型,确定该多个频率集合对应的预测温度集合。每个频率集合对应的预测温度集合用于指示芯片按照该频率集合运行时各个温度检测点的预测温度。
多个预测温度集合可以分别表示为T1+1’,T2+1’,T3+1’,T4+1’等。在多个预测温度集合T1+1’,T2+1’,T3+1’,T4+1’等中,在使得每个检测点预测温度不超过该温度检测点的预设温度阈值的至少一个预测温度集合中,确定一个预测温度集合。
由于每个频率集合中各个子系统的频率之间的比例相等,可以在使得每个检测点预测温度不超过该温度检测点的预设温度阈值的至少一个预测温度集合中,对于某一个子系统,频率最大的一个频率集合作为频率集合F1。
在确定频率集合F1的过程中,可以先根据频率集合F0,以及各个温度检测点的关系模型,确定预测温度集合T1+1’。然后,可以判断预测温度集合T1+1’中每个温度检测点的温度是否均小于该温度检测点的预设温度阈值。当T1+1’中每个温度检测点的温度均小于该温度检测点的预设温度阈值时,逐渐增加各个子系统的频率,以得到多个频率集合以及与该多个频率集合一一对应的多个预测温度集合T2+1’,T3+1’,T4+1’等。反之,当T1+1’中每个温度检测点的温度不是均小于该温度检测点的预设温度阈值时,逐渐减小各个子系统的频率,以得到多个频率集合以及与该多个频率集合一一对应的多个预测温度集合。
在确定频率集合F1的过程中,也可以采用二分法等方式加速搜索过程。
温度检测点的关系模型可以通过函数表示,例如第j温度检测点预测温度T+1' j与各个子系统的关系模型可以通过线性函数表示为:
T+1' j=[a 0j,a 1j,...,a nj]×[x 0,x 1,...,x n] T+c j
其中,n为芯片中子系统的数量,x 0,x 1,...,x n分别为n个子系统的功耗,a 0j,a 1j,...,a nj为分别为x 0,x 1,...,x n的系数,a 0j,a 1j,...,a nj和c j为常数。
根据各个温度检测点的关系模型,可以主动对芯片各个温度检测点的温度进行主动预测,从而无需对各个温度检测点的温度进行频繁的检测,在占用较小的资源的情况下,对 芯片的功耗(即频率)进行调整,使得芯片工作在安全工作范围内,并使得芯片表现出较高的性能。
与通过温度检测被动调整各个子系统功耗的方式相比,通过步骤S301至步骤S302,可以根据温度检测点的预设温度阈值,利用关系模型,主动确定芯片运行的频率,实现自适应控制,避免温度控制的响应滞后性,避免欠阻尼或过阻尼情况的发生,提高芯片的工作稳定性。
通过温度检测点的关系模型,综合考虑各个子系统对每个温度检测点的温度的影响大小,使得对芯片的温度控制更为准确。例如,可以通过线性函数表示各个子系统对每个温度检测点的温度的影响,通过系数表示各个子系统的影响大小。
之后,进行步骤S302,控制芯片根据频率集合F1运行。
可以控制芯片按照频率集合F1运行。或者,可以根据各个子系统功能上的需求,控制各个子系统在低于频率集合F1中对应的频率的状态下运行。
通过步骤S301至步骤S302,实现了对芯片频率的调整。
为了应对环境温度变化对芯片温度的影响,可以根据温度检测点的预测温度值与温度检测点的实际温度值的差值,对温度检测点的关系模型进行调整。步骤S303至步骤S305,以时刻t0和时刻t1之间芯片按照频率集合F1运行为例,对关系模型中各个子系统的功耗与各个检测点预测温度之间的关系的调整进行说明。
在步骤S303,对芯片进行测量以获得在时刻t1的实际温度集合T+1。实际温度集合T+1包括每个温度检测点在时刻t1的实际温度。
在步骤S304,根据实际温度集合T+1和预测温度集合T+1’,计算各个温度检测点的实际温度与预测温度之间的差值。
预测温度集合T+1’可以是步骤S301确定的频率集合F1对应的预测温度集合。温度检测点的预测温度为预测温度集合T+1’中该温度检测点的预测温度。
在进行步骤S301时,可以将频率集合F1对应的预测温度集合作为预测温度集合T+1’并进行存储。
在时刻t0和时刻t1之间,各个子系统的频率可能根据需要发生变化。可以在时刻t1时,获取频率集合F1’,频率集合F1’包括时刻t1之前窗口时间段内的各个子系统的功耗平均值对应的频率。根据频率集合F1’,以及关系模型,可以确定预测温度集合T+1’。
预测温度集合T+1’包括根据频率集合F1’,利用各个温度检测点的关系模型确定的各个温度检测点的预测温度。
根据频率集合F1’确定预测温度集合T+1’,能够使得预测温度集合T+1’更符合芯片的各个子系统的实际运行情况。
之后,根据预测温度集合T+1’和实际温度集合T+1,计算各个温度检测点的预测温度与实际温度的差值。
在步骤S305,根据每个温度检测点的预测温度与实际温度的差值,对该温度检测点的关系模型进行调整。
根据温度检测点调整后的关系模型确定的该温度检测点的预测温度,与该温度检测点的实际温度相等。
第j温度检测点预测温度T+1' j与各个子系统的关系模型可以通过线性函数表示为:
T+1' j=[a 0j,a 1j,...,a nj]×[x 0,x 1,...,x n] T+c j
可以对第j温度检测点的关系模型中的常数项c j进行调整,以使得根据第j温度检测点调整后的关系模型确定的该温度检测点的预测温度,与该温度检测点的实际温度相等。
一方面,环境温度变化影响芯片的散热。当环境温度发生变化时,根据温度检测点的关系模型确定的预测温度与该温度检测点的实际温度之间存在误差。
将每个温度检测点的预测温度与该温度检测点的实际温度的差值反馈至该温度检测点的关系模型,从而根据缓慢变化的环境温度对温度检测点的关系模型的影响,对温度检测点的关系模型进行校准。
另一方面,各个子系统的功耗可能处于变化状态。在时刻t0,控制各个子系统按照频率集合F1运行。但是,在时刻t0与时刻t1之间的预设时间长度内,各个子系统的工作频率可能根据运行的程序等情况进行调整。例如,运行的程序的数量、种类的变化,可能使得部分子系统的频率增加或减少,从而各个子系统的功耗发生变化。
相对于功耗的变化,温度的变化具有滞后性。当某个子系统根据数据处理的需要,功耗突然增加时,将每个温度检测点的检测点预测温度与时刻t1时该检测点的检测点实际温度的差值反馈至该温度检测点的关系模型,可以使得该温度检测点的关系模型更快地适应功耗台阶式变化的情况,更加准确的反映出现功耗台阶式变化的情况下各个子系统的功耗信息和该温度检测点的温度之间的关系,使得温度预测更加准确。
为了提高温度检测点的关系模型对温度的预测准确性,可以根据温度检测点的检测点预测温度与时刻t1时该检测点的检测点实际温度的差值,可以对温度检测点的关系模型中的常数项c j进行调整。
也就是说,第j温度检测点的检测点预测温度T+1' j的表达式中可以考虑环境温度的影响。环境温度的影响可以通过第j温度检测点的预测温度T+1' j与实际温度T+1 j的差值即error j体现。
温度检测点的关系模型中的常数项c j可以表示为
c j=c j'+error j=c j'+(T+1' j)-(T+1 j)
其中,c j'为常数。
根据检测点预测温度与检测点实际温度之间的差值,对温度检测点的关系模型进行调整,可以加速收敛,改善温度检测点的关系模型对芯片中子系统的功耗突变点和环境温度变化的相应。
可以在第一预测温度与实际温度之间的差值小于或等于预设差值阈值时,根据该差值,调整关系模型。反之,当第一预测温度与实际温度之间的差值大于预设差值阈值时,不再进行对关系模型的调整。差值小于或等于预设差值阈值,也可以理解为差值的绝对值小于或等于预设差值阈值。
上文结合图1至图4的描述了本申请实施例的方法实施例,下面结合图5至图7,描述本申请实施例的装置实施例。应理解,方法实施例的描述与装置实施例的描述相互对应,因此,未详细描述的部分可以参见前面方法实施例。
图5是本申请实施例提供的一种芯片的示意性结构图。
SOC芯片包括CPU、GPU、NPU等多个子系统以及多个温度检测点。控制装置1000 用于执行图2或图4所述的方法。控制装置1000还可以用于执行图3所示的方法。控制装置1000可以位于该SOC芯片上。如果控制装置1000的频率可以单独控制,控制装置1000也可以作为一个子系统。控制装置1000也可以位于其他芯片上,本申请实施例不作限定。
以控制装置执行图4所述的步骤为例进行说明。
每个子系统可以将该子系统的当前频率f0发送至控制装置1000,从而,控制装置1000可以获取频率集合F0,完成步骤S301。
根据频率集合F0中各个子系统频率之间的比例,控制装置1000确定频率集合F1之后,可以将频率集合F1中每个子系统控制频率f1发送至该子系统,从而实现步骤S302,控制各个子系统按照该子系统的控制频率f1运行。
控制装置1000还可以进行步骤S303,获取每个温度检测点的实际温度。
之后,控制装置1000可以进行步骤S304,计算温度检测点的预测温度和实际温度的差值。之后,控制装置1000可以进行步骤S305,调整该温度检测点的关系模型。
为了提高对于温度检测点的关系模型的调整的准确性,可以根据新品各个子系统师实际的功耗变化情况,预测温度检测点的温度。在进行步骤S304之前,控制装置1000还可以获取每个子系统在预设时间段内功耗随时间的变化情况,从而对各个温度检测点的温度进行预测。从而,可以根据温度检测点的预测温度和实际温度的差值,对温度检测点的关系模型进行调整。
下面结合图6和图7对控制装置1000进行说明。
图6是本申请实施例提供的一种芯片的控制装置的示意性结构图。
芯片包括至少一个子系统,所述芯片上设置有至少一个第一温度检测点。
控制装置1000包括确定模块1110和控制模块1120。
确定模块1110用于,利用每个第一温度检测点的关系模型,确定第一功耗信息,每个第一温度检测点的关系模型用于表示功耗信息和所述第一温度检测点的预测温度之间的关系,所述功耗信息用于指示所述每个子系统的功耗,所述第一功耗信息使得利用每个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第一温度检测点的预设温度阈值。
控制模块1120用于,控制所述芯片根据所述第一功耗信息运行。
可选地,所述至少一个子系统包括多个子系统,所述第一功耗信息指示的所述每个子系统的功耗满足第一关联关系。
可选地,控制装置1000还包括获取模块,所述获取模块用于获取所述芯片的当前频率信息,所述当前频率信息用于指示所述芯片的多个子系统当前的工作频率。
所述第一关联关系为,所述多个子系统的工作频率之间的比例等于所述当前频率信息指示的所述多个子系统当前的工作频率之间的比例。
每个子系统的功耗与所述子系统的频率满足第二关联关系。
可选地,所述芯片上设置有多个温度检测点,所述多个温度检测点包括所述至少一个第一温度检测点,每个温度检测点的预设温度阈值相等。
所述至少一个第一温度检测点为所述多个温度检测点中温度最高的至少一个温度检测点。
可选地,控制装置1000还包括获取模块,所述获取模块用于获取第二功耗信息,所述第二功耗信息用于指示每个所述子系统当前的功耗。
控制装置1000还包括检测模块,所述检测模块用于对所述芯片进行检测,以获得所述至少一个第一温度检测点中第i个第一温度检测点的实际温度,i为正整数。
确定模块1110还用于,根据所述第i个第一温度检测点的关系模型,以及所述第二功耗信息,确定所述第i个第一温度检测点的第二预测温度。
控制装置1000还包括调整模块,所述调整模块用于,根据所述第二预测温度与所述实际温度之间差值,调整所述第i个第一温度检测点的关系模型,以使得根据调整后的所述第i个第一温度检测点的关系模型和所述第二功耗信息确定的第三预测温度与所述实际温度相等。
所述确定模块1110用于,根据所述调整后的所述第i个第一温度检测点的关系模型,确定所述第一功耗信息。
所述第一功耗信息使得利用调整后的所述第i个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第i个第一温度检测点的预设温度阈值。
可选地,所述第二功耗信息用于指示每个所述子系统在当前时刻之前预设时间段的功耗与时间的第三关联关系。
所述第i个第一温度检测点的关系模型用于,根据所述第二功耗信息,确定第三功耗信息,所述第三功耗信息包括每个所述子系统在当前时刻之前所述子系统对应的窗口时间段中的平均功耗,所述预设时间段包括所述窗口时间段。
所述第i个第一温度检测点的关系模型还用于,根据第三功耗信息,确定所述第二预测温度。
可选地,所述第i个第一温度检测点的关系模型用于,根据所述第第三关联关系,确定每个所述子系统对应的窗口时间段。
可选地,所述调整模块用于,当所述差值小于或等于预设差值阈值时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
可选地,控制装置1000还包括更新模块,所述更新模块用于,当所述差值小于或等于所述预设差值阈值时,更新触发次数,所述触发次数用于指示预设时间长度内所述差值小于或等于所述预设差值阈值的次数。
所述调整模块用于,当所述触发次数小于或等于预设次数时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
可选地,所述芯片上设置有至少一个温度检测点,所述至少一个温度检测点包括所述至少一个第一温度检测点。
控制装置1000还包括获取模块和训练模块。
所述获取模块还用于,获取训练功耗信息和第j训练测量温度,所述训练功耗信息用于指示所述至少一个子系统的功耗,所述第j训练测量温度用于指示所述芯片按照所述训练功耗信息运行时,所述至少一个温度检测点中第j个温度检测点的温度,j为正整数。
所述训练模块用于,将所述训练功耗信息输入原始关系模型,以得到第j训练预测温度;
所述训练模块还用于,根据所述第j训练预测温度和所述第j训练测量温度,调整所 述原始关系模型的参数,使得所述第j训练预测温度和所述第j训练测量温度的差异最小化,以得到所述第j个温度检测点的关系模型。
可选地,每个第一温度检测点的关系模型用于表示每个子系统的功耗对所述第一温度检测点的预测温度的影响大小。
图7是本申请实施例提供的一种芯片的控制装置的示意性结构图。
所述芯片包括至少一个子系统,所述芯片上设置有至少一个第一温度检测点。
控制装置1000包括存储器1210和处理器1220。
存储器1210用于存储程序指令。
当所述存储器存储的程序被执行时,处理器1220用于:
利用每个第一温度检测点的关系模型,确定第一功耗信息,每个第一温度检测点的关系模型用于表示功耗信息和所述第一温度检测点的预测温度之间的关系,所述功耗信息用于指示所述每个子系统的功耗,所述第一功耗信息使得利用每个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第一温度检测点的预设温度阈值;
控制所述芯片根据所述第一功耗信息运行。
可选地,所述至少一个子系统包括多个子系统,所述第一功耗信息指示的所述每个子系统的功耗满足第一关联关系。
可选地,处理器1220还用于:获取所述芯片的当前频率信息,所述当前频率信息用于指示所述芯片的多个子系统当前的工作频率。
所述第一关联关系为,所述多个子系统的工作频率之间的比例等于所述当前频率信息指示的所述多个子系统当前的工作频率之间的比例。
每个子系统的功耗与所述子系统的频率满足第二关联关系。
可选地,所述芯片上设置有多个温度检测点,所述多个温度检测点包括所述至少一个第一温度检测点,每个温度检测点的预设温度阈值相等。
所述至少一个第一温度检测点为所述多个温度检测点中温度最高的至少一个温度检测点。
可选地,处理器1220还用于:获取第二功耗信息,所述第二功耗信息用于指示每个所述子系统当前的功耗。
处理器1220还用于:对所述芯片进行检测以获得所述至少一个第一温度检测点中第i个第一温度检测点的实际温度,i为正整数。
处理器1220还用于:根据所述第i个第一温度检测点的关系模型,以及所述第二功耗信息,确定所述第i个第一温度检测点的第二预测温度。
处理器1220还用于:根据所述调整后的所述第i个第一温度检测点的关系模型,确定所述第一功耗信息,所述第一功耗信息使得利用调整后的所述第i个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第i个第一温度检测点的预设温度阈值。
处理器1220还用于:根据所述调整后的所述第i个第一温度检测点的关系模型,确定所述第一功耗信息。
所述第一功耗信息使得利用调整后的所述第i个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第i个第一温度检测点的预设温度阈值。
可选地,所述第二功耗信息还用于指示每个所述子系统在当前时刻之前预设时间段的 功耗与时间的第三关联关系。
所述第i个第一温度检测点的关系模型用于,根据所述第二功耗信息,确定第三功耗信息,所述第三功耗信息包括每个所述子系统在当前时刻之前所述子系统对应的窗口时间段中的平均功耗,所述预设时间段包括所述窗口时间段。
所述第i个第一温度检测点的关系模型还用于,根据所述第三功耗信息,确定所述第二预测温度。
可选地,所述第i个第一温度检测点的关系模型用于,根据所述第三关联关系,确定每个所述子系统对应的窗口时间段。
可选地,处理器1220还用于:当所述差值小于或等于预设差值阈值时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
可选地,处理器1220还用于:当所述差值小于或等于所述预设差值阈值时,更新触发次数,所述触发次数用于指示预设时间长度内所述差值小于或等于所述预设差值阈值的次数。
处理器1220还用于:当所述触发次数小于或等于预设次数时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
可选地,所述芯片上设置有至少一个温度检测点,所述至少一个温度检测点包括所述至少一个第一温度检测点。
处理器1220还用于:获取训练功耗信息和第j训练测量温度,所述训练功耗信息用于指示所述至少一个子系统的功耗,所述第j训练测量温度用于指示所述芯片按照所述训练功耗信息运行时,所述至少一个温度检测点中第j个温度检测点的温度,j为正整数。
处理器1220还用于:将所述训练功耗信息输入原始关系模型,以得到第j训练预测温度。
处理器1220还用于:根据所述第j训练预测温度和所述第j训练测量温度,调整所述原始关系模型的参数,使得所述第j训练预测温度和所述第j训练测量温度的差异最小化,以得到所述第j个温度检测点的关系模型。
可选地,每个第一温度检测点的关系模型用于表示每个子系统的功耗对所述第一温度检测点的预测温度的影响大小。
本申请实施例还提供一种电子设备,其包括芯片和前述的芯片的控制装置。
本申请实施例还提供一种计算机程序存储介质,其特征在于,所述计算机程序存储介质具有程序指令,当所述程序指令被处理器执行时,使得处理器执行前文中芯片的控制方法。
本申请实施例还提供一种芯片系统,其特征在于,所述芯片系统包括至少一个处理器,当程序指令在所述至少一个处理器中执行时,使得所述至少一个处理器执行前文中的芯片的控制方法。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,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可以是单个,也可以是多个。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (26)

  1. 一种芯片的控制方法,其特征在于,所述芯片包括至少一个子系统,所述芯片上设置有至少一个第一温度检测点,所述方法包括:
    利用每个第一温度检测点的关系模型,确定第一功耗信息,每个第一温度检测点的关系模型用于表示功耗信息和所述第一温度检测点的预测温度之间的关系,所述功耗信息用于指示所述每个子系统的功耗,所述第一功耗信息使得利用每个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第一温度检测点的预设温度阈值;
    控制所述芯片根据所述第一功耗信息运行。
  2. 根据权利要求1所述的方法,其特征在于,所述至少一个子系统包括多个子系统,所述第一功耗信息指示的所述每个子系统的功耗满足第一关联关系。
  3. 根据权利要求2所述的方法,其特征在于,
    所述方法还包括:获取所述芯片的当前频率信息,所述当前频率信息用于指示每个子系统当前的工作频率;
    所述第一关联关系为,所述多个子系统的工作频率之间的比例等于所述当前频率信息指示的所述多个子系统当前的工作频率之间的比例,每个子系统的功耗与所述子系统的频率满足第二关联关系。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述芯片上设置有多个温度检测点,所述多个温度检测点包括所述至少一个第一温度检测点,每个温度检测点的预设温度阈值相等,所述至少一个第一温度检测点为所述多个温度检测点中当前温度最高的至少一个温度检测点。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述方法还包括:
    获取第二功耗信息,所述第二功耗信息用于指示每个子系统当前的功耗;
    对所述芯片进行检测以获得所述至少一个第一温度检测点中第i个第一温度检测点的实际温度,i为正整数;
    根据所述第i个第一温度检测点的关系模型,以及所述第二功耗信息,确定所述第i个第一温度检测点的第二预测温度;
    根据所述第二预测温度与所述实际温度之间差值,调整所述第i个第一温度检测点的关系模型,以使得根据调整后的所述第i个第一温度检测点的关系模型和所述第二功耗信息确定的第三预测温度与所述实际温度相等;
    所述利用每个第一温度检测点的关系模型,确定第一功耗信息,包括:利用调整后的所述第i个第一温度检测点的关系模型,确定所述第一功耗信息,所述第一功耗信息使得利用调整后的所述第i个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第i个第一温度检测点的预设温度阈值。
  6. 根据权利要求5所述的方法,其特征在于,所述第二功耗信息还用于指示每个所述子系统在当前时刻之前预设时间段的功耗与时间的第三关联关系;
    所述第i个第一温度检测点的关系模型用于,根据所述第二功耗信息,确定第三功耗信息,所述第三功耗信息包括每个所述子系统在当前时刻之前所述子系统对应的窗口时间 段中的平均功耗,所述预设时间段包括所述窗口时间段;
    所述第i个第一温度检测点的关系模型还用于,根据所述第三功耗信息,确定所述第二预测温度。
  7. 根据权利要求6所述的方法,其特征在于,
    所述第i个第一温度检测点的关系模型用于,根据所述第三关联关系,确定每个所述子系统对应的窗口时间段。
  8. 根据权利要求5-7中任一项所述的方法,其特征在于,所述根据所述第二预测温度与所述实际温度之间差值,调整所述第i个第一温度检测点的关系模型,包括:
    当所述差值小于或等于预设差值阈值时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
  9. 根据权利要求8所述的方法,其特征在于,当所述差值小于或等于预设差值阈值时,根据所述差值,调整所述第i个第一温度检测点的关系模型,包括:
    当所述差值小于或等于所述预设差值阈值时,更新触发次数,所述触发次数用于指示预设时间长度内所述差值小于或等于所述预设差值阈值的次数;
    当所述触发次数小于或等于预设次数时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,所述芯片上设置有至少一个温度检测点,所述至少一个温度检测点包括所述至少一个第一温度检测点,
    所述方法还包括:
    获取训练功耗信息和第j训练测量温度,所述训练功耗信息用于指示所述至少一个子系统的功耗,所述第j训练测量温度用于指示所述芯片按照所述训练功耗信息运行时,所述至少一个温度检测点中第j个温度检测点的温度,j为正整数;
    将所述训练功耗信息输入原始关系模型,以得到第j训练预测温度;
    根据所述第j训练预测温度和所述第j训练测量温度,调整所述原始关系模型的参数,使得所述第j训练预测温度和所述第j训练测量温度的差异最小化,以得到所述第j个温度检测点的关系模型。
  11. 根据权利要求1-10中任一项所述的方法,其特征在于,每个第一温度检测点的关系模型用于表示每个子系统的功耗对所述第一温度检测点的预测温度的影响大小。
  12. 一种芯片的控制装置,其特征在于,包括存储器和处理器;所述芯片包括至少一个子系统,所述芯片上设置有至少一个第一温度检测点;
    所述存储器用于存储程序指令;
    当所述存储器存储的程序指令被执行时,所述处理器用于:
    利用每个第一温度检测点的关系模型,确定第一功耗信息,每个第一温度检测点的关系模型用于表示功耗信息和所述第一温度检测点的预测温度之间的关系,所述功耗信息用于指示所述每个子系统的功耗,所述第一功耗信息使得利用每个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第一温度检测点的预设温度阈值;
    控制所述芯片根据所述第一功耗信息运行。
  13. 根据权利要求12所述的装置,其特征在于,所述至少一个子系统包括多个子系统,所述第一功耗信息指示的所述每个子系统的功耗满足第一关联关系。
  14. 根据权利要求13所述的装置,其特征在于,所述处理器还用于:获取所述芯片的当前频率信息,所述当前频率信息用于指示所述芯片的多个子系统当前的工作频率;
    所述第一关联关系为,所述多个子系统的工作频率之间的比例等于所述当前频率信息指示的所述多个子系统当前的工作频率之间的比例,每个子系统的功耗与所述子系统的频率满足第二关联关系。
  15. 根据权利要求12-14中任一项所述的装置,其特征在于,所述芯片上设置有多个温度检测点,所述多个温度检测点包括所述至少一个第一温度检测点,每个温度检测点的预设温度阈值相等,所述至少一个第一温度检测点为所述多个温度检测点中温度最高的至少一个温度检测点。
  16. 根据权利要求12-15中任一项所述的装置,其特征在于,所述处理器还用于:
    获取第二功耗信息,所述第二功耗信息用于指示每个子系统当前的功耗;
    对所述芯片进行检测以获得所述至少一个第一温度检测点中第i个第一温度检测点的实际温度,i为正整数;
    根据所述第i个第一温度检测点的关系模型,以及所述第二功耗信息,确定所述第i个第一温度检测点的第二预测温度;
    根据所述第二预测温度与所述实际温度之间差值,调整所述第i个第一温度检测点的关系模型,以使得根据调整后的所述第i个第一温度检测点的关系模型和所述第二功耗信息确定的第三预测温度与所述实际温度相等;
    根据所述调整后的所述第i个第一温度检测点的关系模型,确定所述第一功耗信息,所述第一功耗信息使得利用调整后的所述第i个第一温度检测点的关系模型确定的第一预测温度小于或等于所述第i个第一温度检测点的预设温度阈值。
  17. 根据权利要求16所述的装置,其特征在于,所述第二功耗信息还用于指示每个所述子系统在当前时刻之前预设时间段的功耗与时间的第三关联关系;
    所述第i个第一温度检测点的关系模型用于,根据所述第二功耗信息,确定第三功耗信息,所述第三功耗信息包括每个所述子系统在当前时刻之前所述子系统对应的窗口时间段中的平均功耗,所述预设时间段包括所述窗口时间段;
    所述第i个第一温度检测点的关系模型还用于,根据所述第三功耗信息,确定所述第二预测温度。
  18. 根据权利要求17所述的装置,其特征在于,
    所述第i个第一温度检测点的关系模型用于,根据所述第三关联关系,确定每个所述子系统对应的窗口时间段。
  19. 根据权利要求16-18中任一项所述的装置,其特征在于,所述处理器还用于:
    当所述差值小于或等于预设差值阈值时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
  20. 根据权利要求19所述的装置,其特征在于,所述处理器还用于:
    当所述差值小于或等于所述预设差值阈值时,更新触发次数,所述触发次数用于指示预设时间长度内所述差值小于或等于所述预设差值阈值的次数;
    当所述触发次数小于或等于预设次数时,根据所述差值,调整所述第i个第一温度检测点的关系模型。
  21. 根据权利要求12-20中任一项所述的装置,其特征在于,所述芯片上设置有至少一个温度检测点,所述至少一个温度检测点包括所述至少一个第一温度检测点,
    所述处理器还用于:
    获取训练功耗信息和第j训练测量温度,所述训练功耗信息用于指示所述至少一个子系统的功耗,所述第j训练测量温度用于指示所述芯片按照所述训练功耗信息运行时,所述至少一个温度检测点中第j个温度检测点的温度,j为正整数;
    将所述训练功耗信息输入原始关系模型,以得到第j训练预测温度;
    根据所述第j训练预测温度和所述第j训练测量温度,调整所述原始关系模型的参数,使得所述第j训练预测温度和所述第j训练测量温度的差异最小化,以得到所述第j个温度检测点的关系模型。
  22. 根据权利要求12-21中任一项所述的装置,其特征在于,每个第一温度检测点的关系模型用于表示每个子系统的功耗对所述第一温度检测点的预测温度的影响大小。
  23. 一种芯片的控制装置,其特征在于,包括用于执行权利要求1至11中任一项所述方法的各个功能模块。
  24. 一种计算机程序存储介质,其特征在于,所述计算机程序存储介质具有程序指令,当所述程序指令被处理器执行时,使得所述处理器执行如权利要求1至11中任一项所述的方法。
  25. 一种芯片,其特征在于,所述芯片包括至少一个处理器,当程序指令被所述至少一个处理器中执行时,所述至少一个处理器执行如权利要求1至11中任一项所述的方法。
  26. 一种电子设备,其特征在于,包括芯片和权利要求12至22中任一项所述的芯片的控制装置。
PCT/CN2020/091177 2020-05-20 2020-05-20 芯片的控制方法和控制装置 WO2021232266A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/091177 WO2021232266A1 (zh) 2020-05-20 2020-05-20 芯片的控制方法和控制装置
CN202080101051.7A CN115668097A (zh) 2020-05-20 2020-05-20 芯片的控制方法和控制装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/091177 WO2021232266A1 (zh) 2020-05-20 2020-05-20 芯片的控制方法和控制装置

Publications (1)

Publication Number Publication Date
WO2021232266A1 true WO2021232266A1 (zh) 2021-11-25

Family

ID=78707723

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/091177 WO2021232266A1 (zh) 2020-05-20 2020-05-20 芯片的控制方法和控制装置

Country Status (2)

Country Link
CN (1) CN115668097A (zh)
WO (1) WO2021232266A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115373443A (zh) * 2022-08-26 2022-11-22 深圳市广通远驰科技有限公司 温度控制方法、装置、电子设备及存储介质
CN116069143A (zh) * 2023-04-06 2023-05-05 山东省计算中心(国家超级计算济南中心) 一种基于作业相似性判断功耗预测的节能方法及系统
CN116301117A (zh) * 2023-05-24 2023-06-23 荣耀终端有限公司 温度控制方法和电子设备
CN116304956A (zh) * 2023-05-15 2023-06-23 济宁市质量计量检验检测研究院(济宁半导体及显示产品质量监督检验中心、济宁市纤维质量监测中心) 一种芯片温度异常在线检测方法
CN116400201A (zh) * 2023-06-06 2023-07-07 中诚华隆计算机技术有限公司 一种芯粒工作状态监测方法、装置、电子设备及存储介质
WO2023202305A1 (zh) * 2022-04-18 2023-10-26 华为技术有限公司 芯片和电压噪声抑制方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117743965B (zh) * 2024-02-21 2024-05-07 深圳市互盟科技股份有限公司 基于机器学习的数据中心能效优化方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120075005A1 (en) * 2010-09-28 2012-03-29 Jose Luis Flores Closed Loop Adaptive Voltage Scaling
CN103649869A (zh) * 2011-06-02 2014-03-19 苹果公司 电子设备中的多级热量管理
CN106681453A (zh) * 2016-11-24 2017-05-17 电子科技大学 一种高性能多核微处理器的动态热管理方法
CN109685207A (zh) * 2018-11-27 2019-04-26 电子科技大学 一种基于循环神经网络的多核芯片热管理方法
CN111026603A (zh) * 2019-10-25 2020-04-17 南京大学 片上网络温度预测方法及装置、设备、存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120075005A1 (en) * 2010-09-28 2012-03-29 Jose Luis Flores Closed Loop Adaptive Voltage Scaling
CN103649869A (zh) * 2011-06-02 2014-03-19 苹果公司 电子设备中的多级热量管理
CN106681453A (zh) * 2016-11-24 2017-05-17 电子科技大学 一种高性能多核微处理器的动态热管理方法
CN109685207A (zh) * 2018-11-27 2019-04-26 电子科技大学 一种基于循环神经网络的多核芯片热管理方法
CN111026603A (zh) * 2019-10-25 2020-04-17 南京大学 片上网络温度预测方法及装置、设备、存储介质

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023202305A1 (zh) * 2022-04-18 2023-10-26 华为技术有限公司 芯片和电压噪声抑制方法
CN115373443A (zh) * 2022-08-26 2022-11-22 深圳市广通远驰科技有限公司 温度控制方法、装置、电子设备及存储介质
CN115373443B (zh) * 2022-08-26 2024-04-05 深圳市广通远驰科技有限公司 温度控制方法、装置、电子设备及存储介质
CN116069143A (zh) * 2023-04-06 2023-05-05 山东省计算中心(国家超级计算济南中心) 一种基于作业相似性判断功耗预测的节能方法及系统
CN116304956A (zh) * 2023-05-15 2023-06-23 济宁市质量计量检验检测研究院(济宁半导体及显示产品质量监督检验中心、济宁市纤维质量监测中心) 一种芯片温度异常在线检测方法
CN116304956B (zh) * 2023-05-15 2023-08-15 济宁市质量计量检验检测研究院(济宁半导体及显示产品质量监督检验中心、济宁市纤维质量监测中心) 一种芯片温度异常在线检测方法
CN116301117A (zh) * 2023-05-24 2023-06-23 荣耀终端有限公司 温度控制方法和电子设备
CN116301117B (zh) * 2023-05-24 2023-10-20 荣耀终端有限公司 温度控制方法和电子设备
CN116400201A (zh) * 2023-06-06 2023-07-07 中诚华隆计算机技术有限公司 一种芯粒工作状态监测方法、装置、电子设备及存储介质
CN116400201B (zh) * 2023-06-06 2023-08-11 中诚华隆计算机技术有限公司 一种芯粒工作状态监测方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN115668097A (zh) 2023-01-31

Similar Documents

Publication Publication Date Title
WO2021232266A1 (zh) 芯片的控制方法和控制装置
US11687139B2 (en) Multi-level CPU high current protection
WO2021036905A1 (zh) 数据处理方法、装置、计算机设备和存储介质
US8335935B2 (en) Power management based on automatic workload detection
CN110070181A (zh) 一种用于边缘计算设备的深度学习的优化方法
WO2017172027A1 (en) Systems, methods and devices for dynamic power management of devices using game theory
CN107272876A (zh) 用于管理多核片上系统上的全局芯片功率的方法和装置
US9323498B2 (en) Multiplier circuit with dynamic energy consumption adjustment
WO2019019926A1 (zh) 系统参数的优化方法、装置及设备、可读介质
JP7110278B2 (ja) 負荷を均衡化するための方法、装置、機器、コンピュータ読み取り可能な記憶媒体及びコンピュータプログラム
US20140013142A1 (en) Processing unit power management
WO2021185262A1 (zh) 计算装置、方法、板卡和计算机可读存储介质
US20100242040A1 (en) System and method of task assignment distributed processing system
CN113448425B (zh) 一种基于强化学习的动态并行应用程序能耗运行时优化方法及系统
CN115543609A (zh) 一种基于聚类集成算法的云计算虚拟资源调度方法
EP4148624A1 (en) Neural network model training apparatus and method, and related device
EP4109374A1 (en) Data processing method and device
US20170075589A1 (en) Memory and bus frequency scaling by detecting memory-latency-bound workloads
CN114117918A (zh) 一种温度约束下的终端设备异构处理器推断加速方法
KR20210148072A (ko) 신경망 네트워크 훈련 동안 데이터 희소성 모니터링
KR20220142162A (ko) 인공 지능 반도체 프로세서 및 인공 지능 반도체 프로세서의 동작 방법
CN117112239B (zh) 一种异构推理后端上的可扩展负载均衡方法及系统
US20230342216A1 (en) System and method for inference model generalization for a distributed environment
US20240053809A1 (en) Integrated circuit capable of performing dynamic voltage and frequency scaling operation based on workload and operating method thereof
US11853187B1 (en) System and method for remote management of data processing systems

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: 20936672

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: 20936672

Country of ref document: EP

Kind code of ref document: A1