JPH035881A - Vector arithmetic unit - Google Patents
Vector arithmetic unitInfo
- Publication number
- JPH035881A JPH035881A JP14037889A JP14037889A JPH035881A JP H035881 A JPH035881 A JP H035881A JP 14037889 A JP14037889 A JP 14037889A JP 14037889 A JP14037889 A JP 14037889A JP H035881 A JPH035881 A JP H035881A
- Authority
- JP
- Japan
- Prior art keywords
- mask data
- vector
- data count
- count
- comparison
- 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
Links
- 239000013598 vector Substances 0.000 title claims abstract description 40
- 238000000034 method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Abstract
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明はベクトル演算装置に関する。[Detailed description of the invention] [Industrial application field] The present invention relates to a vector arithmetic device.
従来、ベクトル演算装置はFORTRANプログラムの
最内側のDOループかIF文を含んでいる場合でもベク
トル命令により実行を可能にし、処理中のベクトル処率
な向上させていた。Conventionally, vector arithmetic units have been able to execute vector instructions even when the FORTRAN program includes the innermost DO loop or IF statement, thereby improving vector processing efficiency during processing.
すなわち、まずマスク生成ベクトル命令において、ベク
トルの各要素ごとにIF文が成立するか否かを判定し、
その結果に従ってマスクデータを作成する。このマスク
データの各ビットは“0”か“1″によりベクトルの各
要素ごとにIF文が成立するか否かを示している。That is, first, in the mask generation vector instruction, it is determined whether the IF statement is established for each element of the vector,
Mask data is created according to the results. Each bit of this mask data is "0" or "1" and indicates whether or not the IF statement is established for each element of the vector.
こうしてマスクデータが生成されると、次にマスク制御
付きベクトル命令によりベクトル演算が実行される。マ
スク制御付きベクトルではマスクデータを参照しながら
IF文の成立する要素に対する演算のみが実行されるの
が一般的である。Once the mask data is generated in this way, a vector operation is then executed using a vector instruction with mask control. In vectors with mask control, operations are generally performed only on elements for which an IF statement is true while referring to mask data.
上述した従来のベクトル演算装置では、IF文の成立す
る要素に対する演算は行われるが、その要素の数(IF
文の成立した要素数)は検出する事は出来ない。又、検
出しようとした場合は新たに処理を追加しなければなら
ない。In the conventional vector calculation device described above, calculations are performed on elements for which an IF statement is true, but the number of elements (IF
It is not possible to detect the number of elements in a sentence. Also, if you try to detect it, you will have to add new processing.
このため、例えば、統計などで一連のデータの基準値以
下のデータを除き、その他のデータにおいて平均値を算
出する場合に、合計の計算は出来ても要素数(基準値以
上のデータ数)の情報がないので、要素数算出用の処理
はスカラー命令により作成して実行されており、この結
果、処理のベクトル化率が低下″し処理効率が落ちる欠
点があった。For this reason, for example, when calculating the average value of a series of data excluding the data below the standard value in statistics etc., the total can be calculated, but the number of elements (the number of data above the standard value) is calculated. Since there is no information, the process for calculating the number of elements is created and executed using scalar instructions, which has the disadvantage of reducing the vectorization rate of the process and reducing processing efficiency.
本発明のベクトル演算装置は、ベクトル演算に使用する
ベクトル要素とマスク生成命令で生成したマスクデータ
を保持する記憶部と、ベクトル要素の比較演算を行うベ
クトル比較演算部と、ベクトル比較演算部からの演算結
果によりマスクデータの生成を行うマスクデータ生成部
と、ベクトル比較演算部からの演算結果によりマスクデ
ータカウントの作成を行うマスクデータカウント部と、
マスクデータカウント部により作成されたマスクデータ
カウントを記憶するマスクデータカウント記憶部とを有
し、ベクトル要素の比較を行いその比較結果によりマス
クデータを生成すると同時にマスクデータカウントを作
成する。The vector arithmetic device of the present invention includes a storage unit that holds vector elements used in vector arithmetic operations and mask data generated by a mask generation instruction, a vector comparison arithmetic unit that performs a comparison operation of the vector elements, and a vector comparison arithmetic unit that performs a comparison operation of the vector elements. a mask data generation unit that generates mask data based on the calculation results; a mask data count unit that creates a mask data count based on the calculation results from the vector comparison calculation unit;
The mask data count storage unit stores the mask data count created by the mask data count unit, compares vector elements, generates mask data based on the comparison result, and creates a mask data count at the same time.
次に、本発明について図面を参照して詳細に説明する。 Next, the present invention will be explained in detail with reference to the drawings.
第1図は本発明の一実施例を示すブロック図であり、ベ
クトル演算に使用されるベクトル要素やマスクデータ生
成部400で生成されるマスクデータを保持する記憶部
100と、記憶部100より読み出されたベクトル要素
を比較演算するベクトル比較演算部200と、ベクトル
比較演算部200の演算結果によりマスクデータを生成
するマスクデータ生成部400とベクトル比較演算部2
00の演算結果によりマスクデータカウントを作成する
マスクデータカウント作成部500と、マスクデータカ
ウント作成部500で作成した内容を記憶するマスクデ
ータカウント記憶部300によって構成される。FIG. 1 is a block diagram showing an embodiment of the present invention, which includes a storage section 100 that holds vector elements used in vector operations and mask data generated by the mask data generation section 400, and a storage section 100 that stores mask data generated by the mask data generation section 400. A vector comparison calculation unit 200 that performs a comparison operation on the output vector elements, a mask data generation unit 400 that generates mask data based on the calculation result of the vector comparison calculation unit 200, and a vector comparison calculation unit 2.
The mask data count generation section 500 generates a mask data count based on the calculation result of 00, and the mask data count storage section 300 stores the contents generated by the mask data count generation section 500.
ベクトル比較演算部200は、記憶部100より読み出
されるベクトル要素を保持する2つのレジスタ210,
220と、レジスタ210,220のベクトル要素を比
較演算する比較演算回路230と、比較演算回路230
より演算結果を受は取るレジスタ240から構成される
。The vector comparison calculation unit 200 includes two registers 210 that hold vector elements read out from the storage unit 100;
220, a comparison operation circuit 230 that performs a comparison operation on vector elements of the registers 210 and 220, and a comparison operation circuit 230.
It is comprised of a register 240 that receives and receives operation results.
マスクデータ生成部400は、比較演算回路230の比
較結果によりOnまたは“1”を発生するマスクデータ
発生回路430と、マスクデータ発生回路430で発生
したビットをマスクデータレジスタ410の最後の桁に
シフトして付加するマスクデータシフト回路420と、
マスクデータを保持しておくマスクデータレジスタ41
0から構成される。The mask data generation unit 400 includes a mask data generation circuit 430 that turns on or generates “1” based on the comparison result of the comparison calculation circuit 230, and shifts the bit generated by the mask data generation circuit 430 to the last digit of the mask data register 410. a mask data shift circuit 420 added as a
Mask data register 41 that holds mask data
Consists of 0.
マスクデータカウント500は、比較演算回路230の
比較結果により“+0”または“+1”の動作を行うマ
スクデータカウント作成回路520と、マスクデータカ
ウントを保持しておくマスクデータカウントレジスタ5
10から構成される。The mask data count 500 includes a mask data count creation circuit 520 that performs a "+0" or "+1" operation based on the comparison result of the comparison calculation circuit 230, and a mask data count register 5 that holds the mask data count.
Consists of 10.
次に本実施例の動作を説明する。Next, the operation of this embodiment will be explained.
第2図に示すように、ベクトル要素を記憶部100から
レジスタ210に値“X″ レジスタ220に値“Y”
が転送されるとレジスタ210とレジスタ220の内容
が比較演算回路230により比較演算され、比較結果の
信号がマスクデータ発生回路430とマスクデータカウ
ント作成回路520に送出される。As shown in FIG. 2, vector elements are transferred from the storage unit 100 to the register 210 with the value “X” and the register 220 with the value “Y”.
When the data is transferred, the contents of the register 210 and the register 220 are compared and operated by the comparison operation circuit 230, and the signal of the comparison result is sent to the mask data generation circuit 430 and the mask data count generation circuit 520.
次に第3図に示すように、比較演算回路230からの信
号によりマスクデータレジスタ410の内容の最後の桁
にマスクデータ発生回路430の1ビツトを付加し、マ
スクデータシフト回路420により左1ビツトシフトし
てマスクデータレジスタ410に結果を格納すると同時
に、比較演算回路230からの信号によりマスクデータ
カウントレジスタ510の内容をマスクデータカウント
作成回路520で“+0″または“+1”の動作を行な
いその結果をマスクデータカウントレジスタ510に入
れる。Next, as shown in FIG. 3, one bit of the mask data generation circuit 430 is added to the last digit of the contents of the mask data register 410 by a signal from the comparison operation circuit 230, and the mask data shift circuit 420 shifts the data one bit to the left. At the same time, the contents of the mask data count register 510 are changed to "+0" or "+1" by the mask data count creation circuit 520 based on the signal from the comparison calculation circuit 230, and the result is stored in the mask data register 410. Enter into mask data count register 510.
最後にマスクデータレジスタ410の内容を記憶部10
0に送出し、マスクデータカウントレジスタ510の内
容をマスクデータカウント記憶部300に送出すること
によりマスクデータ生成と同時にマスクデータカウント
情報を作成格納することが出来る。Finally, the contents of the mask data register 410 are stored in the storage unit 10.
0 and sends the contents of the mask data count register 510 to the mask data count storage section 300, mask data count information can be created and stored at the same time as mask data is generated.
以上説明したように本発明はマスクデータ生成と同時に
マスクデータカウントを作成することが出来るため改め
てマスクデータとして生成された要素数(IF文の成立
した要素数)を調べる処理をスカラー命令で作成するこ
となくFORTRANプログラム中のベクトル化率を向
上させることが出来る。As explained above, since the present invention can create a mask data count at the same time as mask data generation, a process to check the number of elements generated as mask data (the number of elements for which the IF statement was established) is created using a scalar instruction. The vectorization rate in FORTRAN programs can be improved without any problems.
100・・・・・・記憶部、200・旧・・ベクトル比
較演算部、210. 220.240−−−−・−1/
ジスタ、230・・・・・・比較演算回路、300・・
・・・・マスクデータカウント記憶部、400・・・・
・・マスクデータ生成部、410・・・・・・マスクデ
ータレジスタ、42o・・・・・・マスクデータシフト
回路、43o・・・・・・マスクデータ発生回路、50
0・・・・・・マスクデータカラン)部、510・・・
・・・マスクデータカウントレジスタ、520・・・・
・・マスクデータカウント作成回路。100... Storage unit, 200 Old... Vector comparison calculation unit, 210. 220.240----・-1/
Register, 230... Comparison calculation circuit, 300...
...Mask data count storage section, 400...
...Mask data generation unit, 410...Mask data register, 42o...Mask data shift circuit, 43o...Mask data generation circuit, 50
0...Mask data callan) part, 510...
...Mask data count register, 520...
...Mask data count creation circuit.
Claims (1)
と、 該ベクトル比較演算部の演算結果により前記マスクデー
タを生成するマスクデータ生成部と、前記ベクトル比較
演算部の演算結果により+0又は+1カウントをおこな
うマスクデータカウント作成部と、 マスクデータカウント作成部により作成されたマスクデ
ータカウントを記憶するマスクデータカウント記憶部と
を有することを特徴とするベクトル演算装置。[Scope of Claims] A storage unit that holds vector elements and mask data; a vector comparison calculation unit that performs a comparison operation on the vector elements; and a mask data generation unit that generates the mask data based on the calculation result of the vector comparison calculation unit. a mask data count creation part that counts +0 or +1 according to the calculation result of the vector comparison calculation part; and a mask data count storage part that stores the mask data count created by the mask data count creation part. Characteristic vector arithmetic device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP14037889A JPH035881A (en) | 1989-06-01 | 1989-06-01 | Vector arithmetic unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP14037889A JPH035881A (en) | 1989-06-01 | 1989-06-01 | Vector arithmetic unit |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH035881A true JPH035881A (en) | 1991-01-11 |
Family
ID=15267431
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP14037889A Pending JPH035881A (en) | 1989-06-01 | 1989-06-01 | Vector arithmetic unit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH035881A (en) |
-
1989
- 1989-06-01 JP JP14037889A patent/JPH035881A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS62233884A (en) | Vector processor | |
JP2993975B2 (en) | Central processing unit | |
JPH0343827A (en) | Fuzzy microcomputer | |
JPH035881A (en) | Vector arithmetic unit | |
JPS63111535A (en) | Data processor | |
JP2793357B2 (en) | Parallel processing unit | |
US4914581A (en) | Method and apparatus for explicitly evaluating conditions in a data processor | |
JPS6167148A (en) | Microcomputer | |
JPS6027025A (en) | Division circuit | |
JPH05334465A (en) | Device for counting the number of required computing elements/storage devices/data transfer devices | |
JP3658879B2 (en) | Pipeline calculator | |
CN114995885A (en) | Method and system for automatically calculating instruction memory access address based on riscv | |
JP3693873B2 (en) | Mask bit number arithmetic unit, vector processing unit, information processing unit | |
JPH04309170A (en) | Vector operating device | |
JPH07239844A (en) | Vector processor | |
JPH03256134A (en) | Checking circuit for vector computing element | |
JPH02204861A (en) | Vector data processor | |
JPS63279321A (en) | Microprogram controller | |
JPS60142423A (en) | Forming method of conditional code | |
JPH04124729A (en) | Pipeline control system | |
JPS6238748B2 (en) | ||
JPH02126322A (en) | Information processor | |
JPH02148145A (en) | Check circuit for vector arithmetic unit | |
JPH0378827A (en) | Vector processor and merge processing method | |
JPS61294582A (en) | Arithmetic unit |