JP5392810B2 - Instruction issue control device and instruction issue control method - Google Patents
Instruction issue control device and instruction issue control method Download PDFInfo
- Publication number
- JP5392810B2 JP5392810B2 JP2008234632A JP2008234632A JP5392810B2 JP 5392810 B2 JP5392810 B2 JP 5392810B2 JP 2008234632 A JP2008234632 A JP 2008234632A JP 2008234632 A JP2008234632 A JP 2008234632A JP 5392810 B2 JP5392810 B2 JP 5392810B2
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- vector
- register
- unit
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title description 22
- 239000013598 vector Substances 0.000 claims description 364
- 239000000872 buffer Substances 0.000 claims description 103
- 238000004458 analytical method Methods 0.000 claims description 54
- 238000003672 processing method Methods 0.000 claims description 4
- 230000005764 inhibitory process Effects 0.000 claims description 2
- 238000000354 decomposition reaction Methods 0.000 description 38
- 230000006870 function Effects 0.000 description 29
- 230000008569 process Effects 0.000 description 19
- 238000010586 diagram Methods 0.000 description 18
- 238000004364 calculation method Methods 0.000 description 16
- 238000012725 vapour phase polymerization Methods 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 239000000284 extract Substances 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000010200 validation analysis Methods 0.000 description 2
- 230000003139 buffering effect Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Images
Landscapes
- Advance Control (AREA)
- Complex Calculations (AREA)
Description
本発明は、主にベクトル演算命令発行制御に関する。 The present invention mainly relates to vector operation instruction issue control.
近年、プロセッサなどのハードウェア装置は、命令実行の速度がより速くなるように改善されており、一サイクルで同時に複数の命令を発行して実行することが可能になっている。例えば、ベクトル処理装置では、ベクトル命令を複数の演算器を用いて並列して実行している。ハードウェア装置の性能を改善する技術が例えば、特許文献1、2に開示されている。
In recent years, hardware devices such as processors have been improved so as to increase the speed of instruction execution, and a plurality of instructions can be issued and executed simultaneously in one cycle. For example, in a vector processing apparatus, vector instructions are executed in parallel using a plurality of arithmetic units. Technologies for improving the performance of hardware devices are disclosed in, for example,
ベクトル命令を実行するベクトル処理装置では、ベクトルレジスタを用いて、ベクトル命令を実行し、演算結果をテンポラリレジスタに一時的に格納する演算処理命令と、テンポラリレジスタに格納した演算結果をベクトルレジスタへ転送する演算結果転送命令とに分解して実行している。
ベクトル処理装置において、演算レジスタが1ポートRAM(Random Access Memory)で構成される場合に、演算命令実行時に演算処理命令によるレジスタからの読み出し処理と、演算結果転送命令による演算結果の書き込み処理とを実行するため、RAMへのアクセスが競合してしまうことがあった。 In a vector processing device, when an arithmetic register is composed of a 1-port RAM (Random Access Memory), a read process from a register by an arithmetic process instruction and an arithmetic result write process by an arithmetic result transfer instruction at the time of execution of the arithmetic instruction As a result, access to the RAM may compete.
これは、LSI(large Scale Integration)の面積を小さくするために演算レジスタその他のハードウェア量を最小限に抑える必要があるため、1ポートRAMを採用するためである。具体的には、1ポートRAM、すなわち、あるタイミングで読み出し処理または書き込み処理のどちらか一方を実行可能なRAMを採用するため、RAMへのアクセスが競合するという問題があった。 This is because a one-port RAM is used because it is necessary to minimize the amount of hardware such as arithmetic registers in order to reduce the area of an LSI (large scale integration). Specifically, since a 1-port RAM, that is, a RAM that can execute either a read process or a write process at a certain timing, is employed, there is a problem that access to the RAM competes.
また、LSIコスト削減の観点から論理演算部が占める面積を小さくするために演算レジスタその他のハードウェア量最小化は永年の課題である。従って、1ポートRAMを採用せざるをえない状況において、レジスタからの読み出し処理と演算結果の書き込み処理とで競合が発生してしまう構成においても演算性能向上が求められていた。 Also, minimizing the amount of arithmetic registers and other hardware has been a long-standing issue in order to reduce the area occupied by the logical operation unit from the viewpoint of LSI cost reduction. Therefore, in a situation where a 1-port RAM has to be adopted, there has been a demand for improvement in calculation performance even in a configuration in which contention occurs between the reading process from the register and the writing process of the calculation result.
本発明の目的は、効率的にベクトル命令が実行可能なベクトル処理装置及び方法を提供することにある。 An object of the present invention is to provide a vector processing apparatus and method capable of efficiently executing vector instructions.
本発明に係るベクトル処理装置の一態様は、ベクトル命令を受け付け、ベクトル命令の発行を管理するベクトル命令制御手段と、ベクトル命令制御手段から発行されたベクトル命令を受け付け、ベクトルレジスタを用いて、ベクトル命令を、演算結果をテンポラリレジスタに一時的に格納する演算処理命令と、テンポラリレジスタに格納した演算結果をベクトルレジスタへ転送する演算結果転送命令とに分解して実行するベクトル演算手段とを備えるベクトル処理装置であって、前記ベクトル命令制御手段は、実行待ちベクトル命令を、演算処理命令と演算結果転送命令に分解した状態で格納する命令発行待機バッファ手段と、ベクトル命令を受け付け、前記受け付けたベクトル命令が使用するテンポラリレジスタを決定し、前記受け付けたベクトル命令のオペランドに指定されたレジスタ番号がテンポラリレジスタと一致する場合、前記受け付けたベクトル命令のオペランドレジスタを前記テンポラリレジスタにリネームし、前記受け付けたベクトル命令と前記リネームしたベクトル命令とのいずれかについて、前記演算処理命令と前記演算結果転送命令とに分離して前記命令発行待機バッファ手段へ格納する命令解析手段と、前記実行待ちベクトル命令のうち書き込み先のベクトルレジスタが同じを解析し、同一ベクトルレジスタに格納する、先行して実行される演算処理命令を検出し、検出した演算処理命令に対応する演算結果転送命令発行を中止させる待機命令制御手段と、前記実行待ちベクトル命令の発行を管理する命令発行管理手段と、を備える。 One aspect of the vector processing apparatus according to the present invention is a vector instruction control unit that receives a vector instruction and manages the issuance of vector instructions, a vector instruction issued from the vector instruction control unit, and uses a vector register to A vector comprising: an operation processing instruction that temporarily stores an operation result in a temporary register; and a vector operation means that decomposes and executes an operation result instruction that transfers the operation result stored in the temporary register to a vector register In the processing apparatus, the vector instruction control means stores an execution waiting vector instruction in a state of being decomposed into an operation processing instruction and an operation result transfer instruction, accepts a vector instruction, and receives the received vector Determine the temporary register used by the instruction and accept the If the register number specified for the operand of the Kuttle instruction matches the temporary register, the operand register of the accepted vector instruction is renamed to the temporary register, and either the accepted vector instruction or the renamed vector instruction An instruction analysis unit that separates the arithmetic processing instruction and the operation result transfer instruction and stores the instruction in the instruction issuance waiting buffer unit; Waiting instruction control means for detecting an arithmetic processing instruction to be executed in advance, stored in a register, and canceling the issuance of an arithmetic result transfer instruction corresponding to the detected arithmetic processing instruction, and managing the issuance of the execution waiting vector instruction Command issue management means.
また、本発明に係るベクトル処理方法の一態様は、実行待ちベクトル命令を、演算結果をテンポラリレジスタに一時的に格納する演算処理命令と、テンポラリレジスタに格納した演算結果をベクトルレジスタへ転送する演算結果転送命令とに分解した状態で格納する命令発行待機バッファ手段を備えるベクトル処理方法であって、ベクトル命令を受け付け、前記受け付けたベクトル命令が使用するテンポラリレジスタを決定し、前記受け付けたベクトル命令のオペランドに指定されたレジスタ番号がテンポラリレジスタと一致する場合、前記受け付けたベクトル命令のオペランドレジスタを前記テンポラリレジスタにリネームし、前記受け付けたベクトル命令と前記リネームしたベクトル命令とのいずれかについて、前記演算処理命令と前記演算結果転送命令とに分離して前記命令発行待機バッファ手段へ格納し、前記実行待ちベクトル命令のうち書き込み先のベクトルレジスタが同じを解析し、同一ベクトルレジスタに格納する、先行して実行される演算処理命令を検出し、検出した演算処理命令に対応する演算結果転送命令発行を中止させ、前記実行待ちベクトル命令の発行を管理し、ベクトル命令を実行するベクトル演算手段へ出力する。 According to another aspect of the vector processing method of the present invention, an execution waiting vector instruction, an operation processing instruction for temporarily storing an operation result in a temporary register, and an operation for transferring the operation result stored in the temporary register to the vector register are provided. A vector processing method comprising instruction issue waiting buffer means for storing a result transfer instruction in a state of being decomposed, accepting a vector instruction, determining a temporary register used by the accepted vector instruction, If the register number specified for the operand matches the temporary register, the operand register of the accepted vector instruction is renamed to the temporary register, and the operation is performed on either the accepted vector instruction or the renamed vector instruction. Processing instructions and said It is separated into calculation result transfer instructions and stored in the instruction issue waiting buffer means, and the execution destination vector register of the execution waiting vector instructions is analyzed for the same and stored in the same vector register. An arithmetic processing instruction is detected, the operation result transfer instruction issuance corresponding to the detected arithmetic processing instruction is stopped, the issuance of the execution waiting vector instruction is managed, and output to the vector arithmetic means for executing the vector instruction.
本発明によれば、効率的にベクトル命令を実行することが可能となる。 According to the present invention, it is possible to execute a vector instruction efficiently.
以下、本発明の実施形態について、図面を参照しながら説明する。説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。各図面において同一の構成または機能を有する構成要素および相当部分には、同一の符号を付し、その説明は省略する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. For clarity of explanation, the following description and drawings are omitted and simplified as appropriate. In the drawings, components having the same configuration or function and corresponding parts are denoted by the same reference numerals and description thereof is omitted.
(実施形態1)
実施形態では、ベクトル命令を分割した演算処理命令と演算結果転送命令のうち、演算結果転送命令の実行を制御することによって、ベクトル命令の実行の効率化を図る一態様を説明する。本発明の実施の形態について図面を参照して詳細に説明する。図1は、本発明の実施形態1に係るベクトル処理装置の命令発行機構の概略を示すブロック図である。ベクトル処理装置は、スカラープロセッシングユニット(以下、適宜「SPU」と記す)1、ベクトル命令制御部(以下、適宜「VIC」と記す)2、及びベクトル演算パイプ部(以下、適宜「VPP」と記す)を備える。
(Embodiment 1)
In the embodiment, an aspect of improving the efficiency of execution of a vector instruction by controlling the execution of the operation result transfer instruction among the operation processing instruction and the operation result transfer instruction obtained by dividing the vector instruction will be described. Embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing an outline of an instruction issue mechanism of the vector processing apparatus according to the first embodiment of the present invention. The vector processing apparatus includes a scalar processing unit (hereinafter referred to as “SPU” as appropriate) 1, a vector instruction control unit (hereinafter referred to as “VIC” as appropriate) 2, and a vector operation pipe unit (hereinafter referred to as “VPP” as appropriate). ).
図1において、スカラープロセッシングユニット1は、VPP30〜37の演算リソースを使うベクトル命令を識別してVIC2に送出する機能を持つ。
In FIG. 1, the
ベクトル命令制御部(ベクトル命令制御手段)2は、SPU1から受けたベクトル命令をバッファリングし、演算リソースのビジーを管理し、適切なタイミングでベクトル命令の実行指示をVPP30〜37に送出する。
The vector instruction control unit (vector instruction control means) 2 buffers the vector instruction received from the
ベクトル演算パイプ部30〜37は、VIC2から受けたベクトル命令実行指示に従って指定のベクトル演算処理を実行する。ここでは、8つのベクトル演算パイプ部30〜37を備える場合を示しているが、この数に限られるわけではない。また、以降の説明では、ベクトル演算パイプ部30〜37の全体を示す場合、ベクトル演算部(ベクトル演算手段)3という。
The vector
続いて、VIC2の構成を説明する。VIC2は、命令解析手段41、待機命令制御手段42、命令発行管理手段43、及び命令発行待機バッファ部204から構成される。
Next, the configuration of the
命令解析手段41は、ベクトル命令を受け付け、受け付けたベクトル命令が使用するテンポラリレジスタを決定する。そして、受け付けたベクトル命令のオペランドに指定されたレジスタ番号がテンポラリレジスタと一致する場合、受け付けたベクトル命令のオペランドレジスタをテンポラリレジスタにリネームする。さらに、受け付けたベクトル命令と前記リネームしたベクトル命令とのいずれかについて、演算処理命令と演算結果転送命令とに分離して命令発行待機バッファ部204へ格納する。命令解析手段41は、ベクトル命令バッファ部201、命令間依存関係解析部202、及び、命令分解およびリネーム処理部203を備える。
The instruction analysis means 41 receives a vector instruction and determines a temporary register used by the received vector instruction. When the register number specified in the operand of the accepted vector instruction matches the temporary register, the operand register of the accepted vector instruction is renamed to the temporary register. Further, either the received vector instruction or the renamed vector instruction is separated into an operation processing instruction and an operation result transfer instruction and stored in the instruction issue
また、待機命令制御手段42は、実行待ちベクトル命令のうち書き込み先のベクトルレジスタが同じを解析し、同一ベクトルレジスタに格納する、先行して実行される演算処理命令を検出し、検出した演算処理命令に対応する演算結果転送命令発行を中止させる。待機命令制御手段42は、同一VR書き込み認識部208、TR番号使用認識部209、及びリタイア命令無効化処理部210を備える。
The standby instruction control means 42 analyzes the same execution destination vector register among the execution waiting vector instructions, detects a previously executed arithmetic processing instruction stored in the same vector register, and detects the detected arithmetic processing. Stops issuing the operation result transfer instruction corresponding to the instruction. The standby command control means 42 includes an identical VR
命令発行管理手段43は、実行待ちベクトル命令の発行を管理する。命令発行管理手段43は、命令発行チェック部205、命令発行部206、及び、パスビジー管理部207を備える。
The instruction
以上各手段の機能の概略を説明したが、命令解析手段41、待機命令制御手段42、及び命令発行管理手段43に含まれる各構成要素、及び命令発行待機バッファ部204について詳細に説明する。
The outline of the function of each means has been described above, but each component included in the instruction analysis means 41, the standby instruction control means 42, and the instruction issue management means 43, and the instruction issue
ベクトル命令バッファ部201は、SPU1より受け取ったベクトル命令を一旦バッファリングする。SPU1から受け取るベクトル命令には、ベクトル命令の書き込み先レジスタ番号、VL長情報が含まれる。ベクトル命令バッファ部201は、命令発行待機バッファ部204がビジーで無ければバッファリングしたベクトル命令を読み出すとともにベクトル命令に対してIDを付与して命令間依存関係解析部202に送出する。「命令発行待機バッファ部204がビジー」とは、命令発行待機バッファ部204に空きがない状態をいう。また、命令発行待機バッファ部204がビジーである場合、ベクトル命令バッファ部201は、命令発行待機バッファ部204のビジー状態が解消されるまで待つ。このとき、SPU1より命令が送出され続けると、自己のメモリが一杯になり、SPU1からの命令を保持できないため、ベクトル命令バッファ部201は、SPU1へビジー信号を送信し、命令の送出停止を指示する。
The vector
命令間依存関係解析部202は、ベクトル命令バッファ部201よりベクトル命令とIDとを受け取り、命令依存情報の生成し、ベクトル命令、ID、及び命令依存情報を命令分解およびリネーム処理部203へ送出する。具体的には、命令間依存関係解析部202は、受け取ったベクトル命令と命令分解およびリネーム処理部203および命令発行待機バッファ部204に存在する先行ベクトル命令とのレジスタ依存関係を解析し、解析した結果を命令依存情報として生成する。命令間依存関係は、Read after Write、Write after Read、Write after Write、または、依存関係なしのいずれかの情報となる。
The inter-instruction
また、命令間依存関係解析部202に存在するベクトル命令の書き込み先レジスタ番号およびVL長情報およびIDを同一VR書き込み認識部208に送出する。命令間依存関係解析部202に存在するベクトル命令とは、ベクトル命令バッファ部201から送出されたベクトル命令である。命令間依存関係解析部202は、ベクトル命令バッファ部201から送出されたベクトル命令を保持し、次に新たなベクトル命令が送出されたときに、差し替えられる(上書きされる)。すなわち、命令間依存関係解析部202は、ベクトル命令バッファ部201から送出された最新のベクトル命令(一つ)を保持している。
Further, the write destination register number, VL length information and ID of the vector instruction existing in the inter-instruction
命令分解およびリネーム処理部203は、命令間依存関係解析部202より受け取ったベクトル命令が使用する演算結果格納用のテンポラリレジスタ領域を決定する。また、演算オペランドに指定されたレジスタ番号(VR番号)がテンポラリレジスタ(TR)に存在する場合にはオペランドに指定されたレジスタをテンポラリレジスタにリネームして、その情報を命令分解およびリネーム処理部203内のリネームテーブルに保持する。
The instruction decomposition and
図2にリネームテーブルの一例を示す。図2では、結果格納レジスタ番号が1種類である場合を示している。リネームテーブルに保持されたエントリを削除するタイミングはテンポラリレジスタからベクトルレジスタへの演算結果転送命令(リタイア命令)が発行されたタイミングである。命令発行待機バッファ部204内に格納されている未実行命令のオペランドにテンポラリレジスタ番号が含まれていない場合、エントリがリセットされることになる。すなわち、未実行命令のオペランドにテンポラリレジスタ番号が含まれている場合、転送命令を発行しないことが前提となっているため、結果として、エントリがリセットされることはない。
FIG. 2 shows an example of the rename table. FIG. 2 shows a case where the result storage register number is one type. The timing at which the entry held in the rename table is deleted is the timing at which the operation result transfer instruction (retire instruction) from the temporary register to the vector register is issued. If the temporary register number is not included in the operand of the unexecuted instruction stored in the instruction issue
また、命令分解およびリネーム処理部203は、ベクトル命令をリネームした後に、ベクトル命令を演算結果格納用のテンポラリレジスタ領域に格納するまでの演算処理命令と、演算結果格納用のテンポラリレジスタ領域からレジスタに演算結果を転送する演算結果転送命令の2つに分解する。命令分解およびリネーム処理部203は、2つに分解されたベクトル命令(演算処理命令及び演算結果転送命令)、命令間依存関係解析部202から受け取った命令間依存情報及びIDを命令発行待機バッファ部204に送出する。さらにリネームした後のベクトル命令情報をTR番号使用認識部209に送出する。
The instruction disassembly and rename
命令発行待機バッファ部204は、次の(1)〜(5)の機能を有する。(1)命令分解およびリネーム処理部203から受け取った分解されたベクトル命令、命令間依存情報及びIDを格納し、ベクトル命令の発行チェックに必要な情報を命令発行チェック部205に送出する機能。(2)後述の命令発行チェック部205からIDとエントリリセット指示を受け取り、指示のあったIDに対応するエントリを一定期間後にリセットする機能。さらに(3)リタイア命令無効化処理部210から命令発行待機バッファ部204内リタイア命令の格納フィールドにリタイア命令無効化禁止フラグが有効では無い場合に、リタイア命令無効化処理部210から受け取ったIDに対応する演算結果転送命令を無効化する機能。(4)リタイア命令無効化処理部210からリタイア命令無効化禁止フラグ有効化信号を受け取ると命令発行待機バッファ部204内に格納されている全ての演算結果転送命令の格納フィールドのリタイア命令無効化禁止フラグを有効とする機能。(5)リタイア命令無効化処理部210から受け取ったオペランド入力ベクトルレジスタ番号に対してライトするリタイア命令格納フィールドのリタイア命令無効化禁止フラグを有効とする機能。
The instruction issue
命令発行チェック部205は、命令発行待機バッファ部204からベクトル命令の発行チェックに必要な情報として命令間依存情報を受け、命令間依存関係が無く発行可能な命令の中から適切なベクトル命令を選択する。また、命令発行チェック部205は、その選択したベクトル命令で使用する演算器や各種データ転送パスなどの演算リソースビジー情報を後述のパスビジー管理部207から受け取り、使用する演算リソースすべてにおいてビジーではないという条件を確認すると発行確定と判断して命令発行部206およびパスビジー管理部207に発行確定となったベクトル命令を送出する。
The instruction
命令発行部206は、命令発行チェック部205より発行確定となったベクトル命令を受け取り、後述するベクトル演算部3でのベクトル命令実行に必要な情報の生成を行ってベクトル演算部3に送出する機能を持つ。
The
パスビジー管理部207は、命令発行チェック部205から発行確定となったベクトル命令を受け取り、そのベクトル命令が使用する演算リソースそれぞれについてビジー情報を管理する機能と、すべての演算リソースのビジー情報を命令発行チェック部205に送出する機能を持つ。ここでは、命令発行部206は、VPP30〜37が同時に動作を開始するように指示することを前提としている。このため、パスビジー管理部207は、VPP30から37の一つのビジー情報を管理する。ここでは、VPP30〜37が同時に動作を開始するように指示することを前提としている。例えば、VPP30のVR303、VRR309のビジー情報(使用中であるか否か)を管理する。
The path
同一VR書き込み認識部208は、ベクトル命令の書き込み先レジスタ番号およびVL長情報を命令間依存関係解析部202から受け取る。同一VR書き込み認識部208は、命令間依存関係解析部202に存在する(受け取った)ベクトル命令の書き込み先レジスタ番号と、命令分解およびリネーム処理部203、命令発行待機バッファ部204に存在するベクトル命令の書き込み先レジスタ番号を比較して一致したベクトル命令のIDをすべてTR番号使用認識部209に送出する。具体的には、(1)命令間依存関係解析部202が保持するベクトル命令の書き込み先レジスタ番号と、命令分解およびリネーム処理部203が保持するベクトル命令の書き込み先レジスタ番号比較し、一致するベクトル命令の書き込み先レジスタ番号を抽出する。続いて、(2)命令間依存関係解析部202が保持するベクトル命令の書き込み先レジスタ番号と、命令発行待機バッファ部204が保持するベクトル命令の書き込み先レジスタ番号比較し、一致するベクトル命令の書き込み先レジスタ番号を抽出する。(3)上記(1)、(2)で抽出したベクトル命令の書き込み先レジスタ番号をTR番号使用認識部209へ送出する。
The same VR write
また、同一VR書き込み認識部208は、命令間依存関係解析部202から通知された、直近の演算命令のVL長情報を自己の記憶領域に保持する。同一VR書き込み認識部208は、保持しているVL長情報(直近のVL長情報)と命令間依存関係解析部202から受け取ったVL長情報を比較して、命令間依存関係解析部202から受け取ったVL長が小さい場合にはリタイア命令無効化禁止信号をTR番号使用認識部209に送出する。同一VR書き込み認識部208は、比較処理後、今回命令間依存関係解析部202から受け取ったVL長情報を直近のVL長情報として保持する(書き換える)。なお、同一VR書き込み認識部208は、直近のVL長情報として、初期値(ここでは、零)を保持する。
Further, the same VR write
TR番号使用認識部209は、命令分解およびリネーム処理部203からリネーム処理が終わったベクトル命令を受け取り、その入力オペランドが前記同一VR書き込み認識部208で一致が確認されたレジスタ番号からテンポラリレジスタ番号にリネームされていることを確認できた場合は同一VR書き込み認識部208から受け取ったIDを有効としてリタイア命令無効化処理部210に送出する。また、入力オペランドにベクトルレジスタが指定されている場合にはそのオペランド入力ベクトルレジスタ番号を最大オペランド数分リタイア命令無効化処理部210に送出する。すなわち、リネーム後のベクトル命令のオペランドにリネームされなかったレジスタ番号がある場合、リネームされなかったレジスタ番号すべてをリタイア命令無効化処理部210に送出する。例えばベクトル命令にオペランドが2つの場合、最大オペランド数は2となる。テンポラリレジスタが指定されている場合には特別な動作は行わない。また、TR番号使用認識部209は同一VR書き込み認識部208から受け取ったリタイア命令無効化禁止信号をリタイア命令無効化処理部210に送出する機能を持つ。
The TR number
リタイア命令無効化処理部210は、TR番号使用認識部209からIDとリタイア命令無効化禁止信号を受け取り、リタイア命令無効化禁止信号が有効でない場合は受け取ったIDに対応する演算結果転送命令を無効化する指示を命令発行待機バッファ部204に送出する機能を持つ。また、リタイア命令無効化処理部210はTR番号使用認識部209からリタイア命令無効化禁止信号を受け取ると命令発行待機バッファ部204に対してリタイア命令無効化禁止フラグ有効化信号を送出する機能をもつ。さらに、リタイア命令無効化処理部210はTR番号使用認識部209から受け取ったオペランド入力ベクトルレジスタ番号を命令発行待機バッファ部204に対して送出する機能をもつ。
The retirement instruction
ここで、VL長が小さくなるとリタイア命令無効化を抑止する理由は、同一VR番号に格納する演算命令が複数あった時に後続演算命令でVL長が小さくなったにもかかわらず先行命令を無効化してしまうとVLの差分に対応するデータがベクトルレジスタに書き込まれないという現象を防止するためである。アーキテクチャによっては許されるケースもあると思われるが、ここでは除外して考える。 Here, the reason why the retired instruction invalidation is inhibited when the VL length becomes small is that when there are a plurality of arithmetic instructions stored in the same VR number, the preceding instruction is invalidated even though the VL length becomes small in the subsequent arithmetic instruction. This is to prevent the phenomenon that the data corresponding to the VL difference is not written to the vector register. Depending on the architecture, there may be cases where it is allowed, but we will exclude it here.
先行するベクトル命令のVL長よりも後続のベクトル命令のVL長が大きい場合は、先行ベクトル命令のリタイア命令を無効化しても後続ベクトル命令のリタイア命令でベクトルレジスタに最新の演算結果が格納されるのでデータ一貫性の観点から見ても問題無い。従って、本実施形態では、先行するベクトル命令よりVL長が大きくなる場合、演算結果転送命令を無効化する。これにより、VL長が大きい場合に演算結果転送命令を無効化しない場合に比べ、演算結果転送命令を実行させる回数をより削減すること可能になる。 If the VL length of the subsequent vector instruction is larger than the VL length of the preceding vector instruction, the latest operation result is stored in the vector register by the retired instruction of the subsequent vector instruction even if the retired instruction of the preceding vector instruction is invalidated. So there is no problem from the viewpoint of data consistency. Therefore, in this embodiment, when the VL length becomes longer than the preceding vector instruction, the operation result transfer instruction is invalidated. Thereby, it is possible to further reduce the number of times that the operation result transfer instruction is executed when the operation result transfer instruction is not invalidated when the VL length is large.
なお、VIC2の各構成要素が備えるレジスタは、動作開始時にリセットされ、初期値(例えば、零)に設定される。
Note that the registers included in each component of the
続いて、VPP30〜37の詳細を説明する。図3はベクトルパイプ部の構成例を示すブロック図である。VPP30〜37それぞれは同様の構成を有する。各VPPは、ロードデータ供給部301、レジスタ入力クロスバ302、ベクトルレジスタ303、レジスタ出力クロスバ304、タイミング調整FF(タイミング調整フリップフロップ)305、2入力セレクタ306、2入力セレクタ307、演算器308、テンポラリレジスタ309、ストアデータ送出部310、及びパイプライン制御部311を有する。
Next, details of the
ロードデータ供給部301は、後述パイプライン制御部311の指示に従ってメモリからロードしたデータを、レジスタ入力クロスバ302を通じてベクトルレジスタ303に送出する。
The load
レジスタ入力クロスバ302は、ロードデータ供給部301またはテンポラリレジスタ309の出力データを後述パイプライン制御部311の指示に従って選択し、ベクトルレジスタ303に送出する機能を持つ。
The
ベクトルレジスタ303は、本実施形態では4つの1ポートRAM(RAMそれぞれに入出力のポートを有する)から構成されており、時分割に割り当てられたポートを使って読み出し動作と書き込み動作を合計4多重に実施可能な機能を持つ。図4に、本実施形態におけるベクトルレジスタデータ要素格納イメージの一例を示す。以降の説明では、ベクトルレジスタ303の4つのRMAをRAM#0からRAM#3として説明する。
In this embodiment, the
レジスタ出力クロスバ304は、レジスタ、ベクトルレジスタ303から出力されたレジスタリードデータをパイプライン制御部311の指示に従って後述のタイミング調整FF305または2入力セレクタ307またはストアデータ送出部310に出力する機能を持つ。
The
タイミング調整FF305は、レジスタ出力クロスバ304から受けたレジスタリードデータを受け、1クロック後に2入力セレクタ306に送出する。
The
2入力セレクタ306は、パイプライン制御部311の指示に従ってタイミング調整FF305出力のデータまたは後述のテンポラリレジスタ309出力データのどちらかを選択して演算器308の演算オペランドデータとして送出する。
The 2-
2入力セレクタ307は、パイプライン制御部311の指示に従ってレジスタ出力クロスバ304出力のレジスタリードデータまたは後述のテンポラリレジスタ309出力データのどちらかを選択して演算器308の演算オペランドデータとして送出する。
The 2-
演算器308は、2入力セレクタ306および2入力セレクタ307の出力を演算オペランドデータとしてパイプライン制御部311の指示に従って演算を行い、演算結果データをテンポラリレジスタ309に出力する機能を持つ。
The
テンポラリレジスタ(VRR)309は、演算器308から受けた演算結果データを一時的に格納する機能を持つ。また、パイプライン制御部311からの指示に従ってテンポラリレジスタ領域からレジスタに演算結果を転送する演算結果転送命令として演算結果データを読み出してレジスタ入力クロスバ302に送出する機能と、パイプライン制御部311からの指示に従って読み出したデータを演算オペランドデータとして2入力セレクタ306または2入力セレクタ307に出力する機能を持つ。テンポラリレジスタ309は書き込みポートが1つと読み出しポートが3つの合計4ポートを備えたRAMで、前述の動作を同時に行うことが可能な機能を持つ。図5に、本実施形態におけるテンポラリレジスタデータ要素格納イメージの一例を示す。
The temporary register (VRR) 309 has a function of temporarily storing calculation result data received from the
ストアデータ送出部310は、パイプライン制御部311からの指示に従ってレジスタ出力クロスバ304より受けたレジスタリードデータをメモリに対してストア処理する機能を持つ。
The store
パイプライン制御部311はパイプライン制御部で、命令発行部206から発行されたベクトル命令を受け取って命令識別処理を行い、所定のタイミングで前述のロードデータ供給部301〜ストアデータ送出部310の各構成要素に対してデータ転送指示および演算指示を行う機能を持つ。
The
ベクトル命令は、一般に、ベクトルロード命令、ベクトルストア命令、ベクトル演算命令、マスク更新命令を含む。ベクトルロード命令は読み出しを行う命令、ベクトルストア命令は書き込みを行う命令、ベクトル演算命令は演算を行う命令、マスク更新命令は、マスクビットの操作を行う命令である。SPU1からベクトル命令バッファ部201へ送出されるベクトル命令は上述した4種類の命令が含まれている。ベクトル命令のうち、演算器308を使用する命令を「ベクトル演算命令」と呼び、区別する場合もある。しかし、本実施形態では特に区別せずにベクトル命令の名称を用いて説明する。
Vector instructions generally include vector load instructions, vector store instructions, vector operation instructions, and mask update instructions. The vector load instruction is a read instruction, the vector store instruction is a write instruction, the vector operation instruction is an operation instruction, and the mask update instruction is an instruction for operating a mask bit. The vector instructions sent from the
次に図面を参照して本実施形態の動作を示す。最初にベクトル命令1つのみの場合の動きを示し、次にベクトル命令が2つの場合の動作を説明する。まず、ベクトル命令が1つの場合の動作を説明する。ここで用いる命令列(命令1とする)の一例を次に示す。
V7 ← V0 + V1 VL = 8・・・・(命令1)
この命令は8要素分(VL=8)のレジスタV0とレジスタV1を算術和してレジスタV7に格納するベクトル命令である。ここで命令の要素数(VL)はベクトル演算パイプ部(VPP)30〜37それぞれが処理する要素数である。例えば、図1では、VL=8の場合、8個のVPP30〜37が処理するため、8*8=64個の要素を並列処理することが可能となる。
Next, the operation of this embodiment will be described with reference to the drawings. First, the operation in the case of only one vector instruction is shown, and then the operation in the case of two vector instructions will be described. First, the operation when there is one vector instruction will be described. An example of an instruction sequence (referred to as instruction 1) used here is as follows.
V7 ← V0 + V1 VL = 8 ... (Instruction 1)
This instruction is a vector instruction that arithmetically sums the registers V0 and V1 of 8 elements (VL = 8) and stores them in the register V7. Here, the number of elements (VL) of the instruction is the number of elements processed by each of the vector operation pipe units (VPP) 30 to 37. For example, in FIG. 1, when VL = 8, since 8
命令1がSPU1でベクトル命令と識別されてVIC2内のベクトル命令バッファ部201に送出される。
The
ベクトル命令バッファ部201は、SPU1より受け取ったベクトル命令を一旦バッファリングする。ベクトル命令バッファ部201は、命令発行待機バッファ部204がビジーで無いことを確認して、バッファリングしたベクトル命令を読み出すとともに、ベクトル命令に対してID 「0001」を付与して命令間依存関係解析部202に送出する。
The vector
命令間依存関係解析部202は、命令分解およびリネーム処理部203および命令発行待機バッファ部204に存在する先行ベクトル命令とのレジスタ依存関係を解析する。ここでは、命令分解およびリネーム処理部203および命令発行待機バッファ部204にはこの時点で命令が存在しないためRead after Write、Write after Read、Write after Writeの関係は無いという命令間依存情報とともにベクトル命令およびID 「0001」を命令分解およびリネーム処理部203に送出する。また、命令間依存関係解析部202は、自己に存在するベクトル命令(ベクトル命令バッファ部201から受け取ったベクトル命令)の書き込み先レジスタ番号、VL長情報、及びID 「0001」を同一VR書き込み認識部208に送出する。
The inter-instruction
同一VR書き込み認識部208は、ベクトル命令の書き込み先レジスタ番号およびVL長情報を命令間依存関係解析部202から受け取る。同一VR書き込み認識部208は、まず、命令間依存関係解析部202に存在するID 「0001」ベクトル命令の書き込み先レジスタ番号と、命令分解およびリネーム処理部203、命令発行待機バッファ部204に存在するベクトル命令の書き込み先レジスタ番号を比較する。ここでは、命令分解およびリネーム処理部203、命令発行待機バッファ部204には命令が存在しないので、同一VR書き込み認識部208は、一致無しの情報をTR番号使用認識部209に送出する。また、同一VR書き込み認識部208は、命令間依存関係解析部202から今回受け取ったVL長情報を保持する(保持していたVL長情報と差し替える)。
The same VR write
命令分解およびリネーム処理部203は、命令間依存関係解析部202より受け取ったベクトル命令(命令1)が使用する演算結果格納用のテンポラリレジスタ領域をT0と決定し、その情報を命令分解およびリネーム処理部203内のリネームテーブルに保持する。演算オペランドに指定されたレジスタ番号(VR番号)はテンポラリレジスタ(TR)に存在しないのでオペランドに指定されたレジスタはリネームしない。
The instruction decomposition and rename
また、命令分解およびリネーム処理部203は、リネームした後にベクトル命令(命令1)を演算結果格納用のテンポラリレジスタに格納するまでの演算処理命令(命令1−1)と、演算結果格納用のテンポラリレジスタ領域からレジスタに演算結果を転送する演算結果転送命令(命令1−2)の2つに分解する。命令1−1、1−2を次に示す。
T0 ← V0 + V1 VL = 8・・・・(命令1−1)
V7 ← T0 VL = 8・・・・(命令1−2)
The instruction disassembly and rename
T0 ← V0 + V1 VL = 8... (Instruction 1-1)
V7 ← T0 VL = 8... (Instruction 1-2)
このとき命令IDはそれぞれ「0001a」「0001b」となり、さらにテンポラリレジスタのRead after Writeの順序関係を守るために2つに分解された2番目の演算結果転送命令(命令1−2)は演算処理命令(命令1−1)に対する命令間依存関係情報を付与され、これらの情報と命令間依存関係解析部202から受け取った命令間依存情報を命令発行待機バッファ部204に送出する。
At this time, the instruction IDs are “0001a” and “0001b”, respectively, and the second operation result transfer instruction (instruction 1-2), which has been divided into two in order to keep the order relationship of Read after Write of the temporary register, is an arithmetic process. The inter-instruction dependency relationship information for the instruction (instruction 1-1) is given, and the inter-instruction dependency information received from the inter-instruction dependency
命令間依存関係情報は、分解された命令に対して付与される情報であり、分解した命令間において、同一テンポラリレジスタ番号に書き込んだ後読み出すという順序を守る必要があるため付与される。ここでは、ID「0001a」の命令でVRR309のレジスタT0に演算結果が書き込まれ、その後ID「0001b」の命令でT0に書き込まれた演算結果を読み出してV7レジスタに格納する。このときT0を介してID「0001b」の命令はID「0001a」の命令に対してRead after Writeの依存関係があることになる。
The inter-instruction dependency relationship information is information given to the decomposed instructions, and is given because it is necessary to keep the order of reading after writing to the same temporary register number between the decomposed instructions. Here, the operation result is written to the register T0 of the
TR番号使用認識部209は、命令分解およびリネーム処理部203からリネーム処理が終わったベクトル命令「V7 ← V0 + V1」を受け取り、その入力オペランドがテンポラリレジスタ番号にリネームされていることを確認できないことから同一VR書き込み認識部208から受け取ったIDを無効とする。また、上述のとおり同一VR書き込み認識部208の出力が一致無しなので、TR番号使用認識部209は、該当ID無しの情報をリタイア命令無効化処理部210に送出する。
The TR number
命令発行待機バッファ部204は、命令分解およびリネーム処理部203から受け取った分解されたベクトル命令(命令1−1および命令1−2)と命令間依存情報とID「0001a」「0001b」を格納し、ベクトル命令の発行チェックに必要な情報を命令発行チェック部205に送出する。この状態を図6に示す。
The instruction issue
リタイア命令無効化処理部210は、TR番号使用認識部209から該当ID無しの情報を受け取り、無効化対象が無いので命令発行待機バッファ部204に対して無効化指示は送出しない。
The retired instruction
命令発行チェック部205は命令発行待機バッファ部204からベクトル命令の発行チェックに必要な情報として命令間依存情報を受け、命令間依存関係が無く発行可能なID「0001a」演算処理命令を選択し、演算処理命令が使用する演算リソースである演算器308とレジスタスロット(ベクトルレジスタ303の各RAM)がビジーでは無いことを確認し、発行確定として命令発行部206およびパスビジー管理部207に発行確定となったベクトル命令を送出する。このときID「0001b」演算結果転送命令はID「0001a」演算処理命令に対する命令間依存関係があるため命令選択条件にあてはまらないので発行されない。
The instruction
また、命令発行チェック部205は、ベクトルレジスタ303およびテンポラリレジスタ309のレジスタ入出力のタイミング管理をおこない、ID「0001a」演算処理命令によってテンポラリレジスタ309に演算結果が格納された直後にID「0001b」演算結果転送命令によるテンポラリレジスタ309からの演算結果読み出しが行われるよう命令発行待機バッファ部204に保持されている命令間依存関係情をクリアする。本実施形態ではID「0001a」演算処理命令が発行されてから9クロック後にID「0001b」演算結果転送命令が発行可能となるようなタイミングで命令発行待機バッファ部204に保持されている命令間依存関係情報をクリアする。
The instruction
命令発行部206は、命令発行チェック部205より発行確定となった演算処理命令を受け取り、ベクトル命令実行に必要な情報の生成を行ってベクトル演算部3に含まれるベクトル演算パイプ部30〜37に送出する。
The
パスビジー管理部207は命令発行チェック部205から発行確定となった演算処理命令を受け取り、そのベクトル命令が使用する演算リソースである演算器ビジー情報ならびにレジスタスロットのビジー情報を管理する。演算器ビジー情報は、演算器308が使用中であるか否かの情報である。レジスタスロットのビジー情報は、ベクトルレジスタ303内の読み出しアドレス(例えば RAM#0の読み出しアドレス)が使用中であるか否かの情報である。
The path
パイプライン制御部311は、命令発行部206より発行された演算処理命令「T0 ← V0 + V1 VL=8」(命令1−1)を受け取り、命令識別処理を行う。続いて、パイプライン制御部311は、ベクトルレジスタ303およびレジスタ出力クロスバ304に対して演算命令オペランドレジスタV0とV1を8要素分読み出すよう指示する。2入力セレクタ306および2入力セレクタ307に対してはレジスタリードデータを選択するよう指示する。パイプライン制御部311は、演算器308については2つのオペランドを算術和するよう指示する。パイプライン制御部311は、テンポラリレジスタ309には領域T0に演算結果を格納するよう指示する。
The
また、パイプライン制御部311は、演算処理命令「T0 ← V0 + V1 VL=8」(命令1−1)を受け取った9クロック後に演算結果転送命令「V7 ← T0 VL=8」(命令1−2)の識別処理を行い、テンポラリレジスタ309にT0データ読み出し指示と、レジスタ入力クロスバ302にT0データ選択指示と、ベクトルレジスタ303にT0データ書き込み指示を出す。
Further, the
図7は、一つのベクトル演算パイプ部において一つのベクトル命令の実行例を示すタイムチャートである。ここでは、VPP30の場合を一例として示している。
FIG. 7 is a time chart showing an execution example of one vector instruction in one vector operation pipe unit. Here, the case of
ベクトルレジスタ303は最初にRAM#0に対して要素V0−00のアドレスを入力して読み出し動作を行い、V0−00要素を読み出す。この状態がタイムチャート図7のtiming_1である。以降の説明では、タイムチャートに示すクロック(Clock timing)を「timing_x」(x≧0)として示す。タイムチャートにおけるV0−00の前の"R"はRead動作であることを示している。"W"はライト動作であることを示す。
The
次のクロックtiming_2ではRAM#0に対して要素V1−00のアドレスを入力して読み出し動作を行うと同時にRAM#1に対して要素V0−01のアドレスを入力して読み出し動作を行う。次のクロックtiming_3ではRAM#1に対し要素V1−01のアドレスを入力して読み出し動作を行うと同時にRAM#2に対して要素V0−02のアドレスを入力して読み出し動作を行う。次のクロックtiming_4ではRAM#2に対して要素V1−02のアドレスを入力して読み出し動作を行うと同時にRAM#3に対して要素V0−03のアドレスを入力して読み出し動作を行う。次のクロックtiming_5ではRAM#3に対して要素V1−03のアドレスを入力して読み出し動作を行うと同時にRAM#0に対して要素V0−04のアドレスを入力して読み出し動作を行う。
At the next clock timing_2, the read operation is performed by inputting the address of the element V1-00 to the
このようにRAM#0〜RAM#3に対してV0とV1の先頭アドレスを順次入力して指示されたV0、V1レジスタの8要素を順次読み出す。
In this way, the leading addresses of V0 and V1 are sequentially input to
レジスタ出力クロスバ304はベクトルレジスタ303から読み出された要素を受け、クロスバ制御を1クロック毎に行って要素V0−00〜V0−07はタイミング調整FF305に送出され、要素V1−00〜V1−07を2入力セレクタ307に送出される。上述のようにして読み出された要素V0−00〜V0−07は要素V1−00〜V1−07に対して1クロック分早く読み出されるため、V0の各要素はタイミング調整FF305でタイミング調整されて2入力セレクタ306に入力される。
The
2入力セレクタ306はレジスタリードデータ(要素V0−00〜V0−07)を選択して演算器308に出力する。2入力セレクタ307はレジスタリードデータ(要素V1−00〜V1−07)を選択して演算器308に出力する。
The 2-
演算器308はオペランドデータとして要素V0−00および要素V1−00を演算器ステージAのタイミングで受け取り、演算器ステージEまでパイプライン動作で算術和演算処理を行い、演算結果をtiming_8でテンポラリレジスタ309に出力する。
The
テンポラリレジスタ309は演算器308から受け取った演算結果を指定されたT0−00にtiming_9で書き込む。
The
テンポラリレジスタ309は、timing_9以降順次T0−01〜T0−07の8つの演算結果要素を書き込む。また、テンポラリレジスタ309は、T0データ読み出し指示を受け、timing_9でT0−00を読み出しレジスタ入力クロスバ302に送出する。
The
レジスタ入力クロスバ302はパイプライン制御部311からの指示に従い、テンポラリレジスタ309から送出されたT0−00を選択してベクトルレジスタ303内RAM#0に書き込みデータとして送出する。
The
timing_10でベクトルレジスタ303内のRAM#0にT0−00が書き込まれる。timing_11でRAM#1にT0−01が、timing_12でRAM#2にT0−02が、timing_13でRAM#3にT0−03が、timing_14でRAM#0にT0−04が書き込まれる。以降timing_17でRAM#3にT0−07が書き込まれて一連の動作が完了する。
T0-00 is written to
次にベクトル命令が2つの場合の動作を説明する。ここで用いる二つの命令列(命令11、命令12とする)の一例を次に示す。
V7 ← V0 + V1 VL = 8・・・・(命令11)
V7 ← V2 + V7 VL = 8・・・・(命令12)
この命令列は命令11の書き込み先レジスタ番号と命令12のオペランドレジスタ番号と書き込み先レジスタ番号が一致していることが特徴である。ここで、命令の要素数(VL)はベクトル演算パイプ部(VPP)30〜37それぞれが処理する要素数であることは、命令1の場合と同様である。また、命令11、12の処理について、図1の構成図(一部の図ではベクトル演算部3を省略している)を用いて処理の流れを図8〜15に示す。これらの図では、図1で示した構成要素の名称にかえて、処理内容を示す。空欄の場合、処理を実行していないことになる。図8〜15を用いて動作を説明する。図8に初期状態(T)を示す。
Next, the operation when there are two vector instructions will be described. An example of two instruction sequences used here (
V7 ← V0 + V1 VL = 8 (... 11)
V7 ← V2 + V7 VL = 8... (Command 12)
This instruction sequence is characterized in that the write destination register number of the
まず、命令11がSPU1でベクトル命令と識別されて、VIC2内のベクトル命令バッファ部201に送出される。次のクロックでは命令12がSPU1でベクトル命令と識別されて、VIC2内のベクトル命令バッファ部201に送出される(図8)。
First, the
次のクロック(図9)では、ベクトル命令バッファ部201は、SPU1より受け取ったベクトル命令11を一旦バッファリングする。続いて、命令発行待機バッファ部204がビジーで無いことを確認して、バッファリングしたベクトル命令を読み出すとともにベクトル命令11に対してID 「0001」を付与して命令間依存関係解析部202に送出する。
In the next clock (FIG. 9), the vector
次のクロック(図10)では、ベクトル命令バッファ部201は、ベクトル命令12をバッファリングする。続いて、ベクトル命令12に対してID 「0002」を付与して命令間依存関係解析部202に送出する。命令間依存関係解析部202は、自己に存在するベクトル命令の書き込み先レジスタ番号、VL長情報、及びID 「0001」を同一VR書き込み認識部208に送出することは、命令1のベクトル命令の場合と同様である。
In the next clock (FIG. 10), the vector
同一VR書き込み認識部208は、ベクトル命令の書き込み先レジスタ番号およびVL長情報(ここではV7とVL=8)を命令間依存関係解析部202から受け取る。同一VR書き込み認識部208は、まず、命令間依存関係解析部202に存在するID 「0001」ベクトル命令の書き込み先レジスタ番号と、命令分解およびリネーム処理部203、命令発行待機バッファ部204に存在するベクトル命令の書き込み先レジスタ番号を比較する。ここでは、命令分解およびリネーム処理部203、命令発行待機バッファ部204には命令が存在しないので、同一VR書き込み認識部208は、一致無しの情報をTR番号使用認識部209に送出する。また、同一VR書き込み認識部208は、命令間依存関係解析部202から今回受け取ったVL長情報を自己の記憶領域内に保持する。図13中、点線の矢印は比較動作を表す。図11〜15も同様とする。
The same VR write
命令間依存関係解析部202は、命令分解およびリネーム処理部203および命令発行待機バッファ部204に存在する先行ベクトル命令とのレジスタ依存関係を解析する。しかしながら、命令分解およびリネーム処理部203および命令発行待機バッファ部204にはこの時点で命令が存在しないためRead after Write、Write after Read、Write after Writeの関係は無いという命令間依存情報とともにベクトル命令11およびID 「0001」を命令分解およびリネーム処理部203に送出する。
The inter-instruction
次のクロック(図11)では、命令分解およびリネーム処理部203は、命令間依存関係解析部202より受け取ったベクトル命令11が使用する演算結果格納用のテンポラリレジスタ領域をT0と決定し、その情報を命令分解およびリネーム処理部203内のリネームテーブルに保持する。演算オペランドに指定されたレジスタ番号(VR番号)はテンポラリレジスタ(TR)に存在しないのでオペランドに指定されたレジスタはリネームしない。
At the next clock (FIG. 11), the instruction disassembly and rename
また、命令分解およびリネーム処理部203は、リネームした後にベクトル命令11を演算結果格納用のテンポラリレジスタに格納するまでの演算処理命令部(命令11−1)と、演算結果格納用のテンポラリレジスタ領域からレジスタに演算結果を転送する演算結果転送命令部(命令11−1)の2つに分解する。命令11−1、11−2を次に示す。
T0 ← V0 + V1 VL = 8・・・・(命令11−1)
V7 ← T0 VL = 8・・・・(命令11−2)
The instruction disassembly and rename
T0 ← V0 + V1 VL = 8... (Instruction 11-1)
V7 ← T0 VL = 8... (Instruction 11-2)
このとき命令IDはそれぞれ「0001a」「0001b」となり、さらにテンポラリレジスタのRead after Writeの順序関係を守るために2つに分解された2番目の演算結果転送命令部(命令11−2)は演算処理命令部(命令11−1)に対する命令間依存関係情報を付与され、これらの情報と命令間依存関係解析部202から受け取った命令間依存情報を命令発行待機バッファ部204に送出する。
At this time, the instruction IDs are “0001a” and “0001b”, respectively, and the second operation result transfer instruction part (instruction 11-2), which is divided into two parts in order to maintain the order relationship of Read after Write of the temporary register, is operated. The inter-instruction dependency relationship information for the processing instruction part (instruction 11-1) is given, and the inter-instruction dependency information received from the inter-instruction dependency
また、命令間依存関係解析部202は、命令12と、命令分解およびリネーム処理部203および命令発行待機バッファ部204に存在する先行ベクトル命令11とのレジスタ依存関係を解析する。命令間依存関係解析部202は、命令12が、命令分解およびリネーム処理部203に存在するベクトル命令11「V7 ← V0 + V1 VL=8」に対してRead after Write、Write after Writeの関係があることを検出し、この命令間依存情報とともにベクトル命令12およびID 「0002」を命令分解およびリネーム処理部203に送出する。また、命令間依存関係解析部202は、自己に存在するベクトル命令の書き込み先レジスタ番号およびVL長情報およびID 「0002」を同一VR書き込み認識部208に送出する。
Further, the inter-instruction
同一VR書き込み認識部208は、ベクトル命令の書き込み先レジスタ番号およびVL長情報(ここではV7とVL=8)を命令間依存関係解析部202から受け取る。まず、同一VR書き込み認識部208は、命令間依存関係解析部202に存在するID 「0002」ベクトル命令12の書き込み先レジスタ番号と、命令分解およびリネーム処理部203に存在するベクトル命令11の書き込み先レジスタ番号を比較する。同一VR書き込み認識部208は、命令12と、命令分解およびリネーム処理部203に存在するID 「0001b」ベクトル命令11の書き込み先レジスタ番号が一致するので、一致したベクトル命令11−1のID 「0001b」をTR番号使用認識部209に送出する。また、同一VR書き込み認識部208は、VL長情報を保持する機能を持ち、保持しているVL長情報と命令間依存関係解析部202から受け取ったVL長情報を比較する。同一VR書き込み認識部208は、どちらも同じ「8」であることからリタイア命令無効化禁止信号をTR番号使用認識部209に送出しない。
The same VR write
次のクロック(図12)では、命令分解およびリネーム処理部203は、命令間依存関係解析部202より受け取ったベクトル命令12が使用する演算結果格納用のテンポラリレジスタ領域を、リネームテーブルに保持されていた「V7 − T0」の関係からT0と決定し、その情報を命令分解およびリネーム処理部203内のリネームテーブルに保持する。このときのリネームテーブルの具体例が図2に相当する。演算オペランドに指定されたレジスタ番号も同様にリネームテーブルの情報からT0とリネームする。この処理の結果ベクトル命令12は次のようになる「T0 ← V2 + T0」。
At the next clock (FIG. 12), the instruction decomposition and rename
また、命令分解およびリネーム処理部203は、リネームした後にベクトル命令12を演算結果格納用のテンポラリレジスタに格納するまでの演算処理命令部(命令12−1)と、演算結果格納用のテンポラリレジスタ領域からレジスタに演算結果を転送する演算結果転送命令部(命令12−2)の2つに分解する。命令12−1、12−2を次に示す。
T0 ← V2 + T0 VL = 8・・・・(命令12−1)
V7 ← T0 VL = 8・・・・(命令12−2)
The instruction disassembly and rename
T0 ← V2 + T0 VL = 8... (Command 12-1)
V7 ← T0 VL = 8... (Command 12-2)
このとき命令IDはそれぞれ「0002a」「0002b」となり、さらにテンポラリレジスタのRead after Writeの順序関係を守るために2つに分解された2番目の演算結果転送命令部(命令12−2)は演算処理命令部(命令12−1)に対する命令間依存関係情報を付与され、これらの情報と命令間依存関係解析部202から受け取った命令間依存情報を命令発行待機バッファ部204に送出する。
At this time, the instruction IDs are “0002a” and “0002b”, respectively, and the second operation result transfer instruction part (instruction 12-2) divided into two parts in order to keep the order relationship of Read after Write of the temporary register is an operation. The inter-instruction dependency relationship information for the processing instruction part (instruction 12-1) is given, and the inter-instruction dependency information received from the inter-instruction dependency
TR番号使用認識部209は命令分解およびリネーム処理部203からリネーム処理が終わったベクトル命令12「T0 ← V2 + T0」を受け取り、その入力オペランドがテンポラリレジスタ番号にリネームされていることを確認し、同一VR書き込み認識部208から受け取ったID 「0001b」を有効としてリタイア命令無効化処理部210に送出する。
The TR number
命令発行待機バッファ部204は、命令分解およびリネーム処理部203からID「0001a」、命令11−1とID「0001b」、命令11−2を受け取り、バッファリングする。この時の命令発行待機バッファ部204の状態を図6に示す。命令11は命令1と同じであるため、命令1の場合と同様の状態となる。
The instruction issue
次のクロック(図13)では、命令発行待機バッファ部204は命令分解およびリネーム処理部203からID「0002a」、命令12−1とID「0002b」、命令12−2を受け取り、バッファリングする。この時の命令発行待機バッファ部204の状態を図16に示す。
At the next clock (FIG. 13), the instruction issue
リタイア命令無効化処理部210は、TR番号使用認識部209から有効なID 「0001b」を受け取り、ID 「0001b」の演算結果転送命令を無効化する指示を命令発行待機バッファ部204に送出する。
The retirement instruction
命令発行待機バッファ部204は、リタイア命令無効化処理部210からID 「0001b」の演算結果転送命令を無効化する指示を受け取り、ID 「0001b」の無効化禁止フラグが"0"であることからID 「0001b」の演算結果転送命令を無効化する。この時の命令発行待機バッファ部204の状態を図17に示す。個のタイミングで、命令発行待機バッファ部204に最初に格納された命令11−1が命令発行チェック部205へ送出される。
The instruction issue
次のクロック(図14)では、命令11−1が命令発行部206へ送出され、次のクロック(図15)でベクトル演算部3において命令11−1が実行される。
At the next clock (FIG. 14), the instruction 11-1 is sent to the
命令発行待機バッファ部204にバッファリングされた命令が実行された時のタイムチャートを図18に示す。図18は、timing_18において、命令12−1の命令のオペランドデータ8要素目の読み出しされるまでを示している。図7のタイムチャートと比べると、(1)命令12−1の1要素目のオペランド読み出しがtiming_10で開始されていること、(2)オペランドの一方がV7→T0にリネームされているため、timing_11でテンポラリレジスタ309から読み出されていることが特徴的である。
FIG. 18 shows a time chart when an instruction buffered in the instruction issue
次に命令11、12をベースにVL長が小さくなる方向へ変化した場合の動作を使って説明する。この動作は従来の動作とも同じである。冗長な説明を略し、特徴的な点を説明する。ここで用いる二つの命令列(命令21、命令22とする)の一例を次に示す。命令21は、命令11と同じであるが説明をわかりやすくするため、命令21とする。
V7 ← V0 + V1 VL = 8・・・・(命令21)
V7 ← V2 + V7 VL = 6・・・・(命令22)
この命令列は命令11、12に示す命令列がベースとなっており、命令21のVL長は8であるが命令22のVL長は6とVL長が短くなっている。また、図19〜26に処理の流れを示す。図の表し方は、図8〜15と同様である。また、図19〜26は、命令の番号及び命令22のVL長が異なるため全クロックの処理の流れを示したが、図8〜18と同様の処理については説明を省略する。
Next, the operation when the VL length changes in the direction of decreasing based on the
V7 ← V0 + V1 VL = 8 ... (Instruction 21)
V7 ← V2 + V7 VL = 6 ... (Instruction 22)
This instruction sequence is based on the instruction sequences shown in the
命令分解およびリネーム処理部203が分解した命令列は次のようになる。分解の動作は命令11、12と同様である。
T0 ← V0 + V1 VL = 8・・・・(命令21−1)
V7 ← T0 VL = 8・・・・(命令21−2)
T0 ← V2 + T0 VL = 6・・・・(命令22−1)
V7 ← T0 VL = 6・・・・(命令22−2)
The instruction sequence decomposed by the instruction decomposition and rename
T0 ← V0 + V1 VL = 8... (Instruction 21-1)
V7 ← T0 VL = 8... (Instruction 21-2)
T0 ← V2 + T0 VL = 6... (Command 22-1)
V7 ← T0 VL = 6... (Command 22-2)
図22に示すように、図命令間依存関係解析部202は、命令分解およびリネーム処理部203および命令発行待機バッファ部204に存在する先行ベクトル命令とのレジスタ依存関係を解析する。命令22は、命令分解およびリネーム処理部203に存在するベクトル命令21「V7 ← V0 + V1 VL=8」に対してRead after Write、Write after Writeの関係があることを検出し、この命令間依存情報とともにベクトル命令22およびID 「0002」を命令分解およびリネーム処理部203に送出する。また、命令間依存関係解析部202は、自己に存在するベクトル命令の書き込み先レジスタ番号およびVL長情報およびID 「0002」を同一VR書き込み認識部208に送出する。
As shown in FIG. 22, the inter-instruction dependency
同一VR書き込み認識部208は、ベクトル命令の書き込み先レジスタ番号およびVL長情報を命令間依存関係解析部202から受け取る。まず、同一VR書き込み認識部208は、命令間依存関係解析部202に存在するID 「0002」ベクトル命令22の書き込み先レジスタ番号と、命令分解およびリネーム処理部203に存在するベクトル命令21の書き込み先レジスタ番号を比較する。同一VR書き込み認識部208は、命令分解およびリネーム処理部203に存在するID 「0001b」ベクトル命令21の書き込み先レジスタ番号が一致するので、一致したベクトル命令21−1のID 「0001b」をTR番号使用認識部209に送出する。また、同一VR書き込み認識部208は、1クロック前に通過した直近のベクトル命令21のVL長情報「8」を保持しており、その値と命令間依存関係解析部202から受け取ったベクトル命令22のVL長情報「6」を比較する。同一VR書き込み認識部208は、ベクトル命令22のVL長が、保持していたVL長より小さいことを検出し、リタイア命令無効化禁止信号をTR番号使用認識部209に送出する。また、同一VR書き込み認識部208は、今回命令間依存関係解析部202から受け取ったベクトル命令22のVL長情報「6」を自己の記憶領域内に保持する。
The same VR write
次のクロック(図23)では、TR番号使用認識部209は、命令分解およびリネーム処理部203からリネーム処理が終わったベクトル命令22「T0 ← V2 + T0」を受け取り、その入力オペランドがテンポラリレジスタ番号にリネームされていることを確認し、同一VR書き込み認識部208から受け取ったID 「0001b」を有効としてリタイア命令無効化処理部210に送出するとともに、同じく同一VR書き込み認識部208から受け取ったリタイア命令無効化禁止信号をリタイア命令無効化処理部210に送出する。
At the next clock (FIG. 23), the TR number
リタイア命令無効化処理部210はTR番号使用認識部209から有効なID 「0001b」を受け取ると同時にリタイア命令無効化禁止信号を受け取るため、ID 「0001b」の演算結果転送命令を無効化する指示の送出を行わず、リタイア命令無効化禁止信号を命令発行待機バッファ部204に送出する(図23)。
The retirement instruction
命令発行待機バッファ部204は、リタイア命令無効化処理部210からリタイア命令無効化禁止信号を受け取り、命令発行待機バッファ部204内にバッファリングされている全ての演算結果転送命令の無効化禁止フラグを有効化する(図24)。この時の命令発行待機バッファ部204の状態を図27に示す。また、図25、26に示すように、命令21−2は、無効化されることなく、命令発行待機バッファ部204に保持され、命令の実行を待つ。
The instruction issue
命令発行待機バッファ部204にバッファリングされた命令が実行された時のタイムチャートを図28に示す。
FIG. 28 shows a time chart when an instruction buffered in the instruction issue
図28はtiming_18において、命令22−1の命令のオペランドデータ8要素目読み出しされるまでのタイムチャートを示している。命令21−2のリタイア命令が実行されるため図18のタイムチャートと比べると、(1)命令22−1の1要素目のオペランド読み出しが1クロック遅いtiming_11で開始されること、(2)命令22−1のオペランド読み出しが6要素分で終わっていることが特徴的である。 FIG. 28 shows a time chart until the 8th element of the operand data of the instruction 22-1 is read out in timing_18. Compared with the time chart of FIG. 18 because the retired instruction of the instruction 21-2 is executed, (1) the operand reading of the first element of the instruction 22-1 is started at timing_11 which is one clock later, (2) the instruction Characteristic is that the reading of the operand of 22-1 is completed for six elements.
以上の動作により、命令11、12の命令列のように命令間で書き込み先レジスタ番号が一致していて、かつVL長が同じであるような命令の場合は先行する命令のリタイア命令を無効化することで、RAMのポート競合確率を減少させることが可能となり、演算器の未使用時間が無いよう後続演算命令の実行を開始できる確率を高くできる。
また、命令を実行する上で一貫性を保証しつつ必要な命令のみ実行することでデータ変化率を減少させることが可能となる。
By the above operation, the retired instruction of the preceding instruction is invalidated in the case of an instruction in which the write destination register number matches between the instructions and the VL length is the same as in the instruction sequence of the
In addition, it is possible to reduce the data change rate by executing only necessary instructions while ensuring consistency in executing the instructions.
(その他の実施形態)
実施形態1においてベクトルレジスタ303のベクトルレジスタは4つの1ポートRAMから構成して、時分割に割り当てられたポートを使って読み出し動作と書き込み動作を行うような動作となっているが、使用するRAMについてはリード動作とライト動作が同時に行える2ポートRAMで構成することも可能である。この場合読み出し動作とリタイア命令処理動作が競合することは無いが、ベクトルロード命令処理とリタイア命令処理が競合するケースがあるためリタイア命令無効化は性能向上に効果がある。
(Other embodiments)
In the first embodiment, the
また、2ポートRAMからベクトルレジスタを構成する場合は1つのRAMにあるベクトルレジスタ番号の要素を全て格納するような構成を採ることも可能で、この場合は複数のRAMから時分割で読み出す必要は無く、1つのRAMから連続して要素を読み出す動作となり、この場合にもRAMのライトポート使用時間を削減できるためリタイア命令無効化は性能向上に効果がある。 When configuring a vector register from a 2-port RAM, it is possible to adopt a configuration in which all elements of the vector register number in one RAM are stored. In this case, it is necessary to read from a plurality of RAMs in a time-sharing manner. In this case, since the RAM write port usage time can be reduced, disabling the retire instruction is effective in improving the performance.
また、本実施形態では4つのRAMからベクトルレジスタを構成しているが、5つ以上のRAMから構成する装置においても性能向上に効果がある。 In the present embodiment, the vector register is composed of four RAMs. However, an apparatus composed of five or more RAMs is also effective in improving performance.
実施形態1ではベクトル命令を演算結果格納用のテンポラリレジスタに格納するまでの演算処理命令と、演算結果格納用のテンポラリレジスタ領域からレジスタに演算結果を転送する演算結果転送命令(リタイア命令)の2つに分解して命令発行待機バッファ部204に別々のレコードにバッファリングする例を挙げているが、2つに分解した各々の単位で無効化・無効化禁止が制御出来るならば別々のレコードにする必要は無く、2つに分解した命令を1つのレコードに格納しても良い。
In the first embodiment, there are two processing instructions, that is, an operation processing instruction until a vector instruction is stored in a temporary register for storing operation results, and an operation result transfer instruction (retirement instruction) for transferring operation results from a temporary register area for storing operation results to a register. In this example, the instruction issuance waiting
実施形態1の説明では命令間依存関係解析部202、命令分解およびリネーム処理部203、命令発行待機バッファ部204における処理にそれぞれ1クロックの時間を要する想定であるが、回路遅延に余裕があればこれらの処理を1クロックで行っても良い。これは同一VR書き込み認識部208、TR番号使用認識部209、リタイア命令無効化処理部210、命令発行待機バッファ部204における処理についても同じである。
In the description of the first embodiment, it is assumed that the inter-instruction
実施形態1ではベクトルストア命令の動作を記載しなかったが、実施形態1の構成ではストア命令はテンポラリレジスタにリネームされることは無いため、ベクトルストア命令のソースレジスタ番号についても無効化禁止対象レジスタとしてとしてリタイア命令無効化処理部210に対して送出することで命令一貫性を保ちつつベクトルストア命令にも対応可能である。
命令発行制御部については命令間の一貫性が保たれるならばOut−of−OrderまたはIn−Orderの制御方式であっても対応可能である。
Although the operation of the vector store instruction is not described in the first embodiment, the store instruction is not renamed as a temporary register in the configuration of the first embodiment. To the retired instruction
The instruction issue control unit can cope with an Out-of-Order or In-Order control method as long as consistency between instructions is maintained.
同一VR書き込み認識部208は直近の演算命令とVL長が変化したことを検出することで先行するリタイア命令の無効化禁止フラグを有効にすることを可能としているが、ベクトルマスクが更新されたことを検出する機能を追加することでマスク付き演算命令にも対応可能である。このとき同一VR書き込み認識部208にてベクトルマスク更新命令を識別したら前記リタイア命令無効化禁止信号をTR番号使用認識部209に対して送出する。
The same VR
以上説明したように、上記実施形態のいずれかは、連続実行が可能なベクトル演算器と複数のRAMから構成されるベクトルレジスタとベクトル演算器の出力結果を一時的に格納可能なテンポラリレジスタを持ち、ベクトル演算命令が実行される場合にはベクトル演算結果を一時的にテンポラリレジスタに格納する動作と、テンポラリレジスタから演算結果を読み出してベクトルレジスタに演算結果を転送する動作に分けて処理を行うベクトル処理装置、特にベクトルレジスタを構成するRAMのライトポートがベクトルロード命令やベクトル転送命令などと競合する装置(例えば、ベクトル演算部3)を用いるベクトル処理装置に適用することができる。 As described above, any of the above embodiments has a vector arithmetic unit capable of continuous execution, a vector register composed of a plurality of RAMs, and a temporary register capable of temporarily storing the output result of the vector arithmetic unit. When a vector operation instruction is executed, the vector is divided into an operation for temporarily storing the vector operation result in the temporary register and an operation for reading the operation result from the temporary register and transferring the operation result to the vector register. The present invention can be applied to a processing device, particularly a vector processing device using a device (for example, the vector operation unit 3) in which a RAM write port constituting a vector register competes with a vector load instruction, a vector transfer instruction, or the like.
特に、ベクトル命令を発行する場合に、ベクトル演算命令をテンポラリレジスタを使ってリネームした後に、ベクトル命令を演算結果格納用のテンポラリレジスタに格納するまでの演算処理命令と、演算結果格納用のテンポラリレジスタからレジスタに演算結果を転送する演算結果転送命令の2つに分けて命令発行待機バッファ手段(例えば、図1の命令発行待機バッファ部204)に格納してから命令発行チェックを行った後に命令発行を確定する命令発行制御手段(例えば、図1のベクトル命令制御部2)を備える場合に適用することができる。
In particular, when issuing a vector instruction, the operation instruction until the vector instruction is stored in the temporary register for storing the operation result after the vector operation instruction is renamed using the temporary register, and the temporary register for storing the operation result Is divided into two operation result transfer instructions for transferring the operation result from the register to the register and stored in the instruction issue standby buffer means (for example, the instruction issue
具体的には、テンポラリレジスタから演算結果を読み出してベクトルレジスタに演算結果を転送する動作を行う命令演算結果転送命令(リタイア命令)と定義したときに、ベクトル演算命令間の書き込み先ベクトルレジスタを解析して同一ベクトルレジスタに格納する命令を検出し、先行するベクトル演算命令のリタイア命令を無効化することでリタイア命令の発行を抑止するよう制御する。これらの処理は、図1の命令解析手段41、待機命令制御手段42、命令発行待機バッファ部204より実現することができる。より具体的には、図1の命令間依存関係解析部202、命令分解およびリネーム処理部203、命令発行待機バッファ部204、同一VR書き込み認識部208、TR番号使用認識部209、及びリタイア命令無効化処理部210が連携して動作することにより実現される。
Specifically, when it is defined as an instruction calculation result transfer instruction (retired instruction) that reads the calculation result from the temporary register and transfers the calculation result to the vector register, the write destination vector register between the vector calculation instructions is analyzed. Then, an instruction stored in the same vector register is detected, and control is performed so as to suppress the issue of the retired instruction by invalidating the retired instruction of the preceding vector operation instruction. These processes can be realized by the
また、ベクトル処理装置において、待機命令制御手段42は、直近のベクトル演算命令のVL長情報を保持する手段と、後続命令のVL長情報と前記直近のベクトル演算命令のVL長情報とを比較して、VL長が小さくなっていることを検出した場合に、先行命令のリタイア命令を無効化しないようリタイア命令無効化禁止信号を生成する。具体的には、図1の同一VR書き込み認識部208、TR番号使用認識部209、リタイア命令無効化処理部210が連携して動作することにより実現される。
In the vector processing apparatus, the standby instruction control means 42 compares the means for holding the VL length information of the latest vector operation instruction with the VL length information of the subsequent instruction and the VL length information of the latest vector operation instruction. When the VL length is detected to be small, a retire instruction invalidation prohibition signal is generated so as not to invalidate the retirement instruction of the preceding instruction. Specifically, this is realized by the same VR
さらに、ベクトル処理装置において、待機命令制御手段42は、テンポラリレジスタを使ってリネームされた後の演算命令のオペランド指定をチェックしてテンポラリレジスタにリネームされていないオペランドがあった場合はリネームされなかったベクトルレジスタにライトする先行命令のリタイア命令を無効化しないようリタイア命令無効化禁止信号を生成する。
具体的には、図1の同一VR書き込み認識部208、TR番号使用認識部209、リタイア命令無効化処理部210、命令発行待機バッファ部204が連携して動作することにより実現される。
Further, in the vector processing apparatus, the standby instruction control means 42 checks the operand specification of the arithmetic instruction after being renamed using the temporary register, and if there is an operand that is not renamed in the temporary register, it is not renamed. A retire instruction invalidation prohibition signal is generated so as not to invalidate the retirement instruction of the preceding instruction written to the vector register.
More specifically, the same VR
また、ベクトル処理装置において、待機命令命令をバッファリングする際にベクトル演算命令を演算結果格納用のテンポラリレジスタ領域に格納するまでの演算処理命令と、演算結果格納用のテンポラリレジスタ領域からレジスタに演算結果を転送する演算結果転送命令(リタイア命令)の2つに区別して格納可能な手段とリタイア命令の無効化を禁止するフラグを設けた。さらに、リタイア命令無効化を禁止するフラグが有効であった場合にはリタイア命令の無効化指示があった場合にも該当するリタイア命令を無効化しない機能を備えた。具体的には、図1の命令発行待機バッファ部204によって実現される。
Also, in the vector processing unit, when buffering the standby instruction instruction, the arithmetic processing instruction until the vector arithmetic instruction is stored in the temporary register area for storing the arithmetic result, and the arithmetic operation is performed on the register from the temporary register area for storing the arithmetic result. Means capable of distinguishing and storing the calculation result transfer instruction (retire instruction) for transferring the result and a flag for prohibiting invalidation of the retire instruction are provided. Further, when the flag for prohibiting retirement instruction invalidation is valid, a function for invalidating the corresponding retirement instruction even when a retirement instruction invalidation instruction is given is provided. Specifically, this is realized by the instruction issue
以上説明したように、本発明の実施形態の一態様によれば、システム全体の性能向上を図ることができる。その理由は、命令間で書き込み先レジスタ番号が一致していて、かつVL長が同じであるような命令の場合は先行する命令のリタイア命令を無効化することで、RAMのポート競合確率を減少させることが可能となり、演算器の未使用時間が無いよう後続演算命令の実行を開始できる確率を高めることによる。すなわち、ベクトル演算命令間の書き込み先ベクトルレジスタを解析して同一ベクトルレジスタに格納する命令を検出し、先行するベクトル演算命令のリタイア命令を無効化する手段を設けることによって、命令一貫性を保った上でベクトルレジスタへの書き込みパスの使用頻度低下させることを可能にする。 As described above, according to one aspect of the embodiment of the present invention, the performance of the entire system can be improved. The reason for this is that in the case of instructions where the write destination register numbers match between instructions and the VL length is the same, the retired instruction of the preceding instruction is invalidated to reduce the RAM port contention probability. By increasing the probability that execution of the subsequent operation instruction can be started so that there is no unused time of the operation unit. In other words, by analyzing the write destination vector register between the vector operation instructions and detecting the instruction stored in the same vector register, the instruction consistency is maintained by providing means for invalidating the retirement instruction of the preceding vector operation instruction. It is possible to reduce the frequency of use of the write path to the vector register.
また、システムの消費電力低減を図ることができる。その理由は、命令を実行する上で一貫性を保証しつつ必要な命令のみ実行することでデータ変化率を減少させることが可能となることによる。 In addition, the power consumption of the system can be reduced. The reason is that it is possible to reduce the data change rate by executing only necessary instructions while ensuring consistency in executing the instructions.
上記各実施形態は、演算処理装置特にベクトル処理装置に適用することが可能である。 Each of the above embodiments can be applied to an arithmetic processing device, particularly a vector processing device.
なお、本発明は上記に示す実施形態に限定されるものではない。本発明の範囲において、上記実施形態の各要素を、当業者であれば容易に考えうる内容に変更、追加、変換することが可能である。 In addition, this invention is not limited to embodiment shown above. Within the scope of the present invention, it is possible to change, add, or convert each element of the above-described embodiment to a content that can be easily considered by those skilled in the art.
1 スカラープロセッシングユニット(SPU)
2 ベクトル命令制御部(VIC)
3 ベクトル演算部
41 命令解析手段
42 待機命令制御手段
43 命令発行管理手段
30〜37 ベクトル演算パイプ部(VPP)
201 ベクトル命令バッファ部
202 命令間依存関係解析部
203 命令分解およびリネーム処理部
204 命令発行待機バッファ部
205 命令発行チェック部
206 命令発行部
207 パスビジー管理部
208 同一VR書き込み認識部
209 TR番号使用認識部
210 リタイア命令無効化処理部
301 ロードデータ供給部
302 レジスタ入力クロスバ
303 ベクトルレジスタ
304 レジスタ出力クロスバ
305 タイミング調整FF
306 2入力セレクタ
307 2入力セレクタ
308 演算器
309 テンポラリレジスタ
310 ストアデータ送出部
311 パイプライン制御部
1 Scalar processing unit (SPU)
2 Vector instruction control unit (VIC)
3
201 Vector
306 2-
Claims (5)
ベクトル命令制御手段から発行されたベクトル命令を受け付け、ベクトルレジスタを用いて、ベクトル命令を、演算結果をテンポラリレジスタに一時的に格納する演算処理命令と、テンポラリレジスタに格納した演算結果をベクトルレジスタへ転送する演算結果転送命令とに分解して実行するベクトル演算手段とを備えるベクトル処理装置であって、
前記ベクトル命令制御手段は、
実行待ちベクトル命令を、演算処理命令と演算結果転送命令に分解した状態で格納する命令発行待機バッファ手段と、
ベクトル命令を受け付け、前記受け付けたベクトル命令が使用するテンポラリレジスタを決定し、前記受け付けたベクトル命令のオペランドに指定されたレジスタ番号がテンポラリレジスタと一致する場合、前記受け付けたベクトル命令のオペランドレジスタを前記テンポラリレジスタにリネームし、前記受け付けたベクトル命令と前記リネームしたベクトル命令とのいずれかについて、前記演算処理命令と前記演算結果転送命令とに分離して前記命令発行待機バッファ手段へ格納する命令解析手段と、
前記実行待ちベクトル命令のうち書き込み先のベクトルレジスタが同じであるかを解析し、同一ベクトルレジスタに格納する、先行して実行される演算処理命令を検出し、検出した演算処理命令に対応する演算結果転送命令発行を中止させる待機命令制御手段と、
前記実行待ちベクトル命令の発行を管理する命令発行管理手段と、を備え、
前記待機命令制御手段は、前回受け付けたベクトル命令の要素数を保持し、新たに受け付けたベクトル命令の要素数が前記前回受け付けたベクトル命令の要素数より小さくなっている場合、演算結果転送命令の発行を中止させることを禁止する無効化禁止信号を出力するベクトル処理装置。 Vector instruction control means for accepting vector instructions and managing the issue of vector instructions;
Accepts a vector instruction issued from the vector instruction control means, and uses a vector register to store a vector instruction, an operation processing instruction for temporarily storing the operation result in a temporary register, and an operation result stored in the temporary register to the vector register A vector processing device comprising vector operation means for executing the operation result transfer instruction to be decomposed and transferred,
The vector instruction control means includes
Instruction issue waiting buffer means for storing the execution waiting vector instruction in a state of being decomposed into an operation processing instruction and an operation result transfer instruction;
Accepts a vector instruction, determines a temporary register to be used by the accepted vector instruction, and if a register number designated as an operand of the accepted vector instruction matches a temporary register, the operand register of the accepted vector instruction is Instruction analysis means for renaming a temporary register and separating the received vector instruction and the renamed vector instruction into the operation processing instruction and the operation result transfer instruction and storing them in the instruction issue waiting buffer means When,
Analyzes whether the write destination vector register is the same among the execution-waiting vector instructions, detects a previously executed arithmetic processing instruction stored in the same vector register, and performs an arithmetic operation corresponding to the detected arithmetic processing instruction Standby command control means for canceling result transfer command issuance,
An instruction issuance management means for managing the issuance of the execution waiting vector instruction ;
The standby instruction control means holds the number of elements of the vector instruction received last time, and when the number of elements of the newly received vector instruction is smaller than the number of elements of the vector instruction received last time, A vector processing apparatus that outputs an invalidation prohibition signal that prohibits the issuance of an issuance .
ベクトル命令を受け付け、前記受け付けたベクトル命令が使用するテンポラリレジスタを決定し、
前記受け付けたベクトル命令のオペランドに指定されたレジスタ番号がテンポラリレジスタと一致する場合、前記受け付けたベクトル命令のオペランドレジスタを前記テンポラリレジスタにリネームし、
前記受け付けたベクトル命令と前記リネームしたベクトル命令とのいずれかについて、前記演算処理命令と前記演算結果転送命令とに分離して前記命令発行待機バッファ手段へ格納し、
前記実行待ちベクトル命令のうち書き込み先のベクトルレジスタが同じであるかを解析し、
同一ベクトルレジスタに格納する、先行して実行される演算処理命令を検出し、検出した演算処理命令に対応する演算結果転送命令発行を中止させ、
前記実行待ちベクトル命令の発行を管理し、ベクトル命令を実行するベクトル演算手段へ出力することを備え、
前記先行して実行される演算処理命令を検出する工程が、前回受け付けたベクトル命令の要素数を保持し、新たに受け付けたベクトル命令の要素数が前記前回受け付けたベクトル命令の要素数より小さくなっている場合、演算結果転送命令の発行を中止させることを禁止する無効化禁止信号を出力するベクトル処理方法。 Waiting for instruction issuance to store the execution waiting vector instruction in a state of being decomposed into an operation processing instruction for temporarily storing the operation result in the temporary register and an operation result transfer instruction for transferring the operation result stored in the temporary register to the vector register. A vector processing method comprising buffer means,
Accepts a vector instruction, determines a temporary register used by the accepted vector instruction;
If the register number specified in the operand of the accepted vector instruction matches a temporary register, the operand register of the accepted vector instruction is renamed to the temporary register;
For any of the received vector instruction and the renamed vector instruction, the operation processing instruction and the operation result transfer instruction are separated and stored in the instruction issue waiting buffer means,
Analyzes whether the write destination vector register is the same among the execution vector instructions,
Detecting a processing instruction to be executed in advance, which is stored in the same vector register, stops issuing an operation result transfer instruction corresponding to the detected processing instruction,
Managing issuance of the execution waiting vector instruction, and outputting to a vector operation means for executing the vector instruction ,
The step of detecting the arithmetic processing instruction executed in advance holds the number of elements of the previously received vector instruction, and the number of elements of the newly received vector instruction becomes smaller than the number of elements of the previously received vector instruction. A vector processing method for outputting an invalidation prohibiting signal for prohibiting the issuance of an operation result transfer instruction .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008234632A JP5392810B2 (en) | 2008-09-12 | 2008-09-12 | Instruction issue control device and instruction issue control method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008234632A JP5392810B2 (en) | 2008-09-12 | 2008-09-12 | Instruction issue control device and instruction issue control method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2010067141A JP2010067141A (en) | 2010-03-25 |
| JP5392810B2 true JP5392810B2 (en) | 2014-01-22 |
Family
ID=42192653
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008234632A Active JP5392810B2 (en) | 2008-09-12 | 2008-09-12 | Instruction issue control device and instruction issue control method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5392810B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2576572B (en) * | 2018-08-24 | 2020-12-30 | Advanced Risc Mach Ltd | Processing of temporary-register-using instruction |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0283779A (en) * | 1988-09-21 | 1990-03-23 | Hitachi Ltd | Instruction execution control method for vector processing equipment |
| JP2001188764A (en) * | 1999-12-28 | 2001-07-10 | Mitsubishi Electric Corp | Multiprocessor system |
-
2008
- 2008-09-12 JP JP2008234632A patent/JP5392810B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2010067141A (en) | 2010-03-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7003629B1 (en) | System and method of identifying liveness groups within traces stored in a trace cache | |
| US8225076B1 (en) | Scoreboard having size indicators for tracking sequential destination register usage in a multi-threaded processor | |
| KR100292300B1 (en) | System and method for register renaming | |
| JP3014773B2 (en) | Processor architecture | |
| CN104487941B (en) | The order of control process data element during Vector Processing | |
| US6782521B2 (en) | Integrated structure layout and layout of interconnections for an instruction execution unit of an integrated circuit chip | |
| US20050247774A1 (en) | System and method for validating a memory file that links speculative results of load operations to register values | |
| US20190310845A1 (en) | Tracking stores and loads by bypassing load store units | |
| US20050076189A1 (en) | Method and apparatus for pipeline processing a chain of processing instructions | |
| US6928533B1 (en) | Data processing system and method for implementing an efficient out-of-order issue mechanism | |
| KR102524565B1 (en) | Store and load tracking by bypassing load store units | |
| US20030182536A1 (en) | Instruction issuing device and instruction issuing method | |
| CN108196884A (en) | Utilize the computer information processing device for generating renaming | |
| US6230262B1 (en) | Processor configured to selectively free physical registers upon retirement of instructions | |
| CA2304609A1 (en) | Autonomously cycling data processing architecture | |
| EP0778519B1 (en) | Multiple instruction dispatch system for pipelined microprocessor without branch breaks | |
| US7937569B1 (en) | System and method for scheduling operations using speculative data operands | |
| US6711670B1 (en) | System and method for detecting data hazards within an instruction group of a compiled computer program | |
| JP5392810B2 (en) | Instruction issue control device and instruction issue control method | |
| US7694110B1 (en) | System and method of implementing microcode operations as subroutines | |
| US6769049B1 (en) | Memory access in a computer system having parallel execution pipelines | |
| CN120631449A (en) | Processor program address buffering method and device | |
| US20040006687A1 (en) | Processor and instruction control method | |
| KR19980079726A (en) | System and method for sending storage instructions to a processor | |
| JP2620519B2 (en) | Operation processing system and method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110810 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130620 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130702 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130828 |
|
| 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: 20130917 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20131010 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5392810 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |