JPS5853387B2 - Vector instruction processing method - Google Patents
Vector instruction processing methodInfo
- Publication number
- JPS5853387B2 JPS5853387B2 JP239677A JP239677A JPS5853387B2 JP S5853387 B2 JPS5853387 B2 JP S5853387B2 JP 239677 A JP239677 A JP 239677A JP 239677 A JP239677 A JP 239677A JP S5853387 B2 JPS5853387 B2 JP S5853387B2
- Authority
- JP
- Japan
- Prior art keywords
- vector
- operand
- data
- register
- address
- 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
Links
Landscapes
- Complex Calculations (AREA)
Description
【発明の詳細な説明】 (1)発明の利用分野 本発明は、ベクトル命令処理方式に関するものである。[Detailed description of the invention] (1) Field of application of the invention The present invention relates to a vector instruction processing method.
特に命令語を処理するデータ処理装置において、データ
の配列ベクトルをオペランドとして用いるベクトル命令
の処理方式の改良に関するものである。In particular, the present invention relates to an improvement in a vector instruction processing method that uses a data array vector as an operand in a data processing device that processes instruction words.
(2)従来技術
従来のベクトル命令は、A (I)= B (I)+
C(I)など配列ベクトルA(I) 、 B(I) 、
C(I)が記憶装置上にとられていた。(2) Prior art The conventional vector instruction is A (I) = B (I) +
Array vectors such as C(I), A(I), B(I),
C(I) was stored on the storage device.
このためA (I)−I + C(I)などのように値
を直接オペランドとして用いる配列ベクトルの処理がで
きなかった。For this reason, it was not possible to process array vectors that use values directly as operands, such as A (I) - I + C (I).
(3)発明の目的
本発明はベクトル命令の処理において、値を直接オペラ
ンドとして使用する配列ベクトルの処理を可能にするこ
とを目的とする。(3) Object of the Invention The object of the present invention is to enable processing of array vectors that use values directly as operands in vector instruction processing.
(4)発明の詳細説明
られるフラグよりベクトル命令のオペランドが直接値を
生成するかどうかを判定する装置と、そのオペランドの
値を直接生成する装置とを持つ。(4) A device for determining whether an operand of a vector instruction directly generates a value based on a flag described in detail of the invention, and a device for directly generating the value of the operand.
(5)実施例 以下、本発明を実施例を参照して詳細に説明する。(5) Examples Hereinafter, the present invention will be explained in detail with reference to Examples.
第1図は本発明によるベクトル演算処理装置の構成を示
す。FIG. 1 shows the configuration of a vector arithmetic processing device according to the present invention.
1は命令制御ユニット、2は演算ユニット、3は記憶制
御ユニット、4は主記憶装置、5はベクトル命令制御ユ
ニット、6は保守制御ユニットである。1 is an instruction control unit, 2 is an arithmetic unit, 3 is a storage control unit, 4 is a main memory, 5 is a vector instruction control unit, and 6 is a maintenance control unit.
いまベクトル命令以外の通常の命令語の処理の流れを簡
単に述べる。We will now briefly describe the processing flow for ordinary commands other than vector commands.
命令語は主記憶装置4に格納されているが、命令制御ユ
ニット1により記憶制御ユニット3を経由して命令語が
命令制御ユニット1に取り込まれる。The instruction words are stored in the main memory 4, and are taken into the instruction control unit 1 via the storage control unit 3.
この後命令語は命令制御ユニット1によって命令語の解
読、オペランドアドレスの計算が行なわれ、オペランド
の読み出しと命令の演算が演算ユニット2によって実行
される。Thereafter, the instruction control unit 1 decodes the instruction word and calculates the operand address, and the arithmetic unit 2 reads the operand and executes the operation of the instruction.
オペランドの読み出しは記憶制御ユニット3を経由して
行なわれる。Reading of the operands takes place via the storage control unit 3.
ベクトル命令の場合も通常の命令語の処理と同じく命令
制御ユニット1によって命令語の取り込み、命令語の解
読が行なわれる。In the case of a vector instruction, the instruction control unit 1 takes in the instruction word and decodes the instruction word in the same way as normal instruction word processing.
第2図に本実施例におけるベクトル命令の形式を示す。FIG. 2 shows the format of the vector instruction in this embodiment.
命令コード102はベクトル命令の場合も通常の命令語
と同様にある命令コード(本実施例では’B4’)が与
えられる。When the instruction code 102 is a vector instruction, a certain instruction code ('B4' in this embodiment) is given as in the case of a normal instruction word.
ベクトル指令指定の汎用レジズタ番号B2は汎用レジス
タの番号を示しているがこの汎用レジスタの内容のベク
トル指令部分110とD2で示されるベクトル指令デー
タ106が、加算器112で加算されてベクトル指令コ
ード111となる。The general-purpose register number B2 for specifying a vector command indicates the number of a general-purpose register. The vector command part 110 of the contents of this general-purpose register and the vector command data 106 indicated by D2 are added by an adder 112 to obtain a vector command code 111. becomes.
このベクトル指令コード111はベクトル演算の種類コ
ード(加算、減算、乗算、除算、内積演算など)を示す
。This vector command code 111 indicates the type code of vector operation (addition, subtraction, multiplication, division, inner product operation, etc.).
アドレスベクトル指令汎用レジスタ番号R3は汎用レジ
スタ番号を示しているが、この汎用レジスタの内容のア
ドレスベクトルのアドレス109によってアドレスベク
トル114のアドレスが指示される。The address vector command general register number R3 indicates a general register number, and the address of the address vector 114 is specified by the address 109 of the address vector of the contents of this general register.
アドレスベクトル114は本実施例では3つのオペラン
ドベクトル・テーブルアドレスから構成される。Address vector 114 is comprised of three operand vector table addresses in this embodiment.
3つとは第1オペランド用、第2オペランド用、第3オ
ペランド用のベクトルテーブルアドレスである。The three are vector table addresses for the first operand, the second operand, and the third operand.
第2図の例では、第2オペランドについて図示している
が、第1オペランド、第3オペランドの場合も同様であ
る。In the example of FIG. 2, the second operand is illustrated, but the same applies to the first and third operands.
第2オペランドベクトルテーブルアドレス116に示さ
れたアドレスによって第2オペランドベクトルテーブル
118が指示される。The address indicated in second operand vector table address 116 points to second operand vector table 118 .
第2オペランドベクトルチーフル118は第2オペラン
ドベクトルアドレス119とアドレスインクリメント値
120とプラグ121から構成される。The second operand vector full 118 is composed of a second operand vector address 119, an address increment value 120, and a plug 121.
今、A(I) = B (I )+ C(I)の場合を
例にとって考えると、A(I) 、 B(I) j C
(I)がそれぞれ第1、第2、第3オペランドに対応す
る。Now, taking the case of A(I) = B(I)+C(I) as an example, A(I), B(I) j C
(I) correspond to the first, second, and third operands, respectively.
第2オペランドベクトルアドレス119は、配列ベクタ
B(I)のオペランドの先頭アドレス(すなわちB (
I)のアドレス)を示している。The second operand vector address 119 is the start address of the operand of array vector B(I) (i.e., B (
I) address).
アドレスインクリメント値120は第2オペランドB
(I)の使用ピッチを示す。Address increment value 120 is second operand B
(I) shows the pitch used.
フラグ121は本発明の重要な部分である。Flag 121 is an important part of the invention.
本実施例では、このフラグ121は8ビツトがら構成さ
れていて、そのうちの1ビツトが値をオペランドとして
直接用いるかどうかを指示する。In this embodiment, this flag 121 consists of 8 bits, one of which indicates whether the value is directly used as an operand.
A(I)= I +C(I)の演算の場合はこのビット
を/1/にしておくことによって■という値がオペラン
ドとして直接用いられる。In the case of the operation A(I)=I+C(I), by setting this bit to /1/, the value ■ can be directly used as an operand.
このとき、オペランドベクトルテーブル118のオペラ
ンドベクトルアドレスフィールド119には直接生成す
べきオペランドの初期値が記憶され、アドレスインクリ
メント値フィールド120には、直接生成すべきオペラ
ンドの相隣り合う要素の差(増分値)が記憶される。At this time, the operand vector address field 119 of the operand vector table 118 stores the initial value of the operand to be directly generated, and the address increment value field 120 stores the difference (increment value) between adjacent elements of the operand to be directly generated. ) is memorized.
たとえば、A(I)= I +C(I+という演算に用
いる“I”′というオペランドをI=1.2.3・・・
・・・・・・と変化して生成するとき、フィールド11
9120にはともに1がセットされる。For example, the operand "I" used in the operation A(I) = I + C (I+ is I = 1.2.3...
When generating by changing..., field 11
9120 are both set to 1.
第3図に本発明の重要な装置であるベクトル命令制御ユ
ニット5の一層詳細なブロック図を示す。FIG. 3 shows a more detailed block diagram of the vector instruction control unit 5, which is an important device of the present invention.
第2オペランドベクトルテーブル118は演算ユニット
2に読み出されるが、これをL14を介してベクトル命
令制御ユニット5に転送される。The second operand vector table 118 is read out to the arithmetic unit 2, and is transferred to the vector instruction control unit 5 via L14.
オペランドベクトルアドレス119はレジスタ205に
、アドレスインクリメント値120はレジスタ203に
、フラグ121はレジスタ201にそれぞれセットされ
る。The operand vector address 119 is set in the register 205, the address increment value 120 is set in the register 203, and the flag 121 is set in the register 201.
同様に、第3オペランドベクトルチーフルアドレス11
7に基づき第3オペランドベクトルテーブル(図示せず
)が読出され、その中のオペランドベクトルアドレス、
アドレスインクリメント値、フラグがそれぞれレジスタ
206,204,202にセットされる。Similarly, the third operand vector full address 11
7, the third operand vector table (not shown) is read out, and the operand vector address therein is read out.
Address increment values and flags are set in registers 206, 204, and 202, respectively.
第2オペランドバツフア209と第3オペランドバツフ
ア210は、それぞれ第2、第3オペランドの先行読み
出し用バッファに用いられる。The second operand buffer 209 and the third operand buffer 210 are used as buffers for pre-reading the second and third operands, respectively.
オペランドが配列ベクタB(I) 、 C(I)の様に
メモリ上にとられている場合は、これらのオペランドバ
ッファを用いて先行読み出しを行ない、次に必要とする
第2、第3オペランドをそれぞれレジスタ21L レジ
スタ212にセットし、インタフェース装置213を通
りL5を介して演算ユニット5に送られる。If the operands are stored in memory, such as array vectors B(I) and C(I), these operand buffers are used for pre-reading, and the second and third operands needed next are read. The signals are set in the registers 21L and 212, respectively, and sent to the arithmetic unit 5 via the interface device 213 and L5.
この場合、第2又は第3のオペランドを主記憶装置4か
ら読出すには、公知の回路(図示せず)が用いられる。In this case, a known circuit (not shown) is used to read the second or third operand from the main memory 4.
たとえば、第2オペランドを主記憶装置から読出す場合
、テーブル118のオペランドベクトルアドレス119
を第1のベクトル要素のアドレスとしてそのまま主記憶
装置4に送出し、その後、このオペランドベクトルアド
レスに繰り返しアドレスインクリメント値120を加算
して、後続の要素のアドレスを作成し、これらにより主
記憶装置4をアクセスする1但し、この主記憶装置4か
らのオペランドベクトルの読出しは、オペランドベクト
ルテーブル内のフラグが00ときのみ行なわれる。For example, when reading the second operand from main memory, the operand vector address 119 of table 118
is sent as is to the main memory 4 as the address of the first vector element, and then an address increment value of 120 is repeatedly added to this operand vector address to create the address of the subsequent element. However, reading of the operand vector from the main memory 4 is performed only when the flag in the operand vector table is 00.
こうして読出された第2オペランドとしてのベクトルが
先読みされ、バッファ209にストアされる。The vector thus read as the second operand is read ahead and stored in the buffer 209.
第3オペランドを主記憶装置4から読出す場合も同様で
あり、第3オペランドが先読みされ、バッファ210に
ストアされる。The same holds true when reading the third operand from the main memory 4; the third operand is pre-read and stored in the buffer 210.
オペランドがメモリ上にとられているか、あるいは直接
生成すべきかどうかは、第2オペランドについてはレジ
スタ201.第3オペランドについてはレジスタ202
の内容によって指示される。Whether the operand is kept in memory or should be generated directly is determined by the register 201.2 for the second operand. For the third operand, register 202
Directed by the content of.
たとえば第2オペランドについては、レジスタ201の
指定されたビットが1ならば直接生成すべきオペランド
として、生成すべきベクトルの先頭要素が記憶されてい
るレジスタ205の内容が加算器207を素通りしてレ
ジスタ208にセットされ、さらにレジスタ205にセ
ットされる。For example, for the second operand, if the specified bit of the register 201 is 1, the operand is to be directly generated, and the contents of the register 205, which stores the first element of the vector to be generated, are passed through the adder 207 and registered. 208 and further set in register 205.
その後、レジスタ205の内容と、増分値が記憶されて
いるレジスタ203の内容が加算され、その結果がレジ
スタ208にセットされ、さらにレジスタ205にセッ
トされる。Thereafter, the contents of register 205 and the contents of register 203 in which the increment value is stored are added, and the result is set in register 208 and then in register 205.
以下同様に加算が繰り返される。The addition is repeated in the same manner.
こうして、レジスタ208に直接生成すべきベクトルオ
ペランドの要素が順次ストアされる。In this way, the elements of the vector operand to be directly generated are sequentially stored in the register 208.
一方、レジスタ208にセットされたベクトルオペラン
ドの要素はこのセットのたびに線L203を介してレジ
スタ211にセットされる。On the other hand, the elements of the vector operand set in the register 208 are set in the register 211 via the line L203 every time this is set.
レジスタ208の内容はL203を介してレジスタ20
5およびレジスタ211にセットされる。The contents of register 208 are transferred to register 20 via L203.
5 and is set in register 211.
レジスタ201の内容はL201を介して送出されレジ
スタ2110セツトすべき人力がL203であるか、L
204であるかを決める。The contents of the register 201 are sent out via L201, and the register 2110 is determined whether the human power to set it is L203 or not.
204.
第3オペランドについても同様である。The same applies to the third operand.
レジスタ202にフラグがセットされ、その内容によっ
て第3オペランドがメモリ上にあるかあるいは直接生成
すべきかが決定される。A flag is set in register 202, the contents of which determine whether the third operand is in memory or should be generated directly.
直接生成すべきオペランドの場合は、第3オペランド用
に生成すべき先頭のベクトル要素が、加算器207を素
通りしてレジスタ208にセットされ、さらにレジスタ
206にセットされる。In the case of an operand to be directly generated, the first vector element to be generated for the third operand passes through adder 207 and is set in register 208 and then in register 206.
その後、レジスタ206の内容に増分値が入っているレ
ジスタ204の内容が加算器207により繰り返し加算
され、その都度結果がレジスタ208にセットされ、さ
らにレジスタ206に再セットされる。Thereafter, the contents of the register 204 containing the increment value are repeatedly added to the contents of the register 206 by the adder 207, and each time the result is set in the register 208 and then reset in the register 206.
こうして、レジスタ208に直接生成すべき第3オペラ
ンド用のベクトルの要素が順次ストアされる。In this way, the elements of the vector for the third operand to be directly generated are sequentially stored in the register 208.
一方、レジスタ208にセットされたベクトル要素はこ
のセットのたびに線L203を介してレジスタ212に
セットされる。On the other hand, the vector element set in the register 208 is set in the register 212 via the line L203 each time it is set.
レジスタ212はレジスタ202のフラグが1のときこ
のセットを行ない、このフラグがOのときには、バッフ
ァ210からの出力L205をセットするように制御さ
れる。The register 212 performs this setting when the flag of the register 202 is 1, and is controlled to set the output L205 from the buffer 210 when this flag is O.
したがって、ベクトル演算A(I)−I +C(I)の
ごとく、第2オペランドが直接生成すべきオペランドの
ときには、レジスタ211にはレジスタ208に順次生
成されるベクトル要素■がセットされ、主記憶装置4か
ら先読みされた第3オペランドのベクトル要素がバッフ
ァ210からレジスタ212にセットされる。Therefore, when the second operand is an operand that should be directly generated, as in the case of the vector operation A(I)-I +C(I), the vector element ■ sequentially generated in the register 208 is set in the register 211, and the main memory The vector element of the third operand read ahead from buffer 210 is set in register 212 from buffer 210 .
レジスタ212とレジスタ211に次に演算すべきオペ
ランドがセットされ、演算ユニット2にL5を介して送
出される。The next operand to be operated on is set in register 212 and register 211, and sent to operation unit 2 via L5.
演算ユニット2では演算を開始する際にL5を介して送
られるオペランドを受取り、演算の実行を開始する。The arithmetic unit 2 receives the operand sent via L5 when starting the arithmetic operation, and starts executing the arithmetic operation.
ベクトル命令制御ユニット5では、演算ユニット2が演
算の実行を開始すると次のオペランドをレジスタ211
、レジスタ212にセットする。In the vector instruction control unit 5, when the arithmetic unit 2 starts executing an operation, the next operand is stored in the register 211.
, is set in the register 212.
(6)まとめ
以上説明したごとく本発明によれば、オペランドを直接
生成するかどうかを判定する装置と、オペランドを直接
生成する加算器を有することによって、A(I)−I
+C(I)といったオペランドを直接生成するベクトル
命令の処理を可能にした。(6) Summary As explained above, according to the present invention, A(I)−I
It is now possible to process vector instructions that directly generate operands such as +C(I).
第1図は本発明の一実施例を示すデータ処理装置の概略
図、第2図は本実施例におけるベクトル命令形式の概略
図、第3図は本発明の詳細な説明の一実施例を示す一層
詳細なブロック図である。FIG. 1 is a schematic diagram of a data processing device showing an embodiment of the present invention, FIG. 2 is a schematic diagram of a vector instruction format in this embodiment, and FIG. 3 is a detailed explanation of an embodiment of the present invention. FIG. 2 is a more detailed block diagram.
Claims (1)
数の配列ベクトルの各々の先頭の要素のアドレスを表わ
す第1のデータとアドレスインクリメントを表わす第2
のデータとからなる組データと、生成すべき配列ベクト
ルの先頭要素を表わす第1のデータおよび要素間の増分
値を表わす第2のデータとからなる紹データとを記憶す
る第2の手段と、所定のベクトル命令に応答して、該第
2の手段から第1、第2の組データを読出す第3の手段
と、該読出された第1の組データの、第1のデータにそ
の第2のデータを繰り返し加算して複数の読出しアドレ
スを発生し、該発生した複数のアドレスに基づき該第1
の記憶手段から該第1の配列ベクトルを読出す第4の手
段と、該読出された第2の組データの第1のデータにそ
の第2のデータを順次力目算して該第2の配列ベクトル
を生成する第5の手段と、該第1、第2の配列ベクトル
に対して該命令で指定された演算を実行する第6の手段
とからなるベクトル命令処理方式。 2 該第2の手段は、記憶した組データの各々が、該生
成すべき配列ベクトルに対するものか否かを表示するフ
ラグを各組のデータに付随して記憶する手段であり、該
第3の手段は、該命令に応答して二つの組データを該第
2の手段から読出す手段であり、該第4、第5の手段は
該読出された二つの組データの内、該フラグがそれぞれ
第1、第2の値のものを該第1、第2の組データとする
ものである第1項のベクトル命令処理方式。[Scope of Claims] 1. First means for storing a plurality of array vectors, first data representing the address of the first element of each of the plurality of array vectors, and second data representing an address increment.
and introduction data consisting of first data representing the first element of the array vector to be generated and second data representing the increment value between the elements; third means for reading the first and second set of data from the second means in response to a predetermined vector command; 2 is repeatedly added to generate a plurality of read addresses, and the first read address is generated based on the plurality of generated addresses.
fourth means for reading out the first array vector from the storage means; A vector instruction processing system comprising a fifth means for generating a vector, and a sixth means for executing an operation specified by the instruction on the first and second array vectors. 2. The second means is a means for storing a flag indicating whether each stored set of data corresponds to the array vector to be generated, along with each set of data, and the third means The means is means for reading two sets of data from the second means in response to the command, and the fourth and fifth means are configured to read out two sets of data from the second set of data in response to the command, and the fourth and fifth means are configured to read out two sets of data from the second set of data in response to the command. The vector instruction processing method according to the first item, wherein the first and second values are used as the first and second set of data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP239677A JPS5853387B2 (en) | 1977-01-14 | 1977-01-14 | Vector instruction processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP239677A JPS5853387B2 (en) | 1977-01-14 | 1977-01-14 | Vector instruction processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS5388544A JPS5388544A (en) | 1978-08-04 |
| JPS5853387B2 true JPS5853387B2 (en) | 1983-11-29 |
Family
ID=11528068
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP239677A Expired JPS5853387B2 (en) | 1977-01-14 | 1977-01-14 | Vector instruction processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS5853387B2 (en) |
-
1977
- 1977-01-14 JP JP239677A patent/JPS5853387B2/en not_active Expired
Also Published As
| Publication number | Publication date |
|---|---|
| JPS5388544A (en) | 1978-08-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4628436A (en) | Digital controller | |
| JPS5852265B2 (en) | data processing equipment | |
| JPS6029126B2 (en) | data processing equipment | |
| JPS59114677A (en) | vector processing device | |
| JPH07110769A (en) | Vliw type computer | |
| JP2743947B2 (en) | Micro program control method | |
| JPS5856027A (en) | Conditional relational operating device | |
| JPS5971542A (en) | Arithmetic processor | |
| JP2652973B2 (en) | Image processing device | |
| JP3155056B2 (en) | Information processing device | |
| JPS5925264B2 (en) | Vector instruction processing method | |
| JPH0234058B2 (en) | ||
| JPS6028014B2 (en) | microprocessor | |
| JPS59223846A (en) | Arithmetic processor | |
| JPH02128223A (en) | Operational processor | |
| JPS61147333A (en) | Register select circuit | |
| JPH0256027A (en) | Parallel processing system for digital signal processor | |
| JPS62251930A (en) | Information processor | |
| JPH0320828A (en) | Information processor | |
| JPH0758459B2 (en) | Micro program controller | |
| JPS6319897B2 (en) | ||
| JPH0241522A (en) | Function arithmetic processor | |
| JPS63262744A (en) | Direct memory control system | |
| JPS6146857B2 (en) | ||
| JPS58155587A (en) | Processing device |