Fan adjusting method, processor, chip and electronic equipment

By combining hardware interrupt signals and a polling mechanism to adjust the fan speed in real time, the problem of drastic chip temperature changes in large-scale application scenarios was solved, achieving stable chip temperature control and improved reliability.

CN121541758APending Publication Date: 2026-02-17NANJING ILUVATAR COREX TECH CO LTD (DBA ILUVATAR COREX INC NANJING)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511716660.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

In large-scale application scenarios, chip temperature changes drastically. Traditional polling mechanisms cause lag in fan adjustment response, leading to chip temperature exceeding the safety threshold and affecting reliability and stability.

Method used

By combining hardware interrupt signals and a polling mechanism, the fan speed is adjusted in real time based on the hardware interrupt signals and the preset correspondence between temperature and fan adjustment parameters to avoid temperature exceeding limits, and hardware interrupt signals are shielded when necessary to prevent interrupt storms.

Benefits of technology

It achieves stable control of chip temperature, reduces the probability of the chip exceeding the safety threshold, improves reliability and stability, and reduces energy waste and noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121541758A_ABST
    Figure CN121541758A_ABST
Patent Text Reader

Abstract

The invention provides a fan adjusting method, a processor, a chip and electronic equipment, and relates to the technical field of temperature control. The method comprises the steps that the temperature of a chip is obtained every first preset duration, and alternative fan adjusting parameters are determined according to the temperature; in the process of periodically determining the alternative fan adjusting parameters, a hardware interrupt signal of the chip is obtained; the hardware interrupt signal is generated by a preset interrupt trigger circuit when the temperature reaches a first temperature threshold value; determining a target fan adjusting parameter according to the hardware interrupt signal and the alternative fan adjusting parameter; and adjusting the fan according to the target fan adjusting parameter. Thus, by combining the polling mechanism and the hardware interrupt signal, even at the polling interval, the hardware interrupt signal can reflect that the temperature is higher than the first temperature threshold value, and the fan is adjusted in time, so that the temperature of the chip is stably controlled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of temperature control technology, and more specifically, to a fan adjustment method, a processor, a chip, and an electronic device. Background Technology

[0002] With the development of artificial intelligence and the increasing number of large-scale model applications, the power consumption load of chips changes drastically, resulting in drastic temperature changes. The temperature change rate can reach more than 10℃ / ms (degrees Celsius per millisecond), far exceeding that of traditional GPU (graphics processing unit) scenarios.

[0003] In related technologies, a polling mechanism is usually used for temperature regulation, that is, the temperature is queried every once in a while and the fan speed is adjusted according to the temperature.

[0004] However, in large-scale application scenarios, temperature changes rapidly, while the increase in fan speed is not instantaneous. Adjusting the fan through a polling mechanism will result in a response lag, causing the chip temperature to exceed the chip's safety threshold, thereby affecting the chip's reliability, stability, and lifespan. Summary of the Invention

[0005] The purpose of this application is to provide a fan adjustment method, processor, chip, and electronic device to solve the problem of unstable chip temperature control in related technologies.

[0006] This application provides a fan adjustment method, including: acquiring the temperature of a chip at first preset time intervals, and determining candidate fan adjustment parameters based on the temperature; acquiring a hardware interrupt signal of the chip during the periodic determination of candidate fan adjustment parameters; the hardware interrupt signal being generated by a preset interrupt triggering circuit when the temperature reaches a first temperature threshold; determining a target fan adjustment parameter based on the hardware interrupt signal and the candidate fan adjustment parameters; and adjusting the fan according to the target fan adjustment parameter.

[0007] Hardware interrupt signals are interrupts generated by hardware circuitry and are unaffected by software programs. Combining polling mechanisms and hardware interrupt signals, even during polling intervals, hardware interrupt signals can indicate that the temperature has exceeded a first temperature threshold, allowing for timely fan adjustments to maintain the chip's temperature within a reasonable range and thus stably control the chip's temperature.

[0008] Furthermore, determining the alternative fan adjustment parameters based on the temperature includes: searching for the alternative fan adjustment parameters corresponding to the temperature in a preset parameter adjustment database; wherein the parameter adjustment database stores the correspondence between temperature and alternative fan adjustment parameters.

[0009] In the above implementation, the correspondence between temperature and alternative fan adjustment parameters is stored in a preset parameter adjustment database. During use, only the alternative fan adjustment parameters corresponding to the temperature need to be found; no additional calculations are required, saving time in determining the alternative fan adjustment parameters.

[0010] Furthermore, determining the target fan adjustment parameter based on the hardware interrupt signal and the alternative fan adjustment parameters includes: when the hardware interrupt signal is received and the interrupt is enabled, determining the fan parameter representing the maximum fan speed as the target fan adjustment parameter; when the hardware interrupt signal is received and the interrupt is masked, or when the hardware interrupt signal is not received, determining the alternative fan adjustment parameter as the target fan adjustment parameter.

[0011] Once a hardware interrupt signal is received, it indicates that the current temperature has exceeded the first temperature threshold. If the fan speed is not adjusted in time, the chip temperature is likely to exceed the chip's safety threshold, affecting the chip's reliability, stability, and lifespan. In the above implementation, when a hardware interrupt signal is received and interrupt is enabled, the fan parameter representing the maximum fan speed is determined as the target fan adjustment parameter. This causes the fan to operate directly at its maximum speed, effectively cooling the chip and reducing the probability of the chip exceeding its safety threshold.

[0012] Furthermore, after determining the fan parameter characterizing the maximum fan speed as the target fan adjustment parameter, the fan adjustment method further includes: putting the hardware interrupt signal in an interrupt-masking state.

[0013] An interrupt storm is a fault state in a computer system where hardware interrupts occur in large numbers and at extremely high frequencies within a very short period of time, far exceeding the processor's processing capacity, causing the normal functions of the system to be overwhelmed or even completely paralyzed.

[0014] Considering that even when the fan is running at maximum speed, it takes time for the temperature to drop after the chip reaches a high temperature, an interrupt storm may occur if hardware interrupt signals are not blocked during this period. In the above implementation, by adjusting the target fan parameters to the maximum speed and then blocking the hardware interrupt signals, interrupt storms can be avoided.

[0015] Furthermore, the fan adjustment method also includes: when the alternative fan adjustment parameter represents the maximum fan speed, setting the hardware interrupt signal to an interrupt-masked state; and when the alternative fan adjustment parameter does not represent the maximum fan speed, setting the hardware interrupt signal to an interrupt-enabled state.

[0016] Considering practical applications, the following scenario may occur: the fan operates at its maximum speed, and after a polling cycle, the alternative fan's adjustment parameter is determined to be a speed lower than the maximum speed. If the hardware interrupt signal is enabled before the polling task, the fan operating at maximum speed will trigger the hardware interrupt signal to be disabled. The hardware interrupt signal will only be enabled again before the next polling task, meaning that it cannot handle sudden temperature changes between the current and next polling cycle.

[0017] In the above implementation, by first determining the alternative fan adjustment parameters, and then adjusting the hardware interrupt signal to either an interrupt-masked or interrupt-enabled state based on these parameters (i.e., adjusting the hardware interrupt signal to either an interrupt-masked or interrupt-enabled state after polling the task), the aforementioned situation can be avoided, thus better maintaining the chip's temperature stability.

[0018] Furthermore, the method for adjusting the fan also includes: when the temperature is greater than a first temperature threshold, setting the hardware interrupt signal to an interrupt-masked state; and when the temperature is less than the first temperature threshold, setting the hardware interrupt signal to an interrupt-enabled state.

[0019] In the above implementation, temperature is used to control the hardware interrupt signal to be in an interrupt-masked state or an interrupt-enabled state, and there are no special scenarios. It can be set either before or after the polling cycle, making it more convenient and flexible to use.

[0020] Furthermore, after adjusting the fan according to the target fan adjustment parameters, the fan adjustment method further includes: when the target fan adjustment parameters represent the maximum fan speed, after waiting for a second preset time, continuing to acquire the chip temperature at intervals of a first preset time, and determining alternative fan adjustment parameters based on the temperature.

[0021] In the above implementation, considering that even if the fan runs at its maximum speed, it will still take some time to cool the chip down after it reaches a high temperature, a second preset time can be waited for. During this waiting period, the fan runs at its maximum speed without changing the speed, which can effectively cool the chip and reduce the probability of the chip exceeding its safety threshold.

[0022] Furthermore, the fan adjustment method also includes: obtaining the heat dissipation index of the fan; and determining the second preset duration based on the heat dissipation index.

[0023] Considering the different heat dissipation capabilities of different fans, the time required to lower the chip temperature by the same amount of time varies depending on the fan. In the above implementation, the heat dissipation index reflects the heat dissipation capacity of the fan. By setting different second preset time durations based on the heat dissipation capacity of different fans, energy waste caused by the fan continuing to run at maximum speed when the chip temperature has already decreased can be avoided.

[0024] At the same time, the fan may generate noise when running at maximum speed. Setting a reasonable second preset duration can reduce the duration of noise and improve the user experience.

[0025] Furthermore, determining the second preset duration based on the heat dissipation index includes: searching for the second preset duration corresponding to the heat dissipation index in a preset heat dissipation duration database; wherein the heat dissipation duration database stores the correspondence between the heat dissipation index and the second preset duration.

[0026] In the above implementation, the correspondence between heat dissipation indicators and second preset durations is stored in a preset heat dissipation duration database. During use, it is only necessary to look up the second preset duration that corresponds to the heat dissipation indicator; no additional calculations are required, thus saving time in determining the second preset duration.

[0027] Furthermore, adjusting the fan according to the target fan adjustment parameters includes: obtaining a temperature intervention suggestion; the temperature intervention suggestion describing whether to increase the target fan adjustment parameters; and adjusting the fan according to the temperature intervention suggestion and the target fan adjustment parameters.

[0028] The method for adjusting the fan further includes: acquiring the chip's temperature, temperature change rate, temperature acceleration, and power consumption change rate; determining whether there is a dangerous temperature rise trend based on the temperature, temperature change rate, temperature acceleration, and power consumption change rate; if there is a dangerous temperature rise trend, determining a temperature intervention recommendation as a first value; the first value is used to describe increasing the target fan adjustment parameter; if there is no dangerous temperature rise trend, determining a temperature intervention recommendation as a second value; the second value is used to describe not increasing the target fan adjustment parameter.

[0029] In the above implementation, the chip's temperature, temperature change rate, temperature acceleration, and power consumption change rate can reflect whether the fan has a dangerous temperature rise trend. In other words, it indicates whether the fan may rapidly heat up within the next few seconds. Considering that increasing the fan speed takes time, by predicting whether a dangerous temperature rise trend exists, and adjusting the fan accordingly, the chip can be cooled more promptly, reducing the probability of the chip exceeding its safety threshold.

[0030] Furthermore, determining whether a dangerous temperature rise trend exists based on the temperature, the rate of temperature change, the temperature acceleration, and the rate of power consumption change includes: determining that a dangerous temperature rise trend exists when the temperature is greater than a second temperature threshold, the rate of temperature change is greater than a preset rate of temperature change, the temperature acceleration is greater than a preset acceleration, and the rate of power consumption change is greater than a preset rate of power consumption change; otherwise, determining that no dangerous temperature rise trend exists.

[0031] In the above implementation, a dangerous temperature rise trend is determined by combining multiple parameters. When various indicators reach the set values, a dangerous temperature rise trend is considered to exist, which can reduce the possibility of misjudgment and thus enable more accurate temperature intervention suggestions to maintain the chip temperature within a reasonable range while reducing fan energy waste.

[0032] Furthermore, the temperature intervention suggestion is also used to describe the adjustment range; adjusting the fan according to the temperature intervention suggestion and the target fan adjustment parameter includes: when the temperature intervention suggestion indicates an increase in the target fan adjustment parameter, increasing the adjustment range on the target fan adjustment parameter to obtain a first parameter to be adjusted; adjusting the fan according to the first parameter to be adjusted.

[0033] In the above implementation, increasing the target fan adjustment parameters according to the temperature intervention recommendation can reasonably increase the fan speed, thereby maintaining the chip temperature within a reasonable range and reducing fan energy waste.

[0034] This application provides a processor, including: a candidate parameter determination unit, configured to acquire the temperature of a chip at first preset time intervals and determine candidate fan adjustment parameters based on the temperature; an interrupt signal acquisition unit, configured to acquire a hardware interrupt signal of the chip during the periodic determination of candidate fan adjustment parameters; the hardware interrupt signal is generated by a preset interrupt triggering circuit when the temperature reaches a first temperature threshold; a target parameter determination unit, configured to determine a target fan adjustment parameter based on the hardware interrupt signal and the candidate fan adjustment parameters; and an adjustment unit, configured to adjust the fan according to the target fan adjustment parameter.

[0035] This application provides a chip, including: an interrupt triggering circuit for generating a hardware interrupt signal when the chip's temperature reaches a first temperature threshold; a power management module connected to the interrupt triggering circuit, which acquires the temperature at first preset intervals and determines alternative fan adjustment parameters based on the temperature; acquires the chip's hardware interrupt signal during the periodic determination of alternative fan adjustment parameters; determines a target fan adjustment parameter based on the hardware interrupt signal and the alternative fan adjustment parameters; and adjusts the fan according to the target fan adjustment parameter.

[0036] Furthermore, the interrupt triggering circuit includes: a threshold register for storing a first temperature threshold; a digital-to-analog converter connected to the threshold register and the temperature comparison unit, the digital-to-analog converter being used to convert the first temperature threshold into an analog threshold; an on-chip temperature acquisition unit connected to the temperature comparison unit, the on-chip temperature acquisition unit being used to acquire the temperature of the chip; and a temperature comparison unit for comparing the first temperature threshold with the temperature, and generating the hardware interrupt signal when the temperature reaches the first temperature threshold.

[0037] This application provides an electronic device, including the aforementioned chip and a fan connected to the chip.

[0038] The above general description and the description below are exemplary and illustrative only and are not intended to limit this application. Attached Figure Description

[0039] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 A schematic flowchart illustrating a fan adjustment method provided in an embodiment of this application; Figure 2 A flowchart illustrating a method for adjusting a fan provided in an embodiment of this application; Figure 3 A schematic flowchart illustrating another fan adjustment method provided in an embodiment of this application; Figure 4 A schematic flowchart illustrating another fan adjustment method provided in an embodiment of this application; Figure 5 A chip temperature variation trend graph provided in this application embodiment using only a polling mechanism; Figure 6 A trend graph of chip temperature variation in the case of a method of this application provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a processor provided in an embodiment of this application.

[0041] Figure label: 1: Alternate parameter determination unit; 2: Interrupt signal acquisition unit; 3: Target parameter determination unit; 4: Adjustment unit. Detailed Implementation

[0042] This application provides a fan adjustment method that can be applied to a control module for adjusting a fan.

[0043] In this embodiment, the control module can be located inside the chip or outside the chip.

[0044] For example, when the control module is located inside the chip, it can be a power management module within the chip. When the control module is located outside the chip, it can be an MCU (microcontroller unit).

[0045] In this embodiment, the fan can be used to dissipate heat from the chip, which is equipped with an interrupt trigger circuit.

[0046] Optionally, the chip can be of different types, and chip types can be classified according to the different processors within the chip. Among them, processor types include, but are not limited to, GPGPU (General-Purpose computing on Graphics Processing Units), GPU (Graphics Processing Unit), CPU (Central Processing Unit), NPU (Neural Processing Unit), etc., without limitation.

[0047] Next, the fan adjustment method provided in this application will be described, which can be applied to the aforementioned control module. Please refer to [link / reference]. Figure 1 , Figure 1 This is a flowchart of a fan adjustment method provided in an embodiment of this application. The fan adjustment method includes: S101: The chip temperature is acquired at first preset intervals, and the alternative fan adjustment parameters are determined based on the temperature.

[0048] In this embodiment, the fan adjustment parameters are parameters that can be used to adjust the fan speed. Examples of fan adjustment parameters include: fan speed, and the PWM (Pulse Width Modulation) duty cycle corresponding to the fan speed.

[0049] In this embodiment of the application, the first preset duration can be set by a technician based on experience, for example, 5ms (milliseconds).

[0050] In this embodiment, the SCPU (a type of processor unit) firmware executes multiple tasks sequentially at a fixed period, i.e., at first preset intervals: such as dynamic frequency and voltage adjustment, PVT (process, voltage, and temperature parameter information stored internally in the chip) data update, chip anomaly monitoring, etc. Among these, a fan debugging task is executed during PVT data update.

[0051] In some embodiments, determining alternative fan adjustment parameters based on temperature may involve searching for alternative fan adjustment parameters corresponding to the temperature in a preset parameter adjustment database.

[0052] The parameter adjustment database stores the correspondence between temperature and the adjustment parameters of the alternative fans.

[0053] For example, the parameter adjustment database can store the correspondence between temperature ranges and PWM duty cycles. For instance: when T < 55℃ (degrees Celsius), the fan duty is 40%; when 55℃ < T < 60℃, the fan duty is 50%; when 60℃ < T < 65℃, the fan duty is 60%; when 65℃ < T < 70℃, the fan duty is 70%; when 70℃ < T < 75℃, the fan duty is 80%; when 75℃ < T < 80℃, the fan duty is 90%; and when 80℃ ≥ T, the fan duty is 100%. Here, T is the chip temperature, and fanduty is the fan's PWM duty cycle.

[0054] In other embodiments, determining the alternative fan adjustment parameters based on temperature can be achieved by calculating the alternative fan adjustment parameters using temperature according to a preset first fitting algorithm.

[0055] For example, the correlation between temperature and fan speed can be collected. That is, the fan speed corresponding to a certain temperature value can be collected. Based on the collected correlation between temperature and fan speed, a first fitting algorithm reflecting the correlation between temperature and fan speed is formed. In use, the measured temperature is substituted into this first fitting algorithm to obtain the corresponding fan speed.

[0056] S102 acquires the chip's hardware interrupt signal during the periodic determination of alternative fan adjustment parameters.

[0057] The hardware interrupt signal is generated by a preset interrupt trigger circuit when the temperature reaches the first temperature threshold.

[0058] In some embodiments, the interrupt triggering circuit may include: a threshold register, a digital-to-analog converter (DAC), an on-chip temperature acquisition unit, and a temperature comparison unit. The threshold register stores a first temperature threshold. The DAC is connected to the threshold register and the temperature comparison unit and is used to convert the first temperature threshold into an analog threshold. The on-chip temperature acquisition unit is connected to the temperature comparison unit and is used to acquire the chip's temperature. The temperature comparison unit compares the first temperature threshold with the actual temperature, and generates a hardware interrupt signal when the temperature reaches the first temperature threshold.

[0059] In the above embodiments, the interrupt triggering circuit is also used to control whether a hardware interrupt signal is allowed. The interrupt triggering circuit may further include an interrupt mask register. The interrupt mask register is connected to the temperature comparison unit. When a third value is stored in the interrupt mask register, a hardware interrupt signal is sent to the control module. When a fourth value is stored in the interrupt mask register, the hardware interrupt signal is masked.

[0060] The third value indicates that the hardware interrupt signal is in the interrupt enabled state. The fourth value indicates that the hardware interrupt signal is in the interrupt masked state.

[0061] Optionally, the value in the interrupt mask register can be changed to a third or fourth value via software. For example, this can be done using firmware or a driver.

[0062] For example, the first set temperature threshold is written to the threshold register via software, specifically using firmware or a driver. Assuming the first set temperature threshold is 80℃, 0x50 is written to the threshold register. The threshold register is the entry point for setting the temperature warning line for the entire system. The digital-to-analog converter (DAC) converts the first set temperature threshold in the threshold register into a corresponding analog voltage (V_th). Simultaneously, the on-chip temperature acquisition unit acquires the chip temperature and outputs an analog voltage (V_temp) proportional to the chip temperature. The temperature comparison unit receives two inputs: V_temp and V_th. When V_temp > V_th, the temperature comparison unit outputs a "high" level, reflecting that the current chip temperature is higher than the first set temperature threshold. Since the interrupt trigger circuit is connected to the external interrupt pin of the control module, a hardware interrupt signal is generated for the control module.

[0063] An interrupt mask register is also included in the interrupt triggering circuit. This register controls whether interrupt requests are allowed. Assume IMR=0 indicates interrupt enabled, and IMR=1 indicates interrupt masked. The interrupt mask register determines whether a hardware interrupt signal can be transmitted to the control module. If IMR=0, after a hardware interrupt signal is generated, the control module will generate an interrupt request via a dedicated interrupt line (TEMP_INT_N). Upon receiving the interrupt request, the control module immediately initiates the corresponding adjustment logic, such as forcing the PWM duty cycle to 100% and maintaining it for a second preset duration.

[0064] S103 determines the target fan adjustment parameters based on the hardware interrupt signal and alternative fan adjustment parameters.

[0065] In some embodiments, determining the target fan adjustment parameter based on a hardware interrupt signal and alternative fan adjustment parameters may include: when a hardware interrupt signal is received and interrupt is enabled, determining the fan parameter representing the maximum fan speed as the target fan adjustment parameter; when a hardware interrupt signal is received and interrupt is masked, or when no hardware interrupt signal is received, determining the alternative fan adjustment parameter as the target fan adjustment parameter.

[0066] In the above embodiments, after determining the fan parameter representing the maximum fan speed as the target fan adjustment parameter, the method further includes: putting the hardware interrupt signal in an interrupt-masking state.

[0067] Optionally, the hardware interrupt signal can be put into an interrupt-masked state by changing the value in the interrupt mask register to the fourth value.

[0068] For example, assume the control unit is the power management module within the SCPU firmware of the chip. First, an interrupt trigger threshold is set, i.e., a first temperature threshold. Then, if the SCPU firmware does not receive an interrupt signal, it periodically acquires the chip's temperature at first preset intervals and determines alternative fan adjustment parameters based on the temperature, adjusting the fan according to these parameters. When the chip's temperature exceeds the first temperature threshold, the chip triggers an interrupt signal to the SCPU firmware. Upon receiving the interrupt signal, the SCPU firmware pauses all current tasks and prioritizes the interrupt task, which adjusts the fan speed to the maximum. After the interrupt task is completed, the SCPU firmware disables interrupt triggering by changing the value in the interrupt mask register to the fourth value to prevent interrupt storms from interfering with the firmware's normal cycle tasks. After the interrupt task is completed, the previously paused tasks resume execution.

[0069] S104, adjust the fan according to the target fan adjustment parameters.

[0070] In some embodiments, adjusting the fan according to the target fan adjustment parameters may include: directly adjusting the fan according to the target fan adjustment parameters.

[0071] In some embodiments, adjusting the fan according to the target fan adjustment parameters may include: obtaining a temperature intervention recommendation; and adjusting the fan according to the temperature intervention recommendation and the target fan adjustment parameters.

[0072] Among them, the temperature intervention suggestion is used to describe whether to increase the target fan adjustment parameters.

[0073] In one alternative approach, temperature intervention recommendations can be obtained by: acquiring the chip's temperature, temperature change rate, temperature acceleration, and power consumption change rate; determining whether a dangerous temperature rise trend exists based on the temperature, temperature change rate, temperature acceleration, and power consumption change rate; if a dangerous temperature rise trend exists, determining the temperature intervention recommendation as a first value; if no dangerous temperature rise trend exists, determining the temperature intervention recommendation as a second value.

[0074] The first value describes increasing the target fan adjustment parameter. The second value describes not increasing the target fan adjustment parameter.

[0075] In one example of the above optional method, determining whether there is a dangerous heating trend based on temperature, temperature change rate, temperature acceleration, and power consumption change rate can be as follows: if the temperature is greater than a second temperature threshold, the temperature change rate is greater than a preset temperature change rate, the temperature acceleration is greater than a preset acceleration, and the power consumption change rate is greater than a preset power consumption change rate, then a dangerous heating trend is determined to exist; otherwise, it is determined that there is no dangerous heating trend.

[0076] In another example of the above optional method, determining whether there is a dangerous heating trend based on temperature, temperature change rate, temperature acceleration, and power consumption change rate can also be: if the temperature is greater than the second temperature threshold and one of the following conditions is met: the temperature change rate is greater than the preset temperature change rate, the temperature acceleration is greater than the preset acceleration, or the power consumption change rate is greater than the preset power consumption change rate, a dangerous heating trend is determined to exist; otherwise, a dangerous heating trend is determined not to exist.

[0077] Optionally, the temperature change rate reflects the degree of temperature change per unit time. The temperature change rate can be determined by obtaining the current chip temperature and the previous chip temperature, and then calculating the current chip temperature minus the previous chip temperature to obtain the temperature change rate.

[0078] Optionally, the temperature acceleration reflects the stability of temperature change. The temperature acceleration can be determined by the following method: obtain the current temperature of the chip, the previous temperature of the chip, and the temperature before the previous temperature of the chip; calculate T[0] - 2×T[1]+ T[2] to obtain the temperature acceleration. Here, T[0] is the current temperature, T[1] is the previous temperature, and T[2] is the temperature before the previous temperature. Here, the temperature obtained based on the previous temperature is the temperature before the previous temperature.

[0079] Optionally, the power consumption change rate reflects the degree of change in power consumption per unit time. The power consumption change rate can be determined by the following method: obtain the current instantaneous power consumption value and the previous instantaneous power consumption value, and calculate the current instantaneous power consumption value minus the previous instantaneous power consumption value to obtain the power consumption change rate.

[0080] Exemplarily, the temperature, temperature change rate, temperature acceleration, and power consumption change rate of the chip can be stored in 4 different registers respectively. When the corresponding data is needed, it is read from the corresponding register.

[0081] Exemplarily again, the temperature change rate, temperature acceleration, and power consumption change rate can be re-determined every third preset time period, and the values stored in the register are replaced with the re-determined temperature change rate, temperature acceleration, and power consumption change rate.

[0082] Here, the third preset time period can be set by technicians according to experience, for example: 10 microseconds.

[0083] In the above optional method, the temperature intervention suggestion further includes: the adjustment range. When it is determined that there is a dangerous temperature rising trend, the adjustment range is determined according to the temperature change rate.

[0084] Optionally, determining the adjustment range according to the temperature change rate can be: searching for the adjustment range corresponding to the temperature change rate in a preset amplitude database.

[0085] Here, the amplitude database stores the corresponding relationship between the temperature change rate and the adjustment range.

[0086] Exemplarily, the amplitude database can store the corresponding relationship between the temperature change rate and the adjustment range. For example: when 5℃ / ms < U ≤ 8℃ / ms, the adjustment range is 10%. When 8℃ / ms < U ≤ 12℃ / ms, the adjustment range is 20%. When 12℃ / ms ≤ U, the adjustment range is 30%. Here, U is the temperature change rate.

[0087] In some embodiments, after obtaining the temperature intervention suggestion, the temperature intervention suggestion can be stored in a preset register, and the register can be a read-only register or a status register.

[0088] In one alternative approach, the temperature intervention suggestion is used to describe whether to increase the target fan adjustment parameter, and to describe the adjustment range. Adjusting the fan based on the temperature intervention suggestion and the target fan adjustment parameter can be as follows: if the temperature intervention suggestion indicates an increase in the target fan adjustment parameter, increase the adjustment range of the target fan adjustment parameter to obtain a first parameter to be adjusted; adjust the fan according to the first parameter to be adjusted.

[0089] Optionally, increasing the adjustment range of the target fan adjustment parameter to obtain the first parameter to be adjusted can be achieved by: using the product of the target fan adjustment parameter and the adjustment range as the first adjustment parameter; or using the sum of the target fan adjustment parameter and the first adjustment parameter as the first parameter to be adjusted.

[0090] For example, assuming the target fan adjustment parameter is fan speed A, the fan speed is multiplied by the adjustment range to obtain fan speed B. The sum of fan speed A and fan speed B is determined as the first parameter to be adjusted.

[0091] For another example, assuming the target fan adjustment parameter is the PWM duty cycle C corresponding to the fan speed, the PWM duty cycle C is multiplied by the adjustment magnitude to obtain the PWM duty cycle D. The sum of the PWM duty cycle C and the PWM duty cycle D is determined as the first parameter to be adjusted.

[0092] In another alternative approach, the temperature intervention suggestion is used only to describe whether to increase the target fan adjustment parameter. Adjusting the fan based on the temperature intervention suggestion and the target fan adjustment parameter can be as follows: if the temperature intervention suggestion indicates an increase in the target fan adjustment parameter, increase the target fan adjustment parameter by a preset amount to obtain a second parameter to be adjusted; adjust the fan according to the second parameter to be adjusted.

[0093] Optionally, the preset amplitude can be set by technicians based on their experience. For example, technicians can preset the amplitude to 5%, or they can set it to 15%.

[0094] For example, suppose the preset amplitude is 5%. In this round of adjustment, the target fan adjustment parameter is obtained as E, and the temperature intervention suggestion describes increasing the target fan adjustment parameter. Therefore, the target fan adjustment parameter E is increased by 5%, resulting in a second parameter to be adjusted, F. The fan is then adjusted according to the second parameter to be adjusted, F. In the next round of adjustment, the target fan adjustment parameter is obtained as G, and the temperature intervention suggestion describes increasing the target fan adjustment parameter. Therefore, the target fan adjustment parameter G is increased by 5%, resulting in a second parameter to be adjusted, H. The fan is then adjusted according to the second parameter to be adjusted, H.

[0095] Optionally, increasing the target fan adjustment parameter by a preset range to obtain a second parameter to be adjusted can be achieved by: using the product of the target fan adjustment parameter and the adjustment range as the second adjustment parameter; or using the sum of the target fan adjustment parameter and the second adjustment parameter as the second parameter to be adjusted.

[0096] For example, assume the third preset duration is 10 microseconds. The chip's current temperature and current instantaneous power consumption are acquired every 10 microseconds. At the same time, the chip's temperature for two cycles is retained, that is, the history of the past 20 microseconds is retained, that is, the chip's previous temperature and the temperature before that are retained, and the chip's instantaneous power consumption for one cycle is retained, that is, the chip's previous instantaneous power consumption value.

[0097] Assuming the second temperature threshold is 65℃, the preset temperature change rate is 5℃ / ms, the temperature acceleration is 0.3, and the preset power consumption change rate is 200W. Simultaneously, assuming the chip's current temperature is 68.3℃ and its current instantaneous power consumption is 620W, the chip's temperature rises from 67.9℃ to 68.0℃ and then back to 68.3℃, resulting in a calculated temperature change rate of 3.0℃ / ms and a calculated temperature acceleration of 0.2. The chip's instantaneous power consumption jumps from 300W to 620W, resulting in a calculated power consumption change rate of 280W. At this point, the temperature change rate is less than the preset temperature change rate, indicating no dangerous temperature rise trend, and the temperature intervention recommendation is set to the second value. The second value is stored in the register storing the temperature intervention recommendation.

[0098] Assuming a second temperature threshold of 65℃, a preset temperature change rate of 5℃ / ms, a temperature acceleration of 0.6, and a preset power consumption change rate of 300W, and given that the chip's current temperature is 68.8℃ and its current instantaneous power consumption is 620W, the chip's temperature rises from 67.9℃ to 68.0℃ and then to 69℃, resulting in a calculated temperature change rate of 10.0℃ / ms and a calculated temperature acceleration of 0.9. The chip's instantaneous power consumption jumps from 300W to 700W, resulting in a calculated power consumption change rate of 400W.

[0099] At this point, if the following conditions are met: the current temperature "69℃" is greater than the second temperature threshold "65℃", the temperature change rate "10.0℃ / ms" is greater than the preset temperature change rate "5℃ / ms", the temperature acceleration "0.9" is greater than the preset acceleration "0.6", and the power consumption change rate "400W" is greater than the preset power consumption change rate "300W", a dangerous temperature rise trend is determined, and the temperature intervention recommendation is set to the first value. Simultaneously, the adjustment range corresponding to the temperature change rate "10.0℃ / ms", for example, "20%", is searched in the preset range database. The first value is stored in the register storing the temperature intervention recommendation, and the adjustment range value "20%" is written. Every third preset time interval, for example, 10 microseconds, the chip's current temperature and current instantaneous power consumption are re-acquired, and the values ​​stored in the register storing the temperature intervention recommendation are updated.

[0100] In some embodiments, after adjusting the fan according to the target fan adjustment parameters, the fan adjustment method further includes: when the target fan adjustment parameters represent the maximum fan speed, after waiting for a second preset time, continuing to acquire the chip temperature at intervals of a first preset time, and determining alternative fan adjustment parameters based on the temperature.

[0101] In the above embodiments, the second preset duration can be determined by: obtaining the heat dissipation index of the fan; and determining the second preset duration based on the heat dissipation index.

[0102] Optionally, heat dissipation metrics may include airflow (the volume of air a fan can deliver per unit time) and / or fan speed per unit time.

[0103] Optionally, determining the second preset duration based on the heat dissipation index can be achieved by searching for the second preset duration corresponding to the heat dissipation index in a preset heat dissipation duration database.

[0104] The heat dissipation duration database stores the correspondence between heat dissipation indicators and the second preset duration.

[0105] Alternatively, the second preset duration can be determined based on the heat dissipation index, or the second preset duration can be obtained by calculating the heat dissipation index using a preset second fitting algorithm.

[0106] For example, technicians can set a correspondence between certain heat dissipation indicators and a second preset duration. Based on this correspondence, a second fitting algorithm is formed that reflects the relationship between the heat dissipation indicators and the second preset duration. In use, the heat dissipation indicators of the fan are input into this second fitting algorithm to obtain the corresponding second preset duration.

[0107] For example, assume the fan adjustment parameter is the PWM duty cycle corresponding to the fan; combined with Figure 2As shown in the figure, this application provides a method for adjusting a fan, including: S201, obtain the target fan adjustment parameters, and then execute S202.

[0108] S202, determine whether the current fan parameters are equal to the target fan adjustment parameters. If the current fan parameters are equal to the target fan adjustment parameters, proceed to S206; if the current fan parameters are not equal to the target fan adjustment parameters, proceed to S203.

[0109] S203, adjust the fan's PWM duty cycle to the target fan adjustment parameters.

[0110] S204, determine whether the target fan adjustment parameter is 100%; if the target fan adjustment parameter is 100%, execute S205; if the target fan adjustment parameter is not 100%, execute S206.

[0111] S205, waiting for the second preset time.

[0112] S206, End.

[0113] In some implementations, the hardware interrupt signal can be in an interrupt-masked state when the alternative fan adjustment parameters represent the maximum fan speed; and in an interrupt-enabled state when the alternative fan adjustment parameters do not represent the maximum fan speed.

[0114] For example, in combination Figure 3 As shown, Figure 3 During the process shown, the hardware interrupt signal is not triggered. This application embodiment provides a fan adjustment method, including: S301, system initialization, then execute S302.

[0115] S302: Check if the duration after adjusting the fan reaches the second preset duration. If it does, proceed to S303; otherwise, continue to proceed to S302.

[0116] S303: Obtain the chip temperature, then execute S304.

[0117] S304, determine the alternative fan adjustment parameters based on the temperature, and then execute S305.

[0118] S305: Select alternative fan adjustment parameters as target fan adjustment parameters, and adjust the fan according to the target fan adjustment parameters.

[0119] S306, determine if the target fan adjustment parameter is 100%. If it is 100%, proceed to S309. If it is not 100%, proceed to S307.

[0120] S307: Determine whether the hardware interrupt signal is in an interrupt-masked state. If it is in an interrupt-masked state, proceed to S308. If it is not in an interrupt-masked state, proceed to S311.

[0121] S308 sets the hardware interrupt signal to the interrupt enabled state, and executes S311.

[0122] S309: Determine whether the hardware interrupt signal is in an interrupt-masked state; if it is in an interrupt-masked state, execute S311; if it is not in an interrupt-masked state, execute S310.

[0123] S310 sets the hardware interrupt signal to interrupt masking state, and then executes S311.

[0124] S311, End.

[0125] In some embodiments, when the temperature is greater than or equal to a first temperature threshold, the hardware interrupt signal is put into an interrupt-masked state; when the temperature is less than the first temperature threshold, the hardware interrupt signal is put into an interrupt-enabled state.

[0126] Combination Figure 4 As shown, Figure 4 During the process shown, the hardware interrupt signal is not triggered. For example, this application embodiment provides a fan adjustment method, including: S401, system initialization, then execute S402.

[0127] S402: Check if the duration after adjusting the fan reaches the second preset duration. If it does, proceed to S403; otherwise, continue to proceed to S402.

[0128] S403: Obtain the chip temperature, and then execute S403.

[0129] S404, determine whether the temperature is greater than the first temperature threshold. If it is, execute S409; if it is not, execute S405.

[0130] S405: Determine whether the hardware interrupt signal is in an interrupt-masked state. If it is in an interrupt-masked state, execute S408; if it is not in an interrupt-masked state, execute S406.

[0131] S406 determines the adjustment parameters of the alternative fan based on the temperature.

[0132] S407: Select alternative fan adjustment parameters as target fan adjustment parameters, and adjust the fan according to the target fan adjustment parameters.

[0133] S408 sets the hardware interrupt signal to the interrupt enabled state, and then executes S406.

[0134] S409, determine whether the hardware interrupt signal is in an interrupt-masked state; if it is in an interrupt-masked state, execute S406; if it is not in an interrupt-masked state, execute S410.

[0135] S410 sets the hardware interrupt signal to interrupt masking state, and then executes S406.

[0136] For example, in combination Figure 5 and Figure 6 As shown, Figure 5 This is a graph showing the temperature trend of the chip when only a polling mechanism is used, i.e., the response of the original solution to temperature spikes. Figure 6 This is a graph showing the trend of chip temperature change when using the method of this application, i.e., the response of the new scheme to temperature surge. Figure 5 and Figure 6 In the diagram, the horizontal axis represents the change over time, the vertical axis on the left represents the chip core temperature, and the vertical axis on the right represents the fan speed duty cycle, which reflects the fan speed.

[0137] If only the polling mechanism is used: when the chip core temperature rises to 77 degrees, it is in a polling interval and no action is taken in time. After the next polling mechanism sets the fan speed duty cycle to 90%, it immediately encounters a sudden temperature rise and no action is taken in time. It waits for the next polling mechanism to set the fan speed duty cycle to 100%, and the temperature rises to a maximum of 89 degrees before slowly decreasing until it reaches a stable level.

[0138] Using the solution in this application: when the chip core temperature rises to 76 degrees, it is in a polling interval and is not processed in time. After the next polling mechanism sets the fan speed duty cycle to 90%, it immediately encounters a sudden temperature rise scenario. At this time, the temperature interrupt is triggered, and the fan speed duty cycle is directly set to 100%. The temperature rises to a maximum of 84 degrees, and then begins to slowly decrease until it reaches a stable level.

[0139] Compared to using only a polling mechanism, this application can effectively suppress temperature spikes of 5-10℃, which is beneficial to product competitiveness.

[0140] Combination Figure 7 As shown in the embodiment of this application, a processor is also provided, including: a candidate parameter determination unit 1, an interrupt signal acquisition unit 2, a target parameter determination unit 3, and an adjustment unit 4.

[0141] The system includes: a candidate parameter determination unit 1, which acquires the chip temperature at first preset intervals and determines candidate fan adjustment parameters based on the temperature; an interrupt signal acquisition unit 2, which acquires the chip's hardware interrupt signal during the periodic determination of candidate fan adjustment parameters; the hardware interrupt signal is generated by a preset interrupt trigger circuit when the temperature reaches a first temperature threshold; a target parameter determination unit 3, which determines the target fan adjustment parameters based on the hardware interrupt signal and the candidate fan adjustment parameters; and an adjustment unit 4, which adjusts the fan according to the target fan adjustment parameters.

[0142] Based on the same inventive concept, this embodiment provides a chip, including: an interrupt triggering circuit for generating a hardware interrupt signal when the chip's temperature reaches a first temperature threshold; and a power management module connected to the interrupt triggering circuit, which acquires the temperature at first preset intervals and determines alternative fan adjustment parameters based on the temperature; acquires the chip's hardware interrupt signal during the periodic determination of alternative fan adjustment parameters; determines target fan adjustment parameters based on the hardware interrupt signal and the alternative fan adjustment parameters; and adjusts the fan according to the target fan adjustment parameters.

[0143] In some embodiments, the interrupt triggering circuit may include: a threshold register for storing a first temperature threshold; a digital-to-analog converter connected to the threshold register and the temperature comparison unit, the digital-to-analog converter being used to convert the first temperature threshold into an analog threshold; an on-chip temperature acquisition unit connected to the temperature comparison unit, the on-chip temperature acquisition unit being used to acquire the temperature of the chip; and a temperature comparison unit for comparing the first temperature threshold with the temperature, and generating a hardware interrupt signal when the temperature reaches the first temperature threshold.

[0144] Based on the same inventive concept, this application also provides an electronic device, which may include the chip provided in the foregoing embodiments.

[0145] The electronic device includes, but is not limited to, computers, servers, industrial control computers, and other devices that include processors, and is not limited to these.

[0146] The technical solutions of this application embodiment can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this application embodiment. The aforementioned storage medium can be a non-transitory storage medium, including various media capable of storing program code such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks, or it can be a transient storage medium.

[0147] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0148] In the embodiments provided in this application, it should be understood that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data used can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. Unless otherwise stated, the term "a plurality of" means two or more. The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B. The term "corresponding" can refer to an association or binding relationship; A corresponding to B means that there is an association or binding relationship between A and B.

[0149] The above descriptions are merely embodiments of this application and are not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. Furthermore, the above embodiments can be combined with each other to form new embodiments without conflict.

Claims

1. A fan regulation method characterized by, The method comprises: acquiring the temperature of the chip every first preset time length, and determining an alternative fan adjustment parameter according to the temperature; in the process of periodically determining the alternative fan adjustment parameter, a hardware interrupt signal of the chip is acquired; the hardware interrupt signal is generated by a preset interrupt trigger circuit when the temperature reaches a first temperature threshold; determining a target fan adjustment parameter according to the hardware interrupt signal and the alternative fan adjustment parameter; adjusting the fan according to the target fan adjustment parameter.

2. The method of claim 1, wherein, The method comprises: looking up the alternative fan adjustment parameter corresponding to the temperature in a preset parameter adjustment database; wherein the parameter adjustment database stores the corresponding relationship between the temperature and the alternative fan adjustment parameter.

3. The method of claim 1, wherein, The method comprises: in the case of acquiring the hardware interrupt signal and enabling the interrupt, determining a fan parameter representing the maximum fan rotating speed as the target fan adjustment parameter; in the case of acquiring the hardware interrupt signal and masking the interrupt, or not acquiring the hardware interrupt signal, determining the alternative fan adjustment parameter as the target fan adjustment parameter.

4. The method of claim 3, wherein, After determining the fan parameter representing the maximum fan rotating speed as the target fan adjustment parameter, the method further comprises: masking the hardware interrupt signal.

5. The method of claim 1, wherein, The method further comprises: in the case that the alternative fan adjustment parameter represents the maximum fan rotating speed, masking the hardware interrupt signal; in the case that the alternative fan adjustment parameter does not represent the maximum fan rotating speed, enabling the hardware interrupt signal.

6. The method according to any one of claims 1 to 5, characterized in that, After adjusting the fan according to the target fan adjustment parameter, the method further comprises: in the case that the target fan adjustment parameter represents the maximum fan rotating speed, waiting for a second preset time length, and then acquiring the temperature of the chip every first preset time length, and determining an alternative fan adjustment parameter according to the temperature.

7. The method of claim 6, wherein, The method further comprises: acquiring a heat dissipation index of the fan; determining the second preset time length according to the heat dissipation index.

8. The method of claim 7, wherein, The method comprises: looking up the second preset time length corresponding to the heat dissipation index in a preset heat dissipation time length database; wherein the heat dissipation time length database stores the corresponding relationship between the heat dissipation index and the second preset time length.

9. The method of claim 1, wherein, The method further comprises: in the case that the temperature is greater than the first temperature threshold, masking the hardware interrupt signal; in the case that the temperature is less than the first temperature threshold, enabling the hardware interrupt signal.

10. The method according to any one of claims 1 to 5, characterized in that, The method comprises: acquiring a temperature intervention suggestion; the temperature intervention suggestion is used to describe whether to increase the target fan adjustment parameter; adjusting the fan according to the temperature intervention suggestion and the target fan adjustment parameter.

11. The method of claim 10, wherein, The method further comprises: acquiring the temperature, temperature change rate, temperature acceleration and power consumption change rate of the chip; determining whether there is a dangerous temperature rising trend according to the temperature, the temperature change rate, the temperature acceleration and the power consumption change rate; in the case where there is a dangerous temperature rising trend, determining that a temperature intervention suggestion is a first value; the first value is used to describe increasing the target fan adjustment parameter; in the case where there is no dangerous temperature rising trend, determining that a temperature intervention suggestion is a second value; the second value is used to describe not increasing the target fan adjustment parameter.

12. The method of claim 11, wherein, determining whether there is a dangerous temperature rising trend according to the temperature, the temperature change rate, the temperature acceleration and the power consumption change rate, comprising: in the case where the temperature is greater than a second temperature threshold, the temperature change rate is greater than a preset temperature change rate, the temperature acceleration is greater than a preset acceleration, and the power consumption change rate is greater than a preset power consumption change rate, determining that there is a dangerous temperature rising trend; otherwise, determining that there is no dangerous temperature rising trend.

13. The method of claim 10, wherein, the temperature intervention suggestion is also used to describe an adjustment amplitude; adjusting a fan according to the temperature intervention suggestion and the target fan adjustment parameter, comprising: in the case where the temperature intervention suggestion represents increasing the target fan adjustment parameter, increasing an adjustment amplitude on the target fan adjustment parameter to obtain a first to-be-adjusted parameter; adjusting the fan according to the first to-be-adjusted parameter.

14. A processor, comprising: comprising: an alternative parameter determination unit, configured to acquire a temperature of a chip every interval of a first preset time length, and determine an alternative fan adjustment parameter according to the temperature; an interrupt signal acquisition unit, configured to acquire a hardware interrupt signal of the chip in a process of periodically determining the alternative fan adjustment parameter; the hardware interrupt signal is generated by a preset interrupt trigger circuit when the temperature reaches a first temperature threshold; a target parameter determination unit, configured to determine a target fan adjustment parameter according to the hardware interrupt signal and the alternative fan adjustment parameter; an adjustment unit, configured to adjust a fan according to the target fan adjustment parameter.

15. A chip, characterized by comprising: an interrupt trigger circuit, configured to generate a hardware interrupt signal when a temperature of a chip reaches a first temperature threshold; a power management module, connected with the interrupt trigger circuit, configured to acquire the temperature every interval of a first preset time length, and determine an alternative fan adjustment parameter according to the temperature; and acquire a hardware interrupt signal of the chip in a process of periodically determining the alternative fan adjustment parameter; determine a target fan adjustment parameter according to the hardware interrupt signal and the alternative fan adjustment parameter; and adjust a fan according to the target fan adjustment parameter.

16. The chip of claim 15, wherein, the interrupt trigger circuit comprises: a threshold register, configured to store the first temperature threshold; a digital-to-analog conversion unit, connected with the threshold register and a temperature comparison unit, and configured to convert the first temperature threshold into an analog threshold; an on-chip temperature acquisition unit, connected with the temperature comparison unit, and configured to acquire a temperature of the chip; the temperature comparison unit is configured to compare the first temperature threshold and the temperature, and generate the hardware interrupt signal in the case where the temperature reaches the first temperature threshold.

17. An electronic device, comprising: comprising: the chip according to any one of claims 15 or 16, and a fan connected with the chip.