WO2010091598A1 - Method and device for automatic real-time adjustment of clock frequency or supply voltage of processor system - Google Patents

Method and device for automatic real-time adjustment of clock frequency or supply voltage of processor system Download PDF

Info

Publication number
WO2010091598A1
WO2010091598A1 PCT/CN2010/000183 CN2010000183W WO2010091598A1 WO 2010091598 A1 WO2010091598 A1 WO 2010091598A1 CN 2010000183 W CN2010000183 W CN 2010000183W WO 2010091598 A1 WO2010091598 A1 WO 2010091598A1
Authority
WO
WIPO (PCT)
Prior art keywords
processor
instruction
usage rate
clock frequency
feature
Prior art date
Application number
PCT/CN2010/000183
Other languages
French (fr)
Chinese (zh)
Inventor
林正浩
Original Assignee
上海芯豪微电子有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海芯豪微电子有限公司 filed Critical 上海芯豪微电子有限公司
Publication of WO2010091598A1 publication Critical patent/WO2010091598A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/324Power saving characterised by the action undertaken by lowering clock frequency
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3296Power saving characterised by the action undertaken by lowering the supply or operating voltage
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the invention belongs to the field of integrated circuits, and is specifically a method and device for automatically adjusting the clock frequency or supply voltage of a processor system in real time. Background technique
  • the gated clock is widely used to reduce the average power consumption of the processor.
  • the dynamic power consumption of the device the above technology can not do anything.
  • system computer manufacturers have adopted methods to adjust the clock frequency to reduce the dynamic power consumption of the processor and apply for related patents, but mainly rely on application software and software systems to implement, and to some extent, system or user intervention is required.
  • most of the existing technical solutions and ideas are based on high performance, and the system power consumption is reduced under the premise of ensuring high performance.
  • the present invention takes the on-demand adjustment as a starting point and reduces the system power consumption under the premise of ensuring the normal operation of the system.
  • Taiwan Renbao Computer Industry Co., Ltd. invented a method for dynamically adjusting the frequency of the central processing unit and applied for a patent (Chinese Patent Office, Patent No.: 200310121239.6) including a correspondence table, which includes multiple levels, and each A hierarchy defines a set of front-side bus operating frequencies and corresponding CPU usage ranges; in the implementation, the current usage rate of the central processing unit is first obtained; and the front end of the central processing unit is adjusted according to the current usage ratio and the correspondence table
  • the bus operates at a frequency to the corresponding level so that the processor is running at a current usage rate that is included in the range of CPU usage defined by the corresponding hierarchy.
  • the system can adopt different correspondence between the central processor usage rate and the front-side bus operating frequency according to different power supply conditions, thereby achieving different processing speeds and consuming different powers, thereby effectively reducing processor unnecessary. Energy consumption.
  • the invention requires software support, especially processor usage is completely dependent on software to check Secondly, the invention needs a correspondence table. The adjustment of the operating frequency of the processor needs to find the correspondence table to realize, so the adjustment process is complicated, and the adjustment speed is relatively slow to some extent, and the invention is completely implemented by hardware. There are essential differences in the methods.
  • a method for determining the switching point of a microprocessor with multiple performance state capabilities (in Chinese Patent Office, Patent No. 02806816.5) proposed by Intel Corporation of California, USA, provides a processor frequency for maintaining system responsiveness Automatic adjustment method.
  • the inventive performance level policy algorithm detects the increase in processor usage fast enough to switch to a higher performance level comparable to maximum system performance.
  • the performance level is comparable to the maximum system performance.
  • the performance level policy algorithm of embodiments of the present invention delays the conversion of the processor to lower performance levels so that the fast reversal of the requirements does not contribute to unnecessary conversions.
  • This method is different from the present invention in that the adjustment of the clock frequency is also inseparable from the software support, and in particular, power management software is required to control the adjustment of the operating voltage and the operating frequency.
  • Taiwan MSI Technology Co., Ltd. proposed to adjust the operating frequency of the central processing unit (China Patent Office, patent number: 03137089.6).
  • the invention gradually adjusts the operating frequency according to the real-time operating state of the central processing unit, and includes the following steps: Establishing a frequency a class conversion table; obtaining current usage state data of one of the central processing units; converting a target frequency class value according to the frequency class conversion table; and gradually adjusting the operating frequency to the target frequency class value.
  • This approach reduces human error, maximizes CPU performance, and reduces resource waste and hardware component wear and tear.
  • the method relies entirely on the software to adjust the operating frequency of the central processing unit.
  • the technical means is slow and it is difficult to achieve real-time adjustment.
  • the method performs fuzzy adjustment of the operating frequency according to the working state of the processor.
  • the ability to reduce the power consumption of the processor is limited, and there is a substantial difference in the implementation of the present invention, and there is also a certain difference in effect from the present invention.
  • Taiwan Yingyida Co., Ltd. proposed an architecture and method for adjusting the operating frequency of the central processing unit (China Patent Office, patent number: 03101741.X), which can switch the operating speed of the central processing unit of the information processing system at any time.
  • the invention comprises a firmware structure and a software for matching the same, and the method mainly adjusts the working frequency by detecting the processor temperature, and the invention adjusts the working frequency by detecting the current usage rate of the processor. The essential difference.
  • the control method and system proposed by Shanghai Huanda Computer Technology Co., Ltd.
  • the existing inventions and technologies need to be supported by software, and the adjustment speed is relatively slow, which makes it difficult to achieve real-time adjustment.
  • the present invention addresses the above problems and incorporates the deficiencies of the prior art.
  • a method and device for automatically adjusting the clock frequency or supply voltage of a processor system in real time are proposed.
  • the device and its automatic real-time adjustment of the clock frequency or the supply voltage are completely implemented in hardware, and are designed to automatically adjust the clock frequency in real time. Or supply voltage to reduce the dynamic power consumption of the processor.
  • the method for automatically adjusting the clock frequency or the supply voltage of the processor system in real time is implemented in a hardware manner, and mainly includes the following two steps:
  • the idle task feature of the present invention may be a singular or continuous plurality of instruction codes indicating an idle task, or may be prompted by a software system.
  • the processor usage rate of the present invention refers to the ratio of the processor performing non-idle tasks per unit time. For example, set the unit time to the duration of 1 million processor clock cycles. If there are 20,000 clock cycles for idle tasks in 1 million clock cycles, the other 98,000 clock cycles perform other tasks. , then the processor usage is 98%. Assume that the benchmark usage is 30%, once there are more than 700,000 clock cycles in 1 million clock cycles When an idle task is executed, the current processor usage is less than the reference usage, and the clock frequency or supply voltage needs to be lowered. In this example, for ease of implementation, the processor usage can be calculated every 1 million clock cycles, that is, the clock frequency or supply voltage can be adjusted every 1 million clock cycles.
  • the idle task feature of the present invention is a singular or continuous plurality of instruction codes indicating an idle task
  • the instruction code executed when the software system idle task loop is stored in advance is matched with the currently executed instruction of the processor, and the unit is obtained.
  • the ratio of time that the processor executes non-software system idle task instructions that is, processor usage.
  • the usage rate and the reference usage rate are compared, and the clock frequency or the supply voltage of the processor is adjusted according to the comparison result.
  • the processor usage is the rate at which the processor executes non-software system idle task cycles per unit time.
  • the prompting method may be an execution result in the processor by an instruction or instruction in the software system.
  • the processor records the current thread number (TID) or process number (PID) when executing the instructions or forming an execution result of the instructions.
  • the thread number or the process number is matched with the current thread number or the process number of the processor, and the processor executes the unit or the process corresponding to the thread number or the process number.
  • the ratio of threads or processes that is, the processor usage rate; the usage rate and the reference usage rate are compared, and the clock frequency or the supply voltage of the processor is adjusted according to the comparison result.
  • the processor usage rate that is, the ratio of the processor corresponding to the thread number or the process number corresponding to the process number, is not executed by the processor per unit time.
  • one of the instructions may be added to a code segment corresponding to an idle task in the software, and once the instruction in the idle task is executed, the processor may use the thread number or the process number corresponding to the idle task. Recorded for subsequent matching and calculates processor usage.
  • the method suggested by the software system through the instruction may be to write a specific register in the processor through an instruction in the software system, or perform a specific bit in a register in the processor.
  • Write operation When the register or register bit is written, the processor records the current thread number. In the subsequent execution, the thread number is matched with the current thread number of the processor, and the current processor usage rate can be obtained by calculation according to the technical solution of the present invention. The usage rate and the reference usage rate are compared, and the clock frequency or power supply voltage of the processor is adjusted based on the comparison result.
  • the reference usage rate in the method for automatically adjusting the clock frequency or the supply voltage of the processor system in real time according to the present invention may be fixed, or may be reconfigured or self-learned, may be solidified inside the chip, or may be System writes can also be written by software.
  • the present invention provides an apparatus for automatically adjusting a clock frequency or a supply voltage of a processor system in real time, which can be executed according to The characteristics of the instructions in the software system adjust the processor system clock frequency or supply voltage.
  • the apparatus includes a feature command memory, a feature matching circuit, a comparison determining device, and a clock or voltage regulating device. among them:
  • the feature instruction memory is configured to store the instruction code executed when the software system idles the task cycle; the software system includes but is not limited to an operating system, system software or application software having an idle task cycle.
  • a feature matching circuit configured to perform intelligent feature matching between the idle task loop instruction code and the current execution instruction of the processor;
  • the comparison determining device is configured to compare the current processor usage rate and the reference usage rate, and determine an adjustment manner according to the comparison result;
  • a clock or voltage regulator that adjusts the processor clock frequency or supply voltage.
  • the feature instruction memory of the present invention may store the instruction code or the operation code in all or part of the idle task cycle, and may also store the instruction code of the instruction code or the operation code in all or part of the idle task cycle, which is obtained by algorithm transformation.
  • the instruction code or the operation code in all or part of the idle task cycle may be matched, or the instruction code in all or part of the idle task cycle or the feature code obtained by the algorithm may be matched.
  • the instruction code, the operation code or the feature code in the characteristic instruction memory of the present invention can be solidified into the chip during the production of the chip, or can be written by the system or software when the system is started, and can also be self-learned and written, and its storage
  • the medium can be volatile or non-volatile, and can be written once or multiple times.
  • the clock or voltage regulating device of the present invention adjusts the processor clock frequency or the supply voltage in real time according to the current usage rate of the processor and the reference usage rate.
  • the current processor usage rate can be obtained by using two counters.
  • the first counter is incremented by one every clock cycle, and once it reaches the preset number (eg, overflow), it returns to zero, and indicates that the unit length has passed.
  • the second counter is incremented only when the idle task loop instruction code is successfully matched, and is reset to zero when the first counter reaches the preset number.
  • the second counter overflows or is greater than a certain value before returning to zero, it indicates that the current processor usage is less than the reference usage rate, and the system clock frequency or supply voltage can be lowered; once the second counter is zeroed If the previous processor value is less than the reference value, the current processor usage rate is greater than the reference usage rate, and the system clock frequency or the power supply voltage can be adjusted. Once the second counter is equal to a certain value before zeroing, the current processor usage rate is equal to the reference usage rate. , can keep the system clock frequency or power supply voltage unchanged.
  • the first counter can represent a maximum value of M
  • the reference usage rate is P
  • the idle task cycle instruction code execution cycle number is L
  • the present invention also proposes another device for automatically adjusting the clock frequency or the supply voltage of the processor system in real time, and can adjust the processor system clock frequency or the supply voltage according to the executed program thread or process characteristics by an instruction prompt, including an idle feature register, Thread or process number memory, feature matching circuit, comparison determining device, and clock or voltage regulating device.
  • the idle feature register is used to mark that the current thread is an idle task thread or the current process is an idle task process; the idle feature register can be written by an instruction in a software system; the software system is running on the target processor Program code;
  • a thread or process number memory for storing a thread number or a process number of the idle task thread; when the idle feature register is written, the current thread number or process number of the processor is written into the thread or process number memory;
  • a feature matching circuit for matching the idle task thread number or process number in the thread or process number memory with the current thread number or process number of the processor
  • a comparison judging device for comparing the current processor usage rate and the reference usage rate, and determining an adjustment manner according to the comparison result
  • a clock or voltage regulating device for adjusting a processor clock frequency or a supply voltage; said clock adjusting means adjusting the processor clock frequency or the supply voltage in real time according to the current usage rate of the processor and the reference usage rate.
  • the writing operation to the idle feature register can trigger the operation of writing the current thread number or process number into the thread or process number memory, and trigger the feature matching circuit to start the thread number or process number.
  • the match, and the comparison determination device begin a comparison of the current processor usage and the baseline usage.
  • the current thread number or process number may be written into the thread or process number memory when the idle feature register is written to a certain value, or may be written in the idle feature register. Write the current thread number or process number to the thread or process number memory at any value.
  • the current thread number or process number may be written to the thread or process number memory only when the idle feature register is initially written singular or multiple times after the device is powered up, or may be in the idle feature register.
  • the current thread number or process number is written to the thread or process number memory when a particular or any number of writes.
  • the processor's instruction set has an instruction dedicated to writing an idle feature register. The instructions can be added to code corresponding to idle threads or threads that do not need to run at high speed.
  • the processor executes the instruction
  • the current thread number is written into the thread number memory
  • the feature matching circuit starts to match the thread number, and the relationship between the current processor usage rate and the reference usage rate obtained by the comparison determining device according to the matching is obtained.
  • the comparison determining device To determine if adjustments are needed and how to adjust the system clock frequency.
  • the current processor usage rate can be obtained by using two counters.
  • the first counter is incremented by one every clock cycle, and once it reaches the preset number (eg, overflow), it returns to zero, indicating that the unit length has passed.
  • the second counter is incremented only when the recorded thread number or process number matches the current thread number or process number of the processor, and is reset to zero when the first counter reaches the preset number. In a specific implementation, it is not necessary to match the thread number or the process number in each cycle, but only the thread number or the process number match when the thread or process switches.
  • the second counter overflows or is greater than a certain value before returning to zero, it indicates that the current processor usage is less than the reference usage rate, and the system clock frequency or supply voltage can be lowered; once the second counter is zeroed If the previous processor value is greater than the reference value, the current processor usage rate is higher than the reference usage rate, and the system clock frequency or the power supply voltage can be adjusted. Once the second counter is equal to a certain value before zeroing, the current processor usage rate is equal to the reference usage rate. , can keep the system clock frequency or the supply voltage unchanged.
  • the bit width is such that the value that can be represented is greater than or equal to ⁇ .
  • the processor of the present invention includes, but is not limited to, a general purpose processor, an embedded processor, a single core processor, a multi-core/many-core processor, and a digital signal processor.
  • the present invention has the following beneficial effects: The automatic real-time adjustment of the processor system clock frequency or the supply voltage by means of hardware and the method and apparatus for automatically adjusting the processor clock frequency or the supply voltage in real time as described in the present invention Under the premise of normal operation of the certificate processor, the dynamic power consumption of the processor is effectively reduced, and the processor adjusts the clock frequency or the supply voltage according to the demand. For the mobile handheld device, the service life of the battery is extended once. And to minimize the implementation of human intervention, and because the invention is completely implemented by hardware, the speed is fast, and the real-time adjustment of the processor clock frequency or the supply voltage can be realized more effectively.
  • FIG. 1 is a flow chart of the automatic real-time adjustment processor system clock frequency proposed by the present invention.
  • FIG. 2 is a flow chart of feature matching in the method for automatically adjusting the clock frequency of the processor system in real time according to the present invention.
  • FIG. 3 is a structural block diagram of an automatic real-time adjustment processor system clock frequency device according to the present invention. detailed description
  • the automatic real-time adjustment of the processor system clock frequency is taken as an example, and the adjustment of the supply voltage of the processor system is similar.
  • FIG. 1 is a flow chart of the automatic real-time adjustment processor system clock frequency proposed by the present invention.
  • the process is basically performed according to the steps of matching, judging and adjusting.
  • the processor currently executes the instruction (101), and the feature matching circuit performs intelligent feature matching on the feature instruction (105) and the current execution instruction of the processor to obtain the current usage rate of the processor.
  • the comparison judging device compares the current usage rate of the processor with the reference usage rate (106), and if the current usage rate of the processor is greater than the reference usage rate, increases the processor clock frequency; if the processor is currently used If the rate is lower than the reference usage rate, the processor clock frequency is lowered; if the current usage rate of the processor is equal to the reference usage rate, the current processor clock frequency is kept unchanged; finally, the clock adjustment device adjusts the processor clock frequency according to the comparison result (104) After the end of the adjustment, return to step (101) to continue the next cycle adjustment. For automatic real-time adjustment, the system is at runtime In the meantime, the automatic real-time adjustment of the clock frequency is performed, and the next cycle adjustment is performed immediately after one cycle adjustment until the system is turned off or the automatic adjustment function is turned off by the system or the user.
  • FIG. 2 is a flow chart of the feature matching in the method for automatically adjusting the clock frequency of the processor system in real time according to the present invention.
  • the feature matching process is mainly used to calculate the current usage rate of the processor.
  • the counter (201) is initialized, including a clock counter and a feature matching counter.
  • the clock counter begins to accumulate (202), and the system fetches the current execution instruction of the processor and the current feature instruction code (203), and the current running instruction of the processor and the feature instruction code perform feature matching (204), if the matching is successful.
  • the feature matching counter is incremented by 1 (205), otherwise the original value is maintained, and then it is determined whether the clock counter is equal to the base value (206). If they are equal, the current usage rate of the processor is calculated (207), and the matching cycle ends; otherwise, continue Returning to the clock counter accumulation operation (202) until the clock counter is equal to the base value.
  • FIG. 3 is a structural block diagram of an automatic real-time adjustment processor system clock frequency device according to the present invention.
  • a feature instruction memory (302), a feature matching circuit (305), a comparison determining device (306), a clock adjusting device (307), a phase locked loop (308), a processor core (303), and an operating system (304) are included.
  • the feature instruction memory (302) stores the feature instruction executed when the operating system idles the task loop, and may be an instruction code or an operation code in all or part of the idle task cycle, or may be an instruction code or operation in all or part of the idle task cycle.
  • the code is transformed by the algorithm (all or part); during system operation, the feature instruction memory (302) extracts the current feature command or signature (309) and sends it to the feature matching circuit (305).
  • the feature matching circuit (305) The intelligent feature matching of the idle task loop instruction code or signature (309) and the current execution instruction of the processor (310) is performed, and the current processor usage rate (311) is calculated and sent to the comparison judging device (306).
  • the comparison judging means (306) compares the current processor usage rate (311) with the reference usage rate, and determines how to adjust the clock frequency based on the comparison result, and the clock adjustment means (307) according to the adjustment scheme determined by the comparison judging means (306) Adjusting the system clock (313) sent from the phase locked loop (308), and sending the adjusted clock (314) to the processor core (303), the processor core (303), and the operating system (304)
  • the adjusted target system simultaneously sends the current execution instruction (310) to the feature matching circuit (305) for feature matching, and the various parts described above collectively constitute an automatic real-time adjustment processor system clock frequency device (301).

Landscapes

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

Abstract

A method and device for automatic real-time adjustment of the clock frequency or supply voltage of a processor system are provided. The method achieves an automatic real-time adjustment of the clock frequency or supply voltage of the processor system through three steps: match, judgment and adjustment. During the running process of the processor, the processor runs at an optimum clock frequency or is provided with an optimum supply voltage in real time through the automatic real-time adjustment of a clock frequency or supply voltage of the processor, so as to ensure a normal operation of the system while also reducing the power consumption of the processor effectively.

Description

一种自动实时调整处理器系统时钟频率或供电电压的方法和装置  Method and device for automatically adjusting processor system clock frequency or supply voltage in real time
技术领域 Technical field
本发明属于集成电路领域, 具体为一种自动实时调整处理器系统时钟频率或供电电压 的方法和装置。 背景技术  The invention belongs to the field of integrated circuits, and is specifically a method and device for automatically adjusting the clock frequency or supply voltage of a processor system in real time. Background technique
在处理器产品蓬勃发展的今天,性能和功耗成为人们衡量产品好坏的重要指标,尤其是 对于手持设备来说更是如此,因此,设计者釆用各种先进技术来设计处理器,以提高其性能。 然而, 随着处理器性能的提升, 其功耗也显著增加, 系统以峰值性能运算的电池寿命急剧缩 短,虽然设计者在进行设计时已充分釆用了低功耗的设计方法,并且电池技术也已经取得了 更大的进步, 但仍然跟不上电子产品迅速增加的功率需求。  In today's booming processor products, performance and power consumption have become important indicators for measuring the quality of products, especially for handheld devices. Therefore, designers use various advanced technologies to design processors. Improve its performance. However, as the performance of the processor increases, its power consumption also increases significantly. The battery life of the system with peak performance is drastically shortened, although the designer has fully adopted the low-power design method and battery technology. Much progress has been made, but it still cannot keep up with the rapidly increasing power demands of electronic products.
为了降低处理器的功耗, 设计人员采用了各种方法, 通过优化电路结构、调整器件尺寸 来降低处理器的峰值功耗,广泛运用门控时钟来降低处理器的平均功耗,而对于处理器的动 态功耗,上述技术却无能为力。 目前已经有系统计算机厂商采用调整时钟频率的方法来降低 处理器的动态功耗并申请了相关专利,但主要依靠应用软件和软件系统来实施,且在一定程 度上需要系统或者用户的干预, 同时目前现有技术方案和思路大多以高性能为前提,在保证 高性能的前提下降低系统功耗,而本发明以按需调整为出发点,在保证系统正常运行的前提 下降低系统功耗。  In order to reduce the power consumption of the processor, designers have adopted various methods to reduce the peak power consumption of the processor by optimizing the circuit structure and adjusting the device size. The gated clock is widely used to reduce the average power consumption of the processor. The dynamic power consumption of the device, the above technology can not do anything. At present, system computer manufacturers have adopted methods to adjust the clock frequency to reduce the dynamic power consumption of the processor and apply for related patents, but mainly rely on application software and software systems to implement, and to some extent, system or user intervention is required. At present, most of the existing technical solutions and ideas are based on high performance, and the system power consumption is reduced under the premise of ensuring high performance. The present invention takes the on-demand adjustment as a starting point and reduces the system power consumption under the premise of ensuring the normal operation of the system.
下面针对目前已有的技术发明专利进行分析,并结合本发明进行比较:  The following is an analysis of the currently existing technical invention patents, and is compared with the present invention:
台湾仁宝电脑工业股份有限公司发明一种动态调整中央处理器频率的方法并申请了专 利 (中国专利局, 专利号: 200310121239.6)包含一对应关系表, 该对应关系表包括多个阶 层,且每一阶层定义一组前端总线操作频率及相应的中央处理器使用率范围;在实施中首先 取得中央处理器的目前使用率;根据该目前使用率与对应关系表比对,调整中央处理器的前 端总线操作频率至对应阶层,以使处理器运行在目前使用率包含于该对应阶层所定义的中央 处理器使用率范围内。借由发明的方法,系统可根据不同供电状况采用不同的中央处理器使 用率与前端总线操作频率对应关系表,并藉此可达到不同的处理速度消耗不同的电力,可有 效减少处理器非必要的耗能。 尤其是在电池供电模式下, 藉由改变中央处理器的操作频率, 就可达到节雀电力的目的。该发明需要软件的支持,尤其是处理器使用率完全依靠软件来检 测,其次该发明需要一张对应关系表,对处理器操作频率的调整需要査找对应关系表才能实 现, 因此调整过程复杂, 在一定程度上导致调整速度比较慢,与本发明完全采用硬件来实现 的方法有本质的区别。 Taiwan Renbao Computer Industry Co., Ltd. invented a method for dynamically adjusting the frequency of the central processing unit and applied for a patent (Chinese Patent Office, Patent No.: 200310121239.6) including a correspondence table, which includes multiple levels, and each A hierarchy defines a set of front-side bus operating frequencies and corresponding CPU usage ranges; in the implementation, the current usage rate of the central processing unit is first obtained; and the front end of the central processing unit is adjusted according to the current usage ratio and the correspondence table The bus operates at a frequency to the corresponding level so that the processor is running at a current usage rate that is included in the range of CPU usage defined by the corresponding hierarchy. By inventing the method, the system can adopt different correspondence between the central processor usage rate and the front-side bus operating frequency according to different power supply conditions, thereby achieving different processing speeds and consuming different powers, thereby effectively reducing processor unnecessary. Energy consumption. Especially in the battery-powered mode, by changing the operating frequency of the central processor, the purpose of the power can be achieved. The invention requires software support, especially processor usage is completely dependent on software to check Secondly, the invention needs a correspondence table. The adjustment of the operating frequency of the processor needs to find the correspondence table to realize, so the adjustment process is complicated, and the adjustment speed is relatively slow to some extent, and the invention is completely implemented by hardware. There are essential differences in the methods.
美国加利福尼亚州的英特尔公司提出的确定有多性能状态能力的微处理器的转换点的 方法 (中国专利局, 专利号: 02806816.5 ) , 提供一种用于在保持系统响应性的同时进行处 理器频率的自动调节方法。 该发明的性能级别策略算法足够快地检测处理器使用 的提高, 以便向比得上最大系统性能的更高性能级别转换。所述性能级别比得上最大系统性能。本发 明实施例的性能级别策略算法延迟了处理器向较低性能级别的转换,使 ^要求的快速反转 不会促成不必要的转换。该方法与本发明不同, 其时钟频率的调节也离不开软件的支持, 尤 其需要功率管理软件来控制工作电压和工作频率的调整。  A method for determining the switching point of a microprocessor with multiple performance state capabilities (in Chinese Patent Office, Patent No. 02806816.5) proposed by Intel Corporation of California, USA, provides a processor frequency for maintaining system responsiveness Automatic adjustment method. The inventive performance level policy algorithm detects the increase in processor usage fast enough to switch to a higher performance level comparable to maximum system performance. The performance level is comparable to the maximum system performance. The performance level policy algorithm of embodiments of the present invention delays the conversion of the processor to lower performance levels so that the fast reversal of the requirements does not contribute to unnecessary conversions. This method is different from the present invention in that the adjustment of the clock frequency is also inseparable from the software support, and in particular, power management software is required to control the adjustment of the operating voltage and the operating frequency.
台湾微星科技股份有限公司提出的调整中央处理器工作频率方法(中国专利局,专利号: 03137089.6 ) , 该发明根据中央处理器实时运作状态进行工作频率的逐步调整, 其包括如下 步骤: 建立一频率阶级转换表; 取得中央处理器之一当前使用状态数据; 根据该频率阶级转 换表, 转换产生一目标频率阶级值; 逐步调整工作频率至该目标频率阶级值。该方法可减少 人为操作错误, 使中央处理器发挥最佳效能, 且可减少资源浪费和硬件组件的损耗。但该方 法完全依靠软件的方法来实现中央处理器工作频率的调整,该技术手段速度比较慢,很难达 到实时调整。同时该方法根据处理器工作状态进行工作频率的模糊调整。 ^于处理器功耗的 降低能力有限,与本发明在实现方式上有本质的区别, 同时在效果上与本发明也有一定的差 距。  Taiwan MSI Technology Co., Ltd. proposed to adjust the operating frequency of the central processing unit (China Patent Office, patent number: 03137089.6). The invention gradually adjusts the operating frequency according to the real-time operating state of the central processing unit, and includes the following steps: Establishing a frequency a class conversion table; obtaining current usage state data of one of the central processing units; converting a target frequency class value according to the frequency class conversion table; and gradually adjusting the operating frequency to the target frequency class value. This approach reduces human error, maximizes CPU performance, and reduces resource waste and hardware component wear and tear. However, the method relies entirely on the software to adjust the operating frequency of the central processing unit. The technical means is slow and it is difficult to achieve real-time adjustment. At the same time, the method performs fuzzy adjustment of the operating frequency according to the working state of the processor. The ability to reduce the power consumption of the processor is limited, and there is a substantial difference in the implementation of the present invention, and there is also a certain difference in effect from the present invention.
此外, 台湾英业达股份有限公司提出的调整中央处理器工作频率的架构及其方法(中国 专利局, 专利号: 03101741.X) , 可随时切换信息处理系统的中央处理器的运作速度, 其中 包含有韧件 (firmware)的架构及其搭配的软件所组成, 同时该方法主要通过检测处理器温度 来进行工作频率的调整,与本发明通过检测处理器当前使用率来进行工作频率的调整有本质 的区别。上海环达计算机科技有限公司提出的调整微处理器工作频率的控制方法和系统(中 国专利局, 专利号: 200410067153.4)提出了一种新的软件调整工作频率的方法, 首先在载 入一音 /视频资料段的同时取得该资料段的播放时间并加以存储然后通过微处理器解码该资 料段并同时动态存储解码时间;根据所存储的播放时间和动态解码时间,计算出动态解码时 间与播放时间的比值以取得微处理器的当前使用率并加以存储。根据所存储的当前使用率来 控制微处理器的工作时钟频率。 该发明由于需要载入音 /视频资料段并进行存储、 解码等, 且用软件的方法实现速度比较慢,无法实时进行调整,同时调整过程严重增加了处理器负载, 与本发明完全采用硬件实现有本质的区别。 In addition, Taiwan Yingyida Co., Ltd. proposed an architecture and method for adjusting the operating frequency of the central processing unit (China Patent Office, patent number: 03101741.X), which can switch the operating speed of the central processing unit of the information processing system at any time. The invention comprises a firmware structure and a software for matching the same, and the method mainly adjusts the working frequency by detecting the processor temperature, and the invention adjusts the working frequency by detecting the current usage rate of the processor. The essential difference. The control method and system proposed by Shanghai Huanda Computer Technology Co., Ltd. to adjust the operating frequency of the microprocessor (China Patent Office, Patent No.: 200410067153.4) proposes a new method for software to adjust the operating frequency, first loading a tone/ The video data segment acquires the playing time of the data segment and stores it, and then decodes the data segment through the microprocessor and simultaneously stores the decoding time dynamically; calculates the dynamic decoding time and the playing time according to the stored playing time and the dynamic decoding time. The ratio is taken to obtain the current usage of the microprocessor and stored. According to the current usage rate stored Controls the operating clock frequency of the microprocessor. The invention needs to load audio/video data segments and store, decode, etc., and realizes slow speed by software method, and cannot be adjusted in real time, and the adjustment process seriously increases the processor load, and the invention is completely implemented by hardware. There are essential differences.
通过上面的分析可知, 目前已有的发明和技术均需耍软件的支持, 调整速度比较慢, 难 以达到实时调整。  According to the above analysis, the existing inventions and technologies need to be supported by software, and the adjustment speed is relatively slow, which makes it difficult to achieve real-time adjustment.
对于如何调整处理器时钟频率或供电电压的具体方法在现有技术中已有充分公开,而如 何完全采用硬件实现实时检测以确定是否需耍调整则尚未有类似发明。  Specific methods for adjusting the processor clock frequency or supply voltage are well disclosed in the prior art, and there is no similar invention as to how to implement real-time detection entirely in hardware to determine if adjustments are needed.
发明内容 Summary of the invention
本发明针对上述问题,并结合现有技术的不足之处。提出了一种自动实时调整处理器系 统时钟频率或供电电压的方法和装置,该装置及其自动实时调整时钟频率或供电电压的方法 完全用硬件的方式来实现,旨在通过自动实时调整时钟频率或供电电压来降低处理器的动态 功耗。  The present invention addresses the above problems and incorporates the deficiencies of the prior art. A method and device for automatically adjusting the clock frequency or supply voltage of a processor system in real time are proposed. The device and its automatic real-time adjustment of the clock frequency or the supply voltage are completely implemented in hardware, and are designed to automatically adjust the clock frequency in real time. Or supply voltage to reduce the dynamic power consumption of the processor.
本发明采用以下技术方案实现:  The invention is implemented by the following technical solutions:
本发明所述的自动实时调整处理器系统时钟频率或供电电压的方法釆用硬件的方式实 现, 主要包括以下两个步骤:  The method for automatically adjusting the clock frequency or the supply voltage of the processor system in real time according to the present invention is implemented in a hardware manner, and mainly includes the following two steps:
A、 匹配空闲任务特征, 确定当前处理器使用率;  A. Match the idle task characteristics to determine the current processor usage rate;
B、 根据当前处理器使用率和基准使用率调整系统时钟频率或供电电压, 如果当前处理 器使用率大于基准使用率,则上调系统时钟频率或供电电压;如果当前处理器使用率小于基 准使用率, 则下调系统时钟频率或供电电压; 如果当前处理器使用率等于基准使用率, 则保 持系统时钟频率或供电电压不变。  B. Adjust the system clock frequency or the supply voltage according to the current processor usage rate and the reference usage rate, if the current processor usage rate is greater than the reference usage rate, then increase the system clock frequency or the supply voltage; if the current processor usage rate is less than the reference usage rate , then adjust the system clock frequency or supply voltage; if the current processor usage is equal to the reference usage, keep the system clock frequency or supply voltage unchanged.
本发明所述的空闲任务特征可以是表示空闲任务的单数条或连续复数条指令码,也可以 由软件系统通过指令提示。  The idle task feature of the present invention may be a singular or continuous plurality of instruction codes indicating an idle task, or may be prompted by a software system.
本发明所述的处理器使用率指单位时间内处理器执行非空闲任务的比率。举例而言,设 单位时间为 1 百万个处理器时钟周期对应的时长, 如果在连续 1 百万个时钟周期内, 有 2 万个时钟周期执行空闲任务, 其余 98万个时钟周期执行其他任务, 那么处理器使用率即为 98%。 假设基准使用率是 30%, 一旦在连续 1百万个时钟周期内, 有超过 70万个时钟周期 执行空闲任务, 则当前处理器使用率小于基准使用率, 需要下调时钟频率或供电电压。在本 例中, 为了便于实现, 可以每连续 1百万个时钟周期计算一次处理器使用率, 即每隔 1百万 个时钟周期进行一次时钟频率或供电电压的调整。 The processor usage rate of the present invention refers to the ratio of the processor performing non-idle tasks per unit time. For example, set the unit time to the duration of 1 million processor clock cycles. If there are 20,000 clock cycles for idle tasks in 1 million clock cycles, the other 98,000 clock cycles perform other tasks. , then the processor usage is 98%. Assume that the benchmark usage is 30%, once there are more than 700,000 clock cycles in 1 million clock cycles When an idle task is executed, the current processor usage is less than the reference usage, and the clock frequency or supply voltage needs to be lowered. In this example, for ease of implementation, the processor usage can be calculated every 1 million clock cycles, that is, the clock frequency or supply voltage can be adjusted every 1 million clock cycles.
当本发明所述的空闲任务特征是表示空闲任务的单数条或连续复数条指令码时,用事先 存储的软件系统空闲任务循环时执行的指令码与处理器当前执行的指令进行匹配,得到单位 时间内处理器执行非软件系统空闲任务指令的比率, 即处理器使用率。再对所述使用率和基 准使用率进行比较,根据比较结果调节处理器的时钟频率或供电电压。所述处理器使用率即 单位时间内处理器执行非软件系统空闲任务循环的比率。  When the idle task feature of the present invention is a singular or continuous plurality of instruction codes indicating an idle task, the instruction code executed when the software system idle task loop is stored in advance is matched with the currently executed instruction of the processor, and the unit is obtained. The ratio of time that the processor executes non-software system idle task instructions, that is, processor usage. The usage rate and the reference usage rate are compared, and the clock frequency or the supply voltage of the processor is adjusted according to the comparison result. The processor usage is the rate at which the processor executes non-software system idle task cycles per unit time.
当本发明所述的空闲任务特征由软件系统通过指令提示时,所述提示方法可以是通过软 件系统中的指令或指令在处理器中的执行结果。当执行到所述指令或形成所述指令的执行结 果时, 处理器记录当前的线程号 (TID) 或进程号 (PID)。 在之后的执行中, 用所述线程号 或进程号与处理器当前线程号或进程号进行匹配,得到单位时间内处理器执行除所述线程号 或进程号对应的线程或进程之外的其他线程或进程的比率, 即处理器使用率;再对所述使用 率和基准使用率进行比较,根据比较结果调节处理器的时钟频率或供电电压。所述处理器使 用率即单位时间内处理器执行非所述线程号对应线程或非所述进程号对应进程的比率。 根据本发明技术方案,可以在软件中空闲任务对应的代码段中增加一条所述指令,一旦 执行到空闲任务中的所述指令, 处理器就会将所述空闲任务对应的线程号或进程号记录下 来, 用于之后的匹配并计算处理器使用率。  When the idle task feature of the present invention is prompted by a software system, the prompting method may be an execution result in the processor by an instruction or instruction in the software system. The processor records the current thread number (TID) or process number (PID) when executing the instructions or forming an execution result of the instructions. In the subsequent execution, the thread number or the process number is matched with the current thread number or the process number of the processor, and the processor executes the unit or the process corresponding to the thread number or the process number. The ratio of threads or processes, that is, the processor usage rate; the usage rate and the reference usage rate are compared, and the clock frequency or the supply voltage of the processor is adjusted according to the comparison result. The processor usage rate, that is, the ratio of the processor corresponding to the thread number or the process number corresponding to the process number, is not executed by the processor per unit time. According to the technical solution of the present invention, one of the instructions may be added to a code segment corresponding to an idle task in the software, and once the instruction in the idle task is executed, the processor may use the thread number or the process number corresponding to the idle task. Recorded for subsequent matching and calculates processor usage.
举例而言,所述由软件系统通过指令提示的方法可以是通过软件系统中的指令对处理器 中的一个特定寄存器进行写操作, 或对处理器中某寄存器中的一特定位 (bit) 进行写操作。 当所述寄存器或寄存器位被写入时, 处理器记录当前线程号。在之后的执行中, 用所述线程 号与处理器当前线程号进行匹配,即可按本发明所述技术方案通过计算得到当前处理器使用 率。再对所述使用率和基准使用率进行比较,根据比较结果调节处理器的时钟频率或供电电 压。 本发明所述的自动实时调整处理器系统时钟频率或供电电压的方法中的基准使用率可 固定不变, 也可重新配置或自学习确定, 可以固化在芯片内部, 也可以在系统启动时由系统 写入, 还可以由软件写入。  For example, the method suggested by the software system through the instruction may be to write a specific register in the processor through an instruction in the software system, or perform a specific bit in a register in the processor. Write operation. When the register or register bit is written, the processor records the current thread number. In the subsequent execution, the thread number is matched with the current thread number of the processor, and the current processor usage rate can be obtained by calculation according to the technical solution of the present invention. The usage rate and the reference usage rate are compared, and the clock frequency or power supply voltage of the processor is adjusted based on the comparison result. The reference usage rate in the method for automatically adjusting the clock frequency or the supply voltage of the processor system in real time according to the present invention may be fixed, or may be reconfigured or self-learned, may be solidified inside the chip, or may be System writes can also be written by software.
本发明提出一种自动实时调整处理器系统时钟频率或供电电压的装置,能根据被执行的 软件系统中指令的特征调节处理器系统时钟频率或供电电压。 所述装置包括特征指令存储 器、 特征匹配电路、 比较判断装置和时钟或电压调节装置。 其中: The present invention provides an apparatus for automatically adjusting a clock frequency or a supply voltage of a processor system in real time, which can be executed according to The characteristics of the instructions in the software system adjust the processor system clock frequency or supply voltage. The apparatus includes a feature command memory, a feature matching circuit, a comparison determining device, and a clock or voltage regulating device. among them:
特征指令存储器,用于存储软件系统空闲任务循环时执行的指令码;所述软件系统包括 但不限于具有空闲任务循环的操作系统、 系统软件或者应用软件。  The feature instruction memory is configured to store the instruction code executed when the software system idles the task cycle; the software system includes but is not limited to an operating system, system software or application software having an idle task cycle.
特征匹配电路, 用于空闲任务循环指令码和处理器当前执行指令的智能特征匹配; 比较判断装置,用于比较当前处理器使用率和基准使用率,并根据比较结果确定调节方 式;  a feature matching circuit, configured to perform intelligent feature matching between the idle task loop instruction code and the current execution instruction of the processor; the comparison determining device is configured to compare the current processor usage rate and the reference usage rate, and determine an adjustment manner according to the comparison result;
时钟或电压调节装置, 用于调整处理器时钟频率或供电电压。  A clock or voltage regulator that adjusts the processor clock frequency or supply voltage.
本发明所述的特征指令存储器可以存储全部或部分空闲任务循环中的指令码或操作码, 也可以存储全部或部分空闲任务循环中的指令码或操作码经算法变换得到的特征码,在进行 特征匹配时,可以匹配全部或部分空闲任务循环中的指令码或操作码,也可以匹配全部或部 分空闲任务循环中的指令码或操作码经算法变换得到的特征码。  The feature instruction memory of the present invention may store the instruction code or the operation code in all or part of the idle task cycle, and may also store the instruction code of the instruction code or the operation code in all or part of the idle task cycle, which is obtained by algorithm transformation. When the feature is matched, the instruction code or the operation code in all or part of the idle task cycle may be matched, or the instruction code in all or part of the idle task cycle or the feature code obtained by the algorithm may be matched.
本发明所述特征指令存储器中的指令码、操作码或特征码可以在芯片生产时, 固化到芯 片内部, 也可以在系统启动时由系统或软件写入,还可以自学习写入, 其存储媒介可以是挥 发性的, 也可以是非挥发性的, 可以是一次写入, 也可以是可多次写入。  The instruction code, the operation code or the feature code in the characteristic instruction memory of the present invention can be solidified into the chip during the production of the chip, or can be written by the system or software when the system is started, and can also be self-learned and written, and its storage The medium can be volatile or non-volatile, and can be written once or multiple times.
本发明所述的时钟或电压调节装置根据处理器当前使用率和基准使用率实时调整处理 器时钟频率或供电电压。 根据本发明技术方案,可以用两个计数器求得当前处理器使用率。其中第一计数器每个 时钟周期都加一,一旦达到预设数(如: 溢出)时即归零, 同时表示已经过了单位长度的时 间。第二计数器只在空闲任务循环指令码匹配成功时才加一,并在第一计数器达到预设数时 归零。根据给定的基准使用率,一旦第二计数器溢出、 或归零前大于某个数值, 则表示当前 处理器使用率小于基准使用率,可以下调系统时钟频率或供电电压;一旦第二计数器归零前 小于某个数值,则表示当前处理器使用率大于基准使用率,可以上调系统时钟频率或供电电 压; 一旦第二计数器归零前等于某个数值, 则表示当前处理器使用率等于基准使用率, 可以 保持系统时钟频率或供电电压不变。 若第一计数器可代表的最大值为 M, 基准使用率为 P, 空闲任务循环指令码执行周期数为 L, 则所述数值为 N = (M * ( 1- P)) /L。 在具体实现中, 可以根据需耍减小第二计数器的位宽, 使之能表示的值大于等于 N即可。 举例而言, 如果单位时间为 1 百万个时钟周期, 基准使用率是 60%, 空闲任务循环指 令码执行周期数为 100个时钟周期, 那么所述数值为 N = ( 1000000 * ( 1- 60%) ) /100, 即 N = 4000。 The clock or voltage regulating device of the present invention adjusts the processor clock frequency or the supply voltage in real time according to the current usage rate of the processor and the reference usage rate. According to the technical solution of the present invention, the current processor usage rate can be obtained by using two counters. The first counter is incremented by one every clock cycle, and once it reaches the preset number (eg, overflow), it returns to zero, and indicates that the unit length has passed. The second counter is incremented only when the idle task loop instruction code is successfully matched, and is reset to zero when the first counter reaches the preset number. According to the given reference usage rate, once the second counter overflows or is greater than a certain value before returning to zero, it indicates that the current processor usage is less than the reference usage rate, and the system clock frequency or supply voltage can be lowered; once the second counter is zeroed If the previous processor value is less than the reference value, the current processor usage rate is greater than the reference usage rate, and the system clock frequency or the power supply voltage can be adjusted. Once the second counter is equal to a certain value before zeroing, the current processor usage rate is equal to the reference usage rate. , can keep the system clock frequency or power supply voltage unchanged. If the first counter can represent a maximum value of M, the reference usage rate is P, and the idle task cycle instruction code execution cycle number is L, then the value is N = (M * ( 1- P)) /L. In a specific implementation, the bit width of the second counter may be reduced according to the need, so that the value that can be represented is greater than or equal to N. For example, if the unit time is 1 million clock cycles, the reference usage is 60%, and the idle task cycle instruction code execution cycle is 100 clock cycles, then the value is N = (1000000 * ( 1- 60 %) ) /100, ie N = 4000.
本发明还提出另一种自动实时调整处理器系统时钟频率或供电电压的装置,能通过指令 提示,根据被执行的程序线程或进程特征调节处理器系统时钟频率或供电电压,包括空闲特 征寄存器、线程或进程号存储器、特征匹配电路、 比较判断装置和时钟或电压调节装置。其 中- 空闲特征寄存器,用于标志当前线程为空闲任务线程或当前进程为空闲任务进程;可以 通过软件系统中的指令对所述空闲特征寄存器进行写操作;所述软件系统为运行在目标处理 器上的程序代码;  The present invention also proposes another device for automatically adjusting the clock frequency or the supply voltage of the processor system in real time, and can adjust the processor system clock frequency or the supply voltage according to the executed program thread or process characteristics by an instruction prompt, including an idle feature register, Thread or process number memory, feature matching circuit, comparison determining device, and clock or voltage regulating device. The idle feature register is used to mark that the current thread is an idle task thread or the current process is an idle task process; the idle feature register can be written by an instruction in a software system; the software system is running on the target processor Program code;
线程或进程号存储器,用于存储空闲任务线程的线程号或进程号; 当所述空闲特征寄存 器被写入时, 处理器当前的线程号或进程号被写入线程或进程号存储器;  a thread or process number memory for storing a thread number or a process number of the idle task thread; when the idle feature register is written, the current thread number or process number of the processor is written into the thread or process number memory;
特征匹配电路,用于线程或进程号存储器中的空闲任务线程号或进程号和所述处理器当 前线程号或进程号的匹配;  a feature matching circuit for matching the idle task thread number or process number in the thread or process number memory with the current thread number or process number of the processor;
比较判断装置,用于比较当前处理器使用率和基准使用率,并根据比较结果确定调节方 式;  a comparison judging device for comparing the current processor usage rate and the reference usage rate, and determining an adjustment manner according to the comparison result;
时钟或电压调节装置,用于调整处理器时钟频率或供电电压;所述的时钟调节装置根据 处理器当前使用率和基准使用率实时调整处理器时钟频率或供电电压。  A clock or voltage regulating device for adjusting a processor clock frequency or a supply voltage; said clock adjusting means adjusting the processor clock frequency or the supply voltage in real time according to the current usage rate of the processor and the reference usage rate.
根据本发明所述技术方案,对所述空闲特征寄存器进行写入操作能触发将当前线程号或 进程号写入线程或进程号存储器的操作,并触发特征匹配电路幵始进行线程号或进程号的匹 配, 及比较判断装置开始进行当前处理器使用率和基准使用率的比较。  According to the technical solution of the present invention, the writing operation to the idle feature register can trigger the operation of writing the current thread number or process number into the thread or process number memory, and trigger the feature matching circuit to start the thread number or process number. The match, and the comparison determination device begin a comparison of the current processor usage and the baseline usage.
根据本发明所述技术方案,可以在所述空闲特征寄存器被写入某一特定值的时候将当前 线程号或进程号写入线程或进程号存储器,也可以在所述空闲特征寄存器被写入任意值的时 候将当前线程号或进程号写入线程或进程号存储器。可以只在所述装置加电运行后所述空闲 特征寄存器的最初单数次或复数次被写入时将当前线程号或进程号写入线程或进程号存储 器,也可以在所述空闲特征寄存器在特定次或任意次写入时将当前线程号或进程号写入线程 或进程号存储器。 例如,所述处理器的指令集中有一条专门用于写空闲特征寄存器的指令。可以在空闲线 程或不需要高速运行的线程对应的代码中加入所述指令。这样,当处理器执行到所述指令时, 当前线程号被写入线程号存储器, 同时特征匹配电路开始匹配线程号,且比较判断装置根据 匹配得到的当前处理器使用率与基准使用率的关系,判断是否需耍调节及如何调节系统时钟 频率。 According to the technical solution of the present invention, the current thread number or process number may be written into the thread or process number memory when the idle feature register is written to a certain value, or may be written in the idle feature register. Write the current thread number or process number to the thread or process number memory at any value. The current thread number or process number may be written to the thread or process number memory only when the idle feature register is initially written singular or multiple times after the device is powered up, or may be in the idle feature register. The current thread number or process number is written to the thread or process number memory when a particular or any number of writes. For example, the processor's instruction set has an instruction dedicated to writing an idle feature register. The instructions can be added to code corresponding to idle threads or threads that do not need to run at high speed. Thus, when the processor executes the instruction, the current thread number is written into the thread number memory, and the feature matching circuit starts to match the thread number, and the relationship between the current processor usage rate and the reference usage rate obtained by the comparison determining device according to the matching is obtained. To determine if adjustments are needed and how to adjust the system clock frequency.
同样地, 根据本发明技术方案, 可以用两个计数器求得当前处理器使用率。其中第一计 数器每个时钟周期都加一, 一旦达到预设数(如: 溢出)时即归零, 同时表示已经过了单位 长度的时间。第二计数器只在所述记录下来的线程号或进程号与处理器当前线程号或进程号 匹配成功时才加一, 并在第一计数器达到预设数时归零。在具体实现中, 并不需要在每个周 期都对线程号或进程号进行匹配,而是只需在线程或进程切换的时候进行线程号或进程号匹 配即可。 此时, 一旦匹配成功, 则在下一次线程或进程切换前不需要再次进行匹配, 第二计 数器每个时钟周期都加一;一旦匹配不成功, 则在下一次线程或进程切换前不需要再次进行 匹配, 第二计数器值保持不变。  Similarly, according to the technical solution of the present invention, the current processor usage rate can be obtained by using two counters. The first counter is incremented by one every clock cycle, and once it reaches the preset number (eg, overflow), it returns to zero, indicating that the unit length has passed. The second counter is incremented only when the recorded thread number or process number matches the current thread number or process number of the processor, and is reset to zero when the first counter reaches the preset number. In a specific implementation, it is not necessary to match the thread number or the process number in each cycle, but only the thread number or the process number match when the thread or process switches. At this point, once the match is successful, there is no need to match again before the next thread or process switch, and the second counter is incremented by one every clock cycle; once the match is unsuccessful, there is no need to match again before the next thread or process switch. The second counter value remains unchanged.
根据给定的基准使用率,一旦第二计数器溢出、或归零前大于某个数值, 则表示当前处 理器使用率小于基准使用率,可以下调系统时钟频率或供电电压;一旦第二计数器归零前小 于某个数值,则表示当前处理器使用率大于基准使用率,可以上调系统时钟频率或供电电压; 一旦第二计数器归零前等于某个数值,则表示当前处理器使用率等于基准使用率,可以保持 系统时钟频率或供电电压不变。此时,若第一计数器可代表的最大值为 M,基准使用率为 P, 则所述数值为 Ν = Μ * - Ρ)„同样地,在具体实现中可以根据需要减小第二计数器的位宽, 使之能表示的值大于等于 Ν即可。  According to the given reference usage rate, once the second counter overflows or is greater than a certain value before returning to zero, it indicates that the current processor usage is less than the reference usage rate, and the system clock frequency or supply voltage can be lowered; once the second counter is zeroed If the previous processor value is greater than the reference value, the current processor usage rate is higher than the reference usage rate, and the system clock frequency or the power supply voltage can be adjusted. Once the second counter is equal to a certain value before zeroing, the current processor usage rate is equal to the reference usage rate. , can keep the system clock frequency or the supply voltage unchanged. At this time, if the first counter can represent a maximum value of M and the reference usage rate is P, the value is Ν = Μ * - Ρ) „ Similarly, in a specific implementation, the second counter can be reduced as needed. The bit width is such that the value that can be represented is greater than or equal to Ν.
举例而言, 如果单位时间为 1百万个时钟周期, 基准使用率是 60%,那么所述数值为 Ν = 1000000 * ( 1-60%), 即 Ν = 400000。  For example, if the unit time is 1 million clock cycles and the benchmark usage is 60%, then the value is Ν = 1000000 * ( 1-60%), ie Ν = 400000.
本发明所述的处理器包括但不限于通用处理器、 嵌入式处理器、 单核处理器、 多核 /众 核处理器、 数字信号处理器。  The processor of the present invention includes, but is not limited to, a general purpose processor, an embedded processor, a single core processor, a multi-core/many-core processor, and a digital signal processor.
有益效果: Beneficial effects:
本发明具有以下有益效果. ·通过在本发明中所述的自动实时调整处理器时钟频率或供电 电压的方法和装置,用硬件的方式实施自动实时调整处理器系统时钟频率或供电电压,在保 证处理器正常工作的前提下,有效降低了处理器运行中的动态功耗,实现了处理器按需求调 整时钟频率或供电电压, 对于移动手持设备来说, 延长了电池一次充电的使用寿命, 且尽量 减少人为的干预实施, 同时由于本发明完全采用硬件的方式实现, 速度快, 能够更有效的实 现处理器时钟频率或供电电压的实时调整。 附图说明 The present invention has the following beneficial effects: The automatic real-time adjustment of the processor system clock frequency or the supply voltage by means of hardware and the method and apparatus for automatically adjusting the processor clock frequency or the supply voltage in real time as described in the present invention Under the premise of normal operation of the certificate processor, the dynamic power consumption of the processor is effectively reduced, and the processor adjusts the clock frequency or the supply voltage according to the demand. For the mobile handheld device, the service life of the battery is extended once. And to minimize the implementation of human intervention, and because the invention is completely implemented by hardware, the speed is fast, and the real-time adjustment of the processor clock frequency or the supply voltage can be realized more effectively. DRAWINGS
图 1为本发明所提出的自动实时调整处理器系统时钟频率流程图。  FIG. 1 is a flow chart of the automatic real-time adjustment processor system clock frequency proposed by the present invention.
图 2为本发明所提出的自动实时调整处理器系统时钟频率方法中的特征匹配流程图。 图 3为本发明所提出的自动实时调整处理器系统时钟频率装置的结构框图。 具体实施方式  FIG. 2 is a flow chart of feature matching in the method for automatically adjusting the clock frequency of the processor system in real time according to the present invention. FIG. 3 is a structural block diagram of an automatic real-time adjustment processor system clock frequency device according to the present invention. detailed description
下面结合附图对本发明的实施例作详细说明,本实施例在本发明技术方案的前提下进行 实施, 给出了详细实施方式以及具体操作过程, 但本发明的保护范围不限于下述的实施例, 同时应当理解的是,本发明所述的自动实时调整处理器系统时钟频率的方法和装置,在下面 具体实施例中进行了具体的描述,但对于本领域普通技术人员来说,可以根据本发明的技术 方案和构思进行各种可能的替换、调整和改进, 而所有这些替换、调整和改进都应属于本发 明所附权利要求的保护范围。  The embodiments of the present invention are described in detail below with reference to the accompanying drawings. This embodiment is implemented on the premise of the technical solution of the present invention, and the detailed embodiments and the specific operation procedures are given, but the protection scope of the present invention is not limited to the following implementation. For example, it should be understood that the method and apparatus for automatically adjusting the clock frequency of the processor system in real time according to the present invention are specifically described in the following specific embodiments, but those skilled in the art can The technical solutions and the concept of the present invention are subject to various possible alternatives, modifications and improvements, all of which are within the scope of the appended claims.
为便于说明, 以下实施例中均以处理器系统时钟频率的自动实时调整为例进行说明,关 于处理器系统供电电压的调整与之类似。  For convenience of explanation, in the following embodiments, the automatic real-time adjustment of the processor system clock frequency is taken as an example, and the adjustment of the supply voltage of the processor system is similar.
请参阅图 1, 该图为本发明所提出的自动实时调整处理器系统时钟频率流程图。 该流程 基本按照匹配、判断和调整的步骤进行, 首先获取处理器当前执行指令(101 ), 特征匹配电 路对特征指令 (105 ) 和处理器当前执行指令进行智能特征匹配, 获取处理器当前使用率 ( 102), 然后比较判断装置将处理器当前使用率和基准使用率 (106)进行比较 (103), 如 果处理器当前使用率大于基准使用率, 则上调处理器时钟频率;如果处理器当前使用率小于 基准使用率, 则下调处理器时钟频率; 如果处理器当前使用率等于基准使用率, 则保持当前 处理器时钟频率不变; 最后时钟调节装置裉据比较结果调整处理器时钟频率(104) , —次调 整结束后, 则回到步骤 (101 ) 继续下一循环调整。 对于自动实时调整来说, 系统在运行期 间,一直进行时钟频率的自动实时调整,一次循环调整后立即进入下一次循环调整, 直到系 统关闭或者自动调整功能被系统或用户关闭为止。 Please refer to FIG. 1, which is a flow chart of the automatic real-time adjustment processor system clock frequency proposed by the present invention. The process is basically performed according to the steps of matching, judging and adjusting. First, the processor currently executes the instruction (101), and the feature matching circuit performs intelligent feature matching on the feature instruction (105) and the current execution instruction of the processor to obtain the current usage rate of the processor. (102), and then the comparison judging device compares the current usage rate of the processor with the reference usage rate (106), and if the current usage rate of the processor is greater than the reference usage rate, increases the processor clock frequency; if the processor is currently used If the rate is lower than the reference usage rate, the processor clock frequency is lowered; if the current usage rate of the processor is equal to the reference usage rate, the current processor clock frequency is kept unchanged; finally, the clock adjustment device adjusts the processor clock frequency according to the comparison result (104) After the end of the adjustment, return to step (101) to continue the next cycle adjustment. For automatic real-time adjustment, the system is at runtime In the meantime, the automatic real-time adjustment of the clock frequency is performed, and the next cycle adjustment is performed immediately after one cycle adjustment until the system is turned off or the automatic adjustment function is turned off by the system or the user.
请参阅图 2,该图为本发明所提出的自动实时调整处理器系统时钟频率方法中的特征匹 配流程图。特征匹配流程主耍用于计算处理器当前使用率, 首先初始化计数器(201 ) , 包括 时钟计数器和特征匹配计数器。在系统时钟频率下, 时钟计数器开始累加(202), 同时系统 取出处理器当前执行指令和当前特征指令码(203),处理器当前运行指令和特征指令码进行 特征匹配 (204), 如果匹配成功, 则特征匹配计数器加 1 ( 205), 否则保持原值, 然后判断 时钟计数器是否等于基数值(206), 如果相等, 则计算处理器当前使用率(207 ), 本次匹配 循环结束; 否则继续回到时钟计数器累加操作 (202), 直到时钟计数器等于基数值为止。  Please refer to FIG. 2, which is a flow chart of the feature matching in the method for automatically adjusting the clock frequency of the processor system in real time according to the present invention. The feature matching process is mainly used to calculate the current usage rate of the processor. First, the counter (201) is initialized, including a clock counter and a feature matching counter. At the system clock frequency, the clock counter begins to accumulate (202), and the system fetches the current execution instruction of the processor and the current feature instruction code (203), and the current running instruction of the processor and the feature instruction code perform feature matching (204), if the matching is successful. , the feature matching counter is incremented by 1 (205), otherwise the original value is maintained, and then it is determined whether the clock counter is equal to the base value (206). If they are equal, the current usage rate of the processor is calculated (207), and the matching cycle ends; otherwise, continue Returning to the clock counter accumulation operation (202) until the clock counter is equal to the base value.
请参阅图 3, 该图为本发明所提出的自动实时调整处理器系统时钟频率装置的结构框 图。 包括特征指令存储器(302)、 特征匹配电路(305 )、 比较判断装置(306)、 时钟调节装 置 (307)、 锁相环 (308)、 处理器核 (303 ) 以及操作系统 (304), 其中, 特征指令存储器 (302) 存储操作系统空闲任务循环时执行的特征指令, 可以是全部或部分空闲任务循环中 的指令码或操作码,也可以是全部或部分空闲任务循环中的指令码或操作码经算法变换得到 的特征码(全部或部分); 在系统运行时, 特征指令存储器(302)提取当前特征指令或特征 码(309 )送往特征匹配电路(305), 特征匹配电路(305 )进行空闲任务循环指令码或特征 码(309)和处理器当前执行指令(310 )的智能特征匹配,并计算出当前处理器使用率(311 ) 送往比较判断装置(306)。 比较判断装置(306 )对当前处理器使用率(311 )和基准使用率 进行比较, 并根据比较结果确定如何调节时钟频率, 时钟调节装置 (307) 根据比较判断装 置(306)确定的调节方案来调整从锁相环(308 )送出的系统时钟(313 ), 并将调整后的时 钟 (314) 送到处理器核 (303 ) , 处理器核 (303 ) 以及运行的操作系统 (304) 构成被调整 的目标系统, 同时将当前执行指令(310 )送入特征匹配电路(305 )进行特征匹配, 以上所 述的各个部分共同构成自动实时调整处理器系统时钟频率装置 (301 )。  Please refer to FIG. 3, which is a structural block diagram of an automatic real-time adjustment processor system clock frequency device according to the present invention. A feature instruction memory (302), a feature matching circuit (305), a comparison determining device (306), a clock adjusting device (307), a phase locked loop (308), a processor core (303), and an operating system (304) are included. The feature instruction memory (302) stores the feature instruction executed when the operating system idles the task loop, and may be an instruction code or an operation code in all or part of the idle task cycle, or may be an instruction code or operation in all or part of the idle task cycle. The code is transformed by the algorithm (all or part); during system operation, the feature instruction memory (302) extracts the current feature command or signature (309) and sends it to the feature matching circuit (305). The feature matching circuit (305) The intelligent feature matching of the idle task loop instruction code or signature (309) and the current execution instruction of the processor (310) is performed, and the current processor usage rate (311) is calculated and sent to the comparison judging device (306). The comparison judging means (306) compares the current processor usage rate (311) with the reference usage rate, and determines how to adjust the clock frequency based on the comparison result, and the clock adjustment means (307) according to the adjustment scheme determined by the comparison judging means (306) Adjusting the system clock (313) sent from the phase locked loop (308), and sending the adjusted clock (314) to the processor core (303), the processor core (303), and the operating system (304) The adjusted target system simultaneously sends the current execution instruction (310) to the feature matching circuit (305) for feature matching, and the various parts described above collectively constitute an automatic real-time adjustment processor system clock frequency device (301).

Claims

权利要求 Rights request
1、 一种自动实时调整处理器系统时钟频率或供电电压的方法, 其特征在于采用硬件的 方式实现, 主要包括以下两个步骤: 1. A method for automatically adjusting a clock frequency or a supply voltage of a processor system in real time, which is characterized in that it is implemented by means of hardware, and mainly comprises the following two steps:
A、 匹配空闲 (idle ) 在务特征, 确定当前处理器使用率 (utilization) ;  A, matching idle (idle) in-service feature, determine the current processor utilization (utilization);
B、 艮据当前处理器使用率和基准使用率调整系统时钟频率或供电电压, 如果当前处理 器使用率大于基准使用率,则上调系统时钟频率或供电电压;如果当前处理器使用率小于基 准使用率, 则下调系统时钟频率或供电电压; 如果当前处理器使用率等于基准使用率, 则保 持系统时钟频率或供电电压不变。  B. Adjust the system clock frequency or the supply voltage according to the current processor usage rate and the reference usage rate. If the current processor usage rate is greater than the reference usage rate, then increase the system clock frequency or the supply voltage; if the current processor usage is less than the reference usage Rate, then lower the system clock frequency or supply voltage; if the current processor usage is equal to the reference usage, keep the system clock frequency or supply voltage unchanged.
2、 根据权利要求 1所述的方法, 其特征在于所述空闲任务特征可以是表示空闲任务的 单数条或连续复数条指令码, 也可以由软件系统通过指令或指令的执行结果提示。  2. The method according to claim 1, wherein the idle task feature may be a singular or continuous plurality of instruction codes indicating an idle task, or may be prompted by a software system by an execution result of an instruction or an instruction.
3、 根据权利要求 2所述的方法, 其特征在于当所述空闲任务特征是表示空闲任务的单 数条或连续复数条指令码时,用事先存储在处理器中的软件系统空闲任务循环时执行的指令 码与处理器当前执行的指令进行匹配,得到单位时间内处理器执行非软件系统空闲任务指令 的比率, 即处理器使用率; 再对所述使用率和基准使用率进行比较, 根据比较结果调节处理 器的时钟频率或供电电压。  3. The method according to claim 2, wherein when the idle task feature is a singular number or a continuous plurality of instruction codes indicating an idle task, execution is performed by a software system idle task cycle stored in advance in the processor. The instruction code is matched with the instruction currently executed by the processor, and the ratio of the processor executing the non-software system idle task instruction per unit time, that is, the processor usage rate is obtained; and the usage rate and the reference usage rate are compared, according to the comparison. The result adjusts the processor's clock frequency or supply voltage.
4、 根据权利要求 2所述的方法, 其特征在于当所述空闲任务特征由软件系统通过指令 提示时,所述提示方法可以是通过软件系统中的指令或指令在处理器中的执行结果; 当执行 到所述指令或形成所述指令的执行结果时,处理器记录当前的线程号(TID)或进程号(PID); 在之后的执行中,用所述线程号或进程号与处理器当前线程号或进程号进行匹配,得到单位 时间内处理器执行除所述线程号或进程号对应的线程或进程之外的其他线程或进程的比率, 即处理器使用率;再对所述使用率和基准使用率进行比较,根据比较结果调节处理器的时钟 频率或供电电压。  The method according to claim 2, wherein when the idle task feature is prompted by the software system, the prompting method may be an execution result in the processor by an instruction or an instruction in the software system; The processor records the current thread number (TID) or process number (PID) when executing the instruction or forming an execution result of the instruction; in the subsequent execution, using the thread number or process number and the processor The current thread number or process number is matched, and the ratio of the processor or the process other than the thread or the process corresponding to the thread number or the process number, that is, the processor usage rate, is obtained in the unit time; The rate is compared to the reference usage and the processor's clock frequency or supply voltage is adjusted based on the comparison.
5、 裉据权利要求 1所述的方法, 其特征在于所述的基准使用率可固定不变, 也可 S新 配置或自学习确定, 可以固化在芯片内部, 也可以在系统启动时由系统写入, 还可以由软件 写入。  5. The method according to claim 1, wherein the reference usage rate is fixed, or can be determined by S new configuration or self-learning, can be solidified inside the chip, or can be implemented by the system at system startup. Write can also be written by software.
6、 裉据权利要求 3所述的方法, 其特征在于可以实现一种自动实时调整处理器系统时 钟频率或供屯电压的装置, 包括特征指令存储器、特征匹配电路、 比较判断装置和 钟或电 压调节装置, 其中:  6. The method of claim 3, wherein a means for automatically adjusting the clock frequency or supply voltage of the processor system in real time, including a feature command memory, a feature matching circuit, a comparison determining device, and a clock or voltage Adjustment device, wherein:
特征指令存储器,用于存储软件系统空闲任务循环时执行的指令码;所述软件系统为运 行在目标处理器上的程序代码; 特征匹配电路, 用于空闲任务循环指令码和处理器当前执行指令的智能特征匹配; 比较判断装置,用于比较当前处理器使用率和基准使用率,并根据比较结果确定调节方 式; a feature instruction memory, configured to store an instruction code executed when a software system idle task loop; the software system is a program code running on a target processor; a feature matching circuit, configured to perform intelligent feature matching between the idle task loop instruction code and the current execution instruction of the processor; the comparison determining device is configured to compare the current processor usage rate and the reference usage rate, and determine the adjustment mode according to the comparison result;
时钟或电压调节装置, 用于调整处理器时钟频率或供电电压。  A clock or voltage regulator that adjusts the processor clock frequency or supply voltage.
7、 根据权利耍求 6所述的方法和装置, 其特征在于所述的特征指令存储器可以存储全 部或部分空闲任务循环中的指令码或操作码,也可以存储全部或部分空闲任务循环中的指令 码或操作码经算法变换得到的特征码,在进行特征匹配时,可以匹配全部或部分空闲任务循 环中的指令码或操作码,也可以匹配全部或部分空闲任务循环中的指令码或操作码经算法变 换得到的特征码。  7. The method and apparatus according to claim 6, wherein said feature instruction memory can store instruction codes or operation codes in all or part of an idle task cycle, and can also store all or part of idle task cycles. The feature code obtained by the algorithm code or the operation code may be matched with the instruction code or the operation code in all or part of the idle task cycle, or may match the instruction code or operation in all or part of the idle task cycle. The code obtained by the algorithm is transformed by the algorithm.
8、根据权利要求 6所述的方法和装置,其特征在于所述的特征指令存储器中的指令码、 操作码或特征码可以在芯片生产时, 固化到芯片内部,也可以在系统启动时由系统或软件写 入, 还可以自学习写入, 其存储媒介可以是挥发性的, 也可以是非挥发性的, 可以是一次写 入, 也可以是可多次写入。  8. The method and apparatus according to claim 6, wherein the instruction code, the operation code or the feature code in the feature instruction memory can be solidified into the chip during chip production, or can be The system or software writes, and can also learn by self-learning. The storage medium can be volatile or non-volatile, and can be written once or multiple times.
9、 根据权利要求 6所述的方法和装置, 其特征在于所述的时钟或电压调节装置根据处 理器当前使用率和基准使用率实时调整处理器时钟频率或供电电压。  9. The method and apparatus of claim 6 wherein said clock or voltage regulating means adjusts the processor clock frequency or supply voltage in real time based on the current usage rate of the processor and the reference usage rate.
10、根据权利要求 6所述的方法和装置,其特征在于所述的软件系统包括具有空闲任务 循环的操作系统、 系统软件或者应用软件。  10. A method and apparatus according to claim 6 wherein said software system comprises an operating system, system software or application software having an idle task loop.
11、根据权利要求 4所述的方法,其特征在于可以实现一种自动实时调整处理器系统时 钟频率或供电电压的装置, 包括空闲特征寄存器、线程或进程号存储器、特征匹配电路、 比 较判断装置和时钟或电压调节装置; 其中:  11. The method of claim 4, wherein an apparatus for automatically adjusting the clock frequency or supply voltage of the processor system in real time is provided, including an idle feature register, a thread or process number memory, a feature matching circuit, and a comparison determining device. And a clock or voltage regulator; where:
空闲特征寄存器,用于标志当前线程或进程为空闲任务线程或进程;可以通过软件系统 中的指令对所述空闲特征寄存器进行写操作;所述软件系统为运行在目标处理器上的程序代 码;  An idle feature register, configured to mark that the current thread or process is an idle task thread or a process; the idle feature register may be written by an instruction in a software system; the software system is a program code running on the target processor;
线程或进程号存储器,用于存储空闲任务线程的线程号或空闲任务进程的进程号; 当所 述空闲特征寄存器被写入时, 处理器当前的线程号或进程号被写入线程或进程号存储器; 特征匹配电路,用于线程或进程号存储器中的空闲任务线程号或进程号和处理器当前线 程号或进程号的匹配;  a thread or process number memory for storing a thread number of an idle task thread or a process number of an idle task process; when the idle feature register is written, the current thread number or process number of the processor is written to the thread or process number Memory; a feature matching circuit for matching the idle task thread number or process number in the thread or process number memory with the current thread number or process number of the processor;
比较判断装置,用于比较当前处理器使用率和基准使用率,并裉据比较结果确定调节方 式; 时钟或电压调节装置,用于调整处理器时钟频率或供电电压;所述的时钟或电压调节装 置根据处理器当前使用率和基准使用率实时调整处理器时钟频率或供电电压。 a comparison judging device for comparing a current processor usage rate and a reference usage rate, and determining an adjustment mode according to the comparison result; A clock or voltage regulating device for adjusting a processor clock frequency or a supply voltage; the clock or voltage regulating device adjusting the processor clock frequency or the supply voltage in real time according to the current usage rate of the processor and the reference usage rate.
12、 根据权利要求 6、 11所述的方法和装置, 其特征在于所述处理器包括通用处理器、 嵌入式处理器、 单核处理器、 多核 /众核处理器、 数字信号处理器。  12. The method and apparatus of claim 6, wherein the processor comprises a general purpose processor, an embedded processor, a single core processor, a multi-core/many core processor, a digital signal processor.
PCT/CN2010/000183 2009-02-11 2010-02-08 Method and device for automatic real-time adjustment of clock frequency or supply voltage of processor system WO2010091598A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910046116.8 2009-02-11
CN200910046116 2009-02-11

Publications (1)

Publication Number Publication Date
WO2010091598A1 true WO2010091598A1 (en) 2010-08-19

Family

ID=42561394

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/000183 WO2010091598A1 (en) 2009-02-11 2010-02-08 Method and device for automatic real-time adjustment of clock frequency or supply voltage of processor system

Country Status (1)

Country Link
WO (1) WO2010091598A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5887178A (en) * 1994-08-29 1999-03-23 Matsushita Electronics Corporation Idle state detector and idle state detecting method for a microprocessor unit for power savings
CN1690955A (en) * 2004-04-29 2005-11-02 钜格系统科技股份有限公司 Power supply management method for hand-held information processing apparatus
US7340625B2 (en) * 1989-07-28 2008-03-04 Wichita Falls Power Management, Llc Process and apparatus for reducing power usage microprocessor devices operating from stored energy sources
US7346787B2 (en) * 2004-12-07 2008-03-18 Intel Corporation System and method for adaptive power management
CN101162405A (en) * 2006-12-05 2008-04-16 中兴通讯股份有限公司 Method for dynamic reducing CPU power consumption
CN101216727A (en) * 2008-01-16 2008-07-09 浙江大学 Embedded type low-power consumption operating system dynamic frequency regulation mapping method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7340625B2 (en) * 1989-07-28 2008-03-04 Wichita Falls Power Management, Llc Process and apparatus for reducing power usage microprocessor devices operating from stored energy sources
US5887178A (en) * 1994-08-29 1999-03-23 Matsushita Electronics Corporation Idle state detector and idle state detecting method for a microprocessor unit for power savings
CN1690955A (en) * 2004-04-29 2005-11-02 钜格系统科技股份有限公司 Power supply management method for hand-held information processing apparatus
US7346787B2 (en) * 2004-12-07 2008-03-18 Intel Corporation System and method for adaptive power management
CN101162405A (en) * 2006-12-05 2008-04-16 中兴通讯股份有限公司 Method for dynamic reducing CPU power consumption
CN101216727A (en) * 2008-01-16 2008-07-09 浙江大学 Embedded type low-power consumption operating system dynamic frequency regulation mapping method

Similar Documents

Publication Publication Date Title
US7930564B2 (en) System and method for controlling processor low power states
CN101853066A (en) Method and device for automatically adjusting clock frequency of system in real time
KR101648978B1 (en) Method for controlling power in low power multi-core system
US9176572B2 (en) System and method for controlling central processing unit power with guaranteed transient deadlines
US10877530B2 (en) Apparatus and method to provide a thermal parameter report for a multi-chip package
US8954983B2 (en) Conserving power through work load estimation for a portable computing device using scheduled resource set transitions
JP5090569B2 (en) Processor power consumption control and voltage drop by bandwidth throttling of microarchitecture
TW200834422A (en) Performance enhancement method for a multi-processing core device
US20060053326A1 (en) Coordinating idle state transitions in multi-core processors
US20100058078A1 (en) Protocol for Power State Determination and Demotion
KR101661111B1 (en) Apparatus for controlling power of multi core processor and method thereof
US8224497B2 (en) Energy limit in a sliding window in power and heat management
JP2009520302A (en) Method and apparatus for detecting processor state transitions
TW201314433A (en) Server system and power managing method data thereof
CN101661327A (en) Method for adjusting basic frequency of central processing unit (CPU) and device thereof
EP3391177A1 (en) Dynamic predictive wake-up techniques
KR20140026308A (en) Apparatus and method for managing power in multi-core system
US20140095911A1 (en) Controlling Power Consumption By Power Management Link
WO2015135468A1 (en) Systems and methods for messaging-based fine granularity system-on-a-chip power gating
EP2304519A2 (en) Electronic device, method of controlling an electronic device, and system-on-chip
EP2804075B1 (en) Controlling power consumption of a processor using interrupt-mediated on-off keying
WO2010091598A1 (en) Method and device for automatic real-time adjustment of clock frequency or supply voltage of processor system
WO2013159464A1 (en) Multiple core processor clock control device and control method
WO2020238326A1 (en) Method and device for adjusting performance state of processor, uefi, and storage medium
WO2015154562A1 (en) Method and device for reducing energy consumption of central processing unit, terminal and computer storage medium

Legal Events

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

Ref document number: 10740887

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10740887

Country of ref document: EP

Kind code of ref document: A1