JPS5958580A - Masked vector arithmetic processing unit - Google Patents
Masked vector arithmetic processing unitInfo
- Publication number
- JPS5958580A JPS5958580A JP16835882A JP16835882A JPS5958580A JP S5958580 A JPS5958580 A JP S5958580A JP 16835882 A JP16835882 A JP 16835882A JP 16835882 A JP16835882 A JP 16835882A JP S5958580 A JPS5958580 A JP S5958580A
- Authority
- JP
- Japan
- Prior art keywords
- vector
- processing
- instruction
- mask
- arithmetic
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/76—Architectures of general purpose stored program computers
- G06F15/80—Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors
- G06F15/8053—Vector 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)
- Complex Calculations (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
〔発明の利用分野〕
本発明はベクトルデータを高速に演算する装置に関する
。DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to an apparatus for calculating vector data at high speed.
ベクトルプロセサのより高速な処理を達成するには、よ
り多くの種類の処理をベクトルプロセサにより高速に処
理可能とすることが課題となっている。中でも、FOR
TRANプログラムで、lF文を含むDOループを高速
に処理するには、より高度の処理装置が必要と芒れるが
、第1図に示すようなりOルーズの従来技術による処理
手順を第2図と第3図を用いて説明する。In order to achieve faster processing by a vector processor, it is a challenge to enable the vector processor to process more types of processing at higher speed. Among them, FOR
In order to process a DO loop containing an IF statement at high speed in a TRAN program, it is said that a more advanced processing device is required. This will be explained using FIG.
第1図に示すDOループでは、式(1)にあるような論
理積9の結果の値が戸”であり、かつ、式(2)に示す
論理演算結果が”真″である場合に限や対応するインデ
クス値:工を持つエレメント間で式(3ンの加算及び代
入を行い、式(1)か、式(2)のいづれかが成立しな
いようなインデクス値を持つエレメント間での式(3)
の加算及び代入は行わない。このような処理をN組のエ
レメントについて繰り返す。In the DO loop shown in Figure 1, the value of the result of the logical product 9 as shown in equation (1) is "door", and the logical operation result shown in equation (2) is "true". or the corresponding index value: Expression (3) is added and substituted between elements with index values such that either expression (1) or expression (2) does not hold. 3)
Additions and substitutions are not made. Such processing is repeated for N sets of elements.
第2図は、エレメント数二Nが6で、オペランドA(1
〜6)、B(1〜6)、C(1〜6)。In Figure 2, the number of elements 2N is 6, and the operand A (1
-6), B (1-6), C (1-6).
D(1〜6)、F’(1〜6)、G(1〜6)に適当な
数値を仮定し、第1図の演算を行なった場合のデータの
流れを示したものである。This figure shows the flow of data when the calculations shown in FIG. 1 are performed assuming appropriate values for D (1 to 6), F' (1 to 6), and G (1 to 6).
第2図で値゛X#はこれらの処理によシ変更を受けず、
また、この処理に関与しないことを示す。In Figure 2, the value ゛X# is not changed by these processes,
It also indicates that it is not involved in this process.
以下に、その処理手順を示す。The processing procedure is shown below.
ステップ1: オペランドA(1〜6)とB(1〜6)
の対応するニレメン同志を、それぞれ比較してベクトル
マスク:VM(1〜6)を作成する。この場合、対応す
る両エレメントの値が一致して論理演算結果が真”とな
るとき、VMには値at 1pyを件き、一致しないと
きVMKは値It 071を臀くものとする。従って本
例ではVM(1〜6)の値はそれぞれ、0,1,0,1
,1゜0となる。Step 1: Operands A (1-6) and B (1-6)
A vector mask: VM (1 to 6) is created by comparing the corresponding niremen. In this case, when the values of both corresponding elements match and the logical operation result is "true", the VM has the value at 1py, and when they do not match, the VMK has the value It 071. In the example, the values of VM (1-6) are 0, 1, 0, 1, respectively.
, 1°0.
ステップ2: 次のステップ3で、ベクトルマスク:V
Mを格納している、ベクトルマスクレジスタを、再度書
込みに使用する為に、VM(1〜6)の内容を、別のレ
ジスタS R,1に退避させる。Step 2: In the next step 3, vector mask: V
In order to use the vector mask register storing M for writing again, the contents of VM (1 to 6) are saved to another register SR,1.
なお、このS R,1は、ベクトルマスク専用のレジス
タではなく、保持データの全エレメント分を一括して処
理することしか出来ない。その為に、このステップは、
ステップ1が全て終了してから行われる。Note that this SR,1 is not a register dedicated to vector masks, and can only process all elements of held data at once. Therefore, this step
This is performed after Step 1 is completed.
ステップ3: ステップ(1)と同様に第1図の式(2
)の演算を行い、結果をVM(1〜6)に書込む。Step 3: Similar to step (1), equation (2
) and write the result to VM (1 to 6).
ここでも、論理演算値真″に対して値″t 1 n。Again, the value ``t1n'' for the logical operation value ``true''.
″偽″に対して値at O”を対応させると、この場合
(7)VM(1〜6ンの値は、それぞれ0,1,1゜1
.0.1となる。If we associate the value at O with “false”, in this case (7) VM (the values 1 to 6 are 0, 1, 1°1, respectively)
.. It becomes 0.1.
ステップ4: 次のステップ5で、全エレメント分の一
括処理しか出来ない汎用の演算器を用いて汎用のレジス
タ間の論理演算を行うため、7M(1〜6)の値を汎用
のレジスタSR2に退避する。このステップもステップ
2と同じ理由で、ステップ3が全て終了してから行われ
る。Step 4: In the next step 5, in order to perform logical operations between general-purpose registers using a general-purpose arithmetic unit that can only process all elements at once, the value of 7M (1 to 6) is stored in general-purpose register SR2. evacuate. This step is also performed after step 3 is completed for the same reason as step 2.
ステップ5: SRIとSR,20ビツト毎の論理積
をSR,3に求める。このステップはステップ4が終了
してから行われる。Step 5: Find the logical product of SRI and SR, every 20 bits, on SR,3. This step is performed after step 4 is completed.
ステップ6: ステップ5で求めたSR3の値をVM(
1〜6)に転送する。Step 6: VM(
1 to 6).
ステップ7: ステップ6で得られたVM(1〜6)の
値にをもとに、第1図の式(3)に示す加算と代入を行
う。その際、対応するベクトルマスクVM(I)の値が
0”のエレメントについては演算の結果を無効とする。Step 7: Based on the value of VM (1 to 6) obtained in Step 6, addition and substitution shown in equation (3) in FIG. 1 are performed. At this time, the result of the calculation is invalidated for elements whose corresponding vector mask VM(I) has a value of 0''.
すなわち、その時のE(1)の値を変更しない。本例で
は、第2及び第4エレメントについてのみ演算結果が主
記憶上のE(1)の値を変更するように動作する。That is, the value of E(1) at that time is not changed. In this example, the operation is performed such that the calculation results for only the second and fourth elements change the value of E(1) in the main memory.
以上の処理の様子を、第3図のタイムチャートで示す。The state of the above processing is shown in the time chart of FIG.
タイムチャートの縦軸は各ステップを示し、横軸は時間
を示す。各番号は、そのエレメント番号の処理の最初の
ザイクルを示しており、ステップ間の時間的ずれは、起
動時間のずれを示している。The vertical axis of the time chart indicates each step, and the horizontal axis indicates time. Each number indicates the first cycle of processing for that element number, and the time lag between steps indicates the start-up time lag.
以上に述べてきたように、従来技術による複雑な条件文
を含むDOループのベクトルプロセサでの処理は、ベク
トルマスクレジスタが1つしかない為、一括処理用のレ
ジスタに移動して、一括処理による演算処理を行い、出
来あがった最終的なベクトルマスクを、再びベクトルマ
スクレジスタに転送しなければ、条件付きの演算処理が
出来ない。従って、第3図に見るように、従来技術では
ベクトル処理が、ステップ1と、ステップ3、ステップ
7に、それぞれ処理時間帯を分けられ、これらのステッ
プ間では、処理の並列・高速化ができないという問題が
あった。As mentioned above, in the conventional technology, processing of DO loops including complex conditional statements in the vector processor has only one vector mask register. Conditional arithmetic processing cannot be performed unless the arithmetic processing is performed and the final vector mask created is transferred to the vector mask register again. Therefore, as shown in Figure 3, in the conventional technology, vector processing is divided into three processing time periods: step 1, step 3, and step 7, and processing cannot be parallelized or accelerated between these steps. There was a problem.
一般に、ベクトルプロセサでは複数ベクトル演算の異な
るエレメントについての処理を、同時並行に処理するこ
とで高速性を達成しているが、ステップ2,4,5.6
の処理がベクトルプロセサ向きでない為に、第4図のよ
うに、ステップ1゜3.7を並列に処理することを妨げ
ている。In general, vector processors achieve high speed by processing different elements of multiple vector operations in parallel, but steps 2, 4, 5.6
Since the processing is not suitable for a vector processor, it is difficult to process steps 1.about.3.7 in parallel as shown in FIG.
本発明の目的は、ベクトルマスクの生成、ベクトルマス
ク間の演算処理、及び条件付きベクトル演算処理を、全
て同時並行して処理可能とするベクトル演算処理装置を
提供することにある。An object of the present invention is to provide a vector arithmetic processing device that can perform vector mask generation, vector mask arithmetic processing, and conditional vector arithmetic processing all in parallel.
このため、本発明による装置では、
(1)同時に書込み・読出し可能な複数のベクトルマス
ク専用レジスタ。Therefore, in the device according to the present invention, (1) a plurality of registers dedicated to vector masks that can be simultaneously written to and read from;
(2)ベクトルマスク専用レジスタ中のデータを入力と
して新しいベクトルマスクの値を算出する、1個以上の
ベクトルマスク専用演算器。(2) One or more vector mask-dedicated arithmetic units that calculate a new vector mask value by inputting data in a vector mask-dedicated register.
(3)ベクトルマスクの書込みと、ベクトルマスク専用
演算器への読出しを同期させる手段。(3) Means for synchronizing writing of the vector mask and reading to the vector mask dedicated arithmetic unit.
(4)ベクトルマスクの書込みと、マスク付きベクトル
演算処理用演算器への読出しを同期させる手段。(4) Means for synchronizing writing of the vector mask and reading to the masked vector arithmetic processing arithmetic unit.
とを、新たに設けることにより、ベクトルマスクの生成
、ベクトルマスク間演算9条件付きベクトル演算処理を
、全て同時並行して処理することを可能としたものであ
る。By newly providing these, it is possible to process vector mask generation, inter-vector mask calculations, and nine conditional vector calculation processes all at the same time.
ただし、本明細書では“演算処理″という言葉により、
主記憶参照、ベクトル間の加減算等の演算、結果の主記
憶への格納の全てのものをさし、本明細1゛の実施例で
はマスク付き主記憶格納を例にとる。However, in this specification, the term "arithmetic processing" refers to
It refers to all operations such as main memory references, operations such as addition and subtraction between vectors, and storage of the results in the main memory.In the embodiment of this specification 1, masked main memory storage will be taken as an example.
以下1本発明を実施例を参照して詳細に説明する。第5
図は本発明の一実施例を示す。Hereinafter, the present invention will be explained in detail with reference to examples. Fifth
The figure shows an embodiment of the invention.
本発明に直接関連しない装置部分は、通常のベクトルプ
ロセサと同じ構成を有するものとし、その部分の説明は
簡単にするに止める。It is assumed that the device parts not directly related to the present invention have the same configuration as a normal vector processor, and the description of those parts will be kept simple.
第5図において、101は主記憶装置、102は主記憶
制御装置、103はスカラ処理装置であり、104Uそ
の一部であるスカラ命令制御装置、105はベクトル命
令制御装置である。In FIG. 5, 101 is a main memory device, 102 is a main memory control device, 103 is a scalar processing device, 104U is a part of the scalar instruction control device, and 105 is a vector instruction control device.
スカラ命令制御装置104では主記憶制御装置102と
信号線201を介して主記憶装置101から順次読出し
た命令を解読し、これが通常のスカラ命令であるときは
、スカラ処理装置103にて通常のスカラ演算処理を行
い、信号線202を介し結果を主記憶装置101に書込
む。スカラ命令制御装置104で解読した命令が、ベク
トル命令列の起動を指示する命令であれば、信号線20
3を介して、ベクトル命令列の主記憶装置101上での
先頭アドレスと、処理すべきベクトルエレメント数と、
起動信号をベクトル命令制御装置105へ渡す。引続き
、ベクトル命令制御装置105は与えられたアドレスに
従い、信号線201,204を介してペタトル命令列を
主記憶装置101から111fi次読出し、ベクトル命
令を解読し、命令中で指定された、レジスタ、演算器、
メモ1ノ1ノクエタ等が使用可能な状態にあると判断し
た命令75)ら、それぞれ信号線205,206,20
7を介して命令に必要なリソースを起動すると共に、同
時に、処理すべきベクトルエレメント数を含めた市+j
徊1+青報を転送する。ベタトル命令のニレメントイ固
々に対する処理は、ベクトルレジスタ制御装置110や
、ベクトルマスクレジスタ制御装置120の送出する。The scalar instruction control device 104 decodes the instructions sequentially read from the main memory device 101 via the main memory control device 102 and the signal line 201. If this is a normal scalar instruction, the scalar processing device 103 Arithmetic processing is performed and the results are written to the main storage device 101 via the signal line 202. If the instruction decoded by the scalar instruction control device 104 is an instruction to start a vector instruction sequence, the signal line 20
3, the start address of the vector instruction sequence on the main storage device 101, the number of vector elements to be processed,
The activation signal is passed to the vector instruction control device 105. Subsequently, the vector instruction control device 105 reads the petator instruction string from the main memory 101 via the signal lines 201 and 204 in accordance with the given address, decodes the vector instruction, and stores the registers specified in the instruction. arithmetic unit,
The commands 75) which determined that the memo 1, 1, etc. are in a usable state, signal lines 205, 206, and 20, respectively.
7 to activate the resources necessary for the instruction, and at the same time, start the resources necessary for the instruction via
Transfer Wandering 1 + Aoho. The vector register control device 110 or the vector mask register control device 120 sends out processing for each vector instruction.
1エレメント毎の処理の許可信号に従って進められる。The process proceeds according to the permission signal for processing for each element.
以下、第1図に示し7たDoルーフ。Below, the Do roof shown in Figure 1 is shown.
の処理を行う場合を例にとり、本発明によるベクトル命
令の実行を説明する。本例では、ベクトルレジスタと呼
ぶバッファ記憶を用いており、それぞれNエレメントか
らなる一連のデータ、A(1〜N)、B(1〜N)、C
(1〜N)、D(1〜N)、E(1〜N)、G(1〜N
)を信号線211〜216をを介し、ベクトルレジスタ
111〜116にそれぞれ格納することが必要である7
5:、この間の処理は通常のベクトルプロセッサによる
処理に従うものとする。The execution of a vector instruction according to the present invention will be explained by taking as an example the case where processing is performed. In this example, a buffer storage called a vector register is used, and a series of data each consisting of N elements, A (1 to N), B (1 to N), C
(1-N), D (1-N), E (1-N), G (1-N
) must be stored in the vector registers 111-116, respectively, via the signal lines 211-2167.
5: Processing during this period follows processing by a normal vector processor.
第1図の処理を実行するには、上記の処理を行う6つの
命令の他に、A(I)とB(I)を要素ごとに比較し、
比較結果をベクトルマスクレジスタに書込む第7の命令
。同じ<、C(I)とD(I)の値の要素ごとの比較結
果を第7の命令で宵込んだのとは別のマスタレジスタに
書込む第8の命令。第7の命令と第8の命令により得ら
れる2つのベクトルマスク間で論理演算を行い、結果を
第3のベクトルマスクレジスタに書込む第9の命令。F
(I)とG(I)を要素毎に加算し、結果をベクトルレ
ジスタに格納する第10の命令と、第1Oの命令によっ
て得られた加算結果を、第9の命令によって得られたベ
クトルマスクがto 1nをとる場合のみ(もしくは、
0″′をとる場合のみ)、E(I)に相当するメモリア
ドレスに書込む、第11の命令が用いられる。To execute the process shown in Figure 1, in addition to the six instructions that perform the above process, A(I) and B(I) are compared element by element,
A seventh instruction that writes the comparison result to the vector mask register. The eighth instruction writes the result of the element-by-element comparison of the values of C(I) and D(I) to a different master register than the one written in the seventh instruction. A ninth instruction that performs a logical operation between the two vector masks obtained by the seventh and eighth instructions and writes the result to the third vector mask register. F
A 10th instruction that adds (I) and G(I) element by element and stores the result in a vector register, and a vector mask that uses the addition result obtained by the 10th instruction and a vector mask obtained by the 9th instruction. only if takes to 1n (or
0″′), an eleventh instruction is used which writes to the memory address corresponding to E(I).
以下第5図を用いて、第1図の処理を説明する。The processing shown in FIG. 1 will be explained below using FIG. 5.
第7の命令に応答してベクトル命令制御装置は、演算器
131に、ベクトルレジスタ111゜112中の値を送
り、式(υの比較を行なう。この場合、等しいという関
係が成立する場合には、値パ1”を、成立しない場合に
は値II 0++を、信号線231を介し、ベクトルマ
スクレジスタ122に書込むものとする。この比較演算
は、131にパイプライン演算器を用いることで、1サ
イクルに1エレメントのピッチで進めることができる。In response to the seventh instruction, the vector instruction control device sends the values in the vector registers 111 and 112 to the arithmetic unit 131, and compares the expressions (υ). In this case, if the relationship of equality is established, , the value PA1'' is written, and if the value II0++ is not established, the value II0++ is written to the vector mask register 122 via the signal line 231.This comparison operation can be performed in one cycle by using a pipeline arithmetic unit in the signal line 231. can be advanced at a pitch of one element.
第8の命令は、同様に式(2)の比較を行い、成立に対
し61″を、不成立に対してはIt 07+を、パイプ
ライン演算器132から信号線232を介して、ベクト
ルマスクレジスタ123に盲込む。The eighth instruction similarly compares Equation (2), and if it is true, it is 61'', and if it is not true, it is It07+, which is sent from the pipeline arithmetic unit 132 to the vector mask register 123 via the signal line 232. Blinded by.
122と123に書込才れた値の間で、今度は第9の翁
令によって論理積をとる演算が行われる。Between the values written in 122 and 123, a logical AND operation is performed according to the ninth instruction.
これは、従来技術で述べたような、一括処理しか出来な
いレジスタ及び演算器ではなく、ベクトルマスクの専用
レジスタ121〜123、及び専用のパイプライン演算
器141を用いているため、必要なデータが揃ったエレ
メント間では、ただちに論理積をとる処理Vこ移るよう
に同期される。This uses vector mask registers 121 to 123 and a dedicated pipeline arithmetic unit 141 instead of registers and arithmetic units that can only perform batch processing as described in the prior art, so that the necessary data can be The elements that have been completed are synchronized so that the logical product processing is immediately performed.
また、第9の命令で作成されたベクトルマスクの値を、
第11の命令で参照する場合も、メモリに格納するデー
タと、ベクトルマスクが揃ったエレメント間では、直ち
に処理が行われるように同期される。Also, the value of the vector mask created by the ninth instruction is
When referenced by the eleventh instruction, data to be stored in memory and elements whose vector masks are complete are synchronized so that processing is performed immediately.
前者のベクトルマスクレジスタ間の同期機構を第6図で
説明し、後者のベクトルマスクレジスタとベタトルレジ
スタの間での同期機構を、条件付きベクトル演算を例に
、第7図で説明する。The former synchronization mechanism between vector mask registers will be explained with reference to FIG. 6, and the latter synchronization mechanism between vector mask registers and vector registers will be explained with reference to FIG. 7, taking conditional vector operations as an example.
第7. 第8の命令で書込まれたベクトルマスクレジス
タの値は、書込みが全エレメントにわたって終了してい
れば、どこから読んでも良いが、途中のエレメントを書
き込んでいる途中なら、書込む前の値を読むと、第1図
の処理が正しく実行されない。この書込み済の範囲を知
る目的で、例えば、比較演算結果を書き込んでから、論
理積をとるため読出されるベクトルマスクレジスタ12
2(以下VMR2と呼ぶ)に対応して、書き込み済みエ
レメント数が、どれだけ読み出しエレメント数を上回っ
ているかを蓄える、アップダウンカウンタ322と、書
込み中であるとか読出し中であるという状態を蓄えるレ
ジスタ321を用意する。7th. The value of the vector mask register written by the 8th instruction can be read from any point as long as writing has been completed for all elements, but if an element in the middle is being written, the value before writing is read. If so, the process shown in FIG. 1 will not be executed correctly. For the purpose of knowing this written range, for example, the vector mask register 12 is read out to take the logical product after writing the comparison operation result.
2 (hereinafter referred to as VMR2), an up/down counter 322 that stores how much the number of written elements exceeds the number of read elements, and a register that stores the status of writing or reading. Prepare 321.
VMR2から1エレメント読み出す為の許可信号404
ば、VMR2が書込み中でない場合か、書込み中だがこ
れから読み出そうとするエレメントが1込み済である場
合に発行される。カウンタ322は書込みエレメント数
から読出しエレメント数(もしくは読出し予定エレメン
ト数)を引いた差を保持しているので、このカウンタの
値が正であることを示す信号401、VR4R2が貞込
み中かつ、読出し中であることを示す信号402、VM
R2が書込み中ではない、単純な読み出し状態にあるこ
とを示す信号403に、AND回路323、OR回路3
24の論理をとることで、信号404を得ることができ
る。Permission signal 404 for reading one element from VMR2
For example, it is issued when the VMR2 is not being written, or when it is being written but the element to be read from now has already been written. Since the counter 322 holds the difference obtained by subtracting the number of read elements (or the number of planned read elements) from the number of write elements, the signal 401 and VR4R2 indicating that the value of this counter is positive is in progress and read. A signal 402 indicating that the VM is inside
An AND circuit 323 and an OR circuit 3 are connected to a signal 403 indicating that R2 is not in a writing state and is in a simple read state.
A signal 404 can be obtained by taking the logic of 24.
また、VMR,2とベクトルマスクレジスタ123(以
下、VM)L3と呼ぶ)の間で演算をして良いツバ、V
MR2も、VMR3も、どちらも1エレメント読み出す
許可信号が揃っている場合に限る。Also, it is possible to perform calculations between VMR,2 and the vector mask register 123 (hereinafter referred to as VM L3), V
This is limited to the case where both MR2 and VMR3 have permission signals for reading one element.
1エレメントの演算許可信号406は、VMR2の1エ
レメント読出し許可信号404と、VMR。The 1-element operation permission signal 406 is the 1-element read permission signal 404 of the VMR2 and the VMR.
3の1エレメント読出し許可信号405をAND回路3
01を用いてANDすることによ#)得られる。この1
エレメントの演算許可信号406によってV11V12
と3の読出しアドレス302の値が1追加され、未処理
エレメント数を蓄えたカウンタ303の値が1でないな
ら、1減じて、次のエレメント処理へと進む。この論理
積演算はパイプライン演算器141の各ステージ、14
11〜1413を経て、ベクトルマスクレジスタ121
(以下VMR1と呼ぶ)に書込まれる。この際、書込み
側のアドレス304やアップダウンカウンタ312への
加算fd、306〜307に示す同期フリップフロップ
を適当に追加することで、データの処理の同期がとられ
る。VMRlに書き込んだエレメントデータを、必要な
場合に、書込みと同時に読み出すには、アップダウンカ
ウンタ312への+1動作が行われてから、実際にデー
タが122へ書込まれるまでの時間差を、アップダウ/
カラ/り312の一1動作が行われてから、読出しが行
われるまでの時間差に等しく設計することが必要である
。本例ではそのために、信号407は307のフリップ
フロップ群をバイパスしてアップダウンカウンタ312
へ送られている。この307のフリップフロップのうち
最初のもの3071から、7MR1までの信号の伝達時
間と、312から、第6図では省略されているVRIの
胱出し゛rドレス(第7図503)までの伝達時間を等
しくすることによって、VMRIに4込まれたデータを
直ちに読出すことが可能となっている。AND circuit 3 of 1 element read permission signal 405 of 3.
#) can be obtained by ANDing with 01. This one
V11V12 by element operation permission signal 406
1 is added to the value of the read address 302 of and 3, and if the value of the counter 303 storing the number of unprocessed elements is not 1, it is subtracted by 1 and the process proceeds to the next element. This logical product operation is performed at each stage of the pipeline operator 141.
11 to 1413, the vector mask register 121
(hereinafter referred to as VMR1). At this time, the data processing is synchronized by appropriately adding the writing side address 304, addition fd to the up/down counter 312, and synchronous flip-flops shown in 306 to 307. In order to read the element data written to VMR1 at the same time as writing, if necessary, the time difference between when the up/down counter 312 is incremented by +1 and when the data is actually written to 122 is determined by up/down/
It is necessary to design the time difference to be equal to the time difference between when the color/read 312 operation is performed and when reading is performed. In this example, the signal 407 bypasses the flip-flop group 307 and is sent to the up/down counter 312.
is being sent to. The transmission time of the signal from the first one of these 307 flip-flops 3071 to 7MR1, and the transmission time from 312 to the VRI bladder output address (503 in Figure 7), which is omitted in Figure 6. By making them equal, it is possible to immediately read out the data stored in the VMRI.
第6図で、WTと書かれているのは、それぞれのベクト
ルマスクレジスタへの書込み命令により発行でれる信号
である。本例では、第1図の式(IJの処理の始まりと
共に、信号421により、Vl、flR2の状態321
を、書込み状態にセットし、アップダウンカラ/り32
2−QOにリセットする。In FIG. 6, WT indicates a signal issued by a write command to each vector mask register. In this example, the equation of FIG.
Set to write state and press up/down color/re32
2-Reset to QO.
そして、1エレメント毎の書込み信号422により、書
き込み数をカウントアツプさ−Iりると共に信号423
により、結果をVMR−’1に書込む。そして、全エレ
メント分の処理の終了をカウンタ303の値が1″t″
あるという信号424により検出し、書込み状態にある
という記録を311から、読出し状態にあるという記録
を321〜331から解除する。Then, the number of writes is counted up by the write signal 422 for each element, and the signal 423 is counted up.
writes the result to VMR-'1. Then, the value of the counter 303 is 1″t″ to indicate the end of processing for all elements.
It is detected by the signal 424 indicating that it is in the write state, and the record that it is in the write state is canceled from 311, and the record that it is in the read state is canceled from 321 to 331.
以上の動作は、第6図で説明しているベクトルマスクレ
ジスタ間演舞、によるVMRlの書き込み制御方式と同
じため、第6図でI/iVMI’?、2及びVMR3の
書込み側の制御回路は省略しである。The above operation is the same as the VMRl write control method using the vector mask register interaction explained in FIG. 6, so I/iVMI'? , 2 and the write side control circuits of VMR3 are omitted.
第1図の式(1)、式(2)が全エレメント処理される
のを待たず、式(1)と式(2)のベクトルマスク間演
算命令が起m11されると、1NiT と書かれた信号
207により、寸ず、VMRlの状態311が書き込み
状態にセットキれると共に、アップダウンカウンタ31
2が0にリセットされるのは、先に述べた式(1)の処
理と同様であるが、でらにVNR2及びVMR3の状態
か、読み出し状態にセットされる。従って本例で第1図
のプログラムの処理を行った場合、7MR2は読み出し
かつ書込み中の状態となり、信号401がオンで信号4
03がオフのため、書き込み済のエレメントのみについ
て読み出しの許可を与える制御を行う。Without waiting for all elements of equations (1) and (2) in Figure 1 to be processed, when the vector mask operation instruction of equations (1) and (2) is issued m11, 1NiT is written. The signal 207 instantly sets the state 311 of VMRl to the write state, and the up/down counter 31
2 is reset to 0 in the same way as the process of equation (1) described above, but it is also set to the state of VNR2 and VMR3 or to the read state. Therefore, in this example, when the program shown in FIG.
Since 03 is off, control is performed to permit reading of only written elements.
前述の式(1)の命令によシ1エレメントの書き込みが
ある度に、カウンタ322は+1されるから、その結果
を使うベクトルマスク間演算では、カウンタ322の値
が正である限り、読み出し許可信号404を発行し、カ
ウンタ322から−1する。The counter 322 is incremented by 1 each time one element is written by the instruction in equation (1) above, so in vector mask operations using the result, reading is permitted as long as the value of the counter 322 is positive. A signal 404 is issued and the counter 322 is decremented by 1.
例では、簡単の為に408により−1しているが、40
6により−1してもよい。In the example, -1 is added to 408 for simplicity, but 40
It may be -1 by 6.
この408により−1した場合は406により−1した
場合に比べ性能の劣化する場合があるが、この劣化は3
91〜394にある回路により回避できる。信号406
により−1する場合391〜394の回路は不要である
。以下では、簡単のたメ、ヘクトルレジスタ、ベクトル
マスクレジスタの読出し許可信号作成及び、演算許可信
号作成時の391〜394に相当する回路は図面中では
省略する。If the value is decreased by 1 due to 408, the performance may deteriorate compared to when the value is decreased by 1 due to 406, but this deterioration is 3
This can be avoided by using the circuits 91 to 394. signal 406
When the value is -1, the circuits 391 to 394 are unnecessary. In the following, for the sake of simplicity, the circuits corresponding to 391 to 394 at the time of generating the read permission signal of the hector register and vector mask register and the calculation permission signal are omitted in the drawings.
VMR2と同様にVMR3も、読み出し許可信号を作成
し、両者のAND条件をとった406が最終的な演算許
可信号となって読み出しアドレス302の値を進め、読
み出し用セレクタ326゜336を介して、ベクトルマ
スク専用演算器305にデータを送ると共に、書込み許
可信号としてカウンタ312の値に+1を行い、書込み
アドレス304の値を進める。ここで、演算器141を
ベクトルマスクレジスタ間演算専用とすることで、僅か
なコストの追加によシ、処理の高速化が可能となってい
る。第5図では、ベクトルレジスタ用演算器3個、ベク
トルマスク専用演算器1個の構成となっているが、ベク
トルマスク専用演算器は入力データ巾が、前者の32〜
64ビツト/エレメントに対し、後者は1ビツト/エレ
メントであり、コストもそれに順じて少なく出来る。Similar to VMR2, VMR3 also creates a read permission signal, and 406, which is an AND condition of both, becomes the final calculation permission signal, advances the value of read address 302, and passes through read selectors 326 and 336. At the same time as sending data to the vector mask dedicated arithmetic unit 305, +1 is added to the value of the counter 312 as a write permission signal, and the value of the write address 304 is advanced. Here, by using the arithmetic unit 141 exclusively for calculations between vector mask registers, it is possible to speed up the processing with a small addition of cost. In Fig. 5, the configuration is three vector register arithmetic units and one vector mask only arithmetic unit, but the input data width of the vector mask only arithmetic unit is 32 to
Compared to 64 bits/element, the latter uses 1 bit/element, and the cost can be reduced accordingly.
第6図の制御により、第7〜8の命令と第9の命令が同
期されることが判るが、第7図は、第11の命令と第1
2の命令の同期方法を示したものである。MR2とMR
3の読み出し制御回路は、第6図のベクトルマスクレジ
スタのV MR2とVMR3のそれと同様のものを採用
している為、ここでは説明を省く。VMRlの読み出し
制御回路と第6図の読出し制御回路との相違は、502
のフリップフロップを条件付き命令でないことを記録さ
せるよう、新たに設け、その場合、演算器等に送るベク
トルマスク値603を、信号602 ゛を介して常に
′°1”にしていることである。このフリップ70ツブ
により、条件付きベクトル演算命令以外にも、同じ演算
器505を使用できる。It can be seen that the control shown in FIG. 6 synchronizes the 7th to 8th commands and the 9th command, but in FIG.
This shows the method for synchronizing instructions in step 2. MR2 and MR
Since the readout control circuit No. 3 employs the same circuit as that of the vector mask registers VMR2 and VMR3 of FIG. 6, the explanation thereof will be omitted here. The difference between the read control circuit of VMRl and the read control circuit of FIG.
The flip-flop is newly provided to record that it is not a conditional instruction, and in that case, the vector mask value 603 sent to the arithmetic unit etc. is always set to '1' via the signal 602'. This flip 70 tube allows the same arithmetic unit 505 to be used for other than conditional vector arithmetic instructions.
また、第6図でVMR2とVMR3の読出し許可信号間
のANDをとった信号406に和尚して、第7図での演
算処理許可(本例では1エレメントの主記憶格納許可)
信号606i、j:、ベクトルマスクレジスタVMRI
の抗出し許可信号644と、ベクトルレジスタVR,1
の読出し許可信号634と、主記憶書込み制御回路10
21からの受付は許可信号601との間でANDをとっ
たもの七している。条件句き命令以外の主記憶書込み命
令の処理の場合は、信号207によりレジスタ502に
1を格納し、信号602と011.回路543により、
信号644を常に1に設定する。Furthermore, in addition to the signal 406 obtained by ANDing the read permission signals of VMR2 and VMR3 in FIG. 6, the arithmetic processing permission in FIG. 7 (in this example, one element main memory storage permission) is applied.
Signals 606i,j: Vector mask register VMRI
and the vector register VR,1.
read permission signal 634 and main memory write control circuit 10
The reception from 21 is an AND operation with the permission signal 601. In the case of processing a main memory write instruction other than a conditional instruction, 1 is stored in the register 502 by the signal 207, and the signals 602 and 011. By the circuit 543,
Signal 644 is always set to 1.
以上のようにして、第4図のタイムチャートに示したよ
うに従来は3N+3サイクルかかった処理を、本特許に
よりN+3サイクルで処理できる。As described above, as shown in the time chart of FIG. 4, the process that conventionally took 3N+3 cycles can be processed in N+3 cycles according to this patent.
この短縮された2Nサイクルの内訳は、ベクトルマスク
生成の比較演算命令と、ベクトルマスク間の論理積演算
命令との間での処理の非並列化による従来方式での損失
がNサイクル、論理積演算命令と、条件付きベクトル演
算処理(本例でに条件付き主記憶格納)命令との間での
処理の非並列化による従来方式での損失がNサイクルで
あり、両損失の改善には、第6図と第7図に示した2通
りの同期機構がそれぞれ寄与している。両改善とも、専
用のベクトルマスクレジスタと演算器を使用せずに、通
常のベクトルレジスタを拡張して使用しても可能である
が、専用化することにより、同じ性能を得る上で、コス
ト的に32〜64倍有利であることが明らかである。The breakdown of this shortened 2N cycles is that the conventional method loses N cycles due to non-parallel processing between the vector mask generation comparison operation instruction and the AND operation instruction between vector masks. The loss in the conventional method due to non-parallel processing between the instruction and the conditional vector operation processing (conditional main memory storage in this example) instruction is N cycles, and to improve both losses, the The two types of synchronization mechanisms shown in FIGS. 6 and 7 each contribute. Both improvements can be achieved by expanding the normal vector register without using a dedicated vector mask register and arithmetic unit, but by dedicating it, it is possible to obtain the same performance at a lower cost. It is clear that there is a 32- to 64-fold advantage in
第1図はマスク付きベクトル処理を含むFORTRAN
プログラム例。第2図は従来技術による第1図プログラ
ムの処理手順。第3図は、従来技術による図1の処理の
タイムチャート。第4図は本発明による図1の処理のタ
イムチャート。
第5図は、本発明による処理装置の一構成例を示す。第
6図は、ベクトルマスクレジスタ間の演算実行制御の一
実施例、第7図は条件付きベクトル主記憶格納処理実行
制御の一実施例を示す。121〜123はベクトルマス
ク専用レジスタ。
第 1 口
p万 Ill:l’ U=l、N
IF(
’ic CA(r−)、 E(L
、 B(r、)) X(+)友
、AND。
% (C(X)、 LT、 D(r
)) 入(Z)()
夙 E(1)二F<1)士(q(T) 氏(3
)1117 C力NTIJ/UE
′″fJ Z 図
1 3 図
第 4 図
(人1)0宍i丁 の ■ (リヒーーヒ
ー→□−−−−−+
(人2)の宇イ丁 ごpヤqと、−−−−イイ父h
茅 乙 図
第 7 霞Figure 1 shows FORTRAN including masked vector processing.
Program example. FIG. 2 shows the processing procedure of the program shown in FIG. 1 according to the prior art. FIG. 3 is a time chart of the process of FIG. 1 according to the prior art. FIG. 4 is a time chart of the processing of FIG. 1 according to the present invention. FIG. 5 shows an example of the configuration of a processing device according to the present invention. FIG. 6 shows an example of control of execution of operations between vector mask registers, and FIG. 7 shows an example of control of execution of conditional vector main memory storage processing. 121 to 123 are registers dedicated to vector masks. 1st mouth p million Ill:l' U=l, N IF('ic CA(r-), E(L
, B(r,)) X(+) friend
,AND. % (C(X), LT, D(r
)) Enter (Z) () 夙 E (1) 2 F < 1) 士 (q (T) Mr. (3
) 1117 C force NTIJ/UE ′″fJ Z Figure 1 3 Figure 4 (Person 1) 0 Shishii Ding ■ (Rehihihi→□−−−−−+ (Person 2) Ui Ding Gopyaq And----good father h
Kaya Otsu Illustration No. 7 Haze
Claims (1)
とも1つのベクトルマスク専用演算器と、該ベクトルマ
スク専用レジスタへの書込み処理に並行して、同一のベ
クトルマスク専用レジスタからの読出し処理を行うため
の同期の手段と、ベクトルマスク専用レジスタ間での演
算命令の処理にあたって、要求されるマスク情報間での
読み出し及び演算の同期手段と、マスク付きベクトル演
算命令の処理にあたって、要求づれるベクトルデータ及
びマスク情報の間での読出シ及び演算処理の同期手段と
を有する、マスク付きベクトル演算処理装置。 2、該ベクトルマスク専用レジスタのうち、同一のもの
に対する書込み処理と読出し処理の間での該同期手段は
、書込み命令に後読する、読出し命令の処理における、
ベクトルエレメント毎の同期をとる手段を有する第1項
の装置。 3、該マスク付きベクトル演算命令において、該ベクト
ルデータの保持及び読出しに、ベクトルレジスタを有す
る第1項の装置。 4、該マスク付きベクトル演算命令において、ベクトル
レジスタ中のデータに対し、マスク付きの主記憶格納内
の手段を有する第3項の装置。 5、該マスク付きベクトル演算命令以外の演算命令の解
読結果として選択する演算器として、マスク付き演算命
令に用いる演算器を流用する手段を、ベクトルデータと
ベクトルマスクデータとの該同期手段と、ベクトルマス
クデータの読出し手段の一部として有する第1項の装置
。1. Two or more vector mask exclusive registers, at least one vector mask exclusive arithmetic unit, and a system for performing read processing from the same vector mask exclusive register in parallel with write processing to the vector mask exclusive register. Means for synchronization, synchronization means for reading and computation between required mask information when processing arithmetic instructions between registers dedicated to vector masks, and vector data and masks required when processing vector arithmetic instructions with masks. A masked vector arithmetic processing device having means for reading out information and synchronizing arithmetic processing. 2. The synchronization means between write processing and read processing for the same vector mask dedicated register is performed in the processing of a read command that reads after a write command.
1. The device according to item 1, having means for synchronizing each vector element. 3. The device according to item 1, which includes a vector register for holding and reading the vector data in the masked vector operation instruction. 4. The device according to claim 3, further comprising means for storing data in a vector register in a main memory with a mask in the masked vector operation instruction. 5. The means for reusing the arithmetic unit used for the masked arithmetic instruction as the arithmetic unit selected as the decoding result of the arithmetic instruction other than the masked vector arithmetic instruction, the means for synchronizing vector data and vector mask data, and the vector 1. The device according to item 1, which is included as part of the mask data reading means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57168358A JPH0616287B2 (en) | 1982-09-29 | 1982-09-29 | Vector arithmetic processor with mask |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57168358A JPH0616287B2 (en) | 1982-09-29 | 1982-09-29 | Vector arithmetic processor with mask |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS5958580A true JPS5958580A (en) | 1984-04-04 |
| JPH0616287B2 JPH0616287B2 (en) | 1994-03-02 |
Family
ID=15866591
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP57168358A Expired - Lifetime JPH0616287B2 (en) | 1982-09-29 | 1982-09-29 | Vector arithmetic processor with mask |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0616287B2 (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6327975A (en) * | 1986-07-22 | 1988-02-05 | Hitachi Ltd | Vector calculation control method |
| US4761754A (en) * | 1983-09-09 | 1988-08-02 | Nec Corporation | Vector processor wherein outputs of vector registers are fixedly coupled to inputs of vector calculators |
| JPH04116770A (en) * | 1990-09-07 | 1992-04-17 | Koufu Nippon Denki Kk | Vector data processor |
| WO2000036527A1 (en) * | 1998-12-16 | 2000-06-22 | Matsushita Electric Industrial Co., Ltd. | Conditional vector operation method and device thereof |
| JP2017027149A (en) * | 2015-07-16 | 2017-02-02 | ルネサスエレクトロニクス株式会社 | Semiconductor device |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5723174A (en) * | 1980-07-17 | 1982-02-06 | Fujitsu Ltd | Arithmetic system using mask register |
-
1982
- 1982-09-29 JP JP57168358A patent/JPH0616287B2/en not_active Expired - Lifetime
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5723174A (en) * | 1980-07-17 | 1982-02-06 | Fujitsu Ltd | Arithmetic system using mask register |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4761754A (en) * | 1983-09-09 | 1988-08-02 | Nec Corporation | Vector processor wherein outputs of vector registers are fixedly coupled to inputs of vector calculators |
| JPS6327975A (en) * | 1986-07-22 | 1988-02-05 | Hitachi Ltd | Vector calculation control method |
| JPH04116770A (en) * | 1990-09-07 | 1992-04-17 | Koufu Nippon Denki Kk | Vector data processor |
| WO2000036527A1 (en) * | 1998-12-16 | 2000-06-22 | Matsushita Electric Industrial Co., Ltd. | Conditional vector operation method and device thereof |
| US7062633B1 (en) | 1998-12-16 | 2006-06-13 | Matsushita Electric Industrial Co., Ltd. | Conditional vector arithmetic method and conditional vector arithmetic unit |
| JP2017027149A (en) * | 2015-07-16 | 2017-02-02 | ルネサスエレクトロニクス株式会社 | Semiconductor device |
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0616287B2 (en) | 1994-03-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPS62214464A (en) | Coprocessor coupling system | |
| JPH0546593B2 (en) | ||
| US3943494A (en) | Distributed execution processor | |
| JPH0731669B2 (en) | Vector processor | |
| JPS5975365A (en) | Vector processing device | |
| JPS61107431A (en) | Arithmetic unit | |
| JPS5890251A (en) | Parity inspector | |
| JPH07104784B2 (en) | Digital data processor | |
| EP0497485A2 (en) | Computer for implementing two-operand instructions | |
| JPS60136870A (en) | vector processing device | |
| US4924377A (en) | Pipelined instruction processor capable of reading dependent operands in parallel | |
| JPS58182758A (en) | Arithmetic controller | |
| JPH0380324A (en) | central processing unit | |
| JPH0616287B2 (en) | Vector arithmetic processor with mask | |
| RU2198422C2 (en) | Asynchronous synergistic computer system | |
| JPH0640337B2 (en) | Pipeline arithmetic unit | |
| JP3771682B2 (en) | Vector processing equipment | |
| JPS63136168A (en) | Vector computer | |
| JPS6049438A (en) | Memory device | |
| JPH0926945A (en) | Information processing device | |
| JP2667810B2 (en) | Vector processing equipment | |
| JPS62226275A (en) | Vector processor | |
| JPH03189868A (en) | Data processor | |
| JPH0519736B2 (en) | ||
| JPS6395540A (en) | Memory interface circuit |