JPH06162067A - Device and method for controlling vector instruction - Google Patents

Device and method for controlling vector instruction

Info

Publication number
JPH06162067A
JPH06162067A JP31317892A JP31317892A JPH06162067A JP H06162067 A JPH06162067 A JP H06162067A JP 31317892 A JP31317892 A JP 31317892A JP 31317892 A JP31317892 A JP 31317892A JP H06162067 A JPH06162067 A JP H06162067A
Authority
JP
Japan
Prior art keywords
vector
instruction
data
register
mask
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
JP31317892A
Other languages
Japanese (ja)
Inventor
Fujio Wakui
富士雄 涌井
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
Hitachi Computer Engineering Co Ltd
Original Assignee
Hitachi Ltd
Hitachi Computer Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd, Hitachi Computer Engineering Co Ltd filed Critical Hitachi Ltd
Priority to JP31317892A priority Critical patent/JPH06162067A/en
Publication of JPH06162067A publication Critical patent/JPH06162067A/en
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

PURPOSE:To execute a vector operation at a high speed by executing only a valid operation without executing an invalid operation, even if an arithmetic inhibiting bit in a vector mask register exists discontinuously. CONSTITUTION:The device consists of an instruction precedent stage for storing only an element and an element number of vector data in which an element value of a vector mask bit instructs to execute an operation in a buffer device 500, in operand vector data designated by an instruction, and an instructions execution stage for reading out the vector data and the element number from the buffer device 500, and writing a result of operation in vector registers 105, 106 in accordance with the element number. Also, in a period in which an instruction register group before by one is executing an instruction execution stage, and instruction precedent control stage of the next instruction register group is executed.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ベクトル演算を行うデ
−タ処理装置におけるベクトル命令制御方法およびその
制御装置に関し、特にマスク付きの演算で、ベクトルマ
スク中の演算許可要素を検出して、必要なベクトル要素
のみの演算を行い、先行制御により無効な演算を排除し
て、処理性能を向上することが可能なベクトル命令制御
装置およびその制御方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a vector instruction control method in a data processing apparatus for performing vector operations and a control apparatus therefor, and particularly, in an operation with a mask, an operation permission element in a vector mask is detected, The present invention relates to a vector instruction control device and a control method thereof that can perform processing only on necessary vector elements and eliminate invalid operations by advance control to improve processing performance.

【0002】[0002]

【従来の技術】従来より、ス−パ−コンピュ−タは、演
算パイプライン方式により高速性を得ている。パイプラ
イン処理を効率よく行うためには、パイプが常時詰って
いる状態に保持されることが必要であり、そのために
は、(イ)プログラムが長いデ−タ系列に対して同一の
演算を繰り返すベクトル計算(DOル−プ)を含むこ
と、(ロ)パイプに対する十分なデ−タ供給能力を有し
ていること、等の条件を満足する必要がある。このよう
に、ベクトル計算が大規模数値計算における計算時間の
主要部分を占めており、ベクトル計算に強いという特徴
を有していることから、パイプライン形科学技術用計算
機をベクトル計算機と呼んでいる。ベルトル演算を行う
場合、ベクトルレジスタに格納されているベクトルエレ
メントを順次読み出してベクトル演算器で演算し、その
結果を結果ベクトルレジスタに格納する。しかし、ベク
トルレジスタに格納されているベクトルエレメントのう
ち、不要なエレメントに対しては、ベクトルマスクレジ
スタに格納されるベクトルマスクにより対応するエレメ
ントを除去するように、ベクトル演算マスク制御を行っ
ている。しかし、従来のベクトル演算マスク制御では、
ベクトルマスクにより演算が抑止されている場合でも、
その演算は実行され、その結果の書き込みのみを抑止す
るように実行されていた。
2. Description of the Related Art Conventionally, supercomputers have achieved high speed by an arithmetic pipeline system. In order to perform the pipeline processing efficiently, it is necessary to keep the pipe in a clogged state at all times. For that purpose, (a) the program repeats the same operation for a long data series. It is necessary to satisfy the conditions such as including vector calculation (DO loop), having a sufficient data supply capacity for the (b) pipe, and the like. In this way, since vector calculation occupies a major part of the calculation time in large-scale numerical calculation and has the characteristic of being strong in vector calculation, pipeline type scientific and technological computers are called vector computers. . In the case of performing the Bertre operation, the vector elements stored in the vector register are sequentially read out, the vector operation unit performs the operation, and the result is stored in the result vector register. However, of the vector elements stored in the vector register, vector operation mask control is performed so that unnecessary elements are removed by the vector mask stored in the vector mask register. However, in the conventional vector operation mask control,
Even if the operation is suppressed by the vector mask,
The operation was executed, and it was executed so as to suppress only writing of the result.

【0003】図2は、従来のベクトル演算マスク制御を
行う情報処理装置の構成図である。図2において、10
1は読み出しアドレスを格納するレジスタ、103はベ
クトルレジスタおよびベクトルマスクレジスタのアドレ
スをインクリメントするインクリメンタ、105,10
6,115はそれぞれベクトルレジスタ、107はイン
クリメントされた現在のアドレスを格納するアドレスレ
ジスタ、110〜112,216〜218はアドレスお
よびマスクエレメントを演算時間に一致させるための遅
延ラッチ、113はベクトル演算器、114は最終アド
レスを検出して演算の終了を検知する終了検出器、20
9はベクトルマスクレジスタである。このベクトル計算
機では、ベクトルレジスタ105,106内に保持され
ているベクトルエレメントを、アドレスレジスタ107
内のアドレスに従って順次読み出し、ベクトル演算器1
13で演算した結果をベクトルレジスタ115に格納す
る。ここでは、ベクトルレジスタ105,106,11
5の間で、A(i)+B(i)=C(i)のベクトル演
算を実行しているものとする。
FIG. 2 is a block diagram of a conventional information processing apparatus for performing vector operation mask control. In FIG. 2, 10
1 is a register for storing the read address, 103 is an incrementer for incrementing the addresses of the vector register and the vector mask register, 105, 10
Reference numerals 6 and 115 are vector registers, 107 is an address register for storing the incremented current address, 110 to 112 and 216 to 218 are delay latches for matching the address and mask elements with the operation time, and 113 is a vector calculator. , 114 is an end detector for detecting the end address to detect the end of the operation, 20
Reference numeral 9 is a vector mask register. In this vector computer, the vector elements held in the vector registers 105 and 106 are transferred to the address register 107.
Sequential reading according to the address in the vector arithmetic unit 1
The result calculated in 13 is stored in the vector register 115. Here, the vector registers 105, 106, 11
It is assumed that the vector operation of A (i) + B (i) = C (i) is being executed during 5 times.

【0004】さらに、詳細な動作を述べる。演算起動時
には、ベクトル読み出し用のアドレスレジスタ107は
‘0’にイニシャライズされることにより、ベクトルレ
ジスタ105,106からエレメントの0番目のデ−タ
A(0),B(0)が読み出される。同時に、ベクトル
マスクレジスタ209からも0番目のマスクビットが読
み出される。読み出されたデ−タA(0),B(0)は
ベクトル演算器113に供給され、ここで加算が行われ
た後、その演算結果のデ−タC(0)がベクトルレジス
タ115に書き込まれる。書き込みのアドレスは、アド
レスレジスタ107に格納されているアドレスが遅延ラ
ッチ110,111,112を介してベクトルレジスタ
115に入力される。すなわち、アドレスレジスタ10
7に格納されている現在アドレスは、ベクトルレジスタ
105,106の読み出しアドレスになるとともに、ベ
クトルマスクレジスタ209の読み出しアドレスにもな
り、さらに結果ベクトルレジスタ115への書き込みア
ドレスにもなる。これらの動作と並行して、アドレスレ
ジスタ107内のアドレスは、レジスタ101およびイ
ンクリメンタ103を介してカウントアップされ、アド
レスレジスタ107に再セットされる。このインクリメ
ントされたアドレスにより、次にベクトルレジスタ10
5,106からエレメントの1番目のデ−タA(1),
B(1)が読み出されて、ベクトル演算器113に供給
されると同時に、ベクトルマスクレジスタ209からも
マスクビットが読み出された後、その演算結果C(1)
がベクトルレジスタ115に書き込まれる。以後、同じ
ような動作が繰り返し実行され、順次、ベクトルレジス
タ105,106内のエレメントが処理されていき、終
了検出器114で最後のエレメントの処理が検出される
と、バス150を介して図示省略されたベクトル制御論
理部に演算の終了が通知され、ベクトル演算が終了す
る。
Further detailed operation will be described. When the operation is started, the vector read address register 107 is initialized to "0", so that the 0th data A (0), B (0) of the element is read from the vector registers 105, 106. At the same time, the 0th mask bit is also read from the vector mask register 209. The read data A (0) and B (0) are supplied to the vector calculator 113, where after addition is performed, the data C (0) of the calculation result is stored in the vector register 115. Written. As the write address, the address stored in the address register 107 is input to the vector register 115 via the delay latches 110, 111, 112. That is, the address register 10
The current address stored in 7 becomes the read address of the vector registers 105 and 106, the read address of the vector mask register 209, and the write address of the result vector register 115. In parallel with these operations, the address in the address register 107 is counted up via the register 101 and the incrementer 103 and reset in the address register 107. With this incremented address, the vector register 10
5, 106 to the first data A (1) of the element,
B (1) is read and supplied to the vector calculator 113, and at the same time, the mask bit is also read from the vector mask register 209, and then the calculation result C (1)
Are written into the vector register 115. After that, the same operation is repeatedly executed, the elements in the vector registers 105 and 106 are sequentially processed, and when the end detector 114 detects the processing of the last element, the illustration is omitted via the bus 150. The calculated vector control logic unit is notified of the end of the operation, and the vector operation ends.

【0005】ベクトルマスクレジスタ209内のマスク
ビットは、ベクトルレジスタ105,106内に格納さ
れているベクトルエレメントに1対1に対応しており、
それらのビットの値が‘1’のときには対応するエレメ
ントの演算の実行を許可し、‘0’のときには対応する
エレメントの演算の実行を抑止する。つまり、マスクビ
ット‘1’は演算実行ビットを意味し、‘0’は演算抑
止ビットを意味する。ベクトルマスクレジスタ209内
のマスクビットは、アドレスレジスタ107によりベク
トルレジスタ105,106内のエレメントが読み出さ
れると同時に読み出され、遅延ラッチ216〜218お
よびバス151を介してベクトルレジスタ115に作用
する。また、これらの読み出しに用いられたアドレスレ
ジスタ107内のアドレスも、遅延ラッチ110〜11
2を介してベクトルレジスタ115に供給される。遅延
ラッチ110〜112および216〜218は、その遅
延時間がベクトル演算器113の演算遅延時間と一致す
るように設定されている。従って、ベクトル演算器11
3から演算結果がベクトルレジスタ115に供給された
とき、この演算のためのベクトルエレメントの読み出し
に用いられたアドレスと、このエレメントに対応して読
み出されたマスクビットとが、同時にベクトルレジスタ
115に供給されることになる。その結果、読み出し用
のアドレスレジスタ107により、ベクトルレジスタ1
05,106内のエレメントと同時に読み出されたベク
トルマスクレジスタ209のマスクビットは、そのマス
クビットの値が‘0’のとき、バス151を介してその
演算結果のベクトルレジスタ115への書き込みを禁止
し、そのマスクビットの値が‘1’のとき、その演算結
果のベクトルレジスタ115への書き込みを許可する。
The mask bits in the vector mask register 209 have a one-to-one correspondence with the vector elements stored in the vector registers 105 and 106.
When the value of those bits is “1”, the execution of the operation of the corresponding element is permitted, and when the value of these bits is “0”, the execution of the operation of the corresponding element is suppressed. That is, the mask bit "1" means an operation execution bit, and "0" means an operation inhibition bit. The mask bit in the vector mask register 209 is read at the same time when the elements in the vector registers 105 and 106 are read by the address register 107, and acts on the vector register 115 via the delay latches 216 to 218 and the bus 151. Further, the addresses in the address register 107 used for reading these are also the delay latches 110 to 11
2 to the vector register 115. The delay latches 110 to 112 and 216 to 218 are set so that the delay time thereof matches the operation delay time of the vector calculator 113. Therefore, the vector calculator 11
When the calculation result is supplied from 3 to the vector register 115, the address used for reading the vector element for this calculation and the mask bit read corresponding to this element are simultaneously stored in the vector register 115. Will be supplied. As a result, the vector register 1 is read by the read address register 107.
The mask bit of the vector mask register 209, which is read at the same time as the elements in 05 and 106, prohibits the writing of the operation result to the vector register 115 via the bus 151 when the value of the mask bit is "0". Then, when the value of the mask bit is “1”, writing of the operation result to the vector register 115 is permitted.

【0006】[0006]

【発明が解決しようとする課題】前述の従来のマスク制
御方法では、ベクトルマスクビットが‘0’であって
も、演算が抑止されているエレメントに対して演算実行
ステ−ジが走行し、演算時間が浪費されてしまう。この
ような演算時間の浪費をなくすため、従来、例えば特開
昭58−22446号公報に記載されたベクトル演算マ
スク制御方法が提案されている。この制御方法では、ベ
クトルマスク内の演算抑止ビット、つまりビットの値が
‘0’のビットを検出すると、一定個数の‘0’が連続
して存在する場合にのみ、その間の演算を飛び越すよう
に制御する。すなわち、例えば5個の‘0’が検出され
ると、アドレスインクリメンタを5個進ませて、5個の
ベクトル演算をスライドさせ、6個目の演算から再開す
る。これにより、演算時間の浪費をなくすことができ
る。このように、従来のマスク制御方法では、いずれの
場合にも、ベクトルマスクビットが‘0’のときの演算
処理自体を抑止することができず、その結果、演算時間
を浪費してしまうという問題があった。また、ベクトル
マスクビットが一定個数だけ‘0’である場合にその演
算を抑止する方法でも、ベクトルマスク中に‘0’が不
連続に存在する場合については配慮されていない。従っ
て、不連続に‘0’が数多く存在する場合については、
無駄な演算が実行されてしまうため、演算時間が浪費さ
れるという問題がある。本発明の目的は、このような従
来の課題を解決し、ベクトルマスクレジスタ内の演算抑
止ビットが不連続に存在する場合でも、無効な演算を行
うことなく、有効な演算のみを実行して、ベクトル演算
を高速に処理することが可能なベクトル演算マスク制御
装置および制御方法を提供することにある。
In the conventional mask control method described above, even if the vector mask bit is "0", the operation execution stage runs for the element in which the operation is inhibited, and the operation is executed. Time is wasted. In order to eliminate such waste of calculation time, a vector calculation mask control method disclosed in, for example, Japanese Patent Application Laid-Open No. 58-22446 has been proposed. In this control method, when an operation suppression bit in the vector mask, that is, a bit whose value is' 0 ', is detected, only when a certain number of'0's exist continuously, the operation between them is skipped. Control. That is, for example, when five "0" s are detected, the address incrementer is advanced by five, five vector operations are slid, and the sixth operation is restarted. As a result, it is possible to eliminate waste of calculation time. As described above, the conventional mask control method cannot suppress the arithmetic processing itself when the vector mask bit is “0” in any case, and as a result, the arithmetic time is wasted. was there. Further, even in the method of suppressing the operation when a certain number of vector mask bits are "0", no consideration is given to the case where "0" are discontinuous in the vector mask. Therefore, when there are many discontinuous'0's,
There is a problem that the calculation time is wasted because unnecessary calculation is executed. An object of the present invention is to solve such a conventional problem and execute valid operations only without performing invalid operations even when operation suppression bits in a vector mask register are discontinuous. It is an object of the present invention to provide a vector operation mask control device and a control method capable of processing a vector operation at high speed.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するた
め、本発明のベクトル演算マスク制御装置は、(イ)複
数個の要素からなるベクトルデ−タおよびベクトルマス
クデ−タを順次読み出し、ベクトルマスクデ−タの要素
値に従ってベクトルデ−タの演算を行うベクトル命令制
御装置において、命令の実行ステ−ジに先立って、命令
で指定されるオペランドベクトルデ−タの要素と要素の
番号を格納するバッファ装置、およびベクトルマスクデ
−タの要素値が演算の実行を指示しているオペランドベ
クトルデ−タの要素と要素の番号のみをバッファ装置に
順次格納するためのアドレスを指定する第1のアドレス
レジスタと第1のアドレスインクリメンタを有すること
を特徴としている。また、(ロ)バッファ装置に格納さ
れたオペランドベクトルデ−タを読み出すための第2の
アドレスレジスタと第2のインクリメンタを設け、読み
出されたオペランドベクトルデ−タを用いて演算を実行
することも特徴としている。また、(ハ)バッファ装置
から読み出されたオペランドベクトルデ−タを用いて演
算を実行した結果を、バッファ装置から読み出された要
素番号に従って、ベクトルレジスタに書き込むことも特
徴としている。さらに、本発明のベクトル命令制御方法
は、(ニ)複数個の要素からなるベクトルデ−タおよび
ベクトルマスクデ−タを順次読み出し、該ベクトルマス
クデ−タの要素値に従って該ベクトルデ−タの演算を行
うベクトル命令制御方法において、前の命令に対し、バ
ッファ装置からオペランドベクトルデ−タと要素番号を
順次読み出し、演算を実行して、演算の結果を要素番号
に従って結果レジスタに格納する命令実行ステ−ジを実
行している期間に、次の命令に対し、命令で指定される
オペランドベクトルデ−タのうち、ベクトルマスクデ−
タの要素値が演算の実行を指示しているオペランドベク
トルデ−タの要素と要素の番号のみをバッファ装置に格
納する命令先行ステ−ジを並行して実行することを特徴
としている。
In order to achieve the above object, a vector operation mask control device of the present invention is provided with (a) vector data consisting of a plurality of elements and vector mask data are sequentially read out to obtain a vector mask. In a vector instruction control device for calculating vector data according to the element value of the data, a buffer for storing the element of the operand vector data designated by the instruction and the element number prior to the execution step of the instruction. A device and a first address register for designating an address for sequentially storing only an element and an element number of an operand vector data in which an element value of vector mask data instructs execution of an operation And a first address incrementer. Further, (b) a second address register and a second incrementer for reading the operand vector data stored in the buffer device are provided, and an operation is executed using the read operand vector data. It is also characterized. Further, (c) the result of executing the operation using the operand vector data read from the buffer device is written in the vector register according to the element number read from the buffer device. Furthermore, the vector instruction control method of the present invention (d) sequentially reads vector data consisting of a plurality of elements and vector mask data, and calculates the vector data according to the element values of the vector mask data. In the vector instruction control method to be performed, an instruction execution step for sequentially reading the operand vector data and the element number from the buffer device for the previous instruction, executing the operation, and storing the result of the operation in the result register according to the element number. Of the operand vector data specified by the instruction, the vector mask data
It is characterized in that an instruction preceding stage for storing only the element and the element number of the operand vector data in which the element value of the data instructs the execution of the operation in parallel is executed.

【0008】[0008]

【作用】本発明においては、ベクトル命令の実行ステ−
ジに先立って、その命令で指定されているオペランドベ
クトルデ−タのうち、ベクトルマスクデ−タの要素値が
演算の実行を指示しているベクトルデ−タの要素と要素
番号のみを、バッファ装置に格納する。すなわち、マス
ク付き演算で無効な演算を先行制御により排除する。次
に、命令の実行ステ−ジでは、そのバッファ装置から順
次ベクトルデ−タと要素番号とを読み出し、演算を実行
した後、その演算結果を要素番号に従ってベクトルレジ
スタに書き込む。これにより、有効なベクトル演算のみ
を実行させることができるので、ベクトル演算を高速に
処理することが可能となる。すなわち、図3に示すよう
に、1マシンサイクルをTcとし、そのうちベクトルマ
スクビットが‘0’に対応するエレメントの演算を行う
無効時間をTαとすると、従来の方法における1つのベ
クトル命令(n個のエレメント演算)を実行する演算時
間はnTcであるのに対して、本発明における演算時間
は、無効時間Tαをn個なくすことができるので、n
(Tc−Tα)となる。従って、複数個のベクトル命令
を実行する場合には、従来の方法に比べて演算時間を格
段に短縮することができる。
In the present invention, the vector instruction execution step is executed.
Of the operand vector data specified by the instruction, only the element and the element number of the vector data for which the element value of the vector mask data instructs the execution of the operation prior to To store. That is, an operation invalid in the operation with the mask is excluded by the preceding control. Next, in the instruction execution stage, the vector data and the element number are sequentially read from the buffer device, the operation is executed, and the operation result is written in the vector register according to the element number. As a result, only valid vector operations can be executed, so that vector operations can be processed at high speed. That is, as shown in FIG. 3, assuming that one machine cycle is Tc, and an invalid time for performing an operation of an element whose vector mask bit is '0' is Tα, one vector instruction (n The calculation time for executing the element calculation) is nTc, while the calculation time in the present invention can eliminate n invalid times Tα.
(Tc-Tα). Therefore, when executing a plurality of vector instructions, the operation time can be significantly shortened as compared with the conventional method.

【0009】[0009]

【実施例】以下、本発明の実施例を、図面により詳細に
説明する。図1は、本発明の一実施例を示すベクトル命
令制御装置の構成図である。図1において、1は解読指
示、演算指示、レジスタ読み出し、書き込み指示等の命
令を順次出力する命令制御部、2は命令レジスタ群を格
納するメモリ、3a,3b,3c,103a,303
a,403aはそれぞれ読み出されたデ−タ、あるいは
アドレスを格納するレジスタ、103,303,403
はそれぞれアドレスをインクリメントするインクリメン
タ、500は先行制御により有効デ−タのみを格納する
バッファ装置、500a,500b,500cはバッフ
ァ装置500内の構成要素であって、それぞれベクトル
デ−タA、ベクトルデ−タB、およびベクトルデ−タI
Dを格納する領域である。また、105,106,11
5はベクトルレジスタ、113はベクトル演算器、5,
6はそれぞれ命令の先行ステ−ジおよび命令の実行ステ
−ジの終了を検知する終了検出回路、209はベクトル
マスクビットを格納するベクトルマスクレジスタであ
る。ベクトルレジスタ105,106、ベクトルマスク
レジスタ209、およびインクリメンタ303より上方
が命令の先行ステ−ジ部であり、バッファ装置500、
レジスタ403より下方が命令の実行ステ−ジ部であ
る。本発明で新たに設置された部分は、バッファ装置5
00と、インクリメンタ303,403と、レジスタ3
03a,403aと、終了検出回路5である。すなわ
ち、本発明においては、従来のベクトル演算ステ−ジに
加えて、命令の先行ステ−ジを設けたため、先行ステ−
ジで有効エレメントのみを格納するためのバッファ装置
500と、そのバッファ装置500にデ−タを書き込む
ためのインクリメンタ303、レジスタ303aと、バ
ッファ装置500からエレメントを読み出して演算器1
13に供給し、かつ演算結果を書き込むためのインクリ
メンタ403、レジスタ403aと、命令の先行ステ−
ジの終了を検出するための検出回路5とが、余分に必要
となる。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a block diagram of a vector instruction control device showing an embodiment of the present invention. In FIG. 1, reference numeral 1 is an instruction control unit for sequentially outputting instructions such as a decoding instruction, a calculation instruction, a register read instruction, and a write instruction, and 2 is a memory for storing an instruction register group, 3a, 3b, 3c, 103a, 303.
a and 403a are registers for storing read data or addresses, and 103, 303, and 403, respectively.
Is an incrementer for incrementing the address, 500 is a buffer device for storing only valid data by the preceding control, and 500a, 500b, 500c are constituent elements in the buffer device 500, which are vector data A and vector data, respectively. Data B and vector data I
This is an area for storing D. Also, 105, 106, 11
5 is a vector register, 113 is a vector calculator, 5,
Reference numeral 6 is an end detection circuit for detecting the end of the instruction preceding stage and the instruction execution stage, respectively, and 209 is a vector mask register for storing vector mask bits. The portion above the vector registers 105 and 106, the vector mask register 209, and the incrementer 303 is the preceding stage portion of the instruction, and the buffer device 500,
Below the register 403 is an instruction execution stage section. The portion newly installed in the present invention is the buffer device 5
00, the incrementers 303 and 403, and the register 3
03a and 403a, and the end detection circuit 5. That is, in the present invention, since the instruction preceding stage is provided in addition to the conventional vector operation stage, the preceding stage is provided.
Buffer device 500 for storing only valid elements, an incrementer 303 for writing data to the buffer device 500, a register 303a, an element from the buffer device 500, and an arithmetic unit 1
13 and the incrementer 403 and the register 403a for writing the operation result and the instruction preceding step.
The detection circuit 5 for detecting the end of the error is additionally required.

【0010】命令レジスタ群格納メモリ2には、命令
A,B,Cが順にセットされており、それぞれOP
(A)(B)(C)は命令部、VR3はオペランド
(3)のベクトルレジスタ番号を格納するフィ−ルド
値、VR1は演算結果であるオペランド(1)のベクト
ルレジスタ番号を格納するフィ−ルド値、VR2はオペ
ランド(2)のベクトルレジスタ番号を格納するフィ−
ルド値である。先ず、命令の先行ステ−ジの動作を述べ
る。命令制御部1からの解読指示が信号線1aを介して
出されると、順に命令が解読される。最初に命令Aが解
読され、オペランド(2)のベクトルレジスタ番号であ
るフィ−ルドVR2の値が信号線2bに読み出され、レ
ジスタ3bにセットされる。同じようにして、オペラン
ド(3)のベクトルレジスタ番号であるフィ−ルドVR
3の値が信号線2aに読み出され、レジスタ3aにセッ
トされる。同じく、演算結果であるオペランド(1)の
ベクトルレジスタ番号であるVR1の値が信号線2cに
読み出され、レジスタ3cにセットされる。これと並行
して、ベクトルレジスタ105,106の読み出し要素
アドレスを示すレジスタ103aと、バッファ装置50
0の書き込み要素アドレスを示すレジスタ303aの
‘0’をイニシャライズする。これにより、ベクトルレ
ジスタ105,106およびベクトルマスクレジスタ2
09から0番目の要素A(0),B(0),M(0)が
読み出される。読み出された要素のA(0),B(0)
は、バッファ装置500のベクトルデ−タA部500
a、B部500bに接続される。また、レジスタ103
aとレジスタ3cの値は、バッファ装置500のベクト
ルデ−タID部500cに接続される。すなわち、この
ベクトルデ−タID部500cに格納される内容は、V
R1とレジスタ103aに格納されている有効な番号で
ある。
Instructions A, B, and C are sequentially set in the instruction register group storage memory 2, each of which has an OP.
(A), (B) and (C) are instruction parts, VR3 is a field value for storing the vector register number of the operand (3), and VR1 is a field for storing the vector register number of the operand (1) which is the operation result. Field, VR2 is a field that stores the vector register number of operand (2).
Value. First, the operation of the preceding stage of the instruction will be described. When a decoding instruction from the instruction control unit 1 is issued via the signal line 1a, the instructions are sequentially decoded. First, the instruction A is decoded, the value of the field VR2 which is the vector register number of the operand (2) is read out to the signal line 2b and set in the register 3b. Similarly, the field VR which is the vector register number of the operand (3)
The value of 3 is read out to the signal line 2a and set in the register 3a. Similarly, the value of the vector register number VR1 of the operand (1) which is the operation result is read out to the signal line 2c and set in the register 3c. In parallel with this, the register 103 a indicating the read element address of the vector registers 105 and 106, and the buffer device 50.
Initialize '0' of the register 303a indicating the write element address of 0. As a result, the vector registers 105 and 106 and the vector mask register 2
The 0th elements A (0), B (0), and M (0) are read out from 09. A (0), B (0) of the read element
Is the vector data A section 500 of the buffer device 500.
a, B part 500b. In addition, the register 103
The values of a and the register 3c are connected to the vector data ID section 500c of the buffer device 500. That is, the contents stored in the vector data ID portion 500c is V
It is a valid number stored in R1 and the register 103a.

【0011】ベクトルマスクレジスタ209内の要素M
(0)は、信号線209aを介してバッファ装置500
に接続される。ここでは、信号線209aの値が‘1’
のときバッファ装置500への格納指示として働く。ま
た、信号線209aは、レジスタ303aの更新許可信
号としても動作する。この後、ベクトルレジスタ10
5,106の読み出し要素アドレスを示すレジスタ10
3aをインクリメンタ103により‘+1’して、次要
素であるVR3(1)、VR2(1)、VMR(1)を
読み出す。以降、前述の動作を繰り返し実行することに
より、演算を実行すべきベクトルデ−タの要素のみをバ
ッファ装置500内に順次格納する。命令制御部1は、
終了検出回路5が動作することにより、最後のベクトル
要素アドレスが検出されたことを知り、処理を終了させ
る。インクリメンタ303は、ベクトルマスクレジスタ
209中の要素値が演算の実行を指示しているベクトル
デ−タの要素と要素番号のみをバッファ装置500に順
次格納するため、信号線209aの値が‘1’のときの
みレジスタ309aのアドレス値をバッファ装置500
に書き込み、‘0’のときにはインクリメンタ303で
‘+1’して次要素のアドレス値に順次、インクリメン
トする。以上、命令先行ステ−ジでは、命令の解読動作
から、演算を実行すべきベクトルデ−タの要素のみをバ
ッファ装置500内に順次格納する処理を実行する。次
に、命令制御部1は、先行ステ−ジを終了した命令を順
次、命令実行ステ−ジに進める。命令実行ステ−ジで
は、先ず、バッファ装置500の読み出し要素アドレス
を示すレジスタ403aを‘0’にイニシャライズす
る。
Element M in vector mask register 209
(0) is the buffer device 500 via the signal line 209a.
Connected to. Here, the value of the signal line 209a is "1".
At this time, it works as a storage instruction to the buffer device 500. The signal line 209a also operates as an update permission signal for the register 303a. After this, the vector register 10
Register 10 indicating the read element address of 5,106
3a is incremented by 1 by the incrementer 103, and the next elements VR3 (1), VR2 (1), and VMR (1) are read. After that, by repeatedly executing the above-mentioned operation, only the elements of the vector data for which the calculation is to be executed are sequentially stored in the buffer device 500. The instruction control unit 1
By the operation of the end detection circuit 5, it is known that the last vector element address is detected, and the processing is ended. Since the incrementer 303 sequentially stores only the element and the element number of the vector data whose element value in the vector mask register 209 instructs the execution of the operation in the buffer device 500, the value of the signal line 209a is "1". The address value of the register 309a only when
When the value is "0", the incrementer 303 increments it by "+1" to sequentially increment the address value of the next element. As described above, in the instruction precedent stage, the process of sequentially storing only the elements of the vector data to be operated on from the instruction decoding operation is executed in the buffer device 500. Next, the instruction control unit 1 sequentially advances the instructions for which the preceding stage has been completed to the instruction execution stage. In the instruction execution stage, first, the register 403a indicating the read element address of the buffer device 500 is initialized to "0".

【0012】レジスタ403aをイニシャライズするこ
とにより、バッファ装置500内の構成要素であるベク
トルデ−タA部500a、ベクトルデ−タB部500b
より演算のオペランドデ−タであるA(0)、B
(0)、ベクトルデ−タID部500cより演算結果の
ベクトルレジスタへの格納アドレスADR(0)が読み
出される。デ−タA(0)、デ−タB(0)は、ベクト
ル演算器113に供給される。演算器113による演算
結果は、ADR(0)で示されるベクトルレジスタ11
5に格納される。この後、レジスタ403aはインクリ
メンタ403により‘+1’される。以後、前述の動作
を繰り返し実行することにより、ベクトルマスクデ−タ
が演算を指示している要素のみの演算を実行することが
できる。命令制御部1は、終了検出回路6で最後のベク
トル要素アドレスを検出したとき、命令の実行処理を終
了させる。この命令Aの命令実行ステ−ジと並行して、
命令Bの先行ステ−ジを開始することにより、命令実行
ステ−ジでは、順次、ベクトルマスクデ−タが演算を指
示している要素のみの演算を実行することが可能にな
る。
By initializing the register 403a, the vector data A section 500a and the vector data B section 500b, which are constituent elements in the buffer device 500, can be obtained.
More operation operand data A (0), B
(0), the storage address ADR (0) of the calculation result in the vector register is read from the vector data ID section 500c. The data A (0) and the data B (0) are supplied to the vector calculator 113. The calculation result by the calculator 113 is the vector register 11 indicated by ADR (0).
Stored in 5. After that, the register 403a is incremented by "+1" by the incrementer 403. After that, by repeatedly executing the above-described operation, it is possible to execute the operation only for the element for which the vector mask data instructs the operation. When the end detection circuit 6 detects the last vector element address, the instruction control unit 1 ends the instruction execution process. In parallel with the instruction execution stage of this instruction A,
By starting the preceding stage of the instruction B, in the instruction execution stage, it becomes possible to successively execute only the elements for which the vector mask data instructs the operation.

【0013】なお、メモリ2に格納される命令レジスタ
群としては、例えば東京都の住民台帳のデ−タベ−スを
そのままオペランドVR2,VR3,VR1として格納
する。ここでは、氏名、性別、職業、世帯主か否か等を
ベクトルデ−タとし、演算部としては不等式、加算、減
算等にする。一方、ベクトルマスクレジスタ209に格
納されるマスクビットとしては、住民の中の女性のみの
デ−タベ−スを作成するために、先ずベクトルマスクビ
ットを作るための命令を発行して、元のデ−タベ−ス中
のデ−タ部分を女性に指定し、比較した結果をベクトル
マスクで比較して、一致した箇所に‘1’を格納するこ
とにより作成する。このようにして作成したベクトルマ
スクレジスタ209と、住民台帳のデ−タベ−スをベク
トル命令レジスタ群にすることにより、ベクトルマスク
レジスタ209のマスクビットが‘1’に対応するベク
トルデ−タのみを演算するので、高速に女性のみの住民
台帳のデ−タベ−スを作成することができる。
As the instruction register group stored in the memory 2, for example, the database of the resident register in Tokyo is directly stored as the operands VR2, VR3 and VR1. Here, the name, sex, occupation, whether or not a householder is the vector data, and the arithmetic unit is an inequality, addition, subtraction, or the like. On the other hand, as a mask bit stored in the vector mask register 209, in order to create a database of only women among residents, an instruction for creating a vector mask bit is first issued and the original data is created. -It is created by designating the data portion in the database as a female, comparing the comparison results with a vector mask, and storing "1" in the coincident portion. By making the vector mask register 209 thus created and the data base of the resident register into a vector instruction register group, only the vector data in which the mask bit of the vector mask register 209 corresponds to "1" is calculated. Therefore, it is possible to quickly create a database of resident register for women only.

【0014】[0014]

【発明の効果】以上説明したように、本発明によれば、
ベクトル演算を行うデ−タ処理装置において、ベクトル
マスクの値がどのように配列されていても、無効な演算
を行うことなく、有効な要素のみの演算を行うので、ベ
クトル演算を高速に実行することができる。
As described above, according to the present invention,
In a data processing device that performs vector operations, no matter how the values of the vector mask are arranged, only valid elements are operated without performing invalid operations, so vector operations are executed at high speed. be able to.

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

【図1】本発明の一実施例を示すベクトル命令制御装置
のブロック構成図である。
FIG. 1 is a block configuration diagram of a vector instruction control device showing an embodiment of the present invention.

【図2】従来のベクトル命令制御装置のブロック構成図
である。
FIG. 2 is a block diagram of a conventional vector instruction control device.

【図3】本発明のベクトル命令制御方法の効果を説明す
る図である。
FIG. 3 is a diagram for explaining the effect of the vector instruction control method of the present invention.

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

1 命令制御部 2 命令レジスタ群 3a,3b,3c,101,103a,403a レジ
スタ 110〜112,216〜218 遅延ラッチ 103,303,403 インクリメンタ 500 バッファ装置 500a,500b,500c バッファ装置の構成要
素 105,106,115 ベクトルレジスタ 113 ベクトル演算器 5,6 終了検出回路 209 ベクトルマスクレジスタ
1 Instruction Control Unit 2 Instruction Register Group 3a, 3b, 3c, 101, 103a, 403a Registers 110-112, 216-218 Delay Latch 103, 303, 403 Incrementer 500 Buffer Device 500a, 500b, 500c Components of Buffer Device 105 , 106, 115 Vector register 113 Vector calculator 5, 6 End detection circuit 209 Vector mask register

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 複数個の要素からなるベクトルデ−タお
よびベクトルマスクデ−タを順次読み出し、該ベクトル
マスクデ−タの要素値に従って該ベクトルデ−タの演算
を行うベクトル命令制御装置において、命令の実行ステ
−ジに先立って、該命令で指定されるオペランドベクト
ルデ−タの要素と該要素の番号を格納するバッファ装
置、および該ベクトルマスクデ−タの要素値が演算の実
行を指示しているオペランドベクトルデ−タの要素と該
要素の番号のみを上記バッファ装置に順次格納するため
のアドレスを指定する第1のアドレスレジスタと第1の
アドレスインクリメンタを有することを特徴とするベク
トル命令制御装置。
1. A vector instruction control device for sequentially reading vector data and vector mask data consisting of a plurality of elements and performing an operation of the vector data according to an element value of the vector mask data, Prior to the execution stage, an element of the operand vector data designated by the instruction and a buffer device for storing the number of the element, and an element value of the vector mask data indicate execution of the operation. Vector instruction control characterized by having a first address register and a first address incrementer for designating an address for sequentially storing only an element of operand vector data and the number of the element in the buffer device. apparatus.
【請求項2】 請求項1に記載のベクトル命令制御装置
において、上記バッファ装置に格納されたオペランドベ
クトルデ−タを読み出すための第2のアドレスレジスタ
と第2のインクリメンタを設け、読み出されたオペラン
ドベクトルデ−タを用いて演算を実行することを特徴と
するベクトル命令制御装置。
2. The vector instruction control device according to claim 1, further comprising a second address register and a second incrementer for reading the operand vector data stored in the buffer device, and reading the operand vector data. And a vector instruction control device for executing an operation using the operand vector data.
【請求項3】 請求項1に記載のベクトル命令制御装置
において、上記バッファ装置から読み出されたオペラン
ドベクトルデ−タを用いて演算を実行した結果を、該バ
ッファ装置から読み出された要素番号に従って、ベクト
ルレジスタに書き込むことを特徴とするベクトル命令制
御装置。
3. The vector instruction control device according to claim 1, wherein a result obtained by executing an operation using the operand vector data read from the buffer device is an element number read from the buffer device. A vector instruction controller characterized by writing to a vector register according to the above.
【請求項4】 複数個の要素からなるベクトルデ−タお
よびベクトルマスクデ−タを順次読み出し、該ベクトル
マスクデ−タの要素値に従って該ベクトルデ−タの演算
を行うベクトル命令制御方法において、前の命令に対
し、バッファ装置からオペランドベクトルデ−タと要素
番号を順次読み出し、演算を実行して、該演算の結果を
上記要素番号に従って結果レジスタに格納する命令実行
ステ−ジを実行している期間に、次の命令に対し、該命
令で指定されるオペランドベクトルデ−タのうち、ベク
トルマスクデ−タの要素値が演算の実行を指示している
オペランドベクトルデ−タの要素と該要素の番号のみを
バッファ装置に格納する命令先行ステ−ジを並行して実
行することを特徴とするベクトル命令制御方法。
4. A vector instruction control method for sequentially reading vector data composed of a plurality of elements and vector mask data, and calculating the vector data according to the element value of the vector mask data, A period during which an instruction execution stage is executed in which the operand vector data and the element number are sequentially read from the buffer device for the instruction, the operation is executed, and the result of the operation is stored in the result register according to the element number. For the next instruction, among the operand vector data designated by the instruction, the element value of the operand vector data whose element value of the vector mask data instructs execution of the operation and the element of the element A vector instruction control method characterized in that an instruction preceding stage for storing only numbers in a buffer device is executed in parallel.
JP31317892A 1992-11-24 1992-11-24 Device and method for controlling vector instruction Pending JPH06162067A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31317892A JPH06162067A (en) 1992-11-24 1992-11-24 Device and method for controlling vector instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31317892A JPH06162067A (en) 1992-11-24 1992-11-24 Device and method for controlling vector instruction

Publications (1)

Publication Number Publication Date
JPH06162067A true JPH06162067A (en) 1994-06-10

Family

ID=18038048

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31317892A Pending JPH06162067A (en) 1992-11-24 1992-11-24 Device and method for controlling vector instruction

Country Status (1)

Country Link
JP (1) JPH06162067A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009009447A (en) * 2007-06-29 2009-01-15 Nippon Telegr & Teleph Corp <Ntt> Data processor
JP2010504594A (en) * 2006-09-22 2010-02-12 インテル コーポレイション Instruction and logic circuit for processing character strings
JP2011233155A (en) * 2011-06-16 2011-11-17 Nippon Telegr & Teleph Corp <Ntt> Data processing device

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9703564B2 (en) 2006-09-22 2017-07-11 Intel Corporation Instruction and logic for processing text strings
US11537398B2 (en) 2006-09-22 2022-12-27 Intel Corporation Instruction and logic for processing text strings
US9720692B2 (en) 2006-09-22 2017-08-01 Intel Corporation Instruction and logic for processing text strings
JP2014063535A (en) * 2006-09-22 2014-04-10 Intel Corp Instruction and logic circuit for processing text strings
US9063720B2 (en) 2006-09-22 2015-06-23 Intel Corporation Instruction and logic for processing text strings
US9069547B2 (en) 2006-09-22 2015-06-30 Intel Corporation Instruction and logic for processing text strings
US9448802B2 (en) 2006-09-22 2016-09-20 Intel Corporation Instruction and logic for processing text strings
US9495160B2 (en) 2006-09-22 2016-11-15 Intel Corporation Instruction and logic for processing text strings
US9632784B2 (en) 2006-09-22 2017-04-25 Intel Corporation Instruction and logic for processing text strings
US9740489B2 (en) 2006-09-22 2017-08-22 Intel Corporation Instruction and logic for processing text strings
JP2022050519A (en) * 2006-09-22 2022-03-30 インテル コーポレイション Processor, system and method
JP2010504594A (en) * 2006-09-22 2010-02-12 インテル コーポレイション Instruction and logic circuit for processing character strings
US9645821B2 (en) 2006-09-22 2017-05-09 Intel Corporation Instruction and logic for processing text strings
US9740490B2 (en) 2006-09-22 2017-08-22 Intel Corporation Instruction and logic for processing text strings
US9772847B2 (en) 2006-09-22 2017-09-26 Intel Corporation Instruction and logic for processing text strings
US9772846B2 (en) 2006-09-22 2017-09-26 Intel Corporation Instruction and logic for processing text strings
US9804848B2 (en) 2006-09-22 2017-10-31 Intel Corporation Instruction and logic for processing text strings
US10261795B2 (en) 2006-09-22 2019-04-16 Intel Corporation Instruction and logic for processing text strings
US10929131B2 (en) 2006-09-22 2021-02-23 Intel Corporation Instruction and logic for processing text strings
US11023236B2 (en) 2006-09-22 2021-06-01 Intel Corporation Instruction and logic for processing text strings
US11029955B2 (en) 2006-09-22 2021-06-08 Intel Corporation Instruction and logic for processing text strings
JP2009009447A (en) * 2007-06-29 2009-01-15 Nippon Telegr & Teleph Corp <Ntt> Data processor
JP2011233155A (en) * 2011-06-16 2011-11-17 Nippon Telegr & Teleph Corp <Ntt> Data processing device

Similar Documents

Publication Publication Date Title
JPH07248897A (en) Method and device for recovery from exception in computer system
JP2620511B2 (en) Data processor
JPH07104784B2 (en) Digital data processor
JPH04188229A (en) Floating-point arithmetic processing unit
US5390306A (en) Pipeline processing system and microprocessor using the system
US5586337A (en) Programmable controller with timing control
JPH06162067A (en) Device and method for controlling vector instruction
KR100188374B1 (en) Central processing unit and an arithmetic operation processing unit
JP3490005B2 (en) Instruction control apparatus and method
JP2553200B2 (en) Information processing device
JPH03204030A (en) Processor for computor
JP3082944B2 (en) Pipeline processing equipment
JPS6055864B2 (en) vector processor
JP2783285B2 (en) Information processing device
JP3490191B2 (en) calculator
JP2812610B2 (en) Pipeline control method
JPH1173301A (en) Information processor
JP2503223B2 (en) Prior control method
JP2859921B2 (en) Instruction queue controller
JP3014701B2 (en) Information processing device
JPH05250156A (en) Risc processor
JPH0222417B2 (en)
JPH07295812A (en) Conditional branch control method/device
JPH04137169A (en) Information processor
JPH0512009A (en) Digital signal processing device