JPH10207720A - Information processor - Google Patents

Information processor

Info

Publication number
JPH10207720A
JPH10207720A JP9009407A JP940797A JPH10207720A JP H10207720 A JPH10207720 A JP H10207720A JP 9009407 A JP9009407 A JP 9009407A JP 940797 A JP940797 A JP 940797A JP H10207720 A JPH10207720 A JP H10207720A
Authority
JP
Japan
Prior art keywords
instruction
vector
mode
scalar
information processing
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.)
Withdrawn
Application number
JP9009407A
Other languages
Japanese (ja)
Inventor
Takao Yamamoto
崇夫 山本
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP9009407A priority Critical patent/JPH10207720A/en
Publication of JPH10207720A publication Critical patent/JPH10207720A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Complex Calculations (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve the application efficiency of a hardware resource while attaining the high speed of information processing by optionally switching a scalar mode and a vector mode. SOLUTION: A control unit 30 is provided with an instruction fetch unit 40 for fetching an instruction from a memory unit 20, a sequencer 50 for controlling the operation of the whole information processor and 1st to 3rd multiplexers 60 to 62. The sequencer 50 decodes an instruction INST supplied from the 3rd multiplexer 62. The sequencer 50 switches the scalar mode for executing a scalar instruction by using the 1st and 2nd register sets 11, 12 respectively as scalar register sets and the vector mode for executing a vector instruction by using the 1st and 2nd register sets 11, 12 as two-dimensional vector register sets. The mode switching is dynamically executed in accordance with an event generated during the operation of the information processor.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、マルチスレッド型
の情報処理装置に関するものである。
The present invention relates to a multi-thread type information processing apparatus.

【0002】[0002]

【従来の技術】従来、複数個のスレッド(命令ストリー
ム)を備えたマルチスレッド型パイプライン方式の情報
処理装置が知られている。これは、アプリケーションプ
ログラムにおけるタスクレベルの並列性を利用して高速
の情報処理を達成するものである。具体的には、各スレ
ッドは、1個のプログラムカウンタと、複数個のレジス
タで構成された1個のレジスタセットとを有する。しか
も、これらのスレッドは少なくとも1個の演算器を共有
する。そして、複数個のスレッドの各々にタスクが割付
けられ、複数のタスクが時分割で並列実行される。
2. Description of the Related Art Conventionally, a multi-threaded pipeline type information processing apparatus having a plurality of threads (instruction streams) has been known. This achieves high-speed information processing using task-level parallelism in an application program. Specifically, each thread has one program counter and one register set composed of a plurality of registers. Moreover, these threads share at least one arithmetic unit. Then, a task is assigned to each of the plurality of threads, and the plurality of tasks are executed in parallel in a time-division manner.

【0003】また、ベクトル処理方式の情報処理装置が
知られている。これは、行列計算などにおけるデータの
並列性を利用して高速の情報処理を達成するものであ
る。
Further, an information processing apparatus of a vector processing system is known. This achieves high-speed information processing by utilizing the parallelism of data in a matrix calculation or the like.

【0004】[0004]

【発明が解決しようとする課題】一般に、情報処理装置
においては、タスクレベルの並列性とデータの並列性と
の両面性を考慮する必要がある。
Generally, in an information processing apparatus, it is necessary to consider both the parallelism of task level and the parallelism of data.

【0005】Tzi-cker Chiueh, "Multi-Threaded Vecto
rization", Proceedings of 18th International Sympo
sium on Computer Architecture, pp.352-361, 1991 に
は、マルチスレッド型パイプライン方式とベクトル処理
方式とを組合せた情報処理装置が提案されている。とこ
ろが、この情報処理装置は、スカラレジスタセットと、
これとは独立したベクトルレジスタセットとを備えたも
のであった。したがって、ハードウェア資源の利用効率
が悪いという問題があった。
[0005] Tzi-cker Chiueh, "Multi-Threaded Vecto
rization ", Proceedings of 18th International Sympo
sium on Computer Architecture, pp.352-361, 1991, proposes an information processing apparatus that combines a multithreaded pipeline system and a vector processing system. However, this information processing device has a scalar register set,
And a vector register set independent of this. Therefore, there is a problem that the utilization efficiency of hardware resources is poor.

【0006】本発明の目的は、ベクトル処理方式を導入
したマルチスレッド型の情報処理装置において、ハード
ウェア資源の利用効率を高めることにある。
An object of the present invention is to improve the utilization efficiency of hardware resources in a multi-thread type information processing apparatus into which a vector processing method is introduced.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に、本発明に係るマルチスレッド型の情報処理装置は、
複数個のレジスタセットのうちの個々のレジスタセット
をスカラレジスタセットとして使用してスカラ命令を実
行するスカラモードと、前記複数個のレジスタセットの
うちのN個(Nは2以上の整数)のレジスタセットをN
元ベクトルレジスタセットとして使用してベクトル命令
を実行するベクトルモードとを切換えることとしたもの
である。
In order to achieve the above object, a multi-thread information processing apparatus according to the present invention comprises:
A scalar mode for executing a scalar instruction using an individual register set of the plurality of register sets as a scalar register set, and N (N is an integer of 2 or more) registers of the plurality of register sets Set N
The mode is switched to a vector mode in which a vector instruction is executed using the source vector register set.

【0008】本発明の情報処理装置によれば、スカラ命
令のみを実行するタスクには1個のレジスタセットがス
カラレジスタセットとして割付けられる。全てのレジス
タセットをそれぞれスカラレジスタセットとして使用す
ることができる。また、N元ベクトル命令を実行するタ
スクにはN個のレジスタセットがN元ベクトルレジスタ
セットとして割付けられる。
According to the information processing apparatus of the present invention, one register set is assigned to a task that executes only a scalar instruction as a scalar register set. All register sets can be used as scalar register sets. In addition, N register sets are assigned to a task that executes an N-ary vector instruction as an N-ary vector register set.

【0009】スカラモードとベクトルモードとの間の切
換えは、情報処理装置の動作中に発生する事象に応じて
動的になされる。例えば、スカラモードにおいてベクト
ル命令がフェッチされたときに発生する内部割込みに応
答してベクトルモードへの切換えが実行され、ベクトル
モードにおいて専用割込み命令がフェッチ又はデコード
されたときに発生する内部割込みに応答してスカラモー
ドへの切換えが実行される。
[0009] Switching between the scalar mode and the vector mode is dynamically performed according to an event that occurs during the operation of the information processing apparatus. For example, switching to vector mode is performed in response to an internal interrupt that occurs when a vector instruction is fetched in scalar mode, and responding to an internal interrupt that occurs when a dedicated interrupt instruction is fetched or decoded in vector mode. Then, switching to the scalar mode is executed.

【0010】なお、外部割込みの処理はスレッド資源の
停止及び退避処理を必要とする。これは、レジスタセッ
トの記憶内容の退避処理を含んでいる。また、ベクトル
モードのスレッド資源の退避に比べて、スカラモードの
スレッド資源の退避の方が簡便であるという事情があ
る。したがって、スカラモードのスレッドと、ベクトル
モードのスレッドとが共存する場合には、スカラモード
のスレッドに優先的に外部割込みの処理を実行させるの
が好ましい。
[0010] The processing of the external interrupt needs to stop and save the thread resources. This includes saving the contents of the register set. Also, there is a situation in which saving thread resources in scalar mode is easier than saving thread resources in vector mode. Therefore, when a thread in the scalar mode and a thread in the vector mode coexist, it is preferable to cause the thread in the scalar mode to execute the external interrupt process preferentially.

【0011】[0011]

【発明の実施の形態】図1は、本発明に係るマルチスレ
ッド型パイプライン方式の情報処理装置の構成例を示し
ている。図1の情報処理装置は、大きく分けて、データ
パスユニット10と、メモリユニット20と、制御ユニ
ット30とから構成される。メモリユニット20は、複
数のタスクの各々を構成する命令列と、各タスクに関連
したデータとを記憶している。
FIG. 1 shows an example of the configuration of a multithreaded pipeline type information processing apparatus according to the present invention. The information processing apparatus of FIG. 1 is roughly composed of a data path unit 10, a memory unit 20, and a control unit 30. The memory unit 20 stores an instruction sequence configuring each of a plurality of tasks, and data related to each task.

【0012】データパスユニット10は、各々複数個の
レジスタ(R0,R1,R2,…)を有する第1及び第
2のレジスタセット11,12と、算術論理演算を実行
するための1個の演算器(ALU)15と、演算結果を
一時記憶するためのMレジスタ(REG M)16とを
備えている。第1のレジスタセット11は、1つの書込
みポートWT1と、第1及び第2の読出しポートRD1
1,RD12とを備えている。第2のレジスタセット1
2は、1つの書込みポートWT2と、第1及び第2の読
出しポートRD21,RD22とを備えている。演算器
15は、第1のレジスタセット11の第1の読出しポー
トRD11又は第2のレジスタセット12の第1の読出
しポートRD21から第1の入力を受取り、かつ第1の
レジスタセット11の第2の読出しポートRD12又は
第2のレジスタセット12の第2の読出しポートRD2
2から第2の入力を受取る。演算器15の演算結果は、
Mレジスタ16に一時記憶され、該Mレジスタ16か
ら、データアクセス(又はブランチ先指定)のためのア
ドレスADRSとしてメモリユニット20及び制御ユニ
ット30へ供給されたり、第1のレジスタセット11の
書込みポートWT1及び第2のレジスタセット12の書
込みポートWT2へ供給されたりできるようになってい
る。第1のレジスタセット11の書込みポートWT1及
び第2のレジスタセット12の書込みポートWT2は、
メモリユニット20からデータの供給を受けることもで
きる。ただし、両書込みポートWT1,WT2は共通の
データバスに接続されている。
The data path unit 10 includes first and second register sets 11 and 12 each having a plurality of registers (R0, R1, R2,...) And one operation for executing an arithmetic and logic operation. (ALU) 15 and an M register (REG M) 16 for temporarily storing the operation result. The first register set 11 includes one write port WT1 and first and second read ports RD1.
1 and RD12. Second register set 1
2 has one write port WT2 and first and second read ports RD21 and RD22. The arithmetic unit 15 receives a first input from the first read port RD11 of the first register set 11 or the first read port RD21 of the second register set 12, and receives the second input of the first register set 11. Read port RD12 or the second read port RD2 of the second register set 12
2 to receive a second input. The calculation result of the calculator 15 is
The data is temporarily stored in the M register 16 and is supplied from the M register 16 to the memory unit 20 and the control unit 30 as an address ADRS for data access (or branch destination designation), or the write port WT1 of the first register set 11 And to the write port WT2 of the second register set 12. The write port WT1 of the first register set 11 and the write port WT2 of the second register set 12 are:
Data can also be supplied from the memory unit 20. However, both write ports WT1, WT2 are connected to a common data bus.

【0013】制御ユニット30は、メモリユニット20
から命令をフェッチするための命令フェッチユニット4
0と、情報処理装置全体の動作を制御するためのシーケ
ンサ50と、第1、第2及び第3のマルチプレクサ6
0,61,62とを備えている。命令フェッチユニット
40は、第1及び第2のプログラムカウンタ(PC1,
PC2)41,42と、第1及び第2の命令バッファ
(IB1,IB2)45,46とを備えている。第1及
び第2のプログラムカウンタ41,42は、各々に対応
付けられたタスクに係る次にフェッチすべき命令のアド
レスを保持しており、それぞれシーケンサ50からの指
示に従ってインクリメントされる。第1のマルチプレク
サ60は、シーケンサ50からの指示に応じて、第1の
プログラムカウンタ41から供給されたアドレスと、第
2のプログラムカウンタ42から供給されたアドレスと
のいずれか一方を選択し、該選択したアドレスを第2の
マルチプレクサ61へ供給する。第2のマルチプレクサ
61は、シーケンサ50からの指示に応じて、第1のマ
ルチプレクサ60から供給されたアドレスと、演算器1
5からMレジスタ16を介して供給されたアドレスAD
RSとのいずれか一方を選択し、該選択したアドレスを
メモリユニット20へ供給する。第1の命令バッファ4
5は、対応タスクに係る第1のプログラムカウンタ41
の保持アドレスに従ってメモリユニット20からフェッ
チされた命令を一時記憶する。第2の命令バッファ46
は、対応タスクに係る第2のプログラムカウンタ42の
保持アドレスに従ってメモリユニット20からフェッチ
された命令を一時記憶する。第1及び第2の命令バッフ
ァ45,46は、各々一時記憶している命令を第3のマ
ルチプレクサ62へ供給する。第3のマルチプレクサ6
2は、シーケンサ50からの指示に応じて、第1の命令
バッファ45から供給された命令と、第2の命令バッフ
ァ46から供給された命令とのいずれか一方を選択し、
該選択した命令をシーケンサ50へ供給する。図1中の
INSTは、このようにしてシーケンサ50へ供給され
た命令を表している。なお、多くの情報処理装置で採用
されているように一度に複数の命令をフェッチする場合
には、該複数の命令からなる命令列を命令バッファに記
憶し、該命令バッファがFIFO(ファースト・イン・
ファースト・アウト)動作をすることによって1命令ず
つ第3のマルチプレクサ62に供給する構成にしてもよ
い。これにより、命令フェッチの回数を少なくすること
ができる。
The control unit 30 includes a memory unit 20
Instruction fetch unit 4 for fetching instructions from
0, a sequencer 50 for controlling the operation of the entire information processing apparatus, and first, second and third multiplexers 6.
0, 61, and 62. The instruction fetch unit 40 includes first and second program counters (PC1, PC1).
PC2) 41, 42 and first and second instruction buffers (IB1, IB2) 45, 46. The first and second program counters 41 and 42 hold the addresses of instructions to be fetched next for the tasks associated with them, and are incremented in accordance with instructions from the sequencer 50, respectively. The first multiplexer 60 selects one of the address supplied from the first program counter 41 and the address supplied from the second program counter 42 in accordance with an instruction from the sequencer 50, and The selected address is supplied to the second multiplexer 61. The second multiplexer 61 receives the address supplied from the first multiplexer 60 and the arithmetic unit 1 in response to an instruction from the sequencer 50.
5 through the M register 16
RS, and supplies the selected address to the memory unit 20. First instruction buffer 4
5 is a first program counter 41 related to the corresponding task
The instruction fetched from the memory unit 20 is temporarily stored in accordance with the holding address of the instruction. Second instruction buffer 46
Temporarily stores the instruction fetched from the memory unit 20 according to the holding address of the second program counter 42 relating to the corresponding task. The first and second instruction buffers 45 and 46 respectively supply the temporarily stored instructions to the third multiplexer 62. Third multiplexer 6
2 selects one of the instruction supplied from the first instruction buffer 45 and the instruction supplied from the second instruction buffer 46 in response to an instruction from the sequencer 50,
The selected instruction is supplied to the sequencer 50. INST in FIG. 1 represents the instruction supplied to the sequencer 50 in this manner. When a plurality of instructions are fetched at a time as employed in many information processing apparatuses, an instruction sequence including the plurality of instructions is stored in an instruction buffer, and the instruction buffer stores the FIFO (first-in・
A first-out operation may be performed to supply the instructions to the third multiplexer 62 one instruction at a time. As a result, the number of instruction fetches can be reduced.

【0014】シーケンサ50は、第3のマルチプレクサ
62から供給された命令INSTをデコードする。ま
た、シーケンサ50は、第1及び第2のレジスタセット
11,12の各々をスカラレジスタセットとして使用し
てスカラ命令を実行するスカラモードと、第1及び第2
のレジスタセット11,12を2元ベクトルレジスタセ
ットとして使用してベクトル命令を実行するベクトルモ
ードとを切換える。このモード切換えは、図1の情報処
理装置の動作中に発生する事象に応じて動的に実行され
る。具体的には、スカラモードにおいてベクトル命令が
フェッチされかつデコードされたときに発生する内部割
込みに応答して、スカラモードからベクトルモードへの
切換えが実行される。また、ベクトルモードにおいて復
帰のための専用割込み命令がフェッチされかつデコード
されたときに発生する内部割込みに応答して、ベクトル
モードからスカラモードへの切換えが実行される。な
お、ベクトルモードでは、ベクトル命令の実行のみでな
く、スカラ命令の実行も可能である。更に、シーケンサ
50は、現サイクルにおいていずれのタスクが実行中で
あるかを示す情報、すなわち「タスク情報」を記憶して
いる。ここで、スカラモードにおいて第1のプログラム
カウンタ41が特定のタスク1に係る命令アドレスを、
第2のプログラムカウンタ42が他の特定のタスク2に
係る命令アドレスをそれぞれ保持しているものとする。
更に、第1のレジスタセット11を使用してタスク1の
命令を実行し、かつ第2のレジスタセット12を使用し
てタスク2の命令を実行するものとする。この場合に
は、第1のプログラムカウンタ41と第1のレジスタセ
ット11とが1個のスレッドを構成し、かつ第2のプロ
グラムカウンタ42と第2のレジスタセット12とが他
の1個のスレッドを構成する。あるいは、第2のレジス
タセット12を使用してタスク1の命令を実行し、かつ
第1のレジスタセット11を使用してタスク2の命令を
実行することもできる。この場合には、第1のプログラ
ムカウンタ41と第2のレジスタセット12とが1個の
スレッドを構成し、かつ第2のプログラムカウンタ42
と第1のレジスタセット11とが他の1個のスレッドを
構成する。シーケンサ50は、このようなスレッド構成
に係る情報、すなわち「スレッド情報」をも記憶してい
る。
The sequencer 50 decodes the instruction INST supplied from the third multiplexer 62. The sequencer 50 also includes a scalar mode for executing a scalar instruction using each of the first and second register sets 11 and 12 as a scalar register set, and a first and second scalar mode.
Is switched to a vector mode in which a vector instruction is executed by using the register sets 11 and 12 as a binary vector register set. This mode switching is dynamically executed in response to an event that occurs during the operation of the information processing apparatus in FIG. Specifically, switching from the scalar mode to the vector mode is performed in response to an internal interrupt generated when a vector instruction is fetched and decoded in the scalar mode. Switching from the vector mode to the scalar mode is performed in response to an internal interrupt generated when a dedicated interrupt instruction for return in the vector mode is fetched and decoded. In the vector mode, it is possible to execute not only a vector instruction but also a scalar instruction. Further, the sequencer 50 stores information indicating which task is being executed in the current cycle, that is, “task information”. Here, in the scalar mode, the first program counter 41 sets the instruction address related to the specific task 1 to:
It is assumed that the second program counter 42 holds an instruction address related to another specific task 2.
Further, it is assumed that the instruction of task 1 is executed using the first register set 11, and the instruction of task 2 is executed using the second register set 12. In this case, the first program counter 41 and the first register set 11 constitute one thread, and the second program counter 42 and the second register set 12 constitute another thread. Is configured. Alternatively, the task 1 instruction may be executed using the second register set 12 and the task 2 instruction may be executed using the first register set 11. In this case, the first program counter 41 and the second register set 12 constitute one thread, and the second program counter 42
And the first register set 11 constitute another thread. The sequencer 50 also stores information related to such a thread configuration, that is, “thread information”.

【0015】シーケンサ50は、スレッド毎の現在の動
作モードを示す「モード情報」を記憶するためのモード
レジスタ51と、内部割込みの処理と外部割込みINT
の処理とを実行するための割込み処理ハンドラ52とを
備えている。第1及び第2のレジスタセット11,12
の各々がスカラレジスタセットとして使用される場合に
は、2個のスレッドの各々がスカラモードである。第1
及び第2のレジスタセット11,12が2元ベクトルレ
ジスタセットとして使用される場合には、一方のスレッ
ドが主ベクトルモードであり、他方のスレッドが従ベク
トルモードである。なお、モードレジスタ51は、上記
タスク情報及びスレッド情報の記憶にも用いられる。シ
ーケンサ50は、モードレジスタ51に記憶されたタス
ク情報、スレッド情報及びモード情報に従って、第1及
び第2のレジスタセット11,12と、演算器15と、
Mレジスタ16と、命令フェッチユニット40と、第
1、第2及び第3のマルチプレクサ60,61,62と
の各々の動作を制御する。
The sequencer 50 includes a mode register 51 for storing "mode information" indicating a current operation mode for each thread, an internal interrupt process, and an external interrupt INT.
And an interrupt processing handler 52 for executing the above processing. First and second register sets 11 and 12
Is used as a scalar register set, each of the two threads is in scalar mode. First
When the second register set 11 and the second register set 12 are used as a binary vector register set, one thread is in the main vector mode and the other thread is in the slave vector mode. The mode register 51 is also used for storing the task information and the thread information. According to the task information, thread information, and mode information stored in the mode register 51, the sequencer 50 includes first and second register sets 11 and 12,
It controls the operation of each of the M register 16, the instruction fetch unit 40, and the first, second, and third multiplexers 60, 61, and 62.

【0016】図2は、図1の情報処理装置のスカラモー
ドにおけるパイプライン動作の具体例を示している。こ
こでは、第1のプログラムカウンタ41と第1のレジス
タセット11とがタスク1の命令列(A0,A1,A
2,A3,A4,…)を実行するためのスレッド1を構
成し、かつ第2のプログラムカウンタ42と第2のレジ
スタセット12とがタスク2の命令列(B0,…)を実
行するためのスレッド2を構成するものとする。これら
2個のスレッドは、演算器15を共有する。命令A0,
A1,A2,A3,A4及びB0は、いずれもスカラ命
令である。このうち、2個の命令A0及びB0は、各々
レジスタ間接アドレス指定のロード命令である。他の4
個の命令A1,A2,A3及びA4は、各々レジスタ算
術演算命令である。なお、図2中の命令INST以外の
行は、いずれの命令の実行に係るデータ又はアドレスで
あるかを表している。
FIG. 2 shows a specific example of the pipeline operation in the scalar mode of the information processing apparatus of FIG. Here, the first program counter 41 and the first register set 11 store the instruction sequence (A0, A1, A1
2, A3, A4,...), And the second program counter 42 and the second register set 12 execute the instruction sequence (B0,. It is assumed that a thread 2 is configured. These two threads share the arithmetic unit 15. Instruction A0,
A1, A2, A3, A4 and B0 are all scalar instructions. The two instructions A0 and B0 are load instructions for register indirect addressing. The other four
Each of the instructions A1, A2, A3, and A4 is a register arithmetic operation instruction. Note that the lines other than the instruction INST in FIG. 2 indicate which instruction is the data or address related to the execution of the instruction.

【0017】図2によれば、サイクル1では、第1のプ
ログラムカウンタ41から供給されたアドレスに応じて
メモリユニット20からフェッチされた命令A0が、シ
ーケンサ50によりデコードされる。このデコードの結
果から、命令A0がレジスタ間接アドレス指定のスカラ
ロード命令であることが認識される。そして、第1のレ
ジスタセット11の中の指定された2個のレジスタの記
憶アドレスが、読出しポートRD11,RD12に読出
される。
Referring to FIG. 2, in cycle 1, the instruction A0 fetched from the memory unit 20 in accordance with the address supplied from the first program counter 41 is decoded by the sequencer 50. From the result of this decoding, it is recognized that the instruction A0 is a scalar load instruction specifying the register indirect address. Then, the storage addresses of the two designated registers in the first register set 11 are read to the read ports RD11 and RD12.

【0018】サイクル2では、第1の読出しポートRD
11上のアドレスと第2の読出しポートRD12上のア
ドレスとの加算、すなわち命令A0に係るアドレス計算
が演算器15により実行される。また、第2のプログラ
ムカウンタ42から供給されたアドレスに応じてメモリ
ユニット20からフェッチされた命令B0が、シーケン
サ50によりデコードされる。このデコードの結果か
ら、命令B0がレジスタ間接アドレス指定のスカラロー
ド命令であることが認識される。そして、第2のレジス
タセット12の中の指定された2個のレジスタの記憶ア
ドレスが、読出しポートRD21,RD22に読出され
る。
In cycle 2, the first read port RD
The arithmetic unit 15 performs addition of the address on the address 11 and the address on the second read port RD12, that is, the address calculation according to the instruction A0. The instruction B0 fetched from the memory unit 20 according to the address supplied from the second program counter 42 is decoded by the sequencer 50. From the result of this decoding, it is recognized that the instruction B0 is a scalar load instruction specifying the register indirect address. Then, the storage addresses of the two designated registers in the second register set 12 are read to the read ports RD21 and RD22.

【0019】サイクル3では、演算器15によるアドレ
ス計算の結果が、ロード命令A0に係るデータアクセス
のためのアドレスADRSとしてメモリユニット20へ
供給される。また、第1の読出しポートRD21上のア
ドレスと第2の読出しポートRD22上のアドレスとの
加算、すなわち命令B0に係るアドレス計算が演算器1
5により実行される。更に、第1のプログラムカウンタ
41から供給されたアドレスに応じてメモリユニット2
0からフェッチされた命令A1が、シーケンサ50によ
りデコードされる。このデコードの結果から、命令A1
がスカラレジスタ算術演算命令であることが認識され
る。そして、第1のレジスタセット11の中の指定され
た2個のレジスタの記憶データが、読出しポートRD1
1,RD12に読出される。
In cycle 3, the result of the address calculation by the arithmetic unit 15 is supplied to the memory unit 20 as an address ADRS for data access according to the load instruction A0. The addition of the address on the first read port RD21 and the address on the second read port RD22, that is, the address calculation related to the instruction B0 is performed by the arithmetic unit 1
5 is performed. Further, according to the address supplied from the first program counter 41, the memory unit 2
The instruction A1 fetched from 0 is decoded by the sequencer 50. From the result of this decoding, the instruction A1
Is a scalar register arithmetic operation instruction. Then, the storage data of the two specified registers in the first register set 11 is stored in the read port RD1.
1, RD12.

【0020】サイクル4では、命令A0に応じてメモリ
ユニット20から読出されたデータが第1のレジスタセ
ット11の書込みポートWT1へ供給され、該データが
第1のレジスタセット11の中の指定されたレジスタに
書込まれる。これにより、命令A0の実行が完了する。
また、演算器15によるアドレス計算の結果が、ロード
命令B0に係るデータアクセスのためのアドレスADR
Sとしてメモリユニット20へ供給される。更に、第1
の読出しポートRD11上のデータと第2の読出しポー
トRD12上のデータとの算術演算、すなわち命令A1
に係るスカラ算術演算が演算器15により実行される。
更にまた、第1のプログラムカウンタ41から供給され
たアドレスに応じてメモリユニット20からフェッチさ
れた命令A2が、シーケンサ50によりデコードされ
る。このデコードの結果から、命令A2がスカラレジス
タ算術演算命令であることが認識される。そして、第1
のレジスタセット11の中の指定された2個のレジスタ
の記憶データが、読出しポートRD11,RD12に読
出される。
In cycle 4, data read from memory unit 20 in response to instruction A0 is supplied to write port WT1 of first register set 11, and the data is designated in first register set 11. Written to a register. Thus, the execution of the instruction A0 is completed.
The result of the address calculation by the arithmetic unit 15 is the address ADR for data access related to the load instruction B0.
S is supplied to the memory unit 20 as S. Furthermore, the first
Arithmetic operation of the data on the read port RD11 of the first instruction and the data on the second read port RD12, that is, the instruction A1
Is executed by the arithmetic unit 15.
Further, the instruction A2 fetched from the memory unit 20 according to the address supplied from the first program counter 41 is decoded by the sequencer 50. From the decoding result, it is recognized that the instruction A2 is a scalar register arithmetic operation instruction. And the first
The stored data of the two designated registers in the register set 11 is read out to the read ports RD11 and RD12.

【0021】サイクル5では、命令B0に応じてメモリ
ユニット20から読出されたデータが第2のレジスタセ
ット12の書込みポートWT2へ供給され、該データが
第2のレジスタセット12の中の指定されたレジスタに
書込まれる。この際、メモリユニット20から第2のレ
ジスタセット12へのデータ転送にデータバスが使用さ
れる。したがって、演算器15による演算の結果、すな
わち命令A1に係るスカラ算術演算の結果は、Mレジス
タ16に一時記憶される構成になっている。また、第1
の読出しポートRD11上のデータと第2の読出しポー
トRD12上のデータとの算術演算、すなわち命令A2
に係るスカラ算術演算が演算器15により実行される。
更に、第1のプログラムカウンタ41から供給されたア
ドレスに応じてメモリユニット20からフェッチされた
命令A3が、シーケンサ50によりデコードされる。こ
のデコードの結果から、命令A3がスカラレジスタ算術
演算命令であることが認識される。そして、第1のレジ
スタセット11の中の指定された2個のレジスタの記憶
データが、読出しポートRD11,RD12に読出され
る。
In cycle 5, the data read from the memory unit 20 in response to the instruction B0 is supplied to the write port WT2 of the second register set 12, and the data is designated in the second register set 12. Written to a register. At this time, a data bus is used for data transfer from the memory unit 20 to the second register set 12. Therefore, the result of the operation by the operation unit 15, that is, the result of the scalar arithmetic operation according to the instruction A1 is temporarily stored in the M register 16. Also, the first
Arithmetic operation on the data on the read port RD11 and the data on the second read port RD12, that is, the instruction A2
Is executed by the arithmetic unit 15.
Further, the instruction A3 fetched from the memory unit 20 according to the address supplied from the first program counter 41 is decoded by the sequencer 50. From the result of this decoding, it is recognized that the instruction A3 is a scalar register arithmetic operation instruction. Then, the storage data of the two designated registers in the first register set 11 is read to the read ports RD11 and RD12.

【0022】サイクル6では、Mレジスタ16に一時記
憶されていた演算結果、すなわち命令A1に係るスカラ
算術演算の結果が第1のレジスタセット11の書込みポ
ートWT1へ供給され、該結果が第1のレジスタセット
11の中の指定されたレジスタに書込まれる。また、命
令A2に係るスカラ算術演算の結果は、Mレジスタ16
に一時記憶される。更に、第1の読出しポートRD11
上のデータと第2の読出しポートRD12上のデータと
の算術演算、すなわち命令A3に係るスカラ算術演算が
演算器15により実行される。更にまた、第1のプログ
ラムカウンタ41から供給されたアドレスに応じてメモ
リユニット20からフェッチされた命令A4が、シーケ
ンサ50によりデコードされる。このデコードの結果か
ら、命令A4がスカラレジスタ算術演算命令であること
が認識される。そして、第1のレジスタセット11の中
の指定された2個のレジスタの記憶データが、読出しポ
ートRD11,RD12に読出される。
In cycle 6, the operation result temporarily stored in the M register 16, that is, the result of the scalar arithmetic operation related to the instruction A1, is supplied to the write port WT1 of the first register set 11, and the result is stored in the first register set WT1. The data is written to the designated register in the register set 11. The result of the scalar arithmetic operation related to the instruction A2 is stored in the M register 16
Is temporarily stored. Further, the first read port RD11
The arithmetic operation of the above data and the data on the second read port RD12, that is, the scalar arithmetic operation related to the instruction A3 is executed by the arithmetic unit 15. Furthermore, the instruction A4 fetched from the memory unit 20 according to the address supplied from the first program counter 41 is decoded by the sequencer 50. From the decoding result, it is recognized that the instruction A4 is a scalar register arithmetic operation instruction. Then, the storage data of the two designated registers in the first register set 11 is read to the read ports RD11 and RD12.

【0023】以上のとおり、スカラモードでは、第1及
び第2のレジスタセット11,12の各々がスカラレジ
スタセットとして使用される。そして、タスク1のスカ
ラ命令列とタスク2のスカラ命令列とが、マルチスレッ
ド型パイプライン方式で並列実行される。
As described above, in the scalar mode, each of the first and second register sets 11 and 12 is used as a scalar register set. Then, the scalar instruction sequence of task 1 and the scalar instruction sequence of task 2 are executed in parallel by a multi-thread pipeline method.

【0024】図3は、図1の情報処理装置におけるスカ
ラモードからベクトルモードへの移行処理の例を示して
いる。スレッド1がタスク1の命令列を、スレッド2が
タスク2の命令列をそれぞれスカラモードで実行してい
るものとする。このとき、スレッド1の一部を構成する
第1のプログラムカウンタ41から供給されたアドレス
に応じてメモリユニット20からベクトル命令がフェッ
チされ、かつ該フェッチされたベクトル命令がシーケン
サ50によってデコードされると、該シーケンサ50に
内部割込みが発生する。割込み処理ハンドラ52は、割
込み要因を調べてスレッド1でベクトル命令割込みが発
生したことをステップS1で確認すると、ステップS3
及びS4へ処理を進める。ステップS3では、スレッド
2に割付けられたタスク2の実行が停止され、かつスレ
ッド2の資源(第2のレジスタセット12の記憶内容)
が退避される。ステップS4では、割込み処理ハンドラ
52は、スレッド1を主ベクトルモードへ、スレッド2
を従ベクトルモードへそれぞれ移行させる。これに応じ
てモードレジスタ51の記憶内容が更新された後、タス
ク1の実行へ復帰する。なお、スレッド2でベクトル命
令割込みが発生した場合には、ステップS2において、
スレッド1の停止及び資源退避と、スレッド2の主ベク
トルモードへの移行と、スレッド1の従ベクトルモード
への移行とが行われる。
FIG. 3 shows an example of processing for shifting from the scalar mode to the vector mode in the information processing apparatus of FIG. It is assumed that the thread 1 executes the instruction sequence of the task 1 and the thread 2 executes the instruction sequence of the task 2 in the scalar mode. At this time, when a vector instruction is fetched from the memory unit 20 according to the address supplied from the first program counter 41 constituting a part of the thread 1, and the fetched vector instruction is decoded by the sequencer 50, , An internal interrupt occurs in the sequencer 50. The interrupt handler 52 checks the cause of the interrupt and confirms in step S1 that a vector instruction interrupt has occurred in the thread 1, and then proceeds to step S3.
Then, the process proceeds to S4. In step S3, the execution of the task 2 assigned to the thread 2 is stopped, and the resources of the thread 2 (the contents stored in the second register set 12)
Is evacuated. In step S4, the interrupt processing handler 52 sets the thread 1 to the main vector mode,
To the slave vector mode. After the contents stored in the mode register 51 are updated in response to this, the process returns to the execution of the task 1. When a vector instruction interrupt occurs in the thread 2, in step S2,
The thread 1 stops and saves resources, the thread 2 shifts to the main vector mode, and the thread 1 shifts to the slave vector mode.

【0025】図4は、図1の情報処理装置のベクトルモ
ードにおけるパイプライン動作の例を示している。ここ
では、第1のプログラムカウンタ41と第1のレジスタ
セット11とで構成されたスレッド1が主ベクトルモー
ドであり、第2のプログラムカウンタ42と第2のレジ
スタセット12とで構成されたスレッド2が従ベクトル
モードであるものとする。そして、スレッド1及び2が
タスク1のベクトル命令列(V0,V1,V2,…)を
実行するものとする。命令V0はレジスタ間接アドレス
指定のロード命令であり、命令V1及びV2は各々レジ
スタ加算命令である。
FIG. 4 shows an example of a pipeline operation in the vector mode of the information processing apparatus of FIG. Here, the thread 1 composed of the first program counter 41 and the first register set 11 is in the main vector mode, and the thread 2 composed of the second program counter 42 and the second register set 12 Is a slave vector mode. Then, it is assumed that the threads 1 and 2 execute the vector instruction sequence (V0, V1, V2,...) Of the task 1. The instruction V0 is a load instruction specifying a register indirect address, and the instructions V1 and V2 are register addition instructions.

【0026】図4によれば、ロード命令V0の実行手順
は次のとおりである。すなわち、サイクル1では、第1
のプログラムカウンタ41から供給されたアドレスに応
じてメモリユニット20からフェッチされた命令V0
が、シーケンサ50によりデコードされる。このデコー
ドの結果から、命令V0がレジスタ間接アドレス指定の
ベクトルロード命令であることが認識される。そして、
第1のレジスタセット11の中の指定された2個のレジ
スタRi,Rjの記憶アドレスが、読出しポートRD1
1,RD12に読出される。サイクル2では、第1の読
出しポートRD11上のアドレスと第2の読出しポート
RD12上のアドレスとの加算、すなわち命令V0に係
る第1ベクトル要素D0のアドレス計算(Ri+Rj)
が演算器15により実行される。サイクル3では、演算
器15によるアドレス計算(Ri+Rj)の結果が、ロ
ード命令V0に係る第1のデータアクセスのためのアド
レスADRSとしてメモリユニット20へ供給される。
また、サイクル3では、命令V0に係る第2ベクトル要
素D1のアドレス計算(Ri+Rj+a)が演算器15
により実行される。サイクル4では、メモリユニット2
0から読出された第1ベクトル要素D0が第1のレジス
タセット11の書込みポートWT1へ供給され、該第1
ベクトル要素D0が第1のレジスタセット11の中の指
定されたレジスタRkに書込まれる。また、サイクル4
では、演算器15によるアドレス計算(Ri+Rj+
a)の結果が、ロード命令V0に係る第2のデータアク
セスのためのアドレスADRSとしてメモリユニット2
0へ供給される。そして、サイクル5では、メモリユニ
ット20から読出された第2ベクトル要素D1が第2の
レジスタセット12の書込みポートWT2へ供給され、
該第2ベクトル要素D1が第2のレジスタセット12の
中の指定されたレジスタRkに書込まれる。以上の動作
によりベクトルロード命令V0の実行が完了する。その
結果、第1ベクトル要素D0と第2ベクトル要素D1と
で構成された2元ベクトルが、第1のレジスタセット1
1と第2のレジスタセット12とで構成された2元ベク
トルレジスタセットの中の指定された2元ベクトルレジ
スタRkに格納される。
Referring to FIG. 4, the execution procedure of the load instruction V0 is as follows. That is, in cycle 1, the first
Instruction V0 fetched from memory unit 20 according to the address supplied from program counter 41 of
Are decoded by the sequencer 50. From the result of this decoding, it is recognized that the instruction V0 is a vector load instruction specifying a register indirect address. And
The storage addresses of the two specified registers Ri and Rj in the first register set 11 are stored in the read port RD1.
1, RD12. In cycle 2, addition of the address on the first read port RD11 and the address on the second read port RD12, that is, the address calculation of the first vector element D0 according to the instruction V0 (Ri + Rj)
Is executed by the arithmetic unit 15. In cycle 3, the result of the address calculation (Ri + Rj) by the arithmetic unit 15 is supplied to the memory unit 20 as the address ADRS for the first data access according to the load instruction V0.
In the cycle 3, the address calculation (Ri + Rj + a) of the second vector element D1 related to the instruction V0 is performed by the arithmetic unit 15
Is executed by In cycle 4, memory unit 2
0 is supplied to the write port WT1 of the first register set 11, and the first vector element D0 read from
The vector element D0 is written to the designated register Rk in the first register set 11. Cycle 4
Then, the address calculation (Ri + Rj +
The result of a) is the memory unit 2 as the address ADRS for the second data access according to the load instruction V0.
0. Then, in cycle 5, the second vector element D1 read from the memory unit 20 is supplied to the write port WT2 of the second register set 12, and
The second vector element D1 is written to a designated register Rk in the second register set 12. With the above operation, the execution of the vector load instruction V0 is completed. As a result, a binary vector composed of the first vector element D0 and the second vector element D1 is stored in the first register set 1
It is stored in a specified binary vector register Rk in a binary vector register set composed of the first and second register sets 12.

【0027】加算命令V1の実行手順は次のとおりであ
る。すなわち、サイクル3では、第1のプログラムカウ
ンタ41から供給されたアドレスに応じてメモリユニッ
ト20からフェッチされた命令V1が、シーケンサ50
によりデコードされる。このデコードの結果から、命令
V1がベクトルレジスタ加算命令であることが認識され
る。そして、第1のレジスタセット11の中の指定され
た2個のレジスタR0,R1の記憶データが、読出しポ
ートRD11,RD12に読出される。サイクル4で
は、第1の読出しポートRD11上のデータと第2の読
出しポートRD12上のデータとの加算、すなわち命令
V1に係る第1ベクトル要素の加算(R0+R1)が演
算器15により実行される。また、サイクル4では、第
2のレジスタセット12の中の指定された2個のレジス
タR0,R1の記憶データが、読出しポートRD21,
RD22に読出される。サイクル5では、演算器15に
よる加算の結果、すなわち命令V1に係る第1ベクトル
要素の加算(R0+R1)の結果が、Mレジスタ16に
一時記憶される。また、サイクル5では、第1の読出し
ポートRD21上のデータと第2の読出しポートRD2
2上のデータとの加算、すなわち命令V1に係る第2ベ
クトル要素の加算(R0+R1)が演算器15により実
行される。サイクル6では、Mレジスタ16に一時記憶
されていた加算結果、すなわち命令V1に係る第1ベク
トル要素の加算(R0+R1)の結果が第1のレジスタ
セット11の書込みポートWT1へ供給され、該結果が
第1のレジスタセット11の中の指定されたレジスタR
0に書込まれる。また、サイクル6では、演算器15に
よる加算の結果、すなわち命令V1に係る第2ベクトル
要素の加算(R0+R1)の結果が、Mレジスタ16に
一時記憶される。そして、サイクル7では、Mレジスタ
16に一時記憶されていた加算結果、すなわち命令V1
に係る第2ベクトル要素の加算(R0+R1)の結果が
第2のレジスタセット12の書込みポートWT2へ供給
され、該結果が第2のレジスタセット12の中の指定さ
れたレジスタR0に書込まれる。以上の動作によりベク
トルレジスタ加算命令V1の実行が完了する。その結
果、第1のレジスタセット11と第2のレジスタセット
12とで構成された2元ベクトルレジスタセットの中の
指定された2個のベクトルレジスタR0,R1の記憶内
容の和が、指定されたベクトルレジスタR0に格納され
る。なお、図4には、次のベクトルレジスタ加算命令V
2の実行過程において、第1のレジスタセット11の中
の指定された2個のレジスタRx,Ryの記憶データが
読出しポートRD11,RD12に読出されることまで
が示されている。
The execution procedure of the addition instruction V1 is as follows. That is, in cycle 3, the instruction V1 fetched from the memory unit 20 according to the address supplied from the first program counter 41 is transmitted to the sequencer 50.
Is decoded by From the result of this decoding, it is recognized that the instruction V1 is a vector register addition instruction. Then, the storage data of the two designated registers R0 and R1 in the first register set 11 is read to the read ports RD11 and RD12. In cycle 4, the arithmetic unit 15 performs addition of the data on the first read port RD11 and the data on the second read port RD12, that is, the addition (R0 + R1) of the first vector element according to the instruction V1. In the cycle 4, the data stored in the two specified registers R0 and R1 in the second register set 12 are stored in the read ports RD21 and RD21.
Read to RD22. In cycle 5, the result of the addition by the arithmetic unit 15, that is, the result of the addition (R0 + R1) of the first vector element according to the instruction V1, is temporarily stored in the M register 16. In the cycle 5, the data on the first read port RD21 and the second read port RD2
The arithmetic unit 15 performs the addition with the data on the second 2, that is, the addition (R0 + R1) of the second vector element according to the instruction V1. In cycle 6, the addition result temporarily stored in the M register 16, that is, the result of the addition (R0 + R1) of the first vector element according to the instruction V1, is supplied to the write port WT1 of the first register set 11, and the result is Specified register R in the first register set 11
Written to 0. In the cycle 6, the result of the addition by the computing unit 15, that is, the result of the addition (R0 + R1) of the second vector element according to the instruction V1 is temporarily stored in the M register 16. Then, in cycle 7, the addition result temporarily stored in M register 16, that is, instruction V1
Is supplied to the write port WT2 of the second register set 12, and the result is written to the designated register R0 in the second register set 12. With the above operation, the execution of the vector register addition instruction V1 is completed. As a result, the sum of the storage contents of the specified two vector registers R0 and R1 in the binary vector register set composed of the first register set 11 and the second register set 12 is specified. It is stored in the vector register R0. FIG. 4 shows the next vector register addition instruction V
2 shows that the storage data of the two designated registers Rx and Ry in the first register set 11 are read out to the read ports RD11 and RD12 in the execution process of No. 2.

【0028】以上のとおり、スカラモードでは第1及び
第2のレジスタセット11,12の各々がスカラレジス
タセットとして使用されるのに対し、ベクトルモードで
は第1及び第2のレジスタセット11,12が2元ベク
トルレジスタセットとして使用される。つまり、2元ベ
クトル命令を実行するタスクには第1及び第2のレジス
タセット11,12が2元ベクトルレジスタセットとし
て自動的に割付けられる結果、ハードウェア資源の高効
率利用が達成される。
As described above, in the scalar mode, each of the first and second register sets 11 and 12 is used as a scalar register set, whereas in the vector mode, the first and second register sets 11 and 12 are used. Used as a binary vector register set. In other words, the first and second register sets 11 and 12 are automatically allocated to the task of executing the binary vector instruction as a binary vector register set, so that efficient use of hardware resources is achieved.

【0029】さて、スレッド1及び2がベクトルモード
でタスク1の命令列を実行している間にメモリユニット
20からスカラモードへの復帰のための専用割込み命令
がフェッチされ、かつ該フェッチされた専用割込み命令
がシーケンサ50によってデコードされると、該シーケ
ンサ50に内部割込みが発生する。割込み処理ハンドラ
52は、スカラモードへの復帰のための専用割込み命令
がフェッチされたことを確認すると、スレッド1及び2
をそれぞれスカラモードへ移行させる。これに応じて、
モードレジスタ51の記憶内容が更新される。従ベクト
ルモードであったスレッド2では、退避されていた第2
のレジスタセット12の記憶内容の復帰が行われた後
に、タスク2の復帰アドレスからその実行が再開され
る。主ベクトルモードであったスレッド1では、引き続
きタスク1が実行される。
Now, while the threads 1 and 2 are executing the instruction sequence of the task 1 in the vector mode, a dedicated interrupt instruction for returning to the scalar mode from the memory unit 20 is fetched, and the fetched dedicated instruction is issued. When the interrupt instruction is decoded by the sequencer 50, an internal interrupt occurs in the sequencer 50. Upon confirming that the dedicated interrupt instruction for returning to the scalar mode has been fetched, the interrupt processing handler 52 checks the threads 1 and 2
To the scalar mode. In response,
The content stored in the mode register 51 is updated. In the thread 2 that was in the slave vector mode, the second
After the storage contents of the register set 12 are restored, the execution is resumed from the return address of the task 2. In the thread 1 in the main vector mode, the task 1 is continuously executed.

【0030】以上のとおり、図1の情報処理装置によれ
ば、その動作中にフェッチされた命令の種類に応じて動
的にモード切換えが行われるので、行列演算の有無など
のプログラムの特質に適応したハードウェア資源の利用
が達成される。
As described above, according to the information processing apparatus of FIG. 1, the mode is dynamically switched in accordance with the type of the instruction fetched during the operation. Adaptive hardware resource utilization is achieved.

【0031】図5は、本発明に係るマルチスレッド型パ
イプライン方式の情報処理装置の他の構成例を示してい
る。図5の情報処理装置では、スレッド数が3に拡張さ
れている。図5において、データパスユニット10は、
第1及び第2のレジスタセット11,12と、演算器1
5と、Mレジスタ16とに加えて、複数個のレジスタ
(R0,R1,R2,…)を有する第3のレジスタセッ
ト13を備えている。第3のレジスタセット13は、1
つの書込みポートWT3と、第1及び第2の読出しポー
トRD31,RD32とを備えている。また、図5の命
令フェッチユニット40は、第1及び第2のプログラム
カウンタ41,42と、第1及び第2の命令バッファ4
5,46とに加えて、第3のプログラムカウンタ(PC
3)43と、第3の命令バッファ(IB3)47とを備
えている。図5中の他の構成は、図1と同様である。
FIG. 5 shows another example of the configuration of a multithread pipeline type information processing apparatus according to the present invention. In the information processing apparatus of FIG. 5, the number of threads is expanded to three. In FIG. 5, the data path unit 10 includes:
First and second register sets 11 and 12 and a computing unit 1
5, a third register set 13 having a plurality of registers (R0, R1, R2,...) In addition to the M register 16 and the M register 16. The third register set 13 includes 1
It has two write ports WT3 and first and second read ports RD31 and RD32. The instruction fetch unit 40 shown in FIG. 5 includes first and second program counters 41 and 42 and first and second instruction buffers 4 and 4.
5 and 46, and a third program counter (PC
3) 43, and a third instruction buffer (IB3) 47. Other configurations in FIG. 5 are the same as those in FIG.

【0032】図5の情報処理装置では、第1、第2及び
第3のレジスタセット11,12,13の各々をスカラ
レジスタセットとして使用してスカラ命令を実行するス
カラモードと、第1、第2及び第3のレジスタセット1
1,12,13のうちの2個のレジスタセットを2元ベ
クトルレジスタセットとして使用してベクトル命令を実
行するベクトルモードとが切換えられる。つまり、ベク
トル命令を実行する1個のタスクと、スカラ命令のみを
実行する他の1個のタスクとの同時処理が可能である。
In the information processing apparatus shown in FIG. 5, a scalar mode for executing a scalar instruction using each of the first, second and third register sets 11, 12, and 13 as a scalar register set is provided. 2nd and 3rd register set 1
A vector mode in which two vector sets among 1, 12, and 13 are used as a binary vector register set to execute a vector instruction is switched. That is, it is possible to simultaneously process one task that executes a vector instruction and another task that executes only a scalar instruction.

【0033】図6〜図8は、図5の情報処理装置におけ
るスカラモードからベクトルモードへの移行処理の例を
示している。ここで、スレッド1がタスク1の命令列
を、スレッド2がタスク2の命令列を、スレッド3がタ
スク3の命令列をそれぞれスカラモードで実行している
ものとする。このとき、スレッド1の一部を構成する第
1のプログラムカウンタ41から供給されたアドレスに
応じてメモリユニット20からベクトル命令がフェッチ
され、かつ該フェッチされたベクトル命令がシーケンサ
50によってデコードされると、該シーケンサ50に内
部割込みが発生する。割込み処理ハンドラ52は、図6
に示すように、割込み要因を調べてスレッド1でベクト
ル命令割込みが発生したことをステップS11で確認
し、かつスレッド2がスカラモードであることをモード
レジスタ51の記憶内容からステップS13で確認する
と、ステップS14及びS15へ処理を進める。ステッ
プS14では、スレッド2に割付けられたタスク2の実
行が停止され、かつスレッド2の資源(第2のレジスタ
セット12の記憶内容)が退避される。ステップS15
では、割込み処理ハンドラ52は、スレッド1を主ベク
トルモードへ、スレッド2を従ベクトルモードへそれぞ
れ移行させる。これに応じてモードレジスタ51の記憶
内容が更新された後、タスク1の実行へ復帰する。この
際、スレッド3はスカラモードを維持する。したがっ
て、タスク3の処理は継続される。なお、スレッド2又
は3でベクトル命令割込みが発生した場合には、ステッ
プS12において、各々の場合に応じた割込み受付け処
理が実行される。
FIGS. 6 to 8 show an example of the process of shifting from the scalar mode to the vector mode in the information processing apparatus of FIG. Here, it is assumed that the thread 1 executes the instruction sequence of the task 1, the thread 2 executes the instruction sequence of the task 2, and the thread 3 executes the instruction sequence of the task 3 in the scalar mode. At this time, when a vector instruction is fetched from the memory unit 20 according to the address supplied from the first program counter 41 constituting a part of the thread 1, and the fetched vector instruction is decoded by the sequencer 50, , An internal interrupt occurs in the sequencer 50. The interrupt handler 52 is configured as shown in FIG.
As shown in (2), when the cause of the interrupt is checked to confirm that the vector instruction interrupt has occurred in the thread 1 in step S11, and that the thread 2 is in the scalar mode is confirmed in step S13 from the storage contents of the mode register 51, The process proceeds to steps S14 and S15. In step S14, the execution of the task 2 assigned to the thread 2 is stopped, and the resources of the thread 2 (the contents stored in the second register set 12) are saved. Step S15
Then, the interrupt handler 52 shifts the thread 1 to the main vector mode and the thread 2 to the slave vector mode. After the contents stored in the mode register 51 are updated in response to this, the process returns to the execution of the task 1. At this time, the thread 3 maintains the scalar mode. Therefore, the processing of task 3 is continued. When a vector instruction interrupt occurs in the thread 2 or 3, an interrupt accepting process corresponding to each case is executed in step S12.

【0034】スレッド1でベクトル命令割込みが発生し
ており、かつスレッド2及び3が既にベクトルモードへ
移行している場合には、割込み処理ハンドラ52は、図
6中のステップS13から図7中のステップS21へ処
理を進める。ここで、スレッド2及び3がベクトルモー
ドであっても、該スレッド2及び3のうちの主ベクトル
モードのスレッドよりもスレッド1が高い優先順位を持
つことがステップS21〜S23で確認されると、割込
み処理ハンドラ52は、ステップS24〜S29へ処理
を進める。その結果、スレッド2及び3のベクトルモー
ドが解除され、スレッド1が主ベクトルモードへ、スレ
ッド2が従ベクトルモードへそれぞれ移行する。この
際、スカラモードの待機タスクがある場合には、該待機
タスクがスレッド3に割当てられる。スレッド2及び3
のうちの主ベクトルモードのスレッドよりもスレッド1
が高い優先順位を持たないことがステップS21〜S2
3で確認されると、割込み処理ハンドラ52は、スレッ
ド1の主ベクトルモードへの移行を待たせるように、図
8中のステップS31〜S34へ処理を進める。この
際、スカラモードの待機タスクがある場合には、該待機
タスクがスレッド1に割当てられる。
When a vector instruction interrupt has occurred in the thread 1 and the threads 2 and 3 have already shifted to the vector mode, the interrupt processing handler 52 proceeds from step S13 in FIG. 6 to step S13 in FIG. The process proceeds to step S21. Here, even if the threads 2 and 3 are in the vector mode, if it is confirmed in steps S21 to S23 that the thread 1 has a higher priority than the thread in the main vector mode among the threads 2 and 3, The interrupt handler 52 proceeds to steps S24 to S29. As a result, the thread 2 and the thread 3 are released from the vector mode, and the thread 1 shifts to the master vector mode and the thread 2 shifts to the slave vector mode. At this time, if there is a waiting task in the scalar mode, the waiting task is assigned to the thread 3. Threads 2 and 3
Thread 1 than thread in main vector mode
Do not have a high priority in steps S21 and S2.
When confirmed in step 3, the interrupt processing handler 52 advances the processing to steps S31 to S34 in FIG. 8 so as to wait for the transition of the thread 1 to the main vector mode. At this time, if there is a waiting task in the scalar mode, the waiting task is assigned to the thread 1.

【0035】図5の情報処理装置におけるベクトルモー
ドからスカラモードへの復帰は、図1の場合と同様であ
るので、説明を省略する。
Returning from the vector mode to the scalar mode in the information processing apparatus shown in FIG. 5 is the same as that in the case shown in FIG.

【0036】図9は、図5の情報処理装置における外部
割込みINTの受付け処理の例を示している。外部割込
みINTの処理はスレッド資源の停止及び退避処理を必
要とする。ベクトルモードのスレッド資源の退避に比べ
て、スカラモードのスレッド資源の退避の方が簡便であ
るという事情がある。そこで、割込み処理ハンドラ52
は、図9中のステップS41〜S45に従って、スカラ
モードのスレッドに優先的に外部割込みの処理を実行さ
せる。これにより、ベクトルモードのタスクを中断する
機会を減らすことができる。
FIG. 9 shows an example of a process of accepting an external interrupt INT in the information processing apparatus of FIG. The processing of the external interrupt INT requires stopping and saving the thread resources. There is a situation in which saving thread resources in scalar mode is easier than saving thread resources in vector mode. Therefore, the interrupt handler 52
Causes the thread in the scalar mode to execute the external interrupt process preferentially in accordance with steps S41 to S45 in FIG. As a result, it is possible to reduce opportunities to interrupt the task in the vector mode.

【0037】なお、4個以上のスレッドを有する情報処
理装置への拡張は、図5から明らかであろう。一般化す
れば、複数個のレジスタセットのうちの個々のレジスタ
セットをスカラレジスタセットとして使用してスカラ命
令を実行するスカラモードと、該複数個のレジスタセッ
トのうちのN個(Nは2以上の整数)のレジスタセット
をN元ベクトルレジスタセットとして使用してベクトル
命令を実行するベクトルモードとが切換えられる。
The extension to the information processing apparatus having four or more threads will be apparent from FIG. In general, a scalar mode in which a scalar instruction is executed by using an individual register set among a plurality of register sets as a scalar register set, and a scalar mode of N (where N is 2 or more) among the plurality of register sets Is switched to a vector mode in which a vector instruction is executed by using the register set of (i.

【0038】スカラモードにおいてベクトル命令を含む
関数の呼び出し命令(CALL命令)が実行されたとき
にベクトルモードへ切換え、ベクトルモードにおいてベ
クトル命令を含まない関数への復帰命令(RETUEN
命令)が実行されたときにスカラモードへ切換えること
としてもよい。また、複数個のスレッドの各々に割付け
られたタスクがベクトル命令を実行するタスクであるか
否かを示す情報をオペレーティングシステムに持たせて
おき、該情報に応じて、タスク切換えの際に、次の実行
タスクがベクトル命令を実行するタスクであればベクト
ルモードへ切換え、次の実行タスクがベクトル命令を実
行しないタスクであればスカラモードへ切換えることと
してもよい。
When a call instruction (CALL instruction) for a function including a vector instruction is executed in the scalar mode, the mode is switched to the vector mode, and in the vector mode, a return instruction to a function not including the vector instruction (RETUEN) is issued.
(Instruction), the mode may be switched to the scalar mode. In addition, the operating system has information indicating whether or not the task assigned to each of the plurality of threads is a task for executing a vector instruction. If the execution task is a task that executes a vector instruction, the mode is switched to the vector mode, and if the next execution task is a task that does not execute the vector instruction, the mode is switched to the scalar mode.

【0039】[0039]

【発明の効果】以上説明してきたとおり、本発明に係る
マルチスレッド型の情報処理装置によれば、複数個のレ
ジスタセットを個々にスカラレジスタセットとして使用
するモードと、そのうちのN個(Nは2以上の整数)の
レジスタセットをベクトルレジスタセットとして使用す
るモードとを自由に切換えることができるようにしたの
で、行列演算の有無などのプログラムの特質に適応して
情報処理の高速化を達成しつつ、ハードウェア資源の利
用効率を高めることができる。
As described above, according to the multi-thread information processing apparatus according to the present invention, a mode in which a plurality of register sets are individually used as scalar register sets, and N modes (N is (2 or more integers) register set can be freely switched to a mode in which the register set is used as a vector register set, so that the speed of information processing can be increased by adapting to program characteristics such as the presence or absence of matrix operation. In addition, the utilization efficiency of hardware resources can be improved.

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

【図1】本発明に係る情報処理装置の構成例を示すブロ
ック図である。
FIG. 1 is a block diagram illustrating a configuration example of an information processing apparatus according to the present invention.

【図2】図1の情報処理装置のスカラモードにおける動
作例を示すタイミングチャート図である。
FIG. 2 is a timing chart illustrating an operation example of the information processing apparatus in FIG. 1 in a scalar mode.

【図3】図1の情報処理装置におけるスカラモードから
ベクトルモードへの移行処理の例を示すフローチャート
図である。
FIG. 3 is a flowchart illustrating an example of a transition process from a scalar mode to a vector mode in the information processing apparatus in FIG. 1;

【図4】図1の情報処理装置のベクトルモードにおける
動作例を示すタイミングチャート図である。
FIG. 4 is a timing chart illustrating an operation example of the information processing apparatus of FIG. 1 in a vector mode.

【図5】本発明に係る情報処理装置の他の構成例を示す
ブロック図である。
FIG. 5 is a block diagram illustrating another configuration example of the information processing apparatus according to the present invention.

【図6】図5の情報処理装置におけるスカラモードから
ベクトルモードへの移行処理の例を示すフローチャート
図である。
FIG. 6 is a flowchart illustrating an example of a transition process from a scalar mode to a vector mode in the information processing apparatus of FIG. 5;

【図7】図6に続く処理の例を示すフローチャート図で
ある。
FIG. 7 is a flowchart illustrating an example of processing subsequent to FIG. 6;

【図8】図7に続く処理の例を示すフローチャート図で
ある。
FIG. 8 is a flowchart illustrating an example of processing subsequent to FIG. 7;

【図9】図5の情報処理装置における外部割込みの受付
け処理の例を示すフローチャート図である。
9 is a flowchart illustrating an example of an external interrupt acceptance process in the information processing apparatus of FIG. 5;

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

10 データパスユニット 11,12,13 レジスタセット 15 演算器(演算手段) 16 Mレジスタ 20 メモリユニット 30 制御ユニット(制御手段) 40 命令フェッチユニット 41,42,43 プログラムカウンタ 45,46,47 命令バッファ 50 シーケンサ 51 モードレジスタ 52 割込み処理ハンドラ 60,61,62 マルチプレクサ Reference Signs List 10 data path unit 11, 12, 13 register set 15 arithmetic unit (operation unit) 16 M register 20 memory unit 30 control unit (control unit) 40 instruction fetch unit 41, 42, 43 program counter 45, 46, 47 instruction buffer 50 Sequencer 51 Mode register 52 Interrupt handler 60, 61, 62 Multiplexer

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 マルチスレッド型の情報処理装置であっ
て、 各々複数個のレジスタを有し、かつ各々1個のスレッド
に属する複数個のレジスタセットと、 前記複数個のスレッドに共有されるように、前記複数個
のレジスタセットから供給されたデータに基づいて演算
を実行するための演算手段と、 前記複数個のレジスタセットのうちの個々のレジスタセ
ットをスカラレジスタセットとして使用してスカラ命令
を実行するスカラモードと、前記複数個のレジスタセッ
トのうちのN個(Nは2以上の整数)のレジスタセット
をN元ベクトルレジスタセットとして使用してベクトル
命令を実行するベクトルモードとを切換えるように、前
記複数個のレジスタセットと前記演算手段とを制御する
ための制御手段とを備えたことを特徴とする情報処理装
置。
1. A multi-thread type information processing apparatus, comprising: a plurality of register sets each having a plurality of registers, each of which belongs to one thread, and shared by the plurality of threads. Computing means for performing an operation based on data supplied from the plurality of register sets; and a scalar instruction using each of the plurality of register sets as a scalar register set. A scalar mode to be executed and a vector mode to execute a vector instruction by using N (N is an integer of 2 or more) register sets of the plurality of register sets as an N-ary vector register set. Information processing apparatus, comprising: a control unit for controlling the plurality of register sets and the arithmetic unit. Place.
【請求項2】 請求項1記載の情報処理装置において、 前記制御手段は、前記情報処理装置の動作中に発生する
事象に応じて、前記スカラモード及び前記ベクトルモー
ドのうちのいずれかへ動的に切換える機能を有すること
を特徴とする情報処理装置。
2. The information processing apparatus according to claim 1, wherein the control unit dynamically switches to one of the scalar mode and the vector mode in response to an event occurring during operation of the information processing apparatus. An information processing apparatus having a function of switching to an information processing device.
【請求項3】 請求項1記載の情報処理装置において、 前記制御手段は、前記スカラモードにおいてベクトル命
令がフェッチされたときに発生する内部割込みに応答し
て前記ベクトルモードへ切換え、かつ前記ベクトルモー
ドにおいて専用割込み命令がフェッチ又はデコードされ
たときに発生する内部割込みに応答して前記スカラモー
ドへ切換える機能を有することを特徴とする情報処理装
置。
3. The information processing apparatus according to claim 1, wherein said control means switches to said vector mode in response to an internal interrupt generated when a vector instruction is fetched in said scalar mode, and said vector mode. An information processing apparatus having a function of switching to the scalar mode in response to an internal interrupt generated when a dedicated interrupt instruction is fetched or decoded.
【請求項4】 請求項1記載の情報処理装置において、 前記制御手段は、前記スカラモードにおいてベクトル命
令を含む関数の呼び出し命令が実行されたときに前記ベ
クトルモードへ切換え、かつ前記ベクトルモードにおい
てベクトル命令を含まない関数への復帰命令が実行され
たときに前記スカラモードへ切換える機能を有すること
を特徴とする情報処理装置。
4. The information processing apparatus according to claim 1, wherein said control means switches to said vector mode when a call instruction of a function including a vector instruction is executed in said scalar mode, and said vector means in said vector mode. An information processing apparatus having a function of switching to the scalar mode when a return instruction to a function not including an instruction is executed.
【請求項5】 請求項1記載の情報処理装置において、 前記制御手段は、前記複数個のスレッドの各々に割付け
られたタスクがベクトル命令を実行するタスクであるか
否かを示す情報に応じて、タスク切換えの際に、次の実
行タスクがベクトル命令を実行するタスクであれば前記
ベクトルモードへ切換え、かつ次の実行タスクがベクト
ル命令を実行しないタスクであれば前記スカラモードへ
切換える機能を有することを特徴とする情報処理装置。
5. The information processing apparatus according to claim 1, wherein the control unit responds to information indicating whether a task assigned to each of the plurality of threads is a task for executing a vector instruction. When the task is switched, if the next execution task is a task that executes a vector instruction, the task is switched to the vector mode, and if the next execution task is a task that does not execute a vector instruction, the function is switched to the scalar mode. An information processing apparatus characterized by the above-mentioned.
【請求項6】 請求項1記載の情報処理装置において、 前記制御手段は、前記複数個のスレッドのうちのスカラ
モードのスレッドに優先的に、外部割込みの処理を実行
させる機能を有することを特徴とする情報処理装置。
6. The information processing apparatus according to claim 1, wherein the control unit has a function of causing a thread in a scalar mode among the plurality of threads to execute an external interrupt process with priority. Information processing device.
JP9009407A 1997-01-22 1997-01-22 Information processor Withdrawn JPH10207720A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9009407A JPH10207720A (en) 1997-01-22 1997-01-22 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9009407A JPH10207720A (en) 1997-01-22 1997-01-22 Information processor

Publications (1)

Publication Number Publication Date
JPH10207720A true JPH10207720A (en) 1998-08-07

Family

ID=11719566

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9009407A Withdrawn JPH10207720A (en) 1997-01-22 1997-01-22 Information processor

Country Status (1)

Country Link
JP (1) JPH10207720A (en)

Similar Documents

Publication Publication Date Title
EP1023659B1 (en) Efficient processing of clustered branch instructions
JP2645669B2 (en) Data processing system
AU639953B2 (en) Data processing system with instruction tag apparatus
US6671827B2 (en) Journaling for parallel hardware threads in multithreaded processor
US5872985A (en) Switching multi-context processor and method overcoming pipeline vacancies
US6944850B2 (en) Hop method for stepping parallel hardware threads
US5640524A (en) Method and apparatus for chaining vector instructions
US20090119671A1 (en) Registers for data transfers
EP1368732B1 (en) Digital signal processing apparatus
EP0312764A2 (en) A data processor having multiple execution units for processing plural classes of instructions in parallel
WO1998013759A1 (en) Data processor and data processing system
WO2007140428A2 (en) Multi-threaded processor with deferred thread output control
JPH0766329B2 (en) Information processing equipment
US5473763A (en) Interrupt vector method and apparatus
US5099421A (en) Variable length pipe operations sequencing
US9886278B2 (en) Computing architecture and method for processing data
JPS63191253A (en) Preference assigner for cache memory
JPH10207720A (en) Information processor
CN117083594A (en) Method and apparatus for desynchronized execution in a vector processor
JPH0279122A (en) Floating point arithmetic mechanism
JPH10269079A (en) Information processor provided with multiple pipelines
JPH08328859A (en) Virtual parallel arithmetic unit applied to vliw computer
JPH0855034A (en) Arithmetic processor and interrupt processing system using the processor
JPH03163627A (en) Instruction processor
JPH10149341A (en) Matching and synchronization for assymetrical single chip double multi-processor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20040406