JP2007058331A - Processor system and multithread processor - Google Patents
Processor system and multithread processor Download PDFInfo
- Publication number
- JP2007058331A JP2007058331A JP2005240195A JP2005240195A JP2007058331A JP 2007058331 A JP2007058331 A JP 2007058331A JP 2005240195 A JP2005240195 A JP 2005240195A JP 2005240195 A JP2005240195 A JP 2005240195A JP 2007058331 A JP2007058331 A JP 2007058331A
- Authority
- JP
- Japan
- Prior art keywords
- thread
- processor
- operating frequency
- time
- control signal
- 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.)
- Granted
Links
- 230000006870 function Effects 0.000 description 10
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 9
- 238000000034 method Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
- G06F9/3836—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
- G06F9/3851—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution from multiple instruction streams, e.g. multistreaming
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
Abstract
Description
本発明は、プロセッサの動作周波数が変化した時にも特定のスレッドに対して処理性能を一定にするマルチスレッドプロセッサにおけるスレッドスケジュール方法に関する。 The present invention relates to a thread scheduling method in a multi-thread processor that makes processing performance constant for a specific thread even when the operating frequency of the processor changes.
従来、プロセッサシステムにおいて、システムに接続された装置が一定周期でデータの送受信を行うならば、データの取りこぼしや供給不足を起こさないためにシステムの処理性能が一定であることを保証する必要がある(例えば、特許文献1参照)。 Conventionally, in a processor system, if a device connected to the system transmits and receives data at a constant cycle, it is necessary to guarantee that the processing performance of the system is constant in order to prevent data loss or supply shortage. (For example, refer to Patent Document 1).
例えば、ソフトウェアによりシリアルデータ通信を行うならば、データ転送時の時間軸のずれによるデータ転送誤りを起こさないように、プロセッサシステムの処理速度が一定であることを保証しなくてはならない。 For example, if serial data communication is performed by software, it must be ensured that the processing speed of the processor system is constant so as not to cause a data transfer error due to a time axis shift during data transfer.
この処理性能が一定であることを保証する際には、タイマを用いて一定周期の割り込みを発生させる方法が一般に用いられている。また、一部のプロセッサでは、キャッシュや分岐予測機構のようなプロセッサの処理性能を変動させる機構をプロセッサから排除することで処理性能が一定であることを保証している。例えば、Ubicom社のIP3023プロセッサは、キヤッシュや分岐予測機構を搭載しないことで処理性能が一定であることを保証している。尚、プロセッサの処理性能を変動させる機構は、多くの場合、プロセッサの性能を高めるが、時にプロセッサの性能を低下させる可能性があるからである。
しかしながら、これらのプロセッサシステムでは、処理性能を一定にすることが可能であるが、制約もある。例えば、タイマを用いて一定周期の割り込みを発生させる方法では、割り込み起動及び終了にかかるサイクルによるオーバーヘッドのために、処理の周期が非常に短い用途に用いることができない。また、処理性能を変動させる機構をプロセッサから排除する方法では、プロセッサのクロック周波数によって処理性能が変化するため、プロセッサのクロック周波数を低くすることで消費電力を低減させることができない。 However, in these processor systems, it is possible to make the processing performance constant, but there are limitations. For example, a method of generating an interrupt with a fixed period using a timer cannot be used for an application with a very short processing period due to an overhead caused by a cycle for starting and ending interrupts. Further, in the method of eliminating the mechanism for changing the processing performance from the processor, the processing performance changes depending on the clock frequency of the processor. Therefore, the power consumption cannot be reduced by lowering the clock frequency of the processor.
本発明は、上記課題を解決するためになされたもので、処理の周期が非常に短い場合やプロセッサの消費電力を低減するために、プロセッサのクロック周波数を低下させた場合でも処理性能を一定にすることを目的とする。 The present invention has been made in order to solve the above-described problems. Even when the processing cycle is very short or when the clock frequency of the processor is lowered in order to reduce the power consumption of the processor, the processing performance is kept constant. The purpose is to do.
本発明は、クロック生成回路と、マルチスレッドプロセッサとで構成されるプロセッサシステムであって、前記クロック生成回路は、前記マルチスレッドプロセッサからクロック周波数制御信号を入力し、前記クロック周波数制御信号に基づいて周波数が変化するプロセッサ動作周波数を生成する生成手段を有し、前記マルチスレッドプロセッサは、前記クロック周波数制御信号に基づいて、1つ以上のスレッドをプロセッサ動作周波数によらず、一定周期でスケジュールするスケジュール手段を有することを特徴とする。 The present invention is a processor system including a clock generation circuit and a multi-thread processor, wherein the clock generation circuit inputs a clock frequency control signal from the multi-thread processor, and based on the clock frequency control signal A scheduling unit configured to generate one or more threads at a constant period regardless of the processor operating frequency based on the clock frequency control signal; It has the means.
また、本発明は、クロック生成回路へクロック周波数制御信号を出力し、該クロック生成回路で生成されたプロセッサ動作周波数を入力するマルチスレッドプロセッサであって、前記クロック周波数制御信号に基づいて、少なくとも1つのスレッドを前記プロセッサ動作周波数によらず、一定周期でスケジュールするスケジュール手段を有することを特徴とする。 The present invention is also a multi-thread processor that outputs a clock frequency control signal to a clock generation circuit and inputs a processor operating frequency generated by the clock generation circuit, based on the clock frequency control signal. There is provided a scheduling means for scheduling one thread at a constant cycle regardless of the processor operating frequency.
本発明によれば、プロセッサの動作周波数をスレッドスケジューラに入力することにより、処理性能を一定にする必要があるスレッドがスケジュールされる周期を一定にすることができる。これにより、処理の周期が非常に短い場合やプロセッサの消費電力を低減するために、プロセッサのクロック周波数を低下させた場合でも処理性能を一定にすることができる。 According to the present invention, by inputting the operating frequency of the processor to the thread scheduler, it is possible to make constant the period in which threads that require constant processing performance are scheduled. As a result, the processing performance can be made constant even when the processing cycle is very short or when the clock frequency of the processor is lowered in order to reduce the power consumption of the processor.
以下、図面を参照しながら発明を実施するための最良の形態について詳細に説明する。 The best mode for carrying out the invention will be described below in detail with reference to the drawings.
図1は、本実施形態におけるマルチスレッドプロセッサシステムの構成の一例を示す図である。図1に示すように、マルチスレッドプロセッサシステムは、クロック生成回路(CLKGEN)100とマルチスレッドプロセッサ101とから構成されている。このクロック生成回路100とマルチスレッドプロセッサ101とは、少なくともプロセッサクロック(CLK)120と周波数制御信号(FREQCTRL)121とで接続されている。
FIG. 1 is a diagram illustrating an example of the configuration of a multi-thread processor system according to the present embodiment. As shown in FIG. 1, the multithread processor system includes a clock generation circuit (CLKGEN) 100 and a
また、マルチスレッドプロセッサ101は、プロセッサクロック120に同期して動作するため、マルチスレッドプロセッサ101の動作周波数はプロセッサクロック120の周波数に比例する。ここで、周波数制御信号121はプロセッサクロック120の周波数を変化させるための信号である。以下の説明では、周波数制御信号121が「0」のとき、プロセッサクロック120の周波数が100MHz、また「1」のとき、プロセッサクロック120の周波数が200MHzであるとして、本実施形態における動作を説明する。
Further, since the
ここで、マルチスレッドプロセッサ101はスレッドスケジューラ(SCHED)110と、データパス116と、制御回路(CTRL)115とから構成されている。このデータパス116には、少なくとも2つのプログラムカウンタと、レジスタファイル(RF)112と、数値演算ユニット(ALU)113と、メモリ(MEM)114とが含まれる。尚、図1では、プログラムカウンタはPC#0(111a)〜PC#3(111d)の4つとしている。
The
次に、図2を用いて、マルチスレッドプロセッサ101における各ブロックの動作及び代表的な信号の接続関係について説明する。
Next, the operation of each block in the
図2において、スレッドスケジューラ110は、制御回路115が出力する周波数制御信号121に基づいて実行させるスレッド番号(thread #)201を選択し、データパス116に出力する。これにより、データパス116は、まず実行するスレッド番号201に対応するプログラムカウンタをプログラムカウンタ111a〜111dから選択する。そして、データバス116は選択したプログラムカウンタと実行するスレッド番号201とを用いて、命令フェッチ、命令デコード、実行、オペランドフェッチ、結果の格納を、レジスタファイル112、数値演算ユニット113、メモリ114を用いて行う。
In FIG. 2, the
上述した命令実行の結果は、レジスタファイル112、メモリ114に格納され、また条件分岐を行うためのフラグ、制御レジスタへの書き込み結果については、信号204を用いて制御回路115に出力する。この信号204により制御回路115はデータパスの出力結果を受け取り、スレッドスケジューラ110、データパス116への各種制御信号を生成する。そして、生成された制御信号は、スレッドスケジューラ110への制御信号202、データパス116への制御信号203として出力される。
The result of the instruction execution described above is stored in the
次に、図3を用いて、マルチスレッドプロセッサ101の動作周波数が変化しても特定のスレッドの処理性能を一定に保つことができるスレッドスケジューラ110の構成及び動作について説明する。尚、図3では、説明を簡単にするため、プロセッサの動作周波数を200MHzと100MHzの2段階としている。
Next, the configuration and operation of the
図3は、マルチスレッドプロセッサ101におけるスレッドスケジューラ110の構成の一例を示す図である。図3に示すように、スレッドスケジューラ110はプロセッサの動作周波数毎に特定のスレッドの処理性能を一定に制御するために、2つのハードリアルタイムスレッドテーブル220a、220bを備えている。そして、ハードリアルタイムスレッドテーブル220a、220bには、決められたサイクル数毎にスケジュールする必要があるスレッド(ハードリアルタイムスレッド)が保持されている。
FIG. 3 is a diagram illustrating an example of the configuration of the
これに対して、ノンリアルタイムスレッドテーブル221には、決められたサイクル数毎にスケジュールする必要がないスレッド(性能を保証する必要がないスレッド)が保持されている。 On the other hand, the non-real-time thread table 221 holds threads that do not need to be scheduled every predetermined number of cycles (threads that do not need to guarantee performance).
ここで、スレッドスケジューラ110は、プロセッサの動作周波数に基づいて、ハードリアルタイムスレッドテーブル220a、220bかノンリアルタイムスレッドテーブル221の何れかに記録されているスレッドを選択する。具体的には、制御回路115から出力される周波数制御信号121に応じて、マルチプレクサ147がハードリアルタイムスレッドテーブル220a又は220bに記憶されているスレッド223a又は223bの何れかを選択する。また同時に、マルチプレクサ148がハードリアルタイムスレッドテーブル220a又は220bに記憶されているスレッドスケジュール情報224a又は224bの何れかを選択する。そして、選択されたスレッドスケジュール情報に基づいてマルチプレクサ244がハードリアルタイムスレッドテーブル220a、220bかノンリアルタイムスレッドテーブル221の何れかに記録されているスレッドをスレッド番号201として出力する。
Here, the
[動作周波数が一定]
まず、動作周波数が200MHzに固定されている、即ち周波数制御信号121が常に「1」の場合に、スレッドスケジューラ110が実行するスレッドスケジュールの方法について説明する。この場合は、従来のリアルタイム性を保証できるマルチスレッドプロセッサと同じ動作である。即ち、周波数制御信号121が常に「1」であるので、マルチプレクサ147、148でハードリアルタイムスレッドテーブル220bのみが参照され、ハードリアルタイムスレッドテーブル220aは参照されない。従って、リアルタイム性を保証できるマルチスレッドプロセッサでは、ハードリアルタイムスレッドテーブル220a、マルチプレクサ147、148を省略することができる。
[Constant operating frequency]
First, a thread scheduling method executed by the
ここでハードリアルタイムスレッドテーブルポインタ(HRTP)242は、サイクル毎にインクリメンタ247によって「1」ずつ増加し、ハードリアルタイムスレッドテーブル220bの要素はサイクル毎に上から順に読み出される。図3に示す例では、ハードリアルタイムスレッドテーブル220bは8個の要素を保持している。即ち、8サイクル分のスレッドのスケジュールを保持している。
Here, the hard real-time thread table pointer (HRTP) 242 is incremented by “1” by the
また、ハードリアルタイムスレッドテーブル220bの各要素は、ハードリアルタイムビット224bとスレッドID223bとからなる。ここで、ハードリアルタイムビット224bが「1」の場合には、スレッドID223bに示されるスレッドをスケジュールすることを示している。一方、ハードリアルタイムビット224bが「0」の場合には、ノンリアルタイムスレッドテーブル221に記録されているスレッドを順に実行する。
Each element of the hard real-time thread table 220b includes a hard real-
即ち、この例では、1サイクル目はスレッド0を、2サイクル目はスレッド1を実行し、3サイクル目〜5サイクル目はノンリアルタイムスレッドテーブル221のスレッドを実行する。そして、6サイクル目はスレッド1を実行し、7サイクル目、8サイクル目はノンリアルタイムスレッドテーブル221のスレッドを実行する。
That is, in this example, the
このように、ハードリアルタイムスレッドテーブル220bは8サイクル分のスレッドスケジュールを保持しているので、9サイクル目は1サイクル目と同じになる。これ以降1〜8サイクル目のハードリアルタイムスレッドテーブル220bの要素が繰り返し順に読み出される。 Thus, since the hard real-time thread table 220b holds the thread schedule for 8 cycles, the 9th cycle is the same as the 1st cycle. Thereafter, the elements of the hard real-time thread table 220b in the first to eighth cycles are read in order of repetition.
また、ノンリアルタイムスレッドテーブル221に記録されているスレッドは、ハードリアルタイムビット224bが「0」の場合にのみ順に実行される。即ち、ハードリアルタイムビット224bが「0」で、ノンリアルタイムスレッドテーブルポインタ243が指すスレッドIDをノンリアルタイムスレッドテーブル224がマルチプレクサ244によって選択され、スレッド番号201として出力される。また同時に、ノンリアルタイムスレッドテーブルポインタ243は、マルチプレクサ249で選択されたインクリメンタ248によってインクリメントされる。
The threads recorded in the non-real-time thread table 221 are executed in order only when the hard real-
他方、ハードリアルタイムビット224bが「1」の場合、ハードリアルタイムスレッドテーブル220bが出力するスレッドIDがマルチプレクサ244によって選択され、スレッド番号201として出力される。尚、ノンリアルタイムスレッドテーブルポインタ243は更新しない。
On the other hand, when the hard real-
このように、プロセッサの動作周波数が一定である時は、ハードリアルタイムスレッドが決められたサイクル毎にスケジュールされるため、特定のスレッドの処理性能を一定に保つことができる。 In this way, when the operating frequency of the processor is constant, the hard real-time thread is scheduled for each determined cycle, so that the processing performance of a specific thread can be kept constant.
[動作周波数が変化]
次に、プロセッサの動作周波数が1/2(100MHz)に変化した場合に、マルチスレッドプロセッサ101におけるスレッドスケジューラ110が実行するスレッドスケジュールの方法について説明する。
[Change in operating frequency]
Next, a thread scheduling method executed by the
尚、動作周波数によらず処理性能が一定である必要があるスレッドはスレッド0とする。この場合、周波数制御信号121が「0」になり、マルチプレクサ147及び148によってハードリアルタイムスレッドテーブル220aが参照される。
A thread whose processing performance needs to be constant regardless of the operating frequency is assumed to be
また、プロセッサの動作周波数が1/2であるため、ハードリアルタイムスレッドテーブル220aに含まれるスレッド0の割合をハードリアルタイムスレッドテーブル220bの2倍にしている。
Further, since the operating frequency of the processor is ½, the ratio of the
また、スレッド0がスケジュールされる位相がプロセッサの動作周波数によらず同じになるように、元々スケジュールされる1サイクル目の他に要素数8×(1/2)=4サイクルを加えた5サイクル目にスレッド0がスケジュールされるようにする。
In addition to the first cycle originally scheduled, 5 cycles including the number of elements 8 × (1/2) = 4 cycles so that the phase in which
ここで、プロセッサの動作周波数が1/2に変化したことにより、ハードリアルタイムスレッドテーブル220aを読み出す周期は2倍となる。しかし、処理性能が一定であることが要求されるスレッド0は、ハードリアルタイムスレッドテーブル220aに2倍で含まれているため、結局スレッド0は同じ周期でスケジュールされる。
Here, since the operating frequency of the processor has changed to ½, the cycle for reading the hard real-time thread table 220a is doubled. However, since the
このように、本実施形態では、プロセッサの動作周波数の切り替えと共にハードリアルタイムスレッドテーブルを切り替えることで、プロセッサの動作周波数が変化した場合にも特定のスレッドの処理性能を一定に保つことができる。この結果、図4に示すように、プロセッサの動作周波数を200MHzと100MHzで切り替えた場合に、従来例ではスレッド0のスケジュールされる周期が変化していたが、本実施形態ではスレッド0を常に40ns周期でスケジュールすることができる。即ち、一定の性能を保つことができる。
As described above, in this embodiment, by switching the hard real-time thread table together with switching of the processor operating frequency, the processing performance of a specific thread can be kept constant even when the processor operating frequency changes. As a result, as shown in FIG. 4, when the operating frequency of the processor is switched between 200 MHz and 100 MHz, the scheduled period of the
[他の実施形態]
次に、図面を参照しながら本発明に係る他の実施形態について詳細に説明する。
[Other Embodiments]
Next, another embodiment according to the present invention will be described in detail with reference to the drawings.
他の実施形態では、プロセッサの動作周波数が基準となる周波数のn倍になった場合、n回のうち1回は選択信号を有効にするが、n回のうちn−1回は選択信号を無効にする回路を備えるものである。 In another embodiment, if the operating frequency of the processor is n times the reference frequency, the selection signal is enabled once out of n times, but the selection signal is applied n-1 out of n times. A circuit for disabling is provided.
また、プロセッサの動作周波数が変化しても処理性能を一定にする必要があるスレッドは、この選択信号が「1」の時だけスケジュールするようにしている。これにより、特定のスレッドの処理性能を一定にすることを可能にしている。尚、説明を簡単にするため、プロセッサの動作周波数を2段階、最大のプロセッサ動作周波数は基準となるプロセッサの動作周波数の2倍とした場合を例に説明する。 A thread that needs to have a constant processing performance even if the operating frequency of the processor changes is scheduled only when the selection signal is “1”. As a result, the processing performance of a specific thread can be made constant. In order to simplify the description, an example will be described in which the operating frequency of the processor is two stages and the maximum processor operating frequency is twice the operating frequency of the reference processor.
他の実施形態におけるマルチスレッドプロセッサシステムの構成は、図1を用いて説明した本実施形態の構成と同様であり、その説明は省略する。 The configuration of the multi-thread processor system in the other embodiments is the same as the configuration of the present embodiment described with reference to FIG.
図5は、他の実施形態におけるスレッドスケジューラの構成の一例を示す図である。尚、図3に示す構成と同じ機能を有するものには同一の符号を付している。 FIG. 5 is a diagram illustrating an example of a configuration of a thread scheduler according to another embodiment. In addition, the same code | symbol is attached | subjected to what has the same function as the structure shown in FIG.
図5に示すように、スレッドスケジューラは、少なくともハードリアルタイムスレッドテーブル222と、ノンリアルタイムスレッドテーブル221と、スレッド選択信号生成回路240とで構成されている。ここで、スレッド選択信号生成回路240はプロセッサの動作周波数によらず一定サイクル数だけ選択信号を有効にする信号(TSEL OUT)141を生成する回路であり、図6を用いて更に詳述する。また、ハードリアルタイムスレッドテーブル222には、スレッドID223と、2つのスレッドの情報224、225とが保持されている。2つのスレッドは、決められたプロセッササイクル数毎にスケジュールする必要があるスレッド(ハードリアルタイムスレッド)と、プロセッサのクロック周波数によらず一定の処理性能が必要なスレッド(リアルタイムスレッド)である。
As shown in FIG. 5, the thread scheduler includes at least a hard real-time thread table 222, a non-real-time thread table 221, and a thread selection
図6は、スレッド選択信号生成回路240の構成の一例を示す図である。スレッド選択信号生成回路240は、周波数制御信号121が「1」の場合、サイクル数を計数するカウンタ262と、周波数制御信号121が「0」の場合、「1」を出力するゲート263及びインバータ264とで構成されている。
FIG. 6 is a diagram illustrating an example of the configuration of the thread selection
尚、図6に示す例では、周波数制御信号121が「0」の場合、8サイクルは選択信号141として有効を示す「1」を出力し、次の8サイクルは選択信号141として無効を示す「0」を出力するものとする。そのため、カウンタ262として、4ビットバイナリカウンタを用いてサイクル数の計数を行い、Q3を出力信号とする。
In the example shown in FIG. 6, when the
まず、周波数制御信号121が「0」(基準となるプロセッサの動作周波数)の場合に、スレッドスケジューラが実行するスレッドスケジュールの方法について説明する。この場合、スレッド選択信号生成回路240のインバータ264及びゲート263により選択信号141として、常に「1」が出力される。
First, a thread scheduling method executed by the thread scheduler when the
ここでハードリアルタイムスレッドテーブルポインタ(HRTP)242は、サイクル毎にインクリメンタ247によって「1」ずつ増加し、ハードリアルタイムスレッドテーブル222の要素はサイクル毎に上から順に読み出される。図5に示す例では、ハードリアルタイムスレッドテーブル222は8サイクル分のスレッドのスケジュールを保持しているため、保持されている要素は8個である。
Here, the hard real-time thread table pointer (HRTP) 242 is incremented by “1” by the
また、ハードリアルタイムスレッドテーブル222の要素は、ハードリアルタイムビット224とリアルタイムビット225とスレッドID223とからなる。ここで、ハードリアルタイムビット224は決められたプロセッササイクル数毎にスケジュールする必要があるスレッドであることを示している。また、リアルタイムビット225はプロセッサのクロック周波数によらず一定の処理性能が必要なスレッドであることを示している。
The elements of the hard real-time thread table 222 include a hard real-time bit 224, a real-time bit 225, and a
この例では、スレッド選択信号生成回路240が常に「1」を出力しているため、ハードリアルタイムビット224とリアルタイムビット225の何れかが「1」の場合、ハードリアルタイムスレッドテーブル222のスレッドが選択される。即ち、マルチプレクサ244への選択信号146が「1」の場合は、ポインタ242が指すハードリアルタイムスレッドテーブル222のスレッドIDで示されるスレッド144が選択され、スレッド番号201として出力される。同時にポインタ242はインクリメンタ247によってインクリメントされる。
In this example, since the thread selection
それ以外の場合(ハードリアルタイムビット224とリアルタイムビット225の両方が「0」の場合)は、ノンリアルタイムスレッドテーブル221のスレッドが選択される。即ち、マルチプレクサ244への選択信号146が「0」の場合は、ポインタ243が指すノンリアルタイムスレッドテーブル221のスレッドIDで示されるスレッド145が選択され、スレッド番号201として出力される。同時に、ポインタ243はインクリメンタ248によってインクリメントされる。
In other cases (when both the hard real-time bit 224 and the real-time bit 225 are “0”), the thread in the non-real-time thread table 221 is selected. That is, when the
次に、周波数制御信号121が「1」(最大のプロセッサ動作周波数)の場合に、スレッドスケジューラが実行するスレッドスケジュールの方法について説明する。この場合、最大のプロセッサ動作周波数が基準となるプロセッサ動作周波数の2倍であるので、スレッド選択信号生成回路240は2サイクルに1サイクルだけ選択信号を有効にする。
Next, a thread scheduling method executed by the thread scheduler when the
尚、この例では、ハードリアルタイムスレッドテーブル222の要素数が8であることから、8サイクルは選択信号141として有効を示す「1」を出力し、次の8サイクルは選択信号141として無効を示す「0」を出力する。これにより、16サイクルの中で、8サイクルだけ選択信号141を有効にすることができる。
In this example, since the number of elements in the hard real-time thread table 222 is 8, eight cycles are output as “1” indicating validity, and the next eight cycles are invalid as
また、選択信号141が「1」の場合は、周波数制御信号121が「0」(基準となるプロセッサ動作周波数)の場合と同じなので、選択信号141が「0」の場合のスレッドスケジュール方法について説明する。
Further, when the
まず、スレッド選択信号生成回路240が選択信号141として「0」を出力しているため、ハードリアルタイムビット224が「1」の場合にのみ、ハードリアルタイムスレッドテーブル222のスレッドが選択される。即ち、マルチプレクサ244への選択信号146が「1」の場合は、ポインタ242が指すハードリアルタイムスレッドテーブル222のスレッドIDで示されるスレッド144が選択され、スレッド番号201として出力される。同時にポインタ242はインクリメンタ247によってインクリメントされる。
First, since the thread selection
それ以外の場合(ハードリアルタイムビット224が「0」の場合)は、ノンリアルタイムスレッドテーブル221のスレッドが選択される。即ち、マルチプレクサ244への選択信号146が「0」の場合は、ポインタ243が指すノンリアルタイムスレッドテーブル221のスレッドIDで示されるスレッド145が選択され、スレッド番号201として出力される。同時に、ポインタ243はインクリメンタ248によってインクリメントされる。
In other cases (when the hard real-time bit 224 is “0”), a thread in the non-real-time thread table 221 is selected. That is, when the
図7は、他の実施形態におけるスレッドスケジュールのタイミングチャートを示す図である。周波数制御信号(FREQCTRL)121が「1」の場合、最初の8サイクルはポインタ(HRTP)242が指すテーブル222内のリアルタイムスレッドがスケジュールされる。しかし、次の8サイクルはリアルタイムスレッドがスケジュールされる周期を一定にするため、リアルタイムスレッドの代わりにノンリアルタイムスレッドがスケジュールされる(0→N)。また、周波数制御信号(FREQCTRL)121が「0」の場合は、常にテーブル222内のリアルタイムスレッドがスケジュールされる。 FIG. 7 is a diagram illustrating a timing chart of a thread schedule in another embodiment. When the frequency control signal (FREQCTRL) 121 is “1”, a real-time thread in the table 222 pointed to by the pointer (HRTP) 242 is scheduled for the first eight cycles. However, in the next 8 cycles, the non-real time thread is scheduled instead of the real time thread (0 → N) in order to make the period at which the real time thread is scheduled constant. When the frequency control signal (FREQCTRL) 121 is “0”, a real-time thread in the table 222 is always scheduled.
このように、プロセッサの動作周波数が基準となる周波数のn倍になった時に、n回のうち1回は選択信号を有効にする。しかし、n回のうちn−1回は選択信号を無効にする回路を設けることでプロセッサの動作周波数が変化した際にも特定のスレッドの処理性能を一定に保っている。この結果、図7に示すように、プロセッサの動作周波数によらず、スレッド0を一定の周期でスケジュールすることができる。即ち、一定の性能を保つことができる。
As described above, when the operating frequency of the processor becomes n times the reference frequency, the selection signal is validated once out of n times. However, by providing a circuit that disables the selection signal n-1 out of n times, the processing performance of a specific thread is kept constant even when the operating frequency of the processor changes. As a result, as shown in FIG. 7, the
尚、本発明は複数の機器(例えば、ホストコンピュータ,インターフェース機器,リーダ,プリンタなど)から構成されるシステムに適用しても、1つの機器からなる装置(例えば、複写機,ファクシミリ装置など)に適用しても良い。 Even if the present invention is applied to a system composed of a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), it is applied to an apparatus (for example, a copier, a facsimile machine, etc.) composed of a single device. It may be applied.
また、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記録媒体を、システム或いは装置に供給し、そのシステム或いは装置のコンピュータ(CPU若しくはMPU)が記録媒体に格納されたプログラムコードを読出し実行する。これによっても、本発明の目的が達成されることは言うまでもない。 In addition, a recording medium in which a program code of software for realizing the functions of the above-described embodiments is recorded is supplied to the system or apparatus, and the computer (CPU or MPU) of the system or apparatus stores the program code stored in the recording medium. Read and execute. It goes without saying that the object of the present invention can also be achieved by this.
この場合、記録媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記録媒体は本発明を構成することになる。 In this case, the program code itself read from the recording medium realizes the functions of the above-described embodiment, and the recording medium storing the program code constitutes the present invention.
このプログラムコードを供給するための記録媒体としては、例えばフロッピー(登録商標)ディスク,ハードディスク,光ディスク,光磁気ディスク,CD−ROM,CD−R,磁気テープ,不揮発性のメモリカード,ROMなどを用いることができる。 As a recording medium for supplying the program code, for example, a floppy (registered trademark) disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, or the like is used. be able to.
また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、次の場合も含まれることは言うまでもない。即ち、プログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部又は全部を行い、その処理により前述した実施形態の機能が実現される場合。 In addition, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also the following cases are included. That is, when the OS (operating system) running on the computer performs part or all of the actual processing based on the instruction of the program code, and the functions of the above-described embodiments are realized by the processing.
更に、記録媒体から読出されたプログラムコードがコンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込む。その後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部又は全部を行い、その処理により前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 Further, the program code read from the recording medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. After that, based on the instruction of the program code, the CPU of the function expansion board or function expansion unit performs part or all of the actual processing, and the function of the above-described embodiment is realized by the processing. Needless to say.
100 クロック生成回路(CLKGEN)
101 マルチスレッドプロセッサ
110 スレッドスケジューラ(SCHED)
115 制御回路(CTRL)
116 データパス
120 プロセッサクロック(CLK)
121 周波数制御信号(FREQCTRL)
220 ハードリアルタイムスレッドテーブル
221 ノンリアルタイムスレッドテーブル
222 ハードリアルタイムスレッドテーブル
223 スレッド
224 スレッドスケジュール情報
100 Clock generation circuit (CLKGEN)
101
115 Control circuit (CTRL)
121 Frequency control signal (FREQCTRL)
220 Hard real-time thread table 221 Non-real-time thread table 222 Hard real-time thread table 223 Thread 224 Thread schedule information
Claims (6)
前記クロック生成回路は、前記マルチスレッドプロセッサからクロック周波数制御信号を入力し、前記クロック周波数制御信号に基づいて周波数が変化するプロセッサ動作周波数を生成する生成手段を有し、
前記マルチスレッドプロセッサは、前記クロック周波数制御信号に基づいて、1つ以上のスレッドをプロセッサ動作周波数によらず、一定周期でスケジュールするスケジュール手段を有することを特徴とするプロセッサシステム。 A processor system including a clock generation circuit and a multi-thread processor,
The clock generation circuit includes a generation unit that receives a clock frequency control signal from the multi-thread processor and generates a processor operating frequency whose frequency changes based on the clock frequency control signal.
2. The processor system according to claim 1, wherein the multi-thread processor has scheduling means for scheduling one or more threads at a constant period regardless of the processor operating frequency based on the clock frequency control signal.
各スレッドスケジュールテーブルを前記クロック周波数制御信号により切り替えることで、1つ以上のスレッドをプロセッサ動作周波数によらず、一定周期でスケジュールすることを特徴とする請求項1記載のプロセッサシステム。 The scheduling means has two or more thread schedule tables that hold schedule timings of threads to be scheduled at a constant period,
2. The processor system according to claim 1, wherein each thread schedule table is switched by the clock frequency control signal to schedule one or more threads at a constant period regardless of the processor operating frequency.
前記クロック周波数制御信号に基づいて、少なくとも1つのスレッドを前記プロセッサ動作周波数によらず、一定周期でスケジュールするスケジュール手段を有することを特徴とするマルチスレッドプロセッサ。 A multi-thread processor that outputs a clock frequency control signal to a clock generation circuit and inputs a processor operating frequency generated by the clock generation circuit;
A multi-thread processor comprising scheduling means for scheduling at least one thread at a constant period regardless of the processor operating frequency based on the clock frequency control signal.
各スレッドスケジュールテーブルを前記クロック周波数制御信号により切り替えることで、1つ以上のスレッドをプロセッサ動作周波数によらず、一定周期でスケジュールすることを特徴とする請求項4記載のマルチスレッドプロセッサ。 The scheduling means has two or more thread schedule tables that hold schedule timings of threads to be scheduled at a constant period,
5. The multi-thread processor according to claim 4, wherein each thread schedule table is switched by the clock frequency control signal to schedule one or more threads at a constant period regardless of the processor operating frequency.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005240195A JP4574493B2 (en) | 2005-08-22 | 2005-08-22 | Processor system and multi-thread processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005240195A JP4574493B2 (en) | 2005-08-22 | 2005-08-22 | Processor system and multi-thread processor |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2007058331A true JP2007058331A (en) | 2007-03-08 |
JP2007058331A5 JP2007058331A5 (en) | 2008-09-04 |
JP4574493B2 JP4574493B2 (en) | 2010-11-04 |
Family
ID=37921815
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005240195A Expired - Fee Related JP4574493B2 (en) | 2005-08-22 | 2005-08-22 | Processor system and multi-thread processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4574493B2 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009110404A (en) * | 2007-10-31 | 2009-05-21 | Toshiba Corp | Virtual machine system and guest os scheduling method in the same system |
JP2010086128A (en) * | 2008-09-30 | 2010-04-15 | Nec Electronics Corp | Multi-thread processor and its hardware thread scheduling method |
JP2010086129A (en) * | 2008-09-30 | 2010-04-15 | Nec Electronics Corp | Multi-thread processor |
JP2010086130A (en) * | 2008-09-30 | 2010-04-15 | Nec Electronics Corp | Multi-thread processor and its hardware thread scheduling method |
JP2014149867A (en) * | 2014-04-24 | 2014-08-21 | Renesas Electronics Corp | Multi-thread processor |
US11288072B2 (en) * | 2019-09-11 | 2022-03-29 | Ceremorphic, Inc. | Multi-threaded processor with thread granularity |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05158899A (en) * | 1991-12-02 | 1993-06-25 | Nippon Telegr & Teleph Corp <Ntt> | Cycle processing method |
JPH08249082A (en) * | 1995-03-08 | 1996-09-27 | Canon Inc | Microprocessor peripheral circuit and operation clock mode setting method for this circuit |
JP2002183110A (en) * | 2000-12-18 | 2002-06-28 | Sony Corp | Microcomputer and counting processing method |
JP2004252987A (en) * | 2003-02-20 | 2004-09-09 | Samsung Electronics Co Ltd | Simultaneous multi-threading processor circuit, computer program product composed so as to operate at performance levels different from one another based on number of operating thread, and method for operating them |
JP2004326765A (en) * | 2003-04-25 | 2004-11-18 | Internatl Business Mach Corp <Ibm> | Method and device for selecting instruction thread processed in multithread processor |
-
2005
- 2005-08-22 JP JP2005240195A patent/JP4574493B2/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05158899A (en) * | 1991-12-02 | 1993-06-25 | Nippon Telegr & Teleph Corp <Ntt> | Cycle processing method |
JPH08249082A (en) * | 1995-03-08 | 1996-09-27 | Canon Inc | Microprocessor peripheral circuit and operation clock mode setting method for this circuit |
JP2002183110A (en) * | 2000-12-18 | 2002-06-28 | Sony Corp | Microcomputer and counting processing method |
JP2004252987A (en) * | 2003-02-20 | 2004-09-09 | Samsung Electronics Co Ltd | Simultaneous multi-threading processor circuit, computer program product composed so as to operate at performance levels different from one another based on number of operating thread, and method for operating them |
JP2004326765A (en) * | 2003-04-25 | 2004-11-18 | Internatl Business Mach Corp <Ibm> | Method and device for selecting instruction thread processed in multithread processor |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8291413B2 (en) | 2007-10-31 | 2012-10-16 | Kabushiki Kaisha Toshiba | Virtual computer system managing schedule for allocating CPU to guest OSes and guest OS scheduling method |
JP2009110404A (en) * | 2007-10-31 | 2009-05-21 | Toshiba Corp | Virtual machine system and guest os scheduling method in the same system |
US20170046155A1 (en) * | 2008-09-30 | 2017-02-16 | Renesas Electronics Corporation | Multi-thread processor and its hardware thread scheduling method |
US9098336B2 (en) | 2008-09-30 | 2015-08-04 | Renesas Electronics Corporation | Multi-thread processor and its hardware thread scheduling method |
JP2010086129A (en) * | 2008-09-30 | 2010-04-15 | Nec Electronics Corp | Multi-thread processor |
US8365179B2 (en) | 2008-09-30 | 2013-01-29 | Renesas Electronics Corporation | Multi-thread processor and its hardware thread scheduling method |
US8539203B2 (en) | 2008-09-30 | 2013-09-17 | Renesas Electronics Corporation | Multi-thread processor selecting threads on different schedule pattern for interrupt processing and normal operation |
US8607030B2 (en) | 2008-09-30 | 2013-12-10 | Renesas Electronics Corporation | Scheduling threads instructions in variably selected or predetermined order periods of requested time ratio |
JP2010086128A (en) * | 2008-09-30 | 2010-04-15 | Nec Electronics Corp | Multi-thread processor and its hardware thread scheduling method |
JP2010086130A (en) * | 2008-09-30 | 2010-04-15 | Nec Electronics Corp | Multi-thread processor and its hardware thread scheduling method |
US9501320B2 (en) | 2008-09-30 | 2016-11-22 | Renesas Electronics Corporation | Scheduling threads according to real time bit in predetermined time period or in variable time period of requested time ratio |
US9529597B2 (en) | 2008-09-30 | 2016-12-27 | Renesas Electronics Corporation | Multithread processor with different schedule pattern cycle state for handling interrupt processing |
JP2014149867A (en) * | 2014-04-24 | 2014-08-21 | Renesas Electronics Corp | Multi-thread processor |
US11288072B2 (en) * | 2019-09-11 | 2022-03-29 | Ceremorphic, Inc. | Multi-threaded processor with thread granularity |
CN114730261A (en) * | 2019-09-11 | 2022-07-08 | 红松信号公司 | Multithreaded processor with thread granularity |
JP2022538371A (en) * | 2019-09-11 | 2022-09-01 | レッドパイン シグナルズ インコーポレイティド | A multithreaded processor that provides thread granularity |
JP7194315B2 (en) | 2019-09-11 | 2022-12-21 | レッドパイン シグナルズ インコーポレイティド | A multithreaded processor that provides thread granularity |
CN114730261B (en) * | 2019-09-11 | 2023-01-17 | 红松信号公司 | Multithreaded processor with thread granularity |
Also Published As
Publication number | Publication date |
---|---|
JP4574493B2 (en) | 2010-11-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4574493B2 (en) | Processor system and multi-thread processor | |
JP2748822B2 (en) | Information processing device | |
JP5231800B2 (en) | Semiconductor integrated circuit device and clock control method for semiconductor integrated circuit device | |
US7313671B2 (en) | Processing apparatus, processing method and compiler | |
KR100983135B1 (en) | Processor and method of grouping and executing dependent instructions in a packet | |
US20090249037A1 (en) | Pipeline processors | |
JP4412905B2 (en) | Low power operation control device and program optimization device | |
KR20030051380A (en) | Microprocessor | |
JP2003099148A (en) | Data processor and system controller available for the same, and data conversion method | |
JPH1091430A (en) | Instruction decoding device | |
JP3958239B2 (en) | Microcontroller | |
CN116113940A (en) | Graph calculation device, graph processing method and related equipment | |
KR100284288B1 (en) | Power Saving Device and Method of Processor | |
EP1384145B1 (en) | Expanded functionality of processor operations within a fixed width instruction encoding | |
US10606602B2 (en) | Electronic apparatus, processor and control method including a compiler scheduling instructions to reduce unused input ports | |
JP2007207121A (en) | Data processor and control method therefor | |
JPH07244588A (en) | Data processor | |
JPH0524537B2 (en) | ||
JPH1020959A (en) | Low power consumption micro processor | |
JP3512707B2 (en) | Microcomputer | |
JP3435252B2 (en) | Information processing device | |
JP2010085177A (en) | Semiconductor testing device | |
JPH09223010A (en) | Microprocessor and its processing method | |
JP2636074B2 (en) | Microprocessor | |
JP2003122628A (en) | Digital signal processor, program converter and communication system having digital signal processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080723 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080723 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100201 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100219 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100420 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100517 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100716 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100806 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100818 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4574493 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130827 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |