JP3462670B2 - Calculation execution method and calculation device - Google Patents

Calculation execution method and calculation device

Info

Publication number
JP3462670B2
JP3462670B2 JP22797296A JP22797296A JP3462670B2 JP 3462670 B2 JP3462670 B2 JP 3462670B2 JP 22797296 A JP22797296 A JP 22797296A JP 22797296 A JP22797296 A JP 22797296A JP 3462670 B2 JP3462670 B2 JP 3462670B2
Authority
JP
Japan
Prior art keywords
arithmetic
inversion
instruction
bit
operand
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 - Fee Related
Application number
JP22797296A
Other languages
Japanese (ja)
Other versions
JPH1069372A (en
Inventor
浩二 黒田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP22797296A priority Critical patent/JP3462670B2/en
Publication of JPH1069372A publication Critical patent/JPH1069372A/en
Application granted granted Critical
Publication of JP3462670B2 publication Critical patent/JP3462670B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、少なくとも、命令
コードを逐次解釈して演算装置により固定小数点演算
や、浮動小数点演算を実行するプロセッサの演算実行方
法及び演算装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic execution method and an arithmetic unit for a processor that at least interprets instruction codes sequentially and executes fixed point arithmetic and floating point arithmetic by an arithmetic unit.

【0002】[0002]

【従来の技術】以下、図に基づいて従来例を説明する。 §1:従来のプロセッサと、命令フィールドの説明・・
・図11参照 図11は従来の命令フィールド説明図である。以下、従
来のプロセッサと、命令フィールドについて説明する。
従来、少なくとも、命令コードを逐次読み出し、命令を
解釈して、演算装置により固定小数点演算や、浮動小数
点演算を実行するプロセッサが知られていた。
2. Description of the Related Art A conventional example will be described below with reference to the drawings. §1: Description of conventional processor and instruction field ...
-Refer to FIG. 11 FIG. 11 is an explanatory diagram of a conventional instruction field. The conventional processor and the instruction field will be described below.
Conventionally, there has been known a processor that at least sequentially reads an instruction code, interprets the instruction, and executes a fixed-point operation or a floating-point operation by an arithmetic device.

【0003】このようなプロセッサで使用する命令で
は、例えば、図11のように、命令フィールドに、命令
コードと、オペランドA(以下、単に「A」とも記す)
と、オペランドB(以下、単に「B」とも記す)と、オ
ペランドC(以下、単に「C」とも記す)と、オペラン
ドD(以下、単に「D」とも記す)を表す領域が定義さ
れている。
In an instruction used in such a processor, for example, as shown in FIG. 11, an instruction code and an operand A (hereinafter also simply referred to as "A") are included in an instruction field.
, An area representing an operand B (hereinafter, also simply referred to as “B”), an operand C (hereinafter, simply referred to as “C”), and an operand D (hereinafter also simply referred to as “D”) are defined. .

【0004】通常の場合は、オペランドAの領域ではデ
ータAを格納するレジスタの番号を指定し、オペランド
Bの領域ではデータBを格納するレジスタの番号を指定
し、オペランドCの領域ではデータCを格納するレジス
タの番号を指定する。また、オペランドDの領域ではデ
ータD、すなわち、演算結果を格納するレジスタの番号
を指定する。
In the usual case, the number of the register storing the data A is designated in the area of the operand A, the number of the register storing the data B is designated in the area of the operand B, and the data C is designated in the area of the operand C. Specify the register number to store. In the area of the operand D, the data D, that is, the number of the register for storing the operation result is designated.

【0005】そして、乗加算命令の場合、乗算の入力に
オペランドAとオペランドBが対応し、加算の入力にオ
ペランドCが対応している。この場合、演算結果はオペ
ランドDに対応する。また、乗算や、加算命令等の入力
2オペランド命令の場合は、入力がオペランドAと、オ
ペランドBが対応し、演算結果はオペランドDが対応す
る。
In the case of the multiply-add instruction, the operand A and the operand B correspond to the input of multiplication, and the operand C corresponds to the input of addition. In this case, the operation result corresponds to the operand D. In the case of an input two-operand instruction such as multiplication or addition instruction, the input corresponds to the operand A and the operand B, and the operation result corresponds to the operand D.

【0006】前記のように、命令フィールドに定義され
るオペランドには、通常の場合、レジスタ番号が入る
が、即値の場合もあり、直接演算されることもある。こ
のように定義された演算方式において、乗加(減)算命
令の場合は、A*B+(−)C=D、乗算命令の場合
は、A*B=D、加(減)算命令の場合は、A+(−)
B=Dの演算を実行する。
As described above, the operand defined in the instruction field normally contains a register number, but it may be an immediate value or may be directly calculated. In the operation method defined in this way, A * B + (−) C = D in the case of a multiplication / addition (subtraction) instruction, A * B = D in the case of a multiplication instruction, and the addition / subtraction instruction In the case, A + (-)
The calculation of B = D is executed.

【0007】§2:演算装置の説明・・・図12〜図1
7参照 以下、図12〜図17に基づいて従来の演算装置を説明
する。 (1) :浮動小数点乗加算演算装置の説明・・・図12参
照 図12は従来の浮動小数点乗加算演算装置を示した図で
ある。この演算装置には、演算器20とデータ入力部2
1を備え、前記演算器20には、データ入力部21から
の各オペランドの入力データ7−1、7−2、7−3が
入力する。この場合、入力データ7−1はオペランド
A、7−2はオペランドB、7−3はオペランドCの各
入力データが対応する。
§2: Description of arithmetic unit ... FIGS. 12 to 1
7 will be described below with reference to FIGS. 12 to 17. (1): Description of Floating-Point Multiply-Addition Arithmetic Unit--See FIG. 12 FIG. 12 is a diagram showing a conventional floating-point multiply-addition arithmetic unit. This arithmetic unit includes an arithmetic unit 20 and a data input unit 2.
1, the input data 7-1, 7-2, 7-3 of each operand from the data input unit 21 is input to the arithmetic unit 20. In this case, the input data 7-1 corresponds to the operand A, 7-2 corresponds to the operand B, and 7-3 corresponds to the operand C.

【0008】また、演算器20には、オペランドBの入
力データ7−2をデコードするデコーダ7−12と、倍
数発生器7−13と、桁上げ保存加算器7−14と、桁
上げ伝搬加算器7−15と、シフタ7−16、7−1
7、7−21と、桁上げ伝搬加算器7−19と、反転回
路7−18、7−20と、丸め回路7−22を備えてお
り、浮動小数点乗加算演算による演算結果7−23を得
る。
Further, the arithmetic unit 20 includes a decoder 7-12 for decoding the input data 7-2 of the operand B, a multiple generator 7-13, a carry save adder 7-14, and carry propagation addition. Vessel 7-15 and shifters 7-16, 7-1
7, 7-21, a carry propagation adder 7-19, inverting circuits 7-18, 7-20, and a rounding circuit 7-22. obtain.

【0009】前記浮動小数点乗加算演算装置で乗加算命
令を実行する場合、乗算の入力にオペランドAの入力デ
ータ7−1と、オペランドBの入力データ7−2が対応
し、加算の入力にオペランドCの入力データ7−3が対
応している。この場合、オペランドDは演算結果7−2
3に対応する。なお、浮動小数点演算方法そのものは、
良く知られた方法であり、かつ、本特許では直接関係な
いので説明は省略する。
When the multiplication / addition instruction is executed by the floating point multiplication / addition arithmetic unit, the input data 7-1 of the operand A and the input data 7-2 of the operand B correspond to the input of the multiplication, and the operand input to the addition. Corresponding to the input data 7-3 of C. In this case, the operand D is the operation result 7-2.
Corresponds to 3. The floating point arithmetic method itself is
Since this is a well-known method and is not directly related to this patent, its explanation is omitted.

【0010】(2) :浮動小数点乗算演算装置の説明・・
・図13参照 図13は従来の浮動小数点乗算演算装置を示した図であ
る。この演算装置には、演算器20とデータ入力部21
を備え、前記演算器20にデータ入力部21からの入力
データ8−1、8−2が入力する。この場合、入力デー
タ8−1はオペランドA、8−2はオペランドBの各入
力データが対応する。
(2): Description of floating-point multiplication arithmetic unit
-Refer to FIG. 13 FIG. 13 is a diagram showing a conventional floating-point multiplication arithmetic unit. This arithmetic unit includes an arithmetic unit 20 and a data input unit 21.
And the input data 8-1 and 8-2 from the data input unit 21 are input to the arithmetic unit 20. In this case, the input data 8-1 corresponds to the operand A and the input data 8-2 corresponds to the operand B.

【0011】また、演算器20には、入力データ8−2
をデコードするデコーダ8−12と、倍数発生器8−1
3と、桁上げ保存加算器8−14と、桁上げ伝搬加算器
8−15と、シフタ8−16と、丸め回路8−22を備
えており、浮動小数点乗算演算による演算結果8−23
を得る。前記浮動小数点乗算演算装置で乗算命令を実行
する場合、乗算の入力にオペランドAの入力データ8−
1と、オペランドBの入力データ8−2が対応してい
る。この場合、オペランドDは演算結果8−23に対応
する。
Further, the input data 8-2 is input to the arithmetic unit 20.
A decoder 8-12 for decoding the
3, carry save adder 8-14, carry propagate adder 8-15, shifter 8-16, and rounding circuit 8-22. Operation result 8-23 by floating point multiplication operation
To get When the multiplication instruction is executed by the floating point multiplication arithmetic unit, the input data 8 of the operand A is input to the multiplication.
1 corresponds to the input data 8-2 of the operand B. In this case, the operand D corresponds to the operation result 8-23.

【0012】(3) :浮動小数点加算演算装置の説明・・
・図14参照 図14は従来の浮動小数点加算演算装置を示した図であ
る。この演算装置には、演算器20とデータ入力部21
を備え、前記演算器20にデータ入力部からの入力デー
タ9−1、9−2が入力する。この場合、入力データ9
−1はオペランドA、9−2はオペランドBの各入力デ
ータが対応する。
(3): Description of floating point addition arithmetic unit
-Refer to FIG. 14 FIG. 14 is a diagram showing a conventional floating point addition arithmetic unit. This arithmetic unit includes an arithmetic unit 20 and a data input unit 21.
And the input data 9-1 and 9-2 from the data input section are input to the arithmetic unit 20. In this case, input data 9
-1 corresponds to operand A, and 9-2 corresponds to operand B.

【0013】また、演算器にはシフタ9−16、9−1
7、9−21と、桁上げ伝搬加算器9−19と、反転回
路9−18、9−20と、丸め回路9−22を備えてお
り、浮動小数点加算演算による演算結果9−23を得
る。前記浮動小数点加算演算装置で加算命令を実行する
場合、乗算の入力にオペランドAの入力データ9−1
と、オペランドBの入力データ9−2が対応している。
この場合、オペランドDは演算結果9−23に対応す
る。
Further, the arithmetic units include shifters 9-16 and 9-1.
7, 9-21, carry propagation adder 9-19, inverting circuits 9-18, 9-20, and rounding circuit 9-22, and obtains a calculation result 9-23 by floating-point addition calculation. . When the addition instruction is executed by the floating point addition arithmetic unit, the input data 9-1 of the operand A is input to the multiplication.
And the input data 9-2 of the operand B correspond.
In this case, the operand D corresponds to the operation result 9-23.

【0014】(4) :固定小数点乗加算演算装置の説明・
・・図15参照 図15は従来の固定小数点乗加算演算装置を示した図で
ある。この演算装置には、演算器20とデータ入力部2
1を備え、前記演算器20にデータ入力部からの入力デ
ータ10−1、10−2、10−3が入力する。この場
合、入力データ10−1はオペランドA、10−2はオ
ペランドB、10−3はオペランドCの各入力データが
対応する。
(4): Description of fixed point multiplication / addition arithmetic unit
..Refer to FIG. 15 FIG. 15 is a diagram showing a conventional fixed point multiplication / addition calculation device. This arithmetic unit includes an arithmetic unit 20 and a data input unit 2.
1, and input data 10-1, 10-2, 10-3 from the data input section is input to the arithmetic unit 20. In this case, the input data 10-1 corresponds to the operand A, the input data 10-2 corresponds to the operand B, and the input data 10-3 corresponds to the input data C.

【0015】また、演算器20には、入力データ10−
2をデコードするデコーダ10−12と、倍数発生器1
0−13と、桁上げ保存加算器10−14と、桁上げ伝
搬加算器10−15と、桁上げ伝搬加算器10−19
と、反転回路10−18を備えており、固定小数点乗加
算演算による演算結果10−23を得る。
In addition, the input data 10-
Decoder 10-12 for decoding 2 and multiple generator 1
0-13, carry save adder 10-14, carry propagate adder 10-15, carry propagate adder 10-19
And an inverting circuit 10-18 to obtain a calculation result 10-23 by a fixed-point multiplication / addition calculation.

【0016】前記固定小数点乗加算演算装置で乗加算命
令を実行する場合、乗算の入力にオペランドAの入力デ
ータ10−1と、オペランドBの入力データ10−2が
対応し、加算の入力にオペランドCの入力データ10−
3が対応している。この場合、オペランドDは演算結果
10−23に対応する。
When executing the multiplication / addition instruction in the fixed-point multiplication / addition arithmetic unit, the input data 10-1 of the operand A and the input data 10-2 of the operand B correspond to the input of the multiplication, and the input of the addition is the operand. Input data of C 10-
3 corresponds. In this case, the operand D corresponds to the operation result 10-23.

【0017】この固定小数点乗加算演算装置による固定
小数点乗加(減)算命令の動作は、次の通りである。先
ず、オペランドBの入力データ10−2をデコーダ10
−2でデコードして倍数制御信号を作成し、その倍数制
御信号と、オペランドAの入力データ10−1を倍数発
生器10−13へ入力し、倍数を発生させる。次に、発
生させた倍数を桁上げ保存加算器10−14、桁上げ伝
搬加算器10−15で加算し、乗算結果を得る。
The operation of the fixed point multiplication addition (subtraction) operation instruction by this fixed point multiplication addition operation device is as follows. First, the input data 10-2 of the operand B is transferred to the decoder 10
-2 to generate a multiple control signal, and input the multiple control signal and the input data 10-1 of the operand A to the multiple generator 10-13 to generate a multiple. Next, the generated multiples are added by the carry save adder 10-14 and the carry propagation adder 10-15 to obtain the multiplication result.

【0018】一方、加算の場合は、乗算結果とオペラン
ドCの入力データ10−3を入力とし、桁上げ伝搬加算
器10−19で加算し、オペランドDに対応した演算結
果10−23を得る。また、減算の場合は、オペランド
Cの入力データを反転回路10−18でビット反転し、
1の補数を桁上げ伝搬加算器1−19の入力にし、更
に、+1することで減算することができる。なお、+1
する回路は、減算を実行することが出来る加算器は全て
備えており、簡単な回路で実現出来ている。
On the other hand, in the case of addition, the multiplication result and the input data 10-3 of the operand C are input and are added by the carry propagation adder 10-19 to obtain the operation result 10-23 corresponding to the operand D. In the case of subtraction, the input data of the operand C is bit-inverted by the inversion circuit 10-18,
The 1's complement can be input to the carry propagation adder 1-19, and can be further incremented by 1 to perform subtraction. +1
The circuit to be provided is equipped with all adders capable of executing subtraction, and can be realized by a simple circuit.

【0019】(5) :固定小数点乗算演算装置の説明・・
・図16参照 図16は従来の固定小数点乗算演算装置を示した図であ
る。この演算装置には、演算器20とデータ入力部21
を備え、前記演算器20にデータ入力部21からの入力
データ11−1、11−2が入力する。この場合、入力
データ11−1はオペランドA、11−2はオペランド
Bの各入力データが対応する。
(5): Description of fixed-point multiplication arithmetic unit
-Refer to FIG. 16 FIG. 16 is a diagram showing a conventional fixed-point multiplication arithmetic unit. This arithmetic unit includes an arithmetic unit 20 and a data input unit 21.
The input data 11-1 and 11-2 from the data input unit 21 are input to the arithmetic unit 20. In this case, the input data 11-1 corresponds to each operand A, and the input data 11-2 corresponds to each operand B.

【0020】また、演算器20には、入力データ11−
2をデコードするデコーダ11−12と、倍数発生器1
1−13と、桁上げ保存加算器11−14と、桁上げ伝
搬加算器11−15を備えており、固定小数点乗算演算
による演算結果11−23を得る。前記固定小数点乗算
演算装置で乗算命令を実行する場合、乗算の入力にオペ
ランドAの入力データ11−1と、オペランドBの入力
データ11−2が対応している。この場合、オペランド
Dは演算結果11−23に対応する。この固定小数点乗
算演算装置による固定小数点乗算命令の動作は、次の通
りである。
The input data 11-
Decoder 11-12 for decoding 2 and multiple generator 1
1 to 13, a carry save adder 11-14, and a carry propagation adder 11-15, and obtains an operation result 11-23 by a fixed-point multiplication operation. When the multiplication instruction is executed by the fixed-point multiplication arithmetic unit, the input of the multiplication corresponds to the input data 11-1 of the operand A and the input data 11-2 of the operand B. In this case, the operand D corresponds to the operation result 11-23. The operation of the fixed-point multiplication instruction by this fixed-point multiplication arithmetic unit is as follows.

【0021】先ず、オペランドBの入力データ11−2
をデコーダ11−12でデコードして倍数制御信号を作
成し、その倍数制御信号と、オペランドAの入力データ
11−1を倍数発生器11−13へ入力し、倍数を発生
させる。次に、発生させた倍数を桁上げ保存加算器11
−14、桁上げ伝搬加算器11−15で加算し、乗算結
果11−23を得る。
First, the input data 11-2 of the operand B
Is decoded by the decoder 11-12 to generate a multiple control signal, and the multiple control signal and the input data 11-1 of the operand A are input to the multiple generator 11-13 to generate a multiple. Next, a carry save adder 11 for the generated multiple
-14, carry propagation adder 11-15 adds, and a multiplication result 11-23 is obtained.

【0022】(6) :固定小数点乗加算演算装置の説明・
・・図17参照 図17は従来の固定小数点加算演算装置を示した図であ
る。この演算装置には、演算器20とデータ入力部21
を備え、前記演算器20にデータ入力部からの入力デー
タ12−1、12−2が入力する。この場合、入力デー
タ12−1はオペランドA、12−2はオペランドBの
各入力データが対応する。また、演算器20には、桁上
げ伝搬加算器12−19と、反転回路12−18を備え
ており、固定小数点加算演算による演算結果12−23
を得る。
(6): Description of fixed-point multiply-add arithmetic unit
..Refer to FIG. 17 FIG. 17 is a diagram showing a conventional fixed point addition arithmetic unit. This arithmetic unit includes an arithmetic unit 20 and a data input unit 21.
And the input data 12-1 and 12-2 from the data input section are input to the arithmetic unit 20. In this case, the input data 12-1 corresponds to each operand A, and the input data 12-2 corresponds to each operand B. Further, the arithmetic unit 20 is provided with a carry propagation adder 12-19 and an inverting circuit 12-18.
To get

【0023】この固定小数点加算演算装置による固定小
数点加算命令の動作は、次の通りである。先ず、オペラ
ンドAの入力データ12−1と、オペランドBの入力デ
ータ12−2を反転回路12−18でビット反転させた
データを桁上げ伝搬加算器12−19で加算し、オペラ
ンドDに対応した演算結果12−23を得る。
The operation of the fixed-point addition instruction by this fixed-point addition arithmetic unit is as follows. First, the input data 12-1 of the operand A and the input data 12-2 of the operand B are bit-inverted by the inversion circuit 12-18 and added by the carry propagation adder 12-19 to correspond to the operand D. The calculation result 12-23 is obtained.

【0024】[0024]

【発明が解決しようとする課題】前記のような従来のも
のにおいては、次のような課題があった。 (1) :前記のように、命令コードを逐次読み出し、命令
を解釈し、固定小数点演算や、浮動小数点演算を実行す
るプロセッサにおいて、命令フィールドに、命令コード
と、オペランドA、B、C、Dを表す領域が定義されて
いる。この場合、命令フィールドに定義されるオペラン
ドは、通常の場合、レジスタ番号が入るが、即値の場合
もあり、直接演算されることもある。
SUMMARY OF THE INVENTION The above-mentioned conventional device has the following problems. (1): As described above, in the processor that sequentially reads the instruction code, interprets the instruction, and executes the fixed-point operation or the floating-point operation, the instruction code and the operands A, B, C, and D in the instruction field. The area that represents is defined. In this case, the operand defined in the instruction field normally contains a register number, but may be an immediate value or may be directly calculated.

【0025】このように定義された演算方式において、
乗加(減)算命令の場合は、A*B+(−)C=D、乗
算命令の場合は、A*B=D、加(減)算命令の場合
は、A+(−)B=Dの演算を実行する。しかし、式の
先頭等にマイナスの符号がある場合は次のようになる。
すなわち、演算式がx=−m−nの場合、ハード命令は
次のようになる。
In the operation system defined in this way,
A * B + (−) C = D for multiply / add (subtract) instructions, A * B = D for multiply instructions, and A + (−) B = D for add / subtract instructions. Perform the operation of. However, if there is a minus sign at the beginning of the expression, the result is as follows.
That is, when the arithmetic expression is x = -m-n, the hard instruction is as follows.

【0026】[0026]

【表1】 [Table 1]

【0027】前記のように、減算が2命令(前記「su
b」が減算命令)実行される。また、レジスタも余計に
使用される。更に、減算量が多い時など、メモリを使用
する場合はメモリも余計に使用されることもあり得る。
As described above, the subtraction requires two instructions (the above-mentioned "su"
b "is a subtraction instruction) is executed. In addition, registers are also used excessively. Further, when the memory is used, such as when the amount of subtraction is large, the memory may be used excessively.

【0028】(2) :例えば、次の式を考える。(2): For example, consider the following equation.

【0029】[0029]

【表2】 [Table 2]

【0030】前記のように、加算、減算、乗算それぞれ
4通り、乗加算、乗減算それぞれ8通り、合計28通り
の組み合わせがあり、全ての命令コードを設けると命令
コード数が多くなり、命令解釈回路が複雑になる。ま
た、命令コードが多いことで、総命令コード数に制限が
あり、高速化に寄与する新規命令を追加することが困難
になってきている。
As described above, there are a total of 28 combinations of addition, subtraction, multiplication of 4 ways, multiplication addition and subtraction of 8 ways, and a total of 28 combinations. The circuit becomes complicated. Also, since there are many instruction codes, the total number of instruction codes is limited, and it is becoming difficult to add new instructions that contribute to speeding up.

【0031】(3) :図11のフォーマットでベクトルオ
ペランドを入力とし、ベクトル演算を行うベクトルプロ
セッサにおいて、ベクトルオペランド同士の演算は、前
記の説明のように行うが、スカラオペランドを含む演算
になると、オペランド位置を簡単に入れ換えるようなこ
とはできない。例えば、以下の場合、演算式、x=−m
+nを変形してx=n−mとし、ハード命令を次のよう
にする。
(3): In the vector processor that inputs vector operands in the format of FIG. 11 and performs vector operation, the operation between vector operands is performed as described above, but when the operation includes scalar operands, You cannot easily swap the operand positions. For example, in the following case, the arithmetic expression, x = -m
+ N is transformed into x = n−m, and the hard instruction is as follows.

【0032】[0032]

【表3】 [Table 3]

【0033】前記のように、演算式を変形することで命
令数を減らすことができる。また、ベクトルオペランド
同士も同様である。しかし、スカラオペランドを含むベ
クトルスカラ命令は、スカラオペランドのオペランド位
置が固定しているため、前記のような変形はできない。
As described above, the number of instructions can be reduced by modifying the arithmetic expression. The same applies to vector operands. However, the vector scalar instruction including the scalar operand cannot be modified as described above because the operand position of the scalar operand is fixed.

【0034】例えば、オペランドAにスカラオペランド
が固定されているため、以下のように変形して1命令で
演算できない。すなわち、ベクトル命令をオペランド
A、オペランドB、オペランドDで構成する。ここで、
オペランドAがベクトル又はスカラオペランドであり、
オペランドBがベクトルオペランドであり、オペランド
Dがベクトルオペランドであるとする。この時、演算
式、x=−Sm+Vnをx=Vn=Smと変形し、ハー
ド命令を次のようにする。
For example, since the scalar operand is fixed to the operand A, the operation is modified as follows and one instruction cannot be operated. That is, a vector instruction is composed of operand A, operand B, and operand D. here,
Operand A is a vector or scalar operand,
Assume that operand B is a vector operand and operand D is a vector operand. At this time, the arithmetic expression, x = -Sm + Vn, is transformed into x = Vn = Sm, and the hardware instruction is as follows.

【0035】[0035]

【表4】 [Table 4]

【0036】前記のように演算式を変形したが、前記
「VSUB」命令(ベクトル減算命令)のオペランドA
がベクトルオペランド、オペランドBがスカラオペラン
ドになるため、演算は実現できない。
Although the arithmetic expression is modified as described above, the operand A of the "VSUB" instruction (vector subtraction instruction) is changed.
Is a vector operand and operand B is a scalar operand, so the operation cannot be realized.

【0037】(4) :ベクトル命令における命令のバリエ
ーションは、次のようになる。
(4): The variation of the instruction in the vector instruction is as follows.

【0038】[0038]

【表5】 [Table 5]

【0039】但し、前記VAはベクトルオペランドA、
VBはベクトルオペランドB、VCはベクトルオペラン
ドC、VDはベクトルオペランドDを示す。この場合、
加減算、乗算それぞれ12通り、乗加算、乗減算それぞ
れ56通り、合計148通りの組み合わせがあり、全て
の命令コードを設けるとなると、命令コード数が多くな
り、命令解釈回路が複雑になる。また、命令コードが多
いことで、総命令コード数に制限があり、高速化に寄与
する新規命令を追加することが困難になってきている。
However, VA is a vector operand A,
VB indicates a vector operand B, VC indicates a vector operand C, and VD indicates a vector operand D. in this case,
There are a total of 148 combinations of addition / subtraction, multiplication for each 12 ways, multiplication / addition, multiplication / subtraction for 56 ways, and if all instruction codes are provided, the number of instruction codes increases and the instruction interpretation circuit becomes complicated. Also, since there are many instruction codes, the total number of instruction codes is limited, and it is becoming difficult to add new instructions that contribute to speeding up.

【0040】(5) :スカラ命令における命令のバリエー
ションは、次のようになる。
(5): The variation of the instruction in the scalar instruction is as follows.

【0041】[0041]

【表6】 [Table 6]

【0042】前記のように、スカラ命令として21命令
が必要である。この場合にも前記ベクトル命令と同様
に、命令コードが多いことで、総命令コード数に制限が
あり、高速化に寄与する新規命令を追加することが困難
になってきている。
As described above, 21 instructions are required as scalar instructions. In this case as well, as in the case of the vector instruction, the large number of instruction codes limits the total number of instruction codes, making it difficult to add new instructions that contribute to speeding up.

【0043】本発明は、このような従来の課題を解決
し、ほんの僅かな物量の追加と、数ビットの制御ビット
を追加するだけで、演算命令数を従来より減らすことが
できるようにすると共に、演算装置による演算を効率良
く、かつ高速に実行ができるようにすることを目的とす
る。
The present invention solves such a conventional problem, and makes it possible to reduce the number of operation instructions from the conventional one by adding only a small amount of material and adding a few control bits. It is an object of the present invention to enable efficient and high-speed execution of arithmetic operations by an arithmetic device.

【0044】[0044]

【課題を解決するための手段】図1は本発明の原理説明
図である。本発明は前記の目的を達成するため、次のよ
うに構成した。 (1) :少なくとも、命令を逐次解釈し演算装置により演
算命令を実行するプロセッサにおいて、演算命令のフィ
ールド中に、個々のオペランドにそれぞれ対応して反転
ビットを設け、前記反転ビットを演算装置の制御データ
として入力し、前記反転ビットが反転を指示する値であ
れば、前記演算装置により、そのビットに対応するオペ
ランドの値を(−1)倍した値として演算を実行するよ
うに構成した。
FIG. 1 is a diagram for explaining the principle of the present invention. The present invention is configured as follows to achieve the above object. (1): At least in a processor that sequentially interprets instructions and executes the arithmetic instructions by the arithmetic unit, provide an inversion bit corresponding to each operand in the field of the arithmetic instruction, and control the inversion bit by the arithmetic unit When the data is inputted as data and the inversion bit has a value indicating inversion, the arithmetic unit is configured to execute the operation by multiplying the value of the operand corresponding to the bit by (-1).

【0045】(2) :前記(1) において、演算命令が浮動
小数点演算命令で、入力オペランドに対応する反転ビッ
トがビット反転を指示する値の場合、演算装置により、
そのビットに対応するオペランドの符号ビットを反転し
てから演算を実行するように構成した。
(2): In the above (1), when the arithmetic instruction is a floating point arithmetic instruction and the inversion bit corresponding to the input operand is a value indicating bit inversion, the arithmetic unit
The operation is performed after inverting the sign bit of the operand corresponding to that bit.

【0046】(3) :前記(1) において、演算命令が固定
小数点演算命令の場合、入力オペランドに対応する反転
ビットと演算命令コードを組み合わせて演算制御信号C
1、C2を作成し、この演算制御信号C1、C2で演算
装置の演算操作を制御し、演算を実行するように構成し
た。
(3): In the above (1), when the operation instruction is a fixed-point operation instruction, the operation control signal C is obtained by combining the inversion bit corresponding to the input operand and the operation instruction code.
1 and C2 are created, and the operation control signals C1 and C2 are used to control the arithmetic operation of the arithmetic device to execute the arithmetic operation.

【0047】(4) :前記(1) において、演算命令が減算
命令の場合、演算装置により、減算命令を加算命令とし
て実行するように構成した。 (5) :演算命令のフィールド中に、個々のオペランドに
それぞれ対応して、各オペランドの符号ビットの反転/
非反転を指示する反転ビットを設けると共に、少なくと
も、浮動小数点演算器(演算器20に対応)を備え、演
算命令を逐次解釈し実行するプロセッサの演算装置であ
って、反転ビットa、b、cを制御データとして入力す
る制御データ入力部22と、反転ビットa、b、cのそ
れぞれに対応させた符号反転回路1−8、1−9、1−
10を設け、符号反転回路1−8、1−9、1−10
は、それぞれ浮動小数点データの符号ビットと、対応す
る反転ビットを入力し、前記反転ビットの指示に従って
前記符号ビットを反転/非反転処理し、その出力が浮動
小数点演算器のオペランド入力となるように構成した。
(4): In the above (1), when the arithmetic instruction is a subtraction instruction, the arithmetic unit is configured to execute the subtraction instruction as an addition instruction. (5): Inverts the sign bit of each operand in the operation instruction field, corresponding to each operand.
An inversion bit for instructing non-inversion, and at least a floating point arithmetic unit (corresponding to the arithmetic unit 20), which is an arithmetic unit of a processor for sequentially interpreting and executing arithmetic instructions, wherein the inversion bits a, b, c Control data input section 22 for inputting as control data and sign inversion circuits 1-8, 1-9, 1-corresponding to inversion bits a, b and c, respectively.
10 is provided, and the sign inversion circuits 1-8, 1-9, 1-10
Respectively inputs the sign bit of the floating point data and the corresponding inversion bit, inverts / non-inverts the sign bit according to the instruction of the inversion bit, and makes its output the operand input of the floating point arithmetic unit. Configured.

【0048】(6) :演算命令のフィールド中に、個々の
オペランドにそれぞれ対応して、各オペランドの符号ビ
ットの反転/非反転を指示する反転ビットを設けると共
に、少なくとも、固定小数点演算器(演算器20に対
応)を備え、演算命令を逐次解釈し実行するプロセッサ
の演算装置であって、前記反転ビットa、b、c及び演
算命令コードf(f:固定小数点演算命令コード)を制
御データとして入力する制御データ入力部22と、演算
制御回路1−11を設け、かつ、固定小数点演算器に補
数変換回路を設け、演算制御回路1−11は、反転ビッ
トa、b、c及び演算命令コードfを入力して演算制御
信号C1、C2を生成し、演算制御信号C1、C2で固
定小数点演算器の演算操作を制御する構成とし、補数変
換回路は、固定小数点演算器出力(桁上げ伝搬加算器1
−19の出力)と演算制御回路1−11からの補数変換
用の演算制御信号C2を入力して補数変換を行う構成と
した。
(6): In the field of the operation instruction, an inversion bit for instructing inversion / non-inversion of the sign bit of each operand is provided corresponding to each operand, and at least a fixed point arithmetic unit (operation (Corresponding to the device 20), which sequentially interprets and executes arithmetic instructions, wherein the inversion bits a, b, c and the arithmetic instruction code f (f: fixed-point arithmetic instruction code) are used as control data. The control data input unit 22 for inputting and the arithmetic control circuit 1-11 are provided, and the complement conversion circuit is provided in the fixed-point arithmetic unit. The arithmetic control circuit 1-11 uses the inversion bits a, b, c and the operation instruction code. f is input to generate the operation control signals C1 and C2, and the operation control signals C1 and C2 are used to control the operation of the fixed-point arithmetic unit. Operation unit output (carry propagation adder 1
-19 output) and the operation control signal C2 for complement conversion from the operation control circuit 1-11 are input to perform complement conversion.

【0049】(7) :演算命令のフィールド中に、個々の
オペランドにそれぞれ対応して、各オペランドの符号ビ
ットの反転/非反転を指示する反転ビットを設けると共
に、少なくとも、固定小数点演算及び浮動小数点演算の
両方を実行する演算器20を備え、演算命令を逐次解釈
し実行するプロセッサの演算装置であって、前記反転ビ
ットa、b、c及び命令コードe、f(e:浮動小数点
演算命令、f:固定小数点演算命令)を制御データとし
て入力する制御データ入力部22と、反転ビットa、
b、cのそれぞれに対応させた符号反転回路1−8、1
−9、1−10と、演算制御回路1−11を設け、か
つ、演算器20に補数変換回路を設け、符号反転回路1
−8、1−9、1−10は、浮動小数点データの符号ビ
ットと、対応する反転ビットと、演算命令コードeを入
力し、前記反転ビットの指示に従って符号ビットを反転
/非反転処理し、その出力が演算器20のオペランド入
力となる構成とし、演算制御回路1−11は、反転ビッ
トa、b、c及び演算命令コードfを入力して演算制御
信号C1、C2を生成し、その演算制御信号C1、C2
で演算器20の演算操作を制御する構成とし、補数変換
回路は、演算器20の出力(桁上げ伝搬加算器1−19
の出力)と、前記演算制御回路1−11からの補数変換
用の演算制御信号C2を入力して補数変換を行う構成と
した。
(7): In the field of the operation instruction, an inversion bit for instructing the inversion / non-inversion of the sign bit of each operand is provided corresponding to each operand, and at least fixed-point operation and floating-point operation are performed. An arithmetic unit of a processor, comprising an arithmetic unit 20 for executing both operations, for sequentially interpreting and executing arithmetic instructions, said inversion bits a, b, c and instruction codes e, f (e: floating point arithmetic instruction, f: fixed-point arithmetic instruction) for inputting control data as control data, and an inversion bit a,
Sign inversion circuits 1-8 and 1 corresponding to b and c, respectively.
-9, 1-10 and the operation control circuit 1-11, and the operation unit 20 is provided with the complement conversion circuit.
-8, 1-9, and 1-10 input the sign bit of the floating point data, the corresponding inversion bit, and the operation instruction code e, and invert / non-invert the sign bit according to the instruction of the inversion bit, The operation control circuit 1-11 receives the inverted bits a, b and c and the operation instruction code f to generate operation control signals C1 and C2, and the operation thereof is performed. Control signals C1 and C2
The arithmetic operation of the arithmetic unit 20 is controlled by the complement conversion circuit, and the complement conversion circuit outputs the arithmetic operation of the arithmetic unit 20 (carry propagation adder 1-19.
Output) and the operation control signal C2 for complement conversion from the operation control circuit 1-11, and the complement conversion is performed.

【0050】(8) :前記(7) の演算装置において、補数
変換回路は、浮動小数点演算器で必要な既存のビット反
転回路(反転回路1−20)、及び丸め回路1−22と
共用化した。
(8): In the arithmetic unit of the above (7), the complement conversion circuit is shared with the existing bit inversion circuit (inversion circuit 1-20) and rounding circuit 1-22 necessary for the floating point arithmetic unit. did.

【0051】(作用)前記構成に基づく本発明の作用
を、図1に基づいて説明する。 :演算装置全体の説明 制御データ入力部22の反転ビットa、b、cがビット
反転を指示する値(例えば、前記値=1)であれば、演
算装置により、そのビットに対応するオペランドの値を
(−1)倍した値として演算器20により演算を実行す
る。また、演算命令が浮動小数点演算命令で、入力オペ
ランドに対応する反転ビットがビット反転を指示する値
の場合、演算装置により、そのビットに対応するオペラ
ンドの符号ビットを反転してから演算を実行する。
(Operation) The operation of the present invention based on the above configuration will be described with reference to FIG. : Description of the entire arithmetic unit If the inversion bits a, b, and c of the control data input unit 22 are values instructing bit inversion (for example, the value = 1), the arithmetic unit determines the value of the operand corresponding to that bit. The calculation is executed by the calculator 20 with the value multiplied by (−1). If the operation instruction is a floating-point operation instruction and the inversion bit corresponding to the input operand is a value that indicates bit inversion, the operation device inverts the sign bit of the operand corresponding to the bit and then executes the operation. .

【0052】更に、演算命令が固定小数点演算命令の場
合、演算制御回路1−11により、入力オペランドに対
応する反転ビットa、b、cと演算命令コードfを組み
合わせて演算制御信号C1、C2を生成し、この演算制
御信号C1、C2で演算装置の演算操作を制御し、演算
を実行する。なお、前記演算装置では、演算命令が減算
命令の場合、演算装置により、減算命令を加算命令とし
て実行することで、減算命令を無くした。
When the arithmetic instruction is a fixed-point arithmetic instruction, the arithmetic control circuit 1-11 combines the inversion bits a, b and c corresponding to the input operand and the arithmetic instruction code f to generate the arithmetic control signals C1 and C2. It is generated and the arithmetic operation of the arithmetic unit is controlled by the arithmetic control signals C1 and C2 to execute the arithmetic. In the arithmetic unit, when the arithmetic instruction is a subtraction instruction, the arithmetic unit executes the subtraction instruction as an addition instruction, thereby eliminating the subtraction instruction.

【0053】:浮動小数点演算の説明 浮動小数点演算命令の場合、制御データ入力部22から
符号反転回路1−8〜1−10に入力する命令コードe
=1(浮動小数点演算命令)となり、反転ビットa、
b、cの値に従って、データ入力部21の各オペランド
の入力符号g、h、iを反転/非反転処理し、出力符号
q、r、sを出力する。。そして、オペランドA、B、
Cの各入力データ1−1、1−2、1−3(符号無しデ
ータ)の符号を、前記出力符号q、r、sにより付加
し、演算器20へ入力する。
Description of Floating-Point Arithmetic In the case of a floating-point arithmetic instruction, the instruction code e input from the control data input unit 22 to the sign inverting circuits 1-8 to 1-10
= 1 (floating point operation instruction), and the inversion bit a,
The input codes g, h, i of each operand of the data input unit 21 are inverted / non-inverted according to the values of b, c, and output codes q, r, s are output. . And the operands A, B,
The codes of the respective input data 1-1, 1-2, 1-3 (unsigned data) of C are added by the output codes q, r, s and input to the calculator 20.

【0054】例えば、符号反転回路1−8、1−9、1
−10において、対応する反転ビットの値=1であれ
ば、入力符号を反転し、演算器20に入力する。演算器
20は反転ビットに制御されることなく、命令コードに
従って通常の演算(従来例と同じ演算)が行われ、演算
結果を得る。
For example, the sign inversion circuits 1-8, 1-9, 1
At -10, if the value of the corresponding inversion bit = 1, the input code is inverted and input to the arithmetic unit 20. The arithmetic unit 20 performs a normal operation (the same operation as the conventional example) according to the instruction code without being controlled by the inversion bit, and obtains the operation result.

【0055】:固定小数点演算の説明 固定小数点演算の場合、制御データ入力部22の命令コ
ードf=1(固定小数点演算命令)となり、演算制御回
路1−11には、前記f=1の信号と、対応する反転ビ
ットa、b、cが入力する。そして、演算制御回路1−
11では、前記入力信号を基に、演算制御信号C1、C
2を作成する。この時、演算制御回路1−11では、符
号反転ビットa、b、cと、命令コードfの組み合わせ
により作成した制御信号C1、C2で演算器の各部を制
御する。
Description of Fixed-Point Arithmetic In the case of fixed-point arithmetic, the instruction code f = 1 of the control data input unit 22 (fixed-point arithmetic instruction) is obtained, and the arithmetic control circuit 1-11 receives the signal of f = 1. , Corresponding inversion bits a, b, c are input. Then, the arithmetic control circuit 1-
In 11, the calculation control signals C1 and C are based on the input signal.
Create 2. At this time, the arithmetic control circuit 1-11 controls each unit of the arithmetic unit by the control signals C1 and C2 created by the combination of the sign inversion bits a, b and c and the instruction code f.

【0056】この時、反転回路1−18と、桁上げ伝搬
加算器1−19が演算制御信号C1で制御され、反転回
路1−20と、丸め回路1−22が、前記制御信号C2
で制御される。前記反転回路1−18、1−20は、演
算制御信号C1、C2の値=1であるとビット反転を行
い、0であると、ビット反転は行わずにそのままデータ
を出力する。桁上げ伝搬加算器1−19と丸め回路1−
22は、演算制御信号C1、C2の値=1であると、+
1を行い、0であると+1は行わない。
At this time, the inverting circuit 1-18 and the carry propagation adder 1-19 are controlled by the operation control signal C1, and the inverting circuit 1-20 and the rounding circuit 1-22 are operated by the control signal C2.
Controlled by. The inversion circuits 1-18 and 1-20 perform bit inversion when the values of the operation control signals C1 and C2 = 1, and when they are 0, do not perform bit inversion and output the data as they are. Carry propagation adder 1-19 and rounding circuit 1-
22 is + when the value of the arithmetic control signals C1 and C2 = 1.
1 is performed, and if 0, +1 is not performed.

【0057】この場合、反転回路1−20、及び丸め回
路1−22により、補数変換回路を共用しており、固定
小数点演算の場合は、前記演算制御信号C2の制御によ
り、反転回路1−20、及び丸め回路1−22で補数変
換処理を行う。
In this case, the inverting circuit 1-20 and the rounding circuit 1-22 share the complement conversion circuit. In the case of fixed point arithmetic, the inverting circuit 1-20 is controlled by the arithmetic control signal C2. , And rounding circuit 1-22 perform complement conversion processing.

【0058】:その他 前記のように、演算命令の命令フィールドには、従来の
命令フィールドに加え、各オペランドに対応する反転ビ
ットを設け、そのビットが或る値の場合には、そのビッ
トに対応するオペランドの値を(−1)倍とした値とし
て演算を実行する方式とした。このようにすると、従来
では不可能であった、式の先頭などにマイナスの符号が
ある場合においても、演算が1命令で実行される。すな
わち、演算式、x=−m−nに対して、ハード命令は次
のようになる。
Others As described above, in addition to the conventional instruction field, an inverted bit corresponding to each operand is provided in the instruction field of the operation instruction, and when the bit has a certain value, it corresponds to the bit. The value of the operand is set to (-1) times the value and the calculation is executed. By doing so, even if there is a minus sign at the beginning of the expression, which is impossible in the past, the operation is executed by one instruction. That is, for an arithmetic expression, x = -m-n, the hard instruction is as follows.

【0059】[0059]

【表7】 [Table 7]

【0060】前記のように、演算が1命令(add)で
実行される。従って、従来余計に必要であったレジスタ
も必要くなくなる。また、演算量が多い時など、メモリ
を使用する場合にはメモリも必要以上に使用されること
はなくなる。その他に、式を変形することで、以下のよ
うに、演算命令が全て加算命令に置き換えられることが
可能になり、命令コード数が減る。
As described above, the operation is executed by one instruction (add). Therefore, the register, which has been conventionally required, becomes unnecessary. Further, when the memory is used, such as when the calculation amount is large, the memory is not used more than necessary. In addition, by modifying the formula, it becomes possible to replace all the operation instructions with addition instructions, and the number of instruction codes is reduced.

【0061】[0061]

【表8】 [Table 8]

【0062】ベクトル命令においても、スカラオペラン
ドの位置を考慮した命令コードのバリエーションだけの
命令コードで実現できる。以下、スカラ命令とベクトル
命令をまとめると、次のようになる。
A vector instruction can be realized by an instruction code having only variations of the instruction code in consideration of the position of the scalar operand. The following is a summary of scalar instructions and vector instructions.

【0063】[0063]

【表9】 [Table 9]

【0064】以上のようにすれば、ほんの僅かな物量の
追加と、数ビットの制御ビットを追加するだけで、演算
命令数を従来より減らすことができる。また、演算装置
による演算を効率良く、かつ高速に実行できる。
With the above arrangement, it is possible to reduce the number of operation instructions as compared with the conventional method by adding a very small amount of material and adding a few control bits. Further, the calculation by the calculation device can be executed efficiently and at high speed.

【0065】[0065]

【発明の実施の形態】以下、発明の実施の形態を図面に
基づいて詳細に説明する。 §1:演算命令とプロセッサの概要説明・・・図2参照 図2は命令フィールドの説明図である。以下の説明で
は、少なくとも、命令を逐次解釈し演算装置により演算
命令を実行するプロセッサの例について説明する。前記
プロセッサでの演算方法と演算器の概要は次の通りであ
る。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described in detail below with reference to the drawings. §1: Operation instruction and outline description of processor ... See FIG. 2. FIG. 2 is an explanatory diagram of an instruction field. In the following description, at least an example of a processor that sequentially interprets instructions and executes the arithmetic instructions by an arithmetic unit will be described. The outline of the calculation method and the calculation unit in the processor is as follows.

【0066】(1) :命令コードを逐次読み出し、命令を
解釈し固定小数点演算や、浮動小数点演算を実行するプ
ロセッサにおいて、例えば、図2に示したように、演算
命令の命令フィールドには、従来の命令フィールドに加
え、各オペランドに対応する反転ビットを設け、そのビ
ットが或る値(ビット反転を指示した値)の場合には、
そのビットに対応するオペランドの値を(−1)倍とし
た値として演算を実行するようにした。
(1): In a processor that sequentially reads instruction codes, interprets instructions, and executes fixed-point arithmetic or floating-point arithmetic, for example, as shown in FIG. In addition to the instruction field of, an inversion bit corresponding to each operand is provided, and when the bit has a certain value (value instructing bit inversion),
The value of the operand corresponding to the bit is multiplied by (-1) to execute the operation.

【0067】この場合、図2の命令フィールドに設けら
れた反転ビットa、b、cは、それぞれオペランドA、
B、Cの各データの符号を反転するか否かを指示するビ
ットであり、a=inv A、b=inv B、c=i
nv Cで示す。このビットは、ビット=1でビット反
転、ビット=0でビット非反転を示す。例えば、inv
A=1ならば、オペランドAのデータの符号を反転す
ることを示し、inv A=0ならば、オペランドAのデ
ータの符号を反転しないことを示す。
In this case, the instruction field shown in FIG.
The inverted bits a, b, c are
A command indicating whether to invert the sign of each data of B and C.
And a = inv A, b = inv B, c = i
nv Denote by C. This bit is bit = 1
Inversion, bit = 0 indicates non-inversion. For example, inv
If A = 1, invert the sign of the data of operand A
Show that inv If A = 0, the operand A
Indicates that the sign of the data is not reversed.

【0068】そして、演算命令が浮動小数点演算の時に
は、入力オペランドに対応する反転ビットが或る値(ビ
ット反転を指示した値)である場合、そのビットに対応
するオペランドの符号ビットを反転してから演算を実行
する。また、演算命令が固定小数点演算の時には、入力
オペランドに対応する反転ビットと、演算命令コードの
組み合わせにより、演算操作を制御し演算を実行するよ
うにした。
When the operation instruction is a floating-point operation, if the inversion bit corresponding to the input operand has a certain value (value instructing bit inversion), the sign bit of the operand corresponding to that bit is inverted. Perform the calculation from. Further, when the arithmetic instruction is a fixed-point arithmetic operation, the arithmetic operation is controlled and executed by the combination of the inversion bit corresponding to the input operand and the arithmetic instruction code.

【0069】(2) :少なくとも、浮動小数点演算器を備
えたプロセッサにおいて、演算命令フィールド中の個々
のオペランドにそれぞれ対応する反転ビットと、それぞ
れに対応する符号反転回路を設け、符号反転回路は、浮
動小数点データの符号ビットと対応する反転ビットを入
力とし、出力は浮動小数点演算器のオペランド入力とな
るようにした。
(2): In a processor equipped with at least a floating point arithmetic unit, inversion bits respectively corresponding to individual operands in the operation instruction field and sign inversion circuits corresponding to the respective operands are provided. The inversion bit corresponding to the sign bit of the floating point data is input, and the output is the operand input of the floating point arithmetic unit.

【0070】(3) :少なくとも、固定小数点演算器を備
えたプロセッサにおいて、演算命令フィールド中に個々
のオペランドにそれぞれ対応する反転ビットと、演算制
御回路と、補数変換回路とを設け、演算制御回路は、反
転ビットと演算命令を入力とし、補数変換回路は、固定
小数点演算器の出力と演算制御回路からの補数制御信号
を入力となるようにした。
(3): In a processor equipped with at least a fixed-point arithmetic unit, an inversion bit corresponding to each operand, an arithmetic control circuit, and a complement conversion circuit are provided in the arithmetic instruction field, and the arithmetic control circuit is provided. Inverted bits and operation instructions are input, and the complement conversion circuit is configured to receive the output of the fixed-point operation unit and the complement control signal from the operation control circuit.

【0071】(4) :少なくとも、浮動小数点演算と固定
小数点演算の両方を実行する演算器を備えたプロセッサ
において、演算命令フィールド中に個々のオペランドに
それぞれ対応する反転ビットと、それぞれに対応する符
号反転回路と、演算制御回路と、補数変換回路とを設
け、符号反転回路は、浮動小数点データの符号ビットと
対応する反転ビットと命令を入力とし、出力は演算器の
オペランド入力となるようにし、演算制御回路は、反転
ビットと演算命令を入力として制御し、補数変換回路
は、演算器の出力と演算制御回路からの補数制御信号を
入力となるようにした。
(4): In a processor having at least an arithmetic unit for executing both floating-point arithmetic and fixed-point arithmetic, an inversion bit corresponding to each operand in the arithmetic instruction field and a code corresponding thereto An inversion circuit, an operation control circuit, and a complement conversion circuit are provided, and the sign inversion circuit receives an inversion bit and an instruction corresponding to the sign bit of floating-point data as an input, and an output becomes an operand input of an arithmetic unit, The arithmetic control circuit controls the inverted bit and the arithmetic instruction as inputs, and the complement conversion circuit inputs the output of the arithmetic unit and the complement control signal from the arithmetic control circuit.

【0072】(5) :浮動/固定小数点演算回路におい
て、固定小数点演算で必要となる補数変換回路は、浮動
小数点演算で必要な既存の反転回路と丸め回路とを共用
化した。
(5): In the floating / fixed-point arithmetic circuit, the complement conversion circuit required for fixed-point arithmetic uses the existing inversion circuit and rounding circuit required for floating-point arithmetic in common.

【0073】§2:例1の構成の説明・・・図3、図
4、図5参照 図3は浮動/固定小数点乗加算演算装置を示した図、図
4は図3の一部拡大図、図5は各部の説明図である。例
1は浮動/固定小数点乗加算演算装置の例であり、以
下、図3〜図5に基づいて説明する。
§2: Description of configuration of Example 1 ... See FIGS. 3, 4, and 5 FIG. 3 is a diagram showing a floating / fixed-point multiplication / addition operation device, and FIG. 4 is a partially enlarged view of FIG. FIG. 5 is an explanatory diagram of each part. Example 1 is an example of a floating / fixed point multiplication / addition calculation device, which will be described below with reference to FIGS.

【0074】(1) :全体の説明 浮動/固定小数点乗加算演算装置は、演算器20と、演
算制御回路1−11と、符号反転回路1−8、1−9、
1−10と、データ入力部21と、制御データ入力部2
2を備えている。そして、前記制御データ入力部22に
は、反転ビットa、b、cの入力部1−5、1−6、1
−7と、命令コード制御部1−4を備えている。前記デ
ータ入力部21には、命令フィールドのオペランドAの
入力データ1−1、オペランドBの入力データ1−2、
オペランドCの入力データ1−3を備えている。
(1): Overall Description The floating / fixed point multiplication / addition arithmetic unit includes an arithmetic unit 20, an arithmetic control circuit 1-11, sign inversion circuits 1-8 and 1-9,
1-10, data input unit 21, and control data input unit 2
Equipped with 2. The control data input unit 22 has input units 1-5, 1-6, 1 for the inverted bits a, b, c.
-7 and an instruction code control unit 1-4. In the data input section 21, the input data 1-1 of the operand A of the instruction field, the input data 1-2 of the operand B,
The input data 1-3 of the operand C is provided.

【0075】更に演算器20には、デコーダ1−12
と、倍数発生器1−13と、桁上げ保存加算器1−14
と、桁上げ伝搬加算器1−15と、シフタ1−16、1
−17、1−21と、桁上げ伝搬加算器1−19と、反
転回路1−18、1−20と、丸め回路1−22を備え
ており、演算結果1−23を得るように構成されてい
る。なお、固定小数点演算の場合、反転回路1−20
と、丸め回路1−22は、演算制御回路1−11から出
力される補数変換用の演算制御信号により制御され、補
数変換回路として使用される。
Further, the arithmetic unit 20 includes a decoder 1-12.
And a multiple generator 1-13 and a carry save adder 1-14
Carry carry adder 1-15, shifters 1-16, 1
-17, 1-21, carry propagate adder 1-19, inverting circuits 1-18, 1-20, and rounding circuit 1-22, and are configured to obtain an operation result 1-23. ing. In the case of fixed point arithmetic, the inverting circuit 1-20
The rounding circuit 1-22 is controlled by an operation control signal for complement conversion output from the operation control circuit 1-11, and is used as a complement conversion circuit.

【0076】(2) :制御データ入力部22の説明 制御データ入力部22は、命令コード制御部1−4と、
反転ビットaの入力部1−5と、反転ビットbの入力部
1−6と、反転ビットcの入力部1−7を備えている。
そして、命令コード制御部1−4は、命令デコーダ等を
備えており、実行すべき命令をデコードしてその情報か
ら演算制御に使用する命令コード(0、又は1の制御信
号)を作成する機能を備えている。
(2): Description of the control data input unit 22 The control data input unit 22 includes the instruction code control unit 1-4,
The input section 1-5 for the inverted bit a, the input section 1-6 for the inverted bit b, and the input section 1-7 for the inverted bit c are provided.
The instruction code control unit 1-4 includes an instruction decoder and the like, and has a function of decoding an instruction to be executed and creating an instruction code (0 or 1 control signal) used for arithmetic control from the information. Is equipped with.

【0077】そして、制御データ入力部22から浮動小
数点演算命令、或いは固定小数点演算命令の命令コード
を出力するように構成されている。この場合、固定小数
点演算命令の命令コードをf、浮動小数点演算命令の命
令コードをeとする。
Then, the control data input unit 22 is configured to output the instruction code of the floating point arithmetic instruction or the fixed point arithmetic instruction. In this case, the instruction code of the fixed-point arithmetic instruction is f, and the instruction code of the floating-point arithmetic instruction is e.

【0078】また、反転ビットaの入力部1−5は、命
令フィールドの反転ビット領域で指定されたオペランド
Aの反転ビットa=inv Aを入力(演算装置へ入
力)するものであり、反転ビットbの入力部1−6は、
命令フィールドの反転ビット領域で指定されたオペラン
ドBの反転ビットb=inv Bを入力するものであ
り、反転ビットcの入力部1−7は、命令フィールドの
反転ビット領域で指定されたオペランドCの反転ビット
c=inv Cを入力するものである。
Further, the inversion bit a input unit 1-5 has the inversion bit a = inv of the operand A designated in the inversion bit area of the instruction field. A is input (input to the arithmetic unit), and the input unit 1-6 of the inversion bit b is
Inverted bit b of the operand B specified in the inverted bit area of the instruction field b = inv B is input, and the inversion bit c input unit 1-7 is the inversion bit c = inv of the operand C specified in the inversion bit area of the instruction field. This is to input C.

【0079】(3) :符号反転回路1−8、1−9、1−
10の説明・・・図5のA図参照 符号反転回路1−8、1−9、1−10は、浮動小数点
演算を行う場合に、命令フィールドの反転ビットによる
反転/非反転指示に従って、各オペランドのデータの符
号を反転/非反転処理する回路である。各符号反転回路
1−8、1−9、1−10は、それぞれ図5のA図に示
したように、AND回路25と排他的論理和回路(以下
「EX−OR回路」と記す)26で構成されている。
(3): Sign inversion circuits 1-8, 1-9, 1-
Description of 10 ... See FIG. 5A of FIG. 5. The sign inversion circuits 1-8, 1-9, and 1-10, according to the inversion / non-inversion instruction by the inversion bit of the instruction field, when performing floating-point arithmetic, This is a circuit that inverts / non-inverts the sign of the data of the operand. Each of the sign inversion circuits 1-8, 1-9, and 1-10 has an AND circuit 25 and an exclusive OR circuit (hereinafter referred to as "EX-OR circuit") 26, as shown in FIG. It is composed of.

【0080】そして、AND回路25の入力端子には、
+浮動小数点演算命令eと、+反転ビット(a、b、c
のいずれか)の信号(データ)が入力し、EX−OR回
路26の入力端子には、+入力符号(g、h、iのいず
れか)の信号と、AND回路25の出力信号が入力す
る。また、EX−OR回路26の出力端子から+出力符
号(q、r、sのいずれか)が出力する。
Then, at the input terminal of the AND circuit 25,
+ Floating-point operation instruction e and + inversion bit (a, b, c
Signal (data), and the signal of the + input sign (any one of g, h, and i) and the output signal of the AND circuit 25 are input to the input terminal of the EX-OR circuit 26. . Further, the + output sign (any one of q, r, and s) is output from the output terminal of the EX-OR circuit 26.

【0081】このように構成された符号反転回路1−
8、1−9、1−10の入力信号と出力信号の関係は、
図5のA図に示した真理値表の通りである。この真理値
表において、+入力符号の欄では、各オペランドA、
B、Cのデータの符号において、+入力符号が有れば
1、無ければ0で示す。+浮動小数点演算命令の欄で
は、浮動小数点演算の命令コード=1が有れば1、無け
れば0(固定小数点演算の場合は0)で示す。+反転ビ
ットの欄では、命令フィールドの反転ビットa、b、c
が反転指示であれば1、反転指示でなければ0で示す。
The sign inversion circuit 1-configured in this way
The relationship between the input signal and the output signal of 8, 1-9, 1-10 is
This is as shown in the truth table shown in FIG. In this truth table, each operand A,
In the codes of B and C data, 1 is shown if there is a + input code, and 0 if there is no + input code. In the + floating-point operation instruction column, 1 is given if there is an instruction code of floating-point operation = 1, and 0 if not (0 for fixed-point operation). In the + inversion bit column, the inversion bits a, b, c of the instruction field
If is a reversal instruction, it is indicated by 1;

【0082】この真理値表によれば、+入力符号=0、
+浮動小数点演算命令=0、+反転ビットなしの時、+
出力符号=0となる。+入力符号=1、+浮動小数点演
算命令=0、+反転ビットなしの時、+出力符号=1と
なる。+入力符号=0、+浮動小数点演算命令=1、+
反転ビット=0の時、+出力符号=0となる。+入力符
号=1、+浮動小数点演算命令=1、+反転ビット=0
の時、+出力符号=1となる。+入力符号=0、+浮動
小数点演算命令=1、+反転ビット=1の時、+出力符
号=1となる。+入力符号=1、+浮動小数点演算命令
=1、+反転ビット=1の時、+出力符号=0となる。
According to this truth table, + input code = 0,
+ Floating point operation instruction = 0, + When there is no inversion bit, +
Output code = 0. When + input code = 1, + floating point arithmetic instruction = 0, and + inversion bit is not present, + output code = 1. + Input code = 0, + Floating point operation instruction = 1, +
When the inversion bit = 0, the + output sign = 0. + Input code = 1, + Floating point operation instruction = 1, + Inverted bit = 0
When, + output sign = 1. When + input code = 0, + floating-point operation instruction = 1, and + inversion bit = 1, + output code = 1. When + input code = 1, + floating-point arithmetic instruction = 1, and + reverse bit = 1, + output code = 0.

【0083】前記のように、符号反転回路1−8〜1−
10では、+浮動小数点演算命令が1(浮動小数点演算
命令)で、+反転ビットが1(ビット反転指示有り)の
場合にのみ、+入力符号を反転した+出力信号を出して
いる。しかし、+浮動小数点演算命令が1でも、+反転
ビットが0(命令フィールドでの反転指示無し)の場合
には、+入力符号を反転せずにそのまま+出力信号を出
している。また、+浮動小数点演算命令が0の場合は、
浮動小数点演算ではないので、+反転ビットの指示は無
く、+入力符号を反転せずにそのまま+出力信号を出し
ている。
As described above, the sign inversion circuits 1-8 to 1-
In 10, only when the + floating point operation instruction is 1 (floating point operation instruction) and the + inversion bit is 1 (there is a bit inversion instruction), the + output signal obtained by inverting the + input code is output. However, even if the + floating-point operation instruction is 1, if the + inversion bit is 0 (no inversion instruction in the instruction field), the + output signal is output as it is without inverting the + input code. If the + floating point operation instruction is 0,
Since it is not a floating point operation, there is no indication of the + inversion bit, and the + output signal is output as it is without inverting the + input code.

【0084】(4) :演算制御回路1−11の説明・・・
図5のB図参照 演算制御回路1−11は、固定小数点演算を行う場合
に、制御データ入力部22から入力された制御データを
基に、新たな演算制御信号C1、C2を作成して演算器
20の各部を制御するものである。
(4): Description of arithmetic control circuit 1-11 ...
When performing fixed-point arithmetic, the arithmetic control circuit 1-11 shown in FIG. 5B creates new arithmetic control signals C1 and C2 based on the control data input from the control data input unit 22 to perform arithmetic operation. It controls each part of the container 20.

【0085】この演算制御回路1−11は、図5のB図
に示したように、EX−OR回路27、28と、AND
回路29、30で構成されている。そして、EX−OR
回路27の入力端子には、+inv Bと+inv
が入力し、EX−OR回路28の入力端子には、+in
CとEX−OR回路27の出力信号が入力し、AN
D回路29の入力端子には、+固定小数点演算命令の命
令コードfと、EX−OR回路28の出力信号が入力
し、AND回路30の入力端子には、+固定小数点演算
命令の命令コードfと、EX−OR回路27の出力信号
が入力する。
As shown in FIG. 5B, the arithmetic control circuit 1-11 includes the EX-OR circuits 27 and 28 and an AND circuit.
It is composed of circuits 29 and 30. And EX-OR
The input terminal of the circuit 27 is + inv B and + inv A
Is input to the input terminal of the EX-OR circuit 28, and + in
v C and the output signal of the EX-OR circuit 27 are input, and AN
The input code of the + fixed-point arithmetic instruction and the output signal of the EX-OR circuit 28 are input to the input terminal of the D circuit 29, and the instruction code f of the + fixed-point arithmetic instruction is input to the AND circuit 30. And the output signal of the EX-OR circuit 27 is input.

【0086】この場合、前記+inv Aは、制御デー
タ入力部22の反転ビットaの入力部1−5から入力さ
れる信号aであり、+inv Bは、制御データ入力部
22の反転ビットbの入力部1−6から入力される信号
bであり、+inv Cは、制御データ入力部22の反
転ビットcの入力部1−7から入力される信号cであ
る。
In this case, the above + inv A is a signal a input from the input unit 1-5 of the inverted bit a of the control data input unit 22 and is + inv B is a signal b input from the input unit 1-6 of the inverted bit b of the control data input unit 22, and is + inv C is the signal c input from the inverted bit c input unit 1-7 of the control data input unit 22.

【0087】このように構成された演算制御回路1−1
1の入力信号と出力信号の関係は、図5のB図に示した
真理値表の通りである。この真理値表において、演算制
御信号C1、C2の値が1であれば、演算制御を行い、
0であれば演算操作を行わないことを示している。ま
た、固定小数点演算の場合、演算制御信号C2は反転回
路1−20と丸め回路1−22に入力するが、補数変換
処理では演算制御信号C2は補数変換制御用の演算制御
信号となり、この信号により、反転回路1−20と丸め
回路1−22で補数変換処理を行う。
The arithmetic and control circuit 1-1 thus configured
The relationship between the input signal and the output signal of No. 1 is as shown in the truth table shown in FIG. 5B. In this truth table, if the values of the operation control signals C1 and C2 are 1, the operation control is performed,
If it is 0, it indicates that the arithmetic operation is not performed. Further, in the case of fixed-point arithmetic, the arithmetic control signal C2 is input to the inverting circuit 1-20 and the rounding circuit 1-22, but in the complement conversion processing, the arithmetic control signal C2 becomes the arithmetic control signal for complement conversion control, and this signal Thus, the inversion circuit 1-20 and the rounding circuit 1-22 perform the complement conversion process.

【0088】なお、この真理値表は、+固定小数点演算
命令の命令コードfが、f=1(固定小数点演算)の場
合の真理値表であり、f=0の場合(固定小数点演算以
外の場合)は、常に演算制御信号+C1=+C2=0
(演算制御を行わない信号)となる。
This truth table is a truth table when the instruction code f of the + fixed-point operation instruction is f = 1 (fixed-point operation), and when f = 0 (other than fixed-point operation). Case) is always the arithmetic control signal + C1 = + C2 = 0
(A signal that does not perform arithmetic control).

【0089】この真理値表に示したように、+inv
A=0、+inv B=0、+inv C=0の場合
は、式は(+A)×(+B)+(+C)であり、演算制
御信号はC1=0、C2=0となる。+inv A=
0、+inv B=0、+inv C=1の場合は、式は
(+A)×(+B)+(−C)であり、演算制御信号は
C1=1、C2=0となる。
As shown in this truth table, + inv
A = 0, + inv B = 0, + inv When C = 0
The formula is (+ A) × (+ B) + (+ C)
The control signals are C1 = 0 and C2 = 0. + Inv A =
0, + inv B = 0, + inv If C = 1, the formula is
(+ A) × (+ B) + (− C), and the operation control signal is
C1 = 1 and C2 = 0.

【0090】+inv A=0、+inv B=1、+
inv C=0の場合は、式は(+A)×(−B)+
(+C)であり、演算制御信号はC1=1、C2=1と
なる。+inv A=0、+inv B=1、+inv
C=1の場合は、式は(+A)×(−B)+(−C)
であり、演算制御信号はC1=0、C2=1となる。+
inv A=1、+inv B=0、+inv C=0
の場合は、式は(−A)×(+B)+(+C)であり、
演算制御信号はC1=1、C2=1となる。
+ Inv A = 0, + inv B = 1, +
inv When C = 0, the formula is (+ A) × (−B) +
(+ C), and the operation control signals are C1 = 1 and C2 = 1. + Inv A = 0, + inv B = 1, + inv
When C = 1, the formula is (+ A) × (−B) + (− C)
Therefore, the calculation control signals are C1 = 0 and C2 = 1. +
inv A = 1, + inv B = 0, + inv C = 0
In the case of, the formula is (−A) × (+ B) + (+ C),
The arithmetic control signals are C1 = 1 and C2 = 1.

【0091】+inv A=1、+inv B=0、+
inv C=1の場合は、式は(−A)×(+B)+
(−C)であり、演算制御信号はC1=0、C2=1と
なる。+inv A=1、+inv B=1、+inv
C=0の場合は、式は(−A)×(−B)+(+C)
であり、演算制御信号はC1=0、C2=0となる。+
inv A=1、+inv B=1、+inv C=1
の場合は、式は(−A)×(−B)+(−C)であり、
演算制御信号はC1=1、C2=0となる。
+ Inv A = 1, + inv B = 0, +
inv When C = 1, the formula is (−A) × (+ B) +
(-C), and the operation control signals are C1 = 0 and C2 = 1. + Inv A = 1, + inv B = 1, + inv
When C = 0, the formula is (−A) × (−B) + (+ C)
Therefore, the arithmetic control signals are C1 = 0 and C2 = 0. +
inv A = 1, + inv B = 1, + inv C = 1
In the case of, the formula is (−A) × (−B) + (− C),
The arithmetic control signals are C1 = 1 and C2 = 0.

【0092】§3:例1の演算動作の説明・・・図2〜
図6参照 以下、図2〜図6に基づいて例1の演算動作を説明す
る。 (1) :フローチャートによる演算処理の説明・・・図6
参照 図6は演算処理フローチャートである。以下、図6に基
づいて例1の演算処理を説明する。なお、S1〜S7は
各処理ステップを示す。演算命令を実行する場合、命令
フィールドの命令コードが浮動小数点演算命令でなく
(固定小数点演算命令の場合)(S1)、反転ビット=
1でなければ(S2)、演算器20に各オペランドのデ
ータをそのまま(符号ビットを反転せずに)入力し、演
算制御回路1−11では演算制御信号C1、C2=0と
して、演算操作の制御をしないで演算を行う(S4)。
§3: Description of arithmetic operation of Example 1 ... FIGS.
6 will be described below with reference to FIGS. 2 to 6. (1): Explanation of calculation process by flow chart ... Fig. 6
Reference FIG. 6 is a calculation processing flowchart. Hereinafter, the arithmetic processing of the example 1 will be described with reference to FIG. Note that S1 to S7 indicate processing steps. When executing an operation instruction, the instruction code in the instruction field is not a floating point operation instruction (in the case of a fixed point operation instruction) (S1), and the inversion bit =
If it is not 1 (S2), the data of each operand is input to the arithmetic unit 20 as it is (without inverting the sign bit), and the arithmetic control circuit 1-11 sets the arithmetic control signals C1 and C2 = 0 to execute the arithmetic operation. Calculation is performed without control (S4).

【0093】また、前記命令コードが浮動小数点演算で
なく(S1)、反転ビット=1(ビット反転指示)であ
れば(S2)、演算制御回路1−11は、反転ビット
a、b、cと、命令コードfを基に演算制御信号C1、
C2を生成し、演算器20の制御を変更して(S3)演
算を行う(S4)。
If the instruction code is not a floating point operation (S1) and the inversion bit = 1 (bit inversion instruction) (S2), the operation control circuit 1-11 outputs the inversion bits a, b and c. , The operation control signal C1 based on the instruction code f,
C2 is generated, the control of the arithmetic unit 20 is changed (S3), and calculation is performed (S4).

【0094】更に、命令コードが浮動小数点演算命令で
あり(S1)、反転ビット=1でなければ(S5)、符
号反転回路1−8〜1−10では符号の反転を行わず
に、演算器20においてそのまま演算を行う(S7)。
しかし、演算フォーマットが浮動小数点演算命令であり
(S1)、反転ビット=1であれば(S5)、符号反転
回路1−8〜1−10により対応するオペランドのデー
タの符号を反転し(S6)、演算器20で演算を行う
(S7)。
Further, if the instruction code is a floating point operation instruction (S1) and the inversion bit is not 1 (S5), the code inversion circuits 1-8 to 1-10 do not invert the code and the operation unit The calculation is performed as it is in 20 (S7).
However, if the operation format is a floating point operation instruction (S1) and the inversion bit = 1 (S5), the sign of the corresponding operand data is inverted by the sign inversion circuits 1-8 to 1-10 (S6). The calculation is performed by the calculator 20 (S7).

【0095】(2) :浮動小数点演算処理の詳細な説明 浮動小数点演算命令に対しては、次のようにして演算を
実行する。浮動小数点演算命令の場合、符号反転回路1
−8〜1−10に入力する+浮動小数点演算命令の命令
コードe=1となり、+反転ビット(a、b、cのいず
れか)に従って、+入力符号(g、h、iのいずれか)
を反転し、+出力符号(q、r、s)を出力する。そし
て、オペランドA、B、Cの各入力データ1−1、1−
2、1−3(符号無しデータ)の符号を、前記+出力符
号(q、r、s)により付加し、演算器20へ入力す
る。
(2): Detailed Description of Floating-Point Arithmetic Processing For a floating-point arithmetic instruction, the arithmetic operation is executed as follows. Sign inversion circuit 1 for floating-point arithmetic instructions
The instruction code e of the + floating-point operation instruction input to -8 to 1-10 becomes e = 1, and the + input code (any one of g, h, and i) according to the plus inversion bit (any one of a, b, and c).
Is inverted and the + output sign (q, r, s) is output. Then, the respective input data 1-1, 1- of the operands A, B, C
Codes of 2, 1-3 (unsigned data) are added by the + output code (q, r, s) and input to the arithmetic unit 20.

【0096】すなわち、符号反転回路1−8、1−9、
1−10で、対応する反転ビットが「1」の場合に+入
力符号を反転し、演算器20に入力する。演算器20は
反転ビットに制御されることなく、命令コードに従って
通常の演算(従来例と同じ演算)を行い、演算結果1−
23を得る。
That is, the sign inversion circuits 1-8, 1-9,
In 1-10, when the corresponding inversion bit is “1”, the + input sign is inverted and input to the arithmetic unit 20. The operation unit 20 performs a normal operation (the same operation as the conventional example) according to the instruction code without being controlled by the inversion bit, and the operation result 1-
You get 23.

【0097】例えば、オペランドAのデータに対する反
転ビットが1になっていたら、符号反転回路1−10で
は、オペランドAのデータの符号を反転して、演算器2
0に入力する。また、オペランドBのデータに対する反
転ビットが1になっていたら、符号反転回路1−9で
は、オペランドBのデータの符号を反転して、演算器2
0に入力する。
For example, if the inversion bit for the data of the operand A is 1, the sign inversion circuit 1-10 inverts the sign of the data of the operand A, and the arithmetic unit 2
Enter 0. If the inversion bit for the data of the operand B is 1, the sign inversion circuit 1-9 inverts the sign of the data of the operand B, and the arithmetic unit 2
Enter 0.

【0098】更に、オペランドCのデータに対する反転
ビットが1になっていたら、符号反転回路1−8では、
オペランドCのデータの符号を反転して、演算器20に
入力する。この処理により、演算器20では従来例と同
じ浮動小数点演算を行い、演算結果1−23を得る。
Further, if the inversion bit for the data of the operand C is 1, the sign inversion circuit 1-8
The sign of the data of the operand C is inverted and input to the arithmetic unit 20. By this processing, the arithmetic unit 20 performs the same floating point arithmetic as in the conventional example, and obtains the arithmetic result 1-23.

【0099】(3) :固定小数点演算処理の詳細な説明 固定小数点演算命令に対しては、次のようにして演算を
実行する。固定小数点演算の場合、+固定小数点演算命
令の命令コードf=1となり、演算制御回路1−11
は、前記f=1の信号と、各反転ビットの入力データ
a、b、cが入力する。そして、演算制御回路1−11
では、前記入力信号を基に、演算制御信号C1、C2を
生成する。
(3): Detailed Description of Fixed-Point Arithmetic Processing For fixed-point arithmetic instructions, arithmetic operations are executed as follows. In the case of fixed point arithmetic, the instruction code f of the + fixed point arithmetic instruction is f = 1, and the arithmetic control circuit 1-11
Inputs the signal of f = 1 and the input data a, b, c of each inversion bit. Then, the arithmetic control circuit 1-11
Then, the operation control signals C1 and C2 are generated based on the input signal.

【0100】この時、演算制御回路1−11では、前記
符号反転ビットa、b、cの入力データ1−5〜1−7
と、命令コードfの組み合わせにより生成した演算制御
信号C1、C2で演算器20の各部を制御する。この
時、反転回路1−18、桁上げ伝搬加算器1−19、反
転回路1−20、丸め回路1−22が、演算制御信号C
1、C2により制御される。
At this time, in the arithmetic control circuit 1-11, the input data 1-5 to 1-7 of the sign inversion bits a, b, and c.
And each unit of the arithmetic unit 20 is controlled by the arithmetic control signals C1 and C2 generated by the combination of the instruction code f. At this time, the inversion circuit 1-18, the carry propagation adder 1-19, the inversion circuit 1-20, and the rounding circuit 1-22 are operated by the operation control signal C.
1, controlled by C2.

【0101】反転回路1−18、1−20は、演算制御
信号C1、C2が「1」であるとビット反転を行い、
「0」であると、ビット反転は行わずにそのままデータ
を出力する。桁上げ伝搬加算器1−19と丸め回路1−
22は、演算制御信号が「1」であると、+1を行い、
「0」であると+1は行わない。なお、固定小数点演算
の場合、反転回路1−20と、丸め回路1−22は、演
算制御回路1−11から出力される補数変換用の演算制
御信号C2により制御され、補数変換回路として使用さ
れる。
The inverting circuits 1-18 and 1-20 perform bit inversion when the operation control signals C1 and C2 are "1",
When it is "0", the data is output as it is without bit inversion. Carry propagation adder 1-19 and rounding circuit 1-
22 performs +1 when the operation control signal is “1”,
If it is "0", +1 is not performed. In the case of fixed-point arithmetic, the inverting circuit 1-20 and the rounding circuit 1-22 are controlled by the arithmetic control signal C2 for complement conversion output from the arithmetic control circuit 1-11 and are used as a complement conversion circuit. It

【0102】演算式に対して、ハード命令は次のように
指定される。演算式、x=−m*n−pを変形して、x
=(−m)*(−n)+(−p)とする。この場合のハ
ード命令は、madd reg1、reg2、 reg3、 reg4、1、0、1とな
る。なお、この命令は(-reg1)×reg2+ (-reg3) = reg3
となる。
With respect to the arithmetic expression, the hard instruction is designated as follows. By transforming the arithmetic expression, x = -m * n-p, x
= (-M) * (-n) + (-p). The hard instructions in this case are madd reg1, reg2, reg3, reg4, 1, 0, 1. This instruction is (-reg1) × reg2 + (-reg3) = reg3
Becomes

【0103】前記の命令を図5のB図に示した表に従い
説明すると、オペランドBの入力データ1−2をデコー
ダ1−12でデコードして倍数制御信号を作成し、その
倍数制御信号とオペランドAの入力データ1−1を倍数
発生器1−13へ入力し、倍数を発生する。そして、発
生させた倍数を桁上げ保存加算器1−14、桁上げ伝搬
加算器1−15で加算し、乗算結果を得る。
The above instruction will be described with reference to the table shown in FIG. 5B. The input data 1-2 of the operand B is decoded by the decoder 1-12 to create a multiple control signal. Input data 1-1 of A is input to a multiple generator 1-13 to generate a multiple. Then, the generated multiples are added by the carry save adder 1-14 and the carry propagation adder 1-15 to obtain the multiplication result.

【0104】この場合、演算制御信号C1=0となって
いるので、反転回路1−18ではオペランドCの入力デ
ータ1−3の符号をビット反転せずに、桁上げ伝搬加算
器1−19によって乗算結果を得る。なお、この処理で
は+1はしない。また、制御信号C2=1となっている
ので、反転回路1−20では桁上げ伝搬加算器1−19
からの結果をビット反転し、丸め回路1−22に入れて
+1し、最終結果Dを得る。
In this case, since the operation control signal C1 = 0, the inversion circuit 1-18 does not bit-invert the sign of the input data 1-3 of the operand C, but uses the carry propagation adder 1-19. Get the multiplication result. Note that this process does not increment by 1. Since the control signal C2 = 1, the carry propagation adder 1-19 is used in the inverting circuit 1-20.
The result from is bit-inverted, put in the rounding circuit 1-22 and incremented by 1 to obtain the final result D.

【0105】なお、実際のハードでの演算器は、−(m
*n+p)の演算を行なっている。一例として、乗加算
について説明したが、乗算、加算、除算等についても同
様に応用できることは明白である。
The actual hardware computing unit is-(m
* N + p) is calculated. Although multiplication and addition have been described as an example, it is obvious that the same can be applied to multiplication, addition, division, and the like.

【0106】§4:例2の説明・・・図7参照 図7は浮動小数点乗算演算装置を示した図である。な
お、図では浮動小数点乗算演算に必要な構成のみを図示
してある。例2は、浮動小数点乗算演算装置の例であ
り、浮動小数点乗算演算装置は、演算器20と、符号反
転回路2−9、2−10と、データ入力部21と、制御
データ入力部22を備えている。そして、制御データ入
力部22には、反転ビットaの入力部2−5、2−6を
備えている。
§4: Description of Example 2--see FIG. 7 FIG. 7 is a diagram showing a floating point multiplication arithmetic unit. In the figure, only the configuration necessary for the floating point multiplication operation is shown. Example 2 is an example of a floating-point multiplication arithmetic unit, and the floating-point multiplication arithmetic unit includes an arithmetic unit 20, sign inversion circuits 2-9 and 2-10, a data input unit 21, and a control data input unit 22. I have it. The control data input unit 22 includes input units 2-5 and 2-6 for the inverted bit a.

【0107】また、データ入力部21には、命令フィー
ルドのオペランドAの入力データ2−1(例えば、オペ
ランドAで指定されたレジスタのデータ)、オペランド
Bの入力データ2−2(例えば、オペランドBで指定さ
れたレジスタのデータ)を備えている。
In the data input section 21, the input data 2-1 of the operand A of the instruction field (for example, the data of the register designated by the operand A) and the input data 2-2 of the operand B (for example of the operand B). The data of the register specified by) is provided.

【0108】更に演算器20には、デコーダ2−12
と、倍数発生器2−13と、桁上げ保存加算器2−14
と、桁上げ伝搬加算器2−15と、シフタ2−16と、
丸め回路2−22を備えており、演算結果2−23を得
るように構成されている。浮動小数点乗算演算命令に対
しては、次のようにして演算を実行する。
Further, the arithmetic unit 20 includes a decoder 2-12.
And a multiple generator 2-13 and a carry save adder 2-14
Carry carry adder 2-15, shifter 2-16,
It has a rounding circuit 2-22 and is configured to obtain a calculation result 2-23. The floating-point multiplication operation instruction is executed as follows.

【0109】この場合、符号反転回路2−9、2−10
では、+反転ビット(a、bのいずれか)の値に従っ
て、+入力符号(g、hのいずれか)を反転/非反転処
理し、+出力符号(q、r)を出力する。。そして、オ
ペランドA、Bの各入力データ2−1、2−2(符号無
しデータ)の符号を、前記+出力符号(q、r)により
付加し、演算器20へ入力する。
In this case, the sign inversion circuits 2-9 and 2-10
Then, the + input code (any one of g and h) is inverted / non-inverted according to the value of the + inversion bit (any one of a and b), and the + output code (q, r) is output. . Then, the sign of each of the input data 2-1 and 2-2 (unsigned data) of the operands A and B is added by the + output sign (q, r) and input to the arithmetic unit 20.

【0110】すなわち、符号反転回路2−9、2−10
で、対応する反転ビットが「1」の場合の+入力符号を
反転し、演算器20に入力する。演算器20は反転ビッ
トに制御されることなく、命令コードに従って通常の演
算(従来例と同じ演算)が行われる。
That is, the sign inversion circuits 2-9 and 2-10.
Then, the + input sign when the corresponding inversion bit is “1” is inverted and input to the arithmetic unit 20. The arithmetic unit 20 is not controlled by the inversion bit and performs a normal operation (the same operation as the conventional example) according to the instruction code.

【0111】例えば、オペランドAのデータに対する反
転ビットが1になっていたら、符号反転回路2−10で
は、オペランドAのデータの符号を反転して、演算器2
0に入力する。また、オペランドBのデータに対する反
転ビットが1になっていたら、符号反転回路2−9で
は、オペランドBのデータの符号を反転して、演算器2
0に入力する。この処理により、演算器では従来例と同
じ演算を行い、演算結果2−23を得る。
For example, if the inversion bit for the data of the operand A is 1, the sign inversion circuit 2-10 inverts the sign of the data of the operand A, and the arithmetic unit 2
Enter 0. If the inversion bit for the data of the operand B is 1, the sign inversion circuit 2-9 inverts the sign of the data of the operand B, and the arithmetic unit 2
Enter 0. By this processing, the arithmetic unit performs the same arithmetic operation as in the conventional example and obtains the arithmetic result 2-23.

【0112】§5:例3の説明・・・図8参照 図8は浮動小数点加算演算装置を示した図である。な
お、図では浮動小数点加算演算に必要な構成のみを図示
してある。例3は、浮動小数点加算演算装置の例であ
り、演算器20と、符号反転回路3−9、3−10と、
データ入力部21と、制御データ入力部22を備えてい
る。そして、制御データ入力部22には、反転ビットa
の入力部3−5と、反転ビットbの入力部3−6を備え
ている。
§5: Description of Example 3--see FIG. 8 FIG. 8 is a diagram showing a floating point addition arithmetic unit. In the figure, only the configuration necessary for the floating point addition operation is shown. Example 3 is an example of a floating point addition arithmetic unit, and includes an arithmetic unit 20, sign inversion circuits 3-9 and 3-10,
The data input unit 21 and the control data input unit 22 are provided. Then, the inverted bit a is input to the control data input unit 22.
The input unit 3-5 of the above and the input unit 3-6 of the inversion bit b are provided.

【0113】また、データ入力部21には、命令フィー
ルドのオペランドAの入力データ3−1(オペランドA
で指定されたレジスタのデータ)、オペランドBの入力
データ3−2(オペランドBで指定されたレジスタのデ
ータ)を備えている。
In the data input section 21, the input data 3-1 (operand A of the operand A of the instruction field is
Data of the register designated by 1) and input data 3-2 of the operand B (data of the register designated by the operand B).

【0114】更に演算器20には、シフタ3−16、3
−17、3−21と、桁上げ伝搬加算器3−19と、反
転回路3−18、3−20と、丸め回路3−22を備え
ており、演算結果3−23を得るように構成されてい
る。
Further, the arithmetic unit 20 includes shifters 3-16 and 3-3.
-17, 3-21, carry propagate adder 3-19, inverting circuits 3-18, 3-20, and rounding circuit 3-22, and are configured to obtain a calculation result 3-23. ing.

【0115】浮動小数点加算演算命令に対しては、次の
ようにして演算を実行する。この場合、符号反転回路3
−9、3−10では、+反転ビット(a、bのいずれ
か)の値に従って、+入力符号(g、hのいずれか)を
反転/非反転処理し、+出力符号(q、r)を出力す
る。。そして、オペランドA、Bの各入力データ3−
1、3−2(符号無しデータ)の符号を、+出力符号
(q、r)により付加し、演算器20へ入力する。
The floating point addition operation instruction is executed as follows. In this case, the sign inversion circuit 3
In -9 and 3-10, the + input code (any one of g and h) is inverted / non-inverted according to the value of the + inversion bit (any one of a and b), and the + output code (q, r). Is output. . Then, each input data 3 of the operands A and B
Codes of 1 and 3-2 (data without a code) are added by a + output code (q, r) and input to the arithmetic unit 20.

【0116】すなわち、符号反転回路3−9、3−10
で、対応する反転ビットが「1」の場合の符号を反転
し、演算器20に入力する。演算器20は反転ビットに
制御されることなく、命令コードに従って通常の演算
(従来例と同じ演算)が行われる。
That is, the sign inversion circuits 3-9 and 3-10.
Then, the sign when the corresponding inversion bit is “1” is inverted and input to the arithmetic unit 20. The arithmetic unit 20 is not controlled by the inversion bit and performs a normal operation (the same operation as the conventional example) according to the instruction code.

【0117】§6:例4の説明・・・図9参照 図9は固定少数点乗算演算装置を示した図である。な
お、図では固定少数点乗算演算に必要な構成のみを図示
してある。例4は、固定少数点乗算演算装置の例であ
り、演算器20と、データ入力部21と、制御データ入
力部22と、演算制御回路5−11を備えている。
§6: Description of Example 4 ... See FIG. 9 FIG. 9 is a diagram showing a fixed decimal point multiplication arithmetic unit. In the figure, only the configuration necessary for the fixed decimal point multiplication operation is shown. Example 4 is an example of a fixed decimal point multiplication calculation device, which includes a calculation unit 20, a data input unit 21, a control data input unit 22, and a calculation control circuit 5-11.

【0118】そして、データ入力部21には、オペラン
ドAの入力データ4−1と、オペランドBの入力データ
4−2を備え、制御データ入力部22には、反転ビット
aの入力部4−5と、反転ビットbの入力部4−6と、
命令コード制御部4−4を備えている。更に演算器20
には、デコーダ4−12と、倍数発生器4−13と、桁
上げ保存加算器4−14と、桁上げ伝搬加算器4−15
と、反転回路4−20と、丸め回路4−22を備えてお
り、演算結果4−23を得るように構成されている。
The data input section 21 is provided with the input data 4-1 of the operand A and the input data 4-2 of the operand B, and the control data input section 22 is the input section 4-5 of the inverted bit a. And an input unit 4-6 of the inversion bit b,
The instruction code control unit 4-4 is provided. Further arithmetic unit 20
Includes a decoder 4-12, a multiple generator 4-13, a carry save adder 4-14, and a carry propagate adder 4-15.
And an inverting circuit 4-20 and a rounding circuit 4-22, and is configured to obtain a calculation result 4-23.

【0119】固定少数点乗算演算命令に対しては、次の
ようにして演算を実行する。固定少数点乗算演算の場
合、+固定少数点演算命令の命令コードf=1となり、
演算制御回路1−11は、前記f=1の信号と、各反転
ビットの入力データa、bが入力する。そして、演算制
御回路1−11では前記入力信号を基に演算制御信号C
2を作成する。
The fixed decimal point multiplying operation instruction is executed as follows. In the case of a fixed decimal point multiplication operation, the instruction code f of the + fixed decimal point operation instruction is f = 1,
The arithmetic control circuit 1-11 receives the signal of f = 1 and the input data a and b of each inversion bit. Then, in the arithmetic control circuit 1-11, based on the input signal, the arithmetic control signal C
Create 2.

【0120】この時、演算制御回路1−11では、符号
反転ビットa、bと、命令コードfの組み合わせにより
生成した制御信号C2で演算器20の各部を制御する。
この時、反転回路4−20と、丸め回路4−22が、演
算制御信号C2により演算操作を制御される。
At this time, the arithmetic control circuit 1-11 controls each part of the arithmetic unit 20 by the control signal C2 generated by the combination of the sign inversion bits a and b and the instruction code f.
At this time, the inverting circuit 4-20 and the rounding circuit 4-22 are controlled by the operation control signal C2.

【0121】反転回路4−20は、制御信号C2が
「1」であるとビット反転を行い、「0」であると、ビ
ット反転は行わずにそのままデータを出力する。丸め回
路4−22は、制御信号C2が「1」であると、+1を
行い、「0」であると+1は行わない。
The inverting circuit 4-20 performs bit inversion when the control signal C2 is "1", and outputs data as it is without bit inversion when it is "0". The rounding circuit 4-22 performs +1 when the control signal C2 is “1” and does not perform +1 when the control signal C2 is “0”.

【0122】§7:例5の説明・・・図10参照 図10は固定少数点加算演算装置を示した図である。な
お、図では固定少数点加算演算に必要な構成のみを図示
してある。例5は、固定少数点加算演算装置の例であ
り、演算器20と、データ入力部21と、制御データ入
力部22と、演算制御回路5−11を備えている。
§7: Description of Example 5 ... See FIG. 10. FIG. 10 is a diagram showing a fixed decimal point addition arithmetic unit. In the figure, only the configuration necessary for the fixed decimal point addition operation is shown. Example 5 is an example of a fixed-point addition arithmetic device, which includes an arithmetic unit 20, a data input unit 21, a control data input unit 22, and an arithmetic control circuit 5-11.

【0123】そして、データ入力部21には、オペラン
ドAの入力データ5−1と、オペランドBの入力データ
5−2を備え、制御データ入力部22には、反転ビット
aの入力部5−5と、反転ビットの入力部5−6と、命
令コード制御部5−4を備えている。更に演算器20に
は、反転回路5−18、5−20と、桁上げ伝搬加算器
5−19と、丸め回路5−22を備えており、演算結果
5−23を得るように構成されている。
The data input section 21 is provided with the input data 5-1 of the operand A and the input data 5-2 of the operand B, and the control data input section 22 is the input section 5-5 of the inverted bit a. And an inversion bit input unit 5-6 and an instruction code control unit 5-4. Further, the arithmetic unit 20 includes inverting circuits 5-18 and 5-20, a carry propagation adder 5-19, and a rounding circuit 5-22, and is configured to obtain an arithmetic result 5-23. There is.

【0124】固定少数点加算演算命令に対しては、次の
ようにして演算を実行する。固定少数点加算演算の場
合、+固定少数点演算命令の命令コードf=1となり、
演算制御回路5−11は、前記f=1の信号と、各反転
ビットa、bが入力する。そして、演算制御回路5−1
1では、前記入力信号(制御データ)を基に、演算制御
信号C1、C2を作成する。
The fixed decimal point addition operation instruction is executed as follows. In the case of fixed decimal point addition operation, the instruction code f of the + fixed decimal point operation instruction is f = 1,
The arithmetic control circuit 5-11 receives the signal of f = 1 and the inverted bits a and b. Then, the arithmetic control circuit 5-1
In 1, the operation control signals C1 and C2 are created based on the input signal (control data).

【0125】この時、演算制御回路5−11では、符号
反転ビットa、bと、命令コードfの組み合わせにより
生成した演算制御信号C1、C2で演算器20の各部の
演算操作を制御する。この時、反転回路5−18と、桁
上げ伝搬加算器5−19が演算制御信号C1で制御さ
れ、反転回路5−20と、丸め回路5−22が、演算制
御信号C2により制御される。
At this time, the arithmetic control circuit 5-11 controls the arithmetic operation of each part of the arithmetic unit 20 by the arithmetic control signals C1 and C2 generated by the combination of the sign inversion bits a and b and the instruction code f. At this time, the inverting circuit 5-18 and the carry propagation adder 5-19 are controlled by the operation control signal C1, and the inverting circuit 5-20 and the rounding circuit 5-22 are controlled by the operation control signal C2.

【0126】この場合、反転回路5−18、5−20
は、演算制御信号C1、C2が「1」であるとビット反
転を行い、「0」であると、ビット反転は行わずにその
ままデータを出力する。桁上げ伝搬加算器5−19と丸
め回路5−22は、前記演算制御信号C1、C2が
「1」であると、+1を行い、「0」であると+1は行
わない。
In this case, the inverting circuits 5-18 and 5-20
When the operation control signals C1 and C2 are "1", bit inversion is performed, and when the operation control signals C1 and C2 are "0", the bit inversion is not performed and the data is output as it is. The carry propagation adder 5-19 and the rounding circuit 5-22 perform +1 when the operation control signals C1 and C2 are "1", and do not perform +1 when they are "0".

【0127】[0127]

【発明の効果】以上説明したように、本発明によれば次
のような効果がある。 (1) :ほんの僅かな物量の追加(演算制御回路、符号反
転回路等の追加)と、数ビットの制御ビット(反転ビッ
ト)を追加するだけで、演算式によっては、演算命令数
を従来より減らすことができる。従って、従来より演算
速度を速くすることができる。
As described above, the present invention has the following effects. (1): Depending on the arithmetic expression, the number of arithmetic instructions can be reduced from the conventional one by adding only a very small quantity (addition of arithmetic control circuit, sign inversion circuit, etc.) and several control bits (inversion bit). Can be reduced. Therefore, the calculation speed can be increased as compared with the conventional case.

【0128】(2) :演算式によっては、前処理データや
中間結果を記憶、又は保持しなくても良い場合があるた
め、レジスタやメモリの使用量を減らすことができる。 (3) :プロセッサが解釈する命令の種類を減らすことが
できる。命令解釈回路の簡単化、又は減らした命令の場
所に新規命令を割り当てることができ、プロセッサの高
機能化が可能になる。
(2): Depending on the arithmetic expression, it may not be necessary to store or hold the preprocessed data or the intermediate result, so the amount of registers and memory used can be reduced. (3): The types of instructions interpreted by the processor can be reduced. It is possible to simplify the instruction interpretation circuit or assign a new instruction to a reduced instruction location, which allows the processor to have higher functionality.

【0129】(4) :ベクトルプロセッサにおいて、スカ
ラオペランド対ベクトルオペランド、ベクトルオペラン
ド対スカラオペランドなどのオペランドの組み合わせに
柔軟に対応できる。
(4): In the vector processor, it is possible to flexibly deal with combinations of operands such as scalar operand-vector operand and vector operand-scalar operand.

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

【図1】本発明の原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】実施の形態における命令フィールドの説明図で
ある。
FIG. 2 is an explanatory diagram of an instruction field according to the embodiment.

【図3】実施の形態における浮動/固定少数点乗加算演
算装置を示した図である。
FIG. 3 is a diagram showing a floating / fixed decimal point multiplication and addition arithmetic unit in the embodiment.

【図4】図3の一部拡大図である。FIG. 4 is a partially enlarged view of FIG.

【図5】各部の説明図である。FIG. 5 is an explanatory diagram of each part.

【図6】実施の形態における演算処理フローチャートで
ある。
FIG. 6 is a flowchart of arithmetic processing according to the embodiment.

【図7】実施の形態における浮動小数点乗算演算装置を
示した図である。
FIG. 7 is a diagram showing a floating-point multiplication arithmetic unit according to the embodiment.

【図8】実施の形態における浮動小数点加算演算装置を
示した図である。
FIG. 8 is a diagram showing a floating-point addition arithmetic unit according to the embodiment.

【図9】実施の形態における固定少数点乗算演算装置を
示した図である。
FIG. 9 is a diagram showing a fixed decimal point multiplication calculation device in the embodiment.

【図10】実施の形態における固定少数点加算演算装置
を示した図である。
FIG. 10 is a diagram showing a fixed decimal point addition arithmetic unit in the embodiment.

【図11】従来の命令フィールド説明図である。FIG. 11 is an explanatory diagram of a conventional instruction field.

【図12】従来の浮動小数点乗加算演算装置を示した図
である。
FIG. 12 is a diagram showing a conventional floating point multiplication / addition calculation device.

【図13】従来の浮動小数点乗算演算装置を示した図で
ある。
FIG. 13 is a diagram showing a conventional floating point multiplication arithmetic unit.

【図14】従来の浮動小数点加算演算装置を示した図で
ある。
FIG. 14 is a diagram showing a conventional floating point addition arithmetic unit.

【図15】従来の固定小数点乗加算演算装置を示した図
である。
FIG. 15 is a diagram showing a conventional fixed point multiplication / addition calculation device.

【図16】従来の固定小数点乗算演算装置を示した図で
ある。
FIG. 16 is a diagram showing a conventional fixed-point multiplication arithmetic unit.

【図17】従来の固定小数点加算演算装置を示した図で
ある。
FIG. 17 is a diagram showing a conventional fixed-point addition arithmetic unit.

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

20 演算器 21 データ入力部 22 制御データ入力部 25、29、30 AND回路 26、27、28 EX−OR回路 1−1〜12−1 オペランドAの入力データ 1−2〜12−2 オペランドBの入力データ 1−3〜10−3 オペランドCの入力データ 1−4〜5−4 命令コード制御部 1−8、1−9〜3−9、1−10〜3−10 符号反
転回路 1−11〜5−11 演算制御回路
20 arithmetic unit 21 data input unit 22 control data input unit 25, 29, 30 AND circuits 26, 27, 28 EX-OR circuits 1-1 to 12-1 input data of operand A 1-2 to 12-2 of operand B Input data 1-3 to 10-3 Input data of operand C 1-4 to 5-4 Instruction code control unit 1-8, 1-9 to 3-9, 1-10 to 3-10 Sign inverting circuit 1-11 ~ 5-11 Operation control circuit

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 7/38 G06F 7/00 G06F 9/305 ─────────────────────────────────────────────────── ─── Continuation of the front page (58) Fields surveyed (Int.Cl. 7 , DB name) G06F 7/38 G06F 7/00 G06F 9/305

Claims (8)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】少なくとも、命令を逐次解釈し演算装置に
より演算命令を実行するプロセッサにおいて、 演算命令のフィールド中に、個々のオペランドにそれぞ
れ対応して反転ビットを設け、前記反転ビットを演算装
置の制御データとして入力し、前記反転ビットがビット
反転を指示する値であれば、前記演算装置により、その
ビットに対応するオペランドの値を(−1)倍した値と
して演算を実行することを特徴とした演算実行方法。
At least a processor for sequentially interpreting an instruction and executing an arithmetic instruction by an arithmetic unit, wherein an inversion bit is provided corresponding to each operand in a field of the arithmetic instruction, and the inversion bit of the arithmetic unit is provided. When it is input as control data and the inversion bit is a value indicating a bit inversion, the arithmetic unit executes an operation by multiplying the value of the operand corresponding to the bit by (-1). How to execute the calculation.
【請求項2】前記演算命令が浮動小数点演算命令で、入
力オペランドに対応する反転ビットがビット反転を指示
する値の場合、前記演算装置により、そのビットに対応
するオペランドの符号ビットを反転してから演算を実行
することを特徴とした請求項1記載の演算実行方法。
2. When the arithmetic instruction is a floating point arithmetic instruction and the inversion bit corresponding to the input operand is a value indicating bit inversion, the arithmetic unit inverts the sign bit of the operand corresponding to the bit. The method according to claim 1, wherein the calculation is performed from
【請求項3】前記演算命令が固定小数点演算命令の場
合、入力オペランドに対応する反転ビットと演算命令コ
ードを組み合わせて演算制御信号を作成し、この演算制
御信号で演算装置の演算操作を制御し、演算を実行する
ことを特徴とした請求項1記載の演算実行方法。
3. When the operation instruction is a fixed-point operation instruction, an operation control signal is created by combining an inversion bit corresponding to an input operand and an operation instruction code, and the operation operation of the operation device is controlled by this operation control signal. The method according to claim 1, wherein the calculation is performed.
【請求項4】前記演算命令が減算命令の場合、前記演算
装置により、減算命令を加算命令として実行することを
特徴とした請求項1記載の演算実行方法。
4. The operation execution method according to claim 1, wherein when the operation instruction is a subtraction instruction, the operation unit executes the subtraction instruction as an addition instruction.
【請求項5】演算命令のフィールド中に、個々のオペラ
ンドにそれぞれ対応して、各オペランドの符号ビットの
反転/非反転を指示する反転ビットを設けると共に、少
なくとも、浮動小数点演算器を備え、演算命令を逐次解
釈し実行するプロセッサの演算装置であって、 前記反転ビットを制御データとして入力する制御データ
入力部と、前記反転ビットのそれぞれに対応させた符号
反転回路を設け、前記符号反転回路は、それぞれ浮動小
数点データの符号ビットと、対応する反転ビットを入力
し、前記反転ビットの指示に従って前記符号ビットを反
転/非反転処理し、その出力が浮動小数点演算器のオペ
ランド入力となるように構成したことを特徴とする演算
装置。
5. An operation instruction field is provided with an inversion bit corresponding to each operand to indicate inversion / non-inversion of a sign bit of each operand, and at least a floating point arithmetic unit is provided to perform an operation. An arithmetic unit of a processor for sequentially interpreting and executing instructions, comprising a control data input unit for inputting the inversion bit as control data, and a code inversion circuit corresponding to each of the inversion bits, wherein the code inversion circuit is , Each inputting the sign bit of the floating point data and the corresponding inversion bit, inversion / non-inversion processing of the sign bit according to the instruction of the inversion bit, and its output is configured as an operand input of the floating point arithmetic unit An arithmetic unit characterized by the above.
【請求項6】演算命令のフィールド中に、個々のオペラ
ンドにそれぞれ対応して、各オペランドの符号ビットの
反転/非反転を指示する反転ビットを設けると共に、少
なくとも、固定小数点演算器を備え、演算命令を逐次解
釈し実行するプロセッサの演算装置であって、 前記反転ビット及び演算命令コードを制御データとして
入力する制御データ入力部と、演算制御回路を設け、か
つ、前記固定小数点演算器に補数変換回路を設け、 前記演算制御回路は、前記反転ビット及び演算命令コー
ドを入力して演算制御信号を生成し、前記演算制御信号
で固定小数点演算器の演算操作を制御する構成とし、前
記補数変換回路は、固定小数点演算器の出力と演算制御
回路からの補数変換用の演算制御信号を入力して補数変
換を行う構成としたことを特徴とする演算装置。
6. An operation instruction field is provided with an inversion bit corresponding to each operand to indicate inversion / non-inversion of a sign bit of each operand, and at least a fixed-point arithmetic unit is provided to perform an operation. An arithmetic unit of a processor for sequentially interpreting and executing instructions, comprising a control data input unit for inputting the inverted bit and an arithmetic instruction code as control data, and an arithmetic control circuit, and complement conversion to the fixed-point arithmetic unit. A circuit is provided, the arithmetic control circuit inputs the inversion bit and the arithmetic instruction code to generate an arithmetic control signal, and the arithmetic control signal controls the arithmetic operation of the fixed-point arithmetic unit; Is characterized in that the output of the fixed-point arithmetic unit and the operation control signal for complement conversion from the operation control circuit are input to perform complement conversion. A computing device.
【請求項7】演算命令のフィールド中に、個々のオペラ
ンドにそれぞれ対応して、各オペランドの符号ビットの
反転/非反転を指示する反転ビットを設けると共に、少
なくとも、固定小数点演算及び浮動小数点演算の両方を
実行する演算器を備え、演算命令を逐次解釈し実行する
プロセッサの演算装置であって、 前記反転ビット及び命令コードを制御データとして入力
する制御データ入力部と、前記反転ビットのそれぞれに
対応させた符号反転回路と、演算制御回路を設け、か
つ、前記演算器に補数変換回路を設け、 前記符号反転回路は、浮動小数点データの符号ビット
と、対応する反転ビットと、演算命令コードを入力し、
前記反転ビットの指示に従って符号ビットを反転/非反
転処理し、その出力が演算器のオペランド入力となる構
成とし、 前記演算制御回路は、前記反転ビット及び演算命令コー
ドを入力して演算制御信号を生成し、その演算制御信号
で演算器の演算操作を制御する構成とし、 前記補数変換回路は、前記演算器の出力と、前記演算制
御回路からの補数変換用の演算制御信号を入力して補数
変換を行う構成としたことを特徴とする演算装置。
7. An operation instruction field is provided with an inversion bit for instructing inversion / non-inversion of the sign bit of each operand, corresponding to each operand, and at least for fixed-point operation and floating-point operation. An arithmetic unit of a processor, which includes an arithmetic unit for executing both and sequentially interprets and executes arithmetic instructions, corresponding to each of the control data input unit for inputting the inversion bit and the instruction code as control data, and the inversion bit. And an arithmetic control circuit, and a complement conversion circuit is provided in the arithmetic unit. The sign inversion circuit inputs a sign bit of floating-point data, a corresponding inversion bit, and an operation instruction code. Then
The sign bit is inverted / non-inverted according to the instruction of the inversion bit, and the output is an operand input of an arithmetic unit. The arithmetic control circuit inputs the inversion bit and the arithmetic instruction code to output an arithmetic control signal. The operation control signal is generated and the operation control of the operation unit is controlled by the operation control signal, and the complement conversion circuit inputs the output of the operation unit and the operation control signal for complement conversion from the operation control circuit to obtain the complement. An arithmetic unit having a configuration for performing conversion.
【請求項8】前記補数変換回路は、浮動小数点演算器で
必要な既存のビット反転回路、及び丸め回路と共用化し
たことを特徴とした請求項7記載の演算装置。
8. The arithmetic unit according to claim 7, wherein the complement conversion circuit is shared with an existing bit inverting circuit and a rounding circuit required for a floating point arithmetic unit.
JP22797296A 1996-08-29 1996-08-29 Calculation execution method and calculation device Expired - Fee Related JP3462670B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22797296A JP3462670B2 (en) 1996-08-29 1996-08-29 Calculation execution method and calculation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22797296A JP3462670B2 (en) 1996-08-29 1996-08-29 Calculation execution method and calculation device

Publications (2)

Publication Number Publication Date
JPH1069372A JPH1069372A (en) 1998-03-10
JP3462670B2 true JP3462670B2 (en) 2003-11-05

Family

ID=16869150

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22797296A Expired - Fee Related JP3462670B2 (en) 1996-08-29 1996-08-29 Calculation execution method and calculation device

Country Status (1)

Country Link
JP (1) JP3462670B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2474901B (en) * 2009-10-30 2015-01-07 Advanced Risc Mach Ltd Apparatus and method for performing multiply-accumulate operations

Also Published As

Publication number Publication date
JPH1069372A (en) 1998-03-10

Similar Documents

Publication Publication Date Title
US5844830A (en) Executing computer instrucrions by circuits having different latencies
US6742012B2 (en) Apparatus and method for performing multiplication operations
TWI402766B (en) Graphics processor
US5991785A (en) Determining an extremum value and its index in an array using a dual-accumulation processor
JP3583474B2 (en) Multiplier
JP3667635B2 (en) Arithmetic unit
JPH0863353A (en) Data processing using multiplication accumulation instruction
JP2000076047A (en) Floating point multiplication and accumulation unit
JP2683488B2 (en) 3-1 Logical operation device
US6999985B2 (en) Single instruction multiple data processing
JP2006228190A (en) Data processor and data processing method performing reciprocal operation on input value for producing result value
JP3479385B2 (en) Information processing device
US5574672A (en) Combination multiplier/shifter
JP3462670B2 (en) Calculation execution method and calculation device
US7260711B2 (en) Single instruction multiple data processing allowing the combination of portions of two data words with a single pack instruction
JP3579087B2 (en) Arithmetic unit and microprocessor
CN100392584C (en) Carry save adder and its system
JP3462054B2 (en) Parallel addition / subtraction circuit
JP2765516B2 (en) Multiply-accumulate unit
JPH1049348A (en) Integer multiplicator
US6792442B1 (en) Signal processor and product-sum operating device for use therein with rounding function
JPH10333883A (en) Multiplying method and circuit therefor
JPH01300338A (en) Floating point multiplier
JP2000293357A (en) Microprocessor
JPS6149234A (en) Multiplier circuit for floating point

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20030805

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080815

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees