JP2002358139A - Low power consumption processor - Google Patents

Low power consumption processor

Info

Publication number
JP2002358139A
JP2002358139A JP2001166735A JP2001166735A JP2002358139A JP 2002358139 A JP2002358139 A JP 2002358139A JP 2001166735 A JP2001166735 A JP 2001166735A JP 2001166735 A JP2001166735 A JP 2001166735A JP 2002358139 A JP2002358139 A JP 2002358139A
Authority
JP
Japan
Prior art keywords
processor
program
counter
execution
time
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2001166735A
Other languages
Japanese (ja)
Inventor
Masanobu Fukushima
正展 福島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2001166735A priority Critical patent/JP2002358139A/en
Publication of JP2002358139A publication Critical patent/JP2002358139A/en
Pending legal-status Critical Current

Links

Classifications

    • 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

Landscapes

  • Microcomputers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a low power consumption processor capable of operating with low power consumption for a program from which any quick response is not expected, and quickly operating with the power consumption scarified for a program whose priority order is high to be processed within a limited time or a program from which a quicker response is expected. SOLUTION: This processor is provided with a processor 11 for performing a program, a plurality of performance time timer counter device 21 whose count enable is possible for measuring the performing time of a program, a performance target register 21 for storing the target value of the performance time of each program, an arithmetic unit 27 for comparing the performance target value with the performance time, an LP mode counter device 28 for storing the arithmetic result, and a controller 31 for controlling clock supply to the processor based on the output signal of the LP mode counter device 28.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、消費電力を制御
する低消費電力プロセッサに関し、特に、ノートパソコ
ン、PDAなど携帯用電子機器に用いて好適なプロセッ
サに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a low power consumption processor for controlling power consumption, and more particularly to a processor suitable for use in portable electronic devices such as a notebook personal computer and a PDA.

【0002】[0002]

【従来の技術】クロック信号によって動作するプロセッ
サにおいて消費される電力は、クロック信号の周波数に
比例して増大する。プロセッサを使用した電子機器にお
いては、従来から消費電力を低減させることが重要な課
題となっている。
2. Description of the Related Art The power consumed by a processor operated by a clock signal increases in proportion to the frequency of the clock signal. In electronic devices using processors, it has been an important issue to reduce power consumption.

【0003】従来より、プロセッサの低消費電力化の技
術としては、低消費電力モード時には、クロック周波数
を下げる、或いは使用しない回路ブロックへはクロック
供給を停止する等のコントロールをおこなう技術が知ら
れている。例えば、特開平10−301659号公報等
に提案されている。
Conventionally, as a technique for reducing the power consumption of a processor, there has been known a technique of performing control such as lowering a clock frequency or stopping a clock supply to an unused circuit block in a low power consumption mode. I have. For example, it has been proposed in Japanese Patent Application Laid-Open No. 10-301659.

【0004】また、特開平7−200106号公報に
は、プロセッサの動作モードに応じて、プロセッサが指
示する周辺デバイスにのみに電源供給を行い、電源のコ
ントロールによって、周辺デバイス回路の低消費電力化
を行うことが示されている。
Japanese Patent Application Laid-Open No. 7-200106 discloses that power is supplied only to peripheral devices specified by a processor in accordance with the operation mode of the processor, and power consumption is reduced by controlling the power supply. Is shown to do.

【0005】また、特開平10−133789号公報に
は、実行するプログラムの挙動によらずに、電力消費に
伴う発熱量が一定以上となることを回避するために、シ
ステムクロックをカウントする手段と各モジュールの動
作クロック数をカウントする手段を持ち、モジュールの
活性化率がある予め定めた値に達した場合、そのモジュ
ールまたはシステム全体が低消費電力モードに移行する
プロセッサが示されている。
Japanese Patent Laid-Open Publication No. Hei 10-133789 discloses a means for counting a system clock in order to prevent the amount of heat generated due to power consumption from becoming more than a certain value regardless of the behavior of a program to be executed. A processor having means for counting the number of operation clocks of each module, and when the activation rate of the module reaches a predetermined value, the module or the entire system shifts to a low power consumption mode.

【0006】また、特許第275520号には、プロセ
ッサがプログラム実行中にハードウエア割込みを期待し
たアイドル状態、または次のタスク処理への移行待ちが
必ずあることに着目し、このようなアイドル時又はタス
ク移行時にプロセッサのクロック供給を中断することに
より低消費電力化を行うように構成したプロセッサが示
されている。この特許には、プロセッサが特定のアイド
ルルーチンに入ってから起動して所定時間後にタイマー
割込み信号を発生する手段、プロセッサがタスク処理ル
ーチンの1つのタスク処理終了時に起動して、所定時間
後にタイマー割込み信号を発生する手段、を備えている
ことを特徴としている。
In Japanese Patent No. 275520, attention is paid to the fact that the processor always waits for an idle state in which a hardware interrupt is expected during execution of a program or waits for transition to the next task processing. A processor configured to reduce power consumption by interrupting the clock supply of the processor at the time of task transfer is shown. This patent includes a means for generating a timer interrupt signal after a predetermined time after the processor is started after entering a specific idle routine, and a means for generating a timer interrupt signal when the processor is completed at the end of one task processing of the task processing routine and after a predetermined time. Means for generating a signal.

【0007】[0007]

【発明が解決しようする課題】上記したように、マイク
ロプロセッサを用いたシステムで特に低消費電力で動作
することが期待されているシステムにおいて、マイクロ
プロセッサを低消費電力化する従来の方法の1つとして
は、クロック周波数を下げる方式が知られている。この
方式では、全てのプログラムが一様に遅くなり、レスポ
ンスが悪くなったり、制限時間内に処理が終了しなくな
ったりする問題がある。
As described above, one of the conventional methods for reducing the power consumption of a microprocessor in a system using a microprocessor, which is particularly expected to operate with low power consumption. A known method is to lower the clock frequency. In this method, there is a problem that all the programs are uniformly slowed down, the response is deteriorated, and the processing does not end within the time limit.

【0008】また、他の従来の方法としては、割込み待
ち状態をアイドル(IDLE)状態にして、IDLE状
態の場合にはクロック供給を止める方式が知られてい
る。しかし、この方法では、プロセッサがプログラムを
実行中の低消費電力化は不可能であり、低消費電力への
効果が少ないという問題がある。
As another conventional method, there is known a method in which an interrupt wait state is set to an idle (IDLE) state, and a clock supply is stopped in the idle state. However, in this method, it is impossible to reduce the power consumption while the processor is executing the program, and there is a problem that the effect on the power consumption is small.

【0009】本発明は上記の問題を鑑みて、プログラム
毎に実行時間を制御し、影響の少ないプログラムに対し
てはIDLE状態を積極的にプロセッサ自身が作成する
ことにより、遅く走っても良いプログラムに対してはよ
り低消費電力で走行させると共に、制限時間内に処理す
る必要のある優先順位の高いプログラムや、より早いレ
スポンスを期待するプログラムに対しては、消費電力を
犠牲にしても速く走らせることができるコントロール手
段をもつ低消費電力プロセッサを供給することを目的と
する。
In view of the above problems, the present invention controls the execution time for each program, and for a program with little effect, the processor itself actively creates an IDLE state so that the program may run slowly. For programs with higher priority that need to be processed within the time limit and programs that expect faster response, run faster with lower power consumption. It is an object to provide a low power processor with control means that can be controlled.

【0010】[0010]

【課題を解決するための手段】この発明の低消費電力プ
ロセッサは、プログラムを実行するプロセッサと、プロ
グラム毎の実行目標値を設定するための記憶装置と、プ
ログラムの実行時間を測定するカウンタ手段と、プログ
ラムの実行時間が実行目標値に対して少ない場合には、
実行目標時間になるまでプロセッサのクロックの供給を
止める手段と、を備え、前記プログラム毎の実行目標値
を設定するための記憶装置を書換えることで、プログラ
ム毎の実行時間と消費電力を制御することを特徴とす
る。
A low power consumption processor according to the present invention includes a processor for executing a program, a storage device for setting an execution target value for each program, and a counter for measuring the execution time of the program. If the execution time of the program is less than the execution target value,
Means for stopping the supply of the clock of the processor until the target execution time is reached, and controlling the execution time and power consumption of each program by rewriting a storage device for setting the target execution value of each program. It is characterized by the following.

【0011】また、この発明の低消費電力プロセッサ
は、プログラムを実行するプロセッサと、プロセッサか
らリセット、カウントイネーブルできプログラムの実行
時間を計測するための複数のタイマーカウンタ装置、プ
ログラム毎の実行時間の目標値を格納する複数の記憶装
置と、実行目標値と実行時間を比較する演算器と、演算
結果を格納するウェイト用カウンタ装置と、前記ウェイ
ト用カウンタ装置の出力信号に基づきプロセッサへのク
ロック供給をコントロールする制御装置と、を備えるこ
とを特徴とする。
A low power consumption processor according to the present invention includes a processor for executing a program, a plurality of timer counter devices capable of resetting and enabling a count from the processor to measure the execution time of the program, and a target execution time for each program. A plurality of storage devices for storing values, an arithmetic unit for comparing an execution target value with an execution time, a wait counter device for storing an operation result, and a clock supply to a processor based on an output signal of the wait counter device. And a control device for controlling.

【0012】更に、この発明は、プロセッサの命令によ
りプログラムの所望の位置にて、実行時間を測定する前
記タイマーカウンタをリセットするとともに、カウンタ
をイネーブルにする手段と、プログラムの命令によりプ
ログラムの所望の位置にて、前記演算装置で実行目標時
間と実行時間の差を演算し、その値を前記ウェイト用カ
ウンタ装置に格納する手段と、前記ウェイト用カウンタ
装置の値が1以上の場合に、ウェイト用カウンタ装置を
クロックに同期してデクリメントする手段と、ウェイト
用カウンタ値が1以上の場合に、プロセッサへのクロッ
ク供給を停止する制御手段と、を備えることを特徴とし
ている。
Further, the present invention resets the timer counter for measuring the execution time at a desired position of the program according to a command of the processor, and enables the counter. Means for calculating the difference between the target execution time and the execution time by the arithmetic unit at the position, and storing the calculated value in the weight counter device; It is characterized by comprising a means for decrementing the counter device in synchronization with the clock, and a control means for stopping the supply of the clock to the processor when the wait counter value is 1 or more.

【0013】、上記したように、プロセッサ内にプログ
ラム毎の実行目標値を設定するための記憶装置と、プロ
グラムの実行時間を同時に測定するカウンタ手段と、プ
ログラムの実行時間が、実行目標値に対して少ない場合
には、実行目標時間になるまで、プロセッサのクロック
の供給を止める手段と、を備えているため、プログラム
毎に目標実行時間を制御することが可能である。また、
プログラム毎の実行目標値を設定するための記憶装置を
書換えることで、プログラム毎の実行時間と消費電力を
制御する手段をもつため、プログラム毎に実行時間を制
御し、遅く走っても良いプログラムに対してはより低消
費電力で走行させると共に、制限時間内に処理する必要
のある優先順位の高いプログラムや、より早いレスポン
スを期待するプログラムに対しては、消費電力を犠牲に
しても速く走らせることができる。
As described above, the storage device for setting the execution target value for each program in the processor, the counter means for simultaneously measuring the execution time of the program, and the execution time of the program with respect to the execution target value And a means for stopping the supply of the clock of the processor until the target execution time is reached, so that the target execution time can be controlled for each program. Also,
Since the storage device for setting the execution target value for each program is rewritten, means for controlling the execution time and power consumption for each program are provided. For programs with higher priority that need to be processed within the time limit and programs that expect faster response, run faster with lower power consumption. Can be

【0014】また、この発明の低消費電力プロセッサ
は、プログラムを実行するプロセッサと、プログラムの
実行時間の目標値を格納する複数の記憶装置と、実行時
間の目標値と接続され、プロセッサから実行時間の目標
値をプッシュする手段を備えるカウンタスタック装置
と、前記カウンタスタックからのステータス出力信号か
らプロセッサへのクロック供給を制御する手段と、を備
え、前記カウンタスタック装置は、各レベルのカウンタ
を同時に動作させるカウント機能を持ち、下層レベルの
カウンタ値が実行目標時間になった場合に、上層レベル
のカウンタを実行目標時間に達したことを意味する値に
設定する機能を有し、前記カウンタスタック装置の最上
位のレベルのカウンタが実行目標時間に達した場合に
は、そのステータス信号を出力することを特徴とする。
Further, a low power consumption processor according to the present invention is connected to a processor for executing a program, a plurality of storage devices for storing a target value of the execution time of the program, and a target value of the execution time. And a means for controlling clock supply to a processor from a status output signal from the counter stack. The counter stack apparatus operates counters of respective levels simultaneously. A counter function for setting the upper-level counter to a value indicating that the target execution time has been reached when the lower-level counter value reaches the target execution time. When the highest level counter reaches the execution target time, its status signal And outputs.

【0015】上記した構成の発明では、実行目標値に達
したかどうかを測定するカウンタスタック装置を持つた
め、同一プログラムがネスト処理されている場合にも、
プログラム毎の実行時間と消費電力をコントロールする
ことが可能である。また、下層レベルのカウンタ値が実
行目標時間になった場合には、より上層レベルのカウン
タを実行目標時間に達したことを意味する値に設定する
機能を備えるため、後に実行されたプログラムが実行目
標値に達していなくプロセッサへのクロック供給を停止
しており、先行して実行されたプログラムが、実行目標
値に達した場合でも、プロセッサにクロックの供給を開
始させることが可能であるため、ネスト処理されたプロ
グラムに対しても、実行目標値に対してより正確な時間
で実行させることが可能である。
In the invention having the above configuration, since the counter stack device for measuring whether the execution target value has been reached is provided, even when the same program is nested,
It is possible to control the execution time and power consumption for each program. In addition, when the lower-level counter value reaches the target execution time, a function for setting the higher-level counter to a value indicating that the target execution time has been reached is provided. Since the clock supply to the processor has been stopped because the target value has not been reached and the previously executed program has reached the execution target value, it is possible to cause the processor to start supplying the clock, Even a nested program can be executed in a more accurate time with respect to the execution target value.

【0016】[0016]

【発明の実施の形態】以下、本発明の実施形態につき図
面を参照して説明する。図1は、本発明の第1の実施形
態となるプロセッサのシステム構成を示すブロック図で
ある。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a system configuration of a processor according to the first embodiment of the present invention.

【0017】図1において、プロセッサ11は、通常の
プロセッサ部分の構成であり、このプロセッサ11は、
図示しないメモリに格納されているプログラムを読み出
し、データアクセスを行いながらプログラムを実行する
ものとする。そして、プロセッサ11には、アドレスバ
ス12、データバス17及びコントロールバス18が接
続されている。
In FIG. 1, a processor 11 has a configuration of a normal processor portion.
A program stored in a memory (not shown) is read, and the program is executed while performing data access. An address bus 12, a data bus 17, and a control bus 18 are connected to the processor 11.

【0018】プロセッサ11対しては、割込み発生器1
3より複数の割込み信号16aがプロセッサ11の割込
み端子に入力されている。プロセッサ11は入力された
割込み信号に基づいて要求のあったタスクの処理を行
う。
For the processor 11, the interrupt generator 1
3, a plurality of interrupt signals 16a are input to the interrupt terminal of the processor 11. The processor 11 processes the requested task based on the input interrupt signal.

【0019】また、クロック発生器14より生成された
クロック信号14bが、アンドゲート15を通じて信号
16bにてプロセッサ11のクロック入力端子に与えら
れる。プロセッサ11は、与えられたクロック信号に応
じた速度で処理を実行する。
The clock signal 14b generated by the clock generator 14 is supplied to the clock input terminal of the processor 11 as a signal 16b through the AND gate 15. The processor 11 executes a process at a speed according to a given clock signal.

【0020】実行時間タイマーカウンタ21は、タスク
の実行時間を測定するもので、この実施形態では、第
1、第2、第3の実行時間タイマーカウンタ21a、2
1b、21cを備える。すなわち、後述するように、こ
の実施形態では、3つのタスクを処理する場合について
説明しており、それぞれのタスクに対応して、第1、第
2、第3の実行時間タイマーカウンタ21a、21b、
21cが設けられている。
The execution time timer counter 21 measures the execution time of a task. In this embodiment, the first, second, and third execution time timer counters 21a, 21a
1b and 21c. That is, as will be described later, this embodiment describes a case where three tasks are processed, and the first, second, and third execution time timer counters 21a, 21b,
21c is provided.

【0021】そして、それぞれのタスクに応じて実行時
間を測定するために、第1、第2、第3の実行時間タイ
マーカウンタ21a、21b、21cのそれぞれに対し
て、プロセッサ11とデータバス17及びプロセッサ1
1からのリセット及びタイマーイネーブルのコントロー
ル信号22で接続されている。また、プロセッサ11よ
りそれぞれ個別に実行時間タイマーカウンタ21a、2
1b、21cのリセット及びカウント動作が制御されて
いるものとする。
Then, in order to measure the execution time according to each task, the processor 11, the data bus 17 and the data bus 17 are provided to each of the first, second, and third execution time timer counters 21a, 21b, 21c. Processor 1
1 and a control signal 22 for timer enable. Further, the execution time timer counters 21a, 21a,
It is assumed that the reset and count operations of 1b and 21c are controlled.

【0022】なお、この実施形態では、実行時間タイマ
ーカウンタとして3個の例を示しているが、他の構成数
でも本発明は問題なく適用できる。この実施形態におい
ては、第1、第2、第3の実行時間タイマーカウンタ2
1a、21b、21cは、後述するように、それぞれの
タスクに対応して動作する。
In this embodiment, three examples of the execution time timer counter are shown, but the present invention can be applied without any problem even with other numbers of components. In this embodiment, the first, second, and third execution time timer counters 2
1a, 21b, and 21c operate according to the respective tasks as described later.

【0023】実行目標レジスタ23は、それぞれのタス
クが実行する目標の処理時間を格納するものである。こ
の実施形態では、3つのタスクに対応して3つの実行目
標レジスタ23a、23b、23cを備える。各実行目
標レジスタ23a、23b、23cには、プロセッサ1
1とデータバス17及びリードライト信号24で接続さ
れており、それぞれの実行目標レジスタ23a、23
b、23cは、プロセッサ11より、データを少なくと
も書き込み可能、場合によっては読み出し可能であるも
のとする。この実施形態においては、実行目標レジスタ
23a、23b、23cもそれぞれのタスクに対応して
その目標値が設定される。
The execution target register 23 stores a target processing time to be executed by each task. In this embodiment, three execution target registers 23a, 23b, and 23c are provided for three tasks. Each execution target register 23a, 23b, 23c has a processor 1
1 are connected by a data bus 17 and a read / write signal 24, and the respective execution target registers 23a and 23
It is assumed that the data b and 23c are at least writable and possibly readable by the processor 11. In this embodiment, the target values of the execution target registers 23a, 23b, and 23c are set corresponding to the respective tasks.

【0024】実行時間タイマーカウンタ21、実行目標
レジスタ23のそれぞれの出力は、バス25、バス26
にて減算器27に与えられ、実行目標レジスタ23のい
ずれかのレジスタ値の出力と、実行時間タイマーカウン
タ21のいずれかのタイマー値の出力が、図1には図示
していないが選択的に減算器27に入力される。
The outputs of the execution time timer counter 21 and the execution target register 23 are output from a bus 25 and a bus 26, respectively.
The output of one of the register values of the execution target register 23 and the output of one of the timer values of the execution time timer counter 21 are selectively supplied to the subtractor 27, although not shown in FIG. It is input to the subtractor 27.

【0025】この減算器27にて、実行目標レジスタ値
−実行時間タイマーカウンタ値の減算をおこない、演算
結果が正の場合、すなわち、実行目標レジスタ値>実行
時間タイマーカウンタ値の場合に、その値をLPモード
カウンタ28のいずれかに書き込むことができる構成に
なっている。この実施形態においては、LPモードカウ
ンタ28もタスクに対応して第1、第2、第3のLPモ
ードカウンタ28a,28b、28cを備える。
The subtractor 27 subtracts the execution target register value-the execution time timer counter value. If the operation result is positive, that is, if the execution target register value> the execution time timer counter value, the value is subtracted. Can be written to any of the LP mode counters 28. In this embodiment, the LP mode counter 28 also includes first, second, and third LP mode counters 28a, 28b, and 28c corresponding to tasks.

【0026】書き込まれたLPモードカウンタ値は、コ
ントロールバス18からバス29を経て与えられるシス
テムクロックによって0になるまでデクリメントされ
る。また、LPモードカウンタ28のそれぞれのカウン
タ値が0の場合には、0を示す信号Z1,Z2,Z3が
バス30を通じて、低消費電力コントロール信号ブロッ
ク回路31に入力される。この実施形態では、第1LP
モードカウンタ28aからはZ1信号、第2LPモード
カウンタ28bからはZ2信号が、第3LPモードカウ
ンタ28cが出力される。
The written LP mode counter value is decremented until it becomes 0 by the system clock supplied from the control bus 18 via the bus 29. When the respective counter values of the LP mode counter 28 are 0, signals Z1, Z2, and Z3 indicating 0 are input to the low power consumption control signal block circuit 31 through the bus 30. In this embodiment, the first LP
The mode counter 28a outputs a Z1 signal, the second LP mode counter 28b outputs a Z2 signal, and the third LP mode counter 28c.

【0027】上記した低消費電力コントロールブロック
回路31は、バス32を通じてLPモードカウンタ28
への書き込み信号と、リターン命令信号等のタスクの終
了信号が入力されている。
The low power control block circuit 31 is connected to the LP mode counter 28 through a bus 32.
And a task end signal such as a return instruction signal.

【0028】低消費電力コントロールブロック回路31
からは、現在実行されているフォアグラウンドのタスク
処理のLPモードカウンタ28の値がゼロ以外の場合及
び割込み発生器13からの割込み要求信号16aが要求
されていない場合には、アンドゲート15に対してLo
wレベルのクロック供給停止信号31aを出力するもの
とする。また、消費電力コントロールブロック回路31
は、タスクに応じたクロックを発生させるために、制御
信号31bをクロック発生器14に与える。
Low power consumption control block circuit 31
From when the value of the LP mode counter 28 of the currently executed foreground task processing is not zero and when the interrupt request signal 16a from the interrupt generator 13 is not requested, the AND gate 15 is Lo
It is assumed that a w-level clock supply stop signal 31a is output. The power consumption control block circuit 31
Supplies a control signal 31b to the clock generator 14 in order to generate a clock corresponding to the task.

【0029】以上が代表的な実施形態を示す図1の簡単
な構成の説明であり、これをもとに本発明の実施形態の
動作の詳細説明を行う。
The above is the description of the simple configuration of FIG. 1 showing a typical embodiment. Based on this, the operation of the embodiment of the present invention will be described in detail.

【0030】図3ないし図9は、プロセッサのタスク動
作の関係を示す図である。これらの図において、水平方
向は時間軸を表しており、一スパン当たりの時間単位を
Tとしている。また、垂直方向には、プロセッサ11の
動作を分類し、タスク待ち、タスク1、タスク2、タス
ク3が走っている状態の場合に実線が引かれている状態
を示すものである。
FIGS. 3 to 9 are diagrams showing the relationship between task operations of the processor. In these figures, the horizontal direction represents a time axis, and a time unit per span is T. In the vertical direction, the operation of the processor 11 is classified, and indicates a state in which a solid line is drawn in a state of waiting for a task, a task 1, a task 2, and a task 3 are running.

【0031】今、プロセッサが実行しているタスクの状
態が図3のような状態であるとする。この図3におい
て、タスク1は実行する際に総時間で4T時間必要な処
理であり、タスク2、タスク3はそれぞれ2T,1T時
間要するとしている。
Assume that the state of the task being executed by the processor is as shown in FIG. In FIG. 3, task 1 is a process requiring a total of 4T time to execute, and tasks 2 and 3 require 2T and 1T respectively.

【0032】タスク切替えの場合には、タスク処理要求
の割込みがプロセッサ11に入り、その割り込み要求か
ら要求のあったタスクが走行し、タスク終了時には、割
込みからの復帰命令が走行し、復帰するものとする。
In the case of task switching, an interrupt of a task processing request enters the processor 11, the task requested by the interrupt request runs, and at the end of the task, a return instruction from the interrupt runs and returns. And

【0033】また、図3ないし図9の説明において、タ
スク1〜3の優先順位はタスク1<タスク2<タスク3
としている。
In the description of FIGS. 3 to 9, the priorities of tasks 1 to 3 are: task 1 <task 2 <task 3
And

【0034】図3は、プロセッサ11が低消費電力動作
を行わない通常の動作を示している。図3に従いこの動
作につき説明する。図3に示すように、0T時間には、
タスク待ち状態で1T時間に、タスク1の要求が入り、
タスク1が走行する。そして、2T時間にタスク2の要
求がが入り、このタスクが4T時間に終了すると共に、
タスク1の走行に戻る。
FIG. 3 shows a normal operation in which the processor 11 does not perform the low power consumption operation. This operation will be described with reference to FIG. As shown in FIG. 3, at 0T time,
At 1T time in task waiting state, a request for task 1 enters,
Task 1 runs. Then, a request for task 2 enters at 2T time, and this task ends at 4T time,
Return to the task 1 run.

【0035】5T時間にタスク3要求が入り、タスク3
が走行し、6T時間にタスク3が終了し、タスク1に戻
る。タスク1の走行は8T時間に終了し、8T〜10T
まではタスク待ちとなる。
At time 5T, a task 3 request is received, and task 3
Travels, task 3 ends at time 6T, and returns to task 1. Running of task 1 ends at 8T time, 8T-10T
Until the task waits.

【0036】10T〜20Tは0T〜10Tの動作と同
じであるとする。
It is assumed that the operation from 10T to 20T is the same as the operation from 0T to 10T.

【0037】この図3の動作において、低消費電力設計
を全く行わないとすると、タスク待ち、タスク1〜3の
いづれかが走行している状態となる。このため、0T時
間〜10Tまで、すべてプロセッサ11は走行(RU
N)状態であることになる。
In the operation of FIG. 3, if no low power consumption design is performed, the task waits and one of tasks 1 to 3 is running. Therefore, the processor 11 runs (RU) from 0T to 10T.
N) state.

【0038】ここで、消費電力の目安として、RUN状
態であれば消費電力を1Wとし、IDLE状態であれば
1/10W、クロック周波数が通常のプロセッサの走行
時の1/2の場合には、1/2Wと仮定する。このよう
に仮定すると、図3に示す例では、0〜20T期間の間
全てRUN状態であるため、20TWの電力を消費する
ことになる。
Here, as a measure of power consumption, the power consumption is set to 1 W in the RUN state, 1/10 W in the IDLE state, and 1/10 W in the clock frequency when the processor runs normally. Assume 1 / 2W. Assuming such a situation, in the example shown in FIG. 3, the power is consumed by 20 TW since all of the devices are in the RUN state during the period of 0 to 20 T.

【0039】また、処理の目安として、20T時間内の
タスク処理を行っている時間のスループットを考える
と、図3の例のスループットは、タスク1に関して8、
タスク2に関して4、タスク3に関して2であり、スル
ープットは計14となる。
Considering the throughput during the task processing within the 20T time as a guide for the processing, the throughput in the example of FIG.
4 for task 2 and 2 for task 3 for a total of 14 throughput.

【0040】ここで、上記した従来方式のタスク待ち時
間の場合に、プロセッサ11のクロック供給を止めて、
IDLE状態にする方式を図4に示す。この例の場合に
は、0から1Tまでの間、8Tから11Tまでの間、1
8Tから20Tの間がIDLE状態になる。
Here, in the case of the conventional task waiting time described above, the clock supply to the processor 11 is stopped, and
FIG. 4 shows a method for setting the IDLE state. In the case of this example, between 0 and 1T, between 8T and 11T, 1
The IDLE state is set between 8T and 20T.

【0041】消費電力は、IDLE状態の場合には1/
10Wであるため、図4に示すものでは、消費電力は以
下の通りになる。
The power consumption is 1 / in the case of the IDLE state.
Since the power is 10 W, the power consumption is as follows in FIG.

【0042】 1/10W×6T+1W×14T=14.6TW1 / 10W × 6T + 1W × 14T = 14.6TW

【0043】また、スループットは、14である。The throughput is 14.

【0044】図4に示す場合の問題としては、タスクは
全く走行していない状態が20T期間中に6Tある場合
には、その分低消費電力化が可能であるが、タスク要求
が常にある場合においては、消費電力は減少しないとい
う問題がある。
As a problem in the case shown in FIG. 4, when there is 6T during the 20T period where no task is running, the power consumption can be reduced by that amount, but there is always a task request. Has a problem that power consumption does not decrease.

【0045】さらに、上記の図4の従来方式にプラスし
て、動作周波数を通常の1/2にした場合を図5に示
す。動作周波数を通常の1/2にすると、図4に示すよ
うに、タスク1〜3を実行するための所要時間は、それ
ぞれ倍になり、8T、4T、2Tとなる。
FIG. 5 shows a case in which the operating frequency is reduced to 1/2 of the normal frequency in addition to the conventional method shown in FIG. As shown in FIG. 4, when the operating frequency is reduced to 通常 of the normal frequency, the time required to execute tasks 1 to 3 doubles to 8T, 4T, and 2T, respectively.

【0046】この図5の場合には、消費電力は、IDL
E状態の場合には1/10Wであるため、消費電力は以
下の通りになる。
In the case of FIG. 5, the power consumption is IDL
Since the power is 1/10 W in the E state, the power consumption is as follows.

【0047】 1/10W×6T+1/2W×14T=7.6TW1 / 10W × 6T + / W × 14T = 7.6TW

【0048】また、スループットは、7となる。The throughput is 7.

【0049】図5の例のように、動作周波数を減らした
場合には、消費電力もその分確実に減るが、スループッ
トも同様に減少してしまうという問題がある。
When the operating frequency is reduced as in the example of FIG. 5, the power consumption is surely reduced, but there is a problem that the throughput is similarly reduced.

【0050】この発明は、スループットを低減させず
に、消費電力を低減させるように構成したものである。
図1に示す構成の本発明のプロセッサの動作例を図6に
示す。
According to the present invention, the power consumption is reduced without reducing the throughput.
FIG. 6 shows an operation example of the processor of the present invention having the configuration shown in FIG.

【0051】通常、それぞれ4T,2T,1T時間必要
であるタスク1〜3に対して、低消費電力化のために、
タスク1は8T、タスク2は6Tと実行時間を2倍、3
倍の目標値に設定し、タスク3はそのままの1T時間で
走るように、コントロールする。
Normally, for tasks 1 to 3 requiring 4T, 2T, and 1T, respectively, in order to reduce power consumption,
Task 1 is 8T, task 2 is 6T, twice the execution time, 3
The target value is set to double, and task 3 is controlled so as to run in the same 1T time.

【0052】このため、プロセッサ11より、予め、図
1の実行目標レジスタ21のそれぞれのレジスタ21
a、21b、21cに関して、8T、6T、1Tに相当
する値を設定しておく。
For this reason, the processor 21 previously registers each of the execution target registers 21 of FIG.
Values corresponding to 8T, 6T, and 1T are set for a, 21b, and 21c.

【0053】図6に示す動作の説明では、図3、図4と
同様に、0T〜1Tまではタスク待ち状態になってい
る。
In the description of the operation shown in FIG. 6, as in FIGS. 3 and 4, the task is in a task waiting state from 0T to 1T.

【0054】1T時間において、タスク1の要求割込み
が、図1の割込み発生器13を通じて、信号16aとし
てプロセッサ11に入る。このプロセッサ11は割込み
に応じて、タスク1のプログラムを実行する。
At time 1T, a request interrupt for task 1 enters processor 11 as signal 16a through interrupt generator 13 of FIG. The processor 11 executes the task 1 program in response to the interrupt.

【0055】タスク1のプログラムの中の実行時間を制
御したい開始部分には、実行時間タイマーカウンタ21
を制御する部分があり、そこの部分にプロセッサ11が
さしかかると、第1実行タイマーカウンタ21aをリセ
ットした後に、イネーブルにするものとする。
The start portion of the program of task 1 where the execution time is to be controlled is provided with an execution time timer counter 21.
Is controlled, and when the processor 11 reaches there, the first execution timer counter 21a is reset and then enabled.

【0056】例えば、プロセッサ11内に、実行タイマ
ーカウンタ21を制御する命令、STIM命令が実装さ
れている場合には、実行時間を制御したい開始部分、例
えばタスク1の開始部分に、以下の命令を入れる。
For example, in the case where an instruction for controlling the execution timer counter 21 and an STIM instruction are mounted in the processor 11, the following instruction is added to the start portion for which the execution time is to be controlled, for example, the start portion of the task 1. Put in.

【0057】STIM 1 (第1実行時間タイマーカウンタ21aをリセット、カ
ウンターイネーブルにする命令)
STIM 1 (Instruction to reset the first execution time timer counter 21a and enable the counter)

【0058】この命令で、第1実行時間タイマーカウン
タ21aはタスク1の実行時間を測定し始めることにな
る。
With this instruction, the first execution time timer counter 21a starts measuring the execution time of the task 1.

【0059】そして、2T時間の位置においては、タス
ク2の要求割込みが、図1の割込み発生回路13を通じ
て、信号16aとしてプロセッサ11に入る。タスク2
においても、上記タスク1開始時と同様に、第2実行時
間タイマーカウンタ21bをリセット及びカウンターを
イネーブルにすることでタスク2の実行時間を測定し始
める。
At the position of the 2T time, the request interrupt of the task 2 enters the processor 11 as the signal 16a through the interrupt generation circuit 13 of FIG. Task 2
Also, in the same manner as at the start of the task 1, the execution time of the task 2 is started to be measured by resetting the second execution time timer counter 21b and enabling the counter.

【0060】図6の4T時間において、タスク2の実行
が終了し、タスク1に戻るために割込みからの復帰命令
を実行するが、その直前に、タスク2の第2実行時間タ
イマーカウンタ21bと第2実行目標レジスタ23bの
値を比較する命令を行う。例えば、その命令をCTIM
命令とすると、次の命令を実行する。
At time 4T in FIG. 6, the execution of task 2 is completed, and a return instruction from the interrupt is executed to return to task 1. Immediately before that, the second execution time timer counter 21b of task 2 and the second 2. An instruction to compare the value of the execution target register 23b is issued. For example, the command is CTIM
As an instruction, the next instruction is executed.

【0061】CTIM 2 (第2実行目標レジスタ23b−第2実行時間タイマー
カウンタ21bを行いその結果が、正であれば、第2L
Pモードカウンタ28bに値を格納する。)
CTIM 2 (the second execution target register 23b-the second execution time timer counter 21b, and if the result is positive, the second L
The value is stored in the P mode counter 28b. )

【0062】第2LPモードカウンタ28bは、もしゼ
ロ以外の値が入っている場合には、自動的にゼロまでデ
クリメント処理を行うと共に、値がゼロを示すZ2信号
であるステータス信号30を消費電力コントロール回路
31にLPモードカウンタ28のステータス信号として
出力する。
If the second LP mode counter 28b contains a value other than zero, the second LP mode counter 28b automatically decrements the value to zero, and controls the status signal 30 which is a Z2 signal indicating a value of zero, to the power consumption control. It outputs to the circuit 31 as a status signal of the LP mode counter 28.

【0063】図6に示す例では、第2LPモードカウン
タ28bに(6T−2T=4T)時間の値がロードさ
れ、4T期間、LOWレベルのZ2信号としてのステー
タス信号30が低消費電力コントロールブロック回路3
1に出力される。ステータス信号30のLOWレベル入
力に応じて、低消費電力コントロールブロック回路31
は、コントロール信号31aをLOWレベルにし、アン
ド回路15からのクロック供給信号16bを止める。
In the example shown in FIG. 6, the value of the time (6T-2T = 4T) is loaded into the second LP mode counter 28b, and during the 4T period, the status signal 30 as the LOW level Z2 signal is supplied to the low power consumption control block circuit. 3
1 is output. In response to the LOW level input of the status signal 30, the low power consumption control block circuit 31
Sets the control signal 31a to the LOW level and stops the clock supply signal 16b from the AND circuit 15.

【0064】このように、タスク2の実行目標に対し
て、実行時間が少ない場合には、積極的にクロックを止
めるIDLE状態を作り出し、プロセッサ11が低消費
電力状態になる。
As described above, when the execution time is shorter than the execution target of the task 2, an IDLE state in which the clock is actively stopped is created, and the processor 11 enters the low power consumption state.

【0065】図65に示す例でIDLE状態である、5
T時間において、さらにタスク3の要求割込みが、図1
の割込み発生回路13を通じて割り込み信号16aとし
てプロセッサ11に入る。この割込み要求信号16a
は、消費電力コントロール回路31にも入力されるた
め、この割り込み要求信号16aに応じて、消費電力コ
ントロール信号31aをHIGHレベルにし、クロック
信号16bをプロセッサ15に対して、供給するように
動作する。
In the example shown in FIG.
At time T, the request interrupt of task 3 is
And enters the processor 11 as an interrupt signal 16a through the interrupt generation circuit 13 of FIG. This interrupt request signal 16a
Is also input to the power consumption control circuit 31, so that the power consumption control signal 31a is set to the HIGH level in response to the interrupt request signal 16a, and the clock signal 16b is supplied to the processor 15.

【0066】タスク3においても、第3実行時間タイマ
ーカウンタ21cをリセット及びカウンターをイネーブ
ルにすることでタスク3の実行時間を測定し始める。
In the task 3, the third execution time timer counter 21c is reset and the counter is enabled to start measuring the execution time of the task 3.

【0067】タスク3の実行が終了し、タスク2に戻る
ために割込みからの復帰命令を実行するが、その直前
に、タスク3の第3実行時間タイマーカウンタ21cと
第3実行目標レジスタ23cの値を比較する命令を行
う。
When the execution of the task 3 is completed, a return instruction from the interrupt is executed to return to the task 2. Immediately before that, the values of the third execution time timer counter 21c and the third execution target register 23c of the task 3 are read. Instruction to compare.

【0068】例えば、その命令をCTIM命令とする
と、以下の命令が出される。
For example, if the instruction is a CTIM instruction, the following instruction is issued.

【0069】CTIM 3 (第3実行目標レジスタ23c−第3実行時間タイマー
カウンタ21cを行いその結果が、正であれば、第3L
Pモードカウンタ28cに値を格納する。)
CTIM 3 (Third execution target register 23c-third execution time timer counter 21c. If the result is positive, the third L
The value is stored in the P mode counter 28c. )

【0070】第3LPモードカウンタ28cは、もしゼ
ロ以外の値が入っている場合には、自動的にゼロまでデ
クリメント処理を行うと共に、値がゼロを示すZ3信号
としてのステータス信号30を消費電力コントロールブ
ロック回路31にLPモードカウンタ28のステータス
信号として出力する。
If the third LP mode counter 28c contains a value other than zero, the third LP mode counter 28c automatically decrements the value to zero, and outputs a status signal 30 as a Z3 signal indicating that the value is zero. It outputs to the block circuit 31 as a status signal of the LP mode counter 28.

【0071】いま、タスク3は本体の走行に1T時間を
要する。また、第3実行目標レジスタ23cのレジスタ
値も1T時間のため、CTIM 3は、0以下の比較値
となるためステータス信号30は変わらず、6Tの位置
でそのままタスク2に処理が戻る。6Tの位置では、第
2LPモードカウンタ28bのZ2信号がまだLOWレ
ベルであるため、再びIDLE状態になり、アンド回路
15からのクロック供給16bは停止する。
Now, task 3 requires 1T time to run the main body. Further, since the register value of the third execution target register 23c is also 1T time, CTIM3 is a comparison value of 0 or less, so that the status signal 30 does not change, and the process returns to the task 2 at the position of 6T. At the position of 6T, since the Z2 signal of the second LP mode counter 28b is still at the LOW level, the state becomes the IDLE state again, and the clock supply 16b from the AND circuit 15 stops.

【0072】図6の8Tの場所においては、第2LPモ
ードカウンタ28bの値が0になるため、第2LPモー
ドカウンタ28bからの信号Z2がHIGHレベルにな
り、ステータス信号30はHIGHとなり、消費電力コ
ントロールブロック回路31からのコントロール信号3
1aはHIGHになり、アンド回路15からクロック供
給16bが開始され、タスク2からタスク1への復帰命
令が走り、タスク1に走行が戻る。
At the position 8T in FIG. 6, the value of the second LP mode counter 28b becomes 0, so that the signal Z2 from the second LP mode counter 28b becomes HIGH, the status signal 30 becomes HIGH, and the power consumption control. Control signal 3 from block circuit 31
1a becomes HIGH, the clock supply 16b is started from the AND circuit 15, the return instruction from the task 2 to the task 1 runs, and the running returns to the task 1.

【0073】タスク1は、11Tの位置において、タス
ク1の処理を終了し、タスク待ち状態に復帰を実行する
が、その直前に、タスク1の第1実行時間タイマーカウ
ンタ21aと第1実行目標レジスタ23aの値を比較す
る命令を行う。
At the position 11T, the task 1 terminates the processing of the task 1 and returns to the task waiting state. Immediately before that, the first execution time timer counter 21a of the task 1 and the first execution target register An instruction to compare the value of 23a is performed.

【0074】例えば、その命令をCTIM命令とする
と、以下の命令が行われる。
For example, if the instruction is a CTIM instruction, the following instruction is executed.

【0075】CTIM 1 (第1実行目標レジスタ21a−第1実行時間タイマー
カウンタ23aを行いその結果が、正であれば、第1L
Pモードカウンタ28aに値を格納する。)
CTIM 1 (First execution target register 21a-first execution time timer counter 23a. If the result is positive, the first L
The value is stored in the P mode counter 28a. )

【0076】第1LPモードカウンタ28aは、もしゼ
ロ以外の値が入っている場合には、自動的にゼロまでデ
クリメント処理を行うと共に、値がゼロを示すZ1信号
を消費電力コントロールブロック回路31に第1LPモ
ードカウンタ28aのステータス信号として出力する。
If the first LP mode counter 28a contains a value other than zero, the first LP mode counter 28a automatically decrements the value to zero and sends a Z1 signal indicating a value of zero to the power consumption control block circuit 31. This is output as a status signal of the 1LP mode counter 28a.

【0077】図6の例では、11Tの位置において、第
1実行時間タイマカウンタ値21aは、既に10Tをカ
ウントしており、第1実行目標レジスタ23aの値8T
より大きいため、ステータスZ1信号はHIGHレベル
のままであり、クロック供給を停止すること無く、タス
ク待ち状態に戻る。12T〜20Tも0〜11Tとほぼ
同様の動作を行う。
In the example of FIG. 6, at the position of 11T, the first execution time timer counter value 21a has already counted 10T, and the value of 8T of the first execution target register 23a is 8T.
Because it is larger, the status Z1 signal remains at the HIGH level and returns to the task waiting state without stopping the clock supply. 12T to 20T perform almost the same operation as 0 to 11T.

【0078】以上、本発明を用いた図6の例では、消費
電力は以下のようになる。
As described above, in the example of FIG. 6 using the present invention, the power consumption is as follows.

【0079】消費電力は、IDLE状態の場合には1/
10Wであるため、以下の通りになる。
The power consumption is 1 / in the case of the IDLE state.
Since it is 10 W, it is as follows.

【0080】 1/10W×10T+1W×10T=11.0TW1/10 W × 10 T + 1 W × 10 T = 11.0 TW

【0081】スループットは、総計10となり、フルに
走行している図3、図4よりも総計では落ちているが、
タスク3はスループット2、タスク2はスループット4
であり、図3、図4と変わりなく処理している。
The throughput becomes a total of 10, which is lower than the total running of FIGS.
Task 3 is throughput 2, task 2 is throughput 4
And the processing is the same as in FIGS.

【0082】又、図5に比べて、全てのタスクの動作周
波数を落とすこともない。このため、タスク3のよう
に、1T期間でフルに走行しているので、高速を期待す
る処理に関しては、スループットが落ちることはなくな
る。
Further, as compared with FIG. 5, the operating frequencies of all the tasks are not reduced. For this reason, since the vehicle travels fully in the 1T period as in the task 3, the throughput does not decrease in the processing that expects a high speed.

【0083】また、実行時間目標レジスタ23の値を変
更することにより、低消費電力化と高速動作のトレーオ
フを容易に変更可能である。
Further, by changing the value of the execution time target register 23, it is possible to easily change the power-off and high-speed operation tray-off.

【0084】本発明を用いたもう1つの動作例を図6を
用いて説明する。図7では、図4と同様にタスク1,
2,3を各2回ずつ処理する例を示している。
Another operation example using the present invention will be described with reference to FIG. In FIG. 7, as in FIG.
2 shows an example of processing 2 and 3 each two times.

【0085】タスク1に関しては、時間1Tで最初のタ
スクが要求され、タスク1の終了後3T時間をおいて、
タスク1の2回目が要求が来るものとする。タスク2に
関しては、2T、12Tと一定時間毎にタスク要求が来
るものとし、タスク3に関しては、タスク2と同様5
T、15Tのように一定時間毎に、タスク要求がくるも
のとする。
For task 1, the first task is requested at time 1T, and after 3T time after the end of task 1,
Assume that the request comes in the second time of task 1. As for task 2, task requests are received at fixed time intervals of 2T and 12T.
It is assumed that a task request comes at regular time intervals such as T and 15T.

【0086】図7では、全てのタスクが2回ずつ処理さ
れるまでの時間は、22T時間である。そのうちIDL
E状態が8T、RUN状態が14Tとなる。
In FIG. 7, the time until all the tasks are processed twice is 22T. Of which IDL
The E state is 8T and the RUN state is 14T.

【0087】消費電力は、IDLE状態の場合には1/
10Wであるため、以下の通りとなる。
The power consumption is 1 / in the case of the IDLE state.
Since it is 10 W, it is as follows.

【0088】 1/10W×8T+1W×14T=14.8TW1/10 W × 8 T + 1 W × 14 T = 14.8 TW

【0089】上記より、単位時間当たりの平均消費電力
は、14.8TW/22T=0.672Wとなる。
From the above, the average power consumption per unit time is 14.8 TW / 22T = 0.672 W.

【0090】一方、従来例の図4では、全てのタスクが
2回ずつ処理されるまでの時間は、18T時間である。
そのうちIDLE状態が4T、RUN状態が14Tとな
る。
On the other hand, in FIG. 4 of the conventional example, the time until all the tasks are processed twice is 18T.
The IDLE state is 4T and the RUN state is 14T.

【0091】消費電力は、IDLE状態の場合には1/
10Wであるため、以下の通りとなる。
The power consumption is 1 / in the case of the IDLE state.
Since it is 10 W, it is as follows.

【0092】 1/10W×4T+1W×14T=14.4TW1 / 10W × 4T + 1W × 14T = 14.4TW

【0093】単位時間当たりの平均消費電力は、14.
4TW/18T=0.8Wとなる。
The average power consumption per unit time is 14.
4TW / 18T = 0.8W.

【0094】図4と図7の比較で判るように、同じタス
ク処理を行う場合の、消費電力(本来は消費エネルギ
ー)は、図4が14.4TWに対して、図7では、1
4.8TWになり、この条件では若干大きくなってい
る。しかし、単位時間当たりの消費エネルギーである消
費電力は、0.678Wになり、図4に対して抑制され
ている。従って、消費電力をよりコントローラブルにで
きるし、かつ優先順位の高いタスクに対してのレスポン
スもコントロールできる長所を持っているといえる。
As can be seen from a comparison between FIG. 4 and FIG. 7, when the same task processing is performed, the power consumption (original energy consumption) is 14.4 TW in FIG.
4.8 TW, which is slightly larger under this condition. However, the power consumption, which is the energy consumption per unit time, is 0.678 W, which is lower than that in FIG. Therefore, it can be said that there is an advantage that power consumption can be made more controllable and a response to a task with a high priority can be controlled.

【0095】本発明の第2の実施形態を図2に示す。な
お、図1と同じ構成部分には同じ符号を付し、説明の重
複を避けるために個々では、その説明を省略する。
FIG. 2 shows a second embodiment of the present invention. The same components as those in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted individually to avoid duplication of description.

【0096】図2に示す第2の実施形態は、LPモード
カウンタスタック42を持っている。このスタックは、
図2に示すようにNレベルのスタックで、スタックに入
れる値は、実行目標レジスタ41の値をスタックにプッ
シュする。各スタックのLPモードカウンタは、独立に
カウントダウンする機能を持っている。また、カウント
値が0になり、さらにカウントダウンした場合にカウン
タ最大値になるが、この例では最大値になればカウント
ダウンを停止するものとする。すなわち、各LPモード
カウンタは、最大値以外の値の時にカウントダウンする
ものとする。各LPモードカウンタは、各カウンタ値が
ゼロの場合に出力するZステータス出力と、非同期リセ
ット信号Rを持っており、下層レベルのスタックのZス
テータス出力は、オア(OR)ゲート44に入り、OR
ゲート44の出力がR信号につながっている、従って、
下層レベルのカウンタ値がゼロになった場合には上層レ
ベルのカウンタ値もゼロになる。
The second embodiment shown in FIG. 2 has an LP mode counter stack 42. This stack
As shown in FIG. 2, in the N-level stack, the value to be put on the stack pushes the value of the execution target register 41 onto the stack. The LP mode counter of each stack has a function of counting down independently. In addition, when the count value becomes 0 and further counts down, the counter reaches the maximum value. In this example, the countdown is stopped when the count value reaches the maximum value. That is, each LP mode counter counts down when the value is other than the maximum value. Each LP mode counter has a Z status output that is output when each counter value is zero, and an asynchronous reset signal R. The Z status output of the lower level stack enters an OR gate 44, and
The output of gate 44 is connected to the R signal, thus
When the lower level counter value becomes zero, the upper level counter value also becomes zero.

【0097】スタックトップの第1LPモードカウンタ
スタックのZステータス出力32aは、インバータ45
で反転され、フリップフロップ46の出力と共にアンド
ゲート47に与えられ、アンド回路47の出力信号47
aが消費電力コントロールブロック回路31に入る。
The Z status output 32a of the first LP mode counter stack at the top of the stack is
, And applied to the AND gate 47 together with the output of the flip-flop 46. The output signal 47 of the AND circuit 47
a enters the power consumption control block circuit 31.

【0098】フリップフロップ46の入力は、プロセッ
サ11から信号線48よりセットをコントロールされて
いるものとする。
It is assumed that the input of the flip-flop 46 is controlled by the signal line 48 from the processor 11.

【0099】この第2の実施形態では、図1の実施形態
と同じく各タスクのプログラムの中の実行時間を制御し
たい開始部分に、プロセッサ11がさしかかると、実行
目標レジスタ41の値をLPモードカウンタスタック4
2にプッシュする動作を行うものとする。
In the second embodiment, similarly to the embodiment of FIG. 1, when the processor 11 reaches a start portion of the program of each task where the execution time is to be controlled, the value of the execution target register 41 is changed to the LP mode counter. Stack 4
2 is performed.

【0100】例えば、プロセッサ11内に、PUSHを
制御する命令、PTIM命令が実装されている場合に
は、実行時間を制御したい開始部分、例えばタスクの開
始部分に、以下の命令が実装される。
For example, when the processor 11 has a PUSH control instruction and a PTIM instruction, the following instructions are implemented in a start portion for which execution time is to be controlled, for example, a task start portion.

【0101】PTIM 3 (第3実行目標レジスタの値を、第3LPモードカウン
タースタックにプッシュする。)
PTIM 3 (Push the value of the third execution target register to the third LP mode counter stack.)

【0102】LPモードカウンタスタック42は、最大
値以外の値であるとデクリメントするため、デクリメン
トしながら実行時間を測定し始めることになる。
Since the LP mode counter stack 42 decrements to a value other than the maximum value, it starts measuring the execution time while decrementing.

【0103】一方、タスクの実行が終了し、割込みから
の復帰命令を実行するが、その直前に、タスクの実行終
了を知らせる命令を行う。
On the other hand, when the execution of the task is completed and an instruction to return from the interrupt is executed, immediately before that, an instruction to notify the end of the execution of the task is issued.

【0104】例えば、その命令をFTASK命令とする
と、プロセッサ11はフリップフロップ46をセットす
る。このセットする意味は、LPモードカウンタスタッ
ク42のトップの値がゼロ以外の場合には、信号45a
がHIGHレベルになっているため、信号47aをHI
GHレベルにし、このHIGHレベルに応じて、プロセ
ッサ11へのクロック供給を消費電力コントロールブロ
ック回路31がコントロールするものとする。
For example, when the instruction is an FTASK instruction, the processor 11 sets the flip-flop 46. This setting means that if the value at the top of the LP mode counter stack 42 is not zero, the signal 45a
Is at the HIGH level, the signal 47a is set to the HI level.
GH level, and the power consumption control block circuit 31 controls the clock supply to the processor 11 according to the HIGH level.

【0105】第1LPモードカウンタの値が0になる
と、信号45aがゼロになり、フリップフロップ46を
ゼロにすると共に、プロセッサ11にクロックが供給さ
れるコントロールがなされる。
When the value of the first LP mode counter becomes 0, the signal 45a becomes zero, the flip-flop 46 is made zero, and control for supplying a clock to the processor 11 is performed.

【0106】また、復帰命令時には、LPモードカウン
タ値がPOPされるものとする。
At the time of the return instruction, the LP mode counter value is POP.

【0107】この第2の実施形態では、第1の実施形態
と異なり、実行時間を測定するのは、実行時間タイマカ
ウンタではなく、LPモードカウンタスタック42であ
るため、実行時間タイマーカウンタは必要ない。また、
LPモードカウンタスタック42には、実行目標レジス
タ41の値がロードされるため、第1の実施形態の減算
器27も必要なくなる。
In the second embodiment, unlike the first embodiment, since the execution time is measured not by the execution time timer counter but by the LP mode counter stack 42, the execution time timer counter is not required. . Also,
Since the value of the execution target register 41 is loaded into the LP mode counter stack 42, the subtractor 27 of the first embodiment is not required.

【0108】また、LPモードカウンタスタック42は
スタック構成になっているため、同じタスクのネスト実
行にも完全に対応できる特徴を持っている。
Further, since the LP mode counter stack 42 has a stack configuration, it has a feature that it can completely cope with the nest execution of the same task.

【0109】また、下層レベルのカウンタ値がゼロすな
わち、先に実行されているタスクの目標実行時間が過ぎ
た場合に、後でネスト処理で実行されているタスクがI
DLE状態を作ることはなく、第1の実施形態よりも目
標時間に対しての精度を高めることが可能である。
When the counter value at the lower level is zero, that is, when the target execution time of the previously executed task has passed, the task executed later by the nesting process is set to I
The DLE state is not created, and the accuracy with respect to the target time can be improved as compared with the first embodiment.

【0110】本発明の第1実施形態を用いた図8と第2
実施形態を用いた図9を用いて、この効果を説明する。
FIGS. 8A and 8B using the first embodiment of the present invention and FIGS.
This effect will be described with reference to FIG. 9 using the embodiment.

【0111】図8では、タスクの目標時間が5Tにもか
かわらず、より優先順位の高いタスク2が入り、目標時
間が6Tであり、それが終了するまでタスク1の実行が
待たされるため、タスク1に関しては、目標5T時間に
対して、10T時間処理するのに必要になっており目標
時間とのずれが大きい。
In FIG. 8, although the target time of the task is 5T, the task 2 with a higher priority enters and the target time is 6T, and the execution of the task 1 is waited until the task is completed. Regarding 1, it is necessary to process the target 5T time for 10T time, and the deviation from the target time is large.

【0112】一方、この第2実施形態では、タスク1の
5T時間後に、タスク2の待ち状態をクリアする機能が
働くため、タスク1の目標実行時間5Tに対して8Tで
終了し、目標時間とのずれが小さくなっている。
On the other hand, in the second embodiment, since the function of clearing the wait state of task 2 is activated after 5T time of task 1, the task is completed at 8T with respect to the target execution time of 5T of task 1, and the target time is set at 8T. Is smaller.

【0113】下層レベルのカウンタ値がゼロすなわち、
先に実行されているタスクの目標実行時間が過ぎた場合
に、後でネスト処理で実行されているタスクがIDLE
状態を作ることはなく、第1の実施形態よりも目標時間
に対しての精度を高めることが可能である。
The lower level counter value is zero, ie,
If the target execution time of the task executed earlier has passed, the task executed later in the nesting process will be
There is no need to create a state, and it is possible to improve the accuracy with respect to the target time as compared with the first embodiment.

【0114】なお、第1、第2実施形態で示した実行目
標レジスタは、実行目標を格納しておく記憶要素であ
り、レジスタ、レジスタファイル、メモリ等の記憶素子
であれば本発明は実施可能である。
The execution target register shown in the first and second embodiments is a storage element for storing the execution target, and the present invention can be implemented as long as the storage element is a register, a register file, a memory, or the like. It is.

【0115】[0115]

【発明の効果】以上説明したように、この発明では、プ
ロセッサ内にプログラム毎の実行目標値を設定するため
の記憶装置と、プログラムの実行時間を同時に測定する
カウンタ手段と、プログラムの実行時間が、実行目標値
に対して少ない場合には、実行目標時間になるまで、プ
ロセッサのクロックの供給を止める手段と、を備えてい
るため、プログラム毎に目標実行時間を制御することが
できる。またプログラム毎の実行目標値を設定するため
の記憶装置を書換えることで、プログラム毎の実行時間
と消費電力をコントロールする手段をもつため、プログ
ラム毎に実行時間を制御し、遅く走っても良いプログラ
ムに対してはより低消費電力で走行させると共に、制限
時間内に処理する必要のある優先順位の高いプログラム
や、より早いレスポンスを期待するプログラムに対して
は、消費電力を犠牲にしても速く走らせることができる
コントロール手段を提供することができる。
As described above, according to the present invention, the storage device for setting the execution target value for each program in the processor, the counter means for simultaneously measuring the execution time of the program, the execution time of the program, Means for stopping the supply of the clock of the processor until the target execution time is reached when the target execution time is less than the target execution time. Therefore, the target execution time can be controlled for each program. In addition, by rewriting the storage device for setting the execution target value for each program, there is a means for controlling the execution time and power consumption for each program. For programs that run at lower power consumption, and for programs with higher priorities that need to be processed within the time limit, and for programs that expect faster response, faster Control means that can be run can be provided.

【0116】また、この発明では、実行目標値に達した
かどうかを測定するカウンタスタック装置を持つため、
同一プログラムがネスト処理されている場合にも、プロ
グラム毎の実行時間と消費電力をコントロールすること
が可能である。また、下層レベルのカウンタ値が実行目
標時間になった場合には、より上層レベルのカウンタを
実行目標時間に達したことを意味する値に設定する機能
を備えるため、後に実行されたプログラムが実行目標値
に達していなくプロセッサへのクロック供給を停止して
おり、先行して実行されたプログラムが、実行目標値に
達した場合でも、プロセッサにクロックの供給を開始さ
せることが可能であるため、ネスト処理されたプログラ
ムに対しても、実行目標値に対してより正確な時間で実
行させることが可能となる。
Further, according to the present invention, since the counter stack device for measuring whether the execution target value has been reached is provided,
Even when the same program is nested, it is possible to control the execution time and power consumption of each program. In addition, when the lower-level counter value reaches the target execution time, a function for setting the higher-level counter to a value indicating that the target execution time has been reached is provided. Since the clock supply to the processor has been stopped because the target value has not been reached and the previously executed program has reached the execution target value, it is possible to cause the processor to start supplying the clock, Even for the nested program, it is possible to execute the program in a more accurate time with respect to the execution target value.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1の実施形態となるプロセッサのシ
ステム構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a system configuration of a processor according to a first embodiment of the present invention.

【図2】本発明の第2の実施形態となるプロセッサのシ
ステム構成を示すブロック図である。
FIG. 2 is a block diagram illustrating a system configuration of a processor according to a second embodiment of the present invention.

【図3】プロセッサが低消費電力動作を行わない通常の
タスク動作を示す図である。
FIG. 3 is a diagram illustrating a normal task operation in which a processor does not perform a low power consumption operation.

【図4】従来方式のタスク待ち時間の場合に、プロセッ
サのクロック供給を止めて、IDLE状態にする方式の
動作を説明する図である。
FIG. 4 is a diagram for explaining the operation of the conventional system in which the clock supply of the processor is stopped and the system enters the IDLE state in the case of the task waiting time.

【図5】図4に示す従来方式にプラスして、動作周波数
を通常の1/2にした場合の動作を説明する図である。
FIG. 5 is a diagram for explaining an operation when the operating frequency is set to 通常 of the normal frequency in addition to the conventional method shown in FIG. 4;

【図6】この発明の第1の実施形態におけるプロセッサ
の動作を説明する図である。
FIG. 6 is a diagram illustrating the operation of the processor according to the first embodiment of the present invention.

【図7】この発明の第1の実施形態におけるプロセッサ
の動作を説明する図である。
FIG. 7 is a diagram illustrating the operation of the processor according to the first embodiment of the present invention.

【図8】この発明の第1の実施形態におけるプロセッサ
の動作を説明する図である。
FIG. 8 is a diagram illustrating the operation of the processor according to the first embodiment of the present invention.

【図9】この発明の第1の実施形態におけるプロセッサ
の動作を説明する図である。
FIG. 9 is a diagram illustrating the operation of the processor according to the first embodiment of the present invention.

【符号の説明】[Explanation of symbols]

11 プロセッサ 13 割込み発生器 14 クロック発生器 15 アンド回路 21 実行時間タイマーカウンタ 23 実行目標レジスタ 27 減算器 28 LPモードカウンタ 31 消費電力コントロールブロック回路 Reference Signs List 11 Processor 13 Interrupt generator 14 Clock generator 15 AND circuit 21 Execution time timer counter 23 Execution target register 27 Subtractor 28 LP mode counter 31 Power consumption control block circuit

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 プログラムを実行するプロセッサと、プ
ログラム毎の実行目標値を設定するための記憶装置と、
プログラムの実行時間を測定するカウンタ手段と、プロ
グラムの実行時間が実行目標値に対して少ない場合に
は、実行目標時間になるまでプロセッサのクロックの供
給を止める手段と、を備え、前記プログラム毎の実行目
標値を設定するための記憶装置を書換えることで、プロ
グラム毎の実行時間と消費電力を制御することを特徴と
する低消費電力プロセッサ。
1. A processor for executing a program, a storage device for setting an execution target value for each program,
A counter for measuring the execution time of the program; and a means for stopping the supply of the clock of the processor until the execution time of the program is less than the execution target value. A low power consumption processor characterized in that execution time and power consumption of each program are controlled by rewriting a storage device for setting an execution target value.
【請求項2】 プログラムを実行するプロセッサと、プ
ロセッサからリセット、カウントイネーブルできプログ
ラムの実行時間を計測するための複数のタイマーカウン
タ装置、プログラム毎の実行時間の目標値を格納する複
数の記憶装置と、実行目標値と実行時間を比較する演算
器と、演算結果を格納するウェイト用カウンタ装置と、
前記ウェイト用カウンタ装置の出力信号に基づきプロセ
ッサへのクロック供給をコントロールする制御装置と、
を備えることを特徴としている低消費電力プロセッサ。
2. A processor for executing a program, a plurality of timer counter devices capable of resetting and counting enable from the processor for measuring the execution time of the program, and a plurality of storage devices for storing a target value of the execution time for each program. An arithmetic unit for comparing an execution target value and an execution time, a weight counter device for storing an operation result,
A control device for controlling clock supply to a processor based on an output signal of the wait counter device,
A low-power processor comprising:
【請求項3】 プロセッサの命令によりプログラムの所
望の位置にて、実行時間を測定する前記タイマーカウン
タをリセットするとともに、カウンタをイネーブルにす
る手段と、プログラムの命令によりプログラムの所望の
位置にて、前記演算装置で実行目標時間と実行時間の差
を演算し、その値を前記ウェイト用カウンタ装置に格納
する手段と、前記ウェイト用カウンタ装置の値が1以上
の場合に、ウェイト用カウンタ装置をクロックに同期し
てデクリメントする手段と、ウェイト用カウンタ値が1
以上の場合に、プロセッサへのクロック供給を停止する
制御手段と、を備えることを特徴としている請求項2に
記載の低消費電力プロセッサ。
3. A means for resetting the timer counter for measuring the execution time at a desired position of the program according to an instruction of the processor and enabling the counter, and at a desired position of the program according to the instruction of the program. Means for calculating a difference between an execution target time and an execution time by the arithmetic unit, and storing the value in the wait counter device; and, when the value of the wait counter device is 1 or more, the wait counter device is clocked. Means for decrementing in synchronization with
3. The low power consumption processor according to claim 2, further comprising control means for stopping clock supply to the processor in the above case.
【請求項4】 プログラムを実行するプロセッサと、プ
ログラムの実行時間の目標値を格納する複数の記憶装置
と、実行時間の目標値と接続され、プロセッサから実行
時間の目標値をプッシュする手段を備えるカウンタスタ
ック装置と、前記カウンタスタックからのステータス出
力信号からプロセッサへのクロック供給を制御する手段
と、を備え、前記カウンタスタック装置は、各レベルの
カウンタを同時に動作させるカウント機能を持ち、下層
レベルのカウンタ値が実行目標時間になった場合に、上
層レベルのカウンタを実行目標時間に達したことを意味
する値に設定する機能を有し、前記カウンタスタック装
置の最上位のレベルのカウンタが実行目標時間に達した
場合には、そのステータス信号を出力することを特徴と
する低消費電力プロセッサ。
4. A processor for executing a program, a plurality of storage devices for storing a target value of the execution time of the program, and a means connected to the target value of the execution time and for pushing the target value of the execution time from the processor. A counter stack device; and means for controlling clock supply to a processor from a status output signal from the counter stack. The counter stack device has a counting function for simultaneously operating counters of each level, and has a lower level. When the counter value reaches the execution target time, the counter has a function of setting the upper level counter to a value indicating that the execution target time has been reached. Output a status signal when the time has expired. Sessa.
JP2001166735A 2001-06-01 2001-06-01 Low power consumption processor Pending JP2002358139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001166735A JP2002358139A (en) 2001-06-01 2001-06-01 Low power consumption processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001166735A JP2002358139A (en) 2001-06-01 2001-06-01 Low power consumption processor

Publications (1)

Publication Number Publication Date
JP2002358139A true JP2002358139A (en) 2002-12-13

Family

ID=19009231

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001166735A Pending JP2002358139A (en) 2001-06-01 2001-06-01 Low power consumption processor

Country Status (1)

Country Link
JP (1) JP2002358139A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7281152B2 (en) 2003-03-27 2007-10-09 Kabushiki Kaisha Toshiba Processor, control device for a processor, clock frequency determining method and source voltage controlling method of a processor
JP2008165815A (en) * 2003-02-24 2008-07-17 Internatl Business Mach Corp <Ibm> Machine code builder derived power consumption reduction
WO2008148838A1 (en) * 2007-06-07 2008-12-11 Fachhochschule Nordhausen Processor, and method for controlling the same

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008165815A (en) * 2003-02-24 2008-07-17 Internatl Business Mach Corp <Ibm> Machine code builder derived power consumption reduction
JP4496255B2 (en) * 2003-02-24 2010-07-07 インターナショナル・ビジネス・マシーンズ・コーポレーション Reduced power consumption gained by machine code builder
US7281152B2 (en) 2003-03-27 2007-10-09 Kabushiki Kaisha Toshiba Processor, control device for a processor, clock frequency determining method and source voltage controlling method of a processor
US7644298B2 (en) 2003-03-27 2010-01-05 Kabushiki Kaisha Toshiba Processor, control device for a processor, clock frequency determining method and source voltage controlling method of a processor
US7644297B2 (en) 2003-03-27 2010-01-05 Kabushiki Kaisha Toshiba Processor, control device for a processor, clock frequency determining method and source voltage controlling method of a processor
WO2008148838A1 (en) * 2007-06-07 2008-12-11 Fachhochschule Nordhausen Processor, and method for controlling the same

Similar Documents

Publication Publication Date Title
TWI477945B (en) Method for controlling a turbo mode frequency of a processor, and processor capable of controlling a turbo mode frequency thereof
US7389440B2 (en) Method, system, and apparatus for improving multi-core processor performance
TWI437434B (en) Direct memory access controller
JP2762670B2 (en) Data processing device
US7373269B2 (en) Processor power consumption control
CN1866230B (en) Memory arbitrator, processor system and memory arbitrating method
EP3367212A1 (en) Hardware automatic performance state transitions in system on processor sleep and wake events
JP2009093665A (en) Apparatus and method for multi-threaded processors performance control
JP2000047872A (en) Microprocessor equipped with low-power-consumption operating function
JP3597282B2 (en) Data processing apparatus and method
US5774735A (en) System resource enable method with wake-up feature
JP3224473B2 (en) Electronic device and power supply control method in the device
JPH07281782A (en) Clock control circuit
JP2002358139A (en) Low power consumption processor
JP2001034530A (en) Microcomputer and memory access control method
JP5783348B2 (en) Control device, control program, and image forming apparatus
CN101661406A (en) Processing unit dispatching device and method
US11281473B2 (en) Dual wakeup interrupt controllers
JP2012084123A (en) Memory control device and memory control method
JP2009059276A (en) Data processing apparatus and program
JP4738891B2 (en) Data processing apparatus and polling loop management method thereof
JP7087752B2 (en) Electronic device
JPH0876875A (en) Microcomputer application system
JPH0883133A (en) Computer system and clock control method for the same
JP2002278753A (en) Data processing system