JPH04342067A - Vector arithmetic unit - Google Patents

Vector arithmetic unit

Info

Publication number
JPH04342067A
JPH04342067A JP11424091A JP11424091A JPH04342067A JP H04342067 A JPH04342067 A JP H04342067A JP 11424091 A JP11424091 A JP 11424091A JP 11424091 A JP11424091 A JP 11424091A JP H04342067 A JPH04342067 A JP H04342067A
Authority
JP
Japan
Prior art keywords
mask
vector
bit
mask vector
unit
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
JP11424091A
Other languages
Japanese (ja)
Inventor
Yoshihiko Uchida
吉彦 内田
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.)
NEC Solution Innovators Ltd
Original Assignee
NEC Solution Innovators 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 NEC Solution Innovators Ltd filed Critical NEC Solution Innovators Ltd
Priority to JP11424091A priority Critical patent/JPH04342067A/en
Publication of JPH04342067A publication Critical patent/JPH04342067A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten processing time by providing a mask vector register part and a mask vector shifting part and supporting a mask vector generation command with a logic operation mask vector to generate a mask vector after the logic operation of the two mask vectors. CONSTITUTION:A vector command control part 8 controls a vector arithmetic unit 1. The mask vector register part 2 holds the mask vector. An operand comparison part 5 compares the size relation of the data operand of operand storage parts 3 and 4 receiving two data operands and outputs a comparison result as a mask bit of one bit. A mask logic operation part 6 executes the logic operation of the most significant bit of the register part 2 and the one bit outputted by the comparison part 5. A mask vector shifting part 7 receives the content of the register part 2, shifts it by one bit in the direction of the most significant bit and inputs the mask vector of one bit outputted to the idle least significant bit by the operation part 6.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明はベクトル演算装置に関し
、特にマスクベクトル生成命令をサポートするベクトル
演算装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a vector arithmetic device, and more particularly to a vector arithmetic device that supports mask vector generation instructions.

【0002】0002

【従来の技術】従来のベクトル演算装置では、マスクベ
クトル生成命令の実行に対してマスクベクトルそのもの
の使用は禁止または不可となっていた。このため、複数
のマスクベクトルの論理条件によるマスクベクトルを使
用したベクトル演算命令を実施するためには、複数のマ
スク生成命令でマスクベクトルをおのおの生成し、これ
らを論理可変長命令で論理演算し、最終的に使用するマ
スクを生成した後、このマスクベクトルを使用したベク
トル演算命令を実施していた。
2. Description of the Related Art In conventional vector arithmetic devices, the use of mask vectors themselves has been prohibited or disabled for the execution of mask vector generation instructions. Therefore, in order to implement a vector operation instruction using mask vectors based on the logical conditions of multiple mask vectors, each mask vector is generated using multiple mask generation instructions, and these are logically operated using a logical variable length instruction. After generating a mask to be finally used, a vector operation instruction using this mask vector is executed.

【0003】0003

【発明が解決しようとする課題】上述した従来のベクト
ル演算装置は、マスクベクトル生成命令での、マスクベ
クトルの使用を禁止または不可としているため、複数の
マスクベクトルに対する論理演算後のマスクを使用する
ベクトル演算命令の実行のためには、マスク生成命令の
他に論理可変長演算命令を実行する必要があり、論理可
変長演算命令を実行する分の処理時間(即ち、マスクベ
クトルの数―1回の論理可変長演算命令を実行する分の
処理時間)がかかってしまうというという問題点がある
[Problems to be Solved by the Invention] The conventional vector arithmetic device described above prohibits or disables the use of mask vectors in mask vector generation instructions, and therefore uses masks after logical operations on multiple mask vectors. In order to execute a vector operation instruction, it is necessary to execute a logical variable length operation instruction in addition to the mask generation instruction, and the processing time for executing the logical variable length operation instruction (i.e., the number of mask vectors - 1 time) is required. There is a problem in that the processing time required to execute the logical variable length operation instructions is required.

【0004】本発明の目的は、論理可変長演算命令を実
行することなく2つのマスクベクトルの論理演算後のマ
スクベクトルを生成するための論理演算マスクベクトル
付きマスクベクトル生成命令をサポートすることにより
、プログラムの処理時間の短縮を行うことが可能なベク
トル演算装置を提供することにある。
An object of the present invention is to support a mask vector generation instruction with a logical operation mask vector for generating a mask vector after logical operation of two mask vectors without executing a logical variable length operation instruction. An object of the present invention is to provide a vector arithmetic device capable of shortening program processing time.

【0005】[0005]

【課題を解決するための手段】本発明のベクトル演算装
置は、マスクベクトルを保持するためのマスクベクトル
レジスタ部と、ベクトル化された或いはされていない2
つのデータオペランドを受けこの2つのデータオペラン
ドの大小関係を比較し比較結果を1ビットのマスクビッ
トとして出力するオペランド比較部と、前記マスクベク
トルレジスタ部の最上位ビットと前記オペランド比較部
の出力する1ビットとの論理演算を行い1ビットのマス
クベクトルを出力するマスク論理演算部と、前記マスク
ベクトルレジスタ部の内容を受け最上位ビット方向に1
ビットシフトし空いた最下位ビットに前記マスク論理演
算部の出力する1ビットのマスクベクトルを入力するマ
スクベクトルシフト部と、前記各部を制御するベクトル
命令制御部とを有する構成である。
[Means for Solving the Problems] A vector arithmetic device of the present invention includes a mask vector register section for holding mask vectors, and a mask vector register section for holding mask vectors, and two
an operand comparison section that receives two data operands, compares the magnitude relationship between the two data operands, and outputs the comparison result as a 1-bit mask bit; a mask logic operation unit that performs logical operations with bits and outputs a 1-bit mask vector; and a mask logic operation unit that performs logical operations with bits and outputs a 1-bit mask vector;
The configuration includes a mask vector shift section that inputs a 1-bit mask vector output from the mask logic operation section into the least significant bit vacated by bit shifting, and a vector instruction control section that controls each of the sections.

【0006】[0006]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments Next, embodiments of the present invention will be described with reference to the drawings.

【0007】図1は本発明の一実施例のブロック図であ
る。
FIG. 1 is a block diagram of one embodiment of the present invention.

【0008】本発明のベクトル演算装置1は、マスクベ
クトルを保持すると共に図示していないメモリとの間で
データの授受を行うマスクベクトルレジスタ部2と、図
示していないメモリからベクトル化された或いはされて
いない2つのデータオペランドを受けるオペランド記憶
部3,4と、オペランド記憶部3,4からの2つのデー
タオペランドの大小関係を比較し比較結果を1ビットの
マスクビットとして出力するオペランド比較部5と、マ
スクベクトルレジスタ部2の最上位ビットとオペランド
比較部5の出力する1ビットとの論理演算を行い1ビッ
トのマスクベクトルを出力するマスク論理演算部6と、
マスクベクトルレジスタ部2の内容を受け最上位ビット
方向に1ビットシフトし空いた最下位ビットにマスク論
理演算部6の出力する1ビットのマスクベクトルを入力
するマスクベクトルシフト部7と、前述の各部を制御す
るベクトル命令制御部8とを含んでいる。
The vector calculation device 1 of the present invention includes a mask vector register section 2 that holds mask vectors and exchanges data with a memory (not shown), and a mask vector register section 2 that holds mask vectors and exchanges data with a memory (not shown); operand storage units 3 and 4 that receive two data operands that are not specified, and an operand comparison unit 5 that compares the magnitude relationship of the two data operands from the operand storage units 3 and 4 and outputs the comparison result as a 1-bit mask bit. and a mask logic operation unit 6 that performs a logical operation on the most significant bit of the mask vector register unit 2 and the 1 bit output from the operand comparison unit 5 and outputs a 1-bit mask vector;
A mask vector shift unit 7 receives the contents of the mask vector register unit 2, shifts one bit in the direction of the most significant bit, and inputs a 1-bit mask vector output from the mask logic operation unit 6 into the vacant least significant bit, and each of the above-mentioned units. and a vector command control section 8 for controlling the vector command control section 8.

【0009】次に、動作について説明する。Next, the operation will be explained.

【0010】オペランド比較部5は、比較対象となるオ
ペランド記憶部3,4からの2つのデータオペランドの
大小関係を比較し、ベクトル命令制御部8の指示する比
較条件に基づき、比較結果(マスク2)を1ビット出力
する。マスクベクトルレジスタ部2には、最初は論理演
算に使用する現在メモリに記憶している使用マスクベク
トル(マスク1)を保持し、処理を開始するとマスクベ
クトルシフト部7の出力する使用マスクベクトル(マス
ク1)と生成マスクベクトル(マスク3)を編集したデ
ータを保持する。マスク論理演算部6は、1ビットの論
理演算回路でありオペランド比較部5の生成した1ビッ
トのマスクビット(マスク2)と、マスクベクトルレジ
スタ部2の保持している使用マスクベクトル(マスク1
)の最上位の1ビットとを、ベクトル命令制御部8の指
示する論理演算種別に従って論理演算を行い、マスクベ
クトルシフト部7に出力する。マスクベクトルシフト部
7は、マスクベクトルレジスタ部2の保持する使用マス
クベクトル(マスク1)および生成マスクベクトル(マ
スク3)の右側に、マスク論理演算部6の出力する1ビ
ットのマスクビット(マスク2)を結合し、1ビット左
にシフトして結果をマスクベクトルレジスタ部2に出力
する。
The operand comparison unit 5 compares the magnitude relationship between the two data operands from the operand storage units 3 and 4 to be compared, and compares the comparison result (mask 2 ) is output as 1 bit. The mask vector register section 2 initially holds the used mask vector (mask 1) currently stored in the memory used for logical operations, and when processing starts, the used mask vector (mask 1) output from the mask vector shift section 7 is stored. 1) and the edited data of the generated mask vector (mask 3) are held. The mask logic operation unit 6 is a 1-bit logic operation circuit that uses the 1-bit mask bit (mask 2) generated by the operand comparison unit 5 and the used mask vector (mask 1) held in the mask vector register unit 2.
) is subjected to a logical operation according to the type of logical operation instructed by the vector instruction control unit 8, and is output to the mask vector shift unit 7. The mask vector shift unit 7 shifts the 1-bit mask bit (mask 2) output from the mask logic operation unit 6 to the right side of the used mask vector (mask 1) and the generated mask vector (mask 3) held by the mask vector register unit 2. ) are combined, shifted one bit to the left, and outputs the result to the mask vector register section 2.

【0011】次に、実際の動作について説明する。Next, the actual operation will be explained.

【0012】既にマスクベクトル生成命令により生成さ
れたマスクベクトルAがあるとし、このマスクベクトル
AをAND条件として使用し、2つのデータオペランド
の比較条件が“等しい”場合の論理演算マスクベクトル
付きマスクベクトル生成命令を実行した場合について説
明する。
Assuming that there is a mask vector A already generated by a mask vector generation instruction, this mask vector A is used as an AND condition, and a logical operation is performed when the comparison condition of two data operands is "equal". Mask vector with mask vector A case in which a generation instruction is executed will be explained.

【0013】まず、ベクトル命令制御部8からの制御を
受け、マスクベクトルレジスタ部2は、使用マスクベク
トルであるマスクベクトルAをセットする。次に、本命
令で使用する2つのデータオペランドをオペランド記憶
部3,4が記憶し、順番にオペランド比較部5に入力す
る。オペランド比較部5は、ベクトル命令制御部8から
“等しい”という条件を指示され、1組のデータオペラ
ンドを比較して条件をみたせば“1”満たさなければ”
0”をマスク論理演算部6に出力する。マスク論理演算
部6は、ベクトル命令制御部8から論理演算種別“AN
D”を指示され、オペランド比較部5の出力とマスクベ
クトルレジスタ部2の保持する使用マスクベクトルであ
るマスクベクトルAの最上位の1ビットとのAND論理
演算を実行し、結果をマスクベクトルシフト部7に出力
する。マスクベクトルシフト部7は、マスクベクトルレ
ジスタ部2の保持しているマスクベクトルAの右側に、
マスク論理演算部6の出力した生成マスクベクトルを連
結して入力とし、左に1ビットシフトし、使用済みのマ
スクベクトルAの1ビットを捨て、生成マスクベクトル
を右側に付加した形でマスクベクトルレジスタ部2に出
力する。マスクベクトルレジスタ部2は、マスクベクト
ルシフト部7の出力した生成マスクベクトルと使用マス
クベクトルを保持し、レジスタが生成したマスクベクト
ルで一杯になると、ベクトル命令制御部8に対してマス
クベクトルのメモリへの出力要求を出し、後続するデー
タオペランドがある場合には、次の使用マスクベクトル
をセットする。
First, under the control of the vector instruction control section 8, the mask vector register section 2 sets a mask vector A, which is a mask vector to be used. Next, the two data operands used in this instruction are stored in the operand storage units 3 and 4, and are sequentially input to the operand comparison unit 5. The operand comparison unit 5 is instructed by the vector instruction control unit 8 to specify the condition of “equal”, and if it compares one set of data operands and the condition is met, it will be “1”.
0” to the mask logic operation unit 6. The mask logic operation unit 6 outputs the logic operation type “AN” from the vector instruction control unit 8.
D", performs an AND logical operation between the output of the operand comparison section 5 and the most significant 1 bit of the mask vector A, which is the mask vector to be used held in the mask vector register section 2, and sends the result to the mask vector shift section. 7. The mask vector shift unit 7 outputs the mask vector A to the right side of the mask vector A held in the mask vector register unit 2.
The generated mask vectors output from the mask logic operation unit 6 are concatenated and inputted, shifted 1 bit to the left, discarded 1 bit of the used mask vector A, and added the generated mask vector to the right side, and then input the generated mask vector to the mask vector register. Output to section 2. The mask vector register unit 2 holds the generated mask vectors and used mask vectors output by the mask vector shift unit 7, and when the register is full of generated mask vectors, the mask vector register unit 2 stores the mask vectors in the memory of the vector instruction control unit 8. If there is a subsequent data operand, set the next mask vector to be used.

【0014】以上の処理をデータオペランドがなくなる
まで繰り返し、データオペランドがなくなると、ベクト
ル命令制御部8は、マスクベクトルレジスタ部2内に残
っている生成マスクがある場合には、これをメモリに出
力後処理を終了する。
The above processing is repeated until there are no more data operands, and when there are no more data operands, the vector instruction control section 8 outputs the generated mask, if any, remaining in the mask vector register section 2 to the memory. Finish post-processing.

【0015】なお、本実施例では、マスク論理演算部6
にたいし、ANDの指示を行った場合について記述した
が、マスク論理演算部6には、AND以外にORや排他
的論理和等の機能もある。
Note that in this embodiment, the mask logic operation section 6
Although the case where an AND instruction is given has been described above, the mask logic operation section 6 also has functions such as OR and exclusive OR in addition to AND.

【0016】[0016]

【発明の効果】以上説明したように、本発明は、マスク
ベクトルを保持するためのマスクベクトルレジスタ部と
、ベクトル化された或いはされていない2つのデータオ
ペランドを受けこの2つのデータオペランドの大小関係
を比較し比較結果を1ビットのマスクビットとして出力
するオペランド比較部と、マスクベクトルレジスタ部の
最上位ビットとオペランド比較部の出力する1ビットと
の論理演算を行い1ビットのマスクベクトルを出力する
マスク論理演算部と、マスクベクトルレジスタ部の内容
を受け最上位ビット方向に1ビットシフトし空いた最下
位ビットにマスク論理演算部の出力する1ビットのマス
クベクトルを入力するマスクベクトルシフト部と、各部
を制御するベクトル命令制御部とを有することにより、
論理可変長演算命令を実行することなく2つのマスクベ
クトルの論理演算後のマスクベクトルを生成するための
論理演算マスクベクトル付きマスクベクトル生成命令を
サポートすることにより、プログラムの処理時間の短縮
を行うことが可能となるという効果が有る。
As explained above, the present invention has a mask vector register section for holding a mask vector, and a system that receives two data operands that are vectorized or not and determines the magnitude relationship between the two data operands. and an operand comparison section that compares and outputs the comparison result as a 1-bit mask bit, and performs a logical operation on the most significant bit of the mask vector register section and the 1 bit output from the operand comparison section and outputs a 1-bit mask vector. a mask logic operation section; a mask vector shift section that receives the contents of the mask vector register section, shifts one bit in the direction of the most significant bit, and inputs a 1-bit mask vector output from the mask logic operation section into the vacant least significant bit; By having a vector command control section that controls each section,
To reduce program processing time by supporting a mask vector generation instruction with a logical operation mask vector for generating a mask vector after logical operation of two mask vectors without executing a logical variable length operation instruction. This has the effect of making it possible.

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

【図1】本発明の一実施例のブロック図である。FIG. 1 is a block diagram of one embodiment of the present invention.

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

1    ベクトル演算装置 2    マスクベクトルレジスタ部 3,4    オペランド記憶部 5    オペランド比較部 6    マスク論理演算部 7    マスクベクトルシフト部 8    ベクトル命令制御部 1 Vector calculation device 2 Mask vector register section 3, 4 Operand storage section 5 Operand comparison section 6 Mask logic operation section 7 Mask vector shift section 8 Vector instruction control unit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  マスクベクトルを保持するためのマス
クベクトルレジスタ部と、ベクトル化された或いはされ
ていない2つのデータオペランドを受けこの2つのデー
タオペランドの大小関係を比較し比較結果を1ビットの
マスクビットとして出力するオペランド比較部と、前記
マスクベクトルレジスタ部の最上位ビットと前記オペラ
ンド比較部の出力する1ビットとの論理演算を行い1ビ
ットのマスクベクトルを出力するマスク論理演算部と、
前記マスクベクトルレジスタ部の内容を受け最上位ビッ
ト方向に1ビットシフトし空いた最下位ビットに前記マ
スク論理演算部の出力する1ビットのマスクベクトルを
入力するマスクベクトルシフト部と、前記各部を制御す
るベクトル命令制御部とを有することを特徴とするベク
トル演算装置。
Claim 1: A mask vector register section for holding a mask vector, which receives two data operands that are vectorized or not, compares the magnitude relationship between the two data operands, and converts the comparison result into a 1-bit mask. an operand comparison unit that outputs as a bit; a mask logic operation unit that performs a logical operation on the most significant bit of the mask vector register unit and the 1 bit output from the operand comparison unit and outputs a 1-bit mask vector;
a mask vector shift unit that receives the contents of the mask vector register unit, shifts one bit in the direction of the most significant bit, and inputs a 1-bit mask vector output from the mask logic operation unit to the vacant least significant bit; and controls each of the units. 1. A vector arithmetic device comprising: a vector instruction control unit.
JP11424091A 1991-05-20 1991-05-20 Vector arithmetic unit Pending JPH04342067A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11424091A JPH04342067A (en) 1991-05-20 1991-05-20 Vector arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11424091A JPH04342067A (en) 1991-05-20 1991-05-20 Vector arithmetic unit

Publications (1)

Publication Number Publication Date
JPH04342067A true JPH04342067A (en) 1992-11-27

Family

ID=14632785

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11424091A Pending JPH04342067A (en) 1991-05-20 1991-05-20 Vector arithmetic unit

Country Status (1)

Country Link
JP (1) JPH04342067A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017027149A (en) * 2015-07-16 2017-02-02 ルネサスエレクトロニクス株式会社 Semiconductor device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6327975A (en) * 1986-07-22 1988-02-05 Hitachi Ltd Vector arithmetic control system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6327975A (en) * 1986-07-22 1988-02-05 Hitachi Ltd Vector arithmetic control system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017027149A (en) * 2015-07-16 2017-02-02 ルネサスエレクトロニクス株式会社 Semiconductor device

Similar Documents

Publication Publication Date Title
JP3520611B2 (en) Processor control method
EP1723543B1 (en) Method and apparatus for management of control flow in a simd device
US4658355A (en) Pipeline arithmetic apparatus
JPS6077265A (en) Vector processor
JPH04245324A (en) Arithmetic unit
JPH04342067A (en) Vector arithmetic unit
JP2003058381A (en) Processor realizing exception processing setting by program
JPH04359323A (en) Microcomputer
JP3540802B2 (en) Instruction generation method, instruction generation method, and information processing apparatus
JPS58200349A (en) Microprogram controller
JPH04137169A (en) Information processor
JPH0612253A (en) Microcomputer
JP3525582B2 (en) Bit operation circuit
JPH0233173B2 (en)
JPH09282165A (en) Information processor
JPS6327975A (en) Vector arithmetic control system
JPH06214673A (en) Logic-function generator in computer
JP2002366370A (en) Information processor
JPH04138582A (en) Single instruction type parallel computer
JPH01236327A (en) Interruption mask control method
JPH08297583A (en) Processor and method for interruption processing
JPH03184127A (en) Register saving control method
JPS62147545A (en) Processing system for transfer instruction of information processor
JPH07295794A (en) Pipeline type division processor
JPH01309174A (en) Vector processor

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19971118