JPH09274612A - Vector processor - Google Patents

Vector processor

Info

Publication number
JPH09274612A
JPH09274612A JP11023796A JP11023796A JPH09274612A JP H09274612 A JPH09274612 A JP H09274612A JP 11023796 A JP11023796 A JP 11023796A JP 11023796 A JP11023796 A JP 11023796A JP H09274612 A JPH09274612 A JP H09274612A
Authority
JP
Japan
Prior art keywords
instruction
data
vector
register
scalar
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP11023796A
Other languages
Japanese (ja)
Inventor
Mihoko Koga
美穂子 古賀
Yoshiko Tamaoki
由子 玉置
Masao Furukawa
政男 古川
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP11023796A priority Critical patent/JPH09274612A/en
Publication of JPH09274612A publication Critical patent/JPH09274612A/en
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

PROBLEM TO BE SOLVED: To shorten set time by directly performing the set of scalar data to a scalar register at a vector processor corresponding to a vector instruction. SOLUTION: As a pair of vector instructions, a VLI instruction for setting immediate value data to the low-order 32 bits of the scalar register and a VLIS instruction for setting immediate value data to the high-order 32 bits of the scalar register are prepared, these instructions are composed of OP codes, scalar register numbers to be set and immediate data and by decoding the instructions, the immediate value data are set to the low-order side of register 2371 and the high-order side of a register 2372 at a data control circuit. When executing the instruction, in the case of VLI instruction, the data in the register 2371 are selected and these data are written in the scalar register to be set by a selection circuit. In the case of VLIS instruction, the data in the register 2372 are selected and the data are written in the scalar register to be set by the selection circuit but only the high-order part of data is written corresponding to the designation of a set signal control circuit.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、科学技術計算など
で多く出現する関数計算等、スカラデータが多量に必要
な場合の処理の高速化に好適なベクトル処理装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a vector processing device suitable for speeding up processing when a large amount of scalar data is required, such as function calculation often appearing in scientific and technological calculations.

【0002】[0002]

【従来の技術】従来のベクトル処理装置は、スカラデー
タをスカラレジスタにセットするためには、ベクトル処
理準備命令のLMS(Load Multiple S
calar)命令等により、主記憶装置から読み出し、
記憶制御ユニット、データ転送回路を経由して、スカラ
レジスタにデータをセットしていた。そのため、各ユニ
ットを経由するだけでなく、さらにセットすべきスカラ
データの数が多い場合は、主記憶アクセスの競合や、主
記憶装置上のバンクの競合などにより、待ちが生じるこ
とがあり、時間がかかっていた。一般に、関数計算で
は、係数部分に多量のスカラデータが必要であり、スカ
ラレジスタを多数使用する。したがって、従来のベクト
ル処理装置では、DOループの中に関数が出てきた場
合、関数以前のベクトル処理終了後、再びベクトル処理
起動を行ない、スカラレジスタの値をセットし直し、さ
らにまた、関数の処理終了後、再びベクトル処理起動を
行ない、関数以後のベクトル処理で用いるスカラレジス
タの値をセットし直していた。すなわち、1つのDOル
ープで少なくとも3回はベクトル処理起動をおこなって
おり、しかも、関数部分では多量のスカラデータを主記
憶装置から読み出し、記憶制御ユニット、データ転送回
路を経由して、スカラレジスタにセットしていたため、
処理時間が長くなっていた。
2. Description of the Related Art In order to set scalar data in a scalar register, a conventional vector processing device uses a vector processing preparation instruction LMS (Load Multiple S).
read from the main storage device,
Data was set in the scalar register via the storage control unit and the data transfer circuit. Therefore, if the number of scalar data to be set is large in addition to passing through each unit, waiting may occur due to contention for main memory access or contention for banks on the main memory. It was hanging. Generally, in function calculation, a large amount of scalar data is required in the coefficient part, and a large number of scalar registers are used. Therefore, in the conventional vector processing apparatus, when a function comes out in the DO loop, after the vector processing before the function ends, the vector processing is started again, the value of the scalar register is reset, and the function After the processing was completed, the vector processing was started again, and the value of the scalar register used in the vector processing after the function was reset. That is, vector processing is started at least three times in one DO loop, and in the function part, a large amount of scalar data is read from the main storage device and stored in the scalar register via the storage control unit and the data transfer circuit. Because it was set,
The processing time was long.

【0003】[0003]

【発明が解決しようとする課題】従来技術では、ベクト
ル処理起動の際に、スカラレジスタにデータを主記憶装
置から読み出してセットしていたため、関数計算の係数
等のように必要なスカラデータの数が多い場合に、ベク
トル処理起動に時間がかかり、しかも、関数を含むルー
プの処理は、ベクトル処理起動を複数回行なわなければ
ならず、ベクトル処理起動の時間が全体のベクトル処理
時間に占める割合が高くなり、ベクトル処理の高速化を
妨げていた。本発明の目的は、関数計算等で必要なスカ
ラデータを、直接ベクトル命令で指定し、ベクトルプロ
セッサの中で、スカラレジスタにセットすることによ
り、ベクトル処理起動時のスカラのセットアップ時間を
短縮すると同時に、ベクトル処理起動回数をも減らすこ
とにより高速演算を可能にすることである。
In the prior art, since the data was read from the main memory and set in the scalar register when the vector processing was started, the number of required scalar data such as the coefficient of the function calculation is required. If the number of vector processing is large, it takes a long time to start the vector processing, and in the processing of the loop including the function, it is necessary to perform the vector processing starting a plurality of times, and the ratio of the vector processing starting time to the total vector processing time is large. It has become high and hinders the speeding up of vector processing. An object of the present invention is to reduce scalar setup time at the time of starting vector processing by directly specifying scalar data required for function calculation by a vector instruction and setting it in a scalar register in the vector processor. The purpose is to enable high-speed calculation by reducing the number of vector processing activations.

【0004】[0004]

【課題を解決するための手段】上記目的を達成するた
め、本発明は、スカラの即値データをスカラレジスタに
セットするベクトル命令を実行するベクトル処理装置で
あり、前記ベクトル命令は、オペレーションコードと、
設定するスカラレジスタ番号と、即値データを有し、命
令実行判定回路は、該ベクトル命令をデコードして、即
値データをデータ制御回路に転送し、他の部分をベクト
ル命令レジスタに転送し、命令実行制御部は命令起動に
応じて前記ベクトル命令レジスタの内容に従い、選択回
路により前記スカラレジスタ番号のスカラレジスタを選
択して前記データ制御回路内の即値データを書き込むよ
うにしている。また、前記ベクトル命令は、VLI命令
とVLIS命令の一対の命令からなり、VLI命令は、
オペレーションコードと、設定するスカラレジスタ番号
と、スカラレジスタの下位側部分の即値データを有し、
VLIS命令は、オペレーションコードと、設定するス
カラレジスタ番号と、スカラレジスタの上位側部分の即
値データを有し、命令実行判定回路は、前記VLI命令
またはVLIS命令をデコードして、即値データをデー
タ制御回路の第1のレジスタの下位部分と第2のレジス
タの上位部分に転送し、命令の他の部分をベクトル命令
レジスタに転送し、命令実行制御部は命令起動に応じて
前記ベクトル命令レジスタの内容に従い、VLI命令の
場合は、前記データ制御回路内の第1のレジスタのデー
タをセレクタにより選択して選択回路に転送し、選択回
路により前記スカラレジスタ番号のスカラレジスタを選
択して該データを書き込み、VLIS命令の場合は、前
記データ制御回路内の第2のレジスタのデータをセレク
タにより選択して選択回路に転送し、選択回路により前
記スカラレジスタ番号のスカラレジスタを選択し、かつ
セット信号制御回路の制御の下に該データの上位部分の
みを書き込むようにしている。
To achieve the above object, the present invention is a vector processing device for executing a vector instruction for setting immediate data of a scalar in a scalar register, wherein the vector instruction includes an operation code,
It has a scalar register number to be set and immediate data, and the instruction execution determination circuit decodes the vector instruction, transfers the immediate data to the data control circuit, transfers the other part to the vector instruction register, and executes the instruction. The control unit selects the scalar register having the scalar register number by the selection circuit according to the contents of the vector instruction register in response to the instruction activation and writes the immediate data in the data control circuit. The vector instruction is composed of a pair of VLI instruction and VLIS instruction, and the VLI instruction is
It has an operation code, a scalar register number to be set, and immediate data of the lower part of the scalar register,
The VLIS instruction has an operation code, a scalar register number to be set, and immediate data of the upper side portion of the scalar register. The instruction execution determination circuit decodes the VLI instruction or the VLIS instruction to control the immediate data. The lower part of the first register and the upper part of the second register of the circuit are transferred, and the other part of the instruction is transferred to the vector instruction register. In the case of the VLI instruction, the data of the first register in the data control circuit is selected by the selector and transferred to the selection circuit, and the scalar register of the scalar register number is selected by the selection circuit to write the data. , VLIS instruction, the data in the second register in the data control circuit is selected by the selector. Transferred to 択回 path, so that the selected scalar register scalar register number, and writes only the upper portion of the data under the control of the set signal the control circuit by the selection circuit.

【0005】[0005]

【発明実施の形態】以下、本発明の一実施形態を詳細に
説明する。図1は、本発明のベクトル処理装置の一実施
形態を示す全体の構成図であり、1はスカラプロセッ
サ、2はベクトルプロセッサ、3は記憶制御ユニット、
4は主記憶装置である。ベクトルプロセッサ2は、ベク
トル命令バッファ21、ベクトルアドレスレジスタ2
2、命令実行判定回路23、ベクトル命令レジスタ2
4、起動制御部25、命令実行制御部26、ベクトル演
算器271、後処理演算器272、ベクトルレジスタ2
8、スカラレジスタ29、データ転送回路210から構
成されている。図では、ベクトル演算器271やデータ
転送回路210は、1つしか示していないが、実際は複
数あってもよい。
BEST MODE FOR CARRYING OUT THE INVENTION An embodiment of the present invention will be described in detail below. FIG. 1 is an overall configuration diagram showing an embodiment of a vector processing device of the present invention. 1 is a scalar processor, 2 is a vector processor, 3 is a storage control unit,
Reference numeral 4 is a main storage device. The vector processor 2 includes a vector instruction buffer 21 and a vector address register 2
2, instruction execution determination circuit 23, vector instruction register 2
4, activation control unit 25, instruction execution control unit 26, vector arithmetic unit 271, post-processing arithmetic unit 272, vector register 2
8, a scalar register 29, and a data transfer circuit 210. Although only one vector calculator 271 and data transfer circuit 210 are shown in the figure, there may actually be more than one.

【0006】図1において、スカラプロセッサ1は、ベ
クトル処理を行なわなければならなくなった場合、ベク
トルプロセッサ2に対して、ベクトル処理起動をかけ
る。この時、スカラプロセッサ1では、ベクトル処理準
備命令を処理する。ベクトル処理準備命令には、例え
ば、以下のような命令がある。 LMA(Load Multiple Vector Address & Increment)
命令 LMB(Load Multiple Vector Base)命令 これらの命令は、共に、主記憶装置4上にあるデータ
(アドレス)を記憶制御ユニット3を経由して、ベクト
ルアドレスレジスタ22にセットする。 LMS(Load Multiple Scalar)命令 この命令は、主記憶装置4上にあるデータ(スカラデー
タ)を記憶制御ユニット3を経由して、スカラレジスタ
29にセットする。 EXVP(Execute Vector Processing)命令 この命令は、ベクトルプロセッサ2にベクトル処理の開
始を指示する。スカラプロセッサ1では、順次、このよ
うなベクトル処理準備命令を処理する。
In FIG. 1, the scalar processor 1 activates the vector processor 2 when the vector processing has to be performed. At this time, the scalar processor 1 processes the vector processing preparation instruction. Examples of vector processing preparation instructions include the following instructions. LMA (Load Multiple Vector Address & Increment)
Instructions LMB (Load Multiple Vector Base) Instructions These instructions both set the data (address) in the main storage device 4 to the vector address register 22 via the storage control unit 3. LMS (Load Multiple Scalar) instruction This instruction sets the data (scalar data) in the main storage device 4 to the scalar register 29 via the storage control unit 3. EXVP (Execute Vector Processing) Command This command instructs the vector processor 2 to start vector processing. The scalar processor 1 sequentially processes such vector processing preparation instructions.

【0007】LMS命令の処理では、主記憶装置4上の
スカラデータは、記憶制御ユニット3を経由し、選択回
路291を通って、スカラレジスタ29にセットされ
る。選択回路291は、このような主記憶装置4からの
スカラデータの他、スカラプロセッサ1からのスカラデ
ータや、内積、総和等の後処理演算器272により得ら
れた演算結果等を指定されたスカラレジスタ29にセッ
トする。スカラレジスタ29にデータがセットされると
同時に、対応するValidビットも1にセットされ
る。Validビットは、スカラレジスタ29の各々の
レジスタに対応して1ビットずつ設けられており、スカ
ラレジスタ29にデータがセットされると、対応するV
alidビットの値を1にセットするようになってい
る。これにより、スカラデータのスカラレジスタ29へ
のセットが終了したか否かを管理することができる。
In the processing of the LMS instruction, the scalar data in the main memory 4 is set in the scalar register 29 through the storage control unit 3 and the selection circuit 291. In addition to the scalar data from the main storage device 4, the selection circuit 291 is a scalar data designated by the scalar data from the scalar processor 1 and the calculation result obtained by the post-processing calculator 272 such as inner product and sum. Set in register 29. At the same time that the data is set in the scalar register 29, the corresponding Valid bit is also set to 1. The Valid bit is provided one bit at a time corresponding to each register of the scalar register 29, and when data is set in the scalar register 29, the corresponding V
The value of the alid bit is set to 1. This makes it possible to manage whether or not the setting of the scalar data to the scalar register 29 is completed.

【0008】また、EXVP命令の処理では、ベクトル
プロセッサ2に対し、ベクトル処理開始信号12が送出
され、主記憶装置4上のベクトル命令列の先頭アドレス
からベクトル命令列が読み出され、ベクトル命令バッフ
ァ21にセットされる。なお、Validビットにより
スカラデータのスカラレジスタ29へのセット終了が管
理されているため、スカラレジスタ29へのデータのセ
ット終了を待たずに、ベクトル処理起動を開始すること
が出来る。
Further, in the processing of the EXVP instruction, the vector processing start signal 12 is sent to the vector processor 2, the vector instruction string is read from the head address of the vector instruction string in the main memory 4, and the vector instruction buffer is read. 21 is set. Since the end of setting the scalar data in the scalar register 29 is managed by the Valid bit, the vector process start can be started without waiting for the end of the data setting in the scalar register 29.

【0009】命令実行判定回路23では、命令デコーダ
231が、ベクトル処理開始信号12を受け取ると、ベ
クトル命令バッファ21の先頭取り出し位置から、1つ
のベクトル命令を取り出してデコードする。図1の命令
デコーダ231の中には、取り出したベクトル命令のデ
コード結果のフォーマットを示してある。これにおい
て、OPは演算の種類を表すオペレーションコード、R
N1〜RN3は、ベクトルレジスタ番号あるいはスカラ
レジスタ番号を指定するレジスタ指定部、VAIRNお
よびVBRNは、ともにベクトルアドレスレジスタ番号
を指定するベクトルアドレスレジスタ指定部である。ま
た、ベクトル命令レジスタ24に示したフォーマットも
同様であるが、さらにALNはこのベクトル命令で使用
するベクトル演算器を指定するベクトル演算器指定部、
TRNはこのベクトル命令で使用するデータ転送回路を
指定するデータ転送回路指定部である。
In the instruction execution determination circuit 23, when the instruction decoder 231 receives the vector processing start signal 12, it fetches one vector instruction from the leading fetch position of the vector instruction buffer 21 and decodes it. In the instruction decoder 231 of FIG. 1, the format of the decoding result of the fetched vector instruction is shown. In this, OP is an operation code indicating the type of operation, R
N1 to RN3 are register designating sections for designating vector register numbers or scalar register numbers, and VAIRN and VBRN are vector address register designating sections for designating vector address register numbers. Further, the format shown in the vector instruction register 24 is also the same, but ALN is a vector arithmetic unit designating section for designating a vector arithmetic unit to be used in this vector instruction.
TRN is a data transfer circuit designating section that designates a data transfer circuit used in this vector instruction.

【0010】命令デコーダ231は、デコードされたベ
クトル命令が実行可能かどうかを判定するために、コン
フリクトチェック回路235にデコード結果を送出す
る。ベクトル命令が、実行可能かどうかの判定には、取
り出したベクトル命令で指定されたベクトルレジスタ2
8やスカラレジスタ29、そのベクトル命令で指定され
た演算を行なうためのベクトル演算器271やデータ転
送回路210があいていることが必要であり、そのた
め、表示回路234の結果を用いて、コンフリクトチェ
ックを行なう。表示回路234は、ベクトル演算器27
1、ベクトルレジスタ28、スカラレジスタ29、デー
タ転送回路210の各々に対応して1個ずつの表示子を
備え、それらが使用中であるかどうかを表示したもので
ある。コンフリクトチェック回路235は、これらの表
示子を参照することにより、取り出したベクトル命令で
指定されたベクトルレジスタ28やスカラレジスタ2
9、そのベクトル命令で指定された演算を行なうための
ベクトル演算器271やデータ転送回路210があいて
いるかどうかを調べ、必要なものがすべて空いているこ
とを検出すると、そのベクトル命令は、実行可能である
と判定し、信号線341を起動制御部25に送出し、そ
のベクトル命令のデコード結果を信号線342によって
ベクトル命令レジスタ24に送出する。そして、その場
合には、そのベクトル命令で使用するベクトルレジスタ
28、スカラレジスタ29、ベクトル演算器271、デ
ータ転送回路210に対応する表示子を、それらが使用
中であることを表示するようにセットする。必要なもの
が使用中の時は、空くまで待つ。
The instruction decoder 231 sends the decoding result to the conflict check circuit 235 to determine whether the decoded vector instruction can be executed. To determine whether the vector instruction is executable, the vector register 2 specified by the fetched vector instruction is used.
8 and the scalar register 29, the vector arithmetic unit 271 for performing the operation designated by the vector instruction, and the data transfer circuit 210 need to be open. Therefore, the result of the display circuit 234 is used to perform the conflict check. Do. The display circuit 234 uses the vector calculator 27.
1, each of the vector register 28, the scalar register 29, and the data transfer circuit 210 is provided with one indicator, which indicates whether or not they are in use. The conflict check circuit 235 refers to these indicators to refer to the vector register 28 and the scalar register 2 specified by the fetched vector instruction.
9. It is checked whether or not the vector calculator 271 and the data transfer circuit 210 for performing the operation designated by the vector instruction are available, and when it is detected that all the necessary ones are available, the vector instruction is executed. When it is determined that it is possible, the signal line 341 is transmitted to the activation control unit 25, and the decoding result of the vector instruction is transmitted to the vector instruction register 24 through the signal line 342. In that case, the indicators corresponding to the vector register 28, the scalar register 29, the vector calculator 271, and the data transfer circuit 210 used in the vector instruction are set so as to indicate that they are in use. To do. When you need something, wait until it's free.

【0011】また、そのベクトル命令でスカラレジスタ
29が指定されている場合は、Validビット読み出
し制御回路232から、指定されたスカラレジスタ29
に対応するValidビットの値を読み出す指示を信号
線39を介してスカラレジスタ29に送出し、Vali
dビットの値を読み出す。SRセットアップチェック回
路236では、読み出されたValidビットの値によ
り、指定されたスカラレジスタ29に対してデータのセ
ットが終了しているかどうかを判断する。指定されたス
カラレジスタ29に対応するValidビットの値が1
で、なおかつ、そのスカラレジスタ29とそのベクトル
命令で指定されたベクトルレジスタ28や、そのベクト
ル命令で指定された演算を行なうためのベクトル演算器
271やデータ転送回路210がコンフリクトチェック
の結果、すべて空いていれば、そのベクトル命令は実行
可能であると判定し、その判定結果を信号線351を介
して起動制御部に送出し、そのベクトル命令のデコード
結果を信号線352によってベクトル命令レジスタ24
に送出する。Validビットの値が0ならば、指定さ
れたスカラレジスタ29にデータがまだセットされてい
ないため、Validビットの値が1になるまでそのベ
クトル命令は実行しない。
If the scalar register 29 is designated by the vector instruction, the designated scalar register 29 is designated by the Valid bit read control circuit 232.
An instruction to read the value of the Valid bit corresponding to is sent to the scalar register 29 via the signal line 39, and
Read the value of d bits. The SR setup check circuit 236 determines whether or not data setting is completed for the specified scalar register 29 based on the value of the read Valid bit. The value of the Valid bit corresponding to the specified scalar register 29 is 1
In addition, as a result of the conflict check, the scalar register 29 and the vector register 28 designated by the vector instruction, the vector computing unit 271 for performing the computation designated by the vector instruction, and the data transfer circuit 210 are all empty. If so, it is determined that the vector instruction is executable, the determination result is sent to the activation control unit via the signal line 351, and the decoding result of the vector instruction is transmitted via the signal line 352 to the vector instruction register 24.
To send to. If the value of the Valid bit is 0, the data is not yet set in the specified scalar register 29, and therefore the vector instruction is not executed until the value of the Valid bit becomes 1.

【0012】起動制御部25は、命令実行判定回路23
から信号線341または351を受け取ると、命令実行
制御部26に対して、起動信号56を送出する。命令実
行制御部26は、起動信号56を受け取ると、ベクトル
命令レジスタ24から1つのベクトル命令を取り出し、
そのベクトル命令で指定されたベクトル演算器271、
ベクトルレジスタ28、スカラレジスタ29、データ転
送回路210にベクトル処理動作を行なわせる。
The activation control unit 25 includes an instruction execution determination circuit 23.
When the signal line 341 or 351 is received from, the activation signal 56 is sent to the instruction execution control unit 26. When the instruction execution control unit 26 receives the activation signal 56, it fetches one vector instruction from the vector instruction register 24,
A vector calculator 271 designated by the vector instruction,
The vector register 28, the scalar register 29, and the data transfer circuit 210 are caused to perform vector processing operations.

【0013】以上のようにして、通常のベクトル処理が
行なわれるが、このようなベクトル処理装置において、
次のようなDOループを処理することを考える。
Normal vector processing is performed as described above. In such a vector processing device,
Consider processing a DO loop as follows.

【0014】[0014]

【数1】 [Equation 1]

【0015】一般に、関数計算では、係数部分に多量の
スカラデータが必要であり、スカラレジスタ29を多数
使用する。したがって、このようなDOループの中に関
数が出てきた場合、関数以前の(ベクトル処理)終了
後、再びベクトル処理起動を行ない、スカラレジスタ2
9の値をセットし直さなければならず、さらにまた、関
数の処理終了後、再びベクトル処理起動を行ない、関数
以後の(ベクトル処理)で用いるスカラレジスタ29の
値をセットし直さなければならない。このことにより、
上記のDOループの処理においては、ベクトル処理実行
時間以外に、ベクトル処理起動時間が多くかかり、しか
も、多量のスカラデータを主記憶装置から読み出し、記
憶制御ユニット3を経由して、スカラレジスタ29にセ
ットしなくてはならず、処理時間が長くなる。しかし、
本発明では2つのベクトル命令を新設し、これらの命令
を実行するための構成を設けることにより、このような
DOループの処理でも、ベクトル処理起動を1回にする
ことができ、また、多量のスカラデータをスカラレジス
タ29にセットする時間も大幅に短縮することができ
る。
Generally, in function calculation, a large amount of scalar data is required in the coefficient portion, and a large number of scalar registers 29 are used. Therefore, when a function appears in such a DO loop, vector processing is started again after (vector processing) before the function is completed, and the scalar register 2
The value of 9 must be reset, and further, after the processing of the function is finished, the vector processing must be started again and the value of the scalar register 29 used in (vector processing) after the function must be reset. This allows
In the DO loop process, the vector process start time is long in addition to the vector process execution time, and moreover, a large amount of scalar data is read out from the main storage device and stored in the scalar register 29 via the storage control unit 3. It has to be set, which increases processing time. But,
In the present invention, by newly providing two vector instructions and providing a configuration for executing these instructions, it is possible to start the vector processing once even in the processing of such a DO loop, and a large number of The time for setting the scalar data in the scalar register 29 can be greatly shortened.

【0016】図2は、新設した2つのベクトル命令の仕
様を示したものである。VLI命令では、スカラレジス
タ29の下位32ビットに即値データを設定し、VLI
S命令では、スカラレジスタ29の上位32ビットに即
値データを設定する。ただし、必ず、これら2つのベク
トル命令は、セットで用いることとする。図3は、図1
における、新設した2つのベクトル命令を実行する構成
部分を示す図であり、データ制御回路237からスカラ
レジスタ29までのデータの流れに沿って詳細に示した
図である。
FIG. 2 shows the specifications of two newly provided vector instructions. In the VLI instruction, immediate data is set in the lower 32 bits of the scalar register 29, and the VLI
In the S instruction, immediate data is set in the upper 32 bits of the scalar register 29. However, these two vector instructions are always used as a set. FIG. 3 shows FIG.
FIG. 3 is a diagram showing a constituent part for executing two newly-established vector instructions in FIG. 3, and is a diagram showing in detail along a data flow from the data control circuit 237 to the scalar register 29.

【0017】以下、図1と図3を用いて2つのベクトル
命令の処理動作について説明する。図1において、命令
実行判定回路23では、命令デコーダ231はベクトル
処理開始信号12を受け取ると、ベクトル命令バッファ
の先頭取り出し位置から、1つのベクトル命令を取り出
してデコードする。命令デコーダ231にはVLI命令
およびVLSI命令をデコードする手段を設ける。取り
出したベクトル命令がVLI命令またはVLIS命令の
場合、Validビット読み出し制御回路232が起動
され、該Validビット読み出し制御回路232は指
定されたスカラレジスタ29に対応するValidビッ
トの値を読み出すよう読み出し指示信号を信号線39に
より送出し、Validビットの値を読み出す。なお、
図3ではValidビット読み出し制御回路232およ
びスカラレジスタ29からのValidビット読み出し
信号線の図示は省略している。一方、命令デコーダ23
1は、VLI命令またはVLIS命令で指定された即値
データ32ビットを、データ制御回路237に送出す
る。
The processing operation of two vector instructions will be described below with reference to FIGS. 1 and 3. In FIG. 1, in the instruction execution determination circuit 23, when the instruction decoder 231 receives the vector processing start signal 12, it fetches and decodes one vector instruction from the leading fetch position of the vector instruction buffer. The instruction decoder 231 is provided with means for decoding the VLI instruction and the VLSI instruction. If the fetched vector instruction is the VLI instruction or the VLIS instruction, the valid bit read control circuit 232 is activated, and the valid bit read control circuit 232 reads out the value of the valid bit corresponding to the specified scalar register 29. Is transmitted through the signal line 39, and the value of the Valid bit is read. In addition,
In FIG. 3, the illustration of the Valid bit read control circuit 232 and the Valid bit read signal line from the scalar register 29 is omitted. On the other hand, the instruction decoder 23
1 sends the 32 bits of immediate data designated by the VLI instruction or the VLIS instruction to the data control circuit 237.

【0018】図3に示すように、データ制御回路237
では、命令デコーダ231から受け取った32ビットの
データの上位に、32ビット all‘0’のデータを
追加した64ビットデータ2371と、32ビットのデ
ータの下位に、32ビットall‘0’のデータを追加
した64ビットデータ2372を生成する。SRセット
アップチェック回路236では、読み出されたVali
dビットの値が0ならば、そのスカラレジスタ29への
書き込みが可能と判断し、信号線651を介して判断結
果の信号を起動制御部25に送出し、オペレーションコ
ード等のデコード結果を信号線652によってベクトル
命令レジスタ24に送出する。
As shown in FIG. 3, the data control circuit 237.
Then, 64-bit data 2371 in which 32-bit all'0 'data is added to the upper 32-bit data received from the instruction decoder 231, and 32-bit all'0' data in the lower 32-bit data are added. The added 64-bit data 2372 is generated. In the SR setup check circuit 236, the read Vali
If the value of the d bit is 0, it is determined that writing to the scalar register 29 is possible, a signal of the determination result is sent to the activation control unit 25 via the signal line 651, and the decoding result of the operation code or the like is sent to the signal line. 652 to the vector instruction register 24.

【0019】起動制御部25は、信号線651を受け取
ると、命令実行制御部26に対して、信号線56により
起動信号を送出する。命令実行制御部26は、起動信号
を受け取ると、ベクトル命令レジスタ24から1つのベ
クトル命令を取り出し、それがVLI命令またはVLI
S命令であることを確認すると、データ制御回路237
に対して、セレクト信号生成回路2374を起動する信
号を信号線671により送出し、また、それと同時に信
号線672によってオペレーションコードを送出する。
データ制御回路237では、64ビットデータ2371
と64ビットデータ2372のうちの1つを、セレクタ
2373により選択するようになっている。セレクト信
号は、信号線671からの起動信号と、信号線672か
らのオペレーションコードの入力によりセレクト信号生
成回路2374で生成される。VLI命令の場合は、6
4ビットデータ2371を選択するように、VLIS命
令の場合は、64ビットデータ2372を選択するよう
にセレクト信号がセレクト信号生成回路2374で生成
される。
Upon receiving the signal line 651, the activation control unit 25 sends an activation signal to the instruction execution control unit 26 via the signal line 56. When the instruction execution control unit 26 receives the activation signal, it fetches one vector instruction from the vector instruction register 24, and this fetches one vector instruction or VLI instruction.
When it is confirmed that it is the S instruction, the data control circuit 237
On the other hand, a signal for activating the select signal generation circuit 2374 is sent out via the signal line 671, and at the same time, an operation code is sent out via the signal line 672.
In the data control circuit 237, 64-bit data 2371
And one of the 64-bit data 2372 is selected by the selector 2373. The select signal is generated by the select signal generation circuit 2374 by the input of the activation signal from the signal line 671 and the operation code from the signal line 672. 6 for VLI instructions
In the case of the VLIS instruction so as to select the 4-bit data 2371, the select signal is generated by the select signal generation circuit 2374 so as to select the 64-bit data 2372.

【0020】また、命令実行制御部26は、選択回路2
91に対して、指定されたスカラレジスタ29に64ビ
ットのデータを書き込むよう指示する信号を信号線69
1により送出する。それと同時に、スカラレジスタ29
へのセット信号を制御するセット信号制御回路294に
対して、信号線692によりセット信号を、信号線69
3によってオペレーションコードを送出する。セット信
号制御回路294は、オペレーションコードの内容に応
じて、VLIS命令の場合は、64ビットのデータのう
ち、上位32ビット分だけを書き込むよう、下位32ビ
ットへのセット信号を抑止する。VLI命令の場合は、
64ビットのデータ全部を書き込むため、何もしない。
このようにして、VLI命令によって指定された即値デ
ータ32ビットが、指定されたスカラレジスタ29の下
位32ビットへ、VLIS命令によって指定された即値
データ32ビットが、指定されたスカラレジスタ29の
上位32ビットに書き込まれる。また、VLIS命令に
よるスカラレジスタ29への書き込みと同時に、そのス
カラレジスタ29に対応するValidビットの値を1
にする。
Further, the instruction execution control unit 26 includes a selection circuit 2
A signal for instructing 91 to write 64-bit data to the specified scalar register 29 is sent to the signal line 69.
Send by 1 At the same time, the scalar register 29
To the set signal control circuit 294 which controls the set signal to the signal line 69
The operation code is transmitted according to 3. In the case of the VLIS instruction, the set signal control circuit 294 inhibits the set signal to the lower 32 bits so that only the upper 32 bits of the 64-bit data are written according to the content of the operation code. For VLI instructions,
Nothing is done because all 64-bit data is written.
In this way, the immediate data 32 bits specified by the VLI instruction are transferred to the lower 32 bits of the specified scalar register 29, and the immediate data 32 bits specified by the VLI instruction are transferred to the upper 32 bits of the specified scalar register 29. Written to bits. At the same time as writing to the scalar register 29 by the VLIS instruction, the value of the Valid bit corresponding to the scalar register 29 is set to 1
To

【0021】ここで、VLI命令およびVLIS命令で
指定されたスカラレジスタ29に対応するValidビ
ットの値は、即値データを書き込む前は必ず0であるは
ずであるが、Validビット読み出し制御回路232
により読み出した値が1の場合は、コンパイラのバグに
よるものか、ハードウェアの何らかの不良によるものと
考え、Validビットの値が0である時と同様の手順
で、指定されたスカラレジスタ29に上書きを行なう。
なお、1になったValidビットは、ベクトル処理終
了後、コンパイラによって、リセットされる。
Here, the value of the Valid bit corresponding to the scalar register 29 designated by the VLI instruction and the VLI instruction must be 0 before writing the immediate data, but the Valid bit read control circuit 232.
If the value read by is due to a bug in the compiler or some kind of hardware failure, overwrite the specified scalar register 29 in the same procedure as when the Valid bit value is 0. Do.
The Valid bit that becomes 1 is reset by the compiler after the vector processing is completed.

【0022】以上のようにして、VLI命令およびVL
IS命令の2つのベクトル命令を新設し、これらの命令
を実行するために必要な構成を設けることによって、ベ
クトルプロセッサ2の中で、ベクトル命令で指定した即
値データを、スカラレジスタ29にセットすることがで
き、主記憶装置4から読み出したスカラデータを記憶制
御ユニット3を経由して、スカラレジスタ29にセット
するのに比べて、短時間でセットできる。
As described above, the VLI instruction and the VL
By setting two vector instructions of the IS instruction and providing a configuration necessary for executing these instructions, the immediate data designated by the vector instruction is set in the scalar register 29 in the vector processor 2. Therefore, it is possible to set the scalar data read from the main storage device 4 in a short time as compared with the case where the scalar data is set in the scalar register 29 via the storage control unit 3.

【0023】[0023]

【発明の効果】本発明によれば、スカラの即値データ
を、直接ベクトル命令で指定し、ベクトルプロセッサの
中で、スカラレジスタにセットすることができるように
なり、関数計算のような多量のスカラデータが必要な場
合の、ベクトル処理起動時のスカラのセットアップ時間
を短縮すると同時に、関数計算等を含むDOループのベ
クトル処理起動の回数を減らすことができ、ベクトル処
理の高速化が実現できる。
According to the present invention, immediate data of a scalar can be directly specified by a vector instruction and set in a scalar register in a vector processor, and a large number of scalars such as function calculation can be obtained. When data is required, the setup time of the scalar at the time of starting the vector process can be shortened, and at the same time, the number of times of the vector process start of the DO loop including the function calculation etc. can be reduced, and the vector process can be speeded up.

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

【図1】本発明のベクトル処理装置の一実施形態を示す
全体の構成を示す図である。
FIG. 1 is a diagram showing an overall configuration showing an embodiment of a vector processing device of the present invention.

【図2】本発明で新設したベクトル命令の仕様を示した
図である。
FIG. 2 is a diagram showing specifications of a vector instruction newly provided in the present invention.

【図3】新設した2つのベクトル命令を実行する構成部
分を示す図である。
FIG. 3 is a diagram showing components that execute two newly provided vector instructions.

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

1 スカラプロセッサ 2 ベクトルプロセッサ 3 記憶制御ユニット 4 主記憶装置 21 ベクトル命令バッファ 22 ベクトルアドレスレジスタ 23 命令実行判定回路 24 ベクトル命令レジスタ 25 起動制御部 26 命令実行制御部 28 ベクトルレジスタ 29 スカラレジスタ 210 データ転送回路 237 データ制御回路 271 ベクトル演算部 281、282、291、292 選択回路 1 Scalar Processor 2 Vector Processor 3 Storage Control Unit 4 Main Memory 21 Vector Instruction Buffer 22 Vector Address Register 23 Instruction Execution Judgment Circuit 24 Vector Instruction Register 25 Startup Control Section 26 Instruction Execution Control Section 28 Vector Register 29 Scalar Register 210 Data Transfer Circuit 237 data control circuit 271 vector operation unit 281, 282, 291, 292 selection circuit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 スカラの即値データをスカラレジスタに
セットするベクトル命令を実行するベクトル処理装置で
あって、 前記ベクトル命令は、オペレーションコードと、設定す
るスカラレジスタ番号と、即値データを有し、 命令実行判定回路は、該ベクトル命令をデコードして、
即値データをデータ制御回路に転送し、他の部分をベク
トル命令レジスタに転送し、 命令実行制御部は命令起動に応じて前記ベクトル命令レ
ジスタの内容に従い、選択回路により前記スカラレジス
タ番号のスカラレジスタを選択して前記データ制御回路
内の即値データを書き込むことを特徴とするベクトル処
理装置。
1. A vector processing device for executing a vector instruction for setting scalar immediate data to a scalar register, wherein the vector instruction has an operation code, a scalar register number to be set, and immediate data. The execution determination circuit decodes the vector instruction,
The immediate data is transferred to the data control circuit, the other part is transferred to the vector instruction register, and the instruction execution control unit follows the contents of the vector instruction register in response to the instruction activation and selects the scalar register of the scalar register number by the selection circuit. A vector processing device which is selected and writes immediate data in the data control circuit.
【請求項2】 スカラの即値データをスカラレジスタに
セットするベクトル命令を実行するベクトル処理装置で
あって、 前記ベクトル命令は、VLI命令とVLIS命令の一対
の命令からなり、 VLI命令は、オペレーションコードと、設定するスカ
ラレジスタ番号と、スカラレジスタの下位側部分の即値
データを有し、 VLIS命令は、オペレーションコードと、設定するス
カラレジスタ番号と、スカラレジスタの上位側部分の即
値データを有し、 命令実行判定回路は、前記VLI命令またはVLIS命
令をデコードして、即値データをデータ制御回路の第1
のレジスタの下位部分と第2のレジスタの上位部分に転
送し、命令の他の部分をベクトル命令レジスタに転送
し、 命令実行制御部は命令起動に応じて前記ベクトル命令レ
ジスタの内容に従い、 VLI命令の場合は、前記データ制御回路内の第1のレ
ジスタのデータをセレクタにより選択して選択回路に転
送し、選択回路により前記スカラレジスタ番号のスカラ
レジスタを選択して該データを書き込み、 VLIS命令の場合は、前記データ制御回路内の第2の
レジスタのデータをセレクタにより選択して選択回路に
転送し、選択回路により前記スカラレジスタ番号のスカ
ラレジスタを選択し、かつセット信号制御回路の制御の
下に該データの上位部分のみを書き込むことを特徴とす
るベクトル処理装置。
2. A vector processing device for executing a vector instruction for setting scalar immediate data in a scalar register, wherein the vector instruction comprises a pair of a VLI instruction and a VLIS instruction, and the VLI instruction is an operation code. And a scalar register number to be set and immediate data of the lower side portion of the scalar register. The VLIS instruction has an operation code, a scalar register number to be set, and immediate data of the upper side portion of the scalar register. The instruction execution determination circuit decodes the VLI instruction or the VLIS instruction and outputs immediate data to the first of the data control circuits.
The lower part of the register and the upper part of the second register, the other part of the instruction is transferred to the vector instruction register, and the instruction execution control unit follows the contents of the vector instruction register in response to instruction activation In the case of, the data of the first register in the data control circuit is selected by the selector and transferred to the selection circuit, and the selection circuit selects the scalar register of the scalar register number to write the data, and the VLIS instruction In this case, the data in the second register in the data control circuit is selected by the selector and transferred to the selection circuit, the scalar register having the scalar register number is selected by the selection circuit, and the data is controlled by the set signal control circuit. A vector processing device, characterized in that only the upper part of the data is written to the.
JP11023796A 1996-04-05 1996-04-05 Vector processor Pending JPH09274612A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11023796A JPH09274612A (en) 1996-04-05 1996-04-05 Vector processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11023796A JPH09274612A (en) 1996-04-05 1996-04-05 Vector processor

Publications (1)

Publication Number Publication Date
JPH09274612A true JPH09274612A (en) 1997-10-21

Family

ID=14530590

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11023796A Pending JPH09274612A (en) 1996-04-05 1996-04-05 Vector processor

Country Status (1)

Country Link
JP (1) JPH09274612A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000046692A1 (en) * 1999-02-03 2000-08-10 Nec Corporation Signal processor and product-sum operating device for use therein with rounding function
JP2001290798A (en) * 2000-04-07 2001-10-19 Nintendo Co Ltd Method and device for efficiently reading and storing vector
US6490673B1 (en) 1998-11-27 2002-12-03 Matsushita Electric Industrial Co., Ltd Processor, compiling apparatus, and compile program recorded on a recording medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6490673B1 (en) 1998-11-27 2002-12-03 Matsushita Electric Industrial Co., Ltd Processor, compiling apparatus, and compile program recorded on a recording medium
US6820223B2 (en) 1998-11-27 2004-11-16 Matsushita Electric Industrial Co., Ltd. Processor, compiling apparatus, and compile program recorded on a recording medium
WO2000046692A1 (en) * 1999-02-03 2000-08-10 Nec Corporation Signal processor and product-sum operating device for use therein with rounding function
US6792442B1 (en) 1999-02-03 2004-09-14 Nec Corporation Signal processor and product-sum operating device for use therein with rounding function
JP2001290798A (en) * 2000-04-07 2001-10-19 Nintendo Co Ltd Method and device for efficiently reading and storing vector

Similar Documents

Publication Publication Date Title
JPH04109336A (en) Data processor
JPH0810428B2 (en) Data processing device
JPS6125169B2 (en)
JPH01214932A (en) Data processor
JPH07120278B2 (en) Data processing device
US6229543B1 (en) Microprocessor, and graphics processing apparatus and method using the same
JPH0391029A (en) Data processor
JPH09274612A (en) Vector processor
JP3490005B2 (en) Instruction control apparatus and method
JP2504235B2 (en) Data processing device
US6727903B1 (en) Microprocessor, and graphics processing apparatus and method using the same
JPH0769806B2 (en) Data processing device
JPH05241827A (en) Command buffer controller
JPH0222413B2 (en)
JP2622026B2 (en) Register writing control method in central processing unit
JPS5922588Y2 (en) micro program processor
JP2825315B2 (en) Information processing device
JPS58137081A (en) Vector processor
JP2583614B2 (en) Vector arithmetic unit
JPH05210500A (en) Data processor
JP2696578B2 (en) Data processing device
JPH0769805B2 (en) Data processing device
JPH0218621A (en) Data processor
JPH0752402B2 (en) Data processing device
JPH02254541A (en) Control system for conditional branch instruction