Control Method and Control Device of Chip
By setting temperature detection points on the chip, using the relational model to predict temperature and adjusting power consumption information, the problem of frequent temperature detection on resource occupation is solved, and more efficient chip performance and stability is achieved.
Patent Information
- Application Number
- CN202080101051.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-20
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2040-05-20
AI Technical Summary
In the prior art, frequent temperature detection occupies a lot of processor resources on the chip, and unreasonable temperature adjustment schemes will affect the performance of the chip and lead to performance losses.
By setting temperature detection points on the chip, using the relational model to predict temperature, adjusting power consumption information based on the predicted temperature, controlling chip operation, reducing dependence on temperature detection, keeping the frequency ratio of each subsystem unchanged, and achieving accurate temperature control.
It reduces the use of processor resources, improves the performance and stability of the chip, and avoids performance losses caused by the frequency of temperature detection.
Smart Images

Figure CN115668097B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of chips, and specifically to a control method and a control device for chips. Background Art
[0002] A system on a chip (SOC) can also be referred to as a processor chip and includes multiple subsystems. Generally, the higher the frequency of a subsystem, the stronger its processing ability.
[0003] To ensure the normal operation of the chip and avoid chip damage, a temperature threshold can be set for the chip. The target temperature can be understood as the maximum temperature limit for the chip to operate safely. The increase in chip temperature is caused by power consumption. The higher the frequency of the subsystem, the greater the power consumption, and the higher the chip temperature.
[0004] To ensure the safe operation of the chip, the system power consumption margin can be determined based on 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, to reduce the waste of chip performance and improve the security of chip operation, it is necessary to frequently detect the temperature, which occupies a relatively large amount of processor resources. Summary of the Invention
[0005] This application provides a control method and a control device for a chip, which can reduce the loss of chip performance while controlling the temperature of the chip.
[0006] In a first aspect, a control method for a chip is provided. The chip includes at least one subsystem, and at least one first temperature detection point is provided on the chip. The method includes: determining first power consumption information by using the relationship model of each first temperature detection point. The relationship model of the first temperature detection point is used to represent the relationship between 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 enables the first predicted temperature determined by using the relationship model of each first temperature detection point to be 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.
[0007] Determine first power consumption information by using the relationship model of each first temperature detection point and control the chip to operate according to the first power consumption information. The first power consumption information enables the first predicted temperature determined by using the relationship model of each first temperature detection point to be 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, and can reduce the occupation of processor resources.
[0008] In combination with the first aspect, in some possible implementation manners, the at least one subsystem includes a plurality of subsystems, and the power consumption of each subsystem indicated by the first power consumption information satisfies a first correlation relationship.
[0009] A chip may include a plurality of subsystems. Determining the power consumption of each subsystem according to the correlation relationship between the power consumptions of the plurality of subsystems can make the control of the chip more accurate.
[0010] In combination with the first aspect, in some possible implementation manners, the method further includes: obtaining current frequency information of the chip, where the current frequency information is used to indicate the current operating frequencies of a plurality of subsystems of the chip, the first correlation relationship is that the ratio between the operating frequencies of the plurality of subsystems is equal to the ratio between the current operating frequencies of the plurality of subsystems indicated by the current frequency information, and the power consumption of each subsystem and the frequency of the subsystem satisfy a second correlation relationship.
[0011] When adjusting the power consumption of each subsystem, without changing the ratio between the operating frequencies of each subsystem, the impact of power consumption adjustment on the overall performance of the chip can be reduced.
[0012] For each subsystem, the second correlation relationship may represent the relationship between power consumption and frequency and operating voltage. The power consumption is positively correlated with the operating voltage and the power consumption is positively correlated with the frequency. When the operating voltage is constant, the power consumption and the frequency are in one-to-one correspondence.
[0013] In combination with the first aspect, in some possible implementation manners, 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, the preset temperature threshold of each temperature detection point is equal, and the at least one first temperature detection point is the temperature detection point with the highest current temperature among the plurality of temperature detection points.
[0014] When the chip includes a plurality of temperature detection points, all or part of the temperature detection points may be used as the first temperature detection points.
[0015] It can be ensured that the temperature of each temperature detection point does not exceed the detection point preset temperature threshold of the temperature detection point.
[0016] When the chip includes a plurality of temperature detection points, generally, the detection point preset temperature thresholds of each temperature detection point are equal. Among the temperature detection points with the highest temperature, it is easiest to reach the detection point preset temperature threshold. One or more temperature detection points with the highest temperature may be used as the first temperature detection points to determine the first power consumption information. Thus, the difficulty of determining the first power consumption information can be reduced and the calculation amount can be decreased.
[0017] In combination with the first aspect, in some possible implementation manners, the method further includes: obtaining second power consumption information, where the second power consumption information is used to indicate the current power consumption of each subsystem; detecting the chip to obtain the actual temperature of the i-th first temperature detection point among the at least one first temperature detection points, where i is a positive integer; determining 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; adjusting the relationship model of the i-th first temperature detection point according to the difference between the first predicted temperature and the actual temperature, so that the third predicted temperature determined according to the adjusted relationship model of the i-th first temperature detection point and the second power consumption information is equal to the actual temperature. The determining the first power consumption information by using the relationship model of each first temperature detection point includes: determining the first power consumption information by using the adjusted relationship model of the i-th first temperature detection point, where the first power consumption information makes the first predicted temperature determined by using the adjusted relationship model of the i-th first temperature detection point less than or equal to the preset temperature threshold of the i-th first temperature detection point.
[0018] The change in the ambient temperature affects the heat dissipation efficiency of the chip, thereby affecting the temperature of the chip. According to the difference between the actual temperature and the predicted temperature, the relationship model is adjusted, so that the relationship model can adapt to the change in the ambient temperature and can respond to the change in power consumption in a timely manner when there is a step change in the power consumption of one or more subsystems.
[0019] In combination with the first aspect, in some possible implementation manners, the second power consumption information is further used to indicate a third association relationship between the power consumption of each subsystem in a preset time period before the current moment and time. 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 the average power consumption of each subsystem in the window time period corresponding to the subsystem before the current moment, and 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 first predicted temperature according to the third power consumption information.
[0020] Determining the first predicted temperature by using the relationship model according to the average value of the power consumption within the preset time period can improve the accuracy of temperature prediction.
[0021] In combination with the first aspect, in some possible implementation manners, the relationship model of the i-th first temperature detection point is used to determine the window time period corresponding to each subsystem according to the third association relationship.
[0022] Adjust the window time period for determining the first predicted temperature according to the correlation between the power consumption of each subsystem and time within a preset time period, so that the first predicted temperature is more accurate, and thus the adjustment of the relationship model of the temperature detection point is more accurate.
[0023] In combination with the first aspect, in some possible implementation manners, the adjusting the relationship model of the i-th first temperature detection point according to the difference so that the first predicted temperature determined according to the adjusted relationship model of the i-th first temperature detection point and the first power consumption information is equal to the actual temperature includes: when the difference is less than or equal to a preset difference threshold, adjusting the relationship model of the i-th first temperature detection point according to the difference.
[0024] When the difference between the actual temperature and the first predicted temperature at the i-th first temperature detection point is less than the preset difference threshold, adjusting the relationship model of the i-th first temperature detection point can improve the stability and reliability of the relationship model of the i-th first temperature detection point.
[0025] In combination with the first aspect, in some possible implementation manners, the when the difference is less than or equal to the preset difference threshold, adjusting the relationship model of the i-th first temperature detection point according to the difference includes: when the difference is less than or equal to the preset difference threshold, updating the trigger count, where the trigger count is used to indicate the number of times the difference is less than or equal to the preset difference threshold within a preset time length; when the trigger count is less than or equal to a preset number, adjusting the relationship model of the i-th first temperature detection point according to the difference.
[0026] The power consumption of each subsystem of the chip may change in real time according to requirements. Within a period of time, the power consumption of each subsystem may frequently surge and drop. At this time, the power consumption model of the temperature detection point cannot respond to the change of power consumption in time. When the number of times of triggering the adjustment of the relationship model of the temperature detection point within a preset time length exceeds the preset number, the relationship model of the temperature detection point is no longer adjusted. Thus, in the case of frequent power consumption surges and drops, the relationship model of the temperature detection point is no longer adjusted, reducing the waste of resources.
[0027] In combination with the first aspect, in some possible implementation manners, 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 method further includes: obtaining training power consumption information and the j-th training measured 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 measured temperature is used to indicate the temperature of the j-th temperature detection point among the at least one temperature detection points when the chip operates according to the training power consumption information, and j is a positive integer. Inputting the training power consumption information into the original relationship model to obtain the j-th training predicted temperature. Adjusting the parameters of the original relationship model according to the j-th training predicted temperature and the j-th training measured temperature, so that the difference between the j-th training predicted temperature and the j-th training measured temperature is minimized, to obtain the relationship model of the j-th temperature detection point among the at least one temperature detection points.
[0028] Compared with the relationship model obtained by solving through formulas, the relationship model obtained through training can accurately reflect the relationship between the power consumption information and the predicted temperature.
[0029] In combination with the first aspect, in some possible implementation manners, the relationship model of each first temperature detection point is used to represent the influence magnitude of the power consumption of each subsystem on the predicted temperature of the first temperature detection point.
[0030] Adjusting the power consumption of the subsystem according to the influence magnitude of the power consumption of each subsystem on the predicted temperature of the temperature detection point, so that the adjustment of the power consumption is more accurate. The influence magnitude of the power consumption of each subsystem on the predicted temperature of the temperature detection point can be represented in the form of a weight. The weight can be represented as the coefficient of the power consumption of each subsystem in the relationship model of the temperature detection point.
[0031] In a second aspect, a control device for a chip is provided, including 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 determination module is configured to determine first power consumption information by using the relationship model of each first temperature detection point. 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 enables the first predicted temperature determined by using the relationship model of each first temperature detection point to be less than or equal to the preset temperature threshold of the first temperature detection point. The control module is configured to control the chip to operate according to the first power consumption information.
[0032] In combination with the second aspect, in some possible manners, the at least one subsystem includes a plurality of subsystems, and the power consumption of each subsystem indicated by the first power consumption information satisfies a first association relationship.
[0033] In combination with the second aspect, in some possible ways, the control device further includes an acquisition module, where the acquisition module is configured to acquire the current frequency information of the chip, and the current frequency information is used to indicate the current operating frequencies of multiple subsystems of the chip. The 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 and the frequency of the subsystem satisfy a second association relationship.
[0034] In combination with the second aspect, in some possible ways, 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 temperature thresholds of each temperature detection point are equal. The at least one first temperature detection point is the at least one temperature detection point with the highest temperature among the plurality of temperature detection points.
[0035] It should be understood that in some embodiments, there is only one first temperature detection point on the chip.
[0036] In combination with the second aspect, in some possible ways, the control device further includes an acquisition module, where the acquisition module is configured to acquire second power consumption information, and the second power consumption information is used to indicate the current power consumption of each subsystem. The control device further includes a detection module, where the detection module is configured to detect the chip to obtain the actual temperature of the i-th first temperature detection point among the at least one first temperature detection point, and i is a positive integer. The determination 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, where the adjustment module is 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 the third predicted temperature determined according to the adjusted relationship model of the i-th first temperature detection point and the second power consumption information is equal to the actual temperature. The determination module is 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 is such that the first predicted temperature determined by using the adjusted 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.
[0037] In combination with the second aspect, in some possible ways, the second power consumption information is used to indicate a third correlation relationship between the power consumption and time of each of the subsystems in a preset time period 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. The third power consumption information includes the average power consumption of each of the subsystems in the window time period corresponding to the subsystem before the current moment, and 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.
[0038] In combination with the second aspect, in some possible ways, 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 correlation relationship.
[0039] In combination with the second aspect, in some possible ways, the adjustment module is used 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.
[0040] In combination with the second aspect, in some possible ways, the control device further includes an update module. The update module is used to update the trigger count when the difference is less than or equal to the preset difference threshold. The trigger count is used to indicate the number of times the difference is less than or equal to the preset difference threshold within a preset time length. The adjustment module is used to adjust the relationship model of the i-th first temperature detection point according to the difference when the trigger count is less than or equal to a preset count.
[0041] In combination with the second aspect, in some possible ways, 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 further includes an acquisition module and a training module. The acquisition module is used to acquire training power consumption information and the j-th training measured temperature. The training power consumption information is used to indicate the power consumption of the at least one subsystem, and the j-th training measured temperature is used to indicate the temperature of the j-th temperature detection point among the at least one temperature detection points when the chip operates according to the training power consumption information, where j is a positive integer. The training module is used to input the training power consumption information into the original relationship model to obtain the j-th training predicted temperature. The training module is further used to adjust the parameters of the original relationship model according to the j-th training predicted temperature and the j-th training measured temperature, so that the difference between the j-th training predicted temperature and the j-th training measured temperature is minimized, to obtain the relationship model of the j-th temperature detection point.
[0042] In combination with the second aspect, in some possible ways, the relationship model of each first temperature detection point is used to represent the magnitude of the influence of the power consumption of each subsystem on the predicted temperature of the first temperature detection point.
[0043] In a third aspect, a control device for a chip is provided, 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. When the program stored in the memory is executed, the processor is configured to: use the relationship model of each first temperature detection point to determine first power consumption information, where 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 enables the first predicted temperature determined using the relationship model of each first temperature detection point to be less than or equal to the preset temperature threshold of the first temperature detection point; control the chip to operate according to the first power consumption information.
[0044] In combination with the third aspect, in some possible ways, the at least one subsystem includes a plurality of subsystems, and the power consumption of each subsystem indicated by the first power consumption information satisfies a first association relationship.
[0045] In combination with the third aspect, in some possible ways, the processor is further configured to: obtain the current frequency information of the chip, where the current frequency information is used to indicate the current operating frequencies of the 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, and the power consumption of each subsystem and the frequency of the subsystem satisfy a second association relationship.
[0046] In combination with the third aspect, in some possible ways, 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, the preset temperature threshold of each temperature detection point is equal, and the at least one first temperature detection point is at least one of the temperature detection points with the highest temperature among the plurality of temperature detection points.
[0047] In combination with the third aspect, in some possible ways, 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 ith first temperature detection point among the at least one first temperature detection points, where i is a positive integer. The processor is further configured to: determine a second predicted temperature of the ith first temperature detection point according to the relationship model of the ith first temperature detection point and the second power consumption information. The processor is further configured to: adjust the relationship model of the ith first temperature detection point according to the difference between the second predicted temperature and the actual temperature, so that the third predicted temperature determined according to the adjusted relationship model of the ith first temperature detection point and the second power consumption information is equal to the actual temperature. Determine the first power consumption information according to the adjusted relationship model of the ith first temperature detection point, where the first power consumption information enables the first predicted temperature determined by using the adjusted relationship model of the ith first temperature detection point to be less than or equal to the preset temperature threshold of the ith first temperature detection point.
[0048] In combination with the third aspect, in some possible ways, the second power consumption information is further used to indicate a third correlation relationship between the power consumption of each of the subsystems and time in a preset time period before the current moment. The relationship model of the ith 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 the average power consumption of each of the subsystems in the corresponding window time period of the subsystem before the current moment, and the preset time period includes the window time period. The relationship model of the ith first temperature detection point is further used to determine the second predicted temperature according to the third power consumption information.
[0049] In combination with the third aspect, in some possible ways, the relationship model of the ith first temperature detection point is used to determine the corresponding window time period of each of the subsystems according to the third correlation relationship.
[0050] In combination with the third aspect, in some possible ways, the processor is further configured to: when the difference is less than or equal to a preset difference threshold, adjust the relationship model of the ith first temperature detection point according to the difference.
[0051] In combination with the third aspect, in some possible ways, the processor is further configured to: when the difference is less than or equal to the preset difference threshold, update the trigger count, where the trigger count is used to indicate the number of times the difference is less than or equal to the preset difference threshold within a preset time length. The processor is further configured to: when the trigger count is less than or equal to a preset number, adjust the relationship model of the ith first temperature detection point according to the difference.
[0052] In combination with the third aspect, in some possible ways, 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 the j-th training measured 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 measured temperature is used to indicate the temperature of the j-th temperature detection point among the at least one temperature detection points when the chip operates according to the training power consumption information, and j is a positive integer. Input the training power consumption information into the original relationship 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 j-th training predicted temperature and the j-th training measured temperature, so that the difference between the j-th training predicted temperature and the j-th training measured temperature is minimized, to obtain the relationship model of the j-th temperature detection point.
[0053] In combination with the third aspect, in some possible ways, the relationship model of each first temperature detection point is used to represent the influence magnitude of the power consumption of each subsystem on the predicted temperature of the first temperature detection point.
[0054] Fourth aspect, an electronic device is provided, which includes a chip and the control device of the chip according to the second aspect or the third aspect.
[0055] Fifth aspect, a computer program storage medium is provided, characterized in that the computer program storage medium has program instructions, and when the program instructions are executed by a processor, the processor is caused to execute the control method of the chip described above.
[0056] Sixth aspect, a chip system is provided, characterized in that the chip system includes at least one processor, and when program instructions are executed in the at least one processor, the at least one processor is caused to execute the control method of the chip described above. Description of the Drawings
[0057] Figure 1 is a schematic structural diagram of a chip.
[0058] Figure 2 is a schematic flowchart of a control method for a chip provided by an embodiment of the present application.
[0059] Figure 3 is a schematic flowchart of a relationship model establishment method provided by an embodiment of the present application.
[0060] Figure 4 is a schematic flowchart of another control method for a chip provided by an embodiment of the present application.
[0061] Figure 5 is a schematic structural diagram of a chip provided by an embodiment of the present application.
[0062] Figure 6 It is a schematic structural diagram of a control device provided by an embodiment of the present application.
[0063] Figure 7 It is a schematic structural diagram of another control device provided by an embodiment of the present application. Detailed implementation manners
[0064] Next, the technical solutions in the present application will be described with reference to the accompanying drawings.
[0065] The main factors restricting the performance and user experience of electronic devices such as smart phones.
[0066] 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), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0067] The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.
[0068] The NPU is a neural-network (NN) computing processor. By referring to the biological neural network structure, for example, referring to the transmission mode between human brain neurons, it can quickly process the input information and can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the electronic device 100 can be realized.
[0069] The system on a chip (SOC) integrates multiple processors. The absolute performance of each component such as the CPU, GPU, NPU, etc. in the SOC has an important impact on the performance of the electronic device in terms of how to maximize the performance of each component in the SOC under the constraint of the overall machine heat dissipation.
[0070] The system on a chip can also be called a processor chip. The power consumption of each subsystem in the chip will affect the temperature of the chip.
[0071] 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 the temperature of each temperature detection point is caused by the change in the power consumption of the surrounding subsystems. The temperature of the chip is positively correlated with the power consumption of each subsystem. When the power consumption of the subsystem increases, the temperature of the chip rises. When the power consumption of the subsystem decreases, the temperature of the chip drops.
[0072] The power consumption of the subsystem includes static power consumption and dynamic power consumption. Both the static power consumption and the dynamic power consumption are related to the manufacturing process of the chip, the operating voltage and temperature of the subsystem, etc. The dynamic power consumption is also affected by the operating frequency. The higher the operating frequency, the greater the dynamic power consumption.
[0073] Excessively high chip temperature may cause chip damage. To avoid excessively high chip temperature, a safety temperature can be set for each temperature detection point to control the chip temperature below the safety temperature. The safety temperatures of multiple temperature detection points can be the same or different.
[0074] The higher the frequency of the subsystem, the stronger the processing ability of the subsystem. An unreasonable temperature adjustment scheme will affect the performance of the chip.
[0075] Figure 1 It is a schematic structural diagram of a SOC.
[0076] The SOC includes multiple subsystems. Each temperature sensor is used to detect the temperature of a subsystem.
[0077] A method for adjusting the power consumption of a chip. Through the dynamic voltage and frequency scaling (DVFS) technology, when the detected temperature of a certain temperature sensor reaches the first preset temperature, the frequency of the subsystem corresponding to the temperature sensor is reduced to 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. Thus, the temperature of each area of the SOC is adjusted.
[0078] If the time interval for the temperature sensor to detect the temperature is too large, it is easy to generate temperature overshoot, resulting in the subsystem temperature exceeding the safety value and the temperature control failing. If the time interval for temperature detection is too small, it occupies more resources of the processor, and frequent adjustment of the subsystem frequency will also cause performance loss.
[0079] Each subsystem adjusts its frequency according to its own temperature, which may affect the cooperation between subsystems, resulting in waste of subsystem performance and affecting the overall performance of the SOC.
[0080] Another method for power consumption adjustment of a chip calculates the system power consumption margin based on the difference between the temperature detected at a temperature detection point and the target control temperature, or the difference between the maximum temperature detected at multiple temperature detection points and the target control temperature. The obtained system power consumption margin is then distributed to each subsystem according to the current frequency of each subsystem. The sum of the power consumptions allocated to each subsystem is equal to the system power consumption margin. Finally, for each subsystem, according to the power consumption - frequency comparison table, the frequency increase amount of the subsystem is determined, so as to achieve the purpose of system temperature control.
[0081] The proportion-integral-differential coefficient (PID) algorithm can be used to adjust the temperature of the system. The system power consumption margin Pb can be expressed as: Pb = Kp(Tset - T)+tdp, where Kp is a preset coefficient, Tset is the target control temperature, T is the maximum temperature detected at multiple temperature detection points, and tdp is the maximum heat dissipation power of the chip. To avoid a sudden increase in the power consumption of each subsystem, which may lead to too high a chip temperature, the target control temperature Tset can be slightly lower than the safe operating temperature of the chip.
[0082] On the one hand, the power consumptions of different subsystems contribute differently to the same temperature sensor. That is to say, the magnitudes of the impacts of each subsystem on the temperature of the temperature detection point corresponding to the maximum temperature are different. When performing power consumption distribution, distributing the system power consumption margin Pb to each subsystem so that the sum of the power consumption increase amounts of each subsystem is the system power consumption margin Pb will cause inaccurate distribution and waste of the chip's performance.
[0083] In addition, under different working conditions, the power consumptions of the subsystems vary greatly. When the power consumption of a subsystem is large, more heat is generated and the temperature of the area where the subsystem is located rises rapidly. When the power consumption of a subsystem is small, less heat is generated and the temperature of the area where the subsystem is located rises slowly or the temperature decreases. Since Kp is a preset coefficient, when (Tset - T) is the same value, the magnitude of the power consumption of the subsystem affects the rate of temperature rise.
[0084] If the value of the preset coefficient Kp is small, there will be a waste of the chip's performance.
[0085] If the value of the preset coefficient Kp is large, when the time interval for the temperature sensor to detect temperature is too large, it is easy to generate temperature overshoot, resulting in the temperature of one or more temperature detection points exceeding the safe operating temperature of the chip and the temperature control failing; when the time interval for temperature detection is too small, it occupies more resources of the processor, and the frequent adjustment of the subsystem frequency will also cause performance losses.
[0086] The method for adjusting the power consumption of the above chip passively adjusts the power consumption of the subsystems in the chip according to the difference between the detected temperature and the target temperature. When the detection frequency is low, in order to ensure that the temperature of the chip does not exceed the safe operating temperature, the performance of the chip will be low.
[0087] To solve the above problems, the embodiments of the present application provide a method for adjusting the temperature of a chip, which can improve the performance of the chip while avoiding frequent temperature detection of the temperature detection points, thereby improving the system performance.
[0088] The control method of the chip provided by the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0089] Figure 2 It is a schematic flowchart of a control method of a chip provided by the embodiments of the present application. The embodiments of the present application adjust the power consumption of each subsystem in the chip by predicting the temperature of the temperature detection points in the chip.
[0090] The chip includes at least one subsystem. At least one temperature detection point is provided on the chip.
[0091] In a preferred solution, at least one temperature detection point can be set in the area where each subsystem in the chip is located. Since heat is generated when each subsystem operates, 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.
[0092] Before step S210, 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. The power consumption information is used to represent the power consumption of each subsystem.
[0093] The power consumption of each subsystem can be independently controlled.
[0094] The functions of each subsystem can be independent of each other. For example, a CPU, a GPU, an NPU, etc. can be integrated on a single chip and serve as separate subsystems respectively. The functions of the subsystems can also have certain correlations. For example, a region in the CPU whose power consumption can be independently controlled can be regarded as a subsystem.
[0095] The relationship model of the temperature detection point can be used only to represent the relationship between the power consumption information and the predicted temperature of this temperature detection point. The relationship model of a temperature detection point may not include parameters related to time. That is to say, the relationship model of the temperature detection point can be understood as the relationship model under the condition that the power consumption of each subsystem is stable. Namely, the relationship model can represent the relationship between the power consumption information and the predicted temperature when the power consumption of multiple subsystems remains basically unchanged.
[0096] Alternatively, the relationship model of the temperature detection point can represent the relationship between the power consumption information, 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 time length between the current moment and the next moment can be a preset value. By inputting the power consumption information and the temperature of the temperature detection point at the current moment into the relationship model, the predicted temperature of the temperature detection point at the next moment can be obtained. According to the relationship model of the temperature detection point, dynamic temperature prediction can be performed when the power consumption of each subsystem is unstable.
[0097] The relationship model of the temperature detection point representing the relationship between the power consumption information and the predicted temperature under the condition of stable system frequency can reduce the complexity of the relationship model.
[0098] The relationship model of the temperature detection point can be obtained from other electronic devices. It can also be established by the electronic device that executes step S210 to step S220.
[0099] The relationship model of the temperature detection point can be used to represent the magnitude of the influence of the power consumption of each subsystem on the predicted temperature of this temperature detection point.
[0100] 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 this temperature detection point. The magnitude of the influence of the power consumption of each subsystem on the predicted temperature can be represented by weights. The weights can be expressed as the coefficients of each subsystem in the relationship model.
[0101] The relationship model of the temperature detection point can be obtained through training or by solving equations. Compared with the method of solving the parameters in the equation, determining the relationship model of the temperature detection point through training can make the relationship model of the temperature detection point more accurate.
[0102] For the establishment process of the relationship model of the temperature detection point, reference can be made to Figure 3 the description.
[0103] After obtaining the relationship model of the temperature detection points, steps S210 to S220 can be performed.
[0104] In step S210, using the relationship model of each first temperature detection point, the first power consumption information is determined.
[0105] Among them, the first power consumption information enables the first predicted temperature determined by using the relationship model of each first temperature detection point to be less than or equal to the preset temperature threshold of the first temperature detection point.
[0106] Inputting the first power consumption information into the relationship model of the first temperature detection point, the first predicted temperature of this temperature detection point can be obtained. For each first temperature detection point, the first predicted temperature of this temperature detection point is less than or equal to the preset temperature threshold of this temperature detection point.
[0107] The preset temperature threshold of the first temperature detection point can be less than or equal to the maximum temperature of the first temperature detection point when the chip is operating safely. The preset temperature threshold of the first temperature detection point can be referred to as the rated temperature of the first temperature detection point.
[0108] A certain temperature margin can be set for the safe operation of the chip, that is, the preset temperature threshold is slightly less than the maximum temperature of the first temperature detection point when the chip is operating safely, to ensure the safe operation of the chip.
[0109] When the preset temperature threshold is equal to the maximum temperature of the first temperature detection point when the chip is operating safely, the chip performance can be maximized.
[0110] 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 can be used as the first temperature detection point.
[0111] When the chip includes multiple temperature detection points, if each temperature detection point in the multiple temperature detection points is used as the first temperature detection point, the first power consumption information enables the first predicted temperature determined by using the relationship model of each temperature detection point to be less than or equal to the preset temperature threshold of the temperature detection point.
[0112] Taking into account the temperature conditions of each temperature detection point and adjusting the power consumption of each subsystem can maximize the performance of the chip.
[0113] When the chip includes multiple temperature detection points, only some of the temperature detection points can also be used as the first temperature detection point.
[0114] Generally, the preset temperature thresholds of each temperature detection point are equal. Among the temperature detection points with the highest temperature, it is easiest to reach the preset temperature threshold of the detection point. One or more temperature detection points with the highest temperature can be used as the first temperature detection points, or the temperature detection points with temperatures exceeding the preset value can be used as the first temperature detection points. For example, one temperature detection point with the highest temperature can be used as the first temperature detection point.
[0115] Using some temperature detection points as the first temperature detection points can reduce the difficulty of determining the first power consumption information and reduce the calculation amount.
[0116] When the chip includes only one subsystem, the first power consumption information can be determined using the relationship model of the first temperature detection point.
[0117] When the chip includes multiple subsystems, 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. For example, the first association relationship can be the ratio between the power consumptions of each subsystem, the first association relationship can also be the ratio between the frequencies of each subsystem, and the first association relationship can also include the power consumption values of some subsystems.
[0118] It should be understood that the power consumption of each subsystem and the frequency of that subsystem satisfy a second association relationship. The power consumption of a subsystem is positively correlated with the voltage of the subsystem, and the power consumption of a subsystem is positively correlated with the frequency of the subsystem. For a subsystem, the operating voltage generally remains unchanged. At this time, the power consumption of the subsystem and the frequency of the subsystem are in one-to-one correspondence. Adjusting the power consumption of each subsystem of the chip can also be understood as adjusting the frequencies of each subsystem.
[0119] When there are multiple subsystems in the chip, before step S210, the first association relationship can be obtained.
[0120] The first association relationship is used to indicate the relationship between the power consumptions of the various subsystems indicated by the first power consumption information.
[0121] The first association relationship can be preset or determined according to the operating conditions of the current chip.
[0122] Before performing step S210, the current frequency information of the chip can be obtained. The current frequency information is used to indicate the current operating frequencies of the multiple subsystems of the chip.
[0123] The first association relationship can 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.
[0124] It should be understood that equal can also be approximately equal. The first power consumption information can make the ratio between the operating frequencies of the various subsystems remain basically unchanged.
[0125] The current operating frequency of each subsystem can be the operating frequency of the subsystem at the current moment. The ratio of the frequencies of the respective subsystems may be determined according to the requirements of the running program. Compared with other power consumption adjustment methods, during the process of adjusting the frequencies of the respective subsystems according to temperature, keeping the ratio between the operating frequencies of the respective subsystems unchanged can reduce the impact on chip performance.
[0126] Specifically, in a possible implementation manner, by using the relationship model of each first temperature detection point, the power consumption information corresponding to the first temperature detection point can be determined according to the preset temperature threshold of each first temperature detection point. The power consumption information corresponding to each first temperature detection point enables the first predicted temperature of the first temperature detection point to be equal to the preset temperature threshold of the first temperature detection point.
[0127] Among the power consumption information corresponding to multiple first temperature detection points, determine the first power consumption information.
[0128] For example, when the first power consumption information satisfies the first association relationship, among the power consumption information corresponding to multiple first temperature detection points, the power consumption information indicating the minimum power consumption of each subsystem can be the first power consumption information.
[0129] In another possible implementation manner, since 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, the predicted temperature of each first temperature detection point can be calculated according to the current frequency information.
[0130] If the predicted temperature of each first temperature detection point is less than the preset temperature threshold of the first temperature detection point, in the process of determining the first power consumption information, steps S211a to S213 can be performed.
[0131] In step S211a, increase the power consumption of each subsystem. The increased power consumption of each subsystem makes the ratio between the frequencies of the respective subsystems unchanged.
[0132] In step S212, input the increased power consumption of each subsystem into the relationship model of each first temperature detection point to determine the predicted temperature of each first temperature detection point corresponding to the increased power consumption of each subsystem.
[0133] In step S213, determine the magnitude relationship between the predicted temperature of each first temperature detection point and the preset temperature threshold of the temperature detection point.
[0134] If the predicted temperature at each first temperature detection point is less than the preset temperature threshold of the first temperature detection point, steps S211 to S213 are executed again. If there is at least one first temperature detection point whose predicted temperature is greater than or equal to the preset temperature threshold of the first temperature detection point, the increase in the power consumption of each subsystem is stopped.
[0135] When the predicted temperature at each first temperature detection point is not greater than the preset temperature threshold 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 of the first temperature detection point, the power consumption of each subsystem input to the relationship model of each first temperature detection point during step S212 this time is used as the power consumption indicated by the first power consumption information.
[0136] When there is at least one first temperature detection point whose predicted temperature is greater than the preset temperature threshold of the first temperature detection point, the power consumption of each subsystem input to the relationship model of each first temperature detection point during the previous step S212 is used as the power consumption indicated by the first power consumption information.
[0137] Each time step S211 is performed, the increase in the power consumption of each subsystem can make the increase amount of the frequency of each subsystem equal or unequal each time.
[0138] If the predicted temperature at each first temperature detection point is greater than the preset temperature threshold of the first temperature detection point, step S211b is performed to reduce the power consumption of each subsystem. Then steps S212 and S213 are performed.
[0139] When there is at least one first temperature detection point whose predicted temperature is greater than the preset temperature threshold of the first temperature detection point, steps S211b to S213 are executed again.
[0140] When the predicted temperature at each first temperature detection point is less than or equal to the preset temperature threshold of the first temperature detection point, the power consumption of each subsystem input to the relationship model of each first temperature detection point during S212 this time is used as the power consumption indicated by the first power consumption information.
[0141] Of course, in some cases, the ratio between the operating frequencies of each subsystem can also be adjusted, and the embodiments of the present application do not limit this.
[0142] In step S220, control the chip to operate according to the first power consumption information.
[0143] The chip can be controlled to operate according to the first power consumption information to achieve optimal performance. Or according to other requirements of the program or system, the frequency of the subsystems of the chip can be controlled so that the power consumption of each subsystem is less than the power consumption of the subsystem indicated by the first power consumption information.
[0144] Through steps S210 to S220, using the relational model of each first temperature detection point, the first power consumption information is determined. The first power consumption information enables the first predicted temperature of each first temperature detection point to be less than the preset temperature threshold of this temperature detection point. 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 the need to frequently detect the temperature of the temperature detection point.
[0145] Furthermore, the change of the ambient temperature will affect the heat dissipation ability of the chip at any time. Considering the influence of the change of the ambient temperature on the relational model of the temperature detection point can make the temperature adjustment of the chip more accurate.
[0146] It should be understood that the temperature model of all or part of the temperature detection points set on the chip can be adjusted.
[0147] The second power consumption information can be obtained. The second power consumption information is used to indicate the current power consumption of each subsystem.
[0148] The second power consumption information can be detected. Or the first power consumption information determined at the previous moment can be used as the second power consumption information at the current moment.
[0149] The actual temperature of the temperature detection point at the current moment can be detected.
[0150] The second power consumption information can be input into the relational model of the temperature detection point to determine the second predicted temperature of the temperature detection point.
[0151] Calculate the difference between the second predicted temperature and the actual temperature, and adjust the relational model of the temperature detection point so that the third predicted temperature determined according to the adjusted relational model of the temperature detection point and the second power consumption information is equal to the actual temperature.
[0152] If the temperature detection point corresponding to the adjusted relational model is the first temperature detection point, when performing step S210, the adjusted relational model of the temperature detection point can be used to determine the first power consumption information. The first power consumption information enables the first predicted temperature determined by using the adjusted relational model of this temperature detection point to be less than or equal to the preset temperature threshold of this temperature detection point.
[0153] Compare the second predicted temperature with the actual temperature, and feedback the difference between the two to the relational model of the temperature detection point. Thus, according to the slowly changing ambient temperature, the relational model of the temperature detection point can be adjusted and calibrated. When adjusting the power consumption of the chip subsequently, the power consumption of the chip subsystem is adjusted according to the adjusted relational model, thereby improving the accuracy of the power consumption adjustment.
[0154] In addition, the temperature change is slow and relatively lagging compared to the change in power consumption. When the power consumption of a certain subsystem suddenly increases according to the needs of data processing, feeding back the difference between the second predicted temperature and the actual temperature to the relationship model of the temperature detection point can enable the relationship model of the temperature detection point to adapt to the stepwise change in power consumption, and more accurately reflect the relationship between the power consumption information and the predicted temperature in the case of a stepwise change in power consumption, making the temperature prediction more accurate.
[0155] Therefore, adjusting the relationship model of the temperature detection point according to the difference between the second predicted temperature and the actual temperature can make the relationship model more accurate according to the adjusted temperature detection point.
[0156] Between the previous moment and the current moment, according to the requirements of the running program and so on for each subsystem of the chip, the power consumption of each subsystem of the chip may change. Therefore, using the first power consumption information determined at the previous moment as the second power consumption information at the current moment may not be accurate.
[0157] The power consumption of each subsystem of the chip can be detected to obtain the second power consumption information.
[0158] By detecting and obtaining the second power consumption information, the second predicted temperature can be made more in line with the operating conditions of the chip, thereby making the adjustment of the relationship model of the temperature detection point more accurate.
[0159] According to the difference between the actual temperature and the second predicted temperature, the relationship model is adjusted, so that the relationship model can adapt to the change of the ambient temperature and can respond more timely to the change of power consumption when there is a stepwise change in the power consumption of one or more subsystems.
[0160] The second power consumption information can be used to indicate the power consumption of the subsystem at the current moment, or can be used to indicate the average power consumption of the subsystem within a preset time period before the current moment, or can also be used to indicate the third correlation relationship between the power consumption of the subsystem within a preset time period before the current moment and time.
[0161] The third correlation relationship can include the power consumption values at each time point within the preset time period, and can also include one or more of the power consumption change amplitude, power consumption change frequency, etc.
[0162] The preset time period before the current moment can be adjacent to the current moment or can have a short time interval with the current moment.
[0163] Specifically, when the second power consumption information is used to indicate the third correlation relationship, the relationship model of the temperature detection point can determine the third power consumption information according to the second power consumption information.
[0164] The third power consumption information may include the average power consumption of each of the subsystems in the window time period corresponding to the subsystem before the current moment. The preset time period includes the window time period.
[0165] The window time period may be the same as the preset time period. Alternatively, the window time period may only include a part of the preset time period.
[0166] Due to the hysteresis of temperature change, based on the average power consumption within the window time period, using the relationship model to determine the second predicted temperature and adjusting the relationship model of the temperature detection point according to the second predicted temperature can improve the accuracy of the relationship model of the temperature detection point.
[0167] In some embodiments, the relationship model may determine the window time period according to the second power consumption information, thereby further improving the accuracy of the relationship model of the temperature detection point.
[0168] The relationship model of the temperature detection point 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 change amplitude, change frequency, etc. of the power consumption in the second power consumption information may be proportional to the length of the window time period. The window determination model may determine the length of the window time period according to the change amplitude, change frequency, etc. of the power consumption in the second power consumption information, and use the time period of this length before the current moment as the window time period.
[0169] The window determination model may also be expressed as the corresponding relationship between the change amplitude range of the power consumption in the second power consumption information and the length of the window time period. According to the amplitude range where the change amplitude of the power consumption in the second power consumption information is located, the length of the window time period corresponding to this amplitude range can be determined. The time period of this length before the current moment may be used as the window time period.
[0170] The window determination model may also be a neural network model. The neural network may be composed of neural units. The neural unit may refer to an operation unit with x s and the intercept 1 as inputs. The output of this operation unit may be expressed as:
[0171]
[0172] where s = 1, 2,... n, n is a natural number greater than 1, and W s is x sThe weight of, b is the bias of the neuron. f is the activation function of the neuron, which is used to introduce non - linear characteristics into the neural network to convert the input signal in the neuron into an output signal. The output signal of this activation function can be used as the input of the next convolutional layer. The activation function can be the sigmoid function. A neural network is a network formed by connecting multiple such single neurons together, that is, the output of one neuron can be the input of another neuron. The input of each neuron can be connected to the local receptive field of the previous layer to extract the features of the local receptive field, and the local receptive field can be a region composed of several neurons.
[0173] The window determination model can be trained. For the specific training process of the window determination model, reference can be made to Figure 3 the description.
[0174] The window determination model can 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, it can use the current moment as the end moment of the window time period and change the length of the window time period to determine the window time period. Or, the window determination model can also change the start moment and the end moment of the window time period. The embodiments of the present application do not limit this.
[0175] Exemplarily, the relationship model can 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 adjustment of the relationship model is no longer performed.
[0176] The change of the ambient temperature is slow and the change range is small, which has little impact on the relationship model. Considering the impact of the ambient temperature change on the relationship model, by setting the preset difference threshold, the accuracy of the relationship model can be improved.
[0177] The change of power consumption is random. By setting the preset difference threshold, over - correction of the relationship model can be avoided, and the stability and reliability of the relationship model can be improved.
[0178] In addition, the adjustment of the relationship model can be stopped when the positive - negative of the difference between the first predicted temperature and the actual temperature changes continuously.
[0179] Exemplarily, the trigger times can be recorded. The trigger times are 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 a preset time length.
[0180] The trigger times can be updated when the difference is less than or equal to the preset difference threshold.
[0181] It is possible to determine the magnitude relationship between the number of trigger times and the preset number of times.
[0182] When the number of trigger times is less than or equal to the preset number of times, adjust the relationship model of the temperature detection points. Conversely, when the number of trigger times is greater than the preset number of times, stop adjusting the relationship model of the temperature detection points.
[0183] In some cases, according to the needs of data processing, the power consumption of the subsystem changes frequently. Since the temperature change is slow and relatively lagging compared to the change in power consumption. When the power consumption of the subsystem changes repeatedly in an irregular manner of increasing and decreasing, the adjustment according to the relationship model cannot follow the change in the power consumption of the subsystem in a timely manner, and the temperature of each temperature detection point in the chip cannot be accurately predicted. The adjustment of the relationship model can be stopped. The power consumption of the subsystem can be adjusted according to the relationship model obtained before step S210.
[0184] Figure 3 It is a schematic flowchart of a method for establishing a relationship model of temperature detection points provided by an embodiment of the present application.
[0185] In step S410, control the chip to operate.
[0186] For example, the chip can be a processor chip in an electronic device such as a mobile phone or a computer. One or more programs can be controlled according to the user's needs. The programs can include, for example, application programs commonly used by the user.
[0187] In step S420, obtain multiple sets of training data. Each set of training data includes training power consumption information and training measured temperature.
[0188] The training power consumption information is used to indicate the power consumption of each subsystem in the chip.
[0189] The training measured temperature can indicate the temperature of the chip when the chip operates according to the training power consumption information.
[0190] During the operation of the chip, the training power consumption information and the training measured temperature can be determined. For example, the training power consumption information and the training measured temperature can be recorded at fixed time intervals.
[0191] The training measured temperature can be the temperature of the temperature detection point at the moment when the training power consumption information is recorded.
[0192] The embodiment of the present application does not limit the manner of obtaining the training power consumption information.
[0193] The frequency of the chip subsystem can be obtained. According to the frequency of the subsystem and the correlation between the frequency and the power consumption, the power consumption of the subsystem can be determined.
[0194] It can also receive the power consumption information sent by the detection device. The detection device can be used to detect the power consumption of the subsystem. The detection device can be a hardware device.
[0195] The training power consumption information can indicate the instantaneous values of the power consumption of each subsystem at the moment when the training power consumption information is recorded. The power consumption xi of the ith subsystem i can be the power consumption of the ith subsystem at the moment when the actual temperature at the detection point is detected.
[0196] The training power consumption information can also indicate the average values of the power consumption of each subsystem within a certain period of time before the moment when the power consumption information is recorded. The power consumption xi of the ith subsystem i can also be the average power consumption of the ith subsystem within a period of time before the moment when the actual temperature at the detection point is detected.
[0197] The training power consumption information can also be used to indicate the correlation between the power consumption of each subsystem and time within a preset time length before the moment when the power consumption information is recorded.
[0198] Due to the hysteresis of temperature change, a sudden increase or decrease in power consumption within a very short time length will hardly affect the temperature. Therefore, indicating the average values of the power consumption of each subsystem by the training power consumption information can improve the accuracy of the established relationship model.
[0199] For the jth temperature detection point, the training measured temperature can be expressed as T j1 .
[0200] In step S430, a relationship model is established according to multiple sets of training data.
[0201] Taking the jth temperature detection point as an example for illustration.
[0202] According to the training power consumption information and the training measured temperature T j1 , a relationship model for the jth detection point is established. For example, the predicted temperature T j of the jth detection point can be expressed as:
[0203] T j = [a 0j , a 1j , …, a nj × [x0, x1, …, x n T + c j
[0204] where n is the number of subsystems in the chip, x0, x1, …, x n are the power consumptions of the n subsystems respectively, a 0j , a 1j , …, a njare x0, x1, …, x n The coefficients of are all constants, and c j is a constant.
[0205] At each time node, the power consumption of each subsystem indicated by the training power consumption information and the training measurement temperature T corresponding to the training power consumption information j1 can be substituted into the expression of the predicted temperature T j to solve for the parameters a 0j , a 1j , …, a nj and c j .
[0206] Alternatively, the relationship model of each temperature detection point can also be determined by machine learning.
[0207] Specifically, for the j-th temperature detection point, the original relationship model can be obtained. The original relationship model can be a linear model or a neural network model. For each set of training data, steps S431 to S432 can be executed.
[0208] In step S431, the training power consumption information can be input into the original relationship model to obtain the training predicted temperature at that moment.
[0209] In step S432, according to the error between the training predicted temperature and the training measurement temperature T corresponding to the training predicted temperature j1 , the parameters of the original relationship model are adjusted to minimize the error.
[0210] In step S433, using the adjusted parameter values, return to continue executing steps S431 and S432 until the obtained error gradually converges, that is, the relationship model of the j-th temperature detection point after training is obtained.
[0211] When the training power consumption information can be used to indicate the change of the power consumption of each subsystem over time within a preset time length, the relationship model of the j-th temperature detection point is used to determine the average power consumption of each subsystem in the window time period corresponding to the subsystem according to the training power consumption information. The preset time period includes the window time period. Then, 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 time period corresponding to the subsystem.
[0212] That is to say, by training the relationship model of the j-th temperature detection point, multiple sets of training data can be obtained, and each set of training data includes training power consumption information and training measurement temperature.
[0213] For each set of training data, input the training power consumption information into the original relationship model to obtain the training predicted temperature, where 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, adjust the parameters of the original relationship model to minimize the difference between the training predicted temperature and the training measured temperature.
[0214] For each set of training data, perform the above steps to obtain the trained relationship model.
[0215] It should be understood that the original relationship model can be a linear model, a correspondence relationship model, or a neural network model, etc. Correspondingly, adjusting the parameters of the original relationship model can be adjusting the parameters in the linear model, the parameters in the correspondence relationship model, or the parameters in the neural network model, etc.
[0216] Through step S410 to step S430, a relationship model of the temperature detection point can be established.
[0217] It should be understood that the device for training the relationship model of the temperature detection point and the device for executing Figure 2 the control method of the chip shown can be the same or different. The device for executing Figure 2 the control method of the chip shown can obtain the trained relationship model before performing step S210.
[0218] When Figure 3 the device for executing Figure 2 the method and the device for executing Figure 2 the method are not the same device, these two devices can communicate so that the device for executing Figure 2 the method can obtain the relationship model of the temperature detection point. Thus, the relationship model of the temperature detection point can be applied in
[0219] Figure 4 is a schematic flowchart of a control method for a chip provided by an embodiment of the present application.
[0220] The chip can be, for example, an SOC, including multiple subsystems. A subsystem can be understood as one or more processors, or it can also be understood as the area where part of the hardware circuit of one or more processors is located. The frequency of each subsystem can be independently controlled.
[0221] If the operating voltage of each subsystem remains unchanged, then the frequency and power consumption of each subsystem correspond one by one.
[0222] Multiple temperature detection points are provided on the chip, and 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 this temperature detection point. Therefore, the relationship model of each temperature detection point can also be understood as being used to represent the relationship between the frequency of each subsystem and the predicted temperature of this temperature detection point.
[0223] Before step S301, a frequency set F0 can be obtained.
[0224] The frequency set F0 includes multiple frequency information. Each frequency information can be used to represent the frequency of a subsystem at time t0. The multiple frequency information in the frequency set F0 corresponds one-to-one with the multiple subsystems of the chip.
[0225] The embodiment of the present application does not limit the acquisition method of the frequency information. The frequency information can be acquired at a fixed period.
[0226] The frequency of each subsystem can be obtained from the hardware device used for frequency statistics.
[0227] The frequency information can be determined according to the correspondence between power consumption and frequency. The correspondence between the power consumption and frequency of each subsystem can be the same or different. The power consumption of each subsystem can be detected.
[0228] By acquiring the power consumption of the subsystem and the correspondence between the power consumption and frequency of this subsystem, the frequency of this subsystem can be determined.
[0229] 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 (PVT).
[0230] The dynamic power consumption and the static power consumption can be acquired separately. The power consumption can be the sum of the dynamic power consumption and the static power consumption. The power consumption of the subsystem can be determined by detecting the dynamic power consumption and the static power consumption.
[0231] The power consumption of the subsystem can be determined by detecting the power supply current or the ground current of the subsystem.
[0232] Before performing step S301, a threshold set T can be obtained a 。
[0233] The threshold set T aIt may include the preset temperature thresholds for each temperature detection point. Multiple temperature detection points may be dispersedly arranged on the chip. For each temperature detection point, the temperature of the detection point can be detected by a temperature sensor. The preset temperature thresholds for each temperature detection point may be equal or unequal. For example, if the preset temperature thresholds for each temperature detection point are equal, the highest safe temperature at which the chip operates normally can be used as the preset temperature threshold for each temperature detection point.
[0234] In step S301, using the relationship model of each temperature detection point, the frequency set F1 is determined. The ratio between each frequency in the frequency set F1 and the frequencies in the frequency set F0 is equal. And the frequency set F1 makes the predicted temperature of each detection point less than or equal to the preset temperature threshold of this temperature detection point in the threshold set T a among them.
[0235] It can be understood that the frequency set F1 is determined according to the relationship model of each temperature detection point, the ratio between each frequency in the frequency set F0, and the threshold set T a determined.
[0236] The predicted temperature of the detection point of at least one temperature detection point is equal to the preset temperature threshold of this temperature detection point. The predicted temperature of each temperature detection point is determined according to the frequency set F1 and the relationship model of this temperature detection point. Equal can also be approximately equal.
[0237] The relationship model of the temperature detection point may not include parameters related to time. That is to say, the relationship model of each temperature detection point can be understood as the relationship model when the power consumption of each subsystem is stable. That is, the relationship model of each temperature detection point can represent the relationship between the power consumption of multiple subsystems and the predicted temperature of the detection point of this temperature detection point when the power consumption of multiple subsystems remains basically unchanged.
[0238] Using the relationship model of a temperature detection point under stable power consumption, according to the power consumption of each subsystem, the temperature of the temperature detection point can be predicted.
[0239] Alternatively, the relationship model of each temperature detection point may also include parameters related to time. The relationship model of each temperature detection point can also dynamically predict the detection point temperature of each temperature detection point when the power consumption of the subsystem is unstable. The relationship model of the temperature detection point can include the power consumption of multiple subsystems, the real-time detection point temperature of this temperature detection point, and the relationship between the predicted temperature of the detection point of this temperature detection point after a preset time length. That is to say, inputting the temperature detection value at the previous moment of the moment t0 of the temperature detection point and the power consumption of multiple subsystems into the relationship model of the temperature detection point, the relationship model of the temperature detection point can predict the temperature of this temperature detection point at the prediction moment t0.
[0240] The relationship model of temperature detection points represents the relationship between the power consumption of multiple subsystems and the predicted temperature of the temperature detection points under the condition of stable system frequency, which can reduce the complexity of the relationship model of temperature detection points. Hereinafter, taking the relationship model representing the relationship between the power consumption of multiple subsystems and the predicted temperature of the temperature detection points under the condition of stable power consumption of the subsystems as an example for description.
[0241] Since the relationship model of temperature detection points is independent of time, the time length between time t0 and time t1 can be a preset value or any value.
[0242] Taking the threshold set T a as the maximum predicted temperature of each temperature detection point, according to the ratio between the frequencies in the frequency set F0 and the relationship model of each temperature detection point, the frequency set F1 can be determined.
[0243] In some embodiments, according to the relationship model of each temperature detection point, taking the preset temperature threshold of the temperature detection point as the predicted temperature, a set of frequency sets for the temperature detection point can be determined. The frequency set includes the frequencies of each subsystem. The ratio between the frequencies of each subsystem in the frequency set is equal to the ratio between the frequencies in the frequency set F0.
[0244] Among the multiple frequency sets corresponding to multiple temperature detection points, since the ratio between the frequencies of each subsystem is equal, for any one subsystem, the frequency set with the minimum frequency value can make the detection point predicted temperature of each temperature detection point not exceed the preset temperature threshold of the temperature detection point. Therefore, the frequency set with the minimum frequency value can be used as the frequency set F1.
[0245] In some other embodiments, multiple frequency sets can be determined according to the ratio between the frequencies of each subsystem indicated by the frequency set F0. The ratio between the frequencies of each subsystem indicated by each frequency set is the same as the ratio indicated by the frequency set F0.
[0246] Using the relationship models of each temperature detection point, a set of predicted temperatures corresponding to the multiple frequency sets is determined. The set of predicted temperatures corresponding to each frequency set is used to indicate the predicted temperatures of each temperature detection point when the chip operates according to the frequency set.
[0247] The multiple sets of predicted temperatures can be respectively expressed as T1+1’, T2+1’, T3+1’, T4+1’, etc. Among the multiple sets of predicted temperatures T1+1’, T2+1’, T3+1’, T4+1’, etc., in at least one set of predicted temperatures that makes the detection point predicted temperature of each detection point not exceed the preset temperature threshold of the temperature detection point, a set of predicted temperatures is determined.
[0248] Since the ratio between the frequencies of each subsystem in each frequency set is equal, among at least one set of predicted temperatures where the predicted temperature at each detection point does not exceed the preset temperature threshold of that temperature detection point, for a certain subsystem, the frequency set with the highest frequency is used as the frequency set F1.
[0249] In the process of determining the frequency set F1, first, based on the frequency set F0 and the relationship model of each temperature detection point, the predicted temperature set T1+1' can be determined. 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 that temperature detection point. When the temperature of each temperature detection point in T1+1' is less than the preset temperature threshold of that temperature detection point, the frequencies of each subsystem are gradually increased to obtain multiple frequency sets and multiple corresponding predicted temperature sets T2+1', T3+1', T4+1', etc. Conversely, when the temperature of each temperature detection point in T1+1' is not all less than the preset temperature threshold of that temperature detection point, the frequencies of each subsystem are gradually decreased to obtain multiple frequency sets and multiple corresponding predicted temperature sets.
[0250] In the process of determining the frequency set F1, methods such as the dichotomy method can also be used to accelerate the search process.
[0251] The relationship model of the temperature detection point can be represented by a function. For example, the predicted temperature T+1' of the jth temperature detection point j The relationship model with each subsystem can be represented by a linear function as:
[0252] T+1′ j =[a 0j ,a 1j ,…,a nj ×[x0,x1,…,x n T +c j
[0253] where n is the number of subsystems in the chip, x0, x1, …, x n are the power consumptions of the n subsystems respectively, a 0j ,a 1j ,…,a nj are the coefficients of x0, x1, …, x n respectively, and a 0j ,a 1j ,…,a nj and c j are constants.
[0254] According to the relationship model of each temperature detection point, the temperature of each temperature detection point of the chip can be actively predicted, so that it is not necessary to frequently detect the temperature of each temperature detection point. Under the condition of occupying less resources, the power consumption (i.e., frequency) of the chip is adjusted, so that the chip operates within the safe operating range and the chip exhibits high performance.
[0255] Compared with the method of passively adjusting the power consumption of each subsystem through temperature detection, through steps S301 to S302, according to the preset temperature threshold of the temperature detection point, using the relationship model, the frequency of the chip operation can be actively determined, realizing adaptive control, avoiding the response lag of temperature control, avoiding the occurrence of underdamping or overdamping conditions, and improving the operating stability of the chip.
[0256] Through the relationship model of the temperature detection point, comprehensively considering the influence of each subsystem on the temperature of each temperature detection point, the temperature control of the chip is made more accurate. For example, the influence of each subsystem on the temperature of each temperature detection point can be represented by a linear function, and the influence of each subsystem is represented by a coefficient.
[0257] After that, step S302 is performed to control the chip to operate according to the frequency set F1.
[0258] The chip can be controlled to operate according to the frequency set F1. Or, according to the functional requirements of each subsystem, each subsystem can be controlled to operate in a state lower than the corresponding frequency in the frequency set F1.
[0259] Through steps S301 to S302, the adjustment of the chip frequency is realized.
[0260] In order to cope with the influence of environmental temperature change on the chip temperature, the relationship model of the temperature detection point can be adjusted according to the difference between the predicted temperature value and the actual temperature value of the temperature detection point. Steps S303 to S305 take the chip operating according to the frequency set F1 between time t0 and time t1 as an example to illustrate the adjustment of the relationship between the power consumption of each subsystem and the predicted temperature of each detection point in the relationship model.
[0261] In 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.
[0262] In 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 of each temperature detection point is calculated.
[0263] The predicted temperature set T+1’ can 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 this temperature detection point in the predicted temperature set T+1’.
[0264] When performing step S301, the predicted temperature set corresponding to the frequency set F1 can be used as the predicted temperature set T+1’ and stored.
[0265] Between time t0 and time t1, the frequencies of each subsystem may change as needed. At time t1, the frequency set F1’ can be obtained. The frequency set F1’ includes the frequencies corresponding to the average power consumption of each subsystem within the window time period before time t1. According to the frequency set F1’ and the relationship model, the predicted temperature set T+1’ can be determined.
[0266] The predicted temperature set T+1’ includes the predicted temperatures of each temperature detection point determined according to the frequency set F1’ and using the relationship model of each temperature detection point.
[0267] 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 each subsystem of the chip.
[0268] After that, according to the predicted temperature set T+1’ and the actual temperature set T+1, the difference between the predicted temperature and the actual temperature of each temperature detection point is calculated.
[0269] In step S305, according to the difference between the predicted temperature and the actual temperature of each temperature detection point, the relationship model of this temperature detection point is adjusted.
[0270] 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 this temperature detection point.
[0271] The predicted temperature T+1′ of the jth temperature detection point j The relationship model with each subsystem can be expressed by a linear function as:
[0272] T+1′ j =[a 0j ,a 1j ,…,a nj ×[x0,x1,…,x n T +c j
[0273] The constant term c in the relationship model of the jth temperature detection point can be j Adjustments are made so that the predicted temperature of the temperature detection point determined according to the relationship model adjusted based on the j-th temperature detection point is equal to the actual temperature of the temperature detection point.
[0274] On the one hand, the change in ambient temperature affects the heat dissipation of the chip. When the ambient temperature changes, there is an error between the predicted temperature determined according to the relationship model of the temperature detection point and the actual temperature of the temperature detection point.
[0275] The difference between the predicted temperature and the actual temperature of each temperature detection point is fed back to the relationship model of the temperature detection point, so as to calibrate the relationship model of the temperature detection point according to the influence of the slowly changing ambient temperature on the relationship model of the temperature detection point.
[0276] On the other hand, the power consumption of each subsystem may be in a changing state. At time t0, each subsystem is controlled to operate according to the frequency set F1. However, within the preset time length between time t0 and time t1, the operating frequencies of each subsystem may be adjusted according to the running program and other situations. For example, changes in the number and types of running programs may cause the frequencies of some subsystems to increase or decrease, thereby changing the power consumption of each subsystem.
[0277] Relative to the change in power consumption, the change in temperature has hysteresis. When the power consumption of a certain subsystem suddenly increases according to the need for data processing, feeding back the difference between the predicted temperature of each temperature detection point and the actual temperature of the detection point at time t1 to the relationship model of the temperature detection point can enable the relationship model of the temperature detection point to adapt to the situation of stepwise change in power consumption more quickly, and more accurately reflect the relationship between the power consumption information of each subsystem and the temperature of the temperature detection point in the case of stepwise change in power consumption, making the temperature prediction more accurate.
[0278] In order to improve the prediction accuracy of the relationship model of the temperature detection point for temperature, according to the difference between the predicted temperature of the temperature detection point and the actual temperature of the detection point at time t1, the constant term c in the relationship model of the temperature detection point j can be adjusted.
[0279] That is to say, the influence of ambient temperature can be considered in the expression of the predicted temperature T+1′ of the j-th temperature detection point. j The influence of ambient temperature can be reflected by the difference between the predicted temperature T+1′ of the j-th temperature detection point j and the actual temperature T+1 j i.e., error j embodied.
[0280] The constant term c in the relationship model of the temperature detection point j can be expressed as
[0281] c j = c j ′ + error j = c j ′ + (T + 1′ j ) - (T + 1 j )
[0282] Wherein, c j ′ is a constant.
[0283] According to the difference between the predicted temperature at the detection point and the actual temperature at the detection point, adjusting the relationship model of the temperature detection point can accelerate convergence and improve the response of the relationship model of the temperature detection point to the power consumption mutation point and the environmental temperature change in the chip.
[0284] When the difference between the first predicted temperature and the actual temperature is less than or equal to a preset difference threshold, the relationship model can be adjusted according to this difference. Conversely, when the difference between the first predicted temperature and the actual temperature is greater than the preset difference threshold, no adjustment is made to the relationship model. The difference being less than or equal to the preset difference threshold can also be understood as the absolute value of the difference being less than or equal to the preset difference threshold.
[0285] The above text combines Figures 1 to 4 to describe the method embodiments of the present application. Next, in combination with Figures 5 to 7 , the device embodiments of the present application are described. It should be understood that the descriptions of the method embodiments and the device embodiments correspond to each other. Therefore, for the parts not described in detail, reference can be made to the previous method embodiments.
[0286] Figure 5 is a schematic structural diagram of a chip provided by an embodiment of the present application.
[0287] The SOC chip includes multiple subsystems such as a CPU, a GPU, an NPU, etc. and multiple temperature detection points. The control device 1000 is used to execute Figure 2 or Figure 4 the method described above. The control device 1000 can also be used to execute Figure 3 the method shown in
[0288] Taking the control device executing Figure 4 the steps described above as an example for illustration.
[0289] 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, completing step S301.
[0290] After the control device 1000 determines the frequency set F1 according to the ratio between the frequencies of each subsystem in the frequency set F0, 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 to operate according to the control frequency f1 of the subsystem.
[0291] The control device 1000 can also perform step S303 to obtain the actual temperature of each temperature detection point.
[0292] After that, the control device 1000 can 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 can perform step S305 to adjust the relationship model of the temperature detection point.
[0293] To improve the accuracy of adjusting the relationship model of the temperature detection point, the temperature of the temperature detection point can be predicted according to the actual power consumption change of each subsystem of the new product. Before performing step S304, the control device 1000 can also obtain the change of the power consumption of each subsystem over time within a preset time period, so as to predict the temperature of each temperature detection point. Thus, 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.
[0294] The following combines Figure 6 and Figure 7 to illustrate the control device 1000.
[0295] Figure 6 is a schematic structural diagram of a control device for a chip provided by an embodiment of the present application.
[0296] The chip includes at least one subsystem, and at least one first temperature detection point is provided on the chip.
[0297] The control device 1000 includes a determination module 1110 and a control module 1120.
[0298] The determination module 1110 is configured to use the relationship model of each first temperature detection point to determine first power consumption information. 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 enables the first predicted temperature determined by using the relationship model of each first temperature detection point to be less than or equal to the preset temperature threshold of the first temperature detection point.
[0299] The control module 1120 is configured to control the chip to operate according to the first power consumption information.
[0300] Optionally, the at least one subsystem includes a plurality of subsystems, and the power consumption of each subsystem indicated by the first power consumption information satisfies a first association relationship.
[0301] Optionally, the control device 1000 further includes an acquisition module, and the acquisition module is configured to acquire the current frequency information of the chip, and the current frequency information is used to indicate the current operating frequencies of a plurality of subsystems of the chip.
[0302] The first association relationship is that the ratio between the operating frequencies of the plurality of subsystems is equal to the ratio between the current operating frequencies of the plurality of subsystems indicated by the current frequency information.
[0303] The power consumption of each subsystem and the frequency of the subsystem satisfy a second association relationship.
[0304] Optionally, a plurality of temperature detection points are provided on the chip, and the plurality of temperature detection points include the at least one first temperature detection point, and the preset temperature thresholds of each temperature detection point are equal.
[0305] The at least one first temperature detection point is at least one of the temperature detection points with the highest temperature among the plurality of temperature detection points.
[0306] Optionally, the control device 1000 further includes an acquisition module, and the acquisition module is 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.
[0307] The control device 1000 further includes a detection module, and the detection module is configured to detect the chip to obtain the actual temperature of the i-th first temperature detection point among the at least one first temperature detection point, where i is a positive integer.
[0308] The determination module 1110 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.
[0309] The control device 1000 further includes an adjustment module, and the adjustment module is 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 the third predicted temperature determined according to the adjusted relationship model of the i-th first temperature detection point and the second power consumption information is equal to the actual temperature.
[0310] 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.
[0311] The first power consumption information is such that the first predicted temperature determined by using the adjusted 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.
[0312] Optionally, the second power consumption information is used to indicate a third correlation relationship between the power consumption and time of each subsystem in a preset time period before the current moment.
[0313] The relationship model of the i-th first temperature detection point is configured to determine third power consumption information according to the second power consumption information, where the third power consumption information includes the average power consumption of each subsystem in the corresponding window time period of the subsystem before the current moment, and the preset time period includes the window time period.
[0314] The relationship model of the i-th first temperature detection point is further configured to determine the second predicted temperature according to the third power consumption information.
[0315] Optionally, the relationship model of the i-th first temperature detection point is configured to determine the corresponding window time period of each subsystem according to the third correlation relationship.
[0316] Optionally, the adjustment module is configured to, 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.
[0317] Optionally, the control device 1000 further includes an update module, and the update module is configured to, when the difference is less than or equal to the preset difference threshold, update the trigger times, where the trigger times are used to indicate the number of times that the difference is less than or equal to the preset difference threshold within a preset time length.
[0318] The adjustment module is configured to, when the trigger times are less than or equal to a preset number, adjust the relationship model of the i-th first temperature detection point according to the difference.
[0319] Optionally, 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.
[0320] The control device 1000 further includes an acquisition module and a training module.
[0321] The obtaining module is further configured to obtain training power consumption information and the j-th training measured 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 measured temperature is used to indicate the temperature of the j-th temperature detection point among the at least one temperature detection point when the chip operates according to the training power consumption information, and j is a positive integer.
[0322] The training module is configured to input the training power consumption information into the original relationship model to obtain the j-th training predicted temperature;
[0323] The training module is further configured to adjust the parameters of the original relationship model according to the j-th training predicted temperature and the j-th training measured temperature, so that the difference between the j-th training predicted temperature and the j-th training measured temperature is minimized, to obtain the relationship model of the j-th temperature detection point.
[0324] Optionally, the relationship model of each first temperature detection point is used to represent the influence magnitude of the power consumption of each subsystem on the predicted temperature of the first temperature detection point.
[0325] Figure 7 It is a schematic structural diagram of a control device of a chip provided by an embodiment of the present application.
[0326] The chip includes at least one subsystem, and at least one first temperature detection point is provided on the chip.
[0327] The control device 1000 includes a memory 1210 and a processor 1220.
[0328] The memory 1210 is used to store program instructions.
[0329] When the program stored in the memory is executed, the processor 1220 is configured to:
[0330] Use the relationship model of each first temperature detection point to determine first power consumption information, where 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 enables the first predicted temperature determined by using the relationship model of each first temperature detection point to be less than or equal to the preset temperature threshold of the first temperature detection point;
[0331] Control the chip to operate according to the first power consumption information.
[0332] Optionally, the at least one subsystem includes a plurality of subsystems, and the power consumption of each subsystem indicated by the first power consumption information satisfies a first association relationship.
[0333] Optionally, the processor 1220 is further configured to: obtain the 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.
[0334] 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.
[0335] The power consumption of each subsystem and the frequency of the subsystem satisfy a second association relationship.
[0336] Optionally, 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 temperature thresholds of each temperature detection point are equal.
[0337] The at least one first temperature detection point is the at least one temperature detection point with the highest temperature among the plurality of temperature detection points.
[0338] Optionally, 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 subsystem.
[0339] The processor 1220 is further configured to: detect the chip to obtain the actual temperature of the i-th first temperature detection point among the at least one first temperature detection point, where i is a positive integer.
[0340] 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.
[0341] 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, where 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.
[0342] 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.
[0343] 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.
[0344] Optionally, the second power consumption information is further used to indicate a third association relationship between the power consumption of each subsystem in a preset time period before the current moment and time.
[0345] 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. The third power consumption information includes the average power consumption of each subsystem in the window time period corresponding to the subsystem before the current moment, and the preset time period includes the window time period.
[0346] 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.
[0347] Optionally, the relationship model of the i-th first temperature detection point is used to determine the window time period corresponding to each subsystem according to the third association relationship.
[0348] Optionally, the processor 1220 is further configured to: 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.
[0349] Optionally, the processor 1220 is further configured to: when the difference is less than or equal to the preset difference threshold, update the trigger count, where the trigger count is used to indicate the number of times the difference is less than or equal to the preset difference threshold within a preset time length.
[0350] The processor 1220 is further configured to: when the trigger count is less than or equal to a preset count, adjust the relationship model of the i-th first temperature detection point according to the difference.
[0351] Optionally, 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.
[0352] The processor 1220 is further configured to: obtain training power consumption information and the j-th training measured temperature. The training power consumption information is used to indicate the power consumption of the at least one subsystem, and the j-th training measured temperature is used to indicate the temperature of the j-th temperature detection point among the at least one temperature detection points when the chip operates according to the training power consumption information, where j is a positive integer.
[0353] The processor 1220 is further configured to: input the training power consumption information into the original relationship model to obtain the j-th training predicted temperature.
[0354] The processor 1220 is further configured to: adjust the parameters of the original relationship model according to the j-th training predicted temperature and the j-th training measured temperature, so that the difference between the j-th training predicted temperature and the j-th training measured temperature is minimized, to obtain the relationship model of the j-th temperature detection point.
[0355] Optionally, the relationship model of each first temperature detection point is used to represent the influence magnitude of the power consumption of each subsystem on the predicted temperature of the first temperature detection point.
[0356] An embodiment of the present application further provides an electronic device, which includes a chip and the control device of the foregoing chip.
[0357] 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 is caused to execute the control method of the chip in the foregoing text.
[0358] An embodiment of the present application further provides a chip system, which is 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 control method of the chip in the foregoing text.
[0359] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraint conditions of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0360] In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent the situation of A existing alone, A and B existing simultaneously, and B existing alone. Where A and B may be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one of the following" and its similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c may be single or multiple. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0361] In several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0362] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0363] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0364] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of this application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0365] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application and should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A control method for a chip, characterized in that, The 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 model of each first temperature detection point to determine first power consumption information. 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. The first power consumption information enables the first predicted temperature determined using the relationship model of each first temperature detection point to be 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. Wherein, the at least one subsystem includes a plurality of subsystems, and the power consumptions of the plurality of subsystems indicated by the first power consumption information satisfy a first association relationship.
2. The method according to claim 1, wherein: The method further includes: obtaining the current frequency information of the chip, and the current frequency information is used to indicate the current operating frequency of each subsystem. The first association relationship is that the ratio between the operating frequencies of the plurality of subsystems is equal to the ratio between the current operating frequencies of the plurality of subsystems indicated by the current frequency information, and the power consumption of each subsystem and the frequency of the subsystem satisfy a second association relationship.
3. The method according to claim 1 or 2, characterized in that, 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. The preset temperature thresholds of each temperature detection point are equal. The at least one first temperature detection point is the at least one temperature detection point with the highest current temperature among the plurality of temperature detection points.
4. The method according to claim 1 or 2, characterized in that, The method further includes: Obtaining second power consumption information, and the second power consumption information is used to indicate the current power consumption of each subsystem. Detecting the chip to obtain the actual temperature of the i-th first temperature detection point among the at least one first temperature detection point, where i is a positive integer. According to the relationship model of the i-th first temperature detection point and the second power consumption information, determining the second predicted temperature of the i-th first temperature detection point. According to the difference between the second predicted temperature and the actual temperature, adjusting the relationship model of the i-th first temperature detection point so that the third predicted temperature determined according to the adjusted relationship model of the i-th first temperature detection point and the second power consumption information is equal to the actual temperature. The step of using the relationship model of each first temperature detection point to determine first power consumption information includes: using the adjusted relationship model of the i-th first temperature detection point to determine the first power consumption information. The first power consumption information enables the first predicted temperature determined 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.
5. The method according to claim 4, wherein The second power consumption information is further used to indicate a third association relationship between the power consumption of each subsystem in a preset time period before the current moment and time. 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. The third power consumption information includes the average power consumption of each subsystem in the window time period corresponding to the subsystem before the current moment, and 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.
6. The method according to claim 5, wherein The relationship model of the i-th first temperature detection point is used to determine the window time period corresponding to each subsystem according to the third correlation relationship.
7. The method according to claim 4, wherein Adjusting the relationship model of the i-th first temperature detection point according to the difference between the second predicted temperature and the actual temperature includes: When the difference is less than or equal to a preset difference threshold, adjusting the relationship model of the i-th first temperature detection point according to the difference.
8. The method according to claim 7, wherein, When the difference is less than or equal to a preset difference threshold, adjusting the relationship model of the i-th first temperature detection point according to the difference includes: When the difference is less than or equal to the preset difference threshold, updating the trigger count, where the trigger count is used to indicate the number of times the difference is less than or equal to the preset difference threshold within a preset time length; When the trigger count is less than or equal to a preset count, adjusting the relationship model of the i-th first temperature detection point according to the difference.
9. The method according to claim 1 or 2, characterized in that, 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 method further includes: Obtaining training power consumption information and the j-th training measured temperature. The training power consumption information is used to indicate the power consumption of the at least one subsystem, and the j-th training measured temperature is used to indicate the temperature of the j-th temperature detection point among the at least one temperature detection points when the chip operates according to the training power consumption information, where j is a positive integer; Inputting the training power consumption information into the original relationship model to obtain the j-th training predicted temperature; Adjusting the parameters of the original relationship model according to the j-th training predicted temperature and the j-th training measured temperature so that the difference between the j-th training predicted temperature and the j-th training measured temperature is minimized to obtain the relationship model of the j-th temperature detection point.
10. The method according to claim 1 or 2, characterized in that, The relationship model of each first temperature detection point is used to represent the influence degree of the power consumption of each subsystem on the predicted temperature of the first temperature detection point.
11. A control device for a chip, characterized in that, 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; When the program instructions stored in the memory are executed, the processor is used to: Using the relationship model of each first temperature detection point, determine the first power consumption information. 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. The first power consumption information enables the first predicted temperature determined using the relationship model of each first temperature detection point to be less than or equal to the preset temperature threshold of the first temperature detection point; Control the chip to operate according to the first power consumption information; Wherein, the at least one subsystem includes a plurality of subsystems, and the power consumptions of the plurality of subsystems indicated by the first power consumption information satisfy a first association relationship.
12. The device according to claim 11, characterized in that, The processor is further configured to: obtain the current frequency information of the chip, and the current frequency information is used to indicate the current operating frequencies of the plurality of subsystems of the chip; The first association relationship is that the ratio between the operating frequencies of the plurality of subsystems is equal to the ratio between the current operating frequencies of the plurality of subsystems indicated by the current frequency information, and the power consumption of each subsystem and the frequency of the subsystem satisfy a second association relationship.
13. The device according to claim 11 or 12, characterized in that, 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. The preset temperature thresholds of each temperature detection point are equal. The at least one first temperature detection point is at least one of the temperature detection points with the highest temperature among the plurality of temperature detection points.
14. The device according to claim 11 or 12, characterized in that, The processor is further configured to: Obtain second power consumption information, and the second power consumption information is used to indicate the current power consumption of each subsystem; Detect the chip to obtain the actual temperature of the i-th first temperature detection point among the at least one first temperature detection point, where i is a positive integer; According to the relationship model of the i-th first temperature detection point and the second power consumption information, determine the second predicted temperature of the i-th first temperature detection point; According to the difference between the second predicted temperature and the actual temperature, adjust the relationship model of the i-th first temperature detection point so that the third predicted temperature determined according to the adjusted relationship model of the i-th first temperature detection point and the second power consumption information is equal to the actual temperature; According to the adjusted relationship model of the i-th first temperature detection point, determine the first power consumption information. The first power consumption information enables the first predicted temperature determined 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.
15. The device according to claim 14, characterized in that, The second power consumption information is further used to indicate a third association relationship between the power consumption of each subsystem in a preset time period before the current moment and time; 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. The third power consumption information includes the average power consumption of each subsystem in the window time period corresponding to the subsystem before the current moment. 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.
16. The device according to claim 15, wherein the relationship model of the i-th first temperature detection point is used to determine the window time period corresponding to each subsystem according to the third association relationship.
17. The device according to claim 14, characterized in that, The processor is further configured to: 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.
18. The device according to claim 17, characterized in that The processor is further configured to: when the difference is less than or equal to the preset difference threshold, update the trigger count, where the trigger count is used to indicate the number of times the difference is less than or equal to the preset difference threshold within a preset time length; when the trigger count is less than or equal to a preset count, adjust the relationship model of the i-th first temperature detection point according to the difference.
19. The device according to claim 11 or 12, characterized in that, 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 the j-th training measured 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 measured temperature is used to indicate the temperature of the j-th temperature detection point among the at least one temperature detection point when the chip operates according to the training power consumption information, and j is a positive integer; input the training power consumption information into the original relationship model to obtain the j-th training predicted temperature; adjust the parameters of the original relationship model according to the j-th training predicted temperature and the j-th training measured temperature, so that the difference between the j-th training predicted temperature and the j-th training measured temperature is minimized, to obtain the relationship model of the j-th temperature detection point.
20. The device according to claim 11 or 12, characterized in that, The relationship model of each first temperature detection point is used to represent the influence magnitude of the power consumption of each subsystem on the predicted temperature of the first temperature detection point.
21. A control device for a chip, characterized in that, It includes various functional modules for executing the method according to any one of claims 1 to 10.
22. A computer program storage medium, characterized in that, The computer program storage medium has program instructions, and when the program instructions are executed by the processor, the processor executes the method according to any one of claims 1 to 10.
23. A chip, characterized in that, The chip includes at least one processor, and when the program instructions are executed by the at least one processor, the at least one processor executes the method according to any one of claims 1 to 10.
24. An electronic device, characterized in that, It includes a chip and a control device of the chip according to any one of claims 11 to 20.
Citation Information
Patent Citations
Dynamic heat treatment method of high-performance multi-core microprocessor
CN106681453A
A multi-core chip thermal management method based on a recurrent neural network
CN109685207A