JPS6017146B2 - computing device - Google Patents

computing device

Info

Publication number
JPS6017146B2
JPS6017146B2 JP54145252A JP14525279A JPS6017146B2 JP S6017146 B2 JPS6017146 B2 JP S6017146B2 JP 54145252 A JP54145252 A JP 54145252A JP 14525279 A JP14525279 A JP 14525279A JP S6017146 B2 JPS6017146 B2 JP S6017146B2
Authority
JP
Japan
Prior art keywords
register
vector
elements
circuit
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.)
Expired
Application number
JP54145252A
Other languages
Japanese (ja)
Other versions
JPS5668863A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP54145252A priority Critical patent/JPS6017146B2/en
Publication of JPS5668863A publication Critical patent/JPS5668863A/en
Publication of JPS6017146B2 publication Critical patent/JPS6017146B2/en
Expired legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/80Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors
    • G06F15/8053Vector processors

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Executing Machine-Instructions (AREA)
  • Complex Calculations (AREA)

Description

【発明の詳細な説明】 本発明は演算装置に関し、特にM個の要素からなるベク
トルレジスタと、該ベクトルレジスタの各要素に対応す
るM個の要素からなるマスクレジスタと、上記ベクトル
レジスタおよびマスクレジスタの要素の長さを示すベク
トル長レジスタとをそなえ、上記ベクトルレジスタの要
素を順次取り出し、上記ベクトル長レジスタで指定され
た要素の数だけ対応する上記マスクレジスタの要素にし
たがって上記ベクトルレジスタの要素間でオペレーショ
ンを実行する演算装置に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an arithmetic device, and more particularly to a vector register consisting of M elements, a mask register consisting of M elements corresponding to each element of the vector register, and the vector register and mask register described above. and a vector length register indicating the length of the elements of the vector register, the elements of the vector register are taken out sequentially, and the elements of the vector register are divided according to the elements of the mask register corresponding to the number of elements specified by the vector length register. The present invention relates to an arithmetic device that performs operations on a computer.

大量のベクトルデータを処理する計算機の制御方式とし
て、処理装置内部にベクトルレジスタをもうけ、記憶装
置のデータをいったんベクトルレジスタに移してから演
算装置を行なう方式が知られている。
As a control method for a computer that processes a large amount of vector data, a method is known in which a vector register is provided inside the processing device, data from a storage device is once transferred to the vector register, and then the arithmetic device is operated.

ベクトルレジスタ(VR)の要素を順次取り出し、要素
間でオペレーションを実行する計算機についてオペレー
ションの概要を説明する。
An overview of the operation of a computer that sequentially takes out elements of a vector register (VR) and performs operations between the elements will be explained.

ベクトルレジスタ(VR)の要素数MをM=128とし
、要素番号0,1,2,・・・,127とつけるとする
。オペレーションの一例としてSUM命令を説明する。
SUM命令はマスクレジスタ(M旧)の要素が0でない
ものの要素番号の、対応するベクトルレジスタ(VR)
の要素の総和をベクトル長レジスタ(VL)で指定され
た数の要素について求めるものである。
Assume that the number of elements of the vector register (VR) is M=128, and the element numbers are assigned as 0, 1, 2, . . . , 127. The SUM command will be explained as an example of the operation.
The SUM instruction returns the corresponding vector register (VR) of the element number of the mask register (old M) whose element is not 0.
The sum of the elements is calculated for the number of elements specified by the vector length register (VL).

第1図はベクトルレジスタ(VR)とマスクレジスタ(
MR)の構成を示す。要素番号を0,1,2,…,12
7とし、添字で表わすとし、ベクトル長を(VL)=1
00、マスクレジスタ(M旧)の0でない要素をMR.
,MR2,M旧4,…M股i,・・・MR母とする。求
める総和SはS=VR,十VR2十VR4十・・・十V
Ri+・・・十VR斑となる。
Figure 1 shows the vector register (VR) and mask register (
MR) configuration is shown. Set the element number to 0, 1, 2, ..., 12
7, expressed by a subscript, and the vector length is (VL) = 1
00, the non-zero elements of the mask register (old M) are set to MR.
, MR2, M old 4, . . . M crotch i, . . . MR mother. The total sum S to seek is S=VR, 10VR20VR40...10V
Ri+...10 VR spots.

第2図にその様子を示してある。ベクトルレジスタ(V
R)の斜線部分の和が求めるものである。ここで、ベク
トルデータについてみると、ベクトルデー外こは“0”
でない有意なデータが連続して配列されているものの他
に、値“0”を有するデータが多数混在しているものも
ある。
The situation is shown in Figure 2. Vector register (V
The sum of the shaded portions of R) is what is sought. Here, if we look at the vector data, the outside of the vector data is “0”.
In addition to data in which significant data with a value of "0" is arranged continuously, there is also data in which a large number of data having a value of "0" are mixed together.

そして、値“0”を有するデータについては演算を省略
しても結果が同一である演算操作の場合、演算速度を向
上させるために、従来においては、例えば、演算の前に
ベクトルレジス夕の要素を入れ換えるなどして、有意な
データのみをまとめてから演算を行なうようにしていた
。そのため、プログラムの作成が複雑になるという問題
を有していた。本発明は上詫間題点を解決し、プログラ
ムの作成を容易にしつつ、演算速度の向上を計ることを
目的とし、そのため本発明は、M個の要素からなるベク
トルレジスタと、該ベクトルレジスタの各要素に対応す
るM個の要素からなるマスクレジスタと、上記ベクトル
レジスタおよびマスクレジスタの要素の長さを示すベク
トル長レジスタとをそなえ、上記ベクトルレジスタの要
素を順次取り出し、上記ベクトル長レジスタで指定され
た要素の数だけ対応する上記マスクレジス夕の要素に従
って上記ベクトルレジスタの要素間でオペレーションを
実行する演算装置において、上記ベクトル長レジスタの
内容が0であることを検出する手段と、上記マスクレジ
スタのすべての要素が0であることを検出する手段をも
うけ、上記し、ずれかの手段により上記ベクトル長レジ
スタの内容が0または上記マスクレジス夕のすべての要
素が0の状態を検出したときは、あらかじめ決められた
固定結果を出力することを特徴とする。
In the case of an arithmetic operation in which the result is the same even if the arithmetic operation is omitted for data having the value "0", in order to improve the arithmetic speed, conventionally, for example, the elements of the vector register are By doing things such as replacing the data, only significant data was collected before calculations were performed. Therefore, there was a problem in that the creation of the program became complicated. An object of the present invention is to solve the above problems and improve the calculation speed while making it easier to create a program. Therefore, the present invention provides a vector register consisting of M elements and each of the vector registers. A mask register consisting of M elements corresponding to the elements and a vector length register indicating the length of the elements of the vector register and the mask register are provided, and the elements of the vector register are sequentially taken out and the vector length register is specified by the vector length register. means for detecting that the contents of the vector length register are 0; and means for detecting that the contents of the vector length register are 0; means for detecting that the elements of the vector length register are 0, and when any of the means detects that the contents of the vector length register are 0 or that all the elements of the mask register are 0, the predetermined It is characterized by outputting the fixed results obtained.

以下、本発明を図面により説明する。Hereinafter, the present invention will be explained with reference to the drawings.

第3図は本発明による実施例の演算装置のブロック図で
あり、図中、1はベクトルレジスタ(VR)、2はマス
クレジスタ(M旧)、3はアドレスカウンタ、4は十1
回路、5ないし7はしジスタ、8は演算回路、9はゲー
ト、10はベクトル長レジスタ(VL)、11は−1回
路、12と13は0検出回路、14と15はアンド回路
、16と17はオア回路である。前記したSUM命令を
実行したときの動作を以下に説明する。
FIG. 3 is a block diagram of an arithmetic unit according to an embodiment of the present invention, in which 1 is a vector register (VR), 2 is a mask register (old M), 3 is an address counter, and 4 is a
circuits, 5 to 7 are registers, 8 is an arithmetic circuit, 9 is a gate, 10 is a vector length register (VL), 11 is a -1 circuit, 12 and 13 are 0 detection circuits, 14 and 15 are AND circuits, 16 and 17 is an OR circuit. The operation when the above-mentioned SUM instruction is executed will be explained below.

SUM命令実行時、以前の命令によってベクトルレジス
タ1、マスクレジスタ2およびベクトル長レジスタ10
1こは演算に必要なデータが設定されている。
When the SUM instruction is executed, vector register 1, mask register 2, and vector length register 10 are set by the previous instruction.
1 contains data necessary for calculation.

また、アドレスカウンタ3、レジスタ5等は初期値“0
”に設定されている。
In addition, address counter 3, register 5, etc. have an initial value of “0”.
” is set.

命令実行開始とともに、アドレスカウンタ3にもとづい
てベクトルレジスタ1およびマスクレジスタ2の内容を
0番目の要素から順次論出していく。そして、マスクレ
ジスタ2のの要素が“1”のときゲート9を開けて、ベ
クトルレジスタ1から議出した値をレジスタ6にセット
し、議しジスタ6の値としジスタ5の値を演算回路7に
より加算する。
At the start of instruction execution, the contents of the vector register 1 and mask register 2 are sequentially determined from the 0th element based on the address counter 3. Then, when the element of the mask register 2 is "1", the gate 9 is opened, the value output from the vector register 1 is set in the register 6, and the value of the register 5 is set as the value of the register 6 and the value of the register 5 is set in the arithmetic circuit 7. Add by.

加算結果はしジスタ7を経由してレジスタ5にセットす
る。アドレスカウン夕3の値は十1回路4によりh頃次
増加していき、ベクトルレジスタ1および1およびマス
クレジスタ2の読出しを続けていく。また、マスクレジ
スタ2の要素が“0”のとき加算動作を行なわず、直ち
に次の要素の読出しを行なうようにされる。
The addition result is set in register 5 via register 7. The value of the address counter 3 is incremented every h by the eleventh circuit 4, and reading of the vector registers 1 and 1 and the mask register 2 continues. Further, when the element of the mask register 2 is "0", the addition operation is not performed and the next element is immediately read out.

一方、ベクトル長ジスタ10は上記ベクトルレジスタ1
およびマスクレジスタ2の議出し毎に、一1回路11に
より”頃次減少されていく。そして、ベクトル長レジス
タ10の値が“0”となったとき、上記読出し動作およ
び加算動作は中止され、レジスタ5の値がアンド回賂1
4およびオア回路7を通って出力される。以上の動作は
ベクトルレジスタ1に有意なデ−夕が存在するときのも
のである。ベクトル長レジスタ10の値が最初から“0
”であるとき、または、マスクレジスタ2の値がすべて
“0”であるときの動作は以下の通りになる。ベクトル
長レジスタ10の値が最初から“0”であるとき、0検
出回路13はベクトル長レジスタ10の値が“0”であ
ることを検出して、演算開始タイミング時点において“
1”を出力する。
On the other hand, the vector length register 10 is the vector register 1
Each time the mask register 2 is set, it is decremented by the 11 circuit 11. Then, when the value of the vector length register 10 becomes "0", the read operation and the addition operation are stopped. The value of register 5 is AND times 1
4 and the OR circuit 7. The above operation is performed when significant data exists in vector register 1. The value of vector length register 10 is “0” from the beginning.
”, or when the values of the mask register 2 are all “0”, the operation is as follows. When the value of the vector length register 10 is “0” from the beginning, the 0 detection circuit 13 It is detected that the value of the vector length register 10 is “0”, and “
Outputs 1”.

これにより、アンド回路15が制御されて固定値(SU
M命令の場合“0”)がオア回路17から出力される。
そして、当該SUM命令の実行は終了し、次のオペレー
ションに移るようにされる。
As a result, the AND circuit 15 is controlled and the fixed value (SU
In the case of the M instruction, “0”) is output from the OR circuit 17.
Then, the execution of the SUM instruction ends, and the process moves on to the next operation.

一方、マスクレジスタ2の値がすべて“0”であるとき
は、レジスタ5〜7および演算回路3による加算サイク
ルは実行されず、アドレスカウンタ3により連続してベ
クトルレジスタ1およびマスクレジスタ2の議出しが行
なわれる。
On the other hand, when the values of mask register 2 are all "0", the addition cycle by registers 5 to 7 and arithmetic circuit 3 is not executed, and the address counter 3 continues to input vector register 1 and mask register 2. will be carried out.

そして、ベクトル長レジスタ10で示される長さの要素
をすべて読出したとき、それまでにマスクレジスタ2か
ら読出した要素がすべて“0”であれば0検出回路12
は“1”を出力する。これにより、ベクトル長レジスタ
10の値が最初から“0”であるときと同様に、アンド
回路15が制御されて固定値(SUM命令の場合“0”
)がオア回路17から出力される。第4図aは第3図図
示の0検出回路12の一実施例回路であり、図中、20
はフリツプフロツプ、21はオア回路、22はアンド回
路である。
When all the elements of the length indicated by the vector length register 10 are read, if all the elements read from the mask register 2 up to that point are "0", the 0 detection circuit 12
outputs “1”. As a result, in the same way as when the value of the vector length register 10 is "0" from the beginning, the AND circuit 15 is controlled to a fixed value ("0" in the case of the SUM instruction).
) is output from the OR circuit 17. FIG. 4a shows an example circuit of the 0 detection circuit 12 shown in FIG.
is a flip-flop, 21 is an OR circuit, and 22 is an AND circuit.

フリップフ。ップ20は初期値“0”にされ、マスクレ
ジスタ2からデータがすべて“0”であればセットされ
ず、アンド回路22から“1”を出力する。第4図bは
第3図図示の0検出回路13の一実施例回路であり、図
中、23はノア回路、24はアンド回路である。
Flipf. The input circuit 20 is set to an initial value of "0", and if all the data from the mask register 2 is "0", it is not set, and the AND circuit 22 outputs "1". FIG. 4b shows an embodiment of the 0 detection circuit 13 shown in FIG. 3, in which 23 is a NOR circuit and 24 is an AND circuit.

ベクトル長レジスタ10の初期値が“0”であれば演算
開始タイミングにアンド回路24から“1”を出力する
。なお、上記実施例において、回路構成を若干変更する
ことにより、マスクレジスタの値がすべて“0”あるい
はベクトル長レジスタの値が“0”の状態を命令実行開
始前に検出し、当該命令の動作を最後まで実行すること
なくオペレーションを終了させることができることは明
白である。
If the initial value of the vector length register 10 is "0", the AND circuit 24 outputs "1" at the calculation start timing. In addition, in the above embodiment, by slightly changing the circuit configuration, the state in which the values of the mask register are all "0" or the value of the vector length register is "0" is detected before the start of instruction execution, and the operation of the instruction is performed. Obviously, it is possible to terminate an operation without executing it to completion.

またアドレスカウンタ3と十1回路4およびべクトル長
レジスタ10と−1回路11の回路構成は同様なもので
あり、同一回路で実現することも可能であり上記実施例
に限定されるものではない。さらに固定値を設定するに
あたり、演算の初期設定としてレジスタ5および6を設
定しておく方法も考えられる。当然のことながら、複数
のベクトルレジスタおよび複数のマスクレジスタをもつ
場合にもオペレーションコードで各々1つのベクトルレ
ジスタとマスクレジス夕を指定することにより本発明が
適用される。上記したように、本発明によれば、ベクト
ルレジスタあるいはマスクレジスタをオペランドとして
種々のオペレーションを行なう際に、ベクトルレジスタ
あるいはマスクレジスタの内容について、その特殊な状
態、すなわちベクトル長が0あるいはマスクレジスタの
すべての要素が0という状態をプログラムが意識する必
要がなくなり、プログラムを容易に、また効率よく作成
できるというすぐれた効果をもたらす。
Furthermore, the circuit configurations of the address counters 3 and 11 circuits 4 and the vector length register 10 and -1 circuit 11 are similar, and can be realized by the same circuit, and are not limited to the above embodiment. . Furthermore, in setting the fixed value, a method may be considered in which registers 5 and 6 are set as initial settings for calculation. Naturally, the present invention can also be applied to a case where there are a plurality of vector registers and a plurality of mask registers by specifying one vector register and one mask register in each operation code. As described above, according to the present invention, when performing various operations using a vector register or a mask register as an operand, the contents of the vector register or mask register are in a special state, that is, the vector length is 0 or the mask register is This eliminates the need for programs to be aware of the state in which all elements are 0, resulting in the excellent effect that programs can be created easily and efficiently.

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

第1図はベクトルレジス夕とマスクレジスタの構成、第
2図は加算時の例を示す図、第3図は本発明による実施
例の演算装置のブロック図、第4図は0検出回路の一実
施例回路である。 図中、1はベクトルレジスタ、2はマスクレジスタ、3
はアドレスカウンタ、5なし、し7はしジスタ、8は演
算回路、1川まベクトル長レジスタ、12と13は0検
出回路、20はフリツプフロツブである。 寿′図 弟乙魔 菟3蟹 第4図
Fig. 1 shows the configuration of the vector register and mask register, Fig. 2 shows an example of addition, Fig. 3 is a block diagram of an arithmetic unit according to an embodiment of the present invention, and Fig. 4 shows an example of a 0 detection circuit. This is an example circuit. In the figure, 1 is a vector register, 2 is a mask register, and 3 is a vector register.
5 is an address counter, 5 is a register, 8 is an arithmetic circuit, a single vector length register, 12 and 13 are 0 detection circuits, and 20 is a flip-flop. Kotobuki's younger brother Otoma 3 crabs 4th illustration

Claims (1)

【特許請求の範囲】[Claims] 1 M個の要素からなるベクトルレジスタと、該ベクト
ルレジスタの各要素に対応するM個の要素からなるマス
クレジスタと、上記ベクトルレジスタおよびマスクレジ
スタの要素の長さを示すベクトル長レジスタとをそなえ
、上記ベクトルレジスタの要素を順次取り出し、上記ベ
クトル長レジスタで指定された要素の数だけ対応する上
記マスクレジスタの要素にしたがつて上記ベクトルレジ
スタの要素間でオペレーシヨンを実行する演算装置にお
いて、上記ベクトル長レジスタの内容が0であることを
検出する手段と、上記マスクレジスタのすべての要素が
0であることを検出する手段をもうけ、上記いずれかの
手段により上記ベクトル長レジスタの内容が0または上
記マスクレジスタのすべての要素が0の状態を検出した
ときは、あらかじめ決められた固定結果を出力すること
を特徴とする演算装置。
1. A vector register consisting of M elements, a mask register consisting of M elements corresponding to each element of the vector register, and a vector length register indicating the length of the elements of the vector register and mask register, In an arithmetic unit that sequentially takes out the elements of the vector register and executes an operation between the elements of the vector register according to the elements of the mask register corresponding to the number of elements specified by the vector length register, means for detecting that the contents of the vector length register are 0, and means for detecting that all elements of the mask register are 0; An arithmetic device that outputs a predetermined fixed result when a state in which all elements of a mask register are 0 is detected.
JP54145252A 1979-11-09 1979-11-09 computing device Expired JPS6017146B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP54145252A JPS6017146B2 (en) 1979-11-09 1979-11-09 computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP54145252A JPS6017146B2 (en) 1979-11-09 1979-11-09 computing device

Publications (2)

Publication Number Publication Date
JPS5668863A JPS5668863A (en) 1981-06-09
JPS6017146B2 true JPS6017146B2 (en) 1985-05-01

Family

ID=15380825

Family Applications (1)

Application Number Title Priority Date Filing Date
JP54145252A Expired JPS6017146B2 (en) 1979-11-09 1979-11-09 computing device

Country Status (1)

Country Link
JP (1) JPS6017146B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61136943U (en) * 1985-02-18 1986-08-26

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61136943U (en) * 1985-02-18 1986-08-26

Also Published As

Publication number Publication date
JPS5668863A (en) 1981-06-09

Similar Documents

Publication Publication Date Title
US4228498A (en) Multibus processor for increasing execution speed using a pipeline effect
US4539635A (en) Pipelined digital processor arranged for conditional operation
JPS6024985B2 (en) Data processing method
JPH0756892A (en) Computer having vector arithmetic unit with mask
US4598358A (en) Pipelined digital signal processor using a common data and control bus
JPH034936B2 (en)
JPS62226231A (en) Processor
JPS6017146B2 (en) computing device
JP2520882B2 (en) Data processing device and data processing method
JPS6051734B2 (en) Microprogram control method
JPH0222413B2 (en)
JP2637070B2 (en) Micro instruction start address generation method
JPS58200349A (en) Microprogram controller
JPS6042983B2 (en) Command control method
JP3116444B2 (en) Semiconductor computing equipment and electronic equipment
JPS6022787B2 (en) Command control method
JP2504974B2 (en) Sequencer high-speed processing method
JPH06162067A (en) Device and method for controlling vector instruction
JPS61283930A (en) Information processor
JPS6022247A (en) Micro instruction control system
JPS6028014B2 (en) microprocessor
JPS5971542A (en) Arithmetic processor
Borangiu Microprogrammed ALU for a Low Cost Logical Controller
JPS6049941B2 (en) data processing equipment
JPS6250854B2 (en)