TWI893884B - Voltage and frequency control system, method, computer-readable storage medium - Google Patents
Voltage and frequency control system, method, computer-readable storage mediumInfo
- Publication number
- TWI893884B TWI893884B TW113125189A TW113125189A TWI893884B TW I893884 B TWI893884 B TW I893884B TW 113125189 A TW113125189 A TW 113125189A TW 113125189 A TW113125189 A TW 113125189A TW I893884 B TWI893884 B TW I893884B
- Authority
- TW
- Taiwan
- Prior art keywords
- power consumption
- performance
- supply voltage
- module
- frequency
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05F—SYSTEMS FOR REGULATING ELECTRIC OR MAGNETIC VARIABLES
- G05F1/00—Automatic systems in which deviations of an electric quantity from one or more predetermined values are detected at the output of the system and fed back to a device within the system to restore the detected quantity to its predetermined value or values, i.e. retroactive systems
- G05F1/10—Regulating voltage or current
- G05F1/46—Regulating voltage or current wherein the variable actually regulated by the final control device is DC
- G05F1/56—Regulating voltage or current wherein the variable actually regulated by the final control device is DC using semiconductor devices in series with the load as final control devices
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Automation & Control Theory (AREA)
- Power Sources (AREA)
Abstract
Description
本公開涉及晶片領域,尤其涉及一種電壓及頻率控制系統、方法、電腦可讀儲存媒體。The present disclosure relates to the field of chips, and more particularly to a voltage and frequency control system, method, and computer-readable storage medium.
資料中心、工作站、高性能電腦以及移動設備等通常採用系統級晶片(system on chip,SoC),因此SoC的功耗管理一直是備受關注的問題。如何使得SoC能夠在給定的功耗預算下提供最高的運算性能,或在滿足一定的算力要求下最大程度的降低功耗,是設備性能的重要優化目標。Data centers, workstations, high-performance computers, and mobile devices often utilize system-on-chips (SoCs). Therefore, SoC power management has always been a matter of great concern. Enabling SoCs to deliver the highest computing performance within a given power budget, or minimizing power consumption while meeting certain computing requirements, is a key goal in optimizing device performance.
SoC的性能和功耗和其包括的主要功能部件(即計算模組)的供電電壓和工作時鐘頻率直接相關。傳統的功耗控制方案中,確定一次最優的供電電壓和工作時鐘頻率耗費時間較多,導致控制週期長、控制效率低,且準確性也較差,導致晶片的性能得不到充分發揮。The performance and power consumption of an SoC are directly related to the supply voltage and operating frequency of its primary functional components (i.e., the computing module). Traditional power control solutions require a significant amount of time to determine the optimal supply voltage and operating frequency, resulting in long control cycles, low efficiency, and poor accuracy, hindering the full performance of the chip.
有鑑於此,本公開提出了一種電壓及頻率控制系統、方法、電腦可讀儲存媒體,根據本公開實施例的電壓及頻率控制系統,通過內環的即時頻率控制實現了減少電路時序冗餘,最大化提升性能和優化控制的效率,通過外環的週期性電壓控制及週期性頻率控制提高了控制的準確度,從而能夠使得性能的提高效果或者功耗的降低效果更優。In view of this, the present disclosure proposes a voltage and frequency control system, method, and computer-readable storage medium. According to the voltage and frequency control system of the embodiments of the present disclosure, real-time frequency control in the inner loop is used to reduce circuit timing redundancy, maximize performance, and optimize control efficiency. Periodic voltage control and periodic frequency control in the outer loop are used to improve control accuracy, thereby achieving better performance improvement or power consumption reduction.
根據本公開的一方面,提供了一種電壓及頻率控制系統,所述系統包括延時檢測模組、頻率控制模組、性能統計模組、性能和功耗等級控制模組,所述系統用於控制計算模組的時鐘頻率和供電電壓,所述延時檢測模組用於即時檢測所述計算模組的電路延時,並輸出所述電路延時至所述頻率控制模組;所述頻率控制模組用於根據當前供電電壓和所述電路延時,控制輸出到所述計算模組的時鐘信號的頻率,所述當前供電電壓由所述性能和功耗等級控制模組提供;所述性能統計模組用於週期性檢測所述計算模組的性能,獲得實際性能並輸出至所述性能和功耗等級控制模組;所述性能和功耗等級控制模組用於根據預設的性能目標和所述實際性能,控制輸出到所述頻率控制模組和所述計算模組的供電電壓。According to one aspect of the present disclosure, a voltage and frequency control system is provided, the system comprising a delay detection module, a frequency control module, a performance statistics module, and a performance and power consumption level control module. The system is used to control the clock frequency and power supply voltage of a computing module. The delay detection module is used to detect the circuit delay of the computing module in real time and output the circuit delay to the frequency control module. The frequency control module is used to adjust the circuit delay according to the current power supply voltage and the circuit. The module controls the frequency of the clock signal output to the computing module, and the current power supply voltage is provided by the performance and power consumption level control module. The performance statistics module is used to periodically detect the performance of the computing module, obtain the actual performance and output it to the performance and power consumption level control module. The performance and power consumption level control module is used to control the power supply voltage output to the frequency control module and the computing module according to a preset performance target and the actual performance.
在一種可能的實現方式中,所述延時檢測模組和所述計算模組物理上保持相同工藝特性、供電電壓、器件溫度的工作條件,所述即時檢測所述計算模組的電路延時,包括:即時檢測當前工藝特性、當前供電電壓、當前器件溫度的工作條件下自身的電路延時,作為所述計算模組的電路延時。In one possible implementation, the delay detection module and the computing module physically maintain the same operating conditions of process characteristics, power supply voltage, and device temperature. The real-time detection of the circuit delay of the computing module includes: real-time detection of its own circuit delay under the current working conditions of process characteristics, current power supply voltage, and current device temperature as the circuit delay of the computing module.
在一種可能的實現方式中,所述根據當前供電電壓和所述電路延時,控制輸出到所述計算模組的時鐘信號的頻率,包括:確定所述當前供電電壓和所述電路延時下的頻率最大值,控制輸出到所述計算模組的時鐘信號的頻率等於所述頻率最大值。In one possible implementation, controlling the frequency of the clock signal output to the computing module based on the current power supply voltage and the circuit delay includes: determining a maximum frequency under the current power supply voltage and the circuit delay, and controlling the frequency of the clock signal output to the computing module to be equal to the maximum frequency.
在一種可能的實現方式中,所述性能目標和所述實際性能之差大於第一閾值時,所述性能和功耗等級控制模組還用於輸出第一時鐘控制指令到所述頻率控制模組;所述頻率控制模組還用於根據所述第一時鐘控制指令,控制所述時鐘信號的頻率的數值提高第二閾值;所述實際性能和所述性能目標之差大於第一閾值時,所述性能和功耗等級控制模組還用於輸出第二時鐘控制指令到所述頻率控制模組;所述頻率控制模組還用於根據所述第二時鐘控制指令,控制所述計算模組的時鐘信號的頻率的數值降低第三閾值。In one possible implementation, when the difference between the performance target and the actual performance is greater than a first threshold, the performance and power consumption level control module is further used to output a first clock control instruction to the frequency control module; the frequency control module is further used to control the frequency value of the clock signal to increase by a second threshold according to the first clock control instruction; when the difference between the actual performance and the performance target is greater than the first threshold, the performance and power consumption level control module is further used to output a second clock control instruction to the frequency control module; the frequency control module is further used to control the frequency value of the clock signal of the computing module to decrease by a third threshold according to the second clock control instruction.
在一種可能的實現方式中,所述性能和功耗等級控制模組預先設置有多個等級的電壓值,電壓值等級越高時電壓值越大,所述根據預設的性能目標和所述實際性能,控制輸出到所述頻率控制模組和所述計算模組的供電電壓,包括:當所述性能目標大於所述實際性能時,控制輸出的所述供電電壓的電壓值等級提高;當所述性能目標小於所述實際性能時,控制輸出的所述供電電壓的電壓值等級降低。In one possible implementation, the performance and power consumption level control module is pre-set with multiple levels of voltage values, and the higher the voltage level, the larger the voltage value. The power supply voltage output to the frequency control module and the calculation module is controlled according to the preset performance target and the actual performance, including: when the performance target is greater than the actual performance, the voltage value level of the output power supply voltage is controlled to increase; when the performance target is less than the actual performance, the voltage value level of the output power supply voltage is controlled to decrease.
在一種可能的實現方式中,所述系統還包括功耗統計模組,所述功耗統計模組用於週期性檢測所述計算模組的功耗,獲得實際功耗並輸出至所述頻率控制模組和所述性能和功耗等級控制模組;所述頻率控制模組還用於根據預設的功耗基準和所述實際功耗,控制輸出到所述計算模組的時鐘信號的頻率,使所述計算模組在所述頻率下工作時的第一功耗估計值未超出所述功耗基準;所述性能和功耗等級控制模組還用於根據預設的功耗基準和所述實際功耗,控制輸出到所述頻率控制模組和所述計算模組的供電電壓。In one possible implementation, the system further includes a power consumption statistics module, which is used to periodically detect the power consumption of the computing module, obtain actual power consumption and output it to the frequency control module and the performance and power consumption level control module; the frequency control module is also used to control the frequency of the clock signal output to the computing module based on a preset power consumption benchmark and the actual power consumption, so that the first power consumption estimate of the computing module when operating at the frequency does not exceed the power consumption benchmark; the performance and power consumption level control module is also used to control the power supply voltage output to the frequency control module and the computing module based on the preset power consumption benchmark and the actual power consumption.
在一種可能的實現方式中,所述根據預設的功耗基準和所述實際功耗,控制輸出到所述計算模組的時鐘信號的頻率,包括:當所述實際功耗與所述功耗基準之差大於第四閾值時,控制輸出的所述時鐘信號的頻率等於所述頻率最大值與預設係數的乘積,所述預設係數的數值小於1。In one possible implementation, controlling the frequency of the clock signal output to the computing module based on a preset power consumption benchmark and the actual power consumption includes: when the difference between the actual power consumption and the power consumption benchmark is greater than a fourth threshold, controlling the frequency of the output clock signal to be equal to the product of the maximum frequency and a preset coefficient, where the value of the preset coefficient is less than 1.
在一種可能的實現方式中,所述性能和功耗等級控制模組預先設置有多個等級的電壓值,電壓值等級越高時電壓值越大,所述根據預設的性能目標和所述實際性能,控制輸出到所述頻率控制模組和所述計算模組的供電電壓,包括:當所述性能目標大於所述實際性能時,確定第一目標供電電壓的電壓值等級,使所述第一目標供電電壓的電壓值等級高於當前供電電壓的電壓值等級;當所述性能目標小於所述實際性能時,確定第一目標供電電壓的電壓值等級,使所述第一目標供電電壓的電壓值等級低於當前供電電壓的電壓值等級;確定所述計算模組在所述第一目標供電電壓下工作時的第一功耗估計值;在所述第一功耗估計值小於所述功耗基準時,控制輸出到所述頻率控制模組和所述計算模組的供電電壓等於所述第一目標供電電壓;在所述第一功耗估計值大於所述功耗基準時,根據預設的功耗基準和所述實際功耗,控制輸出到所述頻率控制模組和所述計算模組的供電電壓。In one possible implementation, the performance and power consumption level control module is pre-set with multiple levels of voltage values, and the higher the voltage level, the greater the voltage value. The control of the power supply voltage output to the frequency control module and the calculation module based on the preset performance target and the actual performance includes: when the performance target is greater than the actual performance, determining the voltage value level of the first target power supply voltage, so that the voltage value level of the first target power supply voltage is higher than the voltage value level of the current power supply voltage; when the performance target is less than the actual performance, determining the first target power supply voltage voltage level of the first target power supply voltage so that the voltage level of the first target power supply voltage is lower than the voltage level of the current power supply voltage; determining a first power consumption estimate when the calculation module operates under the first target power supply voltage; when the first power consumption estimate is less than the power consumption baseline, controlling the power supply voltage output to the frequency control module and the calculation module to be equal to the first target power supply voltage; when the first power consumption estimate is greater than the power consumption baseline, controlling the power supply voltage output to the frequency control module and the calculation module according to a preset power consumption baseline and the actual power consumption.
在一種可能的實現方式中,所述根據預設的功耗基準和所述實際功耗,控制輸出到所述頻率控制模組和所述計算模組的供電電壓,包括:當所述實際功耗與所述功耗基準之差大於第五閾值時,確定第二目標供電電壓的電壓值等級,使所述計算模組在所述第二目標供電電壓下工作時的第二功耗估計值小於所述功耗基準、且所述第二功耗估計值與所述功耗基準之差最小;控制輸出到所述頻率控制模組和所述計算模組的供電電壓等於所述第二目標供電電壓。In one possible implementation, controlling the power supply voltage output to the frequency control module and the computing module based on a preset power consumption benchmark and the actual power consumption includes: when the difference between the actual power consumption and the power consumption benchmark is greater than a fifth threshold, determining a voltage value level of a second target power supply voltage so that a second power consumption estimate of the computing module when operating at the second target power supply voltage is less than the power consumption benchmark and the difference between the second power consumption estimate and the power consumption benchmark is minimized; and controlling the power supply voltage output to the frequency control module and the computing module to be equal to the second target power supply voltage.
在一種可能的實現方式中,所述性能和功耗等級控制模組還用於,在當前週期結束時,根據所述當前週期獲得的實際性能、實際功耗、輸出的供電電壓的變化情況、輸出的指令中的一種或多種得到分析報告,所述分析報告用於調節下一週期使用的所述性能目標和所述功耗基準。In one possible implementation, the performance and power consumption level control module is further used to obtain an analysis report at the end of the current cycle based on one or more of the actual performance, actual power consumption, changes in the output power supply voltage, and output instructions obtained in the current cycle. The analysis report is used to adjust the performance target and the power consumption benchmark used in the next cycle.
根據本公開的另一方面,提供了一種電壓及頻率控制方法,所述方法應用於電壓及頻率控制系統,所述系統包括延時檢測模組、頻率控制模組、性能統計模組、性能和功耗等級控制模組,所述系統用於控制計算模組的時鐘頻率和供電電壓,所述方法包括:所述延時檢測模組即時檢測所述計算模組的電路延時,並輸出所述電路延時至所述頻率控制模組;所述頻率控制模組根據當前供電電壓和所述電路延時,控制輸出到所述計算模組的時鐘信號的頻率,所述當前供電電壓由所述性能和功耗等級控制模組提供;所述性能統計模組週期性檢測所述計算模組的性能,獲得實際性能並輸出至所述性能和功耗等級控制模組;所述性能和功耗等級控制模組根據預設的性能目標和所述實際性能,控制輸出到所述頻率控制模組和所述計算模組的供電電壓。According to another aspect of the present disclosure, a voltage and frequency control method is provided. The method is applied to a voltage and frequency control system. The system includes a delay detection module, a frequency control module, a performance statistics module, and a performance and power consumption level control module. The system is used to control the clock frequency and power supply voltage of a computing module. The method includes: the delay detection module detects the circuit delay of the computing module in real time and outputs the circuit delay to the frequency control module; the frequency control module The frequency of the clock signal output to the computing module is controlled based on the current power supply voltage and the circuit delay, wherein the current power supply voltage is provided by the performance and power consumption level control module. The performance statistics module periodically detects the performance of the computing module, obtains the actual performance and outputs it to the performance and power consumption level control module. The performance and power consumption level control module controls the power supply voltage output to the frequency control module and the computing module based on a preset performance target and the actual performance.
在一種可能的實現方式中,所述延時檢測模組和所述計算模組物理上保持相同工藝特性、供電電壓、器件溫度的工作條件,所述即時檢測所述計算模組的電路延時,包括:即時檢測當前工藝特性、當前供電電壓、當前器件溫度的工作條件下自身的電路延時,作為所述計算模組的電路延時。In one possible implementation, the delay detection module and the computing module physically maintain the same operating conditions of process characteristics, power supply voltage, and device temperature. The real-time detection of the circuit delay of the computing module includes: real-time detection of its own circuit delay under the current working conditions of process characteristics, current power supply voltage, and current device temperature as the circuit delay of the computing module.
在一種可能的實現方式中,所述根據當前供電電壓和所述電路延時,控制輸出到所述計算模組的時鐘信號的頻率,包括:確定所述當前供電電壓和所述電路延時下的頻率最大值,控制輸出到所述計算模組的時鐘信號的頻率等於所述頻率最大值。In one possible implementation, controlling the frequency of the clock signal output to the computing module based on the current power supply voltage and the circuit delay includes: determining a maximum frequency under the current power supply voltage and the circuit delay, and controlling the frequency of the clock signal output to the computing module to be equal to the maximum frequency.
在一種可能的實現方式中,所述方法還包括:所述性能目標和所述實際性能之差大於第一閾值時,所述性能和功耗等級控制模組輸出第一時鐘控制指令到所述頻率控制模組;所述頻率控制模組根據所述第一時鐘控制指令,控制所述時鐘信號的頻率的數值提高第二閾值;所述實際性能和所述性能目標之差大於第一閾值時,所述性能和功耗等級控制模組輸出第二時鐘控制指令到所述頻率控制模組;所述頻率控制模組根據所述第二時鐘控制指令,控制所述計算模組的時鐘信號的頻率的數值降低第三閾值。In one possible implementation, the method further includes: when the difference between the performance target and the actual performance is greater than a first threshold, the performance and power consumption level control module outputs a first clock control instruction to the frequency control module; the frequency control module controls the frequency value of the clock signal to increase by a second threshold based on the first clock control instruction; when the difference between the actual performance and the performance target is greater than the first threshold, the performance and power consumption level control module outputs a second clock control instruction to the frequency control module; the frequency control module controls the frequency value of the clock signal of the computing module to decrease by a third threshold based on the second clock control instruction.
在一種可能的實現方式中,所述性能和功耗等級控制模組預先設置有多個等級的電壓值,電壓值等級越高時電壓值越大,所述根據預設的性能目標和所述實際性能,控制輸出到所述頻率控制模組和所述計算模組的供電電壓,包括:當所述性能目標大於所述實際性能時,控制輸出的所述供電電壓的電壓值等級提高;當所述性能目標小於所述實際性能時,控制輸出的所述供電電壓的電壓值等級降低。In one possible implementation, the performance and power consumption level control module is pre-set with multiple levels of voltage values, and the higher the voltage level, the larger the voltage value. The power supply voltage output to the frequency control module and the calculation module is controlled according to the preset performance target and the actual performance, including: when the performance target is greater than the actual performance, the voltage value level of the output power supply voltage is controlled to increase; when the performance target is less than the actual performance, the voltage value level of the output power supply voltage is controlled to decrease.
在一種可能的實現方式中,所述系統還包括功耗統計模組,所述方法還包括:所述功耗統計模組週期性檢測所述計算模組的功耗,獲得實際功耗並輸出至所述頻率控制模組和所述性能和功耗等級控制模組;所述頻率控制模組根據預設的功耗基準和所述實際功耗,控制輸出到所述計算模組的時鐘信號的頻率,使所述計算模組在所述頻率下工作時的第一功耗估計值未超出所述功耗基準;所述性能和功耗等級控制模組根據預設的功耗基準和所述實際功耗,控制輸出到所述頻率控制模組和所述計算模組的供電電壓。In one possible implementation, the system further includes a power consumption statistics module, and the method further includes: the power consumption statistics module periodically detects the power consumption of the computing module, obtains actual power consumption and outputs it to the frequency control module and the performance and power consumption level control module; the frequency control module controls the frequency of the clock signal output to the computing module based on a preset power consumption benchmark and the actual power consumption, so that a first power consumption estimate of the computing module when operating at the frequency does not exceed the power consumption benchmark; the performance and power consumption level control module controls the power supply voltage output to the frequency control module and the computing module based on the preset power consumption benchmark and the actual power consumption.
在一種可能的實現方式中,所述根據預設的功耗基準和所述實際功耗,控制輸出到所述計算模組的時鐘信號的頻率,包括:當所述實際功耗與所述功耗基準之差大於第四閾值時,控制輸出的所述時鐘信號的頻率等於所述頻率最大值與預設係數的乘積,所述預設係數的數值小於1。In one possible implementation, controlling the frequency of the clock signal output to the computing module based on a preset power consumption benchmark and the actual power consumption includes: when the difference between the actual power consumption and the power consumption benchmark is greater than a fourth threshold, controlling the frequency of the output clock signal to be equal to the product of the maximum frequency and a preset coefficient, where the value of the preset coefficient is less than 1.
在一種可能的實現方式中,所述性能和功耗等級控制模組預先設置有多個等級的電壓值,電壓值等級越高時電壓值越大,所述根據預設的性能目標和所述實際性能,控制輸出到所述頻率控制模組和所述計算模組的供電電壓,包括:當所述性能目標大於所述實際性能時,確定第一目標供電電壓的電壓值等級,使所述第一目標供電電壓的電壓值等級高於當前供電電壓的電壓值等級;當所述性能目標小於所述實際性能時,確定第一目標供電電壓的電壓值等級,使所述第一目標供電電壓的電壓值等級低於當前供電電壓的電壓值等級;確定所述計算模組在所述第一目標供電電壓下工作時的第一功耗估計值;在所述第一功耗估計值小於所述功耗基準時,控制輸出到所述頻率控制模組和所述計算模組的供電電壓等於所述第一目標供電電壓;在所述第一功耗估計值大於所述功耗基準時,根據預設的功耗基準和所述實際功耗,控制輸出到所述頻率控制模組和所述計算模組的供電電壓。In one possible implementation, the performance and power consumption level control module is pre-set with multiple levels of voltage values, and the higher the voltage level, the greater the voltage value. The control of the power supply voltage output to the frequency control module and the calculation module based on the preset performance target and the actual performance includes: when the performance target is greater than the actual performance, determining the voltage value level of the first target power supply voltage, so that the voltage value level of the first target power supply voltage is higher than the voltage value level of the current power supply voltage; when the performance target is less than the actual performance, determining the first target power supply voltage voltage level of the first target power supply voltage so that the voltage level of the first target power supply voltage is lower than the voltage level of the current power supply voltage; determining a first power consumption estimate when the calculation module operates under the first target power supply voltage; when the first power consumption estimate is less than the power consumption baseline, controlling the power supply voltage output to the frequency control module and the calculation module to be equal to the first target power supply voltage; when the first power consumption estimate is greater than the power consumption baseline, controlling the power supply voltage output to the frequency control module and the calculation module according to a preset power consumption baseline and the actual power consumption.
在一種可能的實現方式中,所述根據預設的功耗基準和所述實際功耗,控制輸出到所述頻率控制模組和所述計算模組的供電電壓,包括:當所述實際功耗與所述功耗基準之差大於第五閾值時,確定第二目標供電電壓的電壓值等級,使所述計算模組在所述第二目標供電電壓下工作時的第二功耗估計值小於所述功耗基準、且所述第二功耗估計值與所述功耗基準之差最小;控制輸出到所述頻率控制模組和所述計算模組的供電電壓等於所述第二目標供電電壓。In one possible implementation, controlling the power supply voltage output to the frequency control module and the computing module based on a preset power consumption benchmark and the actual power consumption includes: when the difference between the actual power consumption and the power consumption benchmark is greater than a fifth threshold, determining a voltage value level of a second target power supply voltage so that a second power consumption estimate of the computing module when operating at the second target power supply voltage is less than the power consumption benchmark and the difference between the second power consumption estimate and the power consumption benchmark is minimized; and controlling the power supply voltage output to the frequency control module and the computing module to be equal to the second target power supply voltage.
在一種可能的實現方式中,所述方法還包括:所述性能和功耗等級控制模組在當前週期結束時,根據所述當前週期獲得的實際性能、實際功耗、輸出的供電電壓的變化情況、輸出的指令中的一種或多種得到分析報告,所述分析報告用於調節下一週期使用的所述性能目標和所述功耗基準。In one possible implementation, the method further includes: at the end of the current cycle, the performance and power consumption level control module obtains an analysis report based on one or more of the actual performance, actual power consumption, changes in the output power supply voltage, and output instructions obtained in the current cycle, and the analysis report is used to adjust the performance target and the power consumption benchmark used in the next cycle.
根據本公開的另一方面,提供了一種電腦可讀儲存媒體,其上儲存有電腦程式指令,其中,所述電腦程式指令被處理器執行時實現上述方法。According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
根據本公開的另一方面,提供了一種電腦程式產品,包括電腦可讀代碼,或者承載有電腦可讀代碼的電腦可讀儲存媒體,當所述電腦可讀代碼在電子設備的處理器中運行時,所述電子設備中的處理器執行上述方法。According to another aspect of the present disclosure, a computer program product is provided, comprising a computer-readable code, or a computer-readable storage medium carrying the computer-readable code. When the computer-readable code is executed in a processor of an electronic device, the processor in the electronic device executes the above method.
根據本公開實施例的電壓及頻率控制系統,相比檢測工藝、供電電壓、溫度,檢測電路延時所需的時間大大降低,從而提高檢測效率;電路延時特性決定了計算模組在一定供電電壓下的最高工作時鐘頻率,因此頻率控制模組使用供電電壓和延時控制時鐘信號的頻率,與使用工藝、供電電壓、溫度確定時鐘信號的頻率可達到同樣的準確度;電路延時即時獲取使得頻率控制模組也實現即時頻率控制,因此能夠在保證準確度的同時提高頻率的控制效率。性能統計模組週期性檢測計算模組的性能,獲得實際性能並輸出至性能和功耗等級控制模組,性能和功耗等級控制模組根據預設的性能目標和實際性能,控制輸出到頻率控制模組和計算模組的供電電壓,實現了週期性的供電電壓控制,形成了控制的閉環。且由於控制基於預設的性能目標和實際性能進行,因此對供電電壓的控制更為準確;而供電電壓對時鐘信號的頻率有直接影響,從而實現了更為準確的供電電壓和時鐘信號的頻率的調節。本公開實施例的電壓及頻率控制系統通過內環的延時檢測模組、頻率控制模組的即時頻率控制實現了減少電路時序冗餘,最大化提升性能,和優化控制的效率,通過外環的性能統計模組、性能和功耗等級控制模組進行週期性電壓控制及週期性頻率控制提高了控制的準確度,從而能夠兼顧性能和控制效率的提高,因此內環和外環的結合實現了效率和準確度的兼得,能夠使得性能的提高效果更優。According to the voltage and frequency control system of the disclosed embodiment, the time required to detect circuit delay is greatly reduced compared to detecting process, power supply voltage, and temperature, thereby improving detection efficiency. The circuit delay characteristics determine the maximum operating clock frequency of the calculation module under a certain power supply voltage. Therefore, the frequency control module uses the power supply voltage and delay to control the frequency of the clock signal, and can achieve the same accuracy as using the process, power supply voltage, and temperature to determine the frequency of the clock signal. The real-time acquisition of circuit delay enables the frequency control module to also achieve real-time frequency control, thereby improving frequency control efficiency while ensuring accuracy. The performance statistics module periodically monitors the performance of the compute module, obtains actual performance, and outputs this information to the performance and power level control module. Based on preset performance targets and actual performance, the performance and power level control module controls the supply voltage output to the frequency control module and the compute module, achieving periodic supply voltage control and forming a closed control loop. Because control is based on preset performance targets and actual performance, supply voltage control is more accurate. Since supply voltage has a direct impact on the frequency of the clock signal, this allows for more precise regulation of both the supply voltage and the clock signal frequency. The voltage and frequency control system of the disclosed embodiment reduces circuit timing redundancy, maximizes performance, and optimizes control efficiency through real-time frequency control by the inner-loop delay detection module and frequency control module. Cyclic voltage control and cyclic frequency control by the outer-loop performance statistics module and performance and power consumption level control module improve control accuracy, thereby achieving both performance and control efficiency improvements. Therefore, the combination of the inner and outer loops achieves both efficiency and accuracy, resulting in even greater performance improvements.
根據下面參考附圖對示例性實施例的詳細說明,本公開的其它特徵及方面將變得清楚。Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
以下將參考附圖詳細說明本公開的各種示例性實施例、特徵和方面。附圖中相同的附圖標記表示功能相同或相似的元件。儘管在附圖中示出了實施例的各種方面,但是除非特別指出,不必按比例繪製附圖。Various exemplary embodiments, features, and aspects of the present disclosure are described in detail below with reference to the accompanying drawings. Like reference numerals in the drawings indicate elements having the same or similar functions. Although various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
在這裡專用的詞“示例性”意為“用作例子、實施例或說明性”。這裡作為“示例性”所說明的任何實施例不必解釋為優於或好於其它實施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
另外,為了更好的說明本公開,在下文的具體實施方式中給出了眾多的具體細節。本領域技術人員應當理解,沒有某些具體細節,本公開同樣可以實施。在一些實例中,對於本領域技術人員熟知的方法、手段、元件和電路未作詳細描述,以便於凸顯本公開的主旨。In addition, to better illustrate this disclosure, numerous specific details are provided in the specific embodiments below. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of this disclosure.
下面介紹幾種傳統的功耗控制方案。Several traditional power consumption control solutions are introduced below.
最早的功耗控制方案是動態電壓頻率調整方案(dynamic voltage and frequency scaling,DVFS),該方案的基本思路是根據應用程式的算力需求,動態調整晶片的供電電壓和工作時鐘頻率。在運算負荷較大、需要高性能時,提高供電電壓和工作時鐘頻率,以保證性能得到滿足;在運算負荷較小,不需要高性能時,最大程度地降低供電電壓和工作時鐘頻率,以降低功耗,達到保證系統性能同時又盡可能節省功耗的目的。The earliest power consumption control solution was dynamic voltage and frequency scaling (DVFS). Its basic idea is to dynamically adjust the chip's supply voltage and operating clock frequency based on the application's computing power requirements. When the computing load is heavy and high performance is required, the supply voltage and operating clock frequency are increased to ensure performance is met. When the computing load is light and high performance is not required, the supply voltage and operating clock frequency are minimized to reduce power consumption, achieving the goal of ensuring system performance while minimizing power consumption.
DVFS的供電電壓和工作時鐘頻率通常是預先設置,與實際應用場景的匹配度較差。在動態電壓頻率調整方案的基礎上,現有技術提出了自我調整電壓頻率調整方案(adaptive voltage and frequency scaling,AVFS),該方案能夠根據不同晶片的工藝特性、運行狀態下的溫度波動、電源波動和電源雜訊,來控制此晶片的最佳供電電壓和工作時鐘頻率,最大程度地提高工作時鐘頻率來提供最高的運算性能。在滿足性能要求的前提下,盡可能地降低產品功耗,或者在給定的功耗預算條件下,提供更高的運算性能。The supply voltage and operating clock frequency of DVFS are typically pre-set, but their alignment with actual application scenarios is poor. Building on dynamic voltage and frequency scaling (DVFS), existing technologies have proposed adaptive voltage and frequency scaling (AVFS). This solution controls the optimal supply voltage and operating clock frequency for each chip based on its process characteristics, operating temperature fluctuations, power supply fluctuations, and power supply noise. This maximizes the operating clock frequency to deliver the highest computing performance. While meeting performance requirements, it minimizes product power consumption, or provides higher computing performance within a given power budget.
下面介紹現有技術中採用AVFS的兩種控制系統。The following introduces two control systems that use AVFS in existing technologies.
現有技術一的控制系統根據性能目標確定出計算模組的工作時鐘頻率,通過指令將工作時鐘頻率資訊輸出給AVFS控制器。根據指令,AVFS控制器控制感測器對晶片的工藝P、溫度T、電壓V即時採樣,並獲取其採樣得到的工藝P、溫度T、電壓V。AVFS控制器預先設置有根據實測資料擬合得到的頻率電壓配置表,該頻率電壓配置表可指示工藝P、溫度T、電壓V的各種組合下,最優的工作時鐘頻率和供電電壓。因此結合當前採樣的工藝P、溫度T、電壓V和預設的頻率電壓配置表,即可確定需要將供電電壓控制到何種數值,將該種數值的供電電壓和根據性能目標確定的工作時鐘頻率施加到計算模組即可。The control system of prior art 1 determines the operating clock frequency of the computing module based on performance targets and outputs this operating clock frequency information to the AVFS controller via instructions. Based on the instructions, the AVFS controller controls sensors to sample the chip's process temperature (P), temperature (T), and voltage (V) in real time, and obtains the sampled process temperature (P), temperature (T), and voltage (V). The AVFS controller is pre-configured with a frequency-voltage configuration table simulated based on measured data. This frequency-voltage configuration table indicates the optimal operating clock frequency and supply voltage for various combinations of process temperature (P), temperature (T), and voltage (V). Therefore, by combining the currently sampled process P, temperature T, voltage V, and the preset frequency-voltage configuration table, it is possible to determine the value to which the supply voltage needs to be controlled. This supply voltage and the operating clock frequency determined according to the performance target are then applied to the computing module.
現有技術一的方案依賴感測器分別檢測晶片的工藝、電壓、溫度等資訊,一方面,檢測本身需要一定的時間,因此對電壓和頻率的控制速度有一定的限制,從而導致整體控制週期長(通常在幾毫秒(ms)或幾十毫秒(ms)級別),功耗和性能不能得到及時的優化控制。另一方面,頻率電壓配置表的統計過程非常繁雜,要基於大量的實測資料進行擬合,其中實測資料通常是多種不同晶片在不同工藝P、溫度T、電壓V的組合下採集到的,擬合的方式只是使用單一的規則對於所有的資料樣本的一個總體近似(如滿足最小均方誤差等),因此擬合的結果對於某個特定的晶片來說可能不是最佳的,有時偏差還比較大,導致電壓和頻率控制的準確度可能無法保證,所以針對某一顆晶片的特性,還可能存在或大或小的性能冗餘空間。Existing technology solutions rely on sensors to separately detect chip process, voltage, temperature, and other information. This detection process takes time, which limits the speed of voltage and frequency control. This results in a long overall control cycle (typically on the order of several milliseconds or tens of milliseconds), preventing timely optimization of power consumption and performance. On the other hand, the statistical process for frequency-voltage configuration tables is very complex, requiring fitting based on a large amount of measured data. This measured data is typically collected from multiple different chips under different combinations of process P, temperature T, and voltage V. The fitting method simply uses a single rule to provide a global approximation for all data samples (such as meeting the minimum mean square error). As a result, the fitting result may not be optimal for a specific chip, and sometimes the deviation is quite large, resulting in the inability to guarantee the accuracy of voltage and frequency control. Therefore, there may be performance headroom of varying degrees for the characteristics of a particular chip.
在現有技術一的控制系統的基礎上,現有技術二的控制系統增加了可以緩存工藝P、溫度T、電壓V的寄存器,並使得感測器週期性採集工藝P、溫度T、電壓V並緩存至寄存器。AVFS控制器每次接收到調頻指令後可以直接獲取寄存器處儲存的工藝P、溫度T、電壓V並進行後續的處理。對於整個工作流程而言,單次電壓和頻率的控制週期得以降低,但降低程度非常有限,仍然在毫秒量級。預先緩存的工藝P、溫度T、電壓V,和接收到指令時實際的工藝P、溫度T、電壓V不一定一致,因此可能會使得電壓和頻率控制的準確度更差。Based on the control system of the existing technology one, the control system of the existing technology two adds registers that can cache process P, temperature T, and voltage V, and enables the sensor to periodically collect process P, temperature T, and voltage V and cache them in the register. Each time the AVFS controller receives a frequency modulation instruction, it can directly obtain the process P, temperature T, and voltage V stored in the register and perform subsequent processing. For the entire workflow, the control cycle of a single voltage and frequency can be reduced, but the degree of reduction is very limited, still in the millisecond level. The pre-cached process P, temperature T, and voltage V are not necessarily consistent with the actual process P, temperature T, and voltage V when the instruction is received, which may make the accuracy of voltage and frequency control worse.
綜上所述,傳統的功耗控制方案中,確定一次最優的供電電壓和工作時鐘頻率耗費時間較多,導致控制週期長、控制效率低,且準確性也較差,導致晶片的性能得不到充分發揮。In summary, traditional power consumption control schemes consume considerable time to determine the optimal supply voltage and operating clock frequency, resulting in long control cycles, low control efficiency, and poor accuracy, which in turn prevents the chip from fully utilizing its performance.
有鑑於此,本公開提出了一種電壓及頻率控制系統、方法、電腦可讀儲存媒體,根據本公開實施例的電壓及頻率控制系統,通過內環的即時頻率控制實現了減少電路時序冗餘,最大化提升性能,和優化控制的效率,通過外環的週期性電壓控制及週期性頻率控制提高了控制的準確度,從而能夠兼顧性能和控制效率的提高。In light of this, the present disclosure proposes a voltage and frequency control system, method, and computer-readable storage medium. According to the voltage and frequency control system of the disclosed embodiments, real-time frequency control in the inner loop is used to reduce circuit timing redundancy, maximize performance, and optimize control efficiency. Cyclic voltage and frequency control in the outer loop is used to improve control accuracy, thereby achieving both performance and control efficiency improvements.
進一步地,在對功耗另有需求時,外環的週期性電壓控制及週期性頻率控制還能結合功耗需求控制電壓,使功耗的降低效果更優,提升系統的性能功耗比。Furthermore, when additional power consumption requirements are met, the outer loop's cyclic voltage control and cyclic frequency control can be combined with power consumption requirements to control voltage, further reducing power consumption and improving the system's performance-to-power ratio.
圖1示出根據本公開實施例的電壓及頻率控制系統的結構的示意圖。下面先結合圖1介紹電壓及頻率控制系統的示例性應用場景。Figure 1 shows a schematic diagram of the structure of a voltage and frequency control system according to an embodiment of the present disclosure. Below, an exemplary application scenario of the voltage and frequency control system is introduced in conjunction with Figure 1.
如圖1所示,電壓及頻率控制系統可包括延時檢測模組10、頻率控制模組20、性能統計模組30、性能和功耗等級控制模組40。這些模組既可以採用軟體實現,也可以採用硬體實現,本公開實施例對此不作限制。As shown in Figure 1, the voltage and frequency control system may include a delay detection module 10, a frequency control module 20, a performance statistics module 30, and a performance and power consumption level control module 40. These modules can be implemented using either software or hardware, and this disclosure does not limit this.
該應用場景中還包括硬體的計算模組50,計算模組50可以是系統級晶片中提供算力的功能模組,如處理器核。計算模組50的性能取決於其工作時鐘頻率,工作時鐘頻率越大時性能越高;計算模組50的功耗則受供電電壓和工作時鐘頻率的影響,在供電電壓或工作時鐘頻率更大時功耗也更大。電壓及頻率控制系統用於控制計算模組50的時鐘頻率和供電電壓,以使計算模組50的功耗或者性能滿足需求。This application scenario also includes a hardware computing module 50, which can be a functional module within a system-on-a-chip (SoC) that provides computing power, such as a processor core. The performance of the computing module 50 depends on its operating clock frequency; higher clock frequencies result in higher performance. The power consumption of the computing module 50 is affected by the supply voltage and operating clock frequency, with higher supply voltages and higher clock frequencies resulting in higher power consumption. The voltage and frequency control system is used to control the clock frequency and supply voltage of the computing module 50 to ensure that its power consumption or performance meets requirements.
計算模組50通常在一定的工藝、供電電壓、器件溫度條件下工作,不同晶片的工藝、供電電壓、器件溫度條件都有一些差異,並且同一晶片雖然工藝相同,但在不同時刻的供電電壓、器件溫度條件也有變化。工藝、供電電壓、器件溫度條件直接影響計算模組50的電路延時,此電路延時也決定了計算模組50的最高工作時鐘頻率。The computing module 50 typically operates under certain process, power supply voltage, and device temperature conditions. These conditions vary between different chips. Even on the same chip, even with the same process, the power supply voltage and device temperature conditions can vary at different times. These conditions directly affect the circuit delay of the computing module 50, which in turn determines the maximum operating clock frequency of the computing module 50.
本公開實施例中,延時檢測模組10和計算模組50處在相同工藝、供電電壓、器件溫度的工作條件,也即,延時檢測模組10本身是硬體模組時,可設置在計算模組50所在的矽區域或電子設備上。為使得延時檢測模組10和計算模組50的溫度相同,可使得延時檢測模組10(或實現延時檢測模組10的處理器)和計算模組50在物理位置上鄰近。在圖1的示例中,延時檢測模組10可以是硬體模組,計算模組50和延時檢測模組10可都設置在電子設備1上。In the disclosed embodiment, the delay detection module 10 and the computing module 50 operate under the same process, power supply voltage, and device temperature conditions. That is, if the delay detection module 10 itself is a hardware module, it can be located in the same silicon region or electronic device as the computing module 50. To ensure that the delay detection module 10 and the computing module 50 maintain the same temperature, the delay detection module 10 (or the processor implementing the delay detection module 10) and the computing module 50 can be physically located in close proximity. In the example of FIG1 , the delay detection module 10 can be a hardware module, and both the computing module 50 and the delay detection module 10 can be located on the electronic device 1.
頻率控制模組20、性能統計模組30、性能和功耗等級控制模組40本身是硬體模組時,既可設置在計算模組50所在的矽區域或電子設備上,也可以設置在可與計算模組50所在的電子設備通信的其他電子設備上。在圖1的示例中,頻率控制模組20、性能統計模組30、性能和功耗等級控制模組40可共同設置在與電子設備1可通信的電子設備2上。其中,頻率控制模組20、性能統計模組30可以是硬體模組,性能和功耗等級控制模組40可以是軟體模組,性能和功耗等級控制模組40可以由電子設備2上的處理器(未示出)來實現。When the frequency control module 20, performance statistics module 30, and performance and power consumption level control module 40 are hardware modules, they can be located in the silicon region or electronic device where the computing module 50 is located, or they can be located on another electronic device that can communicate with the electronic device where the computing module 50 is located. In the example of Figure 1, the frequency control module 20, performance statistics module 30, and performance and power consumption level control module 40 can be located together on electronic device 2, which can communicate with electronic device 1. The frequency control module 20 and performance statistics module 30 can be hardware modules, while the performance and power consumption level control module 40 can be a software module. The performance and power consumption level control module 40 can be implemented by a processor (not shown) on electronic device 2.
延時檢測模組10可以和頻率控制模組20、計算模組50通信,頻率控制模組20可以和延時檢測模組10、性能和功耗等級控制模組40通信,性能統計模組30可以和性能和功耗等級控制模組40、計算模組50通信,性能和功耗等級控制模組40可以和頻率控制模組20、性能統計模組30通信,計算模組50可以和延時檢測模組10、頻率控制模組20、性能統計模組30通信。具體的通信內容可參見下文圖2的相關描述。The delay detection module 10 can communicate with the frequency control module 20 and the computing module 50. The frequency control module 20 can communicate with the delay detection module 10 and the performance and power level control module 40. The performance statistics module 30 can communicate with the performance and power level control module 40 and the computing module 50. The performance and power level control module 40 can communicate with the frequency control module 20 and the performance statistics module 30. The computing module 50 can communicate with the delay detection module 10, the frequency control module 20, and the performance statistics module 30. For details on these communications, please refer to the description of FIG. 2 below.
下面介紹本公開實施例的電壓及頻率控制系統的示例性工作方式。圖2示出根據本公開實施例的電壓及頻率控制系統的示例性工作流程。The following describes an exemplary operation of the voltage and frequency control system according to an embodiment of the present disclosure. FIG2 shows an exemplary operation of the voltage and frequency control system according to an embodiment of the present disclosure.
如圖2所示,在一種可能的實現方式中,延時檢測模組10用於即時檢測所述計算模組50的電路延時,並輸出電路延時至頻率控制模組20;頻率控制模組20用於根據當前供電電壓和電路延時,控制輸出到計算模組50的時鐘信號的頻率,當前供電電壓由性能和功耗等級控制模組40提供;性能統計模組30用於週期性檢測計算模組50的性能,獲得實際性能並輸出至性能和功耗等級控制模組40;性能和功耗等級控制模組40用於根據預設的性能目標和實際性能,控制輸出到頻率控制模組20和計算模組50的供電電壓,以使最終實際性能逼近性能目標。As shown in FIG2 , in one possible implementation, the delay detection module 10 is used to detect the circuit delay of the computing module 50 in real time and output the circuit delay to the frequency control module 20; the frequency control module 20 is used to control the frequency of the clock signal output to the computing module 50 based on the current supply voltage and circuit delay, where the current supply voltage is provided by the performance and power consumption level control module 40; the performance statistics module 30 is used to periodically detect the performance of the computing module 50, obtain the actual performance, and output it to the performance and power consumption level control module 40; the performance and power consumption level control module 40 is used to control the supply voltage output to the frequency control module 20 and the computing module 50 based on a preset performance target and actual performance, so that the final actual performance approaches the performance target.
舉例來說,本公開實施例中,延時檢測模組10、頻率控制模組20共同對計算模組50的時鐘信號的頻率實現即時的內環控制,頻率控制模組20、性能統計模組30、性能和功耗等級控制模組40共同對計算模組50的供電電壓和時鐘信號的頻率實現週期性的外環控制。For example, in the disclosed embodiment, the delay detection module 10 and the frequency control module 20 jointly implement real-time inner-loop control of the frequency of the clock signal of the computing module 50, and the frequency control module 20, the performance statistics module 30, and the performance and power consumption level control module 40 jointly implement periodic outer-loop control of the power supply voltage and the frequency of the clock signal of the computing module 50.
下面結合圖2介紹本公開實施例對計算模組50的時鐘信號的頻率的內環控制的示例性方式。The following describes an exemplary method of inner-loop control of the frequency of the clock signal of the computing module 50 according to the disclosed embodiment in conjunction with FIG2 .
在一種可能的實現方式中,延時檢測模組10和計算模組50物理上保持相同工藝特性、供電電壓、器件溫度的工作條件,即時檢測計算模組的電路延時,包括:即時檢測當前工藝特性、當前供電電壓、當前器件溫度的工作條件下自身的電路延時,作為計算模組50的電路延時。In one possible implementation, the delay detection module 10 and the computing module 50 physically maintain the same operating conditions of process characteristics, power supply voltage, and device temperature, and detect the circuit delay of the computing module in real time, including: real-time detection of its own circuit delay under the current process characteristics, current power supply voltage, and current device temperature operating conditions as the circuit delay of the computing module 50.
舉例來說,由於延時檢測模組10和計算模組50處於相同工藝、供電電壓、器件溫度,因此同一時刻延時檢測模組10自身的電路延時與計算模組50的電路延時是一致的。在此情況下,延時檢測模組10可即時檢測當前工藝、當前供電電壓、當前溫度條件下自身的電路延時,並輸出檢測到的電路延時至頻率控制模組20。電路延時的檢測可以基於現有技術來實現,例如可以用現有技術的關鍵時序路徑類比方法進行檢測,即類比計算模組50中的關鍵時序路徑,用最小延時單元組成的延時檢測鏈來檢測路徑時序的變化,從而通過時序的變化情況確定電路延時;也可以使用固定頻率的時鐘信號,用最小延時單元組成的延時檢測鏈來檢測時鐘信號上升沿或下降沿的變化,從而通過時鐘信號上升沿或下降沿的變化情況確定電路延時。電路延時可採用多比特的二進位碼來表示(電路延時越大時二進位碼對應的十進位數字值也越大),並提供給頻率控制模組20。電路延時的檢測時間成本很低,通常可以在納秒級別。For example, because delay detection module 10 and calculation module 50 are subject to the same process, power supply voltage, and device temperature, the circuit delay of delay detection module 10 and calculation module 50 at the same moment are consistent. In this case, delay detection module 10 can instantly detect its own circuit delay under the current process, power supply voltage, and temperature conditions and output the detected circuit delay to frequency control module 20. Circuit delay detection can be implemented based on existing technologies. For example, conventional key timing path analogy methods can be used. This involves analogizing the key timing path in calculation module 50 and using a delay detection chain composed of minimum delay units to detect changes in the path timing, thereby determining the circuit delay based on the timing changes. Alternatively, a fixed-frequency clock signal can be used, and a delay detection chain composed of minimum delay units can be used to detect changes in the rising or falling edges of the clock signal, thereby determining the circuit delay based on the changes in the rising or falling edges of the clock signal. Circuit delay can be represented by a multi-bit binary code (the larger the circuit delay, the larger the decimal value corresponding to the binary code) and provided to frequency control module 20. The detection time cost of circuit delay is very low, usually in the nanosecond level.
由於延時檢測模組和計算模組採用相同工藝、供電電壓、器件溫度,因此延時檢測模組自身的電路延時和計算模組的電路延時可以一致,通過檢測延時檢測模組自身的電路延時即可實現計算模組的電路延時的檢測,可以進一步降低時間成本,提高控制效率。Because the delay detection module and the calculation module use the same process, power supply voltage, and device temperature, the circuit delay of the delay detection module itself and the circuit delay of the calculation module can be consistent. By detecting the circuit delay of the delay detection module itself, the circuit delay of the calculation module can be detected, which can further reduce time costs and improve control efficiency.
本領域技術人員應理解,電路延時的檢測的實現方式可以有很多種,只要電路延時能及時反映工藝、供電電壓、器件溫度條件的變化,能及時反映計算模組50的電路延時即可,本公開對於延時檢測模組10採用的具體檢測方式不作限制。Those skilled in the art should understand that there are many ways to implement circuit delay detection. As long as the circuit delay can promptly reflect changes in process, power supply voltage, and device temperature conditions, and can promptly reflect the circuit delay of the calculation module 50, this disclosure does not limit the specific detection method adopted by the delay detection module 10.
頻率控制模組20和計算模組50的供電電壓相同,且均由性能和功耗等級控制模組40提供。因此,頻率控制模組20的當前供電電壓也即計算模組50的當前供電電壓。頻率控制模組20可根據當前供電電壓和電路延時,控制輸出到計算模組50的時鐘信號的頻率。其示例性控制方式可以參見下文的相關描述。由於延時檢測模組10是即時檢測電路延時,因此電路延時也是即時傳輸給頻率控制模組20,頻率控制模組20即時確定時鐘信號的頻率,因此內環控制是效率較高的控制。The frequency control module 20 and the computing module 50 are powered by the same voltage, both supplied by the performance and power consumption level control module 40. Therefore, the current power supply voltage of the frequency control module 20 is also the current power supply voltage of the computing module 50. The frequency control module 20 can control the frequency of the clock signal output to the computing module 50 based on the current power supply voltage and circuit delay. An exemplary control method is described below. Because the delay detection module 10 detects circuit delay in real time, the circuit delay is also transmitted to the frequency control module 20 in real time. The frequency control module 20 then determines the frequency of the clock signal in real time, resulting in a more efficient inner-loop control.
下面結合圖2介紹本公開實施例對計算模組50的供電電壓和時鐘信號的頻率的外環控制的示例性方式。The following describes an exemplary method of outer loop control of the power supply voltage and the frequency of the clock signal of the computing module 50 in accordance with an embodiment of the present disclosure in conjunction with FIG2 .
性能統計模組30可週期性檢測計算模組50的性能(指計算性能),獲得實際性能(指實際計算性能)並輸出至性能和功耗等級控制模組40。其中,性能可以指計算模組50的計算效率、訪存利用率等等計算性能。示例性地,計算模組50內部通常設置有至少一個效能計數器,每個效能計數器分別用於檢測計算模組50的一部分電路的性能,每個效能計數器的性能檢測標準可能相同或者不同。效能計數器的計數結果直接指示性能的優劣。性能統計模組30可按照預設的性能統計週期(可能在幾十微秒(us)或幾百微秒(us)左右),週期性獲取每個效能計數器的計數結果。依據這些計數結果,性能統計模組30可通過加權平均的方式確定出計算模組50的實際性能。其中,每個效能計數器的計數結果的權值,可以根據該效能計數器的性能檢測標準和/或該效能計數器對應的一部分電路的面積等參數來確定。The performance statistics module 30 can periodically detect the performance (referring to computing performance) of the computing module 50, obtain actual performance (referring to actual computing performance) and output it to the performance and power consumption level control module 40. Among them, performance can refer to computing efficiency, memory utilization, and other computing performance of the computing module 50. For example, the computing module 50 is usually equipped with at least one performance counter. Each performance counter is used to detect the performance of a part of the circuit of the computing module 50. The performance detection standard of each performance counter may be the same or different. The counting result of the performance counter directly indicates the quality of performance. The performance statistics module 30 can periodically obtain the counting result of each performance counter according to the preset performance statistics cycle (which may be around tens of microseconds (us) or hundreds of microseconds (us)). Based on these counting results, the performance statistics module 30 can determine the actual performance of the calculation module 50 through weighted averaging. The weight of each performance counter's counting result can be determined based on parameters such as the performance test standard of the performance counter and/or the area of the circuit portion corresponding to the performance counter.
使用者可為計算模組50預設性能目標,性能目標表示使用者希望計算模組的實際性能達到或者超出該性能目標。性能和功耗等級控制模組40可根據預設的性能目標和實際性能,控制輸出到頻率控制模組20和計算模組50的供電電壓。其示例性控制方式可以參見下文的相關描述。由於性能統計模組30是週期性檢測計算模組50的性能,因此其獲得的實際性能也週期性傳輸給性能和功耗等級控制模組40,性能和功耗等級控制模組40週期性控制輸出的供電電壓,且控制週期和實際性能的獲取週期可以相近似,例如可能在幾十微秒(us)或幾百微秒(us)的量級。供電電壓對時鐘信號的頻率有直接影響,因此也同時實現了時鐘信號的頻率的控制。The user can preset a performance target for the computing module 50. The performance target indicates that the user hopes that the actual performance of the computing module will reach or exceed the performance target. The performance and power consumption level control module 40 can control the power supply voltage output to the frequency control module 20 and the computing module 50 based on the preset performance target and actual performance. Its exemplary control method can be found in the relevant description below. Since the performance statistics module 30 periodically detects the performance of the computing module 50, the actual performance it obtains is also periodically transmitted to the performance and power consumption level control module 40. The performance and power consumption level control module 40 periodically controls the output power supply voltage, and the control period and the actual performance acquisition period can be similar, for example, it may be on the order of tens of microseconds (us) or hundreds of microseconds (us). The supply voltage has a direct impact on the frequency of the clock signal, thus also achieving control of the frequency of the clock signal.
根據本公開實施例的電壓及頻率控制系統,相比檢測工藝、供電電壓、溫度,檢測電路延時所需的時間大大降低,從而提高檢測效率;電路延時特性決定了計算模組在一定供電電壓下的最高工作時鐘頻率,因此頻率控制模組使用供電電壓和延時控制時鐘信號的頻率,與使用工藝、供電電壓、溫度確定時鐘信號的頻率可達到同樣的準確度;電路延時即時獲取使得頻率控制模組也實現即時頻率控制,因此能夠在保證準確度的同時提高頻率的控制效率。性能統計模組週期性檢測計算模組的性能,獲得實際性能並輸出至性能和功耗等級控制模組,性能和功耗等級控制模組根據預設的性能目標和實際性能,控制輸出到頻率控制模組和計算模組的供電電壓,實現了週期性的供電電壓控制,形成了控制的閉環。且由於控制基於預設的性能目標和實際性能進行,因此對供電電壓的控制更為準確;而供電電壓對時鐘信號的頻率有直接影響,從而實現了更為準確的供電電壓和時鐘信號的頻率的調節。本公開實施例的電壓及頻率控制系統通過內環的延時檢測模組、頻率控制模組的即時頻率控制實現了減少電路時序冗餘,最大化提升性能,和優化控制的效率,通過外環的性能統計模組、性能和功耗等級控制模組進行週期性電壓控制及週期性頻率控制提高了控制的準確度,從而能夠兼顧性能和控制效率的提高,因此內環和外環的結合實現了效率和準確度的兼得,能夠使得性能的提高效果更優。According to the voltage and frequency control system of the disclosed embodiment, the time required to detect circuit delay is greatly reduced compared to detecting process, power supply voltage, and temperature, thereby improving detection efficiency. The circuit delay characteristics determine the maximum operating clock frequency of the calculation module under a certain power supply voltage. Therefore, the frequency control module uses the power supply voltage and delay to control the frequency of the clock signal, and can achieve the same accuracy as using the process, power supply voltage, and temperature to determine the frequency of the clock signal. The real-time acquisition of circuit delay enables the frequency control module to also achieve real-time frequency control, thereby improving frequency control efficiency while ensuring accuracy. The performance statistics module periodically monitors the performance of the compute module, obtains actual performance, and outputs this information to the performance and power level control module. Based on preset performance targets and actual performance, the performance and power level control module controls the supply voltage output to the frequency control module and the compute module, achieving periodic supply voltage control and forming a closed control loop. Because control is based on preset performance targets and actual performance, supply voltage control is more accurate. Since supply voltage directly affects the frequency of the clock signal, this allows for more precise regulation of both the supply voltage and the clock signal frequency. The voltage and frequency control system of the disclosed embodiment reduces circuit timing redundancy, maximizes performance, and optimizes control efficiency through real-time frequency control by the inner-loop delay detection module and frequency control module. Cyclic voltage control and cyclic frequency control by the outer-loop performance statistics module and performance and power consumption level control module improve control accuracy, thereby achieving both performance and control efficiency improvements. Therefore, the combination of the inner and outer loops achieves both efficiency and accuracy, resulting in even greater performance improvements.
相比于現有技術一的毫秒級別的工藝、溫度、電壓檢測,本公開實施例僅需要數納秒即可完成延時檢測,檢測時間大大降低。Compared to the millisecond-level process, temperature, and voltage detection of the prior art, the disclosed embodiment only requires a few nanoseconds to complete the delayed detection, greatly reducing the detection time.
相比于現有技術二,本公開實施例的電壓控制週期僅受限於性能統計模組的週期設定以及性能統計模組完成一次實際性能的獲取所需時間,因此電壓控制週期可低至幾十微秒或幾百微秒量級,遠遠小於現有技術二的毫秒級別的電壓控制週期。Compared to the second prior art, the voltage control cycle of the disclosed embodiment is limited only by the cycle setting of the performance statistics module and the time required for the performance statistics module to complete the acquisition of actual performance. Therefore, the voltage control cycle can be as low as tens or hundreds of microseconds, which is much shorter than the millisecond-level voltage control cycle of the second prior art.
相比于現有技術一和現有技術二,本公開實施例不必預先擬合得到頻率電壓配置表,因此降低了資料處理成本,並避免了使用頻率電壓配置錶帶來的準確度降低的問題。大大提高了性能和功耗控制的準確性。Compared to existing technologies 1 and 2, the disclosed embodiment does not require a pre-prepared frequency-voltage configuration table, thereby reducing data processing costs and avoiding the reduced accuracy associated with using a frequency-voltage configuration table. This significantly improves performance and power consumption control accuracy.
下面介紹內環控制中時鐘信號的頻率的示例性控制方式。The following describes an exemplary method for controlling the frequency of the clock signal in inner-loop control.
在一種可能的實現方式中,所述根據當前供電電壓和電路延時,控制輸出到計算模組的時鐘信號的頻率,包括:確定當前供電電壓和電路延時下的頻率最大值,控制輸出到計算模組的時鐘信號的頻率等於頻率最大值。In one possible implementation, controlling the frequency of the clock signal output to the computing module based on the current power supply voltage and circuit delay includes: determining the maximum frequency under the current power supply voltage and circuit delay, and controlling the frequency of the clock signal output to the computing module to be equal to the maximum frequency.
舉例來說,在不考慮性能目標和功耗要求的前提下,內環控制的目的在於通過控制時鐘信號的頻率使得計算模組可達到當前工作條件下(供電電壓、器件溫度、工藝特性)下的最大性能。時鐘信號的頻率越大,計算模組的性能也越大,因此,頻率控制模組20根據當前供電電壓和延時控制輸出到計算模組50的時鐘信號的頻率,可以是確定當前供電電壓和電路延時下的頻率最大值,其中電路延時本就與當前工作條件相關,因此,當前供電電壓和電路延時下的頻率最大值,也是當前工作條件下的頻率最大值。然後再控制輸出到計算模組50的時鐘信號的頻率等於頻率最大值。其中,在一定的供電電壓下,電路延時和頻率最大值之間的關聯關係可以是已知的,電路延時越小、頻率最大值越大。因此,根據該已知的關聯關係,使用供電電壓和電路延時可以唯一確定頻率最大值。For example, without considering performance targets and power consumption requirements, the purpose of inner-loop control is to control the frequency of the clock signal so that the computing module can achieve maximum performance under current operating conditions (supply voltage, device temperature, and process characteristics). The higher the clock signal frequency, the greater the performance of the computing module. Therefore, the frequency control module 20 controls the frequency of the clock signal output to the computing module 50 based on the current supply voltage and delay. This can be done by determining the maximum frequency under the current supply voltage and circuit delay. Circuit delay is inherently related to current operating conditions. Therefore, the maximum frequency under the current supply voltage and circuit delay is also the maximum frequency under the current operating conditions. The frequency of the clock signal output to the computing module 50 is then controlled to be equal to the maximum frequency. Under a certain power supply voltage, the relationship between circuit delay and maximum frequency is known: the smaller the circuit delay, the greater the maximum frequency. Therefore, based on this known relationship, the maximum frequency can be uniquely determined using the power supply voltage and circuit delay.
示例性地,頻率控制模組20內部可設置有現有技術的時鐘頻率生成電路(未示出),通過時鐘頻率生成電路完成生成並輸出時鐘信號的工作。生成並輸出時鐘信號所需要的時間可在納秒(ns)級別。For example, the frequency control module 20 may be internally provided with a conventional clock frequency generation circuit (not shown) to generate and output a clock signal. The time required to generate and output the clock signal may be in the nanosecond (ns) level.
通過這種方式,可以充分發揮計算模組在一定供電電壓下的性能潛力。In this way, the performance potential of the computing module under a certain power supply voltage can be fully utilized.
下面介紹外環控制中供電電壓的示例性控制方式。The following describes an exemplary control method for the power supply voltage in outer loop control.
在一種可能的實現方式中,性能和功耗等級控制模組預先設置有多個等級的電壓值,電壓值等級越高時電壓值越大,所述根據預設的性能目標和實際性能,控制輸出到頻率控制模組和計算模組的供電電壓,包括:當性能目標大於實際性能時,控制輸出的供電電壓的電壓值等級提高;當性能目標小於實際性能時,控制輸出的供電電壓的電壓值等級降低。In one possible implementation, the performance and power consumption level control module is pre-set with multiple levels of voltage values, with higher voltage levels increasing the voltage value. The power supply voltage output to the frequency control module and the computing module is controlled based on the preset performance target and actual performance, including: when the performance target is greater than the actual performance, the voltage level of the output power supply voltage is increased; when the performance target is less than the actual performance, the voltage level of the output power supply voltage is decreased.
舉例來說,在不考慮功耗要求的前提下,外環控制的目的在於根據回饋的當前實際性能,調整供電電壓,使得計算模組50在調整後的供電電壓下的實際性能更加逼近設定的性能目標。外環控制的控制週期取決於性能統計週期和供電電壓控制所需時間,外環控制的控制週期可以低至幾十微秒到幾百微秒級別,遠小於傳統的AVFS控制週期。對此,性能和功耗等級控制模組40可預先設置有多個等級的電壓值,並設置電壓值等級越高時電壓值越大,用於實現電壓值的等級控制。供電電壓越大時,計算模組50的性能也越大,因此,根據預設的性能目標和實際性能控制輸出到頻率控制模組和計算模組的供電電壓,可以是當性能目標大於實際性能時,控制輸出的供電電壓的電壓值等級提高;當性能目標小於實際性能時,控制輸出的供電電壓的電壓值等級降低。示例性地,可以採用類似于現有技術的比例積分微分控制演算法來使得供電電壓達到一定等級的電壓值。For example, without considering power consumption requirements, the purpose of outer-loop control is to adjust the supply voltage based on the current actual performance feedback, so that the actual performance of the computing module 50 under the adjusted supply voltage more closely approaches the set performance target. The control cycle of outer-loop control depends on the performance statistics cycle and the time required for supply voltage control. The control cycle of outer-loop control can be as low as tens to hundreds of microseconds, significantly shorter than the traditional AVFS control cycle. To achieve this, the performance and power consumption level control module 40 can be pre-set with multiple voltage levels, with higher voltage levels set to increase the voltage value, to implement hierarchical voltage control. As the supply voltage increases, the performance of the computing module 50 also increases. Therefore, the supply voltage output to the frequency control module and computing module is controlled based on a preset performance target and actual performance. When the performance target exceeds the actual performance, the output supply voltage is controlled to increase in level; when the performance target is less than the actual performance, the output supply voltage is controlled to decrease in level. For example, a proportional-integral-derivative control algorithm similar to conventional techniques can be employed to maintain the supply voltage at a certain level.
供電電壓既輸出給頻率控制模組20,又輸出給計算模組50,在供電電壓更大時,頻率控制模組20確定的頻率最大值也更大,從而使得輸出給計算模組50的時鐘信號的頻率也更大。因此使得計算模組50的性能得到提高。The power supply voltage is output to both the frequency control module 20 and the computing module 50. When the power supply voltage is higher, the maximum frequency determined by the frequency control module 20 is also higher, thereby increasing the frequency of the clock signal output to the computing module 50. This improves the performance of the computing module 50.
通過這種方式,可以以最低的供電電壓達到預設的性能目標,以降低功耗。結合內環控制,使得計算模組可在更低的供電電壓等級和功耗下,更快地逼近性能目標,大大提高計算模組的算力功耗比。This approach allows the preset performance target to be achieved at the lowest supply voltage, reducing power consumption. Combined with inner-loop control, the computing module can more quickly approach performance targets at lower supply voltage levels and power consumption, significantly improving the computing module's computing power-to-power ratio.
在一種可能的實現方式中,性能目標和實際性能之差大於第一閾值時,性能和功耗等級控制模組還用於輸出第一時鐘控制指令到頻率控制模組;頻率控制模組還用於根據第一時鐘控制指令,控制時鐘信號的頻率的數值提高第二閾值;實際性能和性能目標之差大於第一閾值時,性能和功耗等級控制模組還用於輸出第二時鐘控制指令到頻率控制模組;頻率控制模組還用於根據第二時鐘控制指令,控制計算模組的時鐘信號的頻率的數值降低第三閾值。In one possible implementation, when the difference between the performance target and the actual performance is greater than a first threshold, the performance and power consumption level control module is further configured to output a first clock control instruction to the frequency control module; the frequency control module is further configured to control the frequency of the clock signal to increase by a second threshold based on the first clock control instruction; when the difference between the actual performance and the performance target is greater than the first threshold, the performance and power consumption level control module is further configured to output a second clock control instruction to the frequency control module; the frequency control module is further configured to control the frequency of the clock signal of the computing module to decrease by a third threshold based on the second clock control instruction.
舉例來說,由於供電電壓被輸出給頻率控制模組20,且頻率控制模組20具備直接控制時鐘信號的頻率的能力,因此,在性能目標和實際性能的差距過大時,可以借助頻率控制模組20的頻率控制能力,在控制計算模組50的供電電壓的同時也控制計算模組50的時鐘信號的頻率,加快控制效率。For example, since the supply voltage is output to the frequency control module 20, and the frequency control module 20 has the ability to directly control the frequency of the clock signal, when the gap between the performance target and the actual performance is too large, the frequency control capability of the frequency control module 20 can be used to control the supply voltage of the computing module 50 while also controlling the frequency of the clock signal of the computing module 50, thereby improving control efficiency.
示例性地,可以預先設置有第一閾值,性能目標和實際性能之差大於第一閾值時,表示計算模組50的性能低於性能需求,為提高計算模組50的性能,可使得性能和功耗等級控制模組40還輸出第一時鐘控制指令到頻率控制模組20,並使得頻率控制模組20根據第一時鐘控制指令,控制時鐘頻率的數值提高第二閾值。第二閾值可以預先設置,也即,通過第一時鐘控制指令可以強制使得時鐘信號的頻率提高一定數值。For example, a first threshold can be pre-set. When the difference between the performance target and the actual performance is greater than the first threshold, it indicates that the performance of the computing module 50 is lower than the performance requirement. To improve the performance of the computing module 50, the performance and power consumption level control module 40 can also output a first clock control instruction to the frequency control module 20. The frequency control module 20 controls the clock frequency to increase by a second threshold based on the first clock control instruction. The second threshold can be pre-set, that is, the first clock control instruction can force the frequency of the clock signal to increase by a certain value.
同理,實際性能和性能目標之差大於第一閾值時,表示計算模組50的性能高於性能需求,而更高的性能可能會帶來更大的功耗。為降低計算模組50的性能,也即降低功耗,可使得性能和功耗等級控制模組40還輸出第二時鐘控制指令到頻率控制模組20,並使得頻率控制模組20根據第二時鐘控制指令,控制時鐘頻率的數值降低第三閾值。第三閾值可以預先設置,也即,通過第二時鐘控制指令可以強制使得時鐘信號的頻率降低一定數值。Similarly, when the difference between actual performance and the performance target is greater than the first threshold, it indicates that the performance of computing module 50 exceeds the performance requirement. Higher performance may result in higher power consumption. To reduce the performance of computing module 50, and therefore reduce power consumption, performance and power level control module 40 can also output a second clock control instruction to frequency control module 20. Based on the second clock control instruction, frequency control module 20 controls the clock frequency to decrease by a third threshold. The third threshold can be pre-set; that is, the second clock control instruction can forcibly reduce the frequency of the clock signal by a certain value.
第一閾值、第二閾值、第三閾值可以根據應用場景需求進行設置,本公開實施例對於第一閾值、第二閾值、第三閾值的具體數值不作限制。The first threshold, the second threshold, and the third threshold can be set according to the application scenario requirements. The present disclosed embodiment does not limit the specific values of the first threshold, the second threshold, and the third threshold.
對於頻率控制模組20來說,基於供電電壓、電路延時對時鐘信號的頻率進行控制的控制方式(達到頻率最大值),和基於性能目標、實際性能對時鐘信號的頻率進行控制的控制方式(提高第二閾值或降低第三閾值)並不相同,因此雖然都是對時鐘信號的頻率進行控制,但二者並不衝突。For the frequency control module 20, the frequency control method for controlling the clock signal based on the power supply voltage and circuit delay (achieving the maximum frequency) is different from the frequency control method for controlling the clock signal based on performance targets and actual performance (increasing the second threshold or lowering the third threshold). Therefore, although both control the frequency of the clock signal, there is no conflict between the two.
通過這種方式,可以加快計算模組達到性能目標的速度。In this way, the computational module can reach its performance goals faster.
在一些應用場景中,使用者可能希望計算模組的功耗不超出預設的功耗基準。為了實現用戶的需求,本公開實施例的電壓及頻率控制系統還具備準確的功耗控制功能。圖3示出根據本公開實施例的電壓及頻率控制系統的結構的示意圖。In some application scenarios, users may wish to ensure that the power consumption of the computing module does not exceed a preset power consumption baseline. To meet this user need, the voltage and frequency control system of the disclosed embodiment also features accurate power consumption control. Figure 3 shows a schematic diagram of the structure of the voltage and frequency control system according to the disclosed embodiment.
在一種可能的實現方式中,所述系統還包括功耗統計模組60,功耗統計模組60用於週期性檢測計算模組50的功耗,獲得實際功耗並輸出至頻率控制模組20和性能和功耗等級控制模組40;頻率控制模組20還用於根據預設的功耗基準和實際功耗,控制輸出到計算模組50的時鐘信號的頻率,使計算模組50在頻率下工作時的第一功耗估計值未超出功耗基準;性能和功耗等級控制模組40還用於根據預設的功耗基準和實際功耗,控制輸出到頻率控制模組20和計算模組50的供電電壓。In one possible implementation, the system further includes a power consumption statistics module 60, which is used to periodically detect the power consumption of the computing module 50, obtain the actual power consumption and output it to the frequency control module 20 and the performance and power consumption level control module 40; the frequency control module 20 is also used to control the frequency of the clock signal output to the computing module 50 based on a preset power consumption benchmark and actual power consumption, so that the first power consumption estimate of the computing module 50 when operating at the frequency does not exceed the power consumption benchmark; the performance and power consumption level control module 40 is also used to control the power supply voltage output to the frequency control module 20 and the computing module 50 based on the preset power consumption benchmark and actual power consumption.
如圖3所示,功耗統計模組60可週期性檢測計算模組50的功耗,獲得實際功耗並輸出至頻率控制模組20和性能和功耗等級控制模組40。示例性地,計算模組50內部通常設置有至少一個功耗計數器,每個功耗計數器分別用於檢測計算模組50的一部分電路的功耗,每個功耗計數器的功耗檢測標準可能相同或者不同。功耗計數器的計數結果直接指示功耗的多少。功耗統計模組60可按照預設的功耗統計週期(可能在幾十微秒(us)或幾百微秒(us)左右),週期性獲取每個功耗計數器的計數結果。依據這些計數結果,功耗統計模組60可通過加權平均和一定計算確定出計算模組50的實際功耗。其中,每個功耗計數器的計數結果的權值,可以根據該功耗計數器的功耗檢測標準和/或該功耗計數器對應的一部分電路的面積等參數來確定。As shown in Figure 3, the power consumption statistics module 60 can periodically detect the power consumption of the computing module 50, obtain the actual power consumption, and output it to the frequency control module 20 and the performance and power consumption level control module 40. For example, the computing module 50 is typically equipped with at least one power consumption counter. Each power consumption counter is used to detect the power consumption of a portion of the computing module 50 circuit. The power consumption detection standards of each power consumption counter may be the same or different. The counting results of the power consumption counters directly indicate the amount of power consumption. The power consumption statistics module 60 can periodically obtain the counting results of each power consumption counter according to a preset power consumption statistics period (which may be around tens or hundreds of microseconds (us)). Based on these counting results, the power consumption statistics module 60 can determine the actual power consumption of the calculation module 50 through weighted averaging and certain calculations. The weight of each power consumption counter's counting result can be determined based on parameters such as the power consumption detection standard of the power consumption counter and/or the area of the circuit portion corresponding to the power consumption counter.
功耗統計模組60的功耗統計週期與性能統計模組30的性能統計週期可以相同或者不同,本公開對此不作限制。The power consumption statistics cycle of the power consumption statistics module 60 and the performance statistics cycle of the performance statistics module 30 may be the same as or different from each other, and this disclosure does not impose any limitation on this.
使用者可為計算模組50預設功耗基準,功耗基準表示使用者希望計算模組50的實際功耗不超出該功耗基準。頻率控制模組20可根據預設的功耗基準和實際功耗,週期性控制輸出到計算模組50的時鐘信號的頻率,使計算模組50在頻率下工作時的第一功耗估計值未超出功耗基準。其示例性控制方式可以參見下文的相關描述。基於功耗基準和實際功耗的即時頻率控制,也相當於即時的功耗控制,可使實際功耗低於功耗基準,滿足系統功耗要求,系統更加穩定可靠。The user can preset a power consumption baseline for the computing module 50. This baseline represents the user's expectation that the actual power consumption of the computing module 50 will not exceed this baseline. Based on the preset power consumption baseline and actual power consumption, the frequency control module 20 can periodically control the frequency of the clock signal output to the computing module 50, ensuring that the first power consumption estimate of the computing module 50 when operating at this frequency does not exceed the power consumption baseline. An exemplary control method is described below. Real-time frequency control based on the power consumption baseline and actual power consumption is equivalent to real-time power consumption control, which can ensure that actual power consumption is lower than the power consumption baseline, meeting system power consumption requirements and enhancing system stability and reliability.
性能和功耗等級控制模組40可根據預設的功耗基準和實際功耗,週期性控制輸出到頻率控制模組20和計算模組50的供電電壓,以避免計算模組的實際功耗超出功耗基準的要求,進一步地,如不考慮性能目標,可控制供電電壓為使得計算模組的實際功耗未超出功耗基準的要求的最大供電電壓。參見上文所述,性能和功耗等級控制模組40還可根據性能目標和實際性能控制供電電壓,因此在電壓及頻率控制系統包括功耗統計模組60時,對於性能和功耗等級控制模組40來說,具備兩種供電電壓控制方式。兩種控制方式的示例可以參見下文的進一步描述。The performance and power consumption level control module 40 can periodically control the power supply voltage output to the frequency control module 20 and the computing module 50 based on a preset power consumption baseline and actual power consumption to prevent the computing module's actual power consumption from exceeding the power consumption baseline. Furthermore, if performance targets are not considered, the power supply voltage can be controlled to a maximum power supply voltage that ensures the computing module's actual power consumption does not exceed the power consumption baseline. As described above, the performance and power consumption level control module 40 can also control the power supply voltage based on performance targets and actual performance. Therefore, when the voltage and frequency control system includes the power consumption statistics module 60, the performance and power consumption level control module 40 has two power supply voltage control methods. Examples of these two control methods are described further below.
通過這種方式,在性能目標的基礎上,進一步考慮功耗基準,使得對於功耗的控制更為精確。In this way, power consumption benchmarks are further considered based on performance targets, making power consumption control more precise.
下面介紹頻率控制模組根據預設的功耗基準和實際功耗,控制輸出到計算模組的時鐘信號的頻率的示例性方式。The following describes an exemplary method by which the frequency control module controls the frequency of the clock signal output to the computing module based on a preset power consumption baseline and actual power consumption.
在一種可能的實現方式中,所述根據預設的功耗基準和實際功耗,控制輸出到計算模組的時鐘信號的頻率,包括:當實際功耗與功耗基準之差大於第四閾值時,控制輸出的時鐘信號的頻率等於頻率最大值與預設係數的乘積,預設係數的數值小於1。In one possible implementation, controlling the frequency of a clock signal output to a computing module based on a preset power consumption baseline and actual power consumption includes controlling the frequency of the output clock signal to be equal to the product of a maximum frequency and a preset coefficient when the difference between the actual power consumption and the power consumption baseline is greater than a fourth threshold, where the value of the preset coefficient is less than 1.
舉例來說,雖然已經根據功耗基準和實際功耗控制了時鐘信號的頻率和供電電壓,在理論上,計算模組50以該頻率和該供電電壓時的實際功耗不會超出功耗基準,但計算模組50的實際運行情況是不斷變化的,這導致計算模組50的實際功耗仍然有超出功耗基準的可能。對此,可以預先設置一個第四閾值,可以認為實際功耗與功耗基準之差小於或等於第四閾值時,實際功耗在較為安全的範圍,通過功耗基準和實際功耗對時鐘信號的頻率和供電電壓進行控制的效率仍然可以接受。但實際功耗與功耗基準之差大於第四閾值時,表示實際功耗過大,有損害計算模組50的風險,對計算模組的供電和散熱也帶來很大壓力。此時通過功耗基準和實際功耗對時鐘信號的頻率和供電電壓進行控制可能比較慢,需要儘快降低時鐘信號的頻率。For example, although the clock signal frequency and supply voltage are controlled based on the power consumption benchmark and actual power consumption, theoretically, the actual power consumption of computing module 50 at this frequency and supply voltage will not exceed the power consumption benchmark. However, the actual operating conditions of computing module 50 are constantly changing, which may result in the actual power consumption of computing module 50 still exceeding the power consumption benchmark. To address this, a fourth threshold can be pre-set. When the difference between the actual power consumption and the power consumption benchmark is less than or equal to the fourth threshold, the actual power consumption is considered to be within a relatively safe range, and the efficiency of controlling the clock signal frequency and supply voltage based on the power consumption benchmark and actual power consumption is still acceptable. However, if the difference between the actual power consumption and the power consumption baseline exceeds the fourth threshold, the actual power consumption is excessive, posing a risk of damage to computing module 50 and placing significant pressure on the computing module's power supply and heat dissipation. In this case, controlling the clock signal frequency and supply voltage based on the power consumption baseline and actual power consumption may be slow, requiring the clock signal frequency to be reduced as quickly as possible.
為加快時鐘信號的頻率的降低速度,可設置頻率控制模組20在滿足實際功耗與功耗基準之差大於第四閾值的條件時,控制輸出的時鐘信號的頻率等於頻率最大值與預設係數的乘積,預設係數的數值小於1。頻率最大值與預設係數的乘積可表示低頻的時鐘信號,可以設置預設係數數值較小,使得該低頻的時鐘信號的頻率低於當前的時鐘信號的頻率,計算模組50在低頻的時鐘信號下工作,其實際功耗不超出功耗基準。To accelerate the reduction rate of the clock signal frequency, the frequency control module 20 can be configured to control the frequency of the output clock signal to be equal to the product of the maximum frequency and a preset coefficient when the difference between the actual power consumption and the power consumption baseline is greater than a fourth threshold. The preset coefficient is less than 1. The product of the maximum frequency and the preset coefficient indicates a low-frequency clock signal. The preset coefficient can be set to a smaller value so that the frequency of the low-frequency clock signal is lower than the current clock signal frequency. When the calculation module 50 operates under the low-frequency clock signal, its actual power consumption does not exceed the power consumption baseline.
對於頻率控制模組20來說,基於功耗基準、實際功耗對時鐘信號的頻率進行控制的控制方式(降低至頻率最大值與預設係數的乘積),和基於供電電壓、電路延時對時鐘信號的頻率進行控制的控制方式(達到頻率最大值),都是控制頻率達到具體數值的控制方式,因此有可能會產生衝突。在產生衝突時,以滿足功耗基準優先,也即控制時鐘信號的頻率降低至頻率最大值與預設係數的乘積。For the frequency control module 20, the two methods of controlling the clock signal frequency based on power consumption benchmarks and actual power consumption (reducing the frequency to the product of the maximum frequency and a preset coefficient) and the method of controlling the clock signal frequency based on supply voltage and circuit delay (achieving the maximum frequency) both aim to achieve specific frequency values, and therefore may conflict. In the event of a conflict, meeting the power consumption benchmark takes precedence, i.e., reducing the clock signal frequency to the product of the maximum frequency and a preset coefficient.
通過這種方式,在計算模組的功耗較大時,可以更快實現功耗的降低。In this way, when the power consumption of the computing module is high, power consumption can be reduced more quickly.
由上文描述可知,電壓及頻率控制系統包括功耗統計模組60時,供電電壓的控制有兩種方式,一種可看作對於接收到的實際性能的回應,另一種可看作對於接收到的實際功耗的回應。As can be seen from the above description, when the voltage and frequency control system includes the power consumption statistics module 60, there are two ways to control the supply voltage. One can be regarded as a response to the received actual performance, and the other can be regarded as a response to the received actual power consumption.
下面介紹電壓及頻率控制系統包括功耗統計模組時,頻率性能和功耗等級控制模組根據預設的性能目標和實際性能,控制輸出到頻率控制模組和計算模組的供電電壓的示例性方式。The following describes an exemplary method in which a frequency performance and power consumption level control module controls the power supply voltage output to the frequency control module and the computing module based on preset performance targets and actual performance when the voltage and frequency control system includes a power consumption statistics module.
在一種可能的實現方式中,性能和功耗等級控制模組40預先設置有多個等級的電壓值,電壓值等級越高時電壓值越大。In one possible implementation, the performance and power consumption level control module 40 is pre-set with multiple levels of voltage values, and the higher the voltage level, the greater the voltage value.
根據預設的性能目標和實際性能,控制輸出到頻率控制模組20和計算模組50的供電電壓,包括:當性能目標大於實際性能時,確定第一目標供電電壓的電壓值等級,使第一目標供電電壓的電壓值等級高於當前供電電壓的電壓值等級;當性能目標小於實際性能時,確定第一目標供電電壓的電壓值等級,使第一目標供電電壓的電壓值等級低於當前供電電壓的電壓值等級;確定計算模組50在第一目標供電電壓下工作時的第一功耗估計值;在第一功耗估計值小於功耗基準時,控制輸出到頻率控制模組20和計算模組50的供電電壓等於第一目標供電電壓;在第一功耗估計值大於功耗基準時,根據預設的功耗基準和實際功耗,控制輸出到頻率控制模組20和計算模組50的供電電壓。According to the preset performance target and actual performance, the power supply voltage output to the frequency control module 20 and the calculation module 50 is controlled, including: when the performance target is greater than the actual performance, the voltage value level of the first target power supply voltage is determined so that the voltage value level of the first target power supply voltage is higher than the voltage value level of the current power supply voltage; when the performance target is less than the actual performance, the voltage value level of the first target power supply voltage is determined so that the voltage value level of the first target power supply voltage is lower than the current power supply voltage. The voltage value level of the current power supply voltage; determining a first power consumption estimate when the computing module 50 operates at the first target power supply voltage; when the first power consumption estimate is less than the power consumption baseline, controlling the power supply voltage output to the frequency control module 20 and the computing module 50 to be equal to the first target power supply voltage; when the first power consumption estimate is greater than the power consumption baseline, controlling the power supply voltage output to the frequency control module 20 and the computing module 50 based on a preset power consumption baseline and actual power consumption.
舉例來說,計算模組50的供電電壓對計算模組50的功耗有非常突出的影響,二者的關係如公式(1)-(3)所示: P total=P dynamic+P static(1) P dynamic=α∙C load∙F clk∙V 2(2) P static=β∙V∙e -Vth/(γ∙V T )(3) For example, the power supply voltage of the computing module 50 has a significant impact on the power consumption of the computing module 50. The relationship between the two is shown in formulas (1)-(3): P total =P dynamic +P static (1) P dynamic =α∙C load ∙F clk ∙V 2 (2) P static =β∙V∙e -Vth/(γ∙V T ) (3)
其中,F clk表示時鐘信號的頻率,V表示供電電壓,C load表示計算模組50的等效負載電容,α表示電路翻轉因數,V th表示計算模組50的閾值電壓,V T表示計算模組50的熱電壓,即由溫度差導致的電位差,β和γ表示計算模組50的工藝參數。P dynamic表示計算模組50在供電電壓和時鐘信號的頻率下工作的功耗,P static表示工藝和溫度帶來的額外功耗,P total表示計算模組50的總功耗。 Where F clk represents the frequency of the clock signal, V represents the supply voltage, C load represents the equivalent load capacitance of computing module 50, α represents the circuit flip-flop factor, V th represents the threshold voltage of computing module 50, VT represents the thermoelectric voltage of computing module 50, i.e., the potential difference caused by temperature difference, and β and γ represent the process parameters of computing module 50. P dynamic represents the power consumption of computing module 50 operating at the supply voltage and clock signal frequency, P static represents the additional power consumption caused by process and temperature, and P total represents the total power consumption of computing module 50.
在考慮功耗基準的前提下,外環控制的目的是使得計算模組50在控制後的供電電壓下的功耗不超出功耗基準的前提下,其實際性能更加逼近設定的性能目標。Under the premise of considering the power consumption benchmark, the purpose of the outer loop control is to ensure that the actual performance of the computing module 50 is closer to the set performance target under the premise that the power consumption of the controlled power supply voltage does not exceed the power consumption benchmark.
對此,性能和功耗等級控制模組40可預先設置有多種等級的電壓值,並設置電壓值等級越高時電壓值越大,用於實現電壓值的等級控制。等級的數量可根據實際需求設置,相鄰等級之間的電壓值差距可以設置為10mV或者5mV或者其他數值,本公開實施例對於等級的具體數量、相鄰等級之間的電壓值差距均不作限制。To this end, the performance and power consumption level control module 40 can pre-set multiple voltage levels, with higher voltage levels increasing the value, to implement voltage level control. The number of levels can be set based on actual needs, and the voltage difference between adjacent levels can be set to 10mV, 5mV, or other values. The present embodiment does not limit the specific number of levels or the voltage difference between adjacent levels.
供電電壓越大時,計算模組50的性能也越大。因此,根據預設的性能目標和實際性能控制輸出到頻率控制模組20和計算模組50的供電電壓,可以是先基於性能目標和實際性能確定目標的電壓值等級,再判斷計算模組在該電壓值等級的供電電壓下的功耗估計值是否會超出功耗基準。如果未超出功耗基準,則控制供電電壓等於該電壓值等級的電壓值;如果超出功耗基準,則進一步根據功耗基準和實際功耗來確定供電電壓的控制方式(其示例參見下文的相關描述)。The higher the supply voltage, the greater the performance of the computing module 50. Therefore, the supply voltage output to the frequency control module 20 and computing module 50 is controlled based on the preset performance target and actual performance. A target voltage level is first determined based on the performance target and actual performance, and then a determination is made as to whether the estimated power consumption of the computing module at that voltage level would exceed a power consumption baseline. If the power consumption baseline is not exceeded, the supply voltage is controlled to be equal to the voltage value of that voltage level. If the power consumption baseline is exceeded, the supply voltage control method is further determined based on the power consumption baseline and actual power consumption (see the relevant description below for an example).
示例性地,當性能目標大於實際性能時,可確定第一目標供電電壓的電壓值等級(也即目標的電壓值等級),使第一目標供電電壓的電壓值等級高於當前供電電壓的電壓值等級;當性能目標小於實際性能時,確定第一目標供電電壓的電壓值等級(也即目標的電壓值等級),使第一目標供電電壓的電壓值等級低於當前供電電壓的電壓值等級。For example, when the performance target is greater than the actual performance, the voltage value level of the first target power supply voltage (i.e., the target voltage value level) can be determined so that the voltage value level of the first target power supply voltage is higher than the voltage value level of the current power supply voltage; when the performance target is less than the actual performance, the voltage value level of the first target power supply voltage (i.e., the target voltage value level) can be determined so that the voltage value level of the first target power supply voltage is lower than the voltage value level of the current power supply voltage.
之後,確定計算模組在第一目標供電電壓下工作時的第一功耗估計值。在第一功耗估計值小於功耗基準時,控制輸出頻率控制模組20和計算模組50的供電電壓等於第一目標供電電壓,示例性地,可以採用類似于現有技術的比例積分微分控制演算法來使得供電電壓達到一定的電壓值。在第一功耗估計值大於功耗基準時,根據預設的功耗基準和實際功耗,控制輸出到頻率控制模組20和計算模組50的供電電壓(其示例參見下文的相關描述)。Next, a first estimated power consumption value of the computing module when operating at the first target power supply voltage is determined. When the first estimated power consumption value is less than a power consumption baseline, the power supply voltage output to the frequency control module 20 and the computing module 50 is controlled to be equal to the first target power supply voltage. For example, a proportional integral derivative control algorithm similar to conventional techniques can be employed to ensure that the power supply voltage reaches a certain voltage value. When the first estimated power consumption value is greater than the power consumption baseline, the power supply voltage output to the frequency control module 20 and the computing module 50 is controlled based on a preset power consumption baseline and actual power consumption (an example of which is described below).
通過這種方式,可以保證計算模組在供電電壓下的功耗是未超出功耗基準的,可為計算模組提供更強的保護。This ensures that the computing module's power consumption under the supply voltage does not exceed the power consumption benchmark, providing stronger protection for the computing module.
本領域技術人員應理解,在電壓及頻率控制系統不包括功耗統計模組60時,只要預設了功耗基準,性能和功耗等級控制模組40仍可完成第一目標供電電壓的電壓值等級的確定、以及計算模組50在第一目標供電電壓下工作時的第一功耗估計值的確定。在第一功耗估計值小於功耗基準時,仍可控制輸出到頻率控制模組20和計算模組50的供電電壓等於第一目標供電電壓,在第一功耗估計值大於功耗基準時,可以直接控制輸出的供電電壓的電壓值等級降低,可選地,還可以給出第三時鐘控制指令,頻率控制模組20還可以根據第三時鐘控制指令控制時鐘信號的頻率降低一定的數值(例如預設的第六閾值等等)。Those skilled in the art will understand that when the voltage and frequency control system does not include the power consumption statistics module 60, as long as a power consumption benchmark is preset, the performance and power consumption level control module 40 can still complete the determination of the voltage value level of the first target power supply voltage and the determination of the first power consumption estimate value when the calculation module 50 operates under the first target power supply voltage. When the first power consumption estimate is less than the power consumption baseline, the power supply voltage output to the frequency control module 20 and the calculation module 50 can still be controlled to be equal to the first target power supply voltage. When the first power consumption estimate is greater than the power consumption baseline, the output power supply voltage can be directly controlled to decrease in voltage level. Optionally, a third clock control instruction can be given, and the frequency control module 20 can also control the frequency of the clock signal to decrease by a certain value (such as a preset sixth threshold, etc.) according to the third clock control instruction.
下面介紹電壓及頻率控制系統包括功耗統計模組時,頻率性能和功耗等級控制模組根據預設的實際功耗與功耗基準,控制輸出到頻率控制模組和計算模組的供電電壓的示例性方式。The following describes an exemplary method for controlling the power supply voltage output to the frequency control module and the computing module based on preset actual power consumption and power consumption benchmarks when the voltage and frequency control system includes a power consumption statistics module.
在一種可能的實現方式中,所述根據預設的功耗基準和實際功耗,控制輸出到頻率控制模組20和計算模組50的供電電壓,包括:當實際功耗與功耗基準之差大於第五閾值時,確定第二目標供電電壓的電壓值等級,使計算模組在第二目標供電電壓下工作時的第二功耗估計值小於功耗基準、且第二功耗估計值與功耗基準之差最小;控制輸出到頻率控制模組20和計算模組50的供電電壓等於第二目標供電電壓。In one possible implementation, controlling the power supply voltage output to the frequency control module 20 and the computing module 50 based on a preset power consumption baseline and actual power consumption includes: when the difference between the actual power consumption and the power consumption baseline is greater than a fifth threshold, determining a voltage value level of a second target power supply voltage so that a second power consumption estimate of the computing module when operating at the second target power supply voltage is less than the power consumption baseline and the difference between the second power consumption estimate and the power consumption baseline is minimized; and controlling the power supply voltage output to the frequency control module 20 and the computing module 50 to be equal to the second target power supply voltage.
舉例來說,計算模組50的性能滿足性能目標時,計算模組50的功耗未必符合功耗基準;但計算模組50的功耗符合功耗基準時,無論計算模組50的性能是否滿足性能目標,都認為使用者可以接受當前性能。因此,當實際功耗與功耗基準之差大於第五閾值時,可以確定第二目標供電電壓的電壓值等級,並判斷計算模組50在第二目標供電電壓下工作時的第二功耗估計值,選擇第二功耗估計值小於功耗基準、且第二功耗估計值與功耗基準之差最小時的第二目標供電電壓的電壓值等級,作為確定的第二目標供電電壓的電壓值等級,控制輸出到頻率控制模組20和計算模組50的供電電壓等於第二目標供電電壓,此時計算模組50在第二目標供電電壓下的性能已經達到功耗基準之下的最大性能,因此,不必進一步判斷此時的性能是否達到性能目標。For example, when the performance of the computing module 50 meets the performance target, the power consumption of the computing module 50 may not meet the power consumption benchmark; however, when the power consumption of the computing module 50 meets the power consumption benchmark, regardless of whether the performance of the computing module 50 meets the performance target, it is considered that the user can accept the current performance. Therefore, when the difference between the actual power consumption and the power consumption baseline is greater than the fifth threshold, the voltage value level of the second target power supply voltage can be determined, and the second power consumption estimate value of the calculation module 50 when operating under the second target power supply voltage can be judged. The voltage value level of the second target power supply voltage when the second power consumption estimate value is less than the power consumption baseline and the difference between the second power consumption estimate value and the power consumption baseline is minimized is selected as the determined voltage value level of the second target power supply voltage, and the power supply voltage output to the frequency control module 20 and the calculation module 50 is controlled to be equal to the second target power supply voltage. At this time, the performance of the calculation module 50 under the second target power supply voltage has reached the maximum performance under the power consumption baseline. Therefore, there is no need to further judge whether the performance at this time has reached the performance target.
通過這種方式,在保證計算模組在供電電壓下的功耗未超出功耗基準的同時,可最大限度提升供電電壓,使得計算模組達到最佳性能。In this way, while ensuring that the power consumption of the computing module under the supply voltage does not exceed the power consumption benchmark, the supply voltage can be maximized, allowing the computing module to achieve optimal performance.
本領域技術人員應理解,在電壓及頻率控制系統包括功耗統計模組60時,性能和功耗等級控制模組40也可以在滿足上文所述的條件時輸出第一時鐘控制指令、第二時鐘控制指令,以使得控制效率更高。Those skilled in the art should understand that when the voltage and frequency control system includes the power consumption statistics module 60, the performance and power consumption level control module 40 can also output the first clock control instruction and the second clock control instruction when the conditions described above are met to make the control more efficient.
在一種可能的實現方式中,性能和功耗等級控制模組40還用於,在當前週期結束時,根據當前週期獲得的實際性能、實際功耗、輸出的供電電壓的變化情況、輸出的指令中的一種或多種得到分析報告,分析報告用於調節下一週期使用的性能目標和功耗基準。In one possible implementation, the performance and power consumption level control module 40 is also used to obtain an analysis report at the end of the current cycle based on one or more of the actual performance, actual power consumption, changes in the output power supply voltage, and output instructions obtained in the current cycle. The analysis report is used to adjust the performance target and power consumption benchmark used in the next cycle.
舉例來說,當前週期可以指性能統計模組30的性能統計週期,此時可以是根據當前週期獲得的實際性能、輸出的供電電壓的變化情況、輸出的指令中的一種或多種得到分析報告;當前週期也可以指功耗統計模組60的功耗統計週期,此時可以是根據當前週期獲得的實際功耗、輸出的供電電壓的變化情況、輸出的指令中的一種或多種得到分析報告。For example, the current cycle may refer to the performance statistics cycle of the performance statistics module 30, and an analysis report may be obtained based on one or more of the actual performance obtained in the current cycle, the change in the output power supply voltage, and the output instructions; the current cycle may also refer to the power consumption statistics cycle of the power consumption statistics module 60, and an analysis report may be obtained based on one or more of the actual power consumption obtained in the current cycle, the change in the output power supply voltage, and the output instructions.
如果預設的性能目標和預設的功耗基準是由某一設備(例如使用者設備)輸出給性能和功耗等級控制模組40,則性能和功耗等級控制模組40可以將分析報告回饋給該設備。該設備根據分析報告以及當前週期的預設的性能目標和預設的功耗基準,調節得到下一週期使用的性能目標和功耗基準,再輸出給性能和功耗等級控制模組40。如果預設的性能目標和預設的功耗基準是由性能和功耗等級控制模組40自身確定,則性能和功耗等級控制模組40可以直接根據分析報告以及當前週期的預設的性能目標和預設的功耗基準,調節得到下一週期使用的性能目標和功耗基準。本公開實施例對於使用分析報告調節得到下一週期使用的性能目標和功耗基準的步驟的執行物件不作限制。If the default performance target and power consumption benchmark are output to the performance and power consumption level control module 40 by a device (e.g., a user device), the performance and power consumption level control module 40 can feed back the analysis report to the device. Based on the analysis report and the default performance target and power consumption benchmark for the current cycle, the device adjusts the performance target and power consumption benchmark for the next cycle and outputs the results to the performance and power consumption level control module 40. If the default performance target and power consumption benchmark are determined by the performance and power consumption level control module 40 itself, the performance and power consumption level control module 40 can directly adjust the performance target and power consumption benchmark for the next cycle based on the analysis report and the default performance target and power consumption benchmark for the current cycle. The disclosed embodiment does not limit the execution object of the step of using the analysis report to adjust the performance target and power consumption baseline for the next cycle.
通過這種方式,可以及時更新性能目標和功耗基準。In this way, performance targets and power consumption baselines can be updated in a timely manner.
本公開實施例還提供了一種電壓及頻率控制方法,圖4示出根據本公開實施例的電壓及頻率控制方法的流程的示意圖。The disclosed embodiment also provides a voltage and frequency control method. FIG4 is a schematic diagram showing the process of the voltage and frequency control method according to the disclosed embodiment.
如圖4所示,所述方法應用於電壓及頻率控制系統,所述系統包括延時檢測模組、頻率控制模組、性能統計模組、性能和功耗等級控制模組,所述系統用於控制計算模組的時鐘頻率和供電電壓,所述方法包括步驟S41-步驟S44:步驟S41,所述延時檢測模組即時檢測所述計算模組的電路延時,並輸出所述電路延時至所述頻率控制模組;步驟S42,所述頻率控制模組根據當前供電電壓和所述電路延時,控制輸出到所述計算模組的時鐘信號的頻率,所述當前供電電壓由所述性能和功耗等級控制模組提供;步驟S43,所述性能統計模組週期性檢測所述計算模組的性能,獲得實際性能並輸出至所述性能和功耗等級控制模組;步驟S44,所述性能和功耗等級控制模組根據預設的性能目標和所述實際性能,控制輸出到所述頻率控制模組和所述計算模組的供電電壓。As shown in FIG4 , the method is applied to a voltage and frequency control system, which includes a delay detection module, a frequency control module, a performance statistics module, and a performance and power consumption level control module. The system is used to control the clock frequency and power supply voltage of the computing module. The method includes steps S41 to S44: Step S41, the delay detection module detects the circuit delay of the computing module in real time and outputs the circuit delay to the frequency control module; Step S42, the frequency control module adjusts the circuit delay according to the current power supply voltage. The current power supply voltage and the circuit delay are used to control the frequency of the clock signal output to the computing module, and the current power supply voltage is provided by the performance and power consumption level control module; in step S43, the performance statistics module periodically detects the performance of the computing module, obtains the actual performance and outputs it to the performance and power consumption level control module; in step S44, the performance and power consumption level control module controls the power supply voltage output to the frequency control module and the computing module according to a preset performance target and the actual performance.
在一種可能的實現方式中,所述延時檢測模組和所述計算模組物理上保持相同工藝特性、供電電壓、器件溫度的工作條件,所述即時檢測所述計算模組的電路延時,包括:即時檢測當前工藝特性、當前供電電壓、當前器件溫度的工作條件下自身的電路延時,作為所述計算模組的電路延時。In one possible implementation, the delay detection module and the computing module physically maintain the same operating conditions of process characteristics, power supply voltage, and device temperature. The real-time detection of the circuit delay of the computing module includes: real-time detection of its own circuit delay under the current working conditions of process characteristics, current power supply voltage, and current device temperature as the circuit delay of the computing module.
在一種可能的實現方式中,所述根據當前供電電壓和所述電路延時,控制輸出到所述計算模組的時鐘信號的頻率,包括:確定所述當前供電電壓和所述電路延時下的頻率最大值,控制輸出到所述計算模組的時鐘信號的頻率等於所述頻率最大值。In one possible implementation, controlling the frequency of the clock signal output to the computing module based on the current power supply voltage and the circuit delay includes: determining a maximum frequency under the current power supply voltage and the circuit delay, and controlling the frequency of the clock signal output to the computing module to be equal to the maximum frequency.
在一種可能的實現方式中,所述方法還包括:所述性能目標和所述實際性能之差大於第一閾值時,所述性能和功耗等級控制模組輸出第一時鐘控制指令到所述頻率控制模組;所述頻率控制模組根據所述第一時鐘控制指令,控制所述時鐘信號的頻率的數值提高第二閾值;所述實際性能和所述性能目標之差大於第一閾值時,所述性能和功耗等級控制模組輸出第二時鐘控制指令到所述頻率控制模組;所述頻率控制模組根據所述第二時鐘控制指令,控制所述計算模組的時鐘信號的頻率的數值降低第三閾值。In one possible implementation, the method further includes: when the difference between the performance target and the actual performance is greater than a first threshold, the performance and power consumption level control module outputs a first clock control instruction to the frequency control module; the frequency control module controls the frequency value of the clock signal to increase by a second threshold based on the first clock control instruction; when the difference between the actual performance and the performance target is greater than the first threshold, the performance and power consumption level control module outputs a second clock control instruction to the frequency control module; the frequency control module controls the frequency value of the clock signal of the computing module to decrease by a third threshold based on the second clock control instruction.
在一種可能的實現方式中,所述性能和功耗等級控制模組預先設置有多個等級的電壓值,電壓值等級越高時電壓值越大,所述根據預設的性能目標和所述實際性能,控制輸出到所述頻率控制模組和所述計算模組的供電電壓,包括:當所述性能目標大於所述實際性能時,控制輸出的所述供電電壓的電壓值等級提高;當所述性能目標小於所述實際性能時,控制輸出的所述供電電壓的電壓值等級降低。In one possible implementation, the performance and power consumption level control module is pre-set with multiple levels of voltage values, and the higher the voltage level, the larger the voltage value. The power supply voltage output to the frequency control module and the calculation module is controlled according to the preset performance target and the actual performance, including: when the performance target is greater than the actual performance, the voltage value level of the output power supply voltage is controlled to increase; when the performance target is less than the actual performance, the voltage value level of the output power supply voltage is controlled to decrease.
在一種可能的實現方式中,所述系統還包括功耗統計模組,所述方法還包括:所述功耗統計模組週期性檢測所述計算模組的功耗,獲得實際功耗並輸出至所述頻率控制模組和所述性能和功耗等級控制模組;所述頻率控制模組根據預設的功耗基準和所述實際功耗,控制輸出到所述計算模組的時鐘信號的頻率,使所述計算模組在所述頻率下工作時的第一功耗估計值未超出所述功耗基準;所述性能和功耗等級控制模組根據預設的功耗基準和所述實際功耗,控制輸出到所述頻率控制模組和所述計算模組的供電電壓。In one possible implementation, the system further includes a power consumption statistics module, and the method further includes: the power consumption statistics module periodically detects the power consumption of the computing module, obtains actual power consumption and outputs it to the frequency control module and the performance and power consumption level control module; the frequency control module controls the frequency of the clock signal output to the computing module based on a preset power consumption benchmark and the actual power consumption, so that a first power consumption estimate of the computing module when operating at the frequency does not exceed the power consumption benchmark; the performance and power consumption level control module controls the power supply voltage output to the frequency control module and the computing module based on the preset power consumption benchmark and the actual power consumption.
在一種可能的實現方式中,所述根據預設的功耗基準和所述實際功耗,控制輸出到所述計算模組的時鐘信號的頻率,包括:當所述實際功耗與所述功耗基準之差大於第四閾值時,控制輸出的所述時鐘信號的頻率等於所述頻率最大值與預設係數的乘積,所述預設係數的數值小於1。In one possible implementation, controlling the frequency of the clock signal output to the computing module based on a preset power consumption benchmark and the actual power consumption includes: when the difference between the actual power consumption and the power consumption benchmark is greater than a fourth threshold, controlling the frequency of the output clock signal to be equal to the product of the maximum frequency and a preset coefficient, where the value of the preset coefficient is less than 1.
在一種可能的實現方式中,所述性能和功耗等級控制模組預先設置有多個等級的電壓值,電壓值等級越高時電壓值越大,所述根據預設的性能目標和所述實際性能,控制輸出到所述頻率控制模組和所述計算模組的供電電壓,包括:當所述性能目標大於所述實際性能時,確定第一目標供電電壓的電壓值等級,使所述第一目標供電電壓的電壓值等級高於當前供電電壓的電壓值等級;當所述性能目標小於所述實際性能時,確定第一目標供電電壓的電壓值等級,使所述第一目標供電電壓的電壓值等級低於當前供電電壓的電壓值等級;確定所述計算模組在所述第一目標供電電壓下工作時的第一功耗估計值;在所述第一功耗估計值小於所述功耗基準時,控制輸出到所述頻率控制模組和所述計算模組的供電電壓等於所述第一目標供電電壓;在所述第一功耗估計值大於所述功耗基準時,根據預設的功耗基準和所述實際功耗,控制輸出到所述頻率控制模組和所述計算模組的供電電壓。In one possible implementation, the performance and power consumption level control module is pre-set with multiple levels of voltage values, and the higher the voltage level, the greater the voltage value. The control of the power supply voltage output to the frequency control module and the calculation module based on the preset performance target and the actual performance includes: when the performance target is greater than the actual performance, determining the voltage value level of the first target power supply voltage, so that the voltage value level of the first target power supply voltage is higher than the voltage value level of the current power supply voltage; when the performance target is less than the actual performance, determining the first target power supply voltage voltage level of the first target power supply voltage so that the voltage level of the first target power supply voltage is lower than the voltage level of the current power supply voltage; determining a first power consumption estimate when the calculation module operates under the first target power supply voltage; when the first power consumption estimate is less than the power consumption baseline, controlling the power supply voltage output to the frequency control module and the calculation module to be equal to the first target power supply voltage; when the first power consumption estimate is greater than the power consumption baseline, controlling the power supply voltage output to the frequency control module and the calculation module according to a preset power consumption baseline and the actual power consumption.
在一種可能的實現方式中,所述根據預設的功耗基準和所述實際功耗,控制輸出到所述頻率控制模組和所述計算模組的供電電壓,包括:當所述實際功耗與所述功耗基準之差大於第五閾值時,確定第二目標供電電壓的電壓值等級,使所述計算模組在所述第二目標供電電壓下工作時的第二功耗估計值小於所述功耗基準、且所述第二功耗估計值與所述功耗基準之差最小;控制輸出到所述頻率控制模組和所述計算模組的供電電壓等於所述第二目標供電電壓。In one possible implementation, controlling the power supply voltage output to the frequency control module and the computing module based on a preset power consumption benchmark and the actual power consumption includes: when the difference between the actual power consumption and the power consumption benchmark is greater than a fifth threshold, determining a voltage value level of a second target power supply voltage so that a second power consumption estimate of the computing module when operating at the second target power supply voltage is less than the power consumption benchmark and the difference between the second power consumption estimate and the power consumption benchmark is minimized; and controlling the power supply voltage output to the frequency control module and the computing module to be equal to the second target power supply voltage.
在一種可能的實現方式中,所述方法還包括:所述性能和功耗等級控制模組在當前週期結束時,根據所述當前週期獲得的實際性能、實際功耗、輸出的供電電壓的變化情況、輸出的指令中的一種或多種得到分析報告,所述分析報告用於調節下一週期使用的所述性能目標和所述功耗基準。In one possible implementation, the method further includes: at the end of the current cycle, the performance and power consumption level control module obtains an analysis report based on one or more of the actual performance, actual power consumption, changes in the output power supply voltage, and output instructions obtained in the current cycle, and the analysis report is used to adjust the performance target and the power consumption benchmark used in the next cycle.
在一些實施例中,本公開實施例提供的方法可以由上文系統實施例包含的模組所執行,其具體實現可以參照上文系統實施例的描述,為了簡潔,這裡不再贅述。In some embodiments, the method provided by the disclosed embodiments may be executed by the modules included in the above system embodiments. The specific implementation thereof may refer to the description of the above system embodiments and will not be described again here for the sake of brevity.
本公開實施例還提出一種電腦可讀儲存媒體,其上儲存有電腦程式指令,所述電腦程式指令被處理器執行時實現上述方法。電腦可讀儲存媒體可以是易失性或電腦可讀儲存媒體。The disclosed embodiment also provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the above method is implemented. The computer-readable storage medium can be a volatile or computer-readable storage medium.
本公開實施例還提供了一種電腦程式產品,包括電腦可讀代碼,或者承載有電腦可讀代碼的電腦可讀儲存媒體,當所述電腦可讀代碼在電子設備的處理器中運行時,所述電子設備中的處理器執行上述方法。The disclosed embodiment also provides a computer program product, including a computer-readable code, or a computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
圖5示出根據本公開實施例的電子設備1900的框圖。例如,電子設備1900可以被提供為一伺服器或終端設備。參照圖5,電子設備1900包括處理元件1922,其進一步包括一個或多個處理器,以及由記憶體1932所代表的記憶體資源,用於儲存可由處理元件1922的執行的指令,例如應用程式。記憶體1932中儲存的應用程式可以包括一個或一個以上的每一個對應於一組指令的模組。此外,處理元件1922被配置為執行指令,以執行上述方法。FIG5 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, electronic device 1900 can be provided as a server or a terminal device. Referring to FIG5 , electronic device 1900 includes a processing element 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as applications, that can be executed by processing element 1922. The application stored in memory 1932 can include one or more modules, each corresponding to a set of instructions. Furthermore, processing element 1922 is configured to execute the instructions to perform the above-described method.
電子設備1900還可以包括一個電源元件1926被配置為執行電子設備1900的電源管理,一個有線或無線網路介面1950被配置為將電子設備1900連接到網路,和一個輸入輸出介面1958(I/O介面)。電子設備1900可以操作基於儲存在記憶體1932的作業系統,例如Windows Server TM,Mac OS X TM,Unix TM, Linux TM,FreeBSD TM或類似。 Electronic device 1900 may also include a power supply 1926 configured to perform power management for electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input/output interface 1958 (I/O interface). Electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server ™ , Mac OS X ™ , Unix ™ , Linux ™ , FreeBSD ™ , or the like.
在示例性實施例中,還提供了一種電腦可讀儲存媒體,例如包括電腦程式指令的記憶體1932,上述電腦程式指令可由電子設備1900的處理元件1922執行以完成上述方法。In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by the processing element 1922 of the electronic device 1900 to perform the above-described method.
本公開可以是系統、方法和/或電腦程式產品。電腦程式產品可以包括電腦可讀儲存媒體,其上載有用於使處理器實現本公開的各個方面的電腦可讀程式指令。The present disclosure may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium that carries computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
電腦可讀儲存媒體可以是可以保持和儲存由指令執行設備使用的指令的有形設備。電腦可讀儲存媒體例如可以是但不限於電存放裝置、磁存放裝置、光存放裝置、電磁存放裝置、半導體存放裝置或者上述的任意合適的組合。電腦可讀儲存媒體的更具體的例子(非窮舉的列表)包括:可擕式電腦盤、硬碟、隨機存取記憶體(RAM)、唯讀記憶體(ROM)、可擦式可程式設計唯讀記憶體(EPROM或快閃記憶體)、靜態隨機存取記憶體(SRAM)、可擕式壓縮磁碟唯讀記憶體(CD-ROM)、數位多功能盤(DVD)、記憶棒、軟碟、機械編碼設備、例如其上儲存有指令的打孔卡或凹槽內凸起結構、以及上述的任意合適的組合。這裡所使用的電腦可讀儲存媒體不被解釋為暫態信號本身,諸如無線電波或者其他自由傳播的電磁波、通過波導或其他傳輸媒介傳播的電磁波(例如,通過光纖電纜的光脈衝)、或者通過電線傳輸的電信號。A computer-readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: portable computer disks, hard drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding devices such as punched cards or raised-in-recess structures on which instructions are stored, and any suitable combination of the foregoing. As used herein, computer-readable storage medium is not to be construed as a transient signal per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or electrical signals transmitted through wires.
這裡所描述的電腦可讀程式指令可以從電腦可讀儲存媒體下載到各個計算/處理設備,或者通過網路、例如網際網路、局域網、廣域網路和/或無線網下載到外部電腦或外部存放裝置。網路可以包括銅傳輸電纜、光纖傳輸、無線傳輸、路由器、防火牆、交換機、閘道電腦和/或邊緣伺服器。每個計算/處理設備中的網路介面卡或者網路介面從網路接收電腦可讀程式指令,並轉發該電腦可讀程式指令,以供儲存在各個計算/處理設備中的電腦可讀儲存媒體中。The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing/processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network interface card or network interface in each computing/processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to the computer-readable storage medium in each computing/processing device for storage.
用於執行本公開操作的電腦程式指令可以是彙編指令、指令集架構(ISA)指令、機器指令、機器相關指令、微代碼、固件指令、狀態設置資料、或者以一種或多種程式設計語言的任意組合編寫的原始程式碼或目標代碼,所述程式設計語言包括物件導向的程式設計語言—諸如Smalltalk、C++等,以及常規的過程式程式設計語言—諸如“C”語言或類似的程式設計語言。電腦可讀程式指令可以完全地在使用者電腦上執行、部分地在使用者電腦上執行、作為一個獨立的套裝軟體執行、部分在使用者電腦上部分在遠端電腦上執行、或者完全在遠端電腦或伺服器上執行。在涉及遠端電腦的情形中,遠端電腦可以通過任意種類的網路—包括局域網(LAN)或廣域網路(WAN)—連接到使用者電腦,或者,可以連接到外部電腦(例如利用網際網路服務提供者來通過網際網路連接)。在一些實施例中,通過利用電腦可讀程式指令的狀態資訊來個性化定制電子電路,例如可程式設計邏輯電路、現場可程式設計閘陣列(FPGA)或可程式設計邏輯陣列(PLA),該電子電路可以執行電腦可讀程式指令,從而實現本公開的各個方面。The computer program instructions for performing the operations disclosed herein may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state-setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The computer-readable program instructions may be executed entirely on the user computer, partially on the user computer, as a stand-alone packaged software, partially on the user computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, aspects of the present disclosure are implemented by utilizing state information of computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), which can execute computer-readable program instructions.
這裡參照根據本公開實施例的方法、裝置(系統)和電腦程式產品的流程圖和/或框圖描述了本公開的各個方面。應當理解,流程圖和/或框圖的每個方框以及流程圖和/或框圖中各方框的組合,都可以由電腦可讀程式指令實現。Various aspects of the present disclosure are described herein with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and/or block diagrams, as well as combinations of blocks in the flowcharts and/or block diagrams, can be implemented by computer-readable program instructions.
這些電腦可讀程式指令可以提供給通用電腦、專用電腦或其它可程式設計資料處理裝置的處理器,從而生產出一種機器,使得這些指令在通過電腦或其它可程式設計資料處理裝置的處理器執行時,產生了實現流程圖和/或框圖中的一個或多個方框中規定的功能/動作的裝置。也可以把這些電腦可讀程式指令儲存在電腦可讀儲存媒體中,這些指令使得電腦、可程式設計資料處理裝置和/或其他設備以特定方式工作,從而,儲存有指令的電腦可讀媒體則包括一個製造品,其包括實現流程圖和/或框圖中的一個或多個方框中規定的功能/動作的各個方面的指令。These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and/or other equipment to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
也可以把電腦可讀程式指令載入到電腦、其它可程式設計資料處理裝置、或其它設備上,使得在電腦、其它可程式設計資料處理裝置或其它設備上執行一系列操作步驟,以產生電腦實現的過程,從而使得在電腦、其它可程式設計資料處理裝置、或其它設備上執行的指令實現流程圖和/或框圖中的一個或多個方框中規定的功能/動作。Computer-readable program instructions may also be loaded onto a computer, other programmable data processing device, or other apparatus to cause a series of operating steps to be performed on the computer, other programmable data processing device, or other apparatus to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing device, or other apparatus to implement the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
附圖中的流程圖和框圖顯示了根據本公開的多個實施例的系統、方法和電腦程式產品的可能實現的體系架構、功能和操作。在這點上,流程圖或框圖中的每個方框可以代表一個模組、程式段或指令的一部分,所述模組、程式段或指令的一部分包含一個或多個用於實現規定的邏輯功能的可執行指令。在有些作為替換的實現中,方框中所標注的功能也可以以不同於附圖中所標注的順序發生。例如,兩個連續的方框實際上可以基本並行地執行,它們有時也可以按相反的循序執行,這依所涉及的功能而定。也要注意的是,框圖和/或流程圖中的每個方框、以及框圖和/或流程圖中的方框的組合,可以用執行規定的功能或動作的專用的基於硬體的系統來實現,或者可以用專用硬體與電腦指令的組合來實現。The flowcharts and block diagrams in the accompanying figures illustrate possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each box in a flowchart or block diagram may represent a module, program segment, or portion of an instruction that contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the boxes may occur in an order different from that marked in the accompanying figures. For example, two consecutive boxes may actually be executed substantially in parallel, or they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagrams and/or flowcharts, and combinations of boxes in the block diagrams and/or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
以上已經描述了本公開的各實施例,上述說明是示例性的,並非窮盡性的,並且也不限於所披露的各實施例。在不偏離所說明的各實施例的範圍和精神的情況下,對於本技術領域的普通技術人員來說許多修改和變更都是顯而易見的。本文中所用術語的選擇,旨在最好地解釋各實施例的原理、實際應用或對市場中的技術改進,或者使本技術領域的其它普通技術人員能理解本文披露的各實施例。While various embodiments of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limiting of the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the disclosed embodiments. The terminology used herein is selected to best explain the principles, practical applications, or market-leading technological advancements of the embodiments, or to facilitate understanding of the embodiments by others skilled in the art.
雖然本揭示的特定實施例已經揭露有關上述實施例,此些實施例不意欲限制本揭示。各種替代及改良可藉由相關領域中的一般技術人員在本揭示中執行而沒有從本揭示的原理及精神背離。因此,本揭示的保護範圍由所附申請專利範圍確定。Although specific embodiments of the present disclosure have been described with reference to the above-described embodiments, these embodiments are not intended to limit the present disclosure. Various substitutions and modifications may be made by those skilled in the relevant art without departing from the principles and spirit of the present disclosure. Therefore, the scope of protection of the present disclosure is determined by the appended patent applications.
1:電子設備 2:電子設備 10:延時檢測模組 20:頻率控制模組 30:性能統計模組 40:性能和功耗等級控制模組 50:計算模組 60:功耗統計模組 1900:電子設備 1922:處理元件 1926:電源元件 1932:記憶體 1950:網路介面 1958:輸入輸出介面 S41-S44:步驟 1: Electronic Device 2: Electronic Device 10: Delay Detection Module 20: Frequency Control Module 30: Performance Statistics Module 40: Performance and Power Level Control Module 50: Computing Module 60: Power Statistics Module 1900: Electronic Device 1922: Processing Component 1926: Power Component 1932: Memory 1950: Network Interface 1958: Input/Output Interface S41-S44: Steps
為了更清楚地說明本申請或現有技術中的技術方案,下面將對實施例或現有技術描述中所需要使用的附圖作一簡單地介紹,顯而易見地,下面描述中的附圖是本申請的一些實施例,對於本領域普通技術人員來講,在不付出創造性勞動的前提下,還可以根據這些附圖獲得其他的附圖。 圖1示出根據本公開實施例的電壓及頻率控制系統的結構的示意圖。 圖2示出根據本公開實施例的電壓及頻率控制系統的示例性工作流程。 圖3示出根據本公開實施例的電壓及頻率控制系統的結構的示意圖。 圖4示出根據本公開實施例的電壓及頻率控制方法的流程的示意圖。 圖5示出根據本公開實施例的電子設備的框圖。 To more clearly illustrate the technical solutions of this application or the prior art, the following briefly describes the figures required for use in the embodiments or prior art descriptions. It should be understood that the figures described below represent some embodiments of this application. A person skilled in the art can derive other figures based on these figures without inventive effort. Figure 1 is a schematic diagram of the structure of a voltage and frequency control system according to an embodiment of the present disclosure. Figure 2 is an exemplary workflow of a voltage and frequency control system according to an embodiment of the present disclosure. Figure 3 is a schematic diagram of the structure of a voltage and frequency control system according to an embodiment of the present disclosure. Figure 4 is a schematic diagram of the flow of a voltage and frequency control method according to an embodiment of the present disclosure. Figure 5 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
10:延時檢測模組 20:頻率控制模組 30:性能統計模組 40:性能和功耗等級控制模組 50:計算模組 10: Delay Detection Module 20: Frequency Control Module 30: Performance Statistics Module 40: Performance and Power Level Control Module 50: Computation Module
Claims (11)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2023108135203 | 2023-07-04 | ||
| CN202310813520.3A CN116540820B (en) | 2023-07-04 | 2023-07-04 | Voltage and frequency control system, method and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW202503483A TW202503483A (en) | 2025-01-16 |
| TWI893884B true TWI893884B (en) | 2025-08-11 |
Family
ID=87452825
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW113125189A TWI893884B (en) | 2023-07-04 | 2024-07-04 | Voltage and frequency control system, method, computer-readable storage medium |
Country Status (3)
| Country | Link |
|---|---|
| CN (1) | CN116540820B (en) |
| TW (1) | TWI893884B (en) |
| WO (1) | WO2025007936A1 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116540820B (en) * | 2023-07-04 | 2023-08-29 | 摩尔线程智能科技(北京)有限责任公司 | Voltage and frequency control system, method and storage medium |
| CN119414943A (en) * | 2024-10-31 | 2025-02-11 | 苏州元脑智能科技有限公司 | Memory voltage processing method and device, storage medium and electronic device |
| CN119211522B (en) * | 2024-11-28 | 2025-05-27 | 沐曦集成电路(南京)有限公司 | Video coding and decoding performance analysis device, method, equipment and medium |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW200517800A (en) * | 2003-07-03 | 2005-06-01 | Louis J Morales | On-chip compensation control for voltage regulation |
| CN103425223A (en) * | 2012-05-18 | 2013-12-04 | 联发科技(新加坡)私人有限公司 | Voltage adjusting device and method, mobile device and operating method thereof |
| US20150286257A1 (en) * | 2014-04-08 | 2015-10-08 | Qualcomm Incorporated | Energy efficiency aware thermal management in a multi-processor system on a chip |
| TW201800900A (en) * | 2015-12-17 | 2018-01-01 | 米尼碼處理器公司 | System and method for controlling operating voltage |
| US20190212799A1 (en) * | 2018-01-10 | 2019-07-11 | Atlazo, Inc. | Adaptive energy optimal computing |
| CN111722931A (en) * | 2020-06-24 | 2020-09-29 | 龙芯中科技术有限公司 | Control method, device and equipment of processor and storage medium |
| CN115220564A (en) * | 2021-04-15 | 2022-10-21 | Oppo广东移动通信有限公司 | Power consumption adjustment method, device, storage medium, processor and electronic device |
Family Cites Families (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9026821B2 (en) * | 2008-02-01 | 2015-05-05 | Cochlear Limited | Optimizing power consumption of a digital circuit |
| KR20110032606A (en) * | 2009-09-23 | 2011-03-30 | 삼성전자주식회사 | Electronic device controller for improving the performance of electronic devices |
| US20110131427A1 (en) * | 2009-12-02 | 2011-06-02 | Jorgenson Joel A | Power management states |
| US8527801B2 (en) * | 2010-06-30 | 2013-09-03 | International Business Machines Corporation | Performance control of frequency-adapting processors by voltage domain adjustment |
| US9304531B2 (en) * | 2012-10-31 | 2016-04-05 | Broadcom Corporation | Dynamically scaling voltage/frequency |
| CN104836571B (en) * | 2014-02-07 | 2017-11-28 | 扬智科技股份有限公司 | Clock adjustment device and clock adjustment method |
| KR20160042618A (en) * | 2014-10-10 | 2016-04-20 | 엘지전자 주식회사 | Mobile terminal and method for controlling the same |
| US9851774B2 (en) * | 2016-01-04 | 2017-12-26 | Qualcomm Incorporated | Method and apparatus for dynamic clock and voltage scaling in a computer processor based on program phase |
| KR102739996B1 (en) * | 2019-01-04 | 2024-12-06 | 삼성전자주식회사 | Sustem on chip, integrated circuit and operating method thereof |
| CN112292652B (en) * | 2019-02-27 | 2023-06-02 | 华为技术有限公司 | A dynamic voltage frequency adjustment system and method |
| CN110703898A (en) * | 2019-09-06 | 2020-01-17 | 无锡江南计算技术研究所 | Dynamic management system and method for processor power consumption based on periodic query and interrupt |
| CN114185835B (en) * | 2020-09-15 | 2025-03-14 | 阿里巴巴集团控股有限公司 | System on chip and method for regulating voltage and frequency |
| US11493970B2 (en) * | 2020-10-30 | 2022-11-08 | Qualcomm Incorporated | Two-stage dynamic power supply voltage adjustment |
| CN114721908B (en) * | 2022-04-11 | 2022-12-06 | 摩尔线程智能科技(北京)有限责任公司 | On-chip power consumption control circuit, chip and power consumption control method |
| CN116540820B (en) * | 2023-07-04 | 2023-08-29 | 摩尔线程智能科技(北京)有限责任公司 | Voltage and frequency control system, method and storage medium |
-
2023
- 2023-07-04 CN CN202310813520.3A patent/CN116540820B/en active Active
-
2024
- 2024-07-04 WO PCT/CN2024/103706 patent/WO2025007936A1/en active Pending
- 2024-07-04 TW TW113125189A patent/TWI893884B/en active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW200517800A (en) * | 2003-07-03 | 2005-06-01 | Louis J Morales | On-chip compensation control for voltage regulation |
| CN103425223A (en) * | 2012-05-18 | 2013-12-04 | 联发科技(新加坡)私人有限公司 | Voltage adjusting device and method, mobile device and operating method thereof |
| US20150286257A1 (en) * | 2014-04-08 | 2015-10-08 | Qualcomm Incorporated | Energy efficiency aware thermal management in a multi-processor system on a chip |
| TW201800900A (en) * | 2015-12-17 | 2018-01-01 | 米尼碼處理器公司 | System and method for controlling operating voltage |
| US20190212799A1 (en) * | 2018-01-10 | 2019-07-11 | Atlazo, Inc. | Adaptive energy optimal computing |
| CN111722931A (en) * | 2020-06-24 | 2020-09-29 | 龙芯中科技术有限公司 | Control method, device and equipment of processor and storage medium |
| CN115220564A (en) * | 2021-04-15 | 2022-10-21 | Oppo广东移动通信有限公司 | Power consumption adjustment method, device, storage medium, processor and electronic device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116540820A (en) | 2023-08-04 |
| WO2025007936A1 (en) | 2025-01-09 |
| CN116540820B (en) | 2023-08-29 |
| TW202503483A (en) | 2025-01-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI893884B (en) | Voltage and frequency control system, method, computer-readable storage medium | |
| US10275001B2 (en) | Thermal throttling of electronic devices | |
| US10348281B1 (en) | Clock control based on voltage associated with a microprocessor | |
| US7464278B2 (en) | Combining power prediction and optimal control approaches for performance optimization in thermally limited designs | |
| JP6012612B2 (en) | Energy capture of time-varying energy sources by changing the computational workload | |
| Liu et al. | Sleepscale: Runtime joint speed scaling and sleep states management for power efficient data centers | |
| WO2021042339A1 (en) | Heat dissipation control and model training method, device and system, and storage medium | |
| JP2014529777A (en) | Improving the performance of digital circuits using current management | |
| US20150081044A1 (en) | Dynamic Adjustment of Operational Parameters to Compensate for Sensor Based Measurements of Circuit Degradation | |
| Borah et al. | Power saving strategies in green cloud computing systems | |
| WO2021042245A1 (en) | Method and apparatus for controlling heat dissipation device | |
| US20170031417A1 (en) | Deterministic current based frequency optimization of processor chip | |
| TW201520784A (en) | Renewable energy power generation quantity prediction system and method, and power supply configuration system | |
| US10761583B2 (en) | Variation-aware intra-node power shifting among different hardware components | |
| US11762380B2 (en) | Hardware device temperature control with expected lifetime calculation | |
| Hu et al. | CPU load prediction using support vector regression and Kalman smoother for cloud | |
| US9146597B2 (en) | Minimizing aggregate cooling and leakage power with fast convergence | |
| US10048740B2 (en) | Controlling power consumption | |
| US8464199B1 (en) | Circuit design using design variable function slope sensitivity | |
| US9733685B2 (en) | Temperature-aware microprocessor voltage management | |
| US20170208121A1 (en) | Server pool management | |
| WO2022166679A1 (en) | Computing core, computing core temperature adjustment method and device, medium, chip, and system | |
| US8943341B2 (en) | Minimizing power consumption for fixed-frequency processing unit operation | |
| WO2024040887A1 (en) | Power supply voltage control method and device, blockchain server, and storage medium | |
| US10489189B2 (en) | Selection of maintenance tasks |