JP2583614B2 - Vector arithmetic unit - Google Patents

Vector arithmetic unit

Info

Publication number
JP2583614B2
JP2583614B2 JP1245451A JP24545189A JP2583614B2 JP 2583614 B2 JP2583614 B2 JP 2583614B2 JP 1245451 A JP1245451 A JP 1245451A JP 24545189 A JP24545189 A JP 24545189A JP 2583614 B2 JP2583614 B2 JP 2583614B2
Authority
JP
Japan
Prior art keywords
vector
register
vector operation
data
pointer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP1245451A
Other languages
Japanese (ja)
Other versions
JPH03108061A (en
Inventor
修 小野寺
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 JP1245451A priority Critical patent/JP2583614B2/en
Publication of JPH03108061A publication Critical patent/JPH03108061A/en
Application granted granted Critical
Publication of JP2583614B2 publication Critical patent/JP2583614B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、ベクトル処理装置等の情報処理装置に関
し、特にスカラデータをベクトル演算のオペランドとし
て、使用する際の性能向上を図ったベクトル演算装置に
関するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus such as a vector processing apparatus, and more particularly, to a vector operation apparatus which improves performance when scalar data is used as an operand of a vector operation. It is about.

[従来の技術] 近年、科学技術計算の分野において、ベクトル演算機
能を備えた、いわゆるベクトルコンピュータ等のベクト
ル処理装置が広く普及しつつある。
[Prior Art] In recent years, in the field of scientific and technological calculations, vector processing apparatuses, such as so-called vector computers, having a vector operation function have become widespread.

従来の情報処理装置においては、いわゆるスカラ命令
と呼ばれる1命令が1つのデータを対象として演算して
いるのに対し、ベクトル処理装置においては、ベクトル
命令と呼ばれる命令を採用しているのが一般的である。
In a conventional information processing apparatus, one instruction called a scalar instruction operates on one data, whereas in a vector processing apparatus, an instruction called a vector instruction is generally employed. It is.

ベクトル命令は、スカラ命令と異なり、1つの命令で
複数のデータ(これをベクトルエレメントと呼ぶ)を演
算し、複数の結果を生成する機能を持つ。すなわち、ベ
クトル処理装置のベクトル処理では、処理の対象となる
ベクトルオペランドは通常複数のベクトルエレメントか
らなる。
Unlike a scalar instruction, a vector instruction has a function of calculating a plurality of data (referred to as a vector element) with one instruction and generating a plurality of results. That is, in the vector processing of the vector processing device, the vector operand to be processed usually includes a plurality of vector elements.

第2図にベクトル処理装置を構成する装置例を示す。 FIG. 2 shows an example of an apparatus constituting the vector processing apparatus.

図に示す如く、通常、ベクトル処理装置は主記憶装置
(以下MSと略記する)103、中央処理装置(以下CPUと略
記する)200、入出力処理装置(以下IOPと略記する)20
1およびベクトル演算装置(以下VFと略記する)202とか
ら構成される。
As shown in the figure, a vector processing device usually includes a main storage device (hereinafter abbreviated as MS) 103, a central processing device (hereinafter abbreviated as CPU) 200, and an input / output processing device (hereinafter abbreviated as IOP) 20.
1 and a vector operation device (hereinafter abbreviated as VF) 202.

CPU200は、従来のスカラ命令を用いた通常処理を担
い、さらにベクトル命令が出現すると、その命令に付随
するパラメータおよびオペランドデータをVF202に送
る。
The CPU 200 performs normal processing using a conventional scalar instruction. When a vector instruction further appears, the CPU 200 sends parameters and operand data accompanying the instruction to the VF 202.

そして、VF202内でベクトル演算を行う。 Then, a vector operation is performed in the VF 202.

ベクトル命令の組み合せによって、ベクトル処理は、
MS103またはCPU200内のレジスタからVF202へのベクトル
エレメントの転送の第1のステップ、次にVF202内部で
のベクトル演算実行の第2のステップ、最後にVF202か
らベクトル演算の結果を取り出し、MS103またはCPU200
内のレジスタに格納する第3のステップに分ける事がで
きる。
By the combination of vector instructions, vector processing is
The first step of transferring a vector element from a register in the MS 103 or the CPU 200 to the VF 202, the second step of executing a vector operation in the VF 202, and finally extracting the result of the vector operation from the VF 202,
Can be divided into a third step of storing the data in the register inside the register.

この様に処理のステップを分割した場合、VF202内で
オペランドであるベクトルエレメントを一時的に蓄えて
おく必要がある。その為にベクトル処理装置では、一時
的にベクトルエレメントを保持する目的でベクトルレジ
スタと呼ばれるレジスタ群を用意しているのが一般的な
手法である。
When the processing steps are divided in this way, it is necessary to temporarily store the vector element that is the operand in the VF 202. Therefore, a general method of a vector processing device is to prepare a register group called a vector register for the purpose of temporarily holding a vector element.

以上述べたベクトル処理装置でのベクトルレジスタの
構成およびベクトル命令の一般的な仕様については、た
とえば、IBM社発行の刊行物である「IBM System/370
Vector Operations」(SA22−7125−0)に詳細に記述
されている。
Regarding the configuration of the vector register and the general specification of the vector instruction in the vector processing device described above, for example, “IBM System / 370” which is a publication issued by IBM Corporation
Vector Operations "(SA22-7125-0).

前記刊行物から明らかな様に、ベクトル演算を構成す
るベクトル命令の中には、浮動小数点レジスタ(以下FR
と略記する)の内容であるスカラデータをベクトルレジ
スタの一連のエレメントに展開しながら所定の演算を行
うQV形式のLoad命令が存在する。この命令はスカラデー
タをベクトルデータに変換する命令である。
As is apparent from the above publication, floating point registers (hereinafter referred to as FR) are included in the vector instructions constituting the vector operation.
There is a QV-format Load instruction for performing a predetermined operation while expanding the scalar data, which is the content of the scalar data, into a series of elements of a vector register. This instruction converts scalar data into vector data.

その他、Load Zero命令の様にベクトルレジスタの各
エレメントにゼロをロードする命令や、ストライドが0
であるVST形式のLoad命令もスカラデータをベクトルデ
ータに変換する機能を持つ。
Other instructions such as loading a zero into each element of the vector register, such as the Load Zero instruction, and a stride of 0
The VST format Load instruction also has a function of converting scalar data to vector data.

すなわち、これらの命令は、処理の単純化や処理速度
向上のために、ベクトルレジスタの各エレメントへの展
開によってベクトルデータ化することにより、スカラデ
ータをも一律にベクトルデータとして扱おうとするもの
である。
In other words, these instructions are intended to uniformly treat scalar data as vector data by converting them into vector data by expanding them into elements of a vector register in order to simplify processing and improve processing speed. .

[発明が解決しようとする課題] 前記のスカラデータを、ベクトルエレメントとしてベ
クトルレジスタにロードする機能を満足する従来のベク
トル演算装置について第4図を用いて説明する。
[Problem to be Solved by the Invention] A conventional vector operation device which satisfies the function of loading the scalar data as a vector element into a vector register will be described with reference to FIG.

第4図は、従来のベクトル演算装置のベクトルレジス
タを中心とした構成を示すブロック図である。
FIG. 4 is a block diagram showing a configuration around a vector register of a conventional vector operation device.

図中、制御装置401、固定値発生回路404、セレクタ40
5、入力バッファレジスタ406、エレメント選択回路40
9、出力バッファレジスタ408は、前記VF202に属する。
In the figure, control device 401, fixed value generation circuit 404, selector 40
5, input buffer register 406, element selection circuit 40
9. The output buffer register 408 belongs to the VF 202.

ロードされるべきスカラデータは、FR402、MS403また
は固定値発生回路404からセレクタ405に送られる。セレ
クタ405は制御装置401で解読されたベクトル命令の種類
により、前記3つの入力の1つを選択して、ベクトルレ
ジスタの入力データを蓄えておく入力バッファレジスタ
406にセットする。
The scalar data to be loaded is sent from the FR 402, the MS 403 or the fixed value generation circuit 404 to the selector 405. The selector 405 selects one of the three inputs according to the type of the vector instruction decoded by the control device 401, and stores the input data of the vector register in the input buffer register.
Set to 406.

その後、制御装置401はエレメント選択回路409を介し
てベクトルレジスタ407にエレメント番号0から番号上
昇順に入力バッファレジスタ406の内容を書き込んでい
く。
After that, the control device 401 writes the contents of the input buffer register 406 into the vector register 407 via the element selection circuit 409 in ascending order from element number 0.

この書込みは1エレメントに対し早いケースでも、通
常、1マシンサイクルを要するのが一般的である。従っ
てベクトルレジスタがNエレメントから構成されている
と少なくともスカラデータをベクトルレジスタの全エレ
メントにロードする為にはNマシンサイクルを要する事
になり、このベクトルレジスタへのスカラデータのロー
ド手段はベクトル処理の性能向上の1つの問題となって
いた。
This writing usually requires one machine cycle, even in the case where it is early for one element. Therefore, if the vector register is composed of N elements, it takes N machine cycles to load at least the scalar data into all the elements of the vector register. This has been one problem of performance improvement.

このような問題を解消するためには、ベクトルレジス
タの複数のエレメントに、同時にスカラデータをロード
する手段が考えられるが、この手段によれば、装置規模
やコスト等、装置上の不利益が大きく、実際上、同時に
ロードできるエレメント数には限界がある。
In order to solve such a problem, a method of simultaneously loading scalar data into a plurality of elements of the vector register is conceivable. However, according to this means, disadvantages on the apparatus such as the apparatus scale and cost are greatly increased. In practice, there is a limit to the number of elements that can be loaded simultaneously.

本発明の目的は、装置上の不利益を大きくせずにベク
トル処理の性能を、より向上できるベクトルレジスタへ
のスカラデータのロード手段を具備したベクトル演算装
置、および、情報処理装置を提供することにある。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a vector operation device including a means for loading scalar data into a vector register, which can further improve the performance of vector processing without increasing disadvantages on the device, and an information processing device. It is in.

[課題を解決するための手段] 本発明は、前記目的を達成するために、あらかじめ、
ベクトルレジスタに格納したオペランドを読み出してベ
クトル演算を実行するベクトル演算方式であって、オペ
ランドがスカラデータである場合には、該スカラデータ
を、ベクトルレジスタに代えて所定のレジスタに、あら
かじめ格納し、ベクトル演算実行時に、オペランドをベ
クトルレジスタに代えて前記所定のレジスタより読み出
して演算を実行することを特徴とするベクトル演算方式
を提供する。
[Means for Solving the Problems] The present invention, in order to achieve the above object,
This is a vector operation method in which an operand stored in a vector register is read and a vector operation is executed. If the operand is scalar data, the scalar data is stored in a predetermined register in place of the vector register in advance, A vector operation method is provided in which, when a vector operation is performed, an operand is read from the predetermined register instead of the vector register and the operation is executed.

また、前記目的を達成するために本発明は、ベクトル
レジスタの複数のエレメントに格納されたオペランドを
用いてベクトル演算を実行する手段を有するベクトル演
算装置であって、 ベクトル演算のオペランドがスカラデータである場合
に、ベクトルレジスタに代えて、該スカラデータを格納
するレジスタと、ベクトル演算のオペランドがスカラデ
ータである場合に、ベクトルレジスタに格納されている
内容に代えて、前記レジスタの内容を前記ベクトル演算
を実行する手段に供給する手段とを有することを特徴と
するベクトル演算装置を提供する。
According to another aspect of the present invention, there is provided a vector operation apparatus having means for executing a vector operation using operands stored in a plurality of elements of a vector register, wherein the operand of the vector operation is scalar data. In some cases, instead of a vector register, a register for storing the scalar data, and when an operand of a vector operation is scalar data, the content of the register is replaced by the vector instead of the content stored in the vector register. Means for supplying to a means for executing an operation.

また、本発明は、ベクトルレジスタの複数のエレメン
トに格納されたオペランドを用いてベクトル演算を実行
する手段を有するベクトル演算装置であって、ベクトル
演算のオペランドがスカラデータである場合に、ベクト
ルレジスタに代えて該スカラデータを格納するレジスタ
と、該レジスタに格納されている内容とベクトルレジス
タのエレメントの対応を示すポインタと、該ポインタの
状態により、ベクトルレジスタの内容または前記レジス
タの内容を前記ベクトル演算を実行する手段に供給する
手段とを有することを特徴とするベクトル演算装置を提
供する。
Further, the present invention is a vector operation device having means for executing a vector operation using operands stored in a plurality of elements of a vector register, and when the operand of the vector operation is scalar data, Instead, a register for storing the scalar data, a pointer indicating the correspondence between the contents stored in the register and the elements of the vector register, and the contents of the vector register or the contents of the register are vector-operated according to the state of the pointer. And a means for supplying to the means for executing the vector processing.

また、さらに本発明は、前記目的を達成する為に、前
記ベクトル演算装置と、記憶装置と、中央処理装置と、
入出力装置とを備えたことを特徴とする情報処理装置と
くにベクトル処理装置を提供する。
Further, according to the present invention, in order to achieve the above object, the vector operation device, a storage device, a central processing unit,
An information processing apparatus including an input / output device, particularly, a vector processing apparatus is provided.

[作 用] 本発明のベクトル演算装置によれば、第4図に示す従
来のスカラデータのベクトルレジスタへのロード構成に
加え、レジスタを従来のベクトルレジスタと並列に配置
し、スカラデータをベクトルレジスタにロードするベク
トル命令が発行された際、該スカラデータを前記レジス
タにロードし、ベクトルレジスタにはロードしない。
[Operation] According to the vector operation device of the present invention, in addition to the conventional configuration for loading scalar data into the vector register shown in FIG. 4, the register is arranged in parallel with the conventional vector register, and the scalar data is stored in the vector register. Is issued, the scalar data is loaded into the register, but not into the vector register.

そして、ベクトル演算のオペランドがスカラデータで
ある場合には、ベクトルレジスタに格納されている内容
に代えて、前記レジスタの内容を前記ベクトル演算を実
行する手段に供給される。ベクトル演算を実行する手段
は、この供給されたデータを用いてベクトル演算を実行
する。
If the operand of the vector operation is scalar data, the contents of the register are supplied to the means for executing the vector operation instead of the contents stored in the vector register. The means for executing the vector operation executes the vector operation using the supplied data.

前記スカラデータをロードするレジスタはエレメント
数をベクトルレジスタより少なくできるので、たとえ
ば、エレメント数を‘1'とした場合には、1回のスカラ
データのロードで本ベクトル命令は完了する。つまり従
来はスカラデータのベクトルレジスタのロードにはベク
トルレジスタを構成するエレメント数以上回数分のロー
ド動作時間を要していたが、本発明はより少ないロード
回数でベクトル命令を完了するので、大幅な性能向上を
図れる。なお、前記レジスタはそのエレメント数を‘1'
とするのが好ましい。
Since the register for loading the scalar data can have a smaller number of elements than the vector register, for example, when the number of elements is "1", the vector instruction is completed by loading the scalar data once. That is, conventionally, loading a vector register of scalar data required a load operation time at least as many times as the number of elements constituting the vector register, but the present invention completes a vector instruction with a smaller number of loads, so that a significant Performance can be improved. Incidentally, the register sets the number of elements to '1'.
It is preferred that

また、本発明に係るベクトル演算装置によれば、たと
えば、一例として、レジスタにスカラデータをロードす
ると共に、ポインタの値を‘0'にセットし、また、ポイ
ンタは、ベクトルレジスタにおいて、有効な内容を格納
している最終エレメントの番号を示すようにした場合に
は、ポインタは、0から始まりポインタの内容−1迄の
ベクトルレジスタのエレメントが有効で、ポインタの内
容以降のエレメント番号に対するベクトルエレメントと
してはレジスタに格納されているデータが有効であるこ
とを示す。したがい、ポインタが‘0'の時、ベクトルレ
ジスタには有効なデータが存在しない事を意味する。
According to the vector operation device of the present invention, for example, as an example, scalar data is loaded into a register, the value of a pointer is set to '0', and the pointer has valid contents in the vector register. When the pointer is set to indicate the number of the last element storing the pointer, the elements of the vector register starting from 0 to the contents of the pointer minus 1 are valid, and the pointer is used as the vector element for the element number following the contents of the pointer. Indicates that the data stored in the register is valid. Therefore, when the pointer is '0', it means that no valid data exists in the vector register.

また、この場合、ポインタは、ベクトルレジスタに、
ベクトルデータが書込まれる際、各エレメントにデータ
がロードされる度に+1のカウントアップを行う。そし
て、該ベクトルレジスタの読出し要求が来た際、本ポイ
ンタの値未満のエレメントの読出し要求に対してはベク
トルレジスタの内容を送出し、ポインタの値以上のエレ
メントの読出し要求に対しては前記レジスタの内容を送
出する。
In this case, the pointer is stored in the vector register.
When vector data is written, each time data is loaded into each element, +1 is counted up. When a request to read the vector register is received, the contents of the vector register are sent in response to a request to read an element having a value smaller than the value of the pointer. Is sent out.

以上、結果として、本発明に係るベクトル処理装置に
おいて、ベクトル演算装置に前記レジスタを設ける事に
より、スカラデータのロードの性能は大幅に向上し、ま
た、スカラデータがロードされた後の該ベクトルレジス
タへのベクトルエレメント読出し要求に対しては、該ベ
クトルレジスタへの各エレメントにスカラデータがロー
ドされている場合と等価に機能する。
As a result, in the vector processing device according to the present invention, by providing the register in the vector operation device, the performance of loading the scalar data is significantly improved, and the vector register after the scalar data is loaded. , The function is equivalent to a case where scalar data is loaded in each element to the vector register.

また、さらに、ポインタを設け、該ポインタにベクト
ルレジスタ内のベクトルエレメントの有効/無効の制御
を行わせ、ベクトルレジスタの読出し要求が来た時に、
ベクトルレジスタ内のベクトルエレメントまたはレジス
タ内の内容を動的に切替える事により、本発明に係るベ
クトル処理装置において、ベクトル命令は前記レジスタ
の存在を全く意識する必要が無い。
Further, a pointer is provided, and the pointer is controlled to enable / disable the vector element in the vector register. When a read request of the vector register comes,
By dynamically switching the vector element in the vector register or the contents in the register, in the vector processing device according to the present invention, the vector instruction does not need to be aware of the existence of the register at all.

なお、スカラデータのみならず、繰り返すベクトルエ
レメントデータを、1または1以上にデータに代表させ
前記レジスタに格納するよう制御することにより、要ロ
ード時間および繰り返すデータを圧縮しても良い。
In addition to the scalar data, the required load time and the repeated data may be compressed by controlling the vector element data to be repeated to be represented by one or more data and stored in the register.

なお、この場合、ベクトルレジスタへの前記繰り返す
ベクトルエレメントデータに対応するベクトルエレメン
ト読出し要求に対しては、前記レジスタの内容を送出す
る。
In this case, the contents of the register are sent to a vector element read request corresponding to the repeated vector element data to the vector register.

[実施例] 以下、本発明の実施例について説明する。EXAMPLES Examples of the present invention will be described below.

第1図に、本実施例に係るベクトル演算装置のベクト
ルレジスタを中心とした構成を示す。
FIG. 1 shows a configuration centering on a vector register of a vector operation device according to the present embodiment.

制御装置101は、全体を制御し、ベクトル命令の種類
に応じて所定の制御信号を各部に送出する制御装置であ
る。
The control device 101 is a control device that controls the entire system and sends a predetermined control signal to each unit according to the type of the vector instruction.

制御装置101は、各々信号線158を介してセレクタA10
5、信号線163を介して入力バッファレジスタ106と、信
号線164を介してシャドウエレメントポインタ111と、信
号線160を介してエレメント選択回路109と、信号線157
を介して出力バッファレジスタ108と、それぞれ接続さ
れている。
The control device 101 controls the selector A10 via the signal line 158.
5. The input buffer register 106 via the signal line 163, the shadow element pointer 111 via the signal line 164, the element selection circuit 109 via the signal line 160, and the signal line 157.
Are connected to the output buffer register 108 respectively.

FR102は、スカラオペランドを格納しているレジスタ
であり、信号線151を介してセレクタA105と接続されて
いる。MS103はベクトルエレメントを格納しておく主記
憶装置であり、信号線152を介してセレクタA105と接続
されている。固定値発生回路104はオールゼロデータ等
の固定値データを発生する装置で信号線153を介してセ
レクタA105と接続されている。なお、固定値発生回路10
4は固定値を発生する必要の無い装置においては、設け
なくても良い。
FR102 is a register storing a scalar operand, and is connected to selector A105 via signal line 151. MS103 is a main storage device for storing vector elements, and is connected to the selector A105 via a signal line 152. The fixed value generating circuit 104 is a device for generating fixed value data such as all-zero data, and is connected to the selector A 105 via a signal line 153. Note that the fixed value generation circuit 10
4 does not need to be provided in a device that does not need to generate a fixed value.

セレクタA105は、ベクトルレジスタへ転送するデータ
を選択するセレクタで、各々信号線151、152、153、158
および154を介して、FR102、MS103、固定値発生回路10
4、制御装置101および入力バッファレジスタ106に接続
されている。
The selector A105 is a selector for selecting data to be transferred to the vector register, and each of the signal lines 151, 152, 153, 158
And 154, FR102, MS103, fixed value generation circuit 10
4. It is connected to the control device 101 and the input buffer register 106.

入力バッファレジスタ106はベクトルレジスタまたは
シャドベクトルレジスタを一時保持するレジスタで、信
号線154、163および155を介してそれぞれセレクタA10
5、制御装置101、ベクトルレジスタ107およびシャドウ
ベクトルレジスタ110に接続されている。
The input buffer register 106 is a register for temporarily holding a vector register or a shadow vector register, and the selector A10 is connected via signal lines 154, 163 and 155, respectively.
5, connected to the control device 101, the vector register 107 and the shadow vector register 110.

ベクトルレジスタ107は複数のベクトルエレメントを
格納しておくNエレメントからなるベクトルレジスタ
で、信号線155、159および156を介して、それぞれ入力
バッファレジスタ106、エレメント選択回路109およびセ
レクタB112と接続されている。
The vector register 107 is a vector register including N elements for storing a plurality of vector elements, and is connected to the input buffer register 106, the element selection circuit 109, and the selector B 112 via signal lines 155, 159, and 156, respectively. .

シャドウベクトルレジスタ110は、スカラデータを格
納しておく単一のエレメントからなるレジスタで信号線
155および161でそれぞれ入力バッファレジスタ106およ
びセレクタB112に接続されている。
The shadow vector register 110 is a register composed of a single element for storing scalar data.
155 and 161 are connected to the input buffer register 106 and the selector B 112, respectively.

エレメント選択回路109はベクトルレジスタ107への読
出しおよび書込みの際、対応したエレメントを選択する
エレメント番号発生回路で、信号線159および160を介し
てそれぞれベクトルレジスタ107および制御装置101に接
続されている。
The element selection circuit 109 is an element number generation circuit that selects a corresponding element when reading and writing to the vector register 107, and is connected to the vector register 107 and the control device 101 via signal lines 159 and 160, respectively.

シャドウエレメントポインタ111は、ベクトルレジス
タのエレメントのどの範囲でベクトルレジスタの内容が
有効で、またどの範囲でシャドウベクトルレジスタの内
容が有効であるかを示すポインタを保持するレジスタ
で、信号線164および165を介してそれぞれ制御装置101
およびセレクタB112に接続されている。
The shadow element pointer 111 is a register that holds a pointer indicating in which range of the vector register element the contents of the vector register are valid and in which range the contents of the shadow vector register are valid. Via the control device 101
And selector B112.

セレクタB112は、ベクトルレジスタ内のデータ読出し
要求があった時、ベクトルレジスタの出力またはシャド
ウベクトルレジスタの出力のいずれかを選択するセレク
タで、信号線156、161、162および165を介してそれぞれ
ベクトルレジスタ107、はシャドウベクトルレジスタ11
0、出力バッファレジスタ108およびシャドウエレメント
ポインタ111に接続されている。
The selector B112 is a selector for selecting either the output of the vector register or the output of the shadow vector register when there is a request to read data from the vector register. The selector B112 is connected to the vector register via signal lines 156, 161, 162 and 165, respectively. 107, shadow vector register 11
0, connected to the output buffer register 108 and the shadow element pointer 111.

出力バッファレジスタ108は、セレクタB112から送ら
れて来たデータを一時保持するレジスタで、信号線162
および157を介してセレクタB112および制御装置101に接
続されている。
The output buffer register 108 is a register for temporarily holding data sent from the selector B 112, and is a signal line 162
And 157 are connected to the selector B 112 and the control device 101.

以下、本発明の動作について説明する。 Hereinafter, the operation of the present invention will be described.

制御装置101は、ベクトル命令を解読すると、解読し
たベクトル命令が、ベクトルエレメントであるデータを
ベクトルレジスタにロードするものである場合は、その
命令のタイプにより、ベクトルオペランドのソースを決
定し、セレクタA105に対しデータ選択信号を送る。セレ
クタA105は制御装置101からの指示に基づき、FR102、MS
103または固定値発生回路153のいずれかの出力を選択
し、入力バッファレジスタ106にセットする。
When decoding the vector instruction, the control device 101 determines the source of the vector operand according to the type of the instruction, if the decoded vector instruction is to load the vector element data into the vector register, and selects the selector A105. Sends a data selection signal to The selector A105 is based on the instruction from the control device 101, FR102, MS
The output of either 103 or the fixed value generation circuit 153 is selected and set in the input buffer register 106.

なお、このベクトル命令の解読は、図示せざるステー
タスレジスタ等を参照することにより実現できる。
The decoding of the vector instruction can be realized by referring to a status register (not shown).

その後、制御装置101は、ベクトルレジスタにロード
しようとしているデータがベクトルエレメントである場
合には、入力バッファレジスタ106の内容をベクトルレ
ジスタ107の所定のエレメントに書込む。
Thereafter, when the data to be loaded into the vector register is a vector element, the control device 101 writes the contents of the input buffer register 106 into a predetermined element of the vector register 107.

解読したベクトル命令に従い、以上の動作を繰返し、
ベクトルレジスタ107のエレメント0からエレメントN
−1迄のN回のベクトルエレメントのロードを完了した
時点で、ベクトルレジスタへのロード処理を終了する。
The above operation is repeated according to the decoded vector instruction.
Element 0 to element N of vector register 107
When the loading of the vector elements N times up to -1 is completed, the loading processing to the vector register is completed.

また、スカラデータをベクトルレジスタにロードする
ベクトル命令が制御装置101で解読された場合は、セレ
クタA105は所定の入力データを選択して入力バッファレ
ジスタ106にデータをセットする。
When the control device 101 decodes a vector instruction for loading scalar data into the vector register, the selector A 105 selects predetermined input data and sets the data in the input buffer register 106.

入力バッファレジスタ106にセットされたデータは制
御装置101から信号線163を介して送られて来る指令によ
り、今度はベクトルレジスタへではなく、シャドウベク
トルレジスタ110にセットされる。
The data set in the input buffer register 106 is now set not in the vector register but in the shadow vector register 110 by a command sent from the control device 101 via the signal line 163.

また、それと同時に制御装置101は、シャドウエレメ
ントポインタ111の内容をゼロとして、ベクトルレジス
タ107の全エレメントに対応するデータはシャドウベク
トルレジスタ110に存在する事を示す。
At the same time, the control device 101 sets the content of the shadow element pointer 111 to zero, indicating that data corresponding to all elements of the vector register 107 exists in the shadow vector register 110.

シャドウベクトルレジスタ110のエレメントの数は本
実施例においては‘1'であるので1回のデータのロード
でこの時のベクトル命令の実行は終了する。なお、この
時シャドウエレメントポインタの内容は変更しない。
Since the number of elements of the shadow vector register 110 is "1" in this embodiment, the execution of the vector instruction at this time is completed by one data load. At this time, the contents of the shadow element pointer are not changed.

以上の動作は、ベクトルエレメントをベクトルレジス
タ107にロードするベクトル命令を実行する為にN回の
ロードを必要としていたのに較べ、スカラデータをベク
トルレジスタ107にロードするベクトル命令を実行する
為には、シャドウベクトルレジスタ110への1回のデー
タロードのみを行っている。
The above operation requires N times of loading to execute a vector instruction to load a vector element into the vector register 107, whereas executing a vector instruction to load scalar data into the vector register 107 , Only one data load to the shadow vector register 110 is performed.

すなわち、前記したような従来のスカラデータのベク
トルレジスタへのロードでは、前記ベクトルエレメント
と同様の手法により、N回のロードによりスカラデータ
をベクトルレジスタ107の各エレメントに展開していた
のに較べ、データのロード回数が1/Nとなり、大きく性
能が向上している。
That is, in the conventional loading of the scalar data into the vector register as described above, the scalar data is expanded into each element of the vector register 107 by N times of loading by the same method as the vector element. The number of data loads is 1 / N, and the performance is greatly improved.

次に、以上のような、スカラデータのシャドウベクト
ルレジスタ110へのロードが終了した後に、制御装置101
がベクトルレジスタを読み出すベクトル命令を解読する
と、制御装置101は信号線164を介してシャドウエレメン
トポインタをアクティブにする旨を指示する。
Next, after the scalar data is loaded into the shadow vector register 110 as described above, the control device 101
When the controller 101 decodes the vector instruction for reading the vector register, the control device 101 instructs to activate the shadow element pointer via the signal line 164.

この際のシャドウエレメントポインタは、スカラデー
タのロードの時‘0'とされているので、セレクタB112
は、ベクトルレジスタ107のエレメント0以降のエレメ
ントに対応するデータはシャドウベクトルレジスタの内
容が有効と判定し、シャドウベクトルレジスタ110の出
力である信号線161のデータを選択して出力バッファレ
ジスタ108を経由して要求元である制御装置157に送出す
る。
At this time, since the shadow element pointer is set to '0' when scalar data is loaded, the selector B112
Determines that the data corresponding to elements 0 and subsequent elements of the vector register 107 has valid contents of the shadow vector register, selects the data of the signal line 161 which is the output of the shadow vector register 110, and passes through the output buffer register 108 Then, the request is sent to the control device 157 that is the request source.

この場合、全てのエレメントの読み出し要求に対し
て、シャドウベクトルレジスタ110よりの同一データが
送られる。
In this case, the same data from the shadow vector register 110 is sent in response to a read request for all elements.

この後、次に、制御装置101がベクトルエレメントを
ベクトルレジスタにロードするベクトル命令を解読する
と、制御装置101は、前回の本ベクトルレジスタへのロ
ードがシャドウベクトルレジスタに行われている事を認
識し、信号線164を介して、シャドウエレメントポイン
タの更新を指示する。
Thereafter, next, when the control device 101 decodes the vector instruction for loading the vector element into the vector register, the control device 101 recognizes that the previous load to the main vector register has been performed to the shadow vector register. , The update of the shadow element pointer is instructed via the signal line 164.

この更新指示は、ベクトルエレメントがベクトルレジ
スタ107のエレメント0からる各エレメントにベクトル
エレメントがロードされる度に、順次‘1'を加えるもの
である。
This update instruction is to sequentially add “1” each time a vector element is loaded to each element from element 0 of the vector register 107.

従って、シャドウエレメントポインタは、その値をM
とするとベクトルレジスタ107のエレメント0からエレ
メントM−1迄に対応するデータはベクトルレジスタ10
7の内容が有効である事を示し、エレメントMからエレ
メントN−1に対応するデータはシャドウベクトルレジ
スタ107の内容が有効である事を示すことになる。
Therefore, the shadow element pointer sets its value to M
Then, the data corresponding to elements 0 to M-1 of the vector register 107 are stored in the vector register 10.
7 indicates that the content is valid, and data corresponding to elements M to N-1 indicates that the content of the shadow vector register 107 is valid.

これにより、前記N個のベクトルエレメントをベクト
ルレジスタ107にロードするベクトル命令が割込み等の
何らかの要因で中断された時、シャドウエレメントポイ
ンタ111は、エレメント番号0とエレメント番号N−1
の途中で凍結される。
Thus, when the vector instruction for loading the N vector elements into the vector register 107 is interrupted by some factor such as an interrupt, the shadow element pointer 111 stores the element number 0 and the element number N-1.
Is frozen on the way.

この状態の後で、ベクトルレジスタ107を読み出すベ
クトル命令が制御装置101で解読されると、セレクタB11
2はシャドウエレメントポインタ111の値−1以下のエレ
メント番号のデータはベクトルレジスタ107から取り出
し、シャドウエレメントポインタ111の値以上のエレメ
ント番号のデータはシャドウベクトルレジスタ110から
取り出す。
After this state, when the control device 101 decodes a vector instruction for reading the vector register 107, the selector B11
2 is to extract from the vector register 107 data with an element number equal to or less than the value of the shadow element pointer 111-1 and to extract from the shadow vector register 110 data with an element number equal to or more than the value of the shadow element pointer 111.

この様子を第3図に示す。第3図においてベクトルレ
ジスタ107には、ベクトルエレメントがエレメント0か
らエレメントm−1迄ロードされており、エレメントm
以降はベクトルエレメントがロードされたスカラデータ
が有効なものとする。
This is shown in FIG. In FIG. 3, the vector register 107 is loaded with vector elements from element 0 to element m-1, and the element m
Hereinafter, scalar data loaded with vector elements is assumed to be valid.

この時シャドウエレメントポインタの値はmである。 At this time, the value of the shadow element pointer is m.

この状態の時ベクトルレジスタの内容を読み出すと第
1図に於けるセレクタB112は、aで示す範囲のエレメン
ト番号を指定した読出し要求には、ベクトルレジスタ10
7の内容を送出し、bで示されるエレメント番号を指定
した読出し要求にはシャドウベクトルレジスタ110の内
容を送出する。
In this state, when the contents of the vector register are read, the selector B 112 in FIG.
7 is transmitted, and the contents of the shadow vector register 110 are transmitted for a read request specifying the element number indicated by b.

以上のシャドウエレメントポインタを用いた処理によ
り、割込み等の要因で中断した処理を中断した時点より
処理を再開できる。
By the above-described processing using the shadow element pointer, the processing can be resumed from the point at which the processing interrupted due to an interrupt or the like is interrupted.

なお、割込み等により、ベクトルレジスタへのロード
処理を中断しない装置においては、シャドウエレメント
ポインタ111は備えなくても良い。また、したがって、
前記シャドウエレメントポインタ111を用いた処理を行
わなくても良い。
The shadow element pointer 111 may not be provided in a device that does not interrupt the load processing to the vector register due to an interrupt or the like. Also, therefore:
The processing using the shadow element pointer 111 need not be performed.

なお、以上述べた実施例では、説明の便宜上、ベクト
ルレジスタ107、シャドウベクトルレジスタ110およびシ
ャドウエレメントポインタ111が各々1組の例を示した
が、通常、VF202は、複数のベクトルレジスタ107を備え
ており、それに応じて入力バッハレジスタ106、出力バ
ッファレジスタ108等も複数備えている。この場合、対
応してシャドウベクトルレジスタおよびシャドウエレメ
ントポインタを複数枚備え、以上の実施例と同様に各々
動作するようにすれば良い。
In the above-described embodiment, for convenience of explanation, the vector register 107, the shadow vector register 110, and the shadow element pointer 111 each represent one set, but the VF 202 usually includes a plurality of vector registers 107. Accordingly, a plurality of input buffer registers 106, output buffer registers 108, and the like are provided accordingly. In this case, a plurality of shadow vector registers and shadow element pointers may be provided correspondingly, and each may operate in the same manner as in the above embodiment.

以上説明した様に、本実施例に係るベクトル演算装置
VF202によれば、スカラデータのベクトルレジスタ107へ
のロード動作を、ベクトルレジスタのエレメント容量に
依らず、1回のロード動作で実現でき大幅にベクトル命
令処理性能を向上させたベクトル処理装置を提供でき
る。また、さらにベクトルレジスタの読出し動作自体
も、従来の読出し機能を満足するベクトル処理装置を提
供できる。
As described above, the vector operation device according to the present embodiment
According to VF202, the operation of loading scalar data into the vector register 107 can be realized by a single loading operation regardless of the element capacity of the vector register, and a vector processing device with greatly improved vector instruction processing performance can be provided. . Further, it is possible to provide a vector processing device which also satisfies the conventional read function in the read operation itself of the vector register.

[発明の効果] 以上のように、本発明によれば、装置上の不利益を大
きくすることなしに、ベクトル処理の性能を、より向上
できるベクトルレジスタへのスカラデータのロード手段
を具備したベクトル演算装置、および、情報処理装置と
くにベクトル処理装置を提供することができる。
[Effects of the Invention] As described above, according to the present invention, a vector including a means for loading scalar data into a vector register can further improve the performance of vector processing without increasing disadvantages on the device. An arithmetic device and an information processing device, particularly, a vector processing device can be provided.

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

第1図は本発明の実施例に係るベクトル演算装置におけ
るベクトルレジスタを中心とした構成を示すブロック
図、第2図は本発明の実施例に係るベクトル処理装置の
構成を示すブロック図、第3図はベクトルレジスタの読
出し処理の概念を示す説明図、第4図は従来の技術に係
るベクトル演算装置におけるベクトルレジスタを中心と
した構成を示すブロック図である。 101……制御装置、102……浮動小数点レジスタ(FR)、
101……主記憶(MS)、104……固定値発生回路、105…
…セレクタA、106……入力バッファレジスタ、107……
ベクトルレジスタ、108……出力バッファレジスタ、109
……エレメント選択回路、110……シャドウベクトルレ
ジスタ、111……シャドウエレメントポインタ、112……
セレクタB。
FIG. 1 is a block diagram showing a configuration centering on a vector register in a vector operation device according to an embodiment of the present invention. FIG. 2 is a block diagram showing a configuration of a vector processing device according to an embodiment of the present invention. FIG. 4 is an explanatory diagram showing the concept of a vector register read process, and FIG. 4 is a block diagram showing a configuration centering on a vector register in a vector operation device according to a conventional technique. 101: control unit, 102: floating-point register (FR),
101: Main memory (MS), 104: Fixed value generation circuit, 105:
... Selector A, 106 ... Input buffer register, 107 ...
Vector register, 108 ... Output buffer register, 109
…… Element selection circuit, 110 …… Shadow vector register, 111 …… Shadow element pointer, 112 ……
Selector B.

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】ベクトル演算のオペランドをベクトルレジ
スタの複数のエレメントに格納する手段と、前記ベクト
ルレジスタのベクトル演算の対象となったエレメントに
格納されたオペランドを用いてベクトル演算を実行する
手段を有するベクトル演算装置であって、 ベクトル演算のオペランドがスカラデータである場合
に、当該スカラデータを、ベクトルレジスタの各エレメ
ントに代替して格納するレジスタと、前記スカラデータ
を格納したレジスタと当該レジスタがスカラデータの格
納を代替したエレメントとの対応を示すポインタと、ベ
クトル演算の対象となったエレメントが前記レジスタに
対応していることが、前記ポインタによって示されてい
ない場合に前記ベクトルレジスタのベクトル演算の対象
となったエレメントの内容を前記ベクトル演算を実行す
る手段に供給し、ベクトル演算の対象となったエレメン
トが前記レジスタに対応していることが、前記ポインタ
によって示されている場合に前記レジスタの内容を前記
ベクトル演算を実行する手段に供給する手段とを有する
ことを特徴とするベクトル演算装置。
1. Means for storing an operand of a vector operation in a plurality of elements of a vector register, and means for executing a vector operation using an operand stored in an element of the vector register which has been subjected to a vector operation. A vector operation device, wherein, when an operand of a vector operation is scalar data, a register that stores the scalar data in place of each element of a vector register, a register that stores the scalar data, and the register A pointer indicating the correspondence with the element that has replaced the data storage, and the fact that the element subjected to the vector operation corresponds to the register does not indicate that the element corresponds to the register. The contents of the targeted element Means for executing the vector operation by supplying the contents of the register to the means for executing the vector operation when the pointer indicates that the element subjected to the vector operation corresponds to the register; And a means for supplying to the vector processor.
【請求項2】ベクトル演算のオペランドをベクトルレジ
スタの複数のエレメントに格納する手段と、前記ベクト
ルレジスタのベクトル演算の対象となったエレメントに
格納されたオペランドを用いてベクトル演算を実行する
手段を有するベクトル演算装置であって、 第1のレジスタと、ベクトル演算のオペランドがスカラ
データである場合か否かを判別する手段と、ベクトル演
算のオペランドがスカラデータである場合に、当該スカ
ラデータを、前記ベクトルレジスタの各エレメントに代
替して前記第1のレジスタに格納する手段と、ポインタ
を格納する第2のレジスタと、前記スカラデータの格納
を第1のレジスタに代替したベクトルレジスタエレメン
トの範囲を示すようにポインタの値を設定する手段と、
ベクトル演算の対象となったエレメントが前記ポインタ
によって示される範囲に含まれていない場合に前記ベク
トルレジスタのベクトル演算の対象となったエレメント
の内容を前記ベクトル演算を実行する手段に出力し、ベ
クトル演算の対象となったエレメントが前記ポインタに
よって示される範囲に含まれている場合に前記第1のレ
ジスタの内容を前記ベクトル演算を実行する手段に出力
する選択手段とを有することを特徴とするベクトル演算
装置。
And means for storing operands of the vector operation in a plurality of elements of the vector register, and means for executing the vector operation using the operands stored in the elements of the vector register which are the targets of the vector operation. A vector operation device, comprising: a first register, means for determining whether or not an operand of a vector operation is scalar data, and, when the operand of a vector operation is scalar data, Means for storing in the first register instead of each element of the vector register, a second register for storing a pointer, and a range of a vector register element in which storing of the scalar data is replaced with the first register. Means for setting the value of the pointer as follows:
If the element subjected to the vector operation is not included in the range indicated by the pointer, the contents of the element subjected to the vector operation of the vector register are output to the means for executing the vector operation, and the vector operation is performed. And selecting means for outputting the contents of the first register to the means for executing the vector operation when the element targeted for is included in the range indicated by the pointer. apparatus.
JP1245451A 1989-09-21 1989-09-21 Vector arithmetic unit Expired - Lifetime JP2583614B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1245451A JP2583614B2 (en) 1989-09-21 1989-09-21 Vector arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1245451A JP2583614B2 (en) 1989-09-21 1989-09-21 Vector arithmetic unit

Publications (2)

Publication Number Publication Date
JPH03108061A JPH03108061A (en) 1991-05-08
JP2583614B2 true JP2583614B2 (en) 1997-02-19

Family

ID=17133859

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1245451A Expired - Lifetime JP2583614B2 (en) 1989-09-21 1989-09-21 Vector arithmetic unit

Country Status (1)

Country Link
JP (1) JP2583614B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59114677A (en) * 1982-12-22 1984-07-02 Hitachi Ltd vector processing device

Also Published As

Publication number Publication date
JPH03108061A (en) 1991-05-08

Similar Documents

Publication Publication Date Title
US5168571A (en) System for aligning bytes of variable multi-bytes length operand based on alu byte length and a number of unprocessed byte data
US4745547A (en) Vector processing
JP2539199B2 (en) Digital processor controller
US4679140A (en) Data processor with control of the significant bit lengths of general purpose registers
EP0211152A2 (en) Program switching with vector registers
JPS6217252B2 (en)
JPH0374434B2 (en)
JPH0260026B2 (en)
JP3707581B2 (en) Data processing system having self-aligned stack pointer and method thereof
US5757685A (en) Data processing system capable of processing long word data
EP0094535A2 (en) Pipe-line data processing system
JP3237858B2 (en) Arithmetic unit
US5253349A (en) Decreasing processing time for type 1 dyadic instructions
JP3004108B2 (en) Information processing device
EP0240606B1 (en) Pipe-line processing system and microprocessor using the system
JPH03233630A (en) Information processor
JPS59114677A (en) vector processing device
JP2583614B2 (en) Vector arithmetic unit
US5819081A (en) Method of executing a branch instruction of jumping to a subroutine in a pipeline control system
US6233675B1 (en) Facility to allow fast execution of and, or, and test instructions
JPS5815810B2 (en) digital processing equipment
JPH0377137A (en) Information processor
JP2861560B2 (en) Data processing device
JP3100705B2 (en) Apparatus for instruction preparation in a microprocessor
JPH06324861A (en) System and method for controlling cpu