JPS6146562A - Operation processing system of array element - Google Patents

Operation processing system of array element

Info

Publication number
JPS6146562A
JPS6146562A JP16895784A JP16895784A JPS6146562A JP S6146562 A JPS6146562 A JP S6146562A JP 16895784 A JP16895784 A JP 16895784A JP 16895784 A JP16895784 A JP 16895784A JP S6146562 A JPS6146562 A JP S6146562A
Authority
JP
Japan
Prior art keywords
register
array
data
contents
element number
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
JP16895784A
Other languages
Japanese (ja)
Inventor
Toshiyuki Uda
右田 俊幸
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 Corp
Original Assignee
NEC Corp
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 Corp filed Critical NEC Corp
Priority to JP16895784A priority Critical patent/JPS6146562A/en
Publication of JPS6146562A publication Critical patent/JPS6146562A/en
Pending 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)
  • Complex Calculations (AREA)

Abstract

PURPOSE:To perform the operation processing of array data flexibly in a high speed by not only performing the operation of array elements but also obtaining the element number of an element corresponding to a specific value in array data of the operation result by one instruction. CONSTITUTION:The first and the second array element data to be subjected to vector operation are stored in vector operation data registers 3A and 3B, and their contents are operated, and the operation result is stored in a vector operation result register 5. If the operation result of the i-th element is set to the register 5 and contents of the register 5 coincide with those of a coincidence detecting register 6, contents of an element number counter 10 are transferred to an element number register 12 through an element number holding register 11. A coincidence detection mode flag 7 is set to ''0'', and contents of the flag 7 and the register 12 are checked to obtain the element number of the element corresponding to a specific value in the third array data also. Thus, the number of steps of a program is reduced, and the operation processing of array data is performed flexibly in a high speed.

Description

【発明の詳細な説明】 技術分野 本発明は配列要素の演算処理方式に関し、特に情報処理
装置で扱う配列データに対する配列要素内の特定値を有
する要素の要素の要素番号を求める演算処理方式に関す
る。
TECHNICAL FIELD The present invention relates to an arithmetic processing method for array elements, and more particularly to an arithmetic processing method for obtaining the element number of an element having a specific value in an array element for array data handled by an information processing device.

従来技術 従来、科学技術計算においては、配列データを扱う場合
が非常に多く、この配列データに対する・演算はしばし
ば各々の配列要素に対する同−演算の繰り返しとなる。
BACKGROUND ART Conventionally, in scientific and technical calculations, array data is often handled, and operations on this array data often involve repeating the same operations on each array element.

かかる配列データを高速に扱うための専門の命令である
いわゆるベクトル命令が従来の情報処理装置に使用され
ている。
So-called vector instructions, which are specialized instructions for handling such array data at high speed, are used in conventional information processing devices.

配列データに対する演算結果は、そのまままとめて別の
配列データとして用いられることが多いが、演算結果の
特定の値に対応する配列要素に対しては、特別演算処理
を施す必要が生じる場合がある。かかる場合、従来にあ
っては、この演算結果を一旦通常のベクトル命令ですべ
て主記憶部に格納した後、別の命令シーケンスによって
主記憶装置上の当該配列データをあらためて読出して特
定値に対応する配列要素をチェックするという手順をと
っている。よって、高速処理が困難となる欠点を有して
いる。
Although the results of operations on array data are often used as is as separate array data, there are cases where it is necessary to perform special operation processing on array elements that correspond to specific values of the results of operations. In such a case, conventionally, all the results of this operation are once stored in the main memory using a normal vector instruction, and then the array data in the main memory is read out again using another instruction sequence to correspond to a specific value. The procedure is to check the array elements. Therefore, it has the disadvantage that high-speed processing is difficult.

発明の目的 本発明は上記欠点を解決すべくなされたもので、1命令
により配列要素の演算のみならず、この演算結果として
得られる配列データ内の特定値に対応する要素の要素番
号をも求めるようにし、高速で融通性のある配列データ
の演算処理方式を提供することを目的としている。
Purpose of the Invention The present invention has been made to solve the above-mentioned drawbacks, and uses one instruction to not only calculate array elements, but also calculate the element number of the element corresponding to a specific value in the array data obtained as a result of this calculation. The purpose of the present invention is to provide a high-speed and flexible method for processing array data.

発明の構成 本発明による演算処理方式は、各々の要素に対して要素
番号が付与された第1及び第2の配列要素の演算をなし
この演算結果を各要素に対して要素番号が付与された第
3の配列要素に格納する如きベクトル演算において、前
記演算結果である第3の配列要素内の特定値を有する要
素の要素番号により予め前記特定値が格納可能な特定値
レジスタと、命令により指定される第1及び第2の配列
要素の演算をなず演算手段と、この演算結果により得ら
れる第3の配列に格納されるべきi番目(1は正の整数
)の要素の内容と前記特定値レジスタの内容とを比較し
一致が検出されたときに前記i番目の要素番号を記憶す
る記憶手段とを備え、前記記憶手段の記憶内容により前
記第3の配列要素内の特定値を有する要素の要素番号を
求めるようにしてなることを特徴としている。
Composition of the Invention The arithmetic processing method according to the present invention performs arithmetic operations on first and second array elements in which each element is assigned an element number, and the result of this operation is converted into an element number in which each element is assigned an element number. In a vector operation such as storing in a third array element, a specific value register that can store the specific value in advance according to the element number of the element having a specific value in the third array element that is the result of the operation, and a specific value register specified by an instruction. A calculation means is used to perform calculations on the first and second array elements, and the content of the i-th element (1 is a positive integer) to be stored in the third array obtained from the calculation result and the specified storage means for storing the i-th element number when a match is detected by comparing the contents with the contents of a value register, and an element having a specific value in the third array element according to the storage contents of the storage means. The feature is that the element number of is calculated.

実  施  例 以下に図面を用いて本発明の詳細な説明する。Example The present invention will be described in detail below using the drawings.

第1図は本発明の実施例のブロック図であり、主記憶装
置1、制御ユニット2、ベクトル演算データレジスタ3
Aおよび381ベモ 4、ベクトル演算結果レジスタ5、一致データレジスタ
6、一致検出モードフラグ7、比較回路8、AND (
論理積)回路9、要素番号カウンタ10゜要素番号保持
レジスタ11、要素番号レジスタ12から構成されてい
る。
FIG. 1 is a block diagram of an embodiment of the present invention, in which a main storage device 1, a control unit 2, a vector operation data register 3
A and 381 bemo 4, vector operation result register 5, coincidence data register 6, coincidence detection mode flag 7, comparison circuit 8, AND (
It is composed of an AND) circuit 9, an element number counter 10, an element number holding register 11, and an element number register 12.

主記憶装置1にはプログラム及びデータが格納されてお
り、信号線101を介してその内容が読み出されるとと
もに、信号線102を介してデータが書き込まれる。制
御ユニット2は、主記憶装置1とのデータのやりとり、
読み出した命令語の解読及びそれに従った、ベクトル命
令実行を含む各種命令の実行を行うための各回路の動作
を制御する。
Programs and data are stored in the main memory device 1, and the contents are read out via a signal line 101, and data is written in via a signal line 102. The control unit 2 exchanges data with the main storage device 1,
It controls the operation of each circuit for decoding the read instruction word and executing various instructions including vector instruction accordingly.

ベクトル演算データレジスタ3A及び3Bはベクトル演
算の入力となる第1及び第2の配列要素のデータを格納
するレジスタであり、そのデータは前記制御ユニット2
から信号線103,104を介して設定される。ベクト
ル演算回路4は前記ベクトル演算データレジスタ3A、
3Bの内容を信号1105.1.Q6を介して受は取り
、制御ユニット2から信号線107を介して送られる制
御信号の指示に従って定められたベクトル演算を実行し
、その演算結果は信号線108を介して、ベクトル演算
結果レジスタ5に格納される。このベクトル演算結果レ
ジスタ5の内容は信号線109を介して制御ユニット2
へ送られ、最終的には上記憶装置1上に、第3の配列要
素のデータとして書き込まれる。
The vector operation data registers 3A and 3B are registers that store data of the first and second array elements that are input to the vector operation, and the data is stored in the control unit 2.
is set via signal lines 103 and 104. The vector calculation circuit 4 includes the vector calculation data register 3A,
3B to signal 1105.1. The signal is received via Q6, and a predetermined vector operation is executed according to the instructions of the control signal sent from the control unit 2 via the signal line 107, and the operation result is sent via the signal line 108 to the vector operation result register 5. is stored in The contents of this vector operation result register 5 are transmitted to the control unit 2 via a signal line 109.
and finally written to the upper storage device 1 as data of the third array element.

一致データレジスタ6はベクトル命令以外の他の命令で
あらかじめ適当なデータを設定出来るレジスタであり、
設定すべきデ5−夕は信号線110を介して得られる。
The match data register 6 is a register that can be used to set appropriate data in advance using instructions other than vector instructions.
The data to be set is obtained via the signal line 110.

一致検出モードフラグ7は制御ユニット2からの信号線
111によりヒツトあるいはリセット可能なフリップフ
ロップであり、命令によりあらかじめ設定可能である。
The coincidence detection mode flag 7 is a flip-flop that can be hit or reset by a signal line 111 from the control unit 2, and can be set in advance by a command.

比較回路8はベクトル演算結果レジスタ5及び一致デー
タレジスタ6の内容を信号線112及び113を介して
受けとり、その比較結果、両データが一致している場合
に限って信号線114をrIJとづるような回路である
。信号線114及び一致検出モードフラグ7の出力信号
線115の値はAND回路9により論理積がとられる。
Comparison circuit 8 receives the contents of vector operation result register 5 and match data register 6 via signal lines 112 and 113, and sets signal line 114 to be rIJ only when both data match as a result of the comparison. It is a circuit. The values of the signal line 114 and the output signal line 115 of the coincidence detection mode flag 7 are ANDed by the AND circuit 9.

AND回路9の出力は信号線116を介して一致検出モ
ートフラグ7にリセットに用いられるとともに、信号線
117を介して要素番号保持レジスタ11の更新指示も
行う。
The output of the AND circuit 9 is used to reset the match detection mote flag 7 via a signal line 116, and also issues an update instruction to the element number holding register 11 via a signal line 117.

要素番号カウンタ10はベクトル演算開始時に制御ユニ
ット2からの信号線118を介してた指示によりrOJ
にクリアされ、以後−要素の演算が実行される毎に「1
Jずつカウントアツプされる。要素番号レジスタ12は
制御ユニット2からの信号線119を介した更新指示が
あると、要素番号保持レジスタ11の内容を信号線12
0を介して受は取り格納する。なお、一致検出モードフ
ラグ7及び要素番号レジスタ12の内容は信号線121
.122を介して制御ユニット2へ転送され、他の命令
により使用したり、主記憶装置2へ書き込んだりするこ
とが可能になっている。
The element number counter 10 receives an instruction from the control unit 2 via the signal line 118 at the start of vector calculation.
It is cleared to ``1'' every time the − element operation is executed.
Counts up by J. When the element number register 12 receives an update instruction via the signal line 119 from the control unit 2, the contents of the element number holding register 11 are transferred to the signal line 12.
The receiver is taken and stored through 0. Note that the contents of the match detection mode flag 7 and the element number register 12 are determined by the signal line 121.
.. 122 to the control unit 2, and can be used by other instructions or written to the main memory 2.

配列データの要素の演算結果として得られる新たな配列
データ内の、特定の値を有する要素の要素番号を求める
ための処理動作は第2図のフローチャートに示され、以
下の順序で行なわれる。
The processing operation for determining the element number of an element having a specific value in the new array data obtained as a result of the operation of the elements of the array data is shown in the flowchart of FIG. 2, and is performed in the following order.

主記憶装置1から読み出された実行すべき命令の命令語
は制御ユニット2において解読され、その結果必要なデ
ータの読み込み要求や演算の種類の指定などの各種制御
信号が発生される。いま、実行すべき命令が配列データ
の演算を行なうためのベクトル命令であり、このベクト
ル命令開始時点ですでにプログラムにより一致検出モー
ドフラグ7が「1」にセットされており、また一致デー
タレジスタ6には検出すべき特定の値が設定されている
とする。
The instruction word of the instruction to be executed read from the main memory device 1 is decoded by the control unit 2, and as a result, various control signals such as a request to read necessary data and designation of the type of operation are generated. The instruction to be executed now is a vector instruction for performing an operation on array data, and at the start of this vector instruction, the match detection mode flag 7 has already been set to "1" by the program, and the match data register 6 has already been set to "1". Assume that a specific value to be detected is set in .

実行されるベクトル命令の命令語は4ワード(−144
ピツ]〜)の長さを持ち、第3図に示すような形式を持
っている。第3図においτOPはオペレーションコード
フィールドで、第1の配列要素ど第2の配列要素とを用
いで実行すべき、演算の種類を指定している。ylは第
1の配列要素の先頭アドレスを指定するためのアドレス
フィールドであり、MFIによって指定されたアドレス
修飾がylの値に対して施され、その結果の値が要素先
頭アドレスを表わしている。■2とMF2及びy3とM
F3は同様に第2及び第3の配列要素の先頭アドレスを
決定する。VI+ 、VI2及びVT3は、第1.第2
及び第3の各配列について、となり合う要素同士のアド
レスの差すなわち要素間距離を指定し、RNは要素数(
−n )が格納されているレジスタを指定している。
The instruction word of the vector instruction to be executed is 4 words (-144
It has a length of ~) and has a format as shown in Figure 3. In FIG. 3, τOP is an operation code field that specifies the type of operation to be performed using the first array element or the second array element. yl is an address field for specifying the start address of the first array element, address modification specified by the MFI is applied to the value of yl, and the resulting value represents the element start address. ■2 and MF2 and y3 and M
F3 similarly determines the start addresses of the second and third array elements. VI+, VI2 and VT3 are the first. Second
and the third array, specify the difference in addresses between adjacent elements, that is, the distance between elements, and RN is the number of elements (
-n) specifies the register in which it is stored.

制御ユニット2によりこの命令が解読されて、ベクトル
演算データレジスタ3A、3Bに第1゜第2の配列の先
頭要素がセットされると、ベクトル演粋回路4が信号線
107の内容に従った演算を実行し、その結果、第3の
配列の先頭要素として主記憶装置1に格納されるべきデ
ータが、ベクトル演算結果レジスタ5に得られる。要素
番号はrOJから始まっているため、先頭要素の演算結
果がレジスタ5にセットされた時に要素番号カウンタ1
0はrOJにクリアされ、以後数の要素の演算結果がレ
ジスタ5にセットされる毎に「1」ずつカウントアツプ
される。
When this command is decoded by the control unit 2 and the leading elements of the first and second arrays are set in the vector operation data registers 3A and 3B, the vector arithmetic circuit 4 performs an operation according to the contents of the signal line 107. As a result, data to be stored in the main storage device 1 as the first element of the third array is obtained in the vector operation result register 5. Since the element number starts from rOJ, when the operation result of the first element is set in register 5, the element number counter 1
0 is cleared in rOJ, and thereafter each time the result of operation of a number of elements is set in the register 5, it is counted up by "1".

いま、i番目の要素の演算結果としてレジスタ5にセラ
1−された内容が一致しジスタロの内容と一致したとす
ると、AND回路9の出力は「1J゛となり、このとき
要素番号カウンタ10の内容すなわちri−IJが要素
番号保持レジスタ11に転送されるとともに、一致検出
モードフラグ7はrOJにリセットされる。(+4−1
)番目以降の要素の演算結果はレジスタ6の内容との比
較はされることなく、n番目の要素の演算が終了した時
点では要素番号保持レジスタ11の内容は、最初に一致
を検出したところの要素に対応づる要素番号ri−IJ
を保持している。全要素n個の演算が終了したことによ
り、制御ユニット2からの信号線119の内容が[1]
となり、レジスタ11の内容は要素番号レジスタ12へ
転送され、ベクトル命令が終了する。ソフトウェアプロ
グラムはこのベクトル命令の結果骨られる一致モード検
出フラグ7及び要素番号レジスタ12の内容を調べるこ
とにより、第3の配列データ内に所望の特定データが検
出されたかどうか、また一致を検出した場合の要素の要
素番号を知ることが出来る。
Now, suppose that the content stored in the register 5 as a result of the operation of the i-th element matches the content of the register 5, and the output of the AND circuit 9 becomes "1J", and at this time, the content of the element number counter 10 That is, ri-IJ is transferred to the element number holding register 11, and the match detection mode flag 7 is reset to rOJ. (+4-1
)-th and subsequent elements are not compared with the contents of register 6, and when the operation of the n-th element is completed, the contents of element number holding register 11 are the same as the one where a match was first detected. Element number ri-IJ corresponding to the element
is held. After the calculations for all n elements are completed, the content of the signal line 119 from the control unit 2 becomes [1]
Then, the contents of register 11 are transferred to element number register 12, and the vector instruction is completed. By checking the contents of the match mode detection flag 7 and the element number register 12, which are determined as a result of this vector instruction, the software program determines whether or not the desired specific data is detected in the third array data, and if a match is detected. You can know the element number of the element.

発明の効果 本発明には以上説明したように、配列要素の演算結果前
られる新たな配列要素の中の特定の硫を持つ要素の要素
番号を、演算を実行するベクトル命令中で同時に求める
ことが出来るためプログラムのステップ数を減らすこと
が可能となり、従って処理が高速に行えるという効果が
ある。
Effects of the Invention As explained above, the present invention has the ability to simultaneously obtain the element number of an element having a specific value in a new array element that is the result of an operation on an array element in a vector instruction that executes the operation. This makes it possible to reduce the number of steps in a program, which has the effect of speeding up processing.

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

第1図は本発明の一実施例を示す情報処理装置のブロッ
ク図、第2図は第1図の装置で実行されるベクトル命令
の動作を示すフローチャート、第3図は第2図に示され
た動作を指示するための命令語の形式を表わす図である
。 主要部分の符号の説明 1・・・・・・主記憶装置 2・・・・・・制御ユニット 3・・・ベクトル演算データレジスタ 4・・・・・・ベクトル演算回路 5・・・・・・ベクトル演算結果レジスタ6・・・・・
・一致レジスタ フ・・・・・・一致検出モードフラグ 8・・・・・・比較回路
FIG. 1 is a block diagram of an information processing device showing an embodiment of the present invention, FIG. 2 is a flowchart showing the operation of a vector instruction executed in the device of FIG. 1, and FIG. FIG. 3 is a diagram showing the format of a command word for instructing a specific operation. Explanation of symbols of main parts 1...Main storage device 2...Control unit 3...Vector calculation data register 4...Vector calculation circuit 5... Vector operation result register 6...
・Coincidence register f...Coincidence detection mode flag 8...Comparison circuit

Claims (1)

【特許請求の範囲】[Claims] 各々の要素に対して要素番号が付与された第1及び第2
の配列要素の演算をなしこの演算結果を各要素に対して
要素番号が付与された第3の配列要素に格納する如きベ
クトル演算において、前記演算結果である第3の配列要
素内の特定値を有する要素の要素番号を求める配列要素
の演算処理方式であって、命令により予め前記特定値が
格納可能な特定値レジスタと、命令により指定される第
1及び第2の配列要素の演算をなす演算手段と、この演
算結果により得られる第3の配列に格納されるべきi番
目(iは正の整数)の要素の内容と前記特定値レジスタ
の内容とを比較し一致が検出されたときに前記i番目の
要素番号を記憶する記憶手段とを備え、前記記憶手段の
記憶内容により前記第3の配列要素内の特定値を有する
要素の要素番号を求めるようにしてなることを特徴とす
る演算処理方式。
The first and second elements have element numbers assigned to each element.
In a vector operation in which an operation is performed on array elements and the result of this operation is stored in a third array element in which an element number is assigned to each element, a specific value in the third array element that is the result of the operation is An array element arithmetic processing method that calculates the element number of an element having a specific value register that can store the specific value in advance according to an instruction, and an operation that performs an operation on the first and second array elements specified by the instruction. and the contents of the i-th element (i is a positive integer) to be stored in the third array obtained by the operation result and the contents of the specific value register are compared, and when a match is detected, the a storage means for storing an i-th element number, and an arithmetic processing characterized in that the element number of an element having a specific value in the third array element is determined based on the storage contents of the storage means. method.
JP16895784A 1984-08-13 1984-08-13 Operation processing system of array element Pending JPS6146562A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16895784A JPS6146562A (en) 1984-08-13 1984-08-13 Operation processing system of array element

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16895784A JPS6146562A (en) 1984-08-13 1984-08-13 Operation processing system of array element

Publications (1)

Publication Number Publication Date
JPS6146562A true JPS6146562A (en) 1986-03-06

Family

ID=15877687

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16895784A Pending JPS6146562A (en) 1984-08-13 1984-08-13 Operation processing system of array element

Country Status (1)

Country Link
JP (1) JPS6146562A (en)

Similar Documents

Publication Publication Date Title
US4476525A (en) Pipeline-controlled data processing system capable of performing a plurality of instructions simultaneously
EP0044562B1 (en) Vector data processor
EP0155211A2 (en) System for by-pass control in pipeline operation of computer
JPS6051948A (en) Branch destination buffer storage device
JPH03108042A (en) Multiple virtual space address system and computer system
JPS5826584B2 (en) data processing equipment
JPH11110214A (en) Command control system and method for the same
JPS6146562A (en) Operation processing system of array element
JPS6240736B2 (en)
JPH0377137A (en) Information processor
JPS5810243A (en) Data processor
JPS60108973A (en) Method for finding the minimum value of array elements and element number of the minimum element
JP3067161B2 (en) Fuzzy arithmetic processing unit
JP2895892B2 (en) Data processing device
JPS5856153A (en) Subroutine return system
JPH0248733A (en) Information processor
JPS6032208B2 (en) Instruction sequence control device
JP2576589B2 (en) Virtual storage access control method
JPS5960647A (en) System for controlling memory access
JPS62286134A (en) Tracer system
JPS62266627A (en) Stopping device for instruction under execution
JPH0419575B2 (en)
JPS60196847A (en) Microprogram control system
JPH0564373B2 (en)
JPH04245333A (en) Information processor