JPH05127902A - Addition/subtraction processing system with carry in parallel arithmetic processing unit - Google Patents

Addition/subtraction processing system with carry in parallel arithmetic processing unit

Info

Publication number
JPH05127902A
JPH05127902A JP3286259A JP28625991A JPH05127902A JP H05127902 A JPH05127902 A JP H05127902A JP 3286259 A JP3286259 A JP 3286259A JP 28625991 A JP28625991 A JP 28625991A JP H05127902 A JPH05127902 A JP H05127902A
Authority
JP
Japan
Prior art keywords
instruction
carry
subtraction
addition
instructions
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
Application number
JP3286259A
Other languages
Japanese (ja)
Other versions
JP2851192B2 (en
Inventor
Ryuji Sakai
隆二 境
Yoichiro Takeuchi
陽一郎 竹内
Ikuo Uchibori
郁夫 内堀
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP3286259A priority Critical patent/JP2851192B2/en
Publication of JPH05127902A publication Critical patent/JPH05127902A/en
Application granted granted Critical
Publication of JP2851192B2 publication Critical patent/JP2851192B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Advance Control (AREA)

Abstract

PURPOSE:To define one ADDC instruction (addition/subtraction instruction with carry) with two instructions among plural instructions which are processed in parallel so as to positively designate a general-purpose register as a carry value storage destination, to execute the plural ADDC instructions at the same cycle and to arrange the ADDC instructions without being conscious of timing at an arithmetic pipe line. CONSTITUTION:Five operand-type ADDC instructions 23 are defined by two instructions or a main instruction 21 and an auxiliary instruction 22. which are simultaneously processed. When a decoding circuit 42 decodes the auxiliary instruction 22, a carry value is read from the general-purpose register designated by rs3 of the instruction 22 and it is set to be the carry input of ALU (arithmetic circuit) 51. ALU 51 executes addition/subtraction with carry on the content of the general-purpose register designated by rs1 and rs2 of the main instruction with the carry input (rs3). The carry of the arithmetic result are written into the general-purpose register designated by rd1 of the instruction 21 and rd2 of the instruction 22.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、複数の命令を並列に
処理することが可能な並列演算処理装置におけるキャリ
ー付き加減算処理方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a carry addition / subtraction processing system in a parallel arithmetic processing device capable of processing a plurality of instructions in parallel.

【0002】[0002]

【従来の技術】近年、VLIW(Very Long Instructio
n Word)方式の計算機で代表されるパイプライン方式の
並列演算処理装置が提案、開発されている。この種の並
列演算処理装置では、複数の命令を並列(同時)に処理
することが可能なため、処理の高速化が図れるという特
長がある。
2. Description of the Related Art In recent years, VLIW (Very Long Instructio)
A pipeline-type parallel processing device represented by an n-word) computer has been proposed and developed. This type of parallel processing device is capable of processing a plurality of instructions in parallel (simultaneously), and thus has the advantage of speeding up the processing.

【0003】さて、上記した並列演算処理装置で実行さ
れる演算処理の1つに、キャリー付き加減算がある。こ
のキャリー付き加減算は、例えば加算であれば、第1の
ソースデータ(オペランドデータ)と第2のソースデー
タ(オペランドデータ)とキャリービットとを加算する
処理である。従来、キャリー付き加減算の対象となるキ
ャリービットは、専用のレジスタ(例えば、条件コード
レジスタ)またはフラグ(フラグレジスタ)に格納され
ていた。
Now, one of the arithmetic processes executed by the above-mentioned parallel arithmetic processing device is addition / subtraction with carry. This addition / subtraction with carry is a process of adding the first source data (operand data), the second source data (operand data), and the carry bit, if it is addition, for example. Conventionally, a carry bit to be added / subtracted with carry has been stored in a dedicated register (for example, a condition code register) or a flag (flag register).

【0004】このため従来は、キャリー付き加減算を実
行するのに、条件分岐命令でキャリービットを参照して
処理を分けるか、あるいはキャリービットを暗黙のオペ
ランドとして参照する専用のキャリー付き加減算命令を
用意することによって対処していた。
For this reason, conventionally, in order to execute addition / subtraction with carry, a conditional branch instruction is used to divide the processing by referring to the carry bit, or a dedicated addition / subtraction instruction with carry for referencing the carry bit as an implicit operand is prepared. I was dealing with it.

【0005】ところが、並列演算処理装置では、前記し
たように同一サイクルで複数の命令が実行可能なため、
例えば図3のように、2つのキャリー付き加減算命令
(ADDC命令)1,2を含む複数命令からなるVLI
W命令3が実行される場合には、各ADDC命令1,2
により同一サイクルでそれぞれキャリーが生成される可
能性がある。この場合、キャリー値格納先(キャリー値
格納フラグ)4が1つしかないと、ADDC命令1,2
を同時に実行できないことになる。
However, in the parallel arithmetic processing device, since a plurality of instructions can be executed in the same cycle as described above,
For example, as shown in FIG. 3, a VLI including a plurality of instructions including two add / subtract instructions with carry (ADDC instruction) 1 and 2
When the W instruction 3 is executed, each ADDC instruction 1 or 2 is executed.
Therefore, carry may be generated in the same cycle. In this case, if there is only one carry value storage destination (carry value storage flag) 4, the ADDC instructions 1, 2
Cannot be executed at the same time.

【0006】そこで、図4(a)に示すように、並列に
演算可能な命令単位(演算パイプライン単位)でキャリ
ー値格納フラグ4を用意することが考えられる。しか
し、このような構成としても、例えば演算回路で処理可
能なデータ幅の倍の幅の加減算を、図4(b)に示すよ
うに下位データと上位データとに分けて行うために、図
4(c)に示すように、下位データ加減算用のADDC
命令1と、この命令1の実行で生成されたキャリーを用
いたADDC命令5とを同一演算パイプラインで実行し
ようとした場合には、次のような問題があった。
Therefore, as shown in FIG. 4A, it is conceivable to prepare the carry value storage flag 4 in units of instructions that can be operated in parallel (in units of operation pipelines). However, even with such a configuration, for example, as shown in FIG. 4B, addition and subtraction of a width twice the data width that can be processed by the arithmetic circuit are performed separately for the lower data and the upper data. As shown in (c), ADDC for addition / subtraction of lower data
When the instruction 1 and the ADDC instruction 5 using the carry generated by the execution of the instruction 1 are attempted to be executed in the same arithmetic pipeline, there are the following problems.

【0007】まずパイプラインのタイミングによって
は、キャリー値格納フラグ4に書込む前に、読出しが行
われる可能性もあるが、従来はキャリー値格納フラグ4
を暗黙のオペランドとして書込みあるいは参照していた
ため、タイミングの制御が不可能であった。また、AD
DC命令1とADDC命令5との間に、キャリー値を書
込む命令を配置できなかった。
First, depending on the timing of the pipeline, reading may be performed before writing to the carry value storage flag 4, but conventionally, carry value storage flag 4 is used.
Since it was written or referenced as an implicit operand, the timing control was impossible. Also, AD
An instruction for writing a carry value could not be arranged between the DC instruction 1 and the ADDC instruction 5.

【0008】[0008]

【発明が解決しようとする課題】上記したように従来の
並列演算処理装置では、同一サイクルで複数のADDC
命令(キャリー付き加減算命令)が実行可能なように、
キャリー値格納先を演算パイプライン毎に用意しても、
その格納先を暗黙のオペランドとして使用していたため
に、パイプライン処理でキャリーのセット/リセットの
タイミングを意識したコーディングをしなければならな
かった。勿論、複数のキャリー値格納先を用意し、AD
DC命令中で任意の格納先を指定するようにすることも
考えられる。しかし、加減算の対象となる2つのソース
データ(オペランドデータ)および加減算結果の格納先
の他に、2つのソースデータに加えるキャリーの格納元
およびキャリー付き加減算により生成されるキャリーの
格納先を1つのADDC命令で指定すること、即ち1命
令中で5つのオペランドを指定することは、命令長の点
で実現困難であった。
As described above, in the conventional parallel arithmetic processing device, a plurality of ADDCs are used in the same cycle.
So that instructions (addition and subtraction instructions with carry) can be executed,
Even if the carry value storage destination is prepared for each operation pipeline,
Since the storage location was used as an implicit operand, the pipeline processing had to be coded in consideration of the carry set / reset timing. Of course, multiple carry value storage destinations are prepared and AD
It is also possible to specify an arbitrary storage destination in the DC command. However, in addition to the two source data (operand data) to be added / subtracted and the storage destination of the addition / subtraction result, the storage source of the carry added to the two source data and the storage destination of the carry generated by the addition / subtraction with carry are set to one. It was difficult to realize with the ADDC instruction, that is, with five instructions per instruction.

【0009】この発明は上記事情に鑑みてなされたもの
でその目的は、並列演算処理装置における複数命令の並
列処理機能に着目して、並列に処理される複数の命令の
うちの2命令(第1の命令および第2の命令)により1
つのADDC命令(キャリー付き加減算命令)を定義
し、加減算の対象となる2つのソースデータおよび加減
算結果の格納先を指定する他、キャリー付き加減算処理
に際して参照すべきキャリービットの格納元およびキャ
リー付き加減算によって生成されるキャリービットの格
納先としてそれぞれ任意の汎用レジスタを指定すること
で、複数のADDC命令を同一サイクルで実行でき、し
かもADDC命令を演算パイプラインのタイミングを意
識することなく配置できる並列演算処理装置におけるキ
ャリー付き加減算命令処理方式を提供することにある。
The present invention has been made in view of the above circumstances, and an object thereof is to focus on the parallel processing function of a plurality of instructions in a parallel arithmetic processing device, and to select two instructions (a first instruction) out of a plurality of instructions to be processed in parallel. 1 instruction and second instruction)
One ADDC instruction (addition / subtraction instruction with carry) is defined, two source data to be added / subtracted and a storage destination of the addition / subtraction result are specified, and a storage source of a carry bit to be referenced in addition / subtraction with carry and addition / subtraction with carry Parallel arithmetic operation in which a plurality of ADDC instructions can be executed in the same cycle and ADDC instructions can be arranged without being aware of the timing of the operation pipeline by designating any general-purpose register as the storage destination of the carry bit generated by An object of the present invention is to provide an add / subtract instruction processing system with carry in a processing device.

【0010】[0010]

【課題を解決するための手段】この発明は、キャリー付
き加減算を指定する第1の命令の補助命令となる第2の
命令であって、第1の命令で指定されたキャリー付き加
減算処理に際して参照すべきキャリービットの格納元と
して任意の汎用レジスタを指定するソース指定フィール
ド並びにキャリー付き加減算によって生成されるキャリ
ービットの格納先として任意の汎用レジスタを指定する
デスティネーション指定フィールドを持つ第2の命令を
定義する手段と、並列に処理すべき複数の命令のデコー
ド処理を司るデコード手段であって、上記の第1の命令
および第2の命令を含む複数の命令が並列に処理すべき
命令として与えられた場合に、第2の命令のソース指定
フィールドで指定される汎用レジスタ中のキャリービッ
トを読出して、第1の命令の位置に対応する演算回路に
供給するデコード手段とを設け、この演算回路による第
1の命令に従うキャリー付き加減算により同演算回路か
ら出力されるキャリービットを第2の命令のデスティネ
ーション指定フィールドで指定される汎用レジスタに書
込むようにしたことを特徴とするものである。
The present invention is a second instruction which is an auxiliary instruction of a first instruction designating addition / subtraction with carry, and is referred to when carrying out addition / subtraction processing with carry designated by the first instruction. A second instruction having a source specification field that specifies any general-purpose register as the storage source of the carry bit to be stored and a destination specification field that specifies any general-purpose register as the storage destination of the carry bit generated by addition / subtraction with carry A means for defining and a decoding means for controlling the decoding processing of a plurality of instructions to be processed in parallel, wherein a plurality of instructions including the above-mentioned first instruction and second instruction are given as instructions to be processed in parallel. In case of the second instruction, the carry bit in the general-purpose register designated by the source designation field of the second instruction is read, And a decode means for supplying the arithmetic circuit to the arithmetic circuit corresponding to the position of the instruction, and the carry bit output from the arithmetic circuit by addition and subtraction according to the first instruction by the arithmetic circuit causes the destination instruction field of the second instruction. It is characterized by writing to a general-purpose register specified by.

【0011】[0011]

【作用】上記の構成によれば、キャリー付き加減算のた
めに、並列に処理される複数の命令のうちの2命令(第
1および第2の命令)により1つのADDC命令(キャ
リー付き加減算命令)が定義され、補助命令である第2
の命令により、参照すべきキャリービットの格納元とキ
ャリー付き加減算で生成されるキャリービットの格納先
とが指定され、しかもその格納元,格納先に汎用レジス
タが指定される。そして、この第1および第2の命令を
含む複数の命令が命令レジスタに保持された場合に、デ
コード手段は各命令のデコード処理を行う。この際デコ
ード手段は、第2の命令については、そのソース指定フ
ィールドで指定される汎用レジスタ中のキャリービット
を読出して、複数の命令のそれぞれの位置に対応して設
けられた同数の演算回路のうち、主命令(主たるADD
C)である第1の命令の位置に対応して設けられ、この
第1の命令に従うキャリー付き加減算を行う演算回路に
供給する。これにより、この演算回路において、第1の
命令で指定された2つのソースデータと第2のの命令で
指定されたキャリーとのキャリー付き加減算が行われ
る。この演算回路のキャリー付き加減算結果は第1の命
令でデスティネーション指定された結果格納先に書込ま
れ、このキャリー付き加減算で生成されるキャリーは第
2の命令でデスティネーション指定された汎用レジスタ
に書込まれる。
According to the above configuration, one ADDC instruction (addition / subtraction instruction with carry) is executed by two instructions (first and second instructions) out of a plurality of instructions processed in parallel for addition / subtraction with carry. Is defined and is an auxiliary instruction
Instruction specifies the storage source of the carry bit to be referenced and the storage destination of the carry bit generated by addition / subtraction with carry, and further, the general-purpose register is designated as the storage source and the storage destination. Then, when a plurality of instructions including the first and second instructions are held in the instruction register, the decoding means performs a decoding process for each instruction. At this time, the decoding means reads the carry bit in the general-purpose register designated by the source designation field for the second instruction, and decodes the carry bit of the same number of arithmetic circuits provided corresponding to the respective positions of the plurality of instructions. Of which, the main command (main ADD
It is provided corresponding to the position of the first instruction C) and is supplied to the arithmetic circuit for carrying out addition / subtraction with carry according to the first instruction. As a result, in this arithmetic circuit, addition / subtraction with carry is performed between the two source data designated by the first instruction and the carry designated by the second instruction. The addition / subtraction result with carry of this arithmetic circuit is written to the result storage destination specified by the destination of the first instruction, and the carry generated by the addition / subtraction with carry is stored in the general-purpose register specified by the destination of the second instruction. Written.

【0012】[0012]

【実施例】図1はこの発明を適用するVLIW方式で且
つパイプライン制御方式の並列演算処理装置の一実施例
を示すブロック構成図である。なお、図1の処理装置
は、4命令を並列に処理可能な構成となっているものと
する。
FIG. 1 is a block diagram showing an embodiment of a VLIW system and pipeline control system parallel arithmetic processing apparatus to which the present invention is applied. The processing device of FIG. 1 is assumed to have a configuration capable of processing four instructions in parallel.

【0013】図1において、10は並列に処理すべき4
命令を保持するための例えば32ビット幅の4つのフィ
ールド11〜14を有する128ビット命令レジスタ、
20は命令レジスタ10に保持された128ビット長の
VLIW命令である。VLIW命令20は、並列に処理
される4つの32ビット長命令からなる。
In FIG. 1, 10 is 4 to be processed in parallel.
A 128-bit instruction register having four fields 11-14, for example 32 bits wide, for holding instructions,
Reference numeral 20 is a 128-bit long VLIW instruction held in the instruction register 10. The VLIW instruction 20 consists of four 32-bit instructions that are processed in parallel.

【0014】図1のVLIW命令20には、キャリー付
き加減算を指定する32ビット長のキャリー付き加減算
主命令(以下、単に主命令と称する)21と、この主命
令21の拡張命令としての32ビット長のキャリー付き
加減算補助命令(以下、単に補助命令と称する)22と
が含まれているものとする。この主命令21および補助
命令22の2命令は、1つのADDC命令(キャリー付
き加減算命令)23を構成している。ここでは、主命令
21と補助命令22とが隣接しているが、これに限るも
のではなく、また主命令21が補助命令22より前に配
置される必要もない。
The VLIW instruction 20 shown in FIG. 1 includes a 32-bit length add / subtract main instruction with carry (hereinafter simply referred to as main instruction) 21 for specifying add / subtract with carry, and 32 bits as an extension instruction of the main instruction 21. It is assumed that a long add / subtract auxiliary instruction with carry (hereinafter, simply referred to as auxiliary instruction) 22 is included. The two instructions of the main instruction 21 and the auxiliary instruction 22 form one ADDC instruction (addition / subtraction instruction with carry) 23. Here, the main instruction 21 and the auxiliary instruction 22 are adjacent to each other, but the present invention is not limited to this, and the main instruction 21 does not have to be arranged before the auxiliary instruction 22.

【0015】ADDC命令23は後述するように5つの
オペランド指定フィールドを有している。そこで、この
命令23を、5オペランド型ADDC命令23と呼ぶ。
ここでは、主命令21は命令レジスタ10のフィールド
11に、補助命令22は命令レジスタ10のフィールド
12に保持されているものとする。
The ADDC instruction 23 has five operand designation fields as described later. Therefore, this instruction 23 is called a 5-operand type ADDC instruction 23.
Here, it is assumed that the main instruction 21 is held in the field 11 of the instruction register 10 and the auxiliary instruction 22 is held in the field 12 of the instruction register 10.

【0016】図2は図1の5オペランド型ADDC命令
23のフォーマットを示す。まず、ADDC命令23の
主命令21は、キャリー付き加減算を指定する命令コー
ド(オペレーションコード)OP1(10ビット)、キ
ャリー付き加減算結果の格納先(ここでは汎用レジス
タ)を指定するデスティネーションrd1(6ビッ
ト)、およびキャリー付き加減算の被演算データの格納
元(ここでは汎用レジスタ)を指定するソースrs1,
rs2(いずれも6ビット)の各フィールドを有してい
る。この主命令21のフォーマットは図4に示したよう
な従来のADDC命令1,2と同一である。
FIG. 2 shows a format of the 5-operand type ADDC instruction 23 shown in FIG. First, the main instruction 21 of the ADDC instruction 23 is an instruction code (operation code) OP1 (10 bits) that specifies addition / subtraction with carry, and a destination rd1 (6) that specifies the storage destination (here, a general register) of the addition / subtraction result with carry. Bit), and a source rs1, which specifies a storage source (here, a general register) of the operand data to be added / subtracted with carry.
Each field has rs2 (6 bits in each case). The format of the main instruction 21 is the same as the conventional ADDC instructions 1 and 2 as shown in FIG.

【0017】次に、ADDC命令23の補助命令22
は、ADDC命令の補助命令であることを示す補助命令
コードOP2(10ビット)、キャリー付き加減算にて
生成されたキャリー(carry′)の格納先(ここで
は汎用レジスタ)を指定するデスティネーションrd2
(6ビット)、およびキャリー付き加減算の被演算デー
タとなるキャリー(carry)の格納元(ここでは汎
用レジスタ)を指定するソースrs3(6ビット)の各
フィールドを有している。
Next, the auxiliary instruction 22 of the ADDC instruction 23
Is an auxiliary instruction code OP2 (10 bits) indicating that it is an auxiliary instruction of the ADDC instruction, and a destination rd2 that specifies a storage destination (here, a general register) of a carry (carry ') generated by addition / subtraction with carry.
(6 bits) and each field of a source rs3 (6 bits) for designating a storage source (here, a general register) of a carry (carry) that is the operand data of addition / subtraction with carry.

【0018】再び図1を参照すると、30は汎用レジス
タの群からなる(汎用の)レジスタファイルである。本
実施例では、キャリー付き加減算で生成されるキャリー
の格納先としてレジスタファイル30内の汎用レジスタ
が用いられるようになっている。
Referring again to FIG. 1, 30 is a (general purpose) register file consisting of a group of general purpose registers. In this embodiment, a general-purpose register in the register file 30 is used as a storage destination of a carry generated by addition / subtraction with carry.

【0019】41〜44は命令レジスタ10のフィール
ド11〜14に保持されている32ビット長の命令の解
読を司るデコード回路である。デコード回路41〜44
は、フィールド11〜14に保持されている命令でレジ
スタファイル30内汎用レジスタがソース指定されてい
る場合に、そのレジスタ内容をリードするリード機能を
有している。またデコード回路41〜44は、通常は、
そのリードデータを同回路41〜44に対応して設けら
れるALU(演算回路)の被演算データとして出力する
ようになっている。またデコード回路41〜44のうち
のデコード回路42〜44は、解読した命令の命令コー
ドが補助命令コードOP2の場合には、レジスタファイ
ル30からのリードデータの例えば最下位ビットを、デ
コード回路41〜43に対応して設けられるALUのキ
ャリー入力として出力するようになっている。
Denoted at 41 to 44 are decoding circuits for decoding the 32-bit length instruction held in the fields 11 to 14 of the instruction register 10. Decoding circuits 41-44
Has a read function of reading the contents of the general-purpose register in the register file 30 when the source is designated by the instruction held in the fields 11 to 14. In addition, the decode circuits 41 to 44 are normally
The read data is output as data to be operated by an ALU (arithmetic circuit) provided corresponding to the circuits 41 to 44. If the decoded instruction code of the instruction is the auxiliary instruction code OP2, the decoding circuits 42 to 44 of the decoding circuits 41 to 44, for example, the least significant bit of the read data from the register file 30 It is designed to be output as a carry input of an ALU provided corresponding to 43.

【0020】51はデコード回路41に対応して設けら
れ、同デコード回路41の解読結果に応じて演算を行う
ALUである。なお図1では、デコード回路42〜44
にそれぞれ対応して設けられるALUは省略されてい
る。
Reference numeral 51 is an ALU which is provided corresponding to the decoding circuit 41 and performs an operation according to the decoding result of the decoding circuit 41. In FIG. 1, the decoding circuits 42 to 44 are
The ALUs provided corresponding to the above are omitted.

【0021】次に、この発明の一実施例の動作を、図1
に示すように5オペランド型ADDC命令23を含むV
LIW命令20が命令レジスタ10に保持された場合を
例に説明する。
Next, the operation of one embodiment of the present invention will be described with reference to FIG.
V including the 5-operand type ADDC instruction 23 as shown in FIG.
The case where the LIW instruction 20 is held in the instruction register 10 will be described as an example.

【0022】まず、命令レジスタ10に保持されたVL
IW命令20中の先頭の命令、即ち5オペランド型AD
DC命令23の主命令21はデコード回路41に導か
れ、2番目の命令、即ち5オペランド型ADDC命令2
3の補助命令22はデコード回路42に導かれ、命令解
読に供される。また、補助命令22の後続の2命令は、
それぞれデコード回路43,44に導かれ、命令解読に
供される。
First, the VL held in the instruction register 10
The first instruction in the IW instruction 20, that is, a 5-operand type AD
The main instruction 21 of the DC instruction 23 is guided to the decoding circuit 41, and the second instruction, that is, the 5-operand type ADDC instruction 2
The auxiliary instruction 22 of No. 3 is guided to the decoding circuit 42 and is used for instruction decoding. In addition, the two instructions following the auxiliary instruction 22 are
They are guided to decode circuits 43 and 44, respectively, and used for instruction decoding.

【0023】デコード回路41は、主命令21の命令コ
ードOP1によりキャリー付き加減算が指定されている
場合、ALU51にてキャリー付き加減算を行うための
制御信号を生成する。またデコード回路41は、主命令
21のソースrs1,rs2の両フィールドで指定され
るレジスタファイル30内の汎用レジスタ(rs1,r
s2)の内容をリードし、キャリー付き加減算の被演算
データとしてALU51に出力する(キャリー付き加算
の場合)。なお、キャリー付き減算の場合には、rs2
ではなく、その補数値が被演算データとしてALU51
に出力される。
When the instruction code OP1 of the main instruction 21 specifies addition / subtraction with carry, the decoding circuit 41 generates a control signal for performing addition / subtraction with carry in the ALU 51. Further, the decoding circuit 41 uses the general-purpose registers (rs1, r) in the register file 30 designated by the source rs1 and rs2 fields of the main instruction 21.
The contents of s2) are read and output to the ALU 51 as operand data of addition / subtraction with carry (in the case of addition with carry). In the case of subtraction with carry, rs2
Rather, its complement value is the ALU51 as the operand data.
Is output to.

【0024】一方、デコード回路42は、補助命令22
の補助命令コードOP2によりADDC命令の補助命令
であることが示されている場合、同回路42に対応して
設けられるALU(図示せず)を用いた演算処理をNO
P(ノー・オペレーション)とする。またデコード回路
42は、補助命令22のソースrs3のフィールドで指
定されるレジスタファイル30内の汎用レジスタ(rs
3)の内容をリードし、その最下位ビットをキャリー付
き加減算に用いるキャリー(carry)として、(補
助命令22と対をなす主命令21の解読を行っているデ
コード回路41に対応して設けられた)ALU51のキ
ャリー入力端子に出力する。なお従来は、このキャリー
入力端子には、専用のレジスタまたはフラグに格納され
ているキャリー値が暗黙の指定で入力される。
On the other hand, the decoding circuit 42 uses the auxiliary instruction 22.
If the auxiliary instruction code OP2 indicates that the instruction is an auxiliary instruction of the ADDC instruction, the operation processing using the ALU (not shown) provided corresponding to the circuit 42 is NO.
P (no operation). Further, the decoding circuit 42 uses the general-purpose register (rs) in the register file 30 designated by the field of the source rs3 of the auxiliary instruction 22.
3) The contents are read, and the least significant bit thereof is provided as a carry to be used for addition / subtraction with carry in correspondence with the decoding circuit 41 which decodes the main instruction 21 paired with the auxiliary instruction 22. Output to the carry input terminal of ALU51. Conventionally, a carry value stored in a dedicated register or flag is implicitly input to this carry input terminal.

【0025】以上のデコード回路41,42の命令解読
に伴うALU51の制御、およびレジスタファイル30
からのレジスタリードデータのALU51への出力動作
により、ALU51では、キャリー(rs3で指定され
た汎用レジスタの最下位ビット)も合せて、 rs1+rs2+rs3の最下位ビット のキャリー付き加減算(上記の例は加算の場合)が行わ
れる。
The control of the ALU 51 accompanying the instruction decoding of the decoding circuits 41 and 42 and the register file 30
By the output operation of the register read data from the ALU51 to the ALU51, the carry (addition / subtraction of the least significant bit of rs1 + rs2 + rs3 of the general register specified by rs3) with carry is added to the ALU51. If) is done.

【0026】このALU51でのキャリー付き加減算の
結果は、デコード回路41の解読結果に従い、主命令2
1のデスティネーションrd1で指定されるレジスタフ
ァイル30内汎用レジスタ(rd1)に書込まれる。こ
のとき、ALU51でのキャリー付き加減算で生成され
る(演算結果の)キャリー(carry′)は、デコー
ド回路42の解読結果に従い、補助命令22のデスティ
ネーションrd2で指定されるレジスタファイル30内
汎用レジスタ(rd2)の最下位ビットに書込まれる
(carry′→rd2)。
The result of addition / subtraction with carry in the ALU 51 is the main instruction 2 according to the decoding result of the decoding circuit 41.
It is written to the general-purpose register (rd1) in the register file 30 designated by the destination rd1 of 1. At this time, the carry (carry ') (calculation result) generated by the addition / subtraction with carry in the ALU 51 is a general-purpose register in the register file 30 specified by the destination rd2 of the auxiliary instruction 22 according to the decoding result of the decoding circuit 42. It is written in the least significant bit of (rd2) (carry '→ rd2).

【0027】このように本実施例によれば、5オペラン
ド型ADDC命令(キャリー付き加減算命令)により、
キャリー値格納先としてレジスタファイル30内の任意
の汎用レジスタを陽に指定できるため、命令レジスタ1
0に保持されるVLIW命令として、2つの5オペラン
ド型ADDC命令を用いることで、2つのキャリー付き
加減算を並列に実行することができる。
As described above, according to this embodiment, the 5-operand type ADDC instruction (addition / subtraction instruction with carry)
Since any general purpose register in the register file 30 can be explicitly specified as the carry value storage destination, the instruction register 1
By using two 5-operand type ADDC instructions as VLIW instructions held at 0, two carry addition / subtraction can be executed in parallel.

【0028】また、図4に示したように1つのキャリー
付き加減算を2つのADDC命令により下位データと上
位データとに分けて行う場合にも、キャリー値格納先を
5オペランド型ADDC命令中で汎用レジスタとして陽
に指定できることから、下位データの加減算で生成され
るキャリーが指定の汎用レジスタに書込まれる前に、そ
の汎用レジスタのキャリー値を用いた上位データのキャ
リー付き加減算が行われないように演算パイプラインを
制御することが簡単に行える。また、同様の理由によ
り、下位データ用のADDC命令と上位データ用のAD
DC命令との間に、キャリー値をライトする命令を配置
することも可能となる。
Also, as shown in FIG. 4, even when one addition / subtraction with carry is divided into lower data and upper data by two ADDC instructions, the carry value storage destination is a general-purpose in the 5-operand type ADDC instruction. Since it can be explicitly specified as a register, before the carry generated by the addition / subtraction of the lower data is written to the specified general-purpose register, the addition / subtraction with carry of the upper data using the carry value of the general-purpose register is not performed. It is easy to control the arithmetic pipeline. For the same reason, the ADDC instruction for lower data and the ADDC instruction for upper data
An instruction to write a carry value can be placed between the DC instruction and the DC instruction.

【0029】以上は、4命令を並列に処理する並列演算
処理装置に実施した場合について説明したが、本発明は
複数の命令を並列に処理する並列演算処理装置全般に適
用可能である。
Although the case where the present invention is applied to the parallel arithmetic processing device for processing four instructions in parallel has been described above, the present invention is applicable to all parallel arithmetic processing devices for processing a plurality of instructions in parallel.

【0030】[0030]

【発明の効果】以上詳述したようにこの発明によれば、
並列演算処理装置における複数命令の並列処理機能に着
目して、並列に処理される複数の命令のうちの2命令
(第1の命令および第2の命令)により1つのADDC
命令(キャリー付き加減算命令)を定義し、加減算の対
象となる2つのソースデータおよび加減算結果の格納先
を指定する他、キャリー付き加減算処理に際して参照す
べきキャリービットの格納元およびキャリー付き加減算
によって生成されるキャリービットの格納先としてそれ
ぞれ任意の汎用レジスタを陽に指定可能な構成とすると
共に、第2の命令でソース指定される汎用レジスタから
キャリービットを読出して、第1の命令に従うキャリー
付き加減算を行う演算回路に供給する構成としたので、
次に列挙する効果を得ることができる。
As described in detail above, according to the present invention,
Focusing on the parallel processing function of a plurality of instructions in a parallel processing device, one ADDC is created by two instructions (a first instruction and a second instruction) of a plurality of instructions processed in parallel.
Defines an instruction (addition / subtraction instruction with carry), specifies two source data to be added / subtracted and the storage destination of the addition / subtraction result, and is generated by the storage source of the carry bit to be referred in the addition / subtraction process with carry and the addition / subtraction with carry Each of the general-purpose registers can be explicitly designated as a storage destination of the carry bit to be stored, and the carry bit is read from the general-purpose register designated as the source by the second instruction, and addition / subtraction with carry according to the first instruction is performed. Since it is configured to supply to the arithmetic circuit that performs
The following effects can be obtained.

【0031】(1)キャリーが汎用レジスタに格納され
ることから、演算回路の加減算で生成されるキャリーを
ソフトウェア(汎用レジスタ読出し命令)により容易に
参照することができる。 (2)キャリー格納先が陽に指定できることから、キャ
リーのセットを伴う命令を並列に実行できる。 (3)上記(2)と同様の理由により、パイプライン処
理でのキャリーのセット/リセットのタイミングを意識
したコーディングが不要となる。
(1) Since the carry is stored in the general-purpose register, the carry generated by addition / subtraction of the arithmetic circuit can be easily referred to by software (general-purpose register read instruction). (2) Since the carry storage destination can be explicitly specified, an instruction accompanied by a carry set can be executed in parallel. (3) For the same reason as the above (2), the coding in consideration of the carry set / reset timing in the pipeline processing becomes unnecessary.

【0032】(4)並列に処理される複数の命令のうち
の2命令により1つのADDC命令を定義して、その中
でキャリー格納先を陽に指定しているので、その指定フ
ィールドを確保するために各命令の命令長を広げる必要
がない。
(4) One ADDC instruction is defined by two instructions out of a plurality of instructions to be processed in parallel, and the carry storage destination is explicitly designated therein, so that the designated field is secured. Therefore, it is not necessary to increase the instruction length of each instruction.

【0033】(5)並列に処理される複数の命令のうち
の2命令により1つのADDC命令として実現している
ことから、キャリー付き加減算のための特別のハードウ
ェアを必要としない。 (6)上記(2),(3)により命令スケジューリング
が効率的に行える。
(5) Since it is realized as one ADDC instruction by two instructions out of a plurality of instructions processed in parallel, no special hardware for addition / subtraction with carry is required. (6) Instruction scheduling can be efficiently performed by the above (2) and (3).

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

【図1】この発明を適用する並列演算処理装置の一実施
例を示すブロック構成図。
FIG. 1 is a block configuration diagram showing an embodiment of a parallel arithmetic processing device to which the present invention is applied.

【図2】図1の5オペランド型ADDC命令23のフォ
ーマットを示す図。
FIG. 2 is a diagram showing a format of a 5-operand type ADDC instruction 23 of FIG.

【図3】従来のキャリー付き加減算の問題を説明するた
めの図。
FIG. 3 is a diagram for explaining a problem of conventional addition / subtraction with carry.

【図4】従来のキャリー付き加減算の問題を説明するた
めの図。
FIG. 4 is a diagram for explaining a problem of conventional addition / subtraction with carry.

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

10…命令レジスタ、20…VLIW命令、21…主命
令(第1の命令)、22…補助命令(第2の命令)、2
3…5オペランド型ADDC命令(キャリー付き加減算
命令)、30…レジスタファイル(汎用レジスタ群)、
41〜44…デコード回路、51…ALU(演算回
路)。
10 ... Instruction register, 20 ... VLIW instruction, 21 ... Main instruction (first instruction), 22 ... Auxiliary instruction (second instruction), 2
3 ... 5 operand type ADDC instruction (addition / subtraction instruction with carry), 30 ... register file (general-purpose register group),
41 to 44 ... Decode circuit, 51 ... ALU (arithmetic circuit).

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 並列に動作可能な複数の演算回路と、こ
の複数の演算回路の演算対象データおよび演算結果デー
タ等を格納するのに用いられる汎用レジスタ群とを備
え、複数の命令を並列に処理することが可能な並列演算
処理装置において、 キャリー付き加減算を指定する第1の命令の補助命令と
なる第2の命令であって、前記第1の命令で指定された
キャリー付き加減算処理に際して参照すべきキャリービ
ットの格納元として前記汎用レジスタ群内レジスタを指
定するソース指定フィールド並びにキャリー付き加減算
によって生成されるキャリービットの格納先として前記
汎用レジスタ群内レジスタを指定するデスティネーショ
ン指定フィールドを持つ第2の命令を定義する手段と、 並列に処理すべき複数の命令のデコード処理を司るデコ
ード手段であって、前記第1の命令および第2の命令を
含む複数の命令が並列に処理すべき命令として与えられ
た場合に、前記第2の命令のソース指定フィールドで指
定される汎用レジスタ中のキャリービットを読出して、
前記複数の演算回路のうち前記第1の命令に従うキャリ
ー付き加減算を行う演算回路に供給するデコード手段と
を具備し、 前記第1の命令に従う前記演算回路のキャリー付き加減
算によって同演算回路から出力されるキャリービットを
前記第2の命令のデスティネーション指定フィールドで
指定される汎用レジスタに書込むようにしたことを特徴
とする並列演算処理装置におけるキャリー付き加減算処
理方式。
1. A plurality of arithmetic circuits capable of operating in parallel, and a general-purpose register group used for storing operation target data and operation result data of the plurality of arithmetic circuits are provided. In a parallel processing device capable of processing, a second instruction which is an auxiliary instruction of a first instruction designating addition / subtraction with carry, and is referred to when carrying out addition / subtraction processing with carry designated by the first instruction. A source designating field for designating the register in the general-purpose register group as a storage source of the carry bit to be stored, and a destination designating field for designating the register in the general-purpose register group as a storage destination of the carry bit generated by addition / subtraction with carry. A means to define the second instruction, and a deco that controls the decoding processing of a plurality of instructions to be processed in parallel. General purpose register designated by a source designation field of the second instruction when a plurality of instructions including the first instruction and the second instruction are given as instructions to be processed in parallel. Read the carry bit inside,
Decoding means for supplying to an arithmetic circuit that performs addition / subtraction with carry according to the first instruction among the plurality of arithmetic circuits, and is output from the arithmetic circuit by addition / subtraction with carry of the arithmetic circuit according to the first instruction. A carry bit addition / subtraction processing method in a parallel processing device, wherein a carry bit is written into a general-purpose register designated by a destination designation field of the second instruction.
JP3286259A 1991-10-31 1991-10-31 Addition / subtraction processing method with carry in parallel processing unit Expired - Fee Related JP2851192B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3286259A JP2851192B2 (en) 1991-10-31 1991-10-31 Addition / subtraction processing method with carry in parallel processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3286259A JP2851192B2 (en) 1991-10-31 1991-10-31 Addition / subtraction processing method with carry in parallel processing unit

Publications (2)

Publication Number Publication Date
JPH05127902A true JPH05127902A (en) 1993-05-25
JP2851192B2 JP2851192B2 (en) 1999-01-27

Family

ID=17702056

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3286259A Expired - Fee Related JP2851192B2 (en) 1991-10-31 1991-10-31 Addition / subtraction processing method with carry in parallel processing unit

Country Status (1)

Country Link
JP (1) JP2851192B2 (en)

Also Published As

Publication number Publication date
JP2851192B2 (en) 1999-01-27

Similar Documents

Publication Publication Date Title
US5269007A (en) RISC system capable of simultaneously executing data interlocked shift and arithmetic/logic instructions in one clock cycle by bypassing register
US4954943A (en) Data processing system
JPH09311786A (en) Data processor
JPS6313215B2 (en)
US7546442B1 (en) Fixed length memory to memory arithmetic and architecture for direct memory access using fixed length instructions
JP3449186B2 (en) Data processing device having pipeline bypass function
JPS61107431A (en) Arithmetic unit
JP2620511B2 (en) Data processor
KR102584001B1 (en) Vector arithmetic instructions
EP0378415A2 (en) Multiple instruction dispatch mechanism
US5307300A (en) High speed processing unit
JPH05150979A (en) Immediate operand expansion system
JPH03286332A (en) Digital data processor
JPH1165839A (en) Instruction control mechanism of processor
KR960011683A (en) Microprocessors that execute instructions with operand fields, including parts used as part of opcode
JP2851192B2 (en) Addition / subtraction processing method with carry in parallel processing unit
JP2843844B2 (en) Parallel processing unit
JPS62251930A (en) Information processor
US20050228970A1 (en) Processing unit with cross-coupled alus/accumulators and input data feedback structure including constant generator and bypass to reduce memory contention
JP2667810B2 (en) Vector processing equipment
JPH0758459B2 (en) Micro program controller
JP2005134987A (en) Pipeline arithmetic processor
JPH0546389A (en) Parallel processor
JPH03204029A (en) Information processor
WO1989004518A1 (en) Register interference preventing method

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees