JP5528852B2 - Multi-thread processing device - Google Patents
Multi-thread processing device Download PDFInfo
- Publication number
- JP5528852B2 JP5528852B2 JP2010045777A JP2010045777A JP5528852B2 JP 5528852 B2 JP5528852 B2 JP 5528852B2 JP 2010045777 A JP2010045777 A JP 2010045777A JP 2010045777 A JP2010045777 A JP 2010045777A JP 5528852 B2 JP5528852 B2 JP 5528852B2
- Authority
- JP
- Japan
- Prior art keywords
- thread
- instruction
- superscalar
- processing
- permission
- 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.)
- Expired - Fee Related
Links
- 238000012545 processing Methods 0.000 title claims description 101
- 238000000034 method Methods 0.000 description 12
- 239000000872 buffer Substances 0.000 description 10
- 230000006870 function Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 5
- 230000003044 adaptive effect Effects 0.000 description 1
- 239000000446 fuel Substances 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000011282 treatment Methods 0.000 description 1
Images
Description
本発明は、複数のスレッドがハードウエアを部分的に共有して処理を行うマルチスレッド処理装置に関する。 The present invention relates to a multi-thread processing apparatus in which a plurality of threads perform processing while partially sharing hardware.
従来、複数のスレッド毎にソースプログラムやレジスタファイル等を有し、スレッド間で演算回路等を共有して並行処理を行うマルチスレッド装置が知られている。このように、スレッド毎の構成要素が存在するマルチスレッド装置の機能は、ハードウエア・マルチスレッディングと称される。 2. Description of the Related Art Conventionally, a multi-thread device is known that has a source program, a register file, and the like for each of a plurality of threads, and performs parallel processing by sharing an arithmetic circuit and the like between threads. Thus, the function of the multi-thread device in which the components for each thread exist is called hardware multi-threading.
ハードウエア・マルチスレッディングを行うマルチスレッドプロセッサについての発明が開示されている(例えば、特許文献1参照)。このマルチスレッドプロセッサでは、演算器による命令処理に使用されるデータを格納可能なレジスタウィンドウをスレッド毎に備え、複数のレジスタウィンドウ間、及び一以上の演算器の間でデータを相互に転送可能なワークレジスタと、データ転送を制御するマルチスレッド制御部を備えている。 An invention of a multi-thread processor that performs hardware multi-threading is disclosed (for example, see Patent Document 1). In this multi-thread processor, a register window capable of storing data used for instruction processing by an arithmetic unit is provided for each thread, and data can be transferred between a plurality of register windows and between one or more arithmetic units. A work register and a multi-thread control unit for controlling data transfer are provided.
一方、演算器等を含む処理手段を複数個備え、プログラムの各処理を必要に応じて複数の処理手段に振り分け、並行処理を行うマイクロコンピュータが知られている。このように、処理を複数の処理手段に振り分ける動作は、スーパースカラ(或いはスーパースケーラ)動作と称されている。スーパースカラ動作を行うことによって、処理時間の短縮化、処理の効率性の向上を図ることができる。 On the other hand, there is known a microcomputer that includes a plurality of processing means including an arithmetic unit and the like, distributes each processing of a program to a plurality of processing means as necessary, and performs parallel processing. As described above, the operation for distributing the processing to a plurality of processing means is called a superscalar (or superscaler) operation. By performing the superscalar operation, the processing time can be shortened and the processing efficiency can be improved.
スーパースカラ動作を行うスーパースカラ・プロセッサについての発明が開示されている(例えば、特許文献2参照)。このプロセッサは、複数の実行ユニットへ同時実行可能な命令を並列に発行し実行するものであり、複数の実行ユニットの動作電源電圧及び動作クロック信号を指定する動作モードがソフトウエア制御により実行ユニットごとにそれぞれ設定され、動作電源電圧及び動作クロック信号の動作状態に応じて命令の発行先を変更している。 An invention of a superscalar processor that performs a superscalar operation is disclosed (for example, see Patent Document 2). This processor issues and executes instructions that can be executed simultaneously to a plurality of execution units in parallel, and the operation mode for specifying the operation power supply voltage and the operation clock signal for each of the execution units is controlled by software control for each execution unit. The command issue destination is changed according to the operating power supply voltage and the operating state of the operating clock signal.
ところで、上記の如きマルチスレッド処理装置にスーパースカラ動作を行わせると(換言すると、スーパースカラ動作が可能であるマイクロコンピュータにハードウエア・マルチスレッディング機能を持たせると)、スレッドが行う処理のリアルタイム性が損なわれるという問題がある。具体的には、ある基準時間から所定クロック分経過した後に特定の処理を実行したいという状況があった場合、スーパースカラ動作によって処理時間が短縮され、当初の予定時刻(予定クロック経過数)よりも前に特定の処置が終了してしまう可能性がある。こうした問題は、特に車両制御を行う車載制御装置等に適用された場合に大きいものとなる。車載制御装置では、制御対象によっては制御タイミングが重要な場合があり、処理のリアルタイム性を確保する必要性が生じ得るからである。 By the way, if the multi-thread processing device as described above performs a superscalar operation (in other words, if a microcomputer capable of superscalar operation is provided with a hardware multithreading function), the real-time property of processing performed by the thread is reduced. There is a problem of being damaged. Specifically, when there is a situation where a specific process is desired to be executed after a predetermined clock time has elapsed from a certain reference time, the processing time is shortened by the superscalar operation, and the original scheduled time (scheduled clock elapsed number) is exceeded. Certain treatments may be terminated before. Such a problem becomes particularly serious when applied to an in-vehicle control device that performs vehicle control. This is because in the in-vehicle control device, the control timing may be important depending on the control target, and it may be necessary to ensure real-time processing.
本発明はこのような課題を解決するためのものであり、スーパースカラ動作によって効率処理を行うと共に、処理のリアルタイム性を確保することが可能なマルチスレッド処理装置を提供することを、主たる目的とする。 The present invention is intended to solve such problems, and it is a main object of the present invention to provide a multi-thread processing device capable of performing efficient processing by superscalar operation and ensuring real-time processing. To do.
上記目的を達成するための本発明の一態様は、
複数の処理手段を有し、
該複数の処理手段のいずれかを利用してハードウエア・マルチスレッディングを行うマルチスレッド処理装置であって、
前記ハードウエア・マルチスレッディングに係る複数のスレッドであって、車載機器制御のための処理を実行する該スレッドのそれぞれについて、前記複数の処理手段のうち二以上の処理手段を用いたスーパースカラ動作の許可又は不許可が規定され、
前記複数のスレッドのうち少なくとも一部についてのスーパースカラ動作の許可又は不許可は、前記マルチスレッド処理装置が搭載された車両の車両状態に応じて動的に変更されることを特徴とする、
マルチスレッド処理装置である。
In order to achieve the above object, one embodiment of the present invention provides:
Having a plurality of processing means,
A multi-thread processing device that performs hardware multi-threading using any of the plurality of processing means,
Permits superscalar operation using two or more processing means of the plurality of processing means for each of the threads that execute processing for in-vehicle device control among the plurality of threads related to the hardware multithreading Or disallowance ,
The permission or non-permission of superscalar operation for at least some of the plurality of threads is dynamically changed according to a vehicle state of a vehicle on which the multi-thread processing device is mounted .
A multi-thread processing device.
この本発明の一態様によれば、ハードウエア・マルチスレッディングに係る複数のスレッドのそれぞれについて、スーパースカラ動作の許可又は不許可が規定されているため、スーパースカラ動作によって効率処理を行うと共に、処理のリアルタイム性を確保することができる。 According to this aspect of the present invention, permission or non-permission of superscalar operation is defined for each of a plurality of threads related to hardware multithreading. Real-time property can be secured.
本発明の一態様において、
前記複数のスレッドに関する前記スーパースカラ動作の許可又は不許可は、例えば、所定の記憶装置に格納されたデータテーブルによって規定されている。
In one embodiment of the present invention,
The permission or non-permission of the superscalar operation regarding the plurality of threads is defined by, for example, a data table stored in a predetermined storage device.
本発明の一態様において、
前記車両状態は、シフト位置を含み、
前記複数のスレッドのうち少なくとも一部についてのスーパースカラ動作の許可又は不許可は、前記シフト位置に応じて動的に変更されることを特徴とするものとしてもよいし、
前記車両状態は、エンジン回転数を含み、
前記複数のスレッドのうち少なくとも一部についてのスーパースカラ動作の許可又は不許可は、前記エンジン回転数に応じて動的に変更されることを特徴とするものとしてもよい。
In one embodiment of the present invention ,
It said vehicle condition includes the shift position,
The permission or refusal of superscalar operation for at least some of the plurality of threads, may be used as the ones characterized in that it is dynamically changed according to the shift position,
It said vehicle condition includes an engine speed,
Permission or non-permission of superscalar operation for at least a portion of the plurality of threads may be those characterized by being dynamically changed depending on the engine speed.
本発明によれば、スーパースカラ動作によって効率処理を行うと共に、処理のリアルタイム性を確保することが可能なマルチスレッド処理装置を提供することができる。 According to the present invention, it is possible to provide a multi-thread processing apparatus capable of performing efficient processing by superscalar operation and ensuring real-time processing.
以下、本発明を実施するための形態について、添付図面を参照しながら実施例を挙げて説明する。 DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments for carrying out the present invention will be described with reference to the accompanying drawings.
<基本実施例>
[基本構成]
以下、図面を参照し、本発明の一実施例に係るマルチスレッド処理装置1について説明する。マルチスレッド処理装置1は、例えば車両に搭載され、各スレッドが種々の車載機器制御のための命令を実行する制御装置に、好適に適用される。
<Basic example>
[Basic configuration]
A
車載機器制御の例としては、例えばエンジン制御、ブレーキ制御、パワーステアリング等を制御するステアリング制御、ドアロック等を制御するボデー制御、VSC(Vehicle Stability Control)やVDIM(Vehicle Dynamics Integrated Management)等の車両安定化制御、ACC(Adaptive Cruise Control)等の運転支援制御、ナビゲーション制御等が挙げられる。 Examples of in-vehicle device control include engine control, brake control, steering control for controlling power steering, body control for controlling door locks, vehicles such as VSC (Vehicle Stability Control) and VDIM (Vehicle Dynamics Integrated Management). Stabilization control, driving support control such as ACC (Adaptive Cruise Control), navigation control, and the like can be given.
図1は、本発明の一実施例に係るマルチスレッド処理装置1のシステム構成例である。マルチスレッド処理装置1は、主要な構成として、命令バッファ10#0〜10#3と、命令発行部12と、命令デコーダ14A、14Bと、レジスタ取得部16A、16Bと、演算器18A、18Bと、レジスタ群20#0〜20#3と、パイプライン制御部22と、スレッドスケジュール制御部24と、を備える。
FIG. 1 is a system configuration example of a
命令バッファ10#0〜10#3、及びレジスタ群20#0〜20#3は、複数のスレッド(#0〜#3)毎に設けられている。ここで、スレッドとは、ハードウエアを部分的に共有して処理を行なう仮想的な処理主体をいい、本実施例の場合、命令バッファ10#0〜10#3、及びレジスタ群20#0〜20#3はスレッド毎に用意されているが、それ以外の命令発行部12、命令デコーダ14A、14B、レジスタ取得部16A、16B、演算器18A、18Bは、スレッド間で共用される。また、本実施例では、スレッドが4個設定されるものとし、これらをスレッド#0〜#3と称している。
The
また、2系統の処理手段(命令デコーダ14A、レジスタ取得部16A、演算器18A(これらを系統Aと称する)と、命令デコーダ14B、レジスタ取得部16B、演算器18B(これらを系統Bと称する)は、スーパースカラ動作を可能としている。例えば、スーパースカラ動作を行わない場合は系統Aのみを用いて処理を行い、スーパースカラ動作を行う場合は系統A及びBを用いて処理を行う、等の態様で利用される。
Two systems of processing means (
命令バッファ10#0〜10#3は、図示しないROM(Read Only Memory)やEEPROM(Electrically Erasable and Programmable Read Only Memory)等のプログラムメモリから取得したプログラム(命令列)をスレッド毎に格納する。
The
命令発行部12は、マルチスレッディングやスーパースカラの設定状態に応じて各スレッドの命令を発行する。詳しくは後述する。
The instruction issuing
命令デコーダ14A、14Bは、命令発行部12から供給される命令を解読(デコード)し、レジスタ取得部16A、16Bに出力する。命令デコーダ14A、14Bによる解読結果は、例えば、演算の種別、ソースオペランド、結果の格納場所等である。
The
レジスタ取得部16A、16Bは、命令デコーダ14A、14Bから入力された命令に従ってレジスタ群20#0〜20#3から演算対象値等を取得する。
The
演算器18A、18Bは、演算の種類に応じて、レジスタ群20#0〜20#3に記憶され、レジスタ取得部16A、16Bにより取得された演算対象値に演算を施す。演算の内容は、ストア、ロード、加算、乗算、除算、分岐等である。例えばストア命令の場合、演算器18A、18Bは、演算したアドレスを指定してデータバス等を介してRAM等からデータを読み込む。
The calculators 18A and 18B perform calculations on the calculation target values stored in the
レジスタ群20#0〜20#3は、演算器18A、18Bによる演算結果やステータス等を格納している。
The
パイプライン制御部22は、以上のようなパイプライン制御の各ステージを制御する。具体的には、例えば、内部クロックに応じて、スレッド#0〜#3に対応して設定されているプログラムカウンタのアドレスをプログラムメモリに出力し、読み出した命令を命令バッファ10#0〜10#3に格納する等の制御を行っている。
The
スレッドスケジュール制御部24は、スレッド#0〜#3を内部クロックに応じて順に作動させる。また、スレッドスケジュール制御部24には、図示しないOS等からスレッド#0〜#3の作動割合(時間配分)が与えられている。この作動割合は、帯域と称される。帯域が、例えば、#0:#1:#2:#3=2:2:1:1で与えられているとすると、スレッドスケジュール制御部24は、スレッド#0を2クロックの間作動させ、次にスレッド#1を2クロックの間作動させ、次にスレッド#2を1クロックの間作動させ、次にスレッド#3を1クロックの間作動させる。そして、この順で繰り返し処理を実行させる。
The thread
[スーパースカラ動作]
図2は、マルチスレッド処理装置1の部分構成例であり、主に命令発行部12及びスレッドスケジュール制御部24の内部構成を、より詳細に示した図である。
[Super scalar operation]
FIG. 2 is a partial configuration example of the
命令発行部12は、同時実行判定部12aと、セレクタ12b、12cと、を有する。同時実行判定部12aは、命令バッファ10#0〜10#3から入力された命令のうち次に発行される2命令について、同時発行が可能であるかどうかを判定する。
The
同時発行が可能であるかどうかの判定は、オペランドチェック(先の命令の演算結果を後の命令が用いて演算を行うかをチェックする等)その他の手法により行われる。また、後述するように、スレッド毎に設定されているスーパースカラ動作の許可又は不許可が加味される。同時実行判定部12aは、命令バッファ10#0〜10#3から入力された複数個の命令を格納するバッファを備えてもよい。
Whether or not simultaneous issue is possible is determined by other methods such as an operand check (such as checking whether a subsequent instruction uses an operation result of a previous instruction). Further, as described later, the permission or non-permission of the superscalar operation set for each thread is taken into consideration. The simultaneous
スレッドスケジュール制御部24は、スレッドスケジュール設定レジスタ24aと、スーパースカラ許可設定レジスタ24bと、を備える。これらのレジスタは、例えば8ビットのデータを格納している。
The thread
スレッドスケジュール設定レジスタ24aは、複数のスレッドの作動割合である帯域を規定している。スレッドスケジュール制御部24は、前述のように、内部クロックに応じて、且つ設定されている帯域を実現するようにスレッドを切り替える。具体的には、内部クロックに同期してセレクタ12b、12cにセレクト信号を送出し、作動すべきスレッドの命令がデコーダ14A及び14Bに出力されるように制御する。なお、同時実行判定部12aは、予め同時発行が可能であるかどうかの判定をスレッド毎に行っており、その結果を内部に保持しているものとする。
The thread
同時実行判定部12aが同時発行を行う場合、セレクタ12b、12cに、当該スレッドの連続する2つの命令がそれぞれ出力される。これによって、2つの命令が命令デコーダ14A、14Bに同時に発行されることになり、スーパースカラ動作が行われる。
When the simultaneous
図3は、スーパースカラ動作によって処理効率が向上する様子を説明するための説明図である。図中、左側の処理の流れは、シングルスレッドマイコンがシングルスカラ(スーパースカラ動作を行わない)によって処理を行う様子を模式的に示している。本図において、命令A3と命令A4は、レイテンシの大きいメモリアクセスを含む等の理由により2クロックを要する命令である(パイプラインストールが1クロック分生じる)。 FIG. 3 is an explanatory diagram for explaining how the processing efficiency is improved by the superscalar operation. In the figure, the processing flow on the left schematically shows how a single thread microcomputer performs processing using a single scalar (not performing superscalar operation). In this figure, an instruction A3 and an instruction A4 are instructions that require two clocks for reasons such as including a memory access with a large latency (a pipeline installation occurs for one clock).
一方、図3中、右側の処理の流れは、シングルスレッドマイコンがスーパースカラ動作を行って処理を行う様子を模式的に示している。本図において、命令A1と命令A2、及び命令A4と命令A5は同時実行が不可能な命令である。こうした命令組に対しては、命令の同時発行がされず、スーパースカラ動作は行われない。他方、命令A2と命令A3、命令A5と命令A6は、同時実行が可能な命令である。こうした命令組に対しては、命令の同時発行がされてスーパースカラ動作が行われる。この結果、左側の処理の流れに比して、処理効率が向上していることが判る。 On the other hand, the flow of processing on the right side in FIG. 3 schematically shows how the single thread microcomputer performs processing by performing a superscalar operation. In this figure, instruction A1 and instruction A2, and instruction A4 and instruction A5 are instructions that cannot be executed simultaneously. For such an instruction set, instructions are not issued simultaneously and a superscalar operation is not performed. On the other hand, the instruction A2 and the instruction A3, and the instruction A5 and the instruction A6 are instructions that can be executed simultaneously. For such an instruction set, instructions are issued simultaneously and a superscalar operation is performed. As a result, it can be seen that the processing efficiency is improved as compared with the processing flow on the left side.
[スーパースカラ動作の許可/不許可]
スーパースカラ許可設定レジスタ24bは、スレッド毎にスーパースカラ動作を許可するか否かを規定している。スーパースカラ許可設定レジスタ24bの内容は、マルチスレッド処理装置1の処理内容のセキュリティ性に応じて、外部から書き換え可能であってもよいし、ユーザーレベルでは書き換え不能となるように保護されてもよい。
[Allow / disallow superscalar operation]
The superscalar
そして、同時実行判定部12aは、同時発行が可能であるかどうかの判定に際し、スーパースカラ許可設定レジスタ24bの内容に基づいて出力されるスーパースカラ許可信号を参照する。従って、スーパースカラ許可設定レジスタ24bにおいてスーパースカラ動作が許可されていないスレッドについては、同時発行を行わない。
The simultaneous
また、図4は、マルチスレッド処理装置1のスレッド数が2である(#0と#1とする)場合において、スレッド#0のみスーパースカラ動作を行う場合の処理の流れを示す図である。図中、最上段の数字は内部クロックの経過数を示している。
FIG. 4 is a diagram showing the flow of processing when the superscalar operation is performed only for
図示するように、1クロック目では、スレッド#0がIF(インストラクションフェッチ;命令バッファから命令発行部12への出力)を実行する。ここで、命令発行部12はスレッド#0の命令がスーパースカラ可能な命令であると判断し、命令の同時発行を行う。
As shown in the drawing, at the first clock, the
2クロック目では、スレッド#0がスーパースカラ動作によりID(インストラクションデコード;命令デコーダ14A、14Bによる解読処理)を2系統で実行し、スレッド#1がIFを実行する。
At the second clock,
3クロック目では、スレッド#0がスーパースカラ動作によりEXE(演算等の処理)、を2系統で実行すると共に、これと並行処理可能なIFを実行し、スレッド#1がIDを実行する。
At the third clock,
4クロック目では、スレッド#0がスーパースカラ動作によりMEM(メモリアクセス)を2系統で実行すると共に、これと並行処理可能なIDをスーパースカラ動作により2系統で実行し、スレッド#1がEXEを実行する。
At the 4th clock,
5クロック目では、スレッド#0がスーパースカラ動作によりWB(ライトバック)を2系統で実行すると共に、これと並行処理可能なEXEをスーパースカラ動作により2系統で実行し、スレッド#1がMEMを実行する。
At the 5th clock,
このように、パイプライン制御によって順次命令を実行しつつ、スーパースカラ動作が可能な命令列についてはスーパースカラ動作を行うことで、処理効率を向上させることができる。 As described above, the processing efficiency can be improved by performing the superscalar operation on the instruction sequence capable of performing the superscalar operation while sequentially executing the instructions by the pipeline control.
また、スーパースカラ許可設定レジスタ24bにおいてスーパースカラ動作が許可されていないスレッドについては、同時発行を行わないことにより、処理のリアルタイム性を確保することができる。
In addition, real time processing can be ensured by not simultaneously issuing threads that are not permitted to perform superscalar operations in the superscalar
前述のように、マルチスレッド処理装置1が実行する命令は、同時発行可能であるか否かが予め判らない場合が多い。特に、分岐命令が実行された後等、スーパースカラ動作の発生頻度が予測し得ないものとなり易い。従って、スーパースカラ動作を許可した場合、特定のタイミングで特定の処理が行われることの信頼性(処理のリアルタイム性)が低くなってしまう。
As described above, in many cases, it is not known in advance whether or not the instructions executed by the
処理のリアルタイム性の確保は、複数のマイクロコンピュータの機能を統合して一のマルチスレッド処理装置とした場合、特に、複数の機能を統合した車載制御装置に適用された場合に重要な場合が多い。 Ensuring real-time processing is often important when integrating the functions of multiple microcomputers into a single multi-thread processing device, especially when applied to an in-vehicle controller that integrates multiple functions. .
図5は、CPUやRAM、ROM、I/Oポート等がバスを介して接続された構成の、複数のECU(Electronic Control Unit)を統合して一のマルチスレッド処理装置とした場合に、リアルタイム性が確保される様子を示す図である。 FIG. 5 shows real time when a plurality of ECUs (Electronic Control Units) are integrated into a single multi-thread processing device in which a CPU, a RAM, a ROM, an I / O port, and the like are connected via a bus. It is a figure which shows a mode that property is ensured.
ここでは、50[MHz]で動作するECU#A〜ECU#Dを統合し、200[MHz]で動作するマルチスレッド処理装置に機能統合している。そして、ECU#A〜ECU#Dの行っていた処理は、それぞれスレッド#0〜#3によって実行される。前提として、ECU#A〜ECU#Cが行っていた処理はリアルタイム性の重要度が低く、迅速に処理を終了することが望ましいが、ECU#Dが行っていた処理はリアルタイム性の重要度が高いものとする。
Here, ECU #A to ECU #D operating at 50 [MHz] are integrated, and the functions are integrated into a multi-thread processing device operating at 200 [MHz]. The processes performed by ECU #A to ECU #D are executed by
この場合、ECU#A〜ECU#Cの機能を実行するスレッド#0〜#2についてはスーパースカラ動作を許可するが、ECU#Dの機能を実行するスレッド#3についてはスーパースカラ動作を許可しないように設定する。
In this case, superscalar operation is permitted for
これによって、図5に示すように、従来ECU#A〜ECU#Cが行っていた処理は、スーパースカラ動作によって処理時間が短縮され、早期に終了することになる。具体的には、命令A5が命令A4と並行処理され、命令B5が命令B4と並行処理され、命令C5が命令C4と並行処理されている。一方、従来ECU#Dが行っていた処理についてはスーパースカラ動作が行われないため、内部クロックの経過数に対する命令実行タイミングが変動しない。従って、従来ECU#Dが行っていた処理タイミングと同じようなタイミングで処理を実行することができる。 As a result, as shown in FIG. 5, the processing performed by the ECUs #A to ECU # C in the related art is shortened by the superscalar operation, and ends early. Specifically, instruction A5 is processed in parallel with instruction A4, instruction B5 is processed in parallel with instruction B4, and instruction C5 is processed in parallel with instruction C4. On the other hand, since the super-scalar operation is not performed for the processing conventionally performed by the ECU #D, the instruction execution timing with respect to the number of elapsed internal clocks does not vary. Therefore, the processing can be executed at the same timing as the processing timing that the ECU #D has conventionally performed.
以上説明した本実施例のマルチスレッド処理装置1によれば、スーパースカラ動作によって効率処理を行うと共に、処理のリアルタイム性を確保することができる。
According to the
<応用例>
以下、本実施例のマルチスレッド処理装置1を、車載機器制御を行う車載制御装置に適用した場合について説明する。
<Application example>
Hereinafter, the case where the
図6は、本実施例のマルチスレッド処理装置1が適用された車載制御装置のシステム構成を概念的に示す図である。この車載制御装置は、前述したECUとして構成され、ECU管理、システム#A、システム#B、システム#Cの4つの機能が統合されたものである。そして、これらの4つの機能は、スレッド#0〜#3によって、それぞれ実行されるようにソフトウエアが構築されている。
FIG. 6 is a diagram conceptually showing the system configuration of the in-vehicle control device to which the
これらの機能のうち、ECU管理、及びシステム#Bが、処理のリアルタイム性の重要性が低く、常時スーパースカラ動作が許可される。システム#Aは、処理のリアルタイム性の重要性が高いため、スーパースカラ動作は許可されない。システム#Cは、車両状態に応じて処理のリアルタイム性が変動するため、スーパースカラ動作の許可/不許可が変動する(スーパースカラ動的制御)。この場合、スーパースカラ許可設定レジスタ24bの内容が、図示しないOS等の指示によって書き換えられる。
Of these functions, ECU management and system #B are less important for real-time processing, and always allow superscalar operation. Since system #A is highly important for real-time processing, superscalar operation is not permitted. In the system #C, since real-time processing varies depending on the vehicle state, permission / non-permission of superscalar operation varies (superscalar dynamic control). In this case, the contents of the superscalar
ここで、車載制御装置に適用された場合のスーパースカラ動的制御について、2パターン例示する。 Here, two patterns of superscalar dynamic control when applied to an in-vehicle control device are illustrated.
(1)マルチスレッド処理装置1が運転支援システムに適用された場合、例えば、シフト位置をトリガーとしてスーパースカラ動作の許可/不許可が変動する。シフト位置は、シフトレバーに取り付けられたシフト位置センサーから入力される信号によって把握される。
(1) When the
この場合、車載制御装置における特定のスレッドは、シフト位置がD(ドライブ)である場合にオートクルーズコントロールや衝突安全システムのための処理を行っており、シフト位置がR(リバース)である場合に車両後方を車室内に表示するバックモニタや駐車支援制御のための処理を行っている。 In this case, when the shift position is D (drive), a specific thread in the in-vehicle control device performs processing for auto-cruise control or a collision safety system, and when the shift position is R (reverse). A back monitor that displays the rear of the vehicle in the passenger compartment and a process for parking support control are performed.
オートクルーズコントロールや衝突安全システムは、処理のリアルタイム性が要求されるため、スーパースカラ動作を許可しない。具体的には、センサー出力値(例えば車速)のサンプリング周期等が略一定に保たれる必要が生じるからである。 Auto-cruise control and collision safety systems do not allow superscalar operation because real-time processing is required. Specifically, it is necessary to keep the sampling period of the sensor output value (for example, the vehicle speed) substantially constant.
一方、バックモニタや駐車支援制御には処理のリアルタイム性が要求されないため、スーパースカラ動作を許可する。従って、当該車載制御装置のスレッドは、シフト位置がDである場合にスーパースカラ動作を不許可とし、シフト位置がRである場合にスーパースカラ動作を許可する。 On the other hand, super-scalar operation is permitted because back-monitoring and parking support control do not require real-time processing. Therefore, when the shift position is D, the thread of the vehicle-mounted control device disallows the superscalar operation, and permits the superscalar operation when the shift position is R.
(2)マルチスレッド処理装置1がエンジン制御システムに適用された場合、例えば、エンジン回転数に応じてスーパースカラ動作の許可/不許可が変動する。エンジン回転数は、エンジンのクランクシャフトに取り付けられたクランク角センサーから入力される値に基づいて演算することができる。
(2) When the
エンジン回転数が低い場合、特にアイドリング時においては、燃費向上のためにエンジン回転数を正確に制御する必要等が生じるため、処理のリアルタイム性の重要性が高くなる。従って、スーパースカラ動作を不許可とする。 When the engine speed is low, particularly during idling, it is necessary to accurately control the engine speed in order to improve fuel consumption, and therefore the importance of real-time processing is increased. Therefore, superscalar operation is not permitted.
一方、エンジン回転数が高い場合、処理タイミングよりも迅速な演算処理が望まれ、処理のリアルタイム性の重要性は低いものとなる。従って、スーパースカラ動作を許可する。 On the other hand, when the engine speed is high, a calculation process that is faster than the processing timing is desired, and the real-time property of the process is less important. Therefore, superscalar operation is permitted.
当該車載制御装置のスレッドは、エンジン回転数が基準値以上である場合にスーパースカラ動作を許可し、基準値未満である場合にスーパースカラ動作を不許可とする。 The thread of the vehicle-mounted control device permits the superscalar operation when the engine speed is equal to or higher than the reference value, and disallows the superscalar operation when it is less than the reference value.
このようにスーパースカラ動作の許可/不許可を動的に変更することによって、制御対象が要求する処理の特性に合致した態様で、命令実行を行うことができる。 Thus, by dynamically changing the permission / non-permission of the superscalar operation, it is possible to execute the instruction in a manner that matches the characteristics of the process requested by the controlled object.
以上、本発明を実施するための最良の形態について実施例を用いて説明したが、本発明はこうした実施例に何等限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々の変形及び置換を加えることができる。 The best mode for carrying out the present invention has been described above with reference to the embodiments. However, the present invention is not limited to these embodiments, and various modifications can be made without departing from the scope of the present invention. And substitutions can be added.
1 マルチスレッド処理装置
10#0〜10#3 命令バッファ
12 命令発行部
12a 同時実行判定部
12b、12c セレクタ
14A、14B 命令デコーダ
16A、16B レジスタ取得部
18A、18B 演算器
20#0〜20#3 レジスタ群
22 パイプライン制御部
24 スレッドスケジュール制御部
24a スレッドスケジュール設定レジスタ
24b スーパースカラ許可設定レジスタ
DESCRIPTION OF
Claims (4)
該複数の処理手段のいずれかを利用してハードウエア・マルチスレッディングを行うマルチスレッド処理装置であって、
前記ハードウエア・マルチスレッディングに係る複数のスレッドであって、車載機器制御のための処理を実行する該スレッドのそれぞれについて、前記複数の処理手段のうち二以上の処理手段を用いたスーパースカラ動作の許可又は不許可が規定され、
前記複数のスレッドのうち少なくとも一部についてのスーパースカラ動作の許可又は不許可は、前記マルチスレッド処理装置が搭載された車両の車両状態に応じて動的に変更されることを特徴とする、
マルチスレッド処理装置。 Having a plurality of processing means,
A multi-thread processing device that performs hardware multi-threading using any of the plurality of processing means,
Permits superscalar operation using two or more processing means of the plurality of processing means for each of the threads that execute processing for in-vehicle device control among the plurality of threads related to the hardware multithreading Or disallowance ,
The permission or non-permission of superscalar operation for at least some of the plurality of threads is dynamically changed according to a vehicle state of a vehicle on which the multi-thread processing device is mounted .
Multi-thread processing unit.
前記複数のスレッドに関する前記スーパースカラ動作の許可又は不許可は、所定の記憶装置に格納されたデータテーブルによって規定されていることを特徴とする、
マルチスレッド処理装置。 The multi-thread processing apparatus according to claim 1,
The permission or disapproval of the superscalar operation for the plurality of threads is defined by a data table stored in a predetermined storage device,
Multi-thread processing unit.
前記車両状態は、シフト位置を含み、
前記複数のスレッドのうち少なくとも一部についてのスーパースカラ動作の許可又は不許可は、前記シフト位置に応じて動的に変更されることを特徴とする、
マルチスレッド処理装置。 The multi-thread processing apparatus according to claim 1 or 2 ,
It said vehicle condition includes the shift position,
Permission or non-permission of superscalar operation for at least a portion of the plurality of threads, characterized in that it is dynamically changed according to the shift position,
Multi-thread processing unit.
前記車両状態は、エンジン回転数を含み、
前記複数のスレッドのうち少なくとも一部についてのスーパースカラ動作の許可又は不許可は、前記エンジン回転数に応じて動的に変更されることを特徴とする、
マルチスレッド処理装置。 The multi-thread processing apparatus according to claim 1 or 2 ,
It said vehicle condition includes an engine speed,
Permission or non-permission of superscalar operation for at least a portion of the plurality of threads, characterized in that it is dynamically changed according to the engine rotational speed,
Multi-thread processing unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010045777A JP5528852B2 (en) | 2010-03-02 | 2010-03-02 | Multi-thread processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010045777A JP5528852B2 (en) | 2010-03-02 | 2010-03-02 | Multi-thread processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011180922A JP2011180922A (en) | 2011-09-15 |
JP5528852B2 true JP5528852B2 (en) | 2014-06-25 |
Family
ID=44692343
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010045777A Expired - Fee Related JP5528852B2 (en) | 2010-03-02 | 2010-03-02 | Multi-thread processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5528852B2 (en) |
-
2010
- 2010-03-02 JP JP2010045777A patent/JP5528852B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2011180922A (en) | 2011-09-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6542921B1 (en) | Method and apparatus for controlling the processing priority between multiple threads in a multithreaded processor | |
US7401207B2 (en) | Apparatus and method for adjusting instruction thread priority in a multi-thread processor | |
EP2140347B1 (en) | Processing long-latency instructions in a pipelined processor | |
US8949663B2 (en) | Multi-core processor including a monitored processor core whose process result is to be monitored by a number of processors based on processing load | |
EP2593861B1 (en) | System and method to allocate portions of a shared stack | |
US9164799B2 (en) | Multiprocessor system | |
US10049043B2 (en) | Flushing control within a multi-threaded processor | |
US20170017490A1 (en) | Execution of micro-operations | |
US20090113439A1 (en) | Method and Apparatus for Processing Data | |
US20220100574A1 (en) | Vehicular control device, vehicular display system, and vehicular display control method | |
JP5528852B2 (en) | Multi-thread processing device | |
JP2011170619A (en) | Multithread processor | |
JP2011216004A (en) | Microprocessor, electronic control unit, execution ratio switching method | |
WO2006129767A1 (en) | Multithread central processing device and simultaneous multithreading control method | |
JP5699896B2 (en) | Information processing apparatus and abnormality determination method | |
US20080065804A1 (en) | Event handling for architectural events at high privilege levels | |
US20070162723A1 (en) | Technique for reducing traffic in an instruction fetch unit of a chip multiprocessor | |
CN112395000B (en) | Data preloading method and instruction processing device | |
US9342312B2 (en) | Processor with inter-execution unit instruction issue | |
JP2011233085A (en) | Processor, electronic control unit, and load distribution method | |
JP2012168725A (en) | Multi-thread processor | |
JP2011180991A (en) | Multithread processor | |
CA2619742A1 (en) | An input/output control apparatus for performing high reliability computations | |
JP2012208662A (en) | Multi-thread processor | |
JP2011008617A (en) | Multithread execution device, method of generating object program, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20121206 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20131226 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140121 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140228 |
|
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: 20140325 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140416 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5528852 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |