JPH0823812B2 - Floating point data calculation method and calculation device - Google Patents
Floating point data calculation method and calculation deviceInfo
- Publication number
- JPH0823812B2 JPH0823812B2 JP3180865A JP18086591A JPH0823812B2 JP H0823812 B2 JPH0823812 B2 JP H0823812B2 JP 3180865 A JP3180865 A JP 3180865A JP 18086591 A JP18086591 A JP 18086591A JP H0823812 B2 JPH0823812 B2 JP H0823812B2
- Authority
- JP
- Japan
- Prior art keywords
- rounding
- bit
- precision
- bits
- mantissa
- 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 - Lifetime
Links
- 238000004364 calculation method Methods 0.000 title claims description 25
- 238000012937 correction Methods 0.000 claims description 172
- 238000012545 processing Methods 0.000 claims description 102
- 238000010606 normalization Methods 0.000 claims description 72
- 238000000034 method Methods 0.000 claims description 63
- 238000007689 inspection Methods 0.000 claims description 20
- 238000001514 detection method Methods 0.000 claims description 8
- 238000011410 subtraction method Methods 0.000 claims description 6
- 238000007792 addition Methods 0.000 description 337
- 238000010586 diagram Methods 0.000 description 71
- 238000003780 insertion Methods 0.000 description 44
- 230000037431 insertion Effects 0.000 description 44
- 230000000295 complement effect Effects 0.000 description 17
- 230000014509 gene expression Effects 0.000 description 9
- 230000003252 repetitive effect Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000000638 solvent extraction Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
Description
【0001】[0001]
【産業上の利用分野】本発明はディジタル計算機の中央
処理装置等に用いられ、特に浮動小数点データの四則演
算、さらにはエー・エヌ・エス・アイ/アイ・イー・イ
ー・イー(ANSI/IEEE)浮動小数点演算規格P754等に準拠
する浮動小数点データの四則演算と丸めおよび正規化演
算を行う浮動小数点データの演算方法および演算装置に
関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is used in a central processing unit of a digital computer or the like, and in particular, four arithmetic operations of floating-point data, and further, ANSI / IEEE. The present invention relates to an arithmetic method and arithmetic unit for floating-point data that performs four arithmetic operations and rounding and normalizing operations of floating-point data that conform to the floating-point arithmetic standard P754 and the like.
【0002】[0002]
【従来の技術】従来の浮動小数点データの演算方法およ
び演算装置としては、例えばモトローラ・テクニカル・
ディベロップメンツ1988年10月号「フローティング・ポ
イント・パイプライン・パーティショニング」("FLOATI
NG POINT PIPELINE PARTITIONING",MOTOROLA TECHNICAL
DEVELOPMENTS,Vol.8,pp.29,Oct.1988)に示されている
ものがある。2. Description of the Related Art As a conventional floating-point data calculation method and calculation device, for example, Motorola Technical
Developments October 1988 "Floating Point Pipeline Partitioning"("FLOATI
NG POINT PIPELINE PARTITIONING ", MOTOROLA TECHNICAL
DEVELOPMENTS, Vol.8, pp.29, Oct. 1988).
【0003】図42はこの従来の浮動小数点データの演算
装置の中から加減算装置のブロック図を示すものであ
る。ただし、本発明との相違点を明確にするために原典
のブロック図の構成を変更して示している。また、以下
で、加算とは異符号の減算または同符号の加算時に仮数
データに対して行なう加算を示し、減算とは異符号の加
算または同符号の減算時、仮数データに対して行う減算
を示す。加算か減算かは、入力データの符号と命令の種
類によって、演算に先立って決定されるものとする。FIG. 42 is a block diagram of an adder / subtractor of the conventional floating point data arithmetic unit. However, in order to clarify the difference from the present invention, the configuration of the original block diagram is changed and shown. Further, in the following, addition means subtraction with different signs or addition performed on mantissa data at the time of addition with the same sign, and subtraction means subtraction performed on mantissa data at addition with different signs or subtraction with the same sign. Show. It is assumed that addition or subtraction is determined prior to the operation depending on the sign of the input data and the type of instruction.
【0004】図42において、151は2つの浮動小数点デ
ータのうち指数が小さくない方の仮数を格納するレジス
タ、152は2つの浮動小数点データのうち指数が小さい
方の仮数を小さくない方の指数に桁合わせしたものを格
納するレジスタ、153は減算時にレジスタ152の出力の1
の補数をとる補数器、154はレジスタ151と補数器153の
出力を入力として加算時には最下位ビットへのキャリ入
力(Cin)を0にして加算を実行し、減算時にはキャリ入
力(Cin)を1にして減算を実行する加算器、155は加算器
154の出力を格納するレジスタ、156は加算器154の出力
の正規化のためのシフト数を生成するシフト数生成回
路、157は正規化のためにレジスタ155の出力に対してシ
フト数生成回路156が示すビット数だけシフトを行なう
バレルシフタ、158はバレルシフタ157の出力を格納する
レジスタ、159はレジスタ158に保持された値と丸めモー
ドおよび丸め精度に応じて丸め加算値の加算の有無を決
定し、丸めにより切上げを行なう場合は丸め精度に対応
した最下位ビット(L)を1にして他のビットは0にした
丸め加算値を生成し、丸めにより切捨てを行なう場合は
すべてのビットを0にした丸め加算値を生成する丸め値
生成回路、160はレジスタ158の出力と丸め値生成回路15
9の出力を加算する加算器、161は加算器160の出力を最
下位ビット方向(以下、右という)に1ビットシフトす
るR1シフタ、162はR1シフタ161の出力で求める加減
算結果の仮数を格納するレジスタである。In FIG. 42, 151 is a register for storing the mantissa of the two floating-point data whose exponent is not smaller, and 152 is the mantissa of the two floating-point data whose exponent is smaller is the exponent of the smaller exponent. A register for storing the digit-matched one, and 153 is 1 of the output of the register 152 during subtraction
154 is a complementer that takes the complement of the register 151 and the complementer 153 as inputs, and carries out addition by setting the carry input (Cin) to the least significant bit to 0 at the time of addition, and carries the carry input (Cin) at 1 at the time of subtraction. And adder to perform subtraction, 155 is an adder
A register for storing the output of 154, 156 is a shift number generation circuit for generating a shift number for normalizing the output of the adder 154, and 157 is a shift number generation circuit 156 for the output of the register 155 for normalization. Barrel shifter that shifts by the number of bits indicated by, 158 is a register that stores the output of barrel shifter 157, and 159 determines whether or not to add a rounding addition value according to the value held in register 158 and the rounding mode and rounding precision. When rounding up is performed, the least significant bit (L) corresponding to the rounding precision is set to 1 and the other bits are set to 0 to generate a rounded addition value. When rounding down is performed, all bits are set to 0. A rounding value generation circuit that generates a rounding addition value, 160 is the output of the register 158 and the rounding value generation circuit 15
An adder that adds the outputs of 9; 161 is an R1 shifter that shifts the output of the adder 160 by 1 bit in the least significant bit direction (hereinafter referred to as right). 162 is a mantissa of the addition / subtraction result obtained from the output of the R1 shifter 161. Register.
【0005】以上のように構成された従来の浮動小数点
データの加減算装置について、以下その動作を説明す
る。The operation of the conventional floating point data adder / subtractor configured as described above will be described below.
【0006】はじめに被加減数および加減数がANSI/IEE
E浮動小数点演算規格P754による基本形式単精度フォー
マット(以下、単に単精度という)で和または差を単精
度で丸める場合を説明する。 (1)処理ステップ開始前 被加減数および加減数のうち指数が小さくない方の仮数
をレジスタ151に、被加減数および加減数のうち指数が
小さい方の仮数を小さくない方の指数に桁合わせしたも
のをレジスタ152に格納する。桁合わせ時の桁落ちした
ビットは、最下位ビット(L)の1桁下のビットで2-24の
重みを持つ丸めビット(R)と、2-25の重みを持つビット
以下のビットの論理和であるスティッキビット(S)とし
て併せてレジスタ152に格納する。 (2)ステップ1 補数器153および加算器154はレジスタ151とレジスタ152
に保持されている2つの仮数を加減算し、結果をレジス
タ155に格納する。加算時は、補数器153はレジスタ152
の出力をそのまま加算器154に出力して加算器154のCin
は0にする。減算時は、補数器153はレジスタ152の出力
の1の補数をとって加算器154に出力し、Cinを1にす
る。 (3)ステップ2 シフト数生成回路156は加算器154の出力を正規化するた
めのシフト数を生成し、バレルシフタ157はレジスタ155
の出力をシフト数生成回路156の出力に基づいてシフト
を行なうことによりステップ1の演算結果に対して正規
化シフトを行なう。その際、バレルシフタ157は最下位
ビット(L)までのシフト結果と、最下位ビットの1桁下
のビットで2-24の重みを持つ丸めビット(R)と、2-25
の重みを持つビット以下のビットの論理和であるスティ
ッキビット(S)とを生成してレジスタ158に格納する。 (4)ステップ3 丸め値生成回路159はレジスタ158に保持されている最下
位ビット(L)と丸めビット(R)とスティッキビット(S)と
丸めモードと丸め精度および演算結果の符号とによって
丸め加算値を生成する。生成する丸め加算値は、図27に
示す入出力関係図に従い、丸め加算信号が1の時は2
-23の重みを持つビットを1にしてその他のビットを0
にした丸め値を、丸め加算信号が0の時はすべてのビッ
トを0にした丸め値を生成する。RM、RP、RN、RZはANSI/IE
EE浮動小数点演算規格P754に規定される丸めモードで、
順に負方向丸め、正方向丸め、最近偶丸めを表してい
る。加算器160はレジスタ158の出力と丸め値生成回路15
9の出力との加算を行ない、R1シフタ161は加算器160
ので桁あふれが発生した場合は加算器160の出力を右に
1ビットシフトしてその他の場合は加算器160の出力を
そのままレジスタ162に格納し、処理を終了する。First, the addend / subtract and the addend / subtract are ANSI / IEE
E Floating-point Arithmetic Standard Basic format according to P754 Single-precision format (hereinafter simply referred to as single-precision) A case where a sum or difference is rounded to single-precision will be described. (1) Before the start of processing step The mantissa whose exponent is the smaller one of the augend and the addend is added to the register 151, and the mantissa of the augend and the addend which has the smaller exponent is aligned with the exponent which is not the smaller. The result is stored in the register 152. The missing bit at the time of digit alignment is the bit one digit below the least significant bit (L), the rounding bit (R) with a weight of 2 -24 , and the bit below the bit with a weight of 2 -25. The sticky bit (S), which is the sum, is also stored in the register 152. (2) Step 1 Complement calculator 153 and adder 154 are registered in register 151 and register 152.
The two mantissas held in the are added and subtracted, and the result is stored in the register 155. At the time of addition, the complement unit 153 is set in the register 152.
Of the Cin of the adder 154
Is 0. At the time of subtraction, the complement unit 153 takes the 1's complement of the output of the register 152 and outputs it to the adder 154 to set Cin to 1. (3) Step 2 The shift number generation circuit 156 generates the shift number for normalizing the output of the adder 154, and the barrel shifter 157 registers the register 155.
Is shifted based on the output of the shift number generation circuit 156 to perform the normalization shift on the operation result of step 1. At that time, the barrel shifter 157 shifts up to the least significant bit (L), rounds bits (R) with a weight of 2 -24 , which is one digit below the least significant bit, and 2 -25.
A sticky bit (S), which is the logical sum of bits less than or equal to the weighted bit, is generated and stored in the register 158. (4) Step 3 The rounding value generation circuit 159 performs rounding according to the least significant bit (L), the rounding bit (R), the sticky bit (S), the rounding mode, the rounding precision, and the sign of the operation result held in the register 158. Generate an added value. The rounding addition value to be generated is 2 when the rounding addition signal is 1 according to the input / output relationship diagram shown in FIG.
-Set the bit with a weight of -23 to 1 and the other bits to 0
When the rounded addition signal is 0, the rounded value obtained by setting all the bits to 0 is generated. RM, RP, RN, RZ are ANSI / IE
In the rounding mode specified in EE floating point arithmetic standard P754,
Negative rounding, positive rounding, and even rounding are shown in order. The adder 160 outputs the output of the register 158 and the rounding value generation circuit 15
The output from 9 is added, and the R1 shifter 161 adds the adder 160
Therefore, when a digit overflow occurs, the output of the adder 160 is shifted to the right by 1 bit, and in other cases, the output of the adder 160 is stored in the register 162 as it is, and the process is terminated.
【0007】次に被加減数および加減数がANSI/IEEE浮
動小数点演算規格P754により基本形式倍精度フォーマッ
ト(以下、単に倍精度という)で和または差を倍精度で
丸める場合を説明する。 (1)処理ステップ開始前 被加減数および加減数のうち指数が小さくない方の仮数
をレジスタ151に、被加減数および加減数のうち指数が
小さい方の仮数を小さくない方の指数に桁合わせしたも
のをレジスタ152に格納する。桁合わせ時の桁落ちした
ビットは、最下位ビット(L)の1桁下のビットで2-53の
重みを持つ丸めビット(R)と、2-54の重みを持つビット
以下のビットの論理和であるスティッキビット(S)とし
て併せてレジスタ152に格納する。 (2)ステップ1 補数器153および加算器154はレジスタ151とレジスタ152
に保持されている2つの仮数を加減算し、結果をレジス
タ155に格納する。加算時は、補数器153はレジスタ152
の出力をそのまま加算器154に出力して加算器154のCin
は0にする。減算時は、補数器153はレジスタ152の出力
の1の補数をとって加算器154に出力し、Cinを1にす
る。 (3)ステップ2 シフト数生成回路156は加算器154の出力を正規化するた
めのシフト数を生成し、バレルシフタ157はレジスタ155
の出力をシフト数生成回路156の出力に基づいてシフト
を行なうことによりステップ1の演算結果に対して正規
化シフトを行なう。その際、バレルシフタ157は最下位
ビット(L)までのシフト結果と、最下位ビットの1桁下
のビットで2-53の重みを持つ丸めビット(R)と、2-54
の重みを持つビット以下のビットの論理和であるスティ
ッキビット(S)とを生成してレジスタ158に格納する。 (4)ステップ3 丸め値生成回路159はレジスタ158に保持されている最下
位ビット(L)と丸めビット(R)とスティッキビット(S)と
丸めモードと丸め精度および演算結果の符号とによって
丸め加算値を生成する。生成する丸め加算値は、図27に
示す入出力関係図に従い、丸め加算信号が1の時は2
-52の重みを持つビットを1にしてその他のビットを0
にした丸め値を、丸め加算信号が0の時はすべてのビッ
トを0にした丸め値を生成する。RM、RP、RN、RZはANSI/IE
EE浮動小数点演算規格P754に規定される丸めモードで、
順に負方向丸め、正方向丸め、最近偶丸めを表してい
る。加算器160はレジスタ158の出力と丸め値生成回路15
9の出力との加算を行ない、R1シフタ161は加算器160
で桁あふれが発生した場合は加算器160の出力を右に1
ビットシフトしてその他の場合は加算器160の出力をそ
のままレジスタ162に格納し、処理を終了する。Next, the case where the sum or difference is rounded to double precision in the basic format double precision format (hereinafter, simply referred to as double precision) according to ANSI / IEEE floating point arithmetic standard P754 will be described. (1) Before the start of processing step The mantissa whose exponent is the smaller one of the augend and the addend is added to the register 151, and the mantissa of the augend and the addend which has the smaller exponent is aligned with the exponent which is not the smaller. The result is stored in the register 152. The digit lost during digit alignment is the bit one digit below the least significant bit (L), the rounding bit (R) with a weight of 2 -53 , and the logic of the bits below the bit with a weight of 2 -54. The sticky bit (S), which is the sum, is also stored in the register 152. (2) Step 1 Complement calculator 153 and adder 154 are registered in register 151 and register 152.
The two mantissas held in the are added and subtracted, and the result is stored in the register 155. At the time of addition, the complement unit 153 is set in the register 152.
Of the Cin of the adder 154
Is 0. At the time of subtraction, the complement unit 153 takes the 1's complement of the output of the register 152 and outputs it to the adder 154 to set Cin to 1. (3) Step 2 The shift number generation circuit 156 generates the shift number for normalizing the output of the adder 154, and the barrel shifter 157 registers the register 155.
Is shifted based on the output of the shift number generation circuit 156 to perform the normalization shift on the operation result of step 1. At that time, the barrel shifter 157 shifts the result up to the least significant bit (L), rounds down the bit one digit below the least significant bit (R) and has a weight of 2 -53 , and 2 -54.
A sticky bit (S), which is the logical sum of bits less than or equal to the weighted bit, is generated and stored in the register 158. (4) Step 3 The rounding value generation circuit 159 performs rounding according to the least significant bit (L), the rounding bit (R), the sticky bit (S), the rounding mode, the rounding precision, and the sign of the operation result held in the register 158. Generate an added value. The rounding addition value to be generated is 2 when the rounding addition signal is 1 according to the input / output relationship diagram shown in FIG.
Set the bit with the weight of -52 to 1 and the other bits to 0
When the rounded addition signal is 0, the rounded value obtained by setting all the bits to 0 is generated. RM, RP, RN, RZ are ANSI / IE
In the rounding mode specified in EE floating point arithmetic standard P754,
Negative rounding, positive rounding, and even rounding are shown in order. The adder 160 outputs the output of the register 158 and the rounding value generation circuit 15
The output from 9 is added, and the R1 shifter 161 adds the adder 160
If an overflow occurs at, the output of adder 160 is set to the right by 1.
In the other cases, the output of the adder 160 is stored in the register 162 as it is, and the processing is terminated.
【0008】図43は従来の浮動小数点データの乗算装置
のブロック図を示すものである。ただし、本発明との相
違点を明確にするために原典のブロック図の構成を変更
して示している。251は被乗数を保持する被乗数レジス
タで、1ビットの符号部251sと11ビットの指数部251eと
53ビットの仮数部251fからなる。252は乗数を保持する
乗数レジスタで、1ビットの符号部252sと11ビットの指
数部252eと53ビットの仮数部252fからなる。被乗数レジ
スタ仮数部251fと乗数レジスタ仮数部252fの最上位ビッ
トはいずれも20の重みを持ついわゆる「隠れビット」
で正規化数の時は1であり、このビットを除いて被乗数
レジスタ251および乗数レジスタ252はともに倍精度に合
致している。253は被乗数レジスタ符号部251sと乗数レ
ジスタ符号部252sから被乗数および乗数の符号を読出し
て積の符号を生成する符号生成回路、254は被乗数レジ
スタ指数部251eと乗数レジスタ指数部252eから被乗数お
よび乗数の指数を読出して積の指数を算出する11ビット
の指数加算器、255、256はそれぞれ指数加算器254の2
つの入力を選択する11ビットのセレクタ、257は指数加
算器254の出力を保持してセレクタ255を通して再び指数
加算器254に入力するための11ビットのラッチ、258は積
の指数を算出する課程での11ビットのバイアス(偏位)
補正値を生成するバイアス補正値生成回路、259は積の
仮数の1ビットシフトの正規化に伴って指数を1だけ増
分させるための定数を生成する正規化補正値生成回路、
260は被乗数レジスタ仮数部251fを読出してその上位27
ビットもしくは下位27ビット(この時の最上位ビットは
0とする)を選択して出力する被乗数上位下位選択回
路、261は乗数レジスタ仮数部252fを読出してその上位2
7ビットもしくは下位27ビット(この時の最上位ビット
は0とする)を選択して出力する乗数上位下位選択回
路、262は27ビットの被乗数上位下位選択回路260の出力
と27ビットの乗数上位下位選択回路261の出力を乗算し
てそれぞれ54ビットの和(サム)と桁上げ(キャリ)を
出力する乗算器、263、264はそれぞれ乗算器262の和出
力と桁上げ出力を保持する54ビットのラッチ、265はラ
ッチ263とラッチ264に保持された乗算器262の和出力と
桁上げ出力を加算する54ビットの積生成加算器、266は
積生成加算器265の出力を保持する54ビットのラッチ、2
67は積の仮数を単精度または倍精度に丸めるために加算
を行う時の定数を生成する丸め加算値生成回路、268は
丸め加算値生成回路267の出力とラッチ266の値とを選択
する54ビットのセレクタ、269はセレクタ268の出力と後
述するラッチ273に保持されている値とを加算する54ビ
ットの仮数加算器、270は積生成加算器265の最上位ビッ
トからの桁あふれと仮数加算器269の最上位ビットから
の桁あふれの論理和を演算する論理和ゲート、271は仮
数加算器269の出力を最下位ビット方向に0ビットまた
は1ビットまたは26ビットシフトする54ビットのシフ
タ、272は仮数加算器269の出力の下位30ビットとシフタ
271における26ビットの最下位ビットからのシフトあふ
れとを入力して丸め精度が単精度か倍精度かに応じてス
ティッキビットを生成するスティッキビット生成回路、
273はシフタ271の出力を保持する54ビットのラッチ、27
4は積を保持する積レジスタで、1ビットの符号部274s
と11ビットの指数部274eと53ビットの仮数部274fからな
る。積レジスタ仮数部274fの最上位ビットも20の重み
を持ついわゆる「隠れビット」で正規化数の時は1であ
り、このビットを除いて積レジスタ274は倍精度に合致
している。図44は図43に示す丸め加算値生成回路267が
生成する定数を示す動作説明図で、最上位ビットから24
ビット目だけが1で他が0の丸め加算値Dと最下位ビッ
トから2ビット目だけが1で他が0の丸め加算値Eを生
成する。FIG. 43 is a block diagram of a conventional floating point data multiplication device. However, in order to clarify the difference from the present invention, the configuration of the original block diagram is changed and shown. 251 is a multiplicand register that holds a multiplicand, and a 1-bit sign part 251s and an 11-bit exponent part 251e.
It consists of a 53-bit mantissa part 251f. 252 is a multiplier register for holding a multiplier, and is composed of a 1-bit sign part 252s, an 11-bit exponent part 252e, and a 53-bit mantissa part 252f. So-called "hidden bit" most significant bit of the multiplicand register mantissa portion 251f and the multiplier register mantissa portion 252f is with the weight of any 2 0
In the case of a normalized number, the value is 1, and except for this bit, the multiplicand register 251 and the multiplier register 252 both match with double precision. 253 is a code generation circuit that reads the multiplicand and the sign of the multiplier from the multiplicand register encoder 251s and the multiplier register encoder 252s and generates the sign of the product. An 11-bit exponent adder that reads out the exponent and calculates the exponent of the product, 255 and 256 are 2 of the exponent adder 254, respectively.
11-bit selector for selecting one input, 257 is an 11-bit latch for holding the output of the exponent adder 254 and inputting it again to the exponent adder 254 through the selector 255, 258 is the process of calculating the exponent of the product 11-bit bias of
A bias correction value generation circuit for generating a correction value, 259 is a normalized correction value generation circuit for generating a constant for incrementing the exponent by 1 with the normalization of the 1-bit shift of the mantissa of the product,
260 reads the multiplicand register mantissa part 251f and outputs the higher 27
Bit or lower 27 bits (the most significant bit is 0 at this time) is selected and output, the multiplicand upper and lower selection circuit, 261 reads the multiplier register mantissa part 252f and outputs the upper 2
Multiplier upper / lower selection circuit that selects and outputs 7 bits or lower 27 bits (most significant bit is 0 at this time), 262 is output of 27-bit multiplicand upper / lower selection circuit 260 and 27-bit multiplier upper / lower Multipliers that multiply the output of the selection circuit 261 and output a sum (sum) and carry (carry) of 54 bits respectively, and 263 and 264 are 54-bits that hold the sum output and carry output of the multiplier 262, respectively. Latch, 265 is a 54-bit product generation adder that adds the sum output and carry output of the multiplier 262 held in the latch 263 and the latch 264, and 266 is a 54-bit latch that holds the output of the product generation adder 265. , 2
67 is a rounding addition value generation circuit that generates a constant when performing addition to round the mantissa of the product to single precision or double precision, and 268 selects the output of the rounding addition value generation circuit 267 and the value of the latch 266. A bit selector, 269 is a 54-bit mantissa adder that adds the output of the selector 268 and the value held in a latch 273 described later, and 270 is a overflow and mantissa addition from the most significant bit of the product generation adder 265. An OR gate for calculating the logical sum of overflow from the most significant bit of the device 269, 271 is a 54-bit shifter that shifts the output of the mantissa adder 269 by 0 bit, 1 bit or 26 bits toward the least significant bit, 272 Is the lower 30 bits of the mantissa adder 269 output and the shifter
A sticky bit generation circuit that inputs a shift overflow from the 26 least significant bits in 271 and generates a sticky bit according to whether the rounding precision is single precision or double precision,
273 is a 54-bit latch that holds the output of shifter 271, 27
4 is a product register that holds the product, and is a 1-bit sign part 274s.
And 11-bit exponent part 274e and 53-bit mantissa part 274f. When normalized number with a so-called "hidden bit", also the most significant bit of the product register mantissa portion 274f having a 2 0 weight is 1, product register 274 except for this bit meets the precision. FIG. 44 is an operation explanatory diagram showing constants generated by the rounded addition value generation circuit 267 shown in FIG. 43.
A rounded addition value D in which only the first bit is 1 and the others are 0 and a rounded addition value E in which only the second bit is 1 and the other bits are 0 are generated from the least significant bit.
【0009】以上のように構成された従来の浮動小数点
データの乗算装置について、以下その動作を説明する。The operation of the conventional floating-point data multiplication device configured as described above will be described below.
【0010】はじめに被乗数および乗数が単精度で積を
単精度で丸める場合を図45に示す単精度乗算の動作フロ
ー図を用いて説明する。同図は指数加算器254、乗算器2
62、積生成加算器265、仮数加算器269、シフタ271の処
理ステップ毎の動作の内容を示したものである。 (1)処理ステップ開始前 単精度の被乗数および乗数を倍精度に拡張してそれぞれ
被乗数レジスタ251と乗数レジスタ252に格納する。この
とき被乗数レジスタ指数部251eと乗数レジスタ指数部25
2eはともに倍精度のバイアス表現(真の指数値=指数部
の値−1023(10))に変換され、被乗数レジスタ仮数部25
1fと乗数レジスタ仮数部252fの下位29ビットには0が埋
められる。ラッチ273を0にクリアする。ここで、(10)
は数値が10進数表現であることを表す。 (2)ステップ1 セレクタ255およびセレクタ256により指数加算器254に
被乗数レジスタ指数部251eと乗数レジスタ指数部252eか
ら被乗数と乗数の指数を入力して加算し、加算結果をラ
ッチ257に格納する。被乗数上位下位選択回路260は被乗
数レジスタ仮数部251fの上位27ビットを読出して出力し
(この中に被乗数の仮数部の有効ビットはすべて含まれ
る)、乗数上位下位選択回路261は乗数レジスタ仮数部2
52fの上位27ビットを読出して出力する(この中に乗数
の仮数部の有効ビットはすべて含まれる)。乗算器262
は被乗数上位下位選択回路260および乗数上位下位選択
回路261からの入力に基づいて乗算を実行し、和出力と
桁上げ出力をそれぞれラッチ263とラッチ264に格納す
る。同時に符号生成回路253において被乗数レジスタ符
号部251sと乗数レジスタ符号部252sから被乗数および乗
数の符号を読出して両者の排他的論理和をとり、積の符
号を生成して積レジスタ符号部724sに格納する。 (3)ステップ2 ラッチ257が保持している値は被乗数と乗数のバイアス
表現された指数同士の和であるため2重にバイアスがか
かっている。そのためバイアス補正値生成回路258から-
1023(実際には2の補数表現されている)を出力し、セ
レクタ255およびセレクタ256により指数加算器254にお
いてラッチ257の値とバイアス補正値生成回路258の出力
を加算して再びラッチ257に格納する。積生成加算器265
はラッチ263とラッチ264に保持された乗算器262の和出
力と桁上げ出力を加算してラッチ266に加算結果を格納
する。 (4)ステップ3 仮数加算器269はセレクタ268によりラッチ266に保持さ
れている値とラッチ273の値0を加算する。ステップ2
における積生成加算器265からの桁あふれがあるとき、
即ち仮数部の積が2以上のときは、シフタ271は正規化
のために仮数加算器269からの出力を1ビット最下位ビ
ット方向にシフト(このとき、最上位ビットに1を埋め
る)してラッチ273に結果を格納し、セレクタ255および
セレクタ256により指数加算器254はラッチ257の値と正
規化補正値生成回路259が出力する定数1を加算して再
びラッチ257に格納する。ステップ2における積生成加
算器265からの桁あふれがないとき、即ち仮数部の積が
1以上2未満のときは、シフタ271は正規化を行う必要
がないために仮数加算器269からの出力をシフトせずに
そのままラッチ273に格納し、セレクタ255およびセレク
タ256により指数加算器254はラッチ257の値をそのまま
出力して再びラッチ257に格納する。スティッキビット
生成回路272は仮数加算器269の出力の下位30ビットの論
理和をとり30ビット中に値1のビットが1つでもあれば
スティッキビット出力を1にし、30ビットの全ビットが
値0であればスティッキビット出力を0にする。 (5)ステップ4 丸め加算値生成回路267は丸めモード、ラッチ273に保持
されている値の丸めビットである最上位ビットから25ビ
ット目のビットの値、符号生成回路253が出力する積の
符号(丸めモードが正方向丸めモードと負方向丸めモー
ドのときに必要)およびスティッキビット生成回路272
が出力するスティッキビットの値によって丸め加算の要
否を判定して丸め加算が必要なときは図44に示す丸め加
算値Dを出力し、丸め加算が必要でないときは0を出力
する。仮数加算器269はセレクタ268により丸め加算値生
成回路267が出力する丸め加算値とラッチ273が保持して
いる値とを加算する。この時に仮数加算器269において
桁あふれが発生するとき、即ち丸めによる切上げにより
仮数値が2以上になったときは、シフタ271は再度正規
化のために仮数加算器269からの出力を1ビット最下位
ビット方向にシフト(このとき、最上位ビットに1を埋
める)し、セレクタ255およびセレクタ256により指数加
算器254はラッチ257の値と正規化補正値生成回路259が
出力する定数1を加算する。仮数加算器269において桁
あふれが発生しないとき、即ち仮数値が1以上2未満の
ときは、シフタ271は正規化を行う必要がないために仮
数加算器269からの出力をシフトせずにそのまま出力
し、セレクタ255およびセレクタ256により指数加算器25
4もラッチ257の値をそのまま出力する。いずれの場合
も、指数加算器254の出力を積レジスタ指数部274eに格
納し、シフタ271の出力の最下位ビットを除く53ビット
の下位29ビットを0にマスクして積レジスタ仮数部274f
に格納し、処理を終了する。First, the case where the multiplicand and the multiplier are single precision and the product is rounded with single precision will be described with reference to the operation flow chart of single precision multiplication shown in FIG. The figure shows the exponent adder 254 and multiplier 2
62 shows the contents of the operation of each processing step of the product generation adder 265, the mantissa adder 269, and the shifter 271. (1) Before the start of processing step The single precision multiplicand and the multiplicand are expanded to double precision and stored in the multiplicand register 251 and the multiplier register 252, respectively. At this time, the multiplicand register exponent part 251e and the multiplier register exponent part 25
Both 2e are converted into a double-precision bias expression (true exponent value = exponent part value-1023 (10) ), and the multiplicand register mantissa part 25
Zeros are filled in 1f and the lower 29 bits of the mantissa part 252f of the multiplier register. Clear the latch 273 to 0. Where (10)
Indicates that the number is in decimal notation. (2) Step 1 The selectors 255 and 256 input the exponents of the multiplicand and the multiplier from the multiplicand register exponent part 251e and the multiplier register exponent part 252e to the exponent adder 254, add them, and store the addition result in the latch 257. The multiplicand upper / lower selection circuit 260 reads and outputs the upper 27 bits of the multiplicand register mantissa part 251f (including all effective bits of the mantissa part of the multiplicand), and the multiplier upper / lower selection circuit 261 outputs the multiplier register mantissa part 2
The upper 27 bits of 52f are read out and output (this includes all the significant bits of the mantissa part of the multiplier). Multiplier 262
Performs multiplication based on inputs from the multiplicand upper / lower selection circuit 260 and the multiplier upper / lower selection circuit 261, and stores the sum output and the carry output in the latch 263 and the latch 264, respectively. At the same time, in the code generation circuit 253, the multiplicand register code unit 251s and the multiplier register code unit 252s read the multiplicand and multiplier codes, take the exclusive OR of both, generate the product code, and store it in the product register code unit 724s. . (3) Step 2 Since the value held by the latch 257 is the sum of the exponents expressing the multiplicand and the bias, the bias is doubly applied. Therefore, from the bias correction value generation circuit 258-
1023 (actually represented by 2's complement) is output, and the values of the latch 257 and the output of the bias correction value generation circuit 258 are added by the selector 255 and the selector 256 in the exponent adder 254 and stored in the latch 257 again. To do. Product generation adder 265
Stores the addition result in the latch 266 by adding the sum output and the carry output of the multiplier 262 held in the latch 263 and the latch 264. (4) Step 3 The mantissa adder 269 adds the value held in the latch 266 by the selector 268 and the value 0 in the latch 273. Step 2
When there is an overflow from the product generator adder 265 at
That is, when the product of the mantissas is 2 or more, the shifter 271 shifts the output from the mantissa adder 269 in the direction of the least significant bit by 1 bit (at this time, the most significant bit is filled with 1). The result is stored in the latch 273, the exponent adder 254 adds the value of the latch 257 and the constant 1 output from the normalized correction value generation circuit 259 by the selectors 255 and 256, and stores the result again in the latch 257. When there is no overflow from the product generation adder 265 in step 2, that is, when the product of the mantissa part is greater than or equal to 1 and less than 2, the shifter 271 does not need to perform normalization, and thus the output from the mantissa adder 269 is output. The value is stored in the latch 273 as it is without being shifted, and the exponent adder 254 outputs the value of the latch 257 as it is by the selector 255 and the selector 256 and stores it in the latch 257 again. The sticky bit generation circuit 272 takes the logical sum of the lower 30 bits of the output of the mantissa adder 269 and sets the sticky bit output to 1 if there is even one bit of the value 1 in 30 bits, and all 30 bits have the value 0. If so, the sticky bit output is set to 0. (5) Step 4 The rounding addition value generation circuit 267 is in the rounding mode, the value of the 25th bit from the most significant bit, which is the rounding bit of the value held in the latch 273, and the sign of the product output by the code generation circuit 253. (Required when the rounding mode is the positive direction rounding mode and the negative direction rounding mode) and the sticky bit generation circuit 272.
Determines whether or not the rounding addition is necessary based on the value of the sticky bit output by the above, and outputs the rounding addition value D shown in FIG. 44 when the rounding addition is required, and outputs 0 when the rounding addition is not required. The mantissa adder 269 adds the rounding addition value output from the rounding addition value generation circuit 267 and the value held in the latch 273 by the selector 268. At this time, if a digit overflow occurs in the mantissa adder 269, that is, when the mantissa value becomes 2 or more due to rounding up, the shifter 271 re-normalizes the output from the mantissa adder 269 by 1 bit. The value is shifted in the lower bit direction (at this time, the most significant bit is filled with 1), and the selector 255 and the selector 256 cause the exponent adder 254 to add the value of the latch 257 and the constant 1 output from the normalized correction value generation circuit 259. . When no overflow occurs in the mantissa adder 269, that is, when the mantissa value is 1 or more and less than 2, the shifter 271 does not need to perform normalization, and therefore the output from the mantissa adder 269 is output as it is without shifting. The selector 255 and selector 256
4 also outputs the value of latch 257 as it is. In either case, the output of the exponent adder 254 is stored in the product register exponent part 274e, the lower 29 bits of 53 bits excluding the least significant bit of the output of the shifter 271 are masked to 0, and the product register mantissa part 274f.
Then, the process ends.
【0011】次に被乗数および乗数が倍精度で積を倍精
度で丸める場合を図46に示す倍精度乗算の動作フロー図
を用いて説明する。同図も指数加算器254、乗算器262、
積生成加算器265、仮数加算器269、シフタ271の処理ス
テップ毎の動作の内容を示したものである。 (1)処理ステップ開始前 倍精度の被乗数および乗数をそれぞれ被乗数レジスタ25
1と乗数レジスタ252に格納する。このとき被乗数レジス
タ指数部251eと乗数レジスタ指数部252eはともに倍精度
のバイアス表現(真の指数値=指数部の値−1023(10))
になっている。ラッチ273を0にクリアする。 (2)ステップ1 セレクタ255およびセレクタ256により指数加算器254に
被乗数レジスタ指数部251eと乗数レジスタ指数部252eか
ら被乗数と乗数の指数を入力して加算し、加算結果をラ
ッチ257に格納する。被乗数上位下位選択回路260は被乗
数レジスタ仮数部251fの上位27ビット(最上位ビットは
0)を読出して出力し、乗数上位下位選択回路261は乗
数レジスタ仮数部252fの下位27ビット(最上位ビットは
0)を読出して出力する。乗算器262は被乗数上位下位
選択回路260および乗数上位下位選択回路261からの入力
に基づいて乗算を実行し、和出力と桁上げ出力をそれぞ
れラッチ263とラッチ264に格納する。同時に符号生成回
路253において被乗数レジスタ符号部251sと乗数レジス
タ符号部252sから被乗数および乗数の符号を読出して両
者の排他的論理和をとり、積の符号を生成して積レジス
タ符号部724sに格納する。 (3)ステップ2 ラッチ257が保持している値は被乗数と乗数のバイアス
表現された指数同士の和であるため2重にバイアスがか
かっている。そのためバイアス補正値生成回路258から-
1023(実際には2の補数表現されている)を出力し、セ
レクタ255およびセレクタ256により指数加算器254にお
いてラッチ257の値とバイアス補正値生成回路258の出力
を加算して再びラッチ257に格納する。積生成加算器265
はラッチ263とラッチ264に保持された乗算器262の和出
力と桁上げ出力を加算してラッチ266に加算結果を格納
する。ラッチ266に格納された値は最も下位の部分積で
ある。同時に、被乗数上位下位選択回路260は被乗数レ
ジスタ仮数部251fの下位27ビット(最上位ビットは0)
を読出して出力し、乗数上位下位選択回路261はは乗数
レジスタ仮数部252fの上位27ビットを読出して出力す
る。乗算器262は被乗数上位下位選択回路260および乗数
上位下位選択回路261からの入力に基づいて乗算を実行
し、和出力と桁上げ出力をそれぞれラッチ263とラッチ2
64に格納する。 (4)ステップ3 仮数加算器269はセレクタ268によりラッチ266に保持さ
れている値とラッチ273の値0を加算する。シフタ271は
仮数加算器269における加算結果の54ビットにステップ
2での積生成加算器265からの桁あふれとステップ3で
の仮数加算器269からの桁あふれとを論理和ゲート270で
論理和をとった1ビットを最上位ビット側に付加した55
ビットのデータを最下位ビット方向に26ビットシフトし
て結果をラッチ273に格納する。積生成加算器265はラッ
チ263とラッチ264に保持された乗算器262の和出力と桁
上げ出力を加算してラッチ266に加算結果を格納する。
ラッチ266に格納された値は第1の中位の部分積であ
る。同時に、被乗数上位下位選択回路260は被乗数レジ
スタ仮数部251fの上位27ビットを読出して出力し、乗数
上位下位選択回路261は乗数レジスタ仮数部252fの下位2
7ビット(最上位ビットは0)を読出して出力する。乗
算器262は被乗数上位下位選択回路260および乗数上位下
位選択回路261からの入力に基づいて乗算を実行し、和
出力と桁上げ出力をそれぞれラッチ263とラッチ264に格
納する。 (5)ステップ4 仮数加算器269はセレクタ268によりラッチ266に保持さ
れている値とラッチ273に保持されたシフタ271の出力と
を加算する。シフタ271は仮数加算器269における加算結
果の54ビットをシフトせずにそのまま出力してラッチ27
3に格納する。積生成加算器265はラッチ263とラッチ264
に保持された乗算器262の和出力と桁上げ出力を加算し
てラッチ266に加算結果を格納する。ラッチ266に格納さ
れた値は第2の中位の部分積である。同時に、被乗数上
位下位選択回路260は被乗数レジスタ仮数部251fの上位2
7ビットを読出して出力し、乗数上位下位選択回路261は
乗数レジスタ仮数部252fの上位27ビットを読出して出力
する。乗算器262は被乗数上位下位選択回路260および乗
数上位下位選択回路261からの入力に基づいて乗算を実
行し、和出力と桁上げ出力をそれぞれラッチ263とラッ
チ264に格納する。 (6)ステップ5 仮数加算器269はセレクタ268によりラッチ266に保持さ
れている値とラッチ273に保持されたシフタ271の出力と
を加算する。シフタ271は仮数加算器269における加算結
果の54ビットにステップ4での積生成加算器265からの
桁あふれとステップ5での仮数加算器269からの桁あふ
れとを論理和ゲート270で論理和をとった1ビットを最
上位ビット側に付加した55ビットのデータを最下位ビッ
ト方向に26ビットシフトして結果をラッチ273に格納す
る。積生成加算器265はラッチ263とラッチ264に保持さ
れた乗算器262の和出力と桁上げ出力を加算してラッチ2
66に加算結果を格納する。ラッチ266に格納された値は
最も上位の部分積である。 (7)ステップ6 仮数加算器269はセレクタ268によりラッチ266に保持さ
れている値とラッチ273に保持されたシフタ271の出力と
を加算する。ステップ5での積生成加算器265からの桁
あふれとステップ6での仮数加算器269からの桁あふれ
とを論理和ゲート270で論理和をとった値が1であると
き、即ち仮数部の積が2以上のときは、シフタ271は正
規化のために仮数加算器269からの出力を1ビット最下
位ビット方向にシフト(このとき、最上位ビットに1を
埋める)してラッチ273に結果を格納し、セレクタ255お
よびセレクタ256により指数加算器254はラッチ257の値
と正規化補正値生成回路259が出力する定数1を加算し
て再びラッチ257に格納する。論理和ゲート270で論理和
をとった値が0であるとき、即ち仮数部の積が1以上2
未満のときは、シフタ271は正規化を行う必要がないた
めに仮数加算器269からの出力をシフトせずにそのまま
ラッチ273に格納し、セレクタ255およびセレクタ256に
より指数加算器254はラッチ257の値をそのまま出力して
再びラッチ257に格納する。スティッキビット生成回路2
72はステップ3でのシフタ271における26ビットの最下
位ビットからのシフトあふれとステップ5でのシフタ27
1における26ビットの最下位ビットからのシフトあふれ
とを合わせた52ビットの論理和をとり52ビット中に値1
のビットが1つでもあればスティッキビット出力を1に
し、52ビットの全ビットが値0であればスティッキビッ
ト出力を0にする。 (8)ステップ7 丸め加算値生成回路267は丸めモード、ラッチ273に保持
されている値の丸めビットである最下位ビットの値、符
号生成回路253が出力する積の符号(丸めモードが正方
向丸めモードと負方向丸めモードのときに必要)および
スティッキビット生成回路272が出力するスティッキビ
ットの値によって丸め加算の要否を判定して丸め加算が
必要なときは図44に示す丸め加算値Eを出力し、丸め加
算が必要でないときは0を出力する。仮数加算器269は
セレクタ268により丸め加算値生成回路267が出力する丸
め加算値とラッチ273が保持している値とを加算する。
この時に仮数加算器269において桁あふれが発生すると
き、即ち丸めによる切上げにより仮数値が2以上になっ
たときは、シフタ271は再度正規化のために仮数加算器2
69からの出力を1ビット最下位ビット方向にシフト(こ
のとき、最上位ビットに1を埋める)し、セレクタ255
およびセレクタ256により指数加算器254はラッチ257の
値と正規化補正値生成回路259が出力する定数1を加算
する。仮数加算器269において桁あふれが発生しないと
き、即ち仮数値が1以上2未満のときは、シフタ271は
正規化を行う必要がないために仮数加算器269からの出
力をシフトせずにそのまま出力し、セレクタ255および
セレクタ256により指数加算器254もラッチ257の値をそ
のまま出力する。いずれの場合も、指数加算器254の出
力を積レジスタ指数部274eに格納し、シフタ271の出力
の最下位ビットを除く53ビットを積レジスタ仮数部274f
に格納して処理を終了する。Next, the case where the multiplicand and the multiplier are double precision and the product is rounded with double precision will be described with reference to the operation flow chart of double precision multiplication shown in FIG. Also in the figure, the exponent adder 254, the multiplier 262,
The operation contents of the product generation adder 265, the mantissa adder 269, and the shifter 271 are shown for each processing step. (1) Before the start of processing step Double precision multiplicand and multiplicand
Stored in 1 and multiplier register 252. At this time, both the multiplicand register exponent part 251e and the multiplier register exponent part 252e are double-precision bias expressions (true exponent value = exponent part value−1023 (10) )
It has become. Clear the latch 273 to 0. (2) Step 1 The selectors 255 and 256 input the exponents of the multiplicand and the multiplier from the multiplicand register exponent part 251e and the multiplier register exponent part 252e to the exponent adder 254, add them, and store the addition result in the latch 257. The multiplicand upper / lower selection circuit 260 reads and outputs the upper 27 bits (the most significant bit is 0) of the multiplicand register mantissa part 251f, and the multiplier upper / lower selection circuit 261 outputs the lower 27 bits (most significant bit is the highest bit of the multiplier register mantissa part 252f). 0) is read and output. The multiplier 262 executes multiplication based on the inputs from the multiplicand upper / lower selection circuit 260 and the multiplier upper / lower selection circuit 261, and stores the sum output and the carry output in the latch 263 and the latch 264, respectively. At the same time, in the code generation circuit 253, the multiplicand register code unit 251s and the multiplier register code unit 252s read the multiplicand and multiplier codes, take the exclusive OR of both, generate the product code, and store it in the product register code unit 724s. . (3) Step 2 Since the value held by the latch 257 is the sum of the exponents expressing the multiplicand and the bias, the bias is doubly applied. Therefore, from the bias correction value generation circuit 258-
1023 (actually represented by 2's complement) is output, and the values of the latch 257 and the output of the bias correction value generation circuit 258 are added by the selector 255 and the selector 256 in the exponent adder 254 and stored in the latch 257 again. To do. Product generation adder 265
Stores the addition result in the latch 266 by adding the sum output and the carry output of the multiplier 262 held in the latch 263 and the latch 264. The value stored in latch 266 is the lowest partial product. At the same time, the multiplicand upper / lower selection circuit 260 determines the lower 27 bits (the most significant bit is 0) of the multiplicand register mantissa 251f.
Is output and the multiplier upper / lower selection circuit 261 reads and outputs the upper 27 bits of the multiplier register mantissa part 252f. The multiplier 262 executes multiplication based on the inputs from the multiplicand upper / lower selection circuit 260 and the multiplier upper / lower selection circuit 261, and outputs the sum output and the carry output to the latch 263 and the latch 2 respectively.
Store in 64. (4) Step 3 The mantissa adder 269 adds the value held in the latch 266 by the selector 268 and the value 0 in the latch 273. The shifter 271 logically ORs the 54 bits of the addition result in the mantissa adder 269 with the overflow from the product generation adder 265 in step 2 and the overflow from the mantissa adder 269 in step 3 with the OR gate 270. 1 bit taken is added to the most significant bit side 55
The bit data is shifted by 26 bits in the direction of the least significant bit and the result is stored in the latch 273. The product generation adder 265 adds the sum output and the carry output of the multiplier 262 held in the latch 263 and the latch 264, and stores the addition result in the latch 266.
The value stored in latch 266 is the first medium partial product. At the same time, the multiplicand upper / lower selection circuit 260 reads and outputs the upper 27 bits of the multiplicand register mantissa part 251f, and the multiplier upper / lower selection circuit 261 outputs the lower 2 bits of the multiplier register mantissa part 252f.
Reads and outputs 7 bits (most significant bit is 0). The multiplier 262 executes multiplication based on the inputs from the multiplicand upper / lower selection circuit 260 and the multiplier upper / lower selection circuit 261, and stores the sum output and the carry output in the latch 263 and the latch 264, respectively. (5) Step 4 The mantissa adder 269 adds the value held in the latch 266 by the selector 268 and the output of the shifter 271 held in the latch 273. The shifter 271 outputs the 54 bits of the addition result in the mantissa adder 269 as it is without shifting and latches it.
Store in 3. The product generation adder 265 is a latch 263 and a latch 264.
The sum output of the multiplier 262 and the carry output held by are added, and the addition result is stored in the latch 266. The value stored in latch 266 is the second medium partial product. At the same time, the multiplicand upper / lower selection circuit 260 determines the upper 2 of the multiplicand register mantissa 251f.
The 7 bits are read and output, and the multiplier upper / lower selection circuit 261 reads and outputs the upper 27 bits of the multiplier register mantissa part 252f. The multiplier 262 executes multiplication based on the inputs from the multiplicand upper / lower selection circuit 260 and the multiplier upper / lower selection circuit 261, and stores the sum output and the carry output in the latch 263 and the latch 264, respectively. (6) Step 5 The mantissa adder 269 adds the value held in the latch 266 by the selector 268 and the output of the shifter 271 held in the latch 273. The shifter 271 ORs the 54 bits of the addition result in the mantissa adder 269 with the overflow from the product generation adder 265 in step 4 and the overflow from the mantissa adder 269 in step 5 with the OR gate 270. The 55-bit data obtained by adding the taken 1 bit to the most significant bit side is shifted by 26 bits in the least significant bit direction, and the result is stored in the latch 273. The product generation adder 265 adds the sum output and carry output of the multiplier 262 held in the latch 263 and the latch 264 to add the carry output to the latch 2
The addition result is stored in 66. The value stored in latch 266 is the highest partial product. (7) Step 6 The mantissa adder 269 adds the value held in the latch 266 by the selector 268 and the output of the shifter 271 held in the latch 273. When the value obtained by logically summing the overflow from the product generation adder 265 in step 5 and the overflow from the mantissa adder 269 in step 6 by the OR gate 270 is 1, that is, the product of the mantissa part. Is greater than or equal to 2, the shifter 271 shifts the output from the mantissa adder 269 toward the least significant bit by 1 bit (fills the most significant bit with 1) for normalization and outputs the result to the latch 273. After storing, the exponent adder 254 adds the value of the latch 257 and the constant 1 output from the normalized correction value generation circuit 259 by the selector 255 and the selector 256, and stores again in the latch 257. When the value obtained by ORing with the OR gate 270 is 0, that is, the product of the mantissa is 1 or more 2
When it is less than, since the shifter 271 does not need to perform normalization, the output from the mantissa adder 269 is directly stored in the latch 273 without being shifted, and the exponent adder 254 causes the selector 255 and the selector 256 to store the output in the latch 257. The value is output as it is and stored in the latch 257 again. Sticky bit generation circuit 2
72 is shift overflow from the least significant bit of 26 bits in shifter 271 in step 3 and shifter 27 in step 5
A value of 1 in 52 bits is calculated by ORing 52 bits including the shift overflow from the 26 least significant bits in 1
If there is even one bit of the sticky bit output, the sticky bit output is set to 1, and if all the 52 bits have the value 0, the sticky bit output is set to 0. (8) Step 7 The rounding addition value generation circuit 267 is in the rounding mode, the value of the least significant bit which is the rounding bit of the value held in the latch 273, the sign of the product output by the code generation circuit 253 (the rounding mode is the forward direction). (Necessary in the rounding mode and the negative direction rounding mode) and the value of the sticky bit output from the sticky bit generation circuit 272 determines whether the rounding addition is necessary, and when the rounding addition is necessary, the rounding addition value E shown in FIG. Is output, and 0 is output when rounding addition is not necessary. The mantissa adder 269 adds the rounding addition value output from the rounding addition value generation circuit 267 and the value held in the latch 273 by the selector 268.
At this time, when a digit overflow occurs in the mantissa adder 269, that is, when the mantissa value becomes 2 or more due to rounding up, the shifter 271 again uses the mantissa adder 2 for normalization.
The output from 69 is shifted by 1 bit toward the least significant bit (at this time, the most significant bit is filled with 1), and the selector 255
The selector 256 causes the exponent adder 254 to add the value of the latch 257 and the constant 1 output from the normalized correction value generation circuit 259. When the mantissa adder 269 does not overflow, that is, when the mantissa value is 1 or more and less than 2, the shifter 271 does not need to perform normalization, and therefore the output from the mantissa adder 269 is output as it is without shifting. Then, the exponent adder 254 also outputs the value of the latch 257 as it is by the selector 255 and the selector 256. In either case, the output of the exponent adder 254 is stored in the product register exponent 274e, and 53 bits excluding the least significant bit of the output of the shifter 271 are used as the product register mantissa 274f.
And the process ends.
【0012】また従来の浮動小数点データの除算方式お
よび除算装置においては、商の指数部を求めるためにま
ず被乗数の指数部の値から除数の指数部の値を減算す
る。この減算値はともにバイアス表現された指数同士の
差であるためにバイアスが相殺されている。そのためバ
イアス値をこの減算値に加算して正しくバイアス表現さ
れた商の指数部を生成する。Further, in the conventional floating point data division method and division apparatus, in order to obtain the exponent part of the quotient, the exponent part of the multiplicand is first subtracted from the exponent part of the divisor. Since the subtracted values are both the difference between the exponents expressed in the bias, the bias is canceled. Therefore, the bias value is added to this subtraction value to generate the exponent part of the quotient that is correctly expressed in the bias.
【0013】[0013]
【発明が解決しようとする課題】しかしながら、従来の
浮動小数点データの加減算装置では、丸め加算値を加算
する最下位ビット(L)の位置が加算器154における入出力
に対して固定されておらずバレルシフタ157での正規化
シフト後に初めて定まるため、常に加減算、正規化、丸
めという処理の流れとなる。そのため、2つの仮数の加
減算と丸め加算値の加算とをそれぞれ独立に行なう必要
があり、図23(a)に示すように桁合わせを含めて少なく
とも4ステップの処理ステップ数を要し、また前者の加
減算を加算器154で後者の加算を加算器160で行うため、
加算器が2つ必要になり、ハードウェアが増大するとい
う問題点を有している。However, in the conventional floating point data adder / subtractor, the position of the least significant bit (L) to which the rounded addition value is added is not fixed with respect to the input / output of the adder 154. Since it is first determined after the normalization shift in the barrel shifter 157, the processing flow is always addition, subtraction, normalization, and rounding. Therefore, it is necessary to perform addition and subtraction of the two mantissas and addition of the rounded addition value independently of each other, which requires at least four processing steps including digit alignment as shown in FIG. 23 (a). Since the addition and subtraction of is performed by the adder 154 and the latter addition is performed by the adder 160,
There is a problem that two adders are required and the hardware is increased.
【0014】本発明はかかる点に鑑み、仮数の加減算と
丸め加算値の加算とを同一加算器で同時に行うことがで
き、その結果、指定した丸めモードと丸め精度で丸めを
行なった浮動小数点データの和および差の仮数部を得る
のに必要な処理ステップ数が小さくてかつ従来の浮動小
数点データの加減算装置に比べてハードウェアが少ない
浮動小数点データの加減算方法および加減算装置を提供
することを目的とする。In view of the above point, the present invention makes it possible to simultaneously add and subtract mantissas and add rounded addition values in the same adder, and as a result, floating-point data rounded in a specified rounding mode and rounding precision. It is an object of the present invention to provide an addition / subtraction method and an addition / subtraction device for floating-point data, which requires a small number of processing steps to obtain the mantissa part of the sum and difference of And
【0015】また従来の浮動小数点データの乗算装置で
は、乗算器262からの和と桁上げの加算と部分積を累算
するための加算と丸め加算値の加算とそれぞれ独立に行
っているため、単精度乗算の場合で4ステップ、倍精度
乗算の場合で7ステップもの処理ステップ数を要し、ま
た前一者の加算を積生成加算器265で後二者の加算を仮
数加算器269で行なうため、加算器が2つ必要になり、
ハードウェアが増大するという問題点を有している。Further, in the conventional floating point data multiplication device, since addition of sum and carry from multiplier 262, addition for accumulating partial products, and addition of rounded addition value are performed independently of each other, In the case of single-precision multiplication, 4 steps are required, and in the case of double-precision multiplication, as many as 7 steps are required, and the former one addition is performed by the product generation adder 265 and the latter two addition is performed by the mantissa adder 269. Therefore, you need two adders,
It has a problem that the hardware increases.
【0016】本発明はかかる点に鑑み、仮数部における
丸め加算値の加算または部分積を累算するための加算と
乗算器からの和と桁上げの加算とを同一加算器で同時に
行うことができ、その結果、各丸めモードに対応した丸
めを指定した丸め精度で施した積を得るのに必要な処理
ステップ数が小さくてかつ従来の浮動小数点データの乗
算装置に比べてハードウェアが少ない浮動小数点データ
の乗算方法および乗算装置を提供することを目的とす
る。[0016] The present invention is seen paragon of the above points, to perform simultaneously the addition of the sum and carry from adder and a multiplier for accumulating sum or partial product sum value rounding the mantissa of the same adder As a result, the number of processing steps required to obtain the product of rounding corresponding to each rounding mode with the specified rounding precision is small, and the hardware is less than the conventional floating-point data multiplication device. An object of the present invention is to provide a multiplication method and a multiplication device for floating point data.
【0017】また従来の浮動小数点データの除算装置で
は、最初に被除数の指数部と除数の指数部とを単純に減
算するため減算値はバイアスが相殺されてしまい、後に
バイアスを補正するステップが必要になり、バイアス補
正のためのハードウェアが増大するという問題点を有し
ている。Further, in the conventional floating point data division device, the exponent part of the dividend and the exponent part of the divisor are first simply subtracted, so that the bias of the subtracted value is offset, and a step of correcting the bias is required later. Therefore, there is a problem that the hardware for bias correction increases.
【0018】本発明はかかる点に鑑み、指数部のバイア
スを補正するステップを必要とせず、従来の浮動小数点
データの除算装置に比べてハードウェアが少ない浮動小
数点データの除算方法および除算装置を提供することを
目的とする。In view of such a point, the present invention provides a method and a device for dividing floating-point data, which does not require the step of correcting the bias of the exponent and has less hardware than the conventional device for dividing floating-point data. The purpose is to do.
【0019】[0019]
【課題を解決するための手段】第1の発明は、浮動小数
点データの演算が同符号の加算もしくは異符号の減算で
ある真の仮数加算の時は同一指数に桁合せを行なった第
1と第2の仮数の加算と前記加算結果と丸め精度および
丸めモードおよび演算結果の符号によって一意に定まる
丸め加算値との加算とを同時に行ない、浮動小数点デー
タの演算が同符号の減算もしくは異符号の加算である真
の仮数減算の時は同一指数に桁合せを行なった第1と第
2の仮数の減算と前記減算結果と丸め精度および丸めモ
ードおよび演算結果の符号によって一意に定まる丸め加
算値との加算とを同時に行ない、前記第1と第2の仮数
および丸め加算値の加減算ののち演算結果が非正規化数
の時は前記演算結果を1ビットシフトして正規化し、前
記正規化ののち正規化された演算結果の中から真の仮数
加算か真の仮数減算のいずれであるかを示す演算の種類
と丸め精度によって定まる最下位ビットを含む複数のビ
ットを検査して前記正規化された演算結果のうち丸め精
度によって定まる前記最下位ビットまでが所定の精度に
丸めた第1の仮数と第2の仮数の真の仮数加算もしくは
真の仮数減算に対して一致するか、検査したビットより
上位への桁上げが一致して検査したビットだけが一致し
ないか、検査したビットより上位への桁上げも検査した
ビットより上位のビットも一致しないかを判断し、前記
判断結果に基づいて処理を終了するか、前記正規化され
た演算結果に対して検査したビットの一部あるいは全部
を補正して処理を終了するか、前記正規化された演算結
果に対して再び前記丸め加算値を加算して処理を終了す
るかのいずれかを行なう浮動小数点データの加減算方法
である。According to a first aspect of the present invention, when the operation of floating-point data is addition of the same sign or subtraction of different signs, the true mantissa addition is performed, the digits are aligned with the same exponent. The addition of the second mantissa and the addition result and a rounding addition value uniquely determined by the rounding precision, the rounding mode, and the sign of the operation result are performed at the same time, and the floating-point data operation is performed by subtraction with the same sign or with different sign. In the case of true mantissa subtraction, which is addition, subtraction of the first and second mantissas with which the same exponent is aligned, and the rounding addition value uniquely determined by the subtraction result, the rounding precision, the rounding mode, and the sign of the operation result. And the second mantissa and the rounded addition value are added and subtracted, and when the operation result is a denormalized number, the operation result is shifted by 1 bit for normalization, and then the normalization is performed. Positive The normalized operation by inspecting a plurality of bits including the least significant bit determined by the type of operation and the rounding precision, which indicates whether it is true mantissa addition or true mantissa subtraction from the converted operation result Among the results, whether the values up to the least significant bit determined by the rounding precision match the true mantissa addition or the true mantissa subtraction of the first mantissa and the second mantissa rounded to a predetermined precision, or higher than the checked bit To the inspected bit and the inspected bit does not match, or the carry to the higher order than the inspected bit does not match to the higher order bit than the inspected bit. The processing is ended by correcting part or all of the bits inspected with respect to the normalized operation result, or the processing is ended, or the rounded addition value is added again to the normalized operation result. A subtraction process of floating-point data to perform either the processing ends.
【0020】[0020]
【0021】第2の発明は、浮動小数点データの演算が
同符号の加算もしくは異符号の減算である真の仮数加算
か同符号の減算もしくは異符号の加算である真の仮数減
算のいずれであるかを示す演算の種類と丸め精度と丸め
モードと演算結果の符号によって一意に定まる丸め加算
値を生成する丸め加算値生成手段と、真の仮数加算時は
同一指数に桁合せを行なった第1と第2の仮数の加算と
前記加算結果と前記丸め加算値生成手段が生成する丸め
加算値との加算とを同時に行ない真の仮数減算時は同一
指数に桁合せを行なった第1と第2の仮数の減算と前記
減算結果と前記丸め加算値生成手段が生成する丸め加算
値との加算とを同時に行なう仮数加減算実行手段と、前
記仮数加減算実行手段による演算結果が非正規化数の時
は前記演算結果をシフトして正規化する正規化手段と、
前記正規化手段の出力の中から丸め精度によって定まる
最下位ビットを含む複数のビットを検査して前記正規化
手段の出力のうち丸め精度によって定まる前記最下位ビ
ットまでが所定の精度に丸めた第1の仮数と第2の仮数
の真の仮数加算もしくは真の仮数減算に対して一致する
か、検査したビットより上位への桁上げが一致して検査
したビットだけが一致しないか、検査したビットより上
位への桁上げも検査したビットより上位のビットも一致
しないかを判断する演算結果検査手段と、前記正規化手
段の出力に対して前記演算結果検査手段が検査したビッ
トの一部あるいは全部を補正する丸め補正手段とを備え
た浮動小数点データの加減算装置である。According to a second aspect of the present invention, the operation of floating-point data is either true mantissa addition, which is addition with the same sign or subtraction with different signs, or subtraction with the same sign, or true mantissa subtraction, which is addition with different signs. Rounding addition value generation means for generating a rounding addition value that is uniquely determined by the type of operation indicating whether or not, rounding precision, rounding mode, and sign of the operation result, and digit alignment for the same exponent during true mantissa addition. And the second mantissa and the addition result and the rounding addition value generated by the rounding addition value generation means are performed at the same time, and when the true mantissa is subtracted, digits are aligned to the same exponent. Mantissa addition / subtraction executing means for simultaneously performing the subtraction of the mantissa and the addition of the subtraction result and the rounding addition value generated by the rounding addition value generation means, and when the operation result by the mantissa addition / subtraction execution means is a denormalized number, The calculation result And normalizing means for normalizing and shifted,
A plurality of bits including the least significant bit determined by the rounding precision are inspected from the output of the normalizing means, and the least significant bit determined by the rounding precision of the output of the normalizing means is rounded to a predetermined precision. Whether the mantissa of 1 matches the true mantissa addition or subtraction of the second mantissa, whether the carry to the higher order than the inspected bit matches, and only the inspected bit does not match, the inspected bit Operation result inspection means for determining whether the carry to the higher order or the higher bits than the inspected bit do not match, and a part or all of the bits inspected by the operation result inspection means with respect to the output of the normalizing means. Is a floating-point data addition / subtraction device including rounding correction means for correcting
【0022】[0022]
【0023】[0023]
【0024】第3の発明は、浮動小数点形式の被乗数お
よび乗数のそれぞれの仮数部を乗算して積を和(サム)
と桁上げ(キャリ)に分けて求め、前記乗算ののち前記
和と前記桁上げと丸め精度および丸めモードおよび前記
被乗数および前記乗数の符号によって一意に定まる丸め
加算値とを加算する演算を行い、前記演算ののち演算結
果が非正規化数の時は前記演算結果を1ビットシフトし
て正規化し、前記正規化ののち正規化された演算結果の
中から丸め精度によって定まる最下位ビットを含む複数
のビットを検査して前記正規化された演算結果のうち丸
め精度によって定まる前記最下位ビットまでが所定の精
度に丸めた前記被乗数の仮数と前記乗数の仮数の積に対
して一致するか、検査したビットより上位への桁上げが
一致して検査したビットだけが一致しないか、検査した
ビットより上位への桁上げも検査したビットより上位の
ビットも一致しないかを判断し、前記判断結果に基づい
て処理を終了するか、前記正規化された演算結果に対し
て検査したビットの一部あるいは全部を補正して処理を
終了するか、前記正規化された演算結果に対して再び前
記丸め加算値を加算して処理を終了するかのいずれかを
行なう浮動小数点データの乗算方法である。A third aspect of the invention is to multiply the mantissas of the multiplicand and the multiplier in floating-point format and sum the products (sum).
And carry (carry) separately, and after the multiplication, the sum and the carry, rounding precision and rounding mode and the rounded addition value that is uniquely determined by the sign of the multiplicand and the multiplier are added, After the operation, when the operation result is a non-normalized number, the operation result is shifted by 1 bit for normalization, and a plurality of least significant bits are determined from the normalized operation result after the normalization and determined by rounding precision. Of the bits of the normalized operation result up to the least significant bit determined by the rounding precision, and whether the product of the mantissa of the multiplicand and the mantissa of the multiplier rounded to a predetermined precision matches. Carry higher than the checked bit and only the checked bit does not match, or carry higher than the checked bit and higher bits than the checked bit do not match. Whether or not the processing is terminated based on the result of the determination, the processing is terminated by correcting some or all of the bits inspected for the normalized operation result, or the processing is terminated. This is a method of multiplying floating-point data, in which the rounded addition value is added again to the operation result and the processing is ended.
【0025】[0025]
【0026】第4の発明は、2つの入力のビット幅がと
もに浮動小数点形式の被乗数および乗数の仮数部の長さ
に等しいかもしくは仮数部の長さよりも長くその入力に
対して少なくとも入力の2倍のビット幅の和(サム)と
桁上げ(キャリ)とを出力する仮数乗算手段と、丸め精
度と丸めモードと2つの浮動小数点データの符号とによ
って一意に定まる丸め加算値を生成する丸め加算値生成
手段と、前記仮数乗算手段の和出力と桁上げ出力および
前記丸め加算値生成手段からの丸め加算値の三者の加算
を同時に行う仮数加算手段と、前記仮数加算手段による
演算結果が非正規化数の時は前記演算結果をシフトして
正規化する正規化手段と、前記正規化手段の出力の中か
ら丸め精度によって定まる最下位ビットを含む複数のビ
ットを検査して前記正規化手段の出力のうち丸め精度に
よって定まる前記最下位ビットまでが所定の精度に丸め
た前記被乗数の仮数と前記乗数の仮数の積に対して一致
するか、検査したビットより上位への桁上りが一致して
検査したビットだけが一致しないか、検査したビットよ
り上位への桁上りも検査したビットより上位のビットも
一致しないかを判断する演算結果検査手段と、前記正規
化手段の出力に対して前記演算結果検査手段が検査した
ビットの一部あるいは全部を補正する丸め補正手段とを
備えた浮動小数点データの乗算装置である。According to a fourth aspect of the invention, the bit widths of the two inputs are both equal to or longer than the length of the mantissa part of the multiplicand and the multiplier in floating-point format, and are longer than the length of the mantissa part. Mantissa multiplication means that outputs the sum (sum) and carry (carry) of double bit width, and rounding addition that generates a rounding addition value that is uniquely determined by the rounding precision, the rounding mode, and the sign of two floating point data. The value generation means, the mantissa addition means for simultaneously performing the sum output and carry output of the mantissa multiplication means, and the three additions of the rounded addition values from the rounded addition value generation means, and the calculation result by the mantissa addition means In the case of a normalized number, a normalizing means for shifting and normalizing the operation result, and a plurality of bits including the least significant bit determined by the rounding precision from the output of the normalizing means are inspected. Of the output of the normalizing means, up to the least significant bit determined by the rounding precision is equal to the product of the mantissa of the multiplicand and the mantissa of the multiplier rounded to a predetermined precision, or a carry is carried out higher than the inspected bit. Are matched and only the inspected bits do not match, or the operation result inspecting means for determining whether the carry to the upper bits of the inspected bits or the upper bits of the inspected bits do not match, and the output of the normalizing means. On the other hand, the floating-point data multiplication device is provided with rounding correction means for correcting a part or all of the bits inspected by the operation result inspection means.
【0027】第5の発明は、浮動小数点形式の被乗数の
仮数部を保持する被乗数保持手段と、浮動小数点形式の
乗数の仮数部を保持する乗数保持手段と、2つの入力の
うち少なくとも一方の入力のビット幅が前記被乗数およ
び前記乗数の仮数部の長さより短かくその入力に対して
少なくとも入力の2倍のビット幅の和(サム)と桁上げ
(キャリ)とを出力する仮数乗算手段と、前記仮数乗算
手段の被乗数入力のビット幅が前記被乗数の仮数部の長
さよりも短かい場合は前記被乗数保持手段に保持された
被乗数の仮数部の最上位ビットから最下位ビットまでを
複数の前記仮数乗算手段の被乗数入力のビット幅の部分
仮数部に分割しその中から処理ステップ毎に1つを選択
して出力する部分被乗数選択手段と、前記仮数乗算手段
の乗数入力のビット幅が前記乗数の仮数部の長さよりも
短かい場合は前記乗数保持手段に保持された乗数の仮数
部の最上位ビットから最下位ビットまでを複数の前記仮
数乗算手段の乗数入力のビット幅の部分仮数部に分割し
その中から処理ステップ毎に1つを選択して出力する部
分乗数選択手段と、丸め精度と丸めモードと2つの浮動
小数点データの符号とによって一意に定まる丸め加算値
を生成する丸め加算値生成手段と、処理の最初のステッ
プは前記仮数乗算手段の和出力と桁上げ出力および前記
丸め加算値生成手段からの丸め加算値の三者の加算を同
時に行い最初の部分積を生成し、以降のステップは前記
仮数乗算手段の和出力と桁上げ出力および直前のステッ
プで生成されたシフトされた部分積の三者の加算を同時
に行い新たな部分積を生成する仮数加算手段と、処理の
最初または中間ステップは前記仮数加算手段から得られ
る部分積を当該ステップで前記仮数乗算手段において乗
算された乗数および被乗数の部分仮数部の位置で定まる
ビット数だけ最下位ビット方向にシフトし、最終のステ
ップでは前記仮数加算手段から得られる演算結果が非正
規化数の時は前記演算結果をシフトして正規化するシフ
ト手段と、処理の最初または中間ステップに前記シフト
手段の出力を次ステップの前記仮数加算手段における入
力として保持する部分積保持手段と、処理の最初または
中間ステップにおける前記シフト手段でのシフトあふれ
の各ビットと処理の最終ステップにおける前記シフト手
段の出力の中の丸め精度によって定まる最下位ビットを
含む複数のビットとを検査して処理の最終ステップにお
ける前記シフト手段の出力のうち丸め精度によって定ま
る前記最下位ビットまでが所定の精度に丸めた前記被乗
数の仮数と前記乗数の仮数の積に対して一致するか、検
査したビットより上位への桁上りが一致して検査したビ
ットだけが一致しないか、検査したビットより上位への
桁上りも検査したビットより上位のビットも一致しない
かを判断する演算結果検査手段と、前記シフト手段の出
力に対して前記演算結果検査手段が検査したビットの一
部あるいは全部を補正する丸め補正手段とを備えた浮動
小数点データの乗算装置である。According to a fifth aspect of the present invention, a multiplicand holding means for holding a mantissa part of a multiplicand in a floating point format, a multiplier holding means for holding a mantissa part of a multiplier in a floating point format, and at least one of two inputs A mantissa multiplication means for outputting a sum (sum) and a carry (carry) of at least twice the bit width of the input, the bit width of which is shorter than the length of the mantissa part of the multiplicand and the multiplier, and When the bit width of the multiplicand input of the mantissa multiplication means is shorter than the length of the mantissa part of the multiplicand, a plurality of mantissas from the most significant bit to the least significant bit of the mantissa part of the multiplicand held in the multiplicand holding means are provided. A partial multiplicand selecting unit that divides into a partial mantissa part having a bit width of the multiplicand input of the multiplying unit and selects and outputs one for each processing step, and a bit of the multiplier input of the mantissa multiplying unit. When the width is shorter than the length of the mantissa part of the multiplier, from the most significant bit to the least significant bit of the mantissa part of the multiplier held in the multiplier holding means, the bit width of the multiplier input of the plurality of mantissa multiplying means is determined. A partial addition part that is divided into partial mantissas, one of which is selected and output for each processing step, and a rounding addition value that is uniquely determined by the rounding precision, the rounding mode, and the sign of the two floating-point data are generated. And a rounding addition value generating means for performing the first step of the processing by simultaneously performing the sum output and the carry output of the mantissa multiplication means and the addition of the three rounding addition values from the rounding addition value generating means at the same time. And a mantissa for generating a new partial product by simultaneously performing the sum output and carry output of the mantissa multiplication means and the addition of the three of the shifted partial products generated in the immediately preceding step. The arithmetic means and the first or intermediate step of the process are the least significant bit direction by the number of bits determined by the position of the partial mantissa part of the multiplier and the multiplicand multiplied by the partial product obtained from the mantissa adding means in the step. Shift to the final step, and when the operation result obtained from the mantissa adding means is a denormalized number, shift means for shifting and normalizing the operation result, and the shift means for the first or intermediate step of the process. Of the partial product holding means for holding the output as an input to the mantissa adding means in the next step, each bit of the shift overflow in the shift means in the first or intermediate step of the processing and the output of the shift means in the final step of the processing Multiple bits, including the least significant bit determined by the rounding precision of In the output of the shift means, up to the least significant bit determined by the rounding precision match the product of the mantissa of the multiplicand and the mantissa of the multiplier rounded to a predetermined precision, or a digit higher than the inspected bit The operation result inspecting means for deciding whether or not only the inspected bits are not coincident with each other and the carry up to the inspected bit is not coincident with the inspected bit, and the output of the shift means is provided. On the other hand, it is a floating point data multiplication device comprising rounding correction means for correcting a part or all of the bits inspected by the operation result inspection means.
【0028】第6の発明は、偏位した指数部を持つ浮動
小数点形式の被除数の指数部から同一浮動小数点形式の
除数の指数部を減じた値に1だけ小さい値を求める演算
を行い、前記演算を行ったのち前記演算結果の最上位ビ
ットを反転する浮動小数点データの除算方法である。According to a sixth aspect of the present invention, a calculation is performed to obtain a value smaller by 1 from the exponent part of the dividend in the floating-point format having the deviated exponent part minus the exponent part of the divisor in the same floating-point format. This is a method of dividing floating-point data in which the most significant bit of the operation result is inverted after performing the operation.
【0029】第7の発明は、偏位した指数部を持つ浮動
小数点形式の被除数の指数部から同一浮動小数点形式の
除数の指数部を減じた値に1だけ小さい値を求める指数
減算手段と、前記指数減算手段の出力の最上位ビットの
反転を行う最上位ビット補正手段とを備えた浮動小数点
データの除算装置である。A seventh invention is an exponent subtraction means for obtaining a value smaller by 1 from a value obtained by subtracting the exponent part of a divisor in the same floating-point format from the exponent part of a dividend in a floating-point format having a deviated exponent part, A floating point data division device comprising a most significant bit correcting means for inverting the most significant bit of the output of the exponent subtracting means.
【0030】[0030]
【作用】第1の発明は前記した手順により、第1と第2
の仮数の加減算と丸め加算値の加算とを同時に実行して
正規化を行い、そのまま処理を終了するかまたは結果を
補正して処理を終了するか、もしくは丸め加算値の加算
をさらに行うだけで処理を終了することができ、和また
は差を得るのに必要な処理ステップ数が少なくて済む。 According to the first aspect of the invention, the first and second steps are performed by the above-mentioned procedure.
Simply add and subtract the mantissa of and the addition of the rounded addition value to perform normalization, and either end the process as it is or correct the result and end the process, or simply add the rounded addition value. The processing can be terminated, requiring fewer processing steps to obtain the sum or difference .
【0031】第2の発明は前記した構成により、2つの
浮動小数点データの仮数と丸め加算値生成手段からの丸
め加算値の三者の和もしくは前二者の差と後者との和を
仮数加減算実行手段で求めその結果を正規化手段におい
て正規化したのち、演算結果検査手段の判断により、正
規化手段の出力が所定の精度に丸めた和または差の仮数
に対して一致する場合はそのまま処理を終了でき、検査
したビットより上位への桁上げが一致して検査したビッ
トだけが一致しない場合は丸め補正手段により正規化手
段の出力の一部あるいは全部を補正して処理を終了で
き、検査したビットより上位への桁上げも検査したビッ
トより上位のビットも一致しない場合は正規化手段の出
力に対して丸め加算値生成手段および仮数加減算実行手
段により再び丸め加算値を加算するだけで処理を終了す
ることができる。そのため、和または差を得るのに必要
な処理ステップ数が少なくて済み、また仮数部に関して
単一の加算器で2つの仮数の加減算と丸めの加算とを実
行しているため、必要なハードウェアが削減できる。According to the second aspect of the present invention, with the above configuration, the mantissa of two floating point data and the sum of the three of the rounded addition values from the rounded addition value generating means or the difference of the former two and the sum of the latter are added and subtracted by the mantissa. After the result obtained by the executing means is normalized by the normalizing means, if the output of the normalizing means matches the mantissa of the sum or difference rounded to a predetermined precision by the judgment of the calculation result checking means, it is processed as it is. If the carry to the higher order than the inspected bit matches and only the inspected bit does not match, the rounding correction means can correct part or all of the output of the normalization means and end the processing. If the carry to the upper side of the bit and the upper bit to the checked bit do not match, the rounding addition value generation means and the mantissa addition / subtraction executing means again round the rounding addition to the output of the normalizing means. It can be terminated only by process adding the value. Therefore, the number of processing steps required to obtain the sum or difference is small, and the addition and subtraction of two mantissas and the addition of rounding are performed by a single adder with respect to the mantissa part. Can be reduced.
【0032】[0032]
【0033】[0033]
【0034】第3の発明は前記した手順により、被乗数
および乗数の仮数部の積の和と桁上げと丸め加算値とを
同時に加算して正規化を行い、そのまま処理を終了する
かまたは結果を補正して処理を終了するか、もしくは丸
め加算値の加算をさらに行うだけで処理を終了すること
ができ、積を得るのに必要な処理ステップ数が少なくて
済む。According to the third aspect of the present invention, the sum of the products of the multiplicand and the mantissa part of the multiplier, the carry and the rounding addition value are added at the same time for normalization by the above-mentioned procedure, and the processing is terminated as it is or the result is returned. The processing can be ended by correcting and ending the processing, or by simply adding the rounding addition value, and the number of processing steps required to obtain the product can be reduced.
【0035】[0035]
【0036】第4の発明は前記した構成により、浮動小
数点形式の被乗数および乗数のそれぞれの仮数部を仮数
乗算手段に入力して得られる和出力および桁上げ出力と
丸め加算値生成手段からの丸め加算値の三者の和を仮数
加算手段で求めその結果を正規化手段において正規化し
たのち、演算結果検査手段の判断により、正規化手段の
出力が所定の精度に丸めた積の仮数に対して一致する場
合はそのまま処理を終了でき、検査したビットより上位
への桁上げが一致して検査したビットだけが一致しない
場合は丸め補正手段により正規化手段の出力の一部ある
いは全部を補正して処理を終了でき、検査したビットよ
り上位への桁上げも検査したビットより上位のビットも
一致しない場合は正規化手段の出力に対して丸め加算値
生成手段および仮数加算手段により再び丸め加算値を加
算するだけで処理を終了することができる。そのため、
積を得るのに必要な処理ステップ数が少なくて済み、ま
た仮数部に関して単一の加算器で和と桁上げの加算と丸
めの加算とを実行しているため、必要なハードウェアが
削減できる。According to the fourth aspect of the present invention, with the above-mentioned configuration, the sum output and carry output obtained by inputting the mantissa parts of the multiplicand and the multiplier in the floating point format into the mantissa multiplication means and the rounding from the rounded addition value generation means The sum of the three added values is calculated by the mantissa adding means, and the result is normalized by the normalizing means. If they match, the processing can be terminated as it is, and if the carry to the higher order than the inspected bit matches and only the inspected bit does not match, the rounding correction means corrects part or all of the output of the normalization means. If the carry to the upper bit of the inspected bit and the bit of the upper bit to the inspected bit do not match, the rounding addition value generating means and the provisional Can be terminated only by process adds the addition value rounding again by adding means. for that reason,
The number of processing steps required to obtain the product is small, and since the addition, carry addition, and rounding addition are performed by a single adder for the mantissa, the required hardware can be reduced. .
【0037】第5の発明は前記した構成により、部分被
乗数選択手段と部分乗数選択手段において被乗数および
乗数の仮数部の部分を下位から順にかつすべての組合せ
を選択して仮数乗算手段に入力して、順次得られる和出
力および桁上げ出力と丸め加算値生成手段からの丸め加
算値または部分積保持手段に保持されている値の三者の
和を仮数加算手段で求めその結果をシフト手段において
シフトし再び部分積保持手段に格納するかもしくはシフ
ト手段で最終の演算結果を正規化したのち、演算結果検
査手段の判断により、シフト手段の出力が所定の精度に
丸めた積の仮数に対して一致する場合はそのまま処理を
終了でき、検査したビットより上位への桁上げが一致し
て検査したビットだけが一致しない場合は丸め補正手段
によりシフト手段の出力の一部あるいは全部を補正して
処理を終了でき、検査したビットより上位への桁上げも
検査したビットより上位のビットも一致しない場合はシ
フト手段の出力に対して丸め加算値生成手段および仮数
加算手段により丸め加算値を加算するだけで処理を終了
することができる。そのため、積を得るのに必要な処理
ステップ数が少なくて済み、また仮数部に関して単一の
加算器で和と桁上げの加算と丸めの加算または部分積を
累算するための加算とを実行しているため、必要なハー
ドウェアが削減できる。According to the fifth aspect of the present invention, the partial multiplicand selecting means and the partial multiplier selecting means select the combinations of the mantissa parts of the multiplicand and the multiplier from the lower order and input all the combinations to the mantissa multiplying means. , The sum output, the carry output, and the rounding addition value from the rounding addition value generation means or the sum of the values held in the partial product holding means are obtained by the mantissa addition means, and the result is shifted by the shift means. Then, after storing again in the partial product holding means or by normalizing the final operation result by the shift means, the output of the shift means matches the mantissa of the product rounded to a predetermined precision by the judgment of the operation result inspection means. If so, the processing can be terminated as it is, and if the carry to the higher order than the inspected bit matches and only the inspected bit does not match, the rounding correction means causes the shift means. If a part or all of the output can be corrected and the processing can be ended, and the carry to the higher order of the inspected bit and the higher order bit of the inspected bit do not match, the rounding addition value generation means and the output of the shift means The process can be ended only by adding the rounding addition value by the mantissa adding means. As a result, the number of processing steps required to obtain the product is small, and a single adder performs addition and carry addition and rounding addition or addition for accumulating partial products with respect to the mantissa part. Therefore, the required hardware can be reduced.
【0038】第6の発明は前記した手順により、1だけ
小さい値を求め最上位ビットを反転させることでバイア
ス値の加算を実現し、被除数および除数と同様にバイア
スがかかった浮動小数点形式の商の指数部を単一の処理
ステップで求めることができるため、指数部のバイアス
を補正するステップを必要としない。According to the sixth aspect of the present invention, the addition of the bias value is realized by obtaining the value smaller by 1 and inverting the most significant bit by the above-mentioned procedure, and the quotient in the floating point format is biased like the dividend and the divisor. Since the exponent part of the can be obtained in a single processing step, the step of correcting the bias of the exponent part is not required.
【0039】第7の発明は前記した構成により、指数減
算手段で行う1だけ小さい値を求める演算と最上位ビッ
ト補正手段で行う最上位ビットの反転とバイアス値の加
算を実現し、被除数および除数と同様にバイアスがかか
った浮動小数点形式の商の指数部を単一の処理ステップ
で求めることができるため指数部のバイアスを補正する
ステップを必要とせず、またバイアス補正のためのハー
ドウェアの増大も回避することができる。According to the seventh aspect of the present invention, with the above-mentioned configuration, the operation for obtaining a value smaller by 1 by the exponent subtraction means, the inversion of the most significant bit and the addition of the bias value performed by the most significant bit correction means are realized, and the dividend and the divisor are divided. Similarly, the exponent part of the biased floating-point quotient can be obtained in a single processing step, eliminating the step of correcting the exponent part bias and increasing the hardware for bias correction. Can also be avoided.
【0040】[0040]
【実施例】図1は本発明の第1の実施例における浮動小
数点データの加減算装置のブロック図を示すものであ
る。図1において、101は2つの浮動小数点データのう
ち指数が小さくない方の仮数を格納するレジスタ、102
は2つの浮動小数点データのうち指数が小さい方の仮数
を小さくない方の指数に桁合わせしたものを格納するレ
ジスタ、103は後述の丸め補正繰返し制御回路109が新し
い処理ステップの挿入を指示した場合には後述のレジス
タ110をそれ以外の通常演算時にはレジスタ101を選択す
るマルチプレクサ、104は後述の丸め補正繰返し制御回
路109が新しい処理ステップの挿入を指示した場合には
定数0をそれ以外の通常演算時にはレジスタ102で選択
するマルチプレクサ、105は減算時にマルチプレクサ104
の出力の1の補数をとる補数器、106は2つの浮動小数
点データの指数差と演算の種類および丸めモードに対応
して丸め加算の位置を決定して丸め加算するビットを1
とし他のビットを0にしたデータを生成する丸め値生成
回路、107は加算時にはキャリ入力(Cin)を0、減算時に
はキャリ入力(Cin)を1として、マルチプレクサ103の出
力と補数器105出力と丸め値生成回路106の出力を加算す
ることによって仮の丸めと演算を同時に実行する加算
器、108は加算器107の出力の21の重みを持つビットが
1の時は加算器107の出力を最下位ビット方向(以下、
右という)に1ビットシフトして、21の重みをもつビ
ットと20の重みを持つビットがともに0の時は加算器1
07の出力を最上位ビット方向(以下、左という)に1ビ
ットシフトして、それ以外の時は加算器107の出力をそ
のまま出力するLR1シフタ、109は加算器107で行なっ
た丸めが正しいかどうか判断して、最下位ビットもしく
は最下位ビットと1つ上位桁のビットとの補正だけで正
しい丸め結果を得ることが可能な場合は補正した値を後
述のレジスタ10に格納するとともに処理の終了を指示
し、正しい丸め結果を得るために丸め値の再加算を実行
する必要がある場合は処理ステップの挿入を指示する丸
め補正繰返し制御回路、110はLR1シフタ108の出力を
格納するレジスタ、111はレジスタ110に保持されている
値を正規化するためのシフト数を生成するシフト数生成
回路、112は正規化のためにレジスタ110の出力に対して
シフト数生成回路111が示すビット数だけシフトを行な
うバレルシフタ、113はバレルシフタ112の出力を格納す
るレジスタである。図3、図4、図5、図6は丸めモー
ドが最近偶丸めモードの時の図1に示す丸め補正繰返し
制御回路109の制御関係図で、同符号の2つの浮動小数
点データの加算または異符号の2つの浮動小数点データ
の減算(以下、仮数加算という)を実行しかつ丸め精度
が単精度のときは図3に示すように、加算器107の出力
の21、2-22、2-23、2-24の重みを持つビットと2
-25の重みを持つビット以下のビットの論理和であるス
ティッキビットSとから加算器107の出力のビット補正の
要否と丸め加算値の再加算の要否とを決定し、仮数加算
を実行しかつ丸め精度が倍精度のときは図4に示すよう
に、加算器107の出力の21、2-51、2-52、2-53の重
みを持つビットと2-54の重みを持つビット以下のビッ
トの論理和であるスティッキビットSとから加算器107の
出力のビット補正の要否と丸め加算値の再加算の要否と
を決定し、同符号の2つの浮動小数点データの減算また
は異符号の2つの浮動小数点データの加算(以下、仮数
減算という)を実行しかつ丸め精度が単精度のときは図
5に示すように、加算器107の出力の20、2-23、
2-24、2-25の重みを持つビット2-26の重みを持つビ
ット以下のビットの論理和であるスティッキビットSと
から加算器107の出力のビット補正の要否と丸め加算値
の再加算の要否とを決定し、仮数減算を実行しかつ丸め
精度が倍精度のときは図6に示すように、加算器107の
出力の20、2-52、2-53、2-54の重みを持つビットと
2-55の重みを持つビット以下のビットの論理和である
スティッキビットSとから加算器107の出力のビット補正
の要否と丸め加算値の再加算の要否とを決定する。図
7、図8、図9、図10は丸めモードが正方向丸めモード
で演算結果の符号が正の時の図1に示す丸め補正繰返し
制御回路109の制御関係図で、同符号の2つの浮動小数
点データの加算または異符号の2つの浮動小数点データ
の減算(以下、仮数加算という)を実行しかつ丸め精度
が単精度のときは図7に示すように、加算器107の出力
の21 、2-22、2-23、2-24の重みを持つビットと2-25
の重みを持つビット以下のビットの論理和であるスティ
ッキビットSとから加算器107の出力のビット補正の要否
と丸め加算値の再加算の要否とを決定し、仮数加算を実
行しかつ丸め精度が倍精度のときは図8に示すように、
加算器107の出力の21、2-51、2-52、2-53の重みを
持つビットと2-54の重みを持つビット以下のビットの
論理和であるスティッキビットSとから加算器107の出力
のビット補正の要否と丸め加算値の再加算の要否とを決
定し、同符号の2つの浮動小数点データの減算または異
符号の2つの浮動小数点データの加算(以下、仮数減算
という)を実行しかつ丸め精度が単精度のときは図9に
示すように、加算器107の出力の20、2-23、2-24、2
-25の重みを持つビットと2-26の重みを持つビット以下
のビットの論理和であるスティッキビットSとから加算
器107の出力のビット補正の要否と丸め加算値の再加算
の要否とを決定し、仮数減算を実行しかつ丸め精度が倍
精度のときは図10に示すように、加算器107の出力の
20、2-52、2-53、2-54の重みを持つビットと2-55
の重みを持つビット以下のビットの論理和であるスティ
ッキビットSとから加算器107の出力のビット補正の要否
と丸め加算値の再加算の要否とを決定する。図24、図25
は図1に示す丸め値生成回路106の入出力関係図で、丸
めモードと演算結果の符号と演算の種類と丸めの再加算
時か否かに応じて丸め加算値を決定する。丸め値生成回
路106は丸め精度が単精度の時は図24に、倍精度の時は
図24に基づいて、丸め加算ビットが示す重みのビットの
値を1として他を0とした丸め加算値を生成する。以上
のように構成された本実施例の浮動小数点データの加減
算装置について、まずその原理を説明する。ここでは、
丸め精度が単精度の場合を例に挙げるが、倍精度の場合
も同一の考え方に基づく。1 is a block diagram of a floating point data adder / subtractor according to a first embodiment of the present invention. In FIG. 1, 101 is a register for storing the mantissa whose exponent is the smaller of the two floating point data, 102
Is a register for storing the digit of the mantissa of the smaller exponent of the two floating-point data and the exponent of the smaller exponent, and 103 is a rounding correction repetition control circuit 109 to be described later instructing insertion of a new processing step. Is a multiplexer for selecting the register 110 described later and the register 101 for other normal operations, and 104 is a constant 0 for other normal operations when the rounding correction repetition control circuit 109 described later instructs the insertion of a new processing step. Sometimes a multiplexer is selected by the register 102, and 105 is a multiplexer 104 when subtracting
Complement calculator for taking the one's complement of the output of 106 determines the position of the round addition according to the exponent difference of two floating point data, the type of operation and the rounding mode, and sets the bit for round addition to 1
A rounding value generation circuit for generating data in which other bits are set to 0. 107 sets the carry input (Cin) to 0 at the time of addition and sets the carry input (Cin) to 1 at the time of subtraction to output the output of the multiplexer 103 and the output of the complement unit 105. An adder that simultaneously executes temporary rounding and calculation by adding the output of the rounding value generation circuit 106, 108 is the output of the adder 107 when the bit of the output of the adder 107 having a weight of 2 1 is 1. Least significant bit direction (hereinafter,
1 bit to right) and adder 1 when both the bit with the weight of 2 1 and the bit with the weight of 2 0 are 0
LR1 shifter that shifts the output of 07 by 1 bit in the most significant bit direction (hereinafter referred to as left) and outputs the output of the adder 107 as it is at other times. Is the rounding done by the adder 107 correct for 109? If it is possible to obtain a correct rounding result only by correcting the least significant bit or the least significant bit and the bit of one upper digit, the corrected value is stored in the register 10 described later and the processing ends. And a rounding correction repeat control circuit for instructing the insertion of a processing step when it is necessary to execute re-addition of rounding values to obtain a correct rounding result, 110 is a register for storing the output of the LR1 shifter 108, 111 Is a shift number generation circuit for generating a shift number for normalizing the value held in the register 110, 112 is a bit indicated by the shift number generation circuit 111 for the output of the register 110 for normalization A barrel shifter that shifts by the number, and 113 is a register that stores the output of the barrel shifter 112. 3, FIG. 4, FIG. 5, and FIG. 6 are control relation diagrams of the rounding correction repeating control circuit 109 shown in FIG. 1 when the rounding mode is the nearest even rounding mode. subtraction of two floating point data of the code (hereinafter, referred to as mantissa addition) when executed and rounding accuracy of single precision, as shown in FIG. 3, 2 1, 2 -22 of the output of the adder 107, 2 - Bits with weights of 23 , 2 -24 and 2
-A sticky bit S, which is the logical sum of bits less than or equal to the bit having a weight of -25 , and the necessity of bit correction of the output of the adder 107 and the necessity of re-addition of the rounded addition value are determined, and mantissa addition is executed. When the rounding precision is double precision, as shown in FIG. 4, the output of the adder 107 has bits with weights of 2 1 , 2 −51 , 2 −52 , 2 −53 and 2 −54. The necessity of bit correction of the output of the adder 107 and the necessity of re-addition of the rounded addition value are determined from the sticky bit S which is the logical sum of bits less than or equal to the bit, and the subtraction of two floating point data of the same sign Alternatively, when two floating point data of different signs are added (hereinafter referred to as mantissa subtraction) and the rounding precision is single precision, as shown in FIG. 5, the output of the adder 107 is 2 0 , 2 -23 ,
Bits with weights of 2 -24 and 2 -25 Sticky bits S, which is the logical sum of bits with weights of 2 -26 or less, and the necessity of bit correction of the output of the adder 107 and the re-addition of the rounded addition value When the necessity of addition is determined, the mantissa subtraction is executed, and the rounding precision is double precision, as shown in FIG. 6, 2 0 , 2 -52 , 2 -53 , 2 -54 of the outputs of the adder 107 are output. Whether the bit correction of the output of the adder 107 and the necessity of re-adding the rounded addition value are determined from the sticky bit S which is the logical sum of the bit having the weight of 2 and the bit having the weight of 2 −55 or less. decide. 7, FIG. 8, FIG. 9, and FIG. 10 are control relation diagrams of the rounding correction repeating control circuit 109 shown in FIG. 1 when the rounding mode is the positive direction rounding mode and the sign of the operation result is positive. subtraction of two floating point data of the addition or of opposite sign floating point data (hereinafter, referred to as mantissa addition) when executed and rounding accuracy of single precision, as shown in FIG. 7, the output of the adder 107 2 1 , 2 -22 , 2 -23 , and bits with weights of 2 -24 and 2 -25
The sticky bit S, which is the logical sum of bits less than or equal to the bit having the weight of, determines whether the bit correction of the output of the adder 107 and the necessity of re-adding the rounded addition value are performed, and the mantissa addition is performed, and When the rounding precision is double precision, as shown in FIG.
From the output of the adder 107, a bit having a weight of 2 1 , 2 −51 , 2 −52 , 2 −53 and a sticky bit S which is a logical sum of bits equal to or less than a bit having a weight of 2 −54 are added to the adder 107. Of whether the bit correction of the output of the above and the necessity of re-adding the rounded addition value are determined, subtraction of two floating point data of the same sign or addition of two floating point data of different signs (hereinafter referred to as mantissa subtraction ) Is executed and the rounding precision is single precision, as shown in FIG. 9, the output of the adder 107 is 2 0 , 2 -23 , 2 -24 , 2
Whether or not the bit correction of the output of the adder 107 and the re-addition of the rounded addition value are necessary based on the sticky bit S which is the logical sum of the bit having the weight of -25 and the bit having the weight of 2 -26 or less. And when mantissa subtraction is executed and the rounding precision is double precision, as shown in FIG. 10, the outputs of the adder 107 have weights of 2 0 , 2 −52 , 2 −53 , 2 −54. Bit and 2-55
The necessity of bit correction of the output of the adder 107 and the necessity of re-addition of the rounded addition value are determined from the sticky bit S which is the logical sum of bits less than or equal to the bit having the weight. Figure 24, Figure 25
Is an input / output relationship diagram of the rounding value generation circuit 106 shown in FIG. 1, and determines the rounding addition value according to the rounding mode, the sign of the operation result, the type of operation, and whether or not the rounding is to be re-added. The rounding value generation circuit 106 is based on FIG. 24 when the rounding precision is single precision and on the basis of FIG. 24 when the rounding precision is double precision. To generate. The subtraction device floating point data of this embodiment constructed as described <br/> above, will be described first principle. here,
The case where the rounding precision is single precision will be taken as an example, but the case of double precision is also based on the same idea.
【0041】被加減数、加減数の仮数部をf1、f2、被加
減数、加減数の指数部をe1、e2(但し、e1≦e2)とする
と、仮数加算時の和の仮数部Aは、Letting f1 and f2 be the mantissa and the mantissa part of the addend and subtraction, and e1 and e2 (where e1≤e2) be the exponent part of the addend and subtraction and the addend and subtraction, respectively, the mantissa part A of the sum at the time of adding the mantissa is ,
【0042】[0042]
【数1】 [Equation 1]
【0043】と表される。ここで、正規化仮数の値の範
囲It is expressed as follows. Where the range of values of the normalized mantissa
【0044】[0044]
【数2】 [Equation 2]
【0045】を考慮すると、Considering
【0046】[0046]
【数3】 (Equation 3)
【0047】により、仮数加算後の正規化のために必要
なシフト数は最大でも右に1ビットとなる。(2)は数値
が2進数表現であることを表す。また仮数減算時の差の
仮数部Aは、Accordingly, the number of shifts required for normalization after addition of the mantissa is 1 bit to the right at the maximum. (2) indicates that the numerical value is expressed in binary. The mantissa part A of the difference when the mantissa is subtracted is
【0048】[0048]
【数4】 [Equation 4]
【0049】と表される。ここでe1−e2の値により、 (1)e1−e2=0の時It is expressed as Here, depending on the value of e1-e2, (1) When e1-e2 = 0
【0050】[0050]
【数5】 (Equation 5)
【0051】により、仮数減算後の正規化のために必要
なシフト数は0から最大左に23ビットとなる。Therefore, the number of shifts required for normalization after the mantissa subtraction is 23 bits from 0 to the maximum left.
【0052】(2)e1−e2=1の時(2) When e1-e2 = 1
【0053】[0053]
【数6】 (Equation 6)
【0054】により、仮数減算後の正規化のために必要
なシフト数は0から最大左に24ビットとなる。Therefore, the number of shifts required for normalization after the mantissa subtraction is 24 bits from 0 to the maximum left.
【0055】(3)e1−e2=2の時(3) When e1−e2 = 2
【0056】[0056]
【数7】 (Equation 7)
【0057】により、仮数減算後の正規化のために必要
なシフト数は最大でも左に1ビットシフトとなる。As a result, the number of shifts required for normalization after the mantissa subtraction is 1 bit leftward at the maximum.
【0058】(4)e1−e2=3の時(4) When e1−e2 = 3
【0059】[0059]
【数8】 (Equation 8)
【0060】により、仮数減算後の正規化のために必要
なシフト数は最大でも左1ビットとなる。Therefore, the number of shifts required for normalization after the mantissa subtraction is at most 1 bit on the left.
【0061】以下同様に、e1−e2≧4の時も仮数減算後
の正規化のために必要なシフト数は最大でも左1ビット
であるため、e1−e2≧2の時は仮数減算後の正規化のた
めに必要なシフト数は最大でも左に1ビットとなる。Similarly, when e1−e2 ≧ 4, the number of shifts required for normalization after mantissa subtraction is 1 bit on the left at the maximum, so when e1−e2 ≧ 2, the number of shifts after mantissa subtraction is The maximum number of shifts required for normalization is 1 bit to the left.
【0062】以上の事実より、仮数加算の時または指数
差0、1以外の仮数減算の時は仮数演算後2ビット以上
のシフトを必要とせず、前者は正規化前の2-22の重み
を持つビットまたは2-23の重みを持つビットが結果の
最下位ビット(L)になり、後者は2-23の重みを持つビッ
トまたは2-24の重みを持つビットが結果の最下位ビッ
ト(L)になる。従って、仮数加算の時または指数差0、
1以外の仮数減算の時は加減算と同時にこれらのビット
の位置で丸めを行ない、その後右または左に1ビット正
規化シフトを行なえばよい。演算後2ビットシフト以上
のシフトが必要なのは、指数差が0または1の仮数減算
の時のみであり、指数差0の時は演算前の桁合わせシフ
トを行わないので最下位ビットより下位に有効な値を持
たず、丸めを必要としない。指数差1の時は演算前の桁
合わせシフト数は1ビットであるので最下位ビットの1
桁下(丸めビットR)にのみ有効な値を持つが、20の重
みを持つビットが1ならば正規化のためのシフトは不要
で丸めだけを必要とし、20の重みを持つビットが0な
らば正規化のためのシフトによって丸めビットが最下位
ビットもしくはそれより上位に移動されるため正規化後
に丸めを必要としない。従って、指数差が0または1の
仮数減算の時は演算後に正規化のためのシフトか丸めの
多くとも一方のみを行なえばよい。図29(a)に仮数加算
時の最下位ビット(L)の位置を、(b)指数差0、1以外の
仮数減算時の最下位ビット(L)の位置を示す。次に、最
近偶丸めを実現する原理を示す。最近値に丸めるために
は、丸め加算するビットすなわち最下位ビット(L)の1
つ小さいビット(丸めビットR)が1か0かによって、最
下位ビットへの加算の有無を決定する。丸めビットが0
の時、丸め前のデータと丸め後のデータは同一のもので
あり、丸めビットが1の時、最下位ビットに1を加算す
ることになる。この丸め加算は、丸めビットへ1を加算
し、丸めビットからの桁上げを利用して最下位ビットへ
の加算を行なうことによって自動的に実現できる。この
方法では、丸めビットより小さいビット判定しないの
で、丸めビットが1で、それより小さいビットが0であ
る中間値の場合も、丸め加算を行うことで、大きい方へ
丸められることになる。しかしながら、ANSI/IEEE浮動
小数点演算規格P754では偶数方向への最近値丸めを規定
しており、図27のRNの欄に示すように、丸めビットが1
であっても丸めビットより小さい部分が0であるか否か
を示すスティッキビットが0である中間値の場合には、
最下位ビットが常に偶数になるように丸めを行うことに
なる。さらに具体的に、最下位ビットが1の時は、丸め
加算をし、最下位ビットが0の時は、丸め加算をしない
ということになる。From the above facts, at the time of mantissa addition or at the time of mantissa subtraction other than the exponent difference 0 or 1, it is not necessary to shift more than 2 bits after the mantissa operation, and the former weights 2 -22 before normalization. The bit that has or the weight of 2 -23 becomes the least significant bit (L) of the result, and in the latter, the bit that has the weight of 2 -23 or the bit that has the weight of 2 -24 is the least significant bit (L) of the result. )become. Therefore, when adding mantissa or exponent difference is 0,
For mantissa subtraction other than 1, rounding may be performed at the positions of these bits at the same time as addition and subtraction, and then 1-bit normalization shift may be performed to the right or left. It is necessary to shift by more than 2 bits after the operation only when mantissa subtraction with exponent difference of 0 or 1 is performed. When the exponent difference is 0, digit alignment shift before operation is not performed, so it is effective in the lower order than the least significant bit. Has no value and does not require rounding. When the exponent difference is 1, the digit shift number before calculation is 1 bit, so the least significant bit is 1.
Although having only valid values under digit (round bit R), a shift for bit 1, then normalized with the weight of 2 0 requires only rounding unnecessary, the bit having the weight of 2 0 If 0, the rounding bit is moved to the least significant bit or higher bits by the shift for normalization, and thus rounding is not required after normalization. Therefore, when mantissa subtraction with an exponent difference of 0 or 1, only at least one of shifting or rounding for normalization needs to be performed after the operation. FIG. 29 (a) shows the position of the least significant bit (L) at the time of adding a mantissa, and (b) the position of the least significant bit (L) at the time of subtracting a mantissa other than the exponent difference 0 or 1. Next , the principle of realizing even rounding recently is shown. To round to the nearest value, the bit to be rounded and added, that is, the least significant bit (L) of 1
Whether to add to the least significant bit is determined depending on whether the smaller bit (rounding bit R) is 1 or 0. Rounding bit is 0
, The data before rounding and the data after rounding are the same, and when the rounding bit is 1, 1 is added to the least significant bit. This rounding addition can be automatically realized by adding 1 to the rounding bit and using the carry from the rounding bit to perform addition to the least significant bit. In this method, since a bit smaller than the rounding bit is not determined, even in the case of an intermediate value in which the rounding bit is 1 and the smaller bits are 0, the rounding addition is performed to round to the larger one. However, the ANSI / IEEE floating-point arithmetic standard P754 stipulates rounding to the nearest even number, and as shown in the RN column in FIG.
, If the sticky bit indicating whether the portion smaller than the rounding bit is 0 is an intermediate value,
Rounding is performed so that the least significant bit is always an even number. More specifically, when the least significant bit is 1, rounded addition is performed, and when the least significant bit is 0, rounded addition is not performed.
【0063】ここで、注目できる事実は、丸めビットへ
丸め加算を行った場合の最下位ビットへの桁上げであ
る。丸めビットが1である場合、丸め加算によって丸め
ビットが0になり、丸め加算によって発生した桁上げが
最下位ビットへ加算されるが、最下位ビットが1のとき
は図28(a)のように上位ビットへと桁上げが伝搬してい
く。ところが、最下位ビットが0のときは、図28(b)の
ように最下位ビットが1になるだけで、桁上げは伝搬し
ない。したがって、丸めビットが1でスティッキビット
が0である中間値に対しては、丸めビットに無条件に加
算を行った後の丸めビットとスティッキビットがともに
0ならば最下位ビットを0に修正することによって、正
確に最近偶丸めが実行できる。すなわち、丸めビットの
位置が演算前に決定できれば、丸めと演算は同時に実行
可能となる。Here, a noteworthy fact is the carry to the least significant bit when the rounding addition is performed on the rounding bit. When the rounding bit is 1, the rounding addition causes the rounding bit to become 0, and the carry generated by the rounding addition is added to the least significant bit. When the least significant bit is 1, as shown in Fig. 28 (a). Carry propagates to the upper bits. However, when the least significant bit is 0, the least significant bit is 1, and the carry does not propagate, as shown in FIG. 28 (b). Therefore, for an intermediate value in which the rounding bit is 1 and the sticky bit is 0, if the rounding bit and the sticky bit are both 0 after unconditional addition to the rounding bit, the least significant bit is corrected to 0. By doing so, even rounding can be accurately executed recently. That is, if the position of the rounding bit can be determined before the operation, the rounding and the operation can be executed simultaneously.
【0064】そこで、仮数加算時は仮に2-24の重みを
持つビットへ、指数差0、1以外の減算時は仮に2-25
の重みを持つビットへ1を加算して演算を行った後、演
算結果の21および20の重みを持つビットによって真の
丸めビットを決定し、仮に行った丸め結果を補正するこ
とで丸めを実現する。仮数加算時は仮の丸め加算した結
果の2-22と2-23と2-24の重みを持つビットとそれよ
り小さい各ビットの論理和をとった1ビット、仮数減算
時は仮に丸め加算した結果の2-23と2-24と2-25の重
みを持つビットとそれより小さい各ビットの論理和をと
った1ビットとによって、 イ.正しい結果が得られる
場合 ロ.2-22または2-23の重みを持つビットの補正によっ
て正しい結果が得られる場合 ハ.2-22または2-23の重みを持つビットの補正だけで
は正しい結果が得られない場合を判断し、ロの場合は当
該ビットの補正を行ない、ハの場合は再度同一の丸めを
加算することによって、正しい演算結果を得る。[0064] Therefore, when the mantissa addition is to bits if having a weight of 2 -24, when subtracting non exponent difference 0, 1 if 2 -25
After 1 is added to the bit with the weight of, the true rounding bit is determined by the bit with the weight of 2 1 and 2 0 of the operation result, and the rounding result is corrected temporarily To realize. When adding a mantissa, one bit is obtained by ORing the bits with weights of 2 -22 , 2 -23, and 2 -24 of the result of tentative rounding addition, and each bit smaller than that. B. By the resulting bits having weights of 2 -23 , 2 -24, and 2 -25 , and 1 bit obtained by logically adding each bit smaller than that, b. When correct results are obtained b. Correct results can be obtained by correcting bits with weights of 2 -22 or 2 -23 c. Judge that the correct result cannot be obtained only by correcting the bit having the weight of 2 -22 or 2 -23 , and correct the bit in case of b, and add the same rounding again in case of c. To obtain the correct calculation result.
【0065】次に、以上のように構成された本実施例の
浮動小数点データの加減算装置について、以下その動作
を説明する。説明は最近偶丸めモード、正方向丸めモー
ドおよび負方向丸めモード、零方向丸めモードの順に、
さらに各々について丸め精度が単精度と倍精度について
区分する。 1 最近偶丸めモード 1−1被加減数および加減数が単精度で和または差を単
精度で丸める時 (1)処理ステップ開始前 2つの浮動小数点データの指数と符号および命令が加算
であるか減算であるかに基づいて、仮数加算か仮数減算
かの演算の種類と演算結果の符号とを図26の符号演算関
係図に示すように決定する。被加減数および加減数のう
ち指数が小さくない方の仮数をレジスタ101に、被加減
数および加減数のうち指数が小さい方の仮数を小さくな
い方の指数に桁合わせしたものをレジスタ102に格納す
る。桁合わせ時の桁落ちしたビットは、最下位ビット
(L)の1桁下のビットで2-24の重みを持つ丸めビット
(R)と、2-25の重みを持つビット以下のビットの論理和
であるスティッキビット(S)として併せてレジスタ102に
格納する。 (2)ステップ1 ・仮数加算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、2-24の重みを持つビットを1にして
他のビットを0にしたデータを生成する。補数器105は
マルチプレクサ104出力をそのまま加算器107の入力と
し、このときCinを0にすることによって(レジスタ
1)+(レジスタ2)+(丸め加算値)を実行する。L
R1シフタ108で加算器107の出力の21の重みを持つビ
ットが1の時は右に1ビットシフトを行なう。一方、丸
め補正繰返し制御回路109では、加算器107の出力の2
-25の重みを持つビット以下の各ビットの論理和をとっ
た1ビット(S)を生成し、加算器107の出力の21と2-22
と2-23と2-24の重みを持つビットとSビットによっ
て、図3で示す補正信号が01の時はLR1シフタ108の
出力の2-23の重みを持つビットを反転してレジスタ110
に格納し、補正信号が00の時はLR1シフタ108の出力
をそのままレジスタ110に格納する。丸め補正繰返し制
御回路109の再丸め信号が1の時は丸め値の再加算を実
行する新しいステップの挿入を指示するが、再丸め信号
が0の時はこのステップによって、丸め精度に対応した
丸めを行なった演算が終了する。 ・指数差0、1以外の仮数減算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、2-25の重みを持つビットを1にして
他のビットを0にしたデータを生成する。補数器105は
マルチプレクサ104の出力を反転して加算器107の入力と
しこのとき、Cinを1にすることによって(レジスタ
1)−(レジスタ2)+(丸め加算値)を実行する。L
R1シフタ108で加算器107の出力の20の重みをもつビ
ットが0の時は左に1ビットシフトを行なう。一方、丸
め補正繰返し制御回路109では、加算器107の出力の2
-26の重みを持つビット以下の各ビットの論理和をとっ
た1ビット(S)を生成し、加算器107の出力の20と2-23
と2-24と2-25の重みを持つビットとSビットによっ
て、図5で示す補正信号が01の時はLR1シフタ108の
出力の2-23の重みをもつビットを反転してレジスタ110
に格納し、補正信号が00の時はLR1シフタ108の出力
をそのままレジスタ110に格納する。丸め補正繰返し制
御回路109の再丸め信号が1の時は丸め値の再加算を実
行する新しいステップの挿入を指示するが、再丸め信号
が0の時はこのステップによって、丸め精度に対応した
丸めを行った演算が終了する。 ・指数差0、1の仮数減算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、全ビットを0にしたデータを生成す
る。補数器105はマルチプレクサ104の出力を反転して加
算器107の入力としこのとき、Cinを1にすることによっ
て(レジスタ1)−(レジスタ2)を実行する。LR1
シフタ108で加算器107の出力の20の重みを持つビット
が0の時は左に1ビットシフトを行なう。丸め補正繰返
し制御回路109で、加算器107の出力の20と2-23と2
-24の重みを持つ3ビットがいずれも1の時は丸めのた
めのステップの挿入を指示する。一方、シフト数生成回
路111で、LR1シフタ108の出力を正規化するために必
要なシフト数を生成し、このシフト数が0でな場合に正
規化のためのステップの挿入を指示する。丸めのための
ステップの挿入と正規化のためのステップの挿入がどち
らも発生しない時はこのステップで演算を終了する。 (3)挿入ステップ(ステップの挿入が指示される時の
み) ・仮数加算時 レジスタ110の出力をマルチプレクサ103で選択し、マル
チプレクサ104で定数0を選択し、マルチプレクサ103の
出力とマルチプレクサ104をそのまま出力した補数器105
の出力とステップ1の丸め値生成回路106で生成した2
-24の重みを持つビットを1にして他のビットを0にし
たデータとを加算器107で加算し、LR1シフタ108で加
算器107の出力の21の重みを持つビットが1の時は右に
1ビットシフトを行なって、21の重みを持つビットが
0の時はそのままの値をレジスタ110に格納して処理を
終了する。 ・指数差0、1以外の仮数減算時 レジスタ110の出力をマルチプレクサ103で選択し、マル
チプレクサ104で定数0を選択し、マルチプレクサ103の
出力とマルチプレクサ104をそのまま出力した補数器105
の出力とステップ1の丸め値生成回路106で生成した2
-25の重みを持つビットを1にして他のビットを0にし
たデータとを加算器107で加算し、LR1シフタ108で加
算107の出力の21の重みを持つビットが1の時は右に1
ビットシフトを行なって、21の重みを持つビットが0
の時はそのままの値をレジスタ110に格納して処理を終
了する。 ・指数差0、1の仮数減算時 シフト数生成回路111で正規化のためのステップの挿入
を指示した場合は、バレルシフタ112がレジスタ110を入
力とし、シフト数生成回路111で生成したシフト数だけ
左にシフトを行なってレジスタ113に格納して処理を終
了する。Next, the operation of the floating point data adding / subtracting device of the present embodiment having the above-described structure will be described below. The explanation is recently round even mode, positive direction rounding mode, negative direction rounding mode, zero direction rounding mode,
Rounding precision is divided into single precision and double precision. 1 Recent even rounding mode 1-1 When the sum or difference of the augend and the addend is rounded in single precision with single precision (1) Before the start of the processing step Is the exponent of the two floating point data, the sign and the instruction addition? Based on whether it is a subtraction, the type of operation of mantissa addition or mantissa subtraction and the sign of the operation result are determined as shown in the sign operation relation diagram of FIG. The mantissa whose exponent is the smaller of the augend and the addend is stored in register 101, and the mantissa of the augend that is smaller is stored in the register 102. To do. The digit with which the digit was dropped during digit alignment is the least significant bit.
Rounding bit with a weight of 2 -24 that is one digit below (L)
(R) and a sticky bit (S) which is a logical sum of bits having a weight of 2 -25 or less and stored in the register 102 together. (2) Step 1-When adding mantissa: The multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounding value generation circuit 106 generates data in which a bit having a weight of 2-24 is set to 1 and other bits are set to 0. The complementer 105 uses the output of the multiplexer 104 as it is as an input of the adder 107, and at this time, Cin is set to 0 to execute (register 1) + (register 2) + (rounded addition value). L
When the bit of the output of the adder 107 having the weight of 2 1 is 1, the R1 shifter 108 shifts to the right by 1 bit. On the other hand, in the rounding correction iterative control circuit 109, the output of the adder 107
-One bit (S) is generated by taking the logical sum of the bits below the bit having a weight of -25 , and the output of adder 107 is 2 1 and 2 -22
When 2 -23 and the bit and the S bit having the weight of 2 -24, register 110 inverts the bits having 2 -23 weight of the output of LR1 shifter 108 when the correction signal shown in Figure 3 is 01
When the correction signal is 00, the output of the LR1 shifter 108 is directly stored in the register 110. When the re-rounding signal of the rounding correction iterative control circuit 109 is 1, an instruction to insert a new step for executing re-addition of the rounding value is made. When the re-rounding signal is 0, this step causes rounding corresponding to rounding accuracy The calculation that has performed is completed. Mantissa subtraction other than the exponent difference 0 or 1, the multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounding value generation circuit 106 generates data in which a bit having a weight of 2 -25 is set to 1 and other bits are set to 0. The complementer 105 inverts the output of the multiplexer 104 and uses it as the input of the adder 107. At this time, by setting Cin to 1, (register 1)-(register 2) + (rounded addition value) is executed. L
R1 when the bit having the weight of 2 0 of the output of the adder 107 by the shifter 108 is 0 performs a 1-bit shift to the left. On the other hand, in the rounding correction iterative control circuit 109, the output of the adder 107
Generate 1 bit (S) by ORing each bit less than or equal to the bit with -26 weight, and output 2 0 and 2 -23 of the output of adder 107.
When the correction signal shown in FIG. 5 is 01, the bit having the weight of 2 -23 of the output of the LR1 shifter 108 is inverted by the bit having the weight of 2 -24 and the bit of 2 -25 and the S bit, and the register 110
When the correction signal is 00, the output of the LR1 shifter 108 is directly stored in the register 110. When the re-rounding signal of the rounding correction iterative control circuit 109 is 1, an instruction to insert a new step for executing re-addition of the rounding value is made. When the re-rounding signal is 0, this step causes rounding corresponding to rounding accuracy The calculation that has been performed ends. When mantissa subtraction with exponent difference 0 or 1, the multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounded value generation circuit 106 generates data with all bits set to 0. The complementer 105 inverts the output of the multiplexer 104 and uses it as the input of the adder 107. At this time, by setting Cin to 1, (register 1)-(register 2) is executed. LR1
When bits having the weight of 2 0 of the output of the adder 107 by the shifter 108 is 0 performs a 1-bit shift to the left. In the rounding correction iterative control circuit 109, the outputs of the adder 107 are 2 0 , 2 -23 and 2
-When all 3 bits with a weight of -24 are 1, it indicates the insertion of a step for rounding. On the other hand, the shift number generation circuit 111 generates a shift number necessary for normalizing the output of the LR1 shifter 108, and when this shift number is 0, the insertion of a step for normalization is instructed. When neither the insertion of a rounding step nor the insertion of a normalization step occurs, the operation ends at this step. (3) Insertion step (only when insertion of a step is instructed) -When adding mantissa Select the output of the register 110 with the multiplexer 103, select the constant 0 with the multiplexer 104, and output the output of the multiplexer 103 and the multiplexer 104 as they are. Complementer 105
Output and 2 generated by the rounding value generation circuit 106 in step 1
When the bit having a weight of -24 is set to 1 and the data having the other bits set to 0 are added by the adder 107, and the bit having a weight of 2 1 of the output of the adder 107 is 1 by the LR1 shifter 108, When the bit having the weight of 2 1 is 0, the value is stored in the register 110 as it is and the processing is completed. When the mantissa is subtracted except for the exponent difference 0 or 1, the output of the register 110 is selected by the multiplexer 103, the constant 0 is selected by the multiplexer 104, and the output of the multiplexer 103 and the complementer 105 that outputs the multiplexer 104 as they are.
Output and 2 generated by the rounding value generation circuit 106 in step 1
Add data with a bit with a weight of -25 to 1 and other bits to 0 with an adder 107, and with an LR1 shifter 108, when the bit with a weight of 2 1 of the adder 107 is 1, it is right. To 1
Bit shift is performed so that the bit having a weight of 2 1 becomes 0.
In the case of, the value as it is is stored in the register 110 and the process is terminated. -When mantissa subtraction with exponent difference 0 or 1 When the shift number generation circuit 111 instructs the insertion of a step for normalization, the barrel shifter 112 receives the register 110 as input, and only the shift number generated by the shift number generation circuit 111 is input. The process shifts to the left, stores it in the register 113, and ends the process.
【0066】一方、丸め補正繰返し制御回路9で丸めの
ためのステップの挿入を指示した場合は、レジスタ110
の出力をマルチプレクサ103で選択し、マルチプレクサ1
04で定数0を選択し、マルチプレクサ103の出力とマル
チプレクサ104をそのまま出力した補数器105の出力と丸
め値生成回路106で生成した2-23の重みを持つビットを
1にして他のビットを0にしたデータとを加算器107で
加算し、LR1シフタ108で加算器107の出力の21の重
みを持つビットが1の時は右に1ビットシフトを行なっ
て、21の重みを持つビットが0の時はそのままの値を
レジスタ110に格納して処理を終了する。On the other hand, when the rounding correction iterative control circuit 9 instructs to insert a step for rounding, the register 110
Select the output of the multiplexer 103 with multiplexer 1
A constant 0 is selected in 04, the output of the multiplexer 103, the output of the complementer 105 which is output from the multiplexer 104 as it is, and the bit having a weight of 2 -23 generated by the rounding value generation circuit 106 are set to 1 and the other bits are set to 0. and adder 107 and the data was, by performing 1-bit shift to the right when the bit is 1 with 2 1 of the weights of the output of the adder 107 in LR1 shifter 108, the bit having the weight of 2 1 When is 0, the same value is stored in the register 110 and the process is terminated.
【0067】1−2被加減数および加減数が倍精度で和
または差を倍精度で丸める時 (1)処理ステップ開始前 2つの浮動小数点データの指数と符号および命令が加算
であるか減算であるかに基づいて、仮数加算か仮数減算
かの演算の種類と演算結果の符号とを図26の符号演算関
係図に示すように決定する。被加減数および加減数のう
ち指数が小さくない方の仮数をレジスタ101に、被加減
数および加減数のうち指数が小さい方の仮数を小さくな
い方の指数に桁合わせしたものをレジスタ102に格納す
る。桁合わせ時の桁落ちしたビットは、最下位ビット
(L)の1桁下のビットで2-53の重みを持つ丸めビット
(R)と、2-54の重みを持つビット以下のビットの論理和
であるスティッキビット(S)として併せてレジスタ102に
格納する。 (2)ステップ1 ・仮数加算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、2-53の重みを持つビットを1にして
他のビットを0にしたデータを生成する。補数器105は
マルチプレクサ104出力をそのまま加算器107の入力と
し、このときCinを0にすることによって(レジスタ
1)+(レジスタ2)+(丸め加算値)を実行する。L
R1シフタ108で加算器107の出力の21の重みを持つビ
ットが1の時は右に1ビットシフトを行なう。一方、丸
め補正繰返し制御回路109では、加算器107の出力の2
-54の重みを持つビット以下の各ビットの論理和をとっ
た1ビット(S)を生成し、加算器107の出力の21と2-51
と2-52と2-53の重みを持つビットとSビットによっ
て、図6で示す補正信号が01の時はLR1シフタ108の
出力の2-52の重みを持つビットを反転してレジスタ110
に格納し、補正信号が00の時はLR1シフタ108の出力
をそのままレジスタ110に格納する。丸め補正繰返し制
御回路109の再丸め信号が1の時は丸め値の再加算を実
行する新しいステップの挿入を指示するが、再丸め信号
が0の時はこのステップによって、丸め精度に対応した
丸めを行なった演算が終了する。 ・指数差0、1以外の仮数減算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、2-54の重みを持つビットを1にして
他のビットを0にしたデータを生成する。補数器105は
マルチプレクサ104の出力を反転して加算器107の入力と
しこのとき、Cinを1にすることによって(レジスタ
1)−(レジスタ2)+(丸め加算値)を実行する。L
R1シフタ108で加算器107の出力の20の重みをもつビ
ットが0の時は左に1ビットシフトを行なう。一方、丸
め補正繰返し制御回路109では、加算器107の出力の2
-55の重みを持つビット以下の各ビットの論理和をとっ
た1ビット(S)を生成し、加算器107の出力の20と2-52
と2-53と2-54の重みを持つビットとSビットによっ
て、図6で示す補正信号が01の時はLR1シフタ108の
出力の2-52の重みをもつビットを反転してレジスタ110
に格納し、補正信号が00の時はLR1シフタ108の出力
をそのままレジスタ110に格納する。丸め補正繰返し制
御回路109の再丸め信号が1の時は丸め値の再加算を実
行する新しいステップの挿入を指示するが、再丸め信号
が0の時はこのステップによって、丸め精度に対応した
丸めを行った演算が終了する。 ・指数差0、1の仮数減算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、全ビットを0にしたデータを生成す
る。補数器105はマルチプレクサ104の出力を反転して加
算器107の入力としこのとき、Cinを1にすることによっ
て(レジスタ1)−(レジスタ2)を実行する。LR1
シフタ108で加算器107の出力の20の重みを持つビット
が0の時は左に1ビットシフトを行なう。丸め補正繰返
し制御回路109で、加算器107の出力の20と2-52と2
-53の重みを持つ3ビットがいずれも1の時は丸めのた
めのステップの挿入を指示する。一方、シフト数生成回
路111で、LR1シフタ108の出力を正規化するために必
要なシフト数を生成し、このシフト数が0でない場合に
正規化のためのステップの挿入を指示する。丸めのため
のステップの挿入と正規化のためのステップの挿入がど
ちらも発生しない時はこのステップで演算を終了する。 (3)挿入ステップ(ステップの挿入が指示される時の
み) ・仮数加算時 レジスタ110の出力をマルチプレクサ103で選択し、マル
チプレクサ104で定数0を選択し、マルチプレクサ103の
出力とマルチプレクサ104をそのまま出力した補数器105
の出力とステップ1の丸め値生成回路106で生成した2
-53の重みを持つビットを1にして他のビットを0にし
たデータとを加算器107で加算し、LR1シフタ108で加
算器107の出力の21の重みを持つビットが1の時は右に
1ビットシフトを行なって、21の重みを持つビットが
0の時はそのままの値をレジスタ110に格納して処理を
終了する。 ・指数差0、1以外の仮数減算時 レジスタ110の出力をマルチプレクサ103で選択し、マル
チプレクサ104で定数0を選択し、マルチプレクサ103の
出力とマルチプレクサ104をそのまま出力した補数器105
の出力とステップ1の丸め値生成回路106で生成した2
-54の重みを持つビットを1にして他のビットを0にし
たデータとを加算器107で加算し、LR1シフタ108で加
算器107の出力の21の重みを持つビットが1の時は右に
1ビットシフトを行なって、21の重みを持つビットが
0の時はそのままの値をレジスタ110に格納して処理を
終了する。 ・指数差0、1の仮数減算時 シフト数生成回路111で正規化のためのステップの挿入
を指示した場合は、バレルシフタ112がレジスタ110を入
力とし、シフト数生成回路111で生成したシフト数だけ
左にシフトを行なってレジスタ113に格納して処理を終
了する。1-2 When the sum or difference of the augend and subtraction is double-precision and the difference is double-precision (1) Before the start of the processing step The exponent and the sign of the two floating-point data and the instruction are addition or subtraction. Based on whether or not there is a mantissa addition or a mantissa subtraction, the type of operation and the sign of the operation result are determined as shown in the sign operation relation diagram of FIG. The mantissa whose exponent is the smaller of the augend and the addend is stored in register 101, and the mantissa of the augend that is smaller is stored in the register 102. To do. The digit with which the digit was dropped during digit alignment is the least significant bit.
Rounding bit that is one digit below (L) and has a weight of 2 -53
(R) and a sticky bit (S) which is a logical sum of bits having a weight of 2 −54 or less and stored in the register 102. (2) Step 1-When adding mantissa: The multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounding value generation circuit 106 generates data in which a bit having a weight of 2 −53 is set to 1 and other bits are set to 0. The complementer 105 uses the output of the multiplexer 104 as it is as an input of the adder 107, and at this time, Cin is set to 0 to execute (register 1) + (register 2) + (rounded addition value). L
When the bit of the output of the adder 107 having the weight of 2 1 is 1, the R1 shifter 108 shifts to the right by 1 bit. On the other hand, in the rounding correction iterative control circuit 109, the output of the adder 107
-One bit (S) is generated by ORing the bits below the bit having the weight of -54 , and the output of adder 107 is 2 1 and 2 -51
When the correction signal shown in FIG. 6 is 01, the bit having the weight of 2 −52 of the output of the LR1 shifter 108 is inverted by the bit having the weight of 2 −52 and 2 −53 and the S bit, and the register 110
When the correction signal is 00, the output of the LR1 shifter 108 is directly stored in the register 110. When the re-rounding signal of the rounding correction iterative control circuit 109 is 1, an instruction to insert a new step for executing re-addition of the rounding value is made. When the re-rounding signal is 0, this step causes rounding corresponding to rounding accuracy The calculation that has performed is completed. Mantissa subtraction other than the exponent difference 0 or 1, the multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounding value generation circuit 106 generates data in which a bit having a weight of 2 −54 is set to 1 and other bits are set to 0. The complementer 105 inverts the output of the multiplexer 104 and uses it as the input of the adder 107. At this time, by setting Cin to 1, (register 1)-(register 2) + (rounded addition value) is executed. L
R1 when the bit having the weight of 2 0 of the output of the adder 107 by the shifter 108 is 0 performs a 1-bit shift to the left. On the other hand, in the rounding correction iterative control circuit 109, the output of the adder 107
Generate a 1-bit (S) that is the logical sum of bits less than or equal to the bit having the weight of -55 , and output 2 0 and 2 -52 of the adder 107.
When the correction signal shown in FIG. 6 is 01, the bit having the weight of 2 -52 of the output of the LR1 shifter is inverted by the bit having the weight of 2 -53 and 2 -54 and the S bit, and the register 110
When the correction signal is 00, the output of the LR1 shifter 108 is directly stored in the register 110. When the re-rounding signal of the rounding correction iterative control circuit 109 is 1, an instruction to insert a new step for executing re-addition of the rounding value is made. When the re-rounding signal is 0, this step causes rounding corresponding to rounding accuracy The calculation that has been performed ends. When mantissa subtraction with exponent difference 0 or 1, the multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounded value generation circuit 106 generates data with all bits set to 0. The complementer 105 inverts the output of the multiplexer 104 and uses it as the input of the adder 107. At this time, by setting Cin to 1, (register 1)-(register 2) is executed. LR1
When bits having the weight of 2 0 of the output of the adder 107 by the shifter 108 is 0 performs a 1-bit shift to the left. In the rounding correction iterative control circuit 109, the outputs of the adder 107 are 2 0 , 2 -52 and 2
When all the 3 bits with a weight of -53 are 1, it indicates the insertion of the step for rounding. On the other hand, the shift number generation circuit 111 generates a shift number necessary for normalizing the output of the LR1 shifter 108, and when this shift number is not 0, the insertion of a step for normalization is instructed. When neither the insertion of a rounding step nor the insertion of a normalization step occurs, the operation ends at this step. (3) Insertion step (only when insertion of a step is instructed) -When adding mantissa Select the output of the register 110 with the multiplexer 103, select the constant 0 with the multiplexer 104, and output the output of the multiplexer 103 and the multiplexer 104 as they are. Complementer 105
Output and 2 generated by the rounding value generation circuit 106 in step 1
When the bit having the weight of -53 is set to 1 and the other bit is set to 0, the data is added by the adder 107, and when the bit having the weight of 2 1 of the output of the adder 107 is 1 by the LR1 shifter 108, When the bit having the weight of 2 1 is 0, the value is stored in the register 110 as it is and the processing is completed. When the mantissa is subtracted except for the exponent difference 0 or 1, the output of the register 110 is selected by the multiplexer 103, the constant 0 is selected by the multiplexer 104, and the output of the multiplexer 103 and the complementer 105 that outputs the multiplexer 104 as they are.
Output and 2 generated by the rounding value generation circuit 106 in step 1
When the bit having the weight of -54 is set to 1 and the other bit is set to 0, the data is added by the adder 107, and when the bit having the weight of 2 1 of the output of the adder 107 is 1 by the LR1 shifter 108, When the bit having the weight of 2 1 is 0, the value is stored in the register 110 as it is and the processing is completed. -When mantissa subtraction with exponent difference 0 or 1 When the shift number generation circuit 111 instructs the insertion of a step for normalization, the barrel shifter 112 receives the register 110 as input, and only the shift number generated by the shift number generation circuit 111 is input. The process shifts to the left, stores it in the register 113, and ends the process.
【0068】一方、丸め補正繰返し制御回路9で丸めの
ためのステップの挿入を指示した場合は、レジスタ110
の出力をマルチプレクサ103で選択し、マルチプレクサ1
04で定数0を選択し、マルチプレクサ103の出力とマル
チプレクサ104をそのまま出力した補数器105の出力と丸
め値生成回路106で生成した2-52の重みを持つビットを
1にして他のビットを0にしたデータとを加算器107で
加算し、LR1シフタ108で加算器107の出力の21の重
みを持つビットが1の時は右に1ビットシフトを行なっ
て、21の重みを持つビットが0の時はそのままの値を
レジスタ110に格納して処理を終了する。On the other hand, when the rounding correction repeat control circuit 9 instructs to insert a step for rounding, the register 110
Select the output of the multiplexer 103 with multiplexer 1
A constant 0 is selected in 04, and the output of the multiplexer 103, the output of the complementer 105 which is output from the multiplexer 104 as they are, and the bit having a weight of 2 −52 generated by the rounding value generation circuit 106 are set to 1 and the other bits are set to 0. and adder 107 and the data was, by performing 1-bit shift to the right when the bit is 1 with 2 1 of the weights of the output of the adder 107 in LR1 shifter 108, the bit having the weight of 2 1 When is 0, the same value is stored in the register 110 and the process is terminated.
【0069】2 正方向丸めモードおよび負方向丸めモ
ード 2−1被加減数および加減数が単精度で和または差を単
精度で丸める時 (1)処理ステップ開始前 2つの浮動小数点データの指数と符号および命令が加算
であるか減算であるかに基づいて、仮数加算か仮数減算
かの演算の種類と演算結果の符号とを図26の符号演算関
係図に示すように決定する。正方向丸めモードで演算結
果の符号が負の時または負方向丸めモードで演算結果の
符号が正の時は、後述の零方向丸めモードの動作に従
い、正方向丸めモードで演算結果の符号が正の時または
負方向丸めモードで演算結果の符号が負の時は、以下の
ように動作する。被加減数および加減数のうち指数が小
さくない方の仮数をレジスタ101に、被加減数および加
減数のうち指数が小さい方の仮数を小さくない方の指数
に桁合わせしたものをレジスタ102に格納する。桁合わ
せ時の桁落ちしたビットは、最下位ビット(L)の1桁下
のビットで2-24の重みを持つ丸めビット(R)と、2-25
の重みを持つビット以下のビットの論理和であるスティ
ッキビット(S)として併せてレジスタ102に格納する。 (2)ステップ1 ・仮数加算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、2-24の重みを持つビットを1にして
他のビットを0にしたデータを生成する。補数器105は
マルチプレクサ104出力をそのまま加算器107の入力と
し、このときCinを0にすることによって(レジスタ
1)+(レジスタ2)+(丸め加算値)を実行する。L
R1シフタ108で加算器107の出力の21の重みを持つビ
ットが1の時は右に1ビットシフトを行なう。一方、丸
め補正繰返し制御回路109では、加算器107の出力の2
-25の重みを持つビット以下の各ビットの論理和をとっ
た1ビット(S)を生成し、加算器107の出力の21と2-22
と2-23と2-24の重みを持つビットとSビットによっ
て、図7で示す補正信号が01の時はLR1シフタ108の
出力の2-23の重みを持つビットを反転してレジスタ110
に格納し、補正信号が10の時はLR1シフタ108の出力
の2-22と2-23の重みを持つビットを反転してレジスタ
110に格納し、補正信号が00の時はLR1シフタ108の出
力をそのままレジスタ110に格納する。丸め補正繰返し
制御回路109の再丸め信号が1の時は丸め値の再加算を
実行する新しいステップの挿入を指示するが、再丸め信
号が0の時はこのステップによって、丸め精度に対応し
た丸めを行なった演算が終了する。 ・指数差0、1以外の仮数減算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、2-25の重みを持つビットを1にして
他のビットを0にしたデータを生成する。補数器105は
マルチプレクサ104の出力を反転して加算器107の入力と
しこのとき、Cinを1にすることによって(レジスタ
1)−(レジスタ2)+(丸め加算値)を実行する。L
R1シフタ108で加算器107の出力の20の重みをもつビ
ットが0の時は左に1ビットシフトを行なう。一方、丸
め補正繰返し制御回路109では、加算器107の出力の2
-26の重みを持つビット以下の各ビットの論理和をとっ
た1ビット(S)を生成し、加算器107の出力の20と2-23
と2-24と2-25の重みを持つビットとSビットによっ
て、図9で示す補正信号が01の時はLR1シフタ108の
出力の2-23の重みをもつビットを反転してレジスタ110
に格納し、補正信号が10の時はLR1シフタ108の出力
の2-22と2-23の重みを持つビットを反転してレジスタ
110に格納し、補正信号が00の時はLR1シフタ108の出
力をそのままレジスタ110に格納する。丸め補正繰返し
制御回路109の再丸め信号が1の時は丸め値の再加算を
実行する新しいステップの挿入を指示するが、再丸め信
号が0の時はこのステップによって、丸め精度に対応し
た丸めを行った演算が終了する。 ・指数差0、1の仮数減算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、全ビットを0にしたデータを生成す
る。補数器105はマルチプレクサ104の出力を反転して加
算器107の入力としこのとき、Cinを1にすることによっ
て(レジスタ1)−(レジスタ2)を実行する。LR1
シフタ108で加算器107の出力の20の重みを持つビット
が0の時は左に1ビットシフトを行なう。丸め補正繰返
し制御回路109で、加算器107の出力の20と2-24の重み
を持つ2ビットがいずれも1の時は丸めのためのステッ
プの挿入を指示する。一方、シフト数生成回路111で、
LR1シフタ108の出力を正規化するために必要なシフ
ト数を生成し、このシフト数が0でな場合に正規化のた
めのステップの挿入を指示する。丸めのためのステップ
の挿入と正規化のためのステップの挿入がどちらも発生
しない時はこのステップで演算を終了する。 (3)挿入ステップ(ステップの挿入が指示される時の
み) ・仮数加算時 レジスタ110の出力をマルチプレクサ103で選択し、マル
チプレクサ104で定数0を選択し、マルチプレクサ103の
出力とマルチプレクサ104をそのまま出力した補数器105
の出力とステップ1の丸め値生成回路106で生成した2
-24の重みを持つビットを1にして他のビットを0にし
たデータとを加算器107で加算し、LR1シフタ108で加
算器107の出力の21の重みを持つビットが1の時は右に
1ビットシフトを行なって、21の重みを持つビットが
0の時はそのままの値をレジスタ110に格納して処理を
終了する。 ・指数差0、1以外の仮数減算時 レジスタ110の出力をマルチプレクサ103で選択し、マル
チプレクサ104で定数0を選択し、マルチプレクサ103の
出力とマルチプレクサ104をそのまま出力した補数器105
の出力とステップ1の丸め値生成回路106で生成した2
-25の重みを持つビットを1にして他のビットを0にし
たデータとを加算器107で加算し、LR1シフタ108で加
算107の出力の21の重みを持つビットが1の時は右に1
ビットシフトを行なって、21の重みを持つビットが0
の時はそのままの値をレジスタ110に格納して処理を終
了する。 ・指数差0、1の仮数減算時 シフト数生成回路111で正規化のためのステップの挿入
を指示した場合は、バレルシフタ112がレジスタ110を入
力とし、シフト数生成回路111で生成したシフト数だけ
左にシフトを行なってレジスタ113に格納して処理を終
了する。 2 Positive direction rounding mode and negative direction rounding mode
Is over de 2-1 subtraction or the acceleration speed and acceleration number is the exponent and sign and instructions addition of two floating point data when (1) the process steps start before rounding the sum or difference with single precision precision Based on whether or not, the type of operation for mantissa addition or mantissa subtraction and the sign of the operation result are determined as shown in the sign operation relation diagram of FIG. When the sign of the operation result is negative in the positive direction rounding mode or when the sign of the operation result is positive in the negative direction rounding mode, the sign of the operation result is positive in the positive direction rounding mode according to the operation of zero direction rounding mode described later. Or when the sign of the operation result is negative in the negative direction rounding mode, the operation is as follows. The mantissa whose exponent is the smaller of the augend and the addend is stored in register 101, and the mantissa of the augend that is smaller is stored in the register 102. To do. The digit lost during digit alignment is the bit one digit below the least significant bit (L) and the rounding bit (R) with a weight of 2-24 and 2-25
It is also stored in the register 102 as a sticky bit (S) which is the logical sum of bits less than or equal to the weighted bit. (2) Step 1-When adding mantissa: The multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounding value generation circuit 106 generates data in which a bit having a weight of 2-24 is set to 1 and other bits are set to 0. The complementer 105 uses the output of the multiplexer 104 as it is as an input of the adder 107, and at this time, Cin is set to 0 to execute (register 1) + (register 2) + (rounded addition value). L
When the bit of the output of the adder 107 having the weight of 2 1 is 1, the R1 shifter 108 shifts to the right by 1 bit. On the other hand, in the rounding correction iterative control circuit 109, the output of the adder 107
-One bit (S) is generated by taking the logical sum of the bits below the bit having a weight of -25 , and the output of adder 107 is 2 1 and 2 -22
When 2 -23 and the bit and the S bit having the weight of 2 -24, register 110 inverts the bits having 2 -23 weight of the output of LR1 shifter 108 when the correction signal shown in Figure 7 is 01
When the correction signal is 10, the bit with the weight of 2 -22 and 2 -23 of the output of the LR1 shifter 108 is inverted and registered.
When the correction signal is 00, the output of the LR1 shifter 108 is stored in the register 110 as it is. When the re-rounding signal of the rounding correction iterative control circuit 109 is 1, an instruction to insert a new step for executing re-addition of the rounding value is made. When the re-rounding signal is 0, this step causes rounding corresponding to rounding accuracy The calculation that has performed is completed. Mantissa subtraction other than the exponent difference 0 or 1, the multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounding value generation circuit 106 generates data in which a bit having a weight of 2 -25 is set to 1 and other bits are set to 0. The complementer 105 inverts the output of the multiplexer 104 and uses it as the input of the adder 107. At this time, by setting Cin to 1, (register 1)-(register 2) + (rounded addition value) is executed. L
R1 when the bit having the weight of 2 0 of the output of the adder 107 by the shifter 108 is 0 performs a 1-bit shift to the left. On the other hand, in the rounding correction iterative control circuit 109, the output of the adder 107
Generate 1 bit (S) by ORing each bit less than or equal to the bit with -26 weight, and output 2 0 and 2 -23 of the output of adder 107.
When the correction signal shown in FIG. 9 is 01, the bit having the weight of 2 -23 of the output of the LR1 shifter 108 is inverted by the bit having the weight of 2 -24 and the bit of 2 -25 and the S bit, and the register 110
When the correction signal is 10, the bit with the weight of 2 -22 and 2 -23 of the output of the LR1 shifter 108 is inverted and registered.
When the correction signal is 00, the output of the LR1 shifter 108 is stored in the register 110 as it is. When the re-rounding signal of the rounding correction iterative control circuit 109 is 1, an instruction to insert a new step for executing re-addition of the rounding value is made. When the re-rounding signal is 0, this step causes rounding corresponding to rounding accuracy The calculation that has been performed ends. When mantissa subtraction with exponent difference 0 or 1, the multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounded value generation circuit 106 generates data with all bits set to 0. The complementer 105 inverts the output of the multiplexer 104 and uses it as the input of the adder 107. At this time, by setting Cin to 1, (register 1)-(register 2) is executed. LR1
When bits having the weight of 2 0 of the output of the adder 107 by the shifter 108 is 0 performs a 1-bit shift to the left. Rounding correction repetitive control circuit 109, and instructs the insertion of the step for rounding when two bits are both 1 having a weight of 2 0 and 2 -24 of the output of the adder 107. On the other hand, in the shift number generation circuit 111,
The number of shifts required to normalize the output of the LR1 shifter 108 is generated, and if the number of shifts is not 0, the insertion of a step for normalization is instructed. When neither the insertion of a rounding step nor the insertion of a normalization step occurs, the operation ends at this step. (3) Insertion step (only when insertion of a step is instructed) -When adding mantissa Select the output of the register 110 with the multiplexer 103, select the constant 0 with the multiplexer 104, and output the output of the multiplexer 103 and the multiplexer 104 as they are. Complementer 105
Output and 2 generated by the rounding value generation circuit 106 in step 1
When the bit having a weight of -24 is set to 1 and the data having the other bits set to 0 are added by the adder 107, and the bit having a weight of 2 1 of the output of the adder 107 is 1 by the LR1 shifter 108, When the bit having the weight of 2 1 is 0, the value is stored in the register 110 as it is and the processing is completed. When the mantissa is subtracted except for the exponent difference 0 or 1, the output of the register 110 is selected by the multiplexer 103, the constant 0 is selected by the multiplexer 104, and the output of the multiplexer 103 and the complementer 105 that outputs the multiplexer 104 as they are.
Output and 2 generated by the rounding value generation circuit 106 in step 1
Add data with a bit with a weight of -25 to 1 and other bits to 0 with an adder 107, and with an LR1 shifter 108, when the bit with a weight of 2 1 of the adder 107 is 1, it is right. To 1
Bit shift is performed so that the bit having a weight of 2 1 becomes 0.
In the case of, the value as it is is stored in the register 110 and the process is terminated. -When mantissa subtraction with exponent difference 0 or 1 When the shift number generation circuit 111 instructs the insertion of a step for normalization, the barrel shifter 112 receives the register 110 as input, and only the shift number generated by the shift number generation circuit 111 is input. The process shifts to the left, stores it in the register 113, and ends the process.
【0070】一方、丸め補正繰返し制御回路9で丸めの
ためのステップの挿入を指示した場合は、レジスタ110
の出力をマルチプレクサ103で選択し、マルチプレクサ1
04で定数0を選択し、マルチプレクサ103の出力とマル
チプレクサ104をそのまま出力した補数器105の出力と丸
め値生成回路106で生成した2-23の重みを持つビットを
1にして他のビットを0にしたデータとを加算器107で
加算し、LR1シフタ108で加算器107の出力の21の重
みを持つビットが1の時は右に1ビットシフトを行なっ
て、21の重みを持つビットが0の時はそのままの値を
レジスタ110に格納して処理を終了する。On the other hand, when the rounding correction repeat control circuit 9 instructs to insert a step for rounding, the register 110
Select the output of the multiplexer 103 with multiplexer 1
A constant 0 is selected in 04, the output of the multiplexer 103, the output of the complementer 105 which is output from the multiplexer 104 as it is, and the bit having a weight of 2 -23 generated by the rounding value generation circuit 106 are set to 1 and the other bits are set to 0. and adder 107 and the data was, by performing 1-bit shift to the right when the bit is 1 with 2 1 of the weights of the output of the adder 107 in LR1 shifter 108, the bit having the weight of 2 1 When is 0, the same value is stored in the register 110 and the process is terminated.
【0071】2−2被加減数および加減数が倍精度で和
または差を倍精度で丸める時 (1)処理ステップ開始前 2つの浮動小数点データの指数と符号および命令が加算
であるか減算であるかに基づいて、仮数加算か仮数減算
かの演算の種類と演算結果の符号とを図26の符号演算関
係図に示すように決定する。正方向丸めモードで演算結
果の符号が負の時または負方向丸めモードで演算結果の
符号が正の時は、後述の零方向丸めモードの動作に従
い、正方向丸めモードで演算結果の符号が正の時または
負方向丸めモードで演算結果の符号が負の時は、以下の
ように動作する。被加減数および加減数のうち指数が小
さくない方の仮数をレジスタ101に、被加減数および加
減数のうち指数が小さい方の仮数を小さくない方の指数
に桁合わせしたものをレジスタ102に格納する。桁合わ
せ時の桁落ちしたビットは、最下位ビット(L)の1桁下
のビットで2-53の重みを持つ丸めビット(R)と、2-54
の重みを持つビット以下のビットの論理和であるスティ
ッキビット(S)として併せてレジスタ102に格納する。 (2)ステップ1 ・仮数加算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、2-53の重みを持つビットを1にして
他のビットを0にしたデータを生成する。補数器105は
マルチプレクサ104出力をそのまま加算器107の入力と
し、このときCinを0にすることによって(レジスタ
1)+(レジスタ2)+(丸め加算値)を実行する。L
R1シフタ108で加算器107の出力の21の重みを持つビ
ットが1の時は右に1ビットシフトを行なう。一方、丸
め補正繰返し制御回路109では、加算器107の出力の2
-54の重みを持つビット以下の各ビットの論理和をとっ
た1ビット(S)を生成し、加算器107の出力の21と2-51
と2-52と2-53の重みを持つビットとSビットによっ
て、図8で示す補正信号が00の時はLR1シフタ108の
出力の2-52の重みを持つビットを反転してレジスタ110
に格納し、補正信号が01の時はLR1シフタ108の出力
の2-51と2-52の重みを持つビットを反転してレジスタ
110に格納し、補正信号が01の時はLR1シフタ108の出
力をそのままレジスタ110に格納する。丸め補正繰返し
制御回路109の再丸め信号が1の時は丸め値の再加算を
実行する新しいステップの挿入を指示するが、再丸め信
号が0の時はこのステップによって、丸め精度に対応し
た丸めを行なった演算が終了する。 ・指数差0、1以外の仮数減算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、2-54の重みを持つビットを1にして
他のビットを0にしたデータを生成する。補数器105は
マルチプレクサ104の出力を反転して加算器107の入力と
しこのとき、Cinを1にすることによって(レジスタ
1)−(レジスタ2)+(丸め加算値)を実行する。L
R1シフタ108で加算器107の出力の20の重みをもつビ
ットが0の時は左に1ビットシフトを行なう。一方、丸
め補正繰返し制御回路109では、加算器107の出力の2
-55の重みを持つビット以下の各ビットの論理和をとっ
た1ビット(S)を生成し、加算器107の出力の20と2-52
と2-53と2-54の重みを持つビットとSビットによっ
て、図10で示す補正信号が01の時はLR1シフタ108の
出力の2-52の重みをもつビットを反転してレジスタ110
に格納し、補正信号が01の時はLR1シフタ108の出力
の2-51と2-52の重みを持つビットを反転してレジスタ
110に格納し、補正信号が00の時はLR1シフタ108の出
力をそのままレジスタ110に格納する。丸め補正繰返し
制御回路109の再丸め信号が1の時は丸め値の再加算を
実行する新しいステップの挿入を指示するが、再丸め信
号が0の時はこのステップによって、丸め精度に対応し
た丸めを行った演算が終了する。 ・指数差0、1の仮数減算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、全ビットを0にしたデータを生成す
る。補数器105はマルチプレクサ104の出力を反転して加
算器107の入力としこのとき、Cinを1にすることによっ
て(レジスタ1)−(レジスタ2)を実行する。LR1
シフタ108で加算器107の出力の20の重みを持つビット
が0の時は左に1ビットシフトを行なう。丸め補正繰返
し制御回路109で、加算器107の出力の20 と2 -53 の重み
を持つ2ビットがいずれも1の時は丸めのためのステッ
プの挿入を指示する。一方、シフト数生成回路111で、
LR1シフタ108の出力を正規化するために必要なシフ
ト数を生成し、このシフト数が0でない場合に正規化の
ためのステップの挿入を指示する。丸めのためのステッ
プの挿入と正規化のためのステップの挿入がどちらも発
生しない時はこのステップで演算を終了する。 (3)挿入ステップ(ステップの挿入が指示される時の
み) ・仮数加算時 レジスタ110の出力をマルチプレクサ103で選択し、マル
チプレクサ104で定数0を選択し、マルチプレクサ103の
出力とマルチプレクサ104をそのまま出力した補数器105
の出力とステップ1の丸め値生成回路106で生成した2
-53の重みを持つビットを1にして他のビットを0にし
たデータとを加算器107で加算し、LR1シフタ108で加
算器107の出力の21の重みを持つビットが1の時は右に
1ビットシフトを行なって、21の重みを持つビットが
0の時はそのままの値をレジスタ110に格納して処理を
終了する。 ・指数差0、1以外の仮数減算時 レジスタ110の出力をマルチプレクサ103で選択し、マル
チプレクサ104で定数0を選択し、マルチプレクサ103の
出力とマルチプレクサ104をそのまま出力した補数器105
の出力とステップ1の丸め値生成回路106で生成した2
-54の重みを持つビットを1にして他のビットを0にし
たデータとを加算器107で加算し、LR1シフタ108で加
算器107の出力の21の重みを持つビットが1の時は右に
1ビットシフトを行なって、21の重みを持つビットが
0の時はそのままの値をレジスタ110に格納して処理を
終了する。 ・指数差0、1の仮数減算時 シフト数生成回路111で正規化のためのステップの挿入
を指示した場合は、バレルシフタ112がレジスタ110を入
力とし、シフト数生成回路111で生成したシフト数だけ
左にシフトを行なってレジスタ113に格納して処理を終
了する。2-2 When the sum and difference of the augend and subtraction and the addend are rounded to double precision (1) Before the start of the processing step Based on whether or not there is a mantissa addition or a mantissa subtraction, the type of operation and the sign of the operation result are determined as shown in the sign operation relation diagram of FIG. When the sign of the operation result is negative in the positive direction rounding mode or when the sign of the operation result is positive in the negative direction rounding mode, the sign of the operation result is positive in the positive direction rounding mode according to the operation of zero direction rounding mode described later. Or when the sign of the operation result is negative in the negative direction rounding mode, the operation is as follows. The mantissa whose exponent is the smaller of the augend and the addend is stored in register 101, and the mantissa of the augend that is smaller is stored in the register 102. To do. The digit that was lost during digit alignment is the bit one digit below the least significant bit (L) and the rounding bit (R) with a weight of 2 -53 and 2 -54
It is also stored in the register 102 as a sticky bit (S) which is the logical sum of bits less than or equal to the weighted bit. (2) Step 1-When adding mantissa: The multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounding value generation circuit 106 generates data in which a bit having a weight of 2 −53 is set to 1 and other bits are set to 0. The complementer 105 uses the output of the multiplexer 104 as it is as an input of the adder 107, and at this time, Cin is set to 0 to execute (register 1) + (register 2) + (rounded addition value). L
When the bit of the output of the adder 107 having the weight of 2 1 is 1, the R1 shifter 108 shifts to the right by 1 bit. On the other hand, in the rounding correction iterative control circuit 109, the output of the adder 107
-One bit (S) is generated by ORing the bits below the bit having the weight of -54 , and the output of adder 107 is 2 1 and 2 -51
When the correction signal shown in FIG. 8 is 00, the bit having the weight of 2 -52 of the output of the LR1 shifter 108 is inverted by the bit having the weight of 2 -52 and 2 -53 and the S bit, and the register 110
When the correction signal is 01, the bit with the weight of 2 −51 and 2 −52 of the output of the LR1 shifter 108 is inverted and registered.
When the correction signal is 01, the output of the LR1 shifter 108 is stored in the register 110 as it is. When the re-rounding signal of the rounding correction iterative control circuit 109 is 1, an instruction to insert a new step for executing re-addition of the rounding value is made. When the re-rounding signal is 0, this step causes rounding corresponding to rounding accuracy The calculation that has performed is completed. Mantissa subtraction other than the exponent difference 0 or 1, the multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounding value generation circuit 106 generates data in which a bit having a weight of 2 −54 is set to 1 and other bits are set to 0. The complementer 105 inverts the output of the multiplexer 104 and uses it as the input of the adder 107. At this time, by setting Cin to 1, (register 1)-(register 2) + (rounded addition value) is executed. L
R1 when the bit having the weight of 2 0 of the output of the adder 107 by the shifter 108 is 0 performs a 1-bit shift to the left. On the other hand, in the rounding correction iterative control circuit 109, the output of the adder 107
Generate a 1-bit (S) that is the logical sum of bits less than or equal to the bit having the weight of -55 , and output 2 0 and 2 -52 of the adder 107.
When the correction signal shown in FIG. 10 is 01, the bit having the weight of 2 -52 of the output of the LR1 shifter 108 is inverted by the bit having the weight of 2 -53 and 2 -54 and the S bit to register 110
When the correction signal is 01, the bit with the weight of 2 −51 and 2 −52 of the output of the LR1 shifter 108 is inverted and registered.
When the correction signal is 00, the output of the LR1 shifter 108 is stored in the register 110 as it is. When the re-rounding signal of the rounding correction iterative control circuit 109 is 1, an instruction to insert a new step for executing re-addition of the rounding value is made. When the re-rounding signal is 0, this step causes rounding corresponding to rounding accuracy The calculation that has been performed ends. When mantissa subtraction with exponent difference 0 or 1, the multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounded value generation circuit 106 generates data with all bits set to 0. The complementer 105 inverts the output of the multiplexer 104 and uses it as the input of the adder 107. At this time, by setting Cin to 1, (register 1)-(register 2) is executed. LR1
When bits having the weight of 2 0 of the output of the adder 107 by the shifter 108 is 0 performs a 1-bit shift to the left. Rounding correction repetitive control circuit 109, and instructs the insertion of the step for rounding when two bits are both 1 having a weight of 2 0 and 2 -53 of the output of the adder 107. On the other hand, in the shift number generation circuit 111,
The shift number required to normalize the output of the LR1 shifter 108 is generated, and if this shift number is not 0, the insertion of a step for normalization is instructed. When neither the insertion of a rounding step nor the insertion of a normalization step occurs, the operation ends at this step. (3) Insertion step (only when insertion of a step is instructed) -When adding mantissa Select the output of the register 110 with the multiplexer 103, select the constant 0 with the multiplexer 104, and output the output of the multiplexer 103 and the multiplexer 104 as they are. Complementer 105
Output and 2 generated by the rounding value generation circuit 106 in step 1
When the bit having the weight of -53 is set to 1 and the other bit is set to 0, the data is added by the adder 107, and when the bit having the weight of 2 1 of the output of the adder 107 is 1 by the LR1 shifter 108, When the bit having the weight of 2 1 is 0, the value is stored in the register 110 as it is and the processing is completed. When the mantissa is subtracted except for the exponent difference 0 or 1, the output of the register 110 is selected by the multiplexer 103, the constant 0 is selected by the multiplexer 104, and the output of the multiplexer 103 and the complementer 105 that outputs the multiplexer 104 as they are.
Output and 2 generated by the rounding value generation circuit 106 in step 1
When the bit having the weight of -54 is set to 1 and the other bit is set to 0, the data is added by the adder 107, and when the bit having the weight of 2 1 of the output of the adder 107 is 1 by the LR1 shifter 108, When the bit having the weight of 2 1 is 0, the value is stored in the register 110 as it is and the processing is completed. -When mantissa subtraction with exponent difference 0 or 1 When the shift number generation circuit 111 instructs the insertion of a step for normalization, the barrel shifter 112 receives the register 110 as input, and only the shift number generated by the shift number generation circuit 111 is input. The process shifts to the left, stores it in the register 113, and ends the process.
【0072】一方、丸め補正繰返し制御回路9で丸めの
ためのステップの挿入を指示した場合は、レジスタ110
の出力をマルチプレクサ103で選択し、マルチプレクサ1
04で定数0を選択し、マルチプレクサ103の出力とマルチ
プレクサ104をそのまま出力した補数器105の出力と丸め
値生成回路106で生成した2-52の重みを持つビットを1
にして他のビットを0にしたデータとを加算器107で加
算し、LR1シフタ108で加算器107の出力の21の重み
を持つビットが1の時は右に1ビットシフトを行なっ
て、21の重みを持つビットが0の時はそのままの値を
レジスタ110に格納して処理を終了する。 3 零方向丸めモード (被加減数および加減数が単精度で和または差を単精度
で丸める時と被加減数および加減数が倍精度で和または
差を倍精度で丸める時で以下の処理は共通) (1)処理ステップ開始前 2つの浮動小数点データの指数と符号および命令が加算
であるか減算であるかに基づいて、仮数加算か仮数減算
かの演算の種類と演算結果の符号とを図26の符号演算関
係図に示すように決定する。被加減数および加減数のう
ち指数が小さくない方の仮数をレジスタ101に、被加減
数および加減数のうち指数が小さい方の仮数を小さくな
い方の指数に桁合わせしたものをレジスタ102に格納す
る。 (2)ステップ1 ・仮数加算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、全ビットを0にしたデータを生成す
る。補数器105はマルチプレクサ104出力をそのまま加算
器107の入力とし、このときCinを0にすることによっ
て、(レジスタ1)+(レジスタ2)を実行する。LR
1シフタ108で加算器107の出力の21の重みを持つビッ
トが1の時は右に1ビットシフトを行ない演算を終了す
る。 ・指数差0、1以外の仮数減算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、全ビットを0にしたデータを生成す
る。補数器105はマルチプレクサ104の出力を反転して加
算器107の入力としこのとき、Cinを1にすることによっ
て(レジスタ1)−(レジスタ2)を実行する。LR1
シフタ108で加算器107の出力の20の重みをもつビット
が0の時は左に1ビットシフトを行ない演算を終了す
る。 ・指数差0、1の仮数減算時 マルチプレクサ103でレジスタ101の出力を選択し、マル
チプレクサ104でレジスタ102の出力を選択する。丸め値
生成回路106では、全ビットを0にしたデータを生成す
る。補数器105はマルチプレクサ104の出力を反転して加
算器107の入力としこのとき、Cinを1にすることによっ
て(レジスタ1)−(レジスタ2)を実行する。LR1
シフタ108で加算器107の出力の20の重みを持つビット
が0の時は左に1ビットシフトを行なう。シフト数生成
回路111で、LR1シフタ108の出力を正規化するために
必要なシフト数を生成し、このシフト数が0でない場合
に正規化のためのステップの挿入を指示する。正規化の
ためのステップの挿入が発生しない時はこのステップで
演算を終了する。 (3)挿入ステップ(ステップの挿入が指示される時の
み) ・指数差0、1の仮数減算時のみ バレルシフタ112がレジスタ110を入力とし、シフト数生
成回路111で生成したシフト数だけ左にシフトを行なっ
てレジスタ113に格納して処理を終了する。On the other hand, when the rounding correction repetition control circuit 9 instructs the insertion of a step for rounding, the register 110
Select the output of the multiplexer 103 with multiplexer 1
The constant 0 is selected in 04, and the output of the multiplexer 103, the output of the complementer 105 that is output from the multiplexer 104 as it is, and the bit with a weight of 2 -52 generated by the rounding value generation circuit 106 are set to 1
Then, the data having the other bits set to 0 are added by the adder 107, and when the bit having the weight of 2 1 of the output of the adder 107 is 1, the LR1 shifter 108 shifts to the right by 1 bit, When the bit having the weight of 2 1 is 0, the same value is stored in the register 110 and the process is terminated. 3 Zero direction rounding mode (When the addend / subtract and addend / subtract are single precision and the sum or difference is rounded in single precision, and when the addend / subtract and addend / subtract are double precision and the sum or difference is double precision round Common) (1) Before the start of the processing step Based on the exponent and sign of the two floating point data and whether the instruction is addition or subtraction, the type of operation for mantissa addition or mantissa subtraction and the sign of the operation result are set. It is determined as shown in the sign operation relation diagram of FIG. The mantissa whose exponent is the smaller of the augend and the addend is stored in register 101, and the mantissa of the augend that is smaller is stored in the register 102. To do. (2) Step 1-When adding mantissa: The multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounded value generation circuit 106 generates data with all bits set to 0. The complementer 105 uses the output of the multiplexer 104 as it is as an input of the adder 107, and at this time, Cin is set to 0 to execute (register 1) + (register 2). LR
When the bit having a weight of 2 1 in the output of the adder 107 is 1 in the 1-shifter 108, 1-bit shift is performed to the right and the operation is completed. Mantissa subtraction other than the exponent difference 0 or 1, the multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounded value generation circuit 106 generates data with all bits set to 0. The complementer 105 inverts the output of the multiplexer 104 and uses it as the input of the adder 107. At this time, by setting Cin to 1, (register 1)-(register 2) is executed. LR1
When bit having the weight of 2 0 of the output of the adder 107 by the shifter 108 is 0 and ends the operation performed one bit shift to the left. When mantissa subtraction with exponent difference 0 or 1, the multiplexer 103 selects the output of the register 101, and the multiplexer 104 selects the output of the register 102. The rounded value generation circuit 106 generates data with all bits set to 0. The complementer 105 inverts the output of the multiplexer 104 and uses it as the input of the adder 107. At this time, by setting Cin to 1, (register 1)-(register 2) is executed. LR1
When bits having the weight of 2 0 of the output of the adder 107 by the shifter 108 is 0 performs a 1-bit shift to the left. The shift number generation circuit 111 generates the shift number necessary for normalizing the output of the LR1 shifter 108, and when this shift number is not 0, the insertion of a step for normalization is instructed. When the insertion of the step for normalization does not occur, the calculation ends at this step. (3) Insertion Step (when inserting steps are indicated only) and mantissa subtraction only when the barrel shifter 112 in exponent difference 0, 1 and inputs the register 110, shifts to left by the shift number generated by the shift number generating circuit 111 Is stored in the register 113 and the process is terminated.
【0073】以上のように本実施例によれば、仮数加算
時または指数差0、1以外の仮数減算時は、2つの浮動
小数点データの仮数と丸め加算値の三者の和もしくは前
二者の差と後者との和を加算器107で同時に行ない、そ
の結果をLRシフタ108で正規化することによりほとん
どの場合、処理を終了することができる。さらに丸め補
正繰返し制御回路109の指示によりLRシフタ108の出力
の補正が必要な場合でも処理ステップ数を増加させるこ
となく終了することができ、加算器107での丸め加算値
の加算を再度必要とする時だけ処理を1ステップだけ挿
入することで終了できる。1ステップの挿入が必要な確
率は最近偶丸めモードの時は32分の2、正方向丸めモー
ドまたは負方向丸めモードの時は32分3、零方向丸めモ
ードの時は0と極めて小さい(仮数のビットパタンが均
一に分布すると仮定した場合)。その結果、ほとんどの
場合(最近偶丸めモードの時は32分の30、正方向丸めモ
ードまたは負方向丸めモードの時は32分の29、零方向丸
めモードの時は1)、加減算に必要な処理ステップ数は
2と小さくなる。これらの処理フローを図23(b)に示
す。また、単一の加算器107で仮数の加減算と丸め加算
値の加算とを実行しているため、必要なハードウェアが
従来の浮動小数点データの加減算装置に比べて少ない。As described above, according to the present embodiment, at the time of adding a mantissa or subtracting a mantissa other than the exponent difference 0 or 1, the sum of the mantissas of two floating point data and the rounded addition value or the former two. In most cases, the processing can be ended by simultaneously performing the sum of the difference between the above and the latter by the adder 107 and normalizing the result by the LR shifter 108. Further, even if the output of the LR shifter 108 needs to be corrected by the instruction of the rounding correction iterative control circuit 109, the processing can be ended without increasing the number of processing steps, and the addition of the rounding addition value in the adder 107 is required again. Only when you do this, you can finish by inserting one step. The probability that one step needs to be inserted is 2/32 in the recent even rounding mode, 32/3 in the positive rounding mode or the negative rounding mode, and 0 in the zero rounding mode (mantissa). (Assuming that the bit pattern is evenly distributed). As a result, in most cases (30/32 in recent even rounding mode, 29/32 in positive rounding or negative rounding mode, 1 in zero rounding mode), it is necessary for addition and subtraction. number of processing steps is as small as 2. The these processing flow shown in FIG. 23 (b). Further, since the single adder 107 performs addition and subtraction of the mantissa and addition of the rounded addition value, the required hardware is less than that of the conventional floating point data addition and subtraction apparatus.
【0074】なお、本実施例は丸めモードが正方向丸め
モードまたは負方向丸めモードの時に、単精度丸めで仮
数加算、単精度丸めで指数差0または1の仮数減算、倍
精度丸めで仮数加算、倍精度丸めで指数差0または1の
仮数減算のそれぞれの場合に応じて、丸め値生成回路10
6で、2-24、2-25、2-53、2-54の重みを持つビット
を1にして他のビットを0にしたデータを生成し、丸め
補正繰返し制御回路109により図7、図8、図9、図10
の制御関係図に示す補正信号が01の時はLR1シフタ10
8の出力の2-23、2-23、2-52、2-52の重みを持つビ
ットを、補正信号が10の時は2-22と2-23、2-22と2
-23、2-51と2-52、2-51と2-52の重みを持つビット
を反転してレジスタ110に格納し、丸め補正繰返し制御
回路109の再丸め信号が1の時は丸め値生成回路106の生
成する丸め加算値を再び加算する新しいステップの挿入
を指示しているが、丸め値生成回路106で2-23、
2-24、2- 52、2-51の重みを持つビットを1にして他
のビットを0にしたデータを生成し、丸め補正繰返し制
御回路109により図11、図12、図13、図14の制御関係図
に示す補正信号が01の時はLR1シフタ108の出力の2
-23、2-23、2-52、2-52の重みを持つビットを、補正
信号が10の時は2-22と2-23、2-22と2-23-、2-51と
2-52の重みを持つビットを反転してレジスタ110に格納
し、丸め補正繰返し制御回路109の再丸め信号が1で補
正信号が00の時は丸め値生成回路106の生成する丸め加
算値を再び加算する新しいステップの挿入を、再丸め信
号が1で補正信号が11の時は丸め値生成回路106の生成
する丸め加算値をレジスタ110に保持する値から減算す
る新しいステップの挿入を指示するようにしてもよい。
こうすることによって1ステップの挿入が必要な確率が
32分の2と低減され、その結果、演算速度が向上する。In this embodiment, when the rounding mode is the positive direction rounding mode or the negative direction rounding mode, the mantissa addition is performed by the single precision rounding, the mantissa subtraction of the exponent difference 0 or 1 is performed by the single precision rounding, and the mantissa addition is performed by the double precision rounding. , Rounding value generation circuit 10 depending on the case of mantissa subtraction with double precision rounding and exponent difference 0 or 1
6, the data having the weights of 2 -24 , 2 -25 , 2 -53 , and 2 -54 is set to 1 and the other bits are set to 0, and the rounding correction iterative control circuit 109 generates the data shown in FIG. 8, Figure 9, Figure 10
When the correction signal shown in the control relation diagram of is LR1 shifter 10
Bits with weights of 2 -23 , 2 -23 , 2 -52 , 2 -52 of 8 outputs are 2 -22 and 2 -23 , 2 -22 and 2 when the correction signal is 10.
-23 , bits with weights of 2 -51 and 2 -52 , 2 -51 and 2 -52 are inverted and stored in the register 110, and when the re-rounding signal of the rounding correction repeat control circuit 109 is 1, the rounding value Although it is instructed to insert a new step of adding the rounded addition value generated by the generation circuit 106 again, the rounding value generation circuit 106 causes 2 -23 ,
2 -24, 2 - 52, 2 -51 of the other bits by bit to 1 with a weight to generate the data to 0, the rounding correction repetitive control circuit 109 by 11, 12, 13, 14 When the correction signal is 01 in the control relation diagram of, the output of the LR1 shifter 108 is 2
Bits with weights of -23 , 2 -23 , 2 -52 , 2 -52 , and 2 -22 and 2 -23 , 2 -22 and 2 -23- , 2 -51 and 2 when the correction signal is 10 The bit having the weight of -52 is inverted and stored in the register 110, and when the re-rounding signal of the rounding correction repeating control circuit 109 is 1 and the correction signal is 00, the rounding addition value generated by the rounding value generation circuit 106 is again restored. When the re-rounding signal is 1 and the correction signal is 11, the addition of a new step is instructed to insert a new step of subtracting the rounding addition value generated by the rounding value generation circuit 106 from the value held in the register 110. You may
By doing this, the probability that one step insertion
It is reduced to 2/32, and as a result, the calculation speed is improved.
【0075】また、本実施例は丸めモードが正方向丸め
モードまたは負方向丸めモードの時に、単精度丸めで仮
数加算、単精度丸めで指数差0または1の仮数減算、倍
精度丸めで仮数加算、倍精度丸めで指数差0または1の
仮数減算のそれぞれの場合に応じて、丸め値生成回路10
6で2-24、2-25、2-53、2-54の重みを持つビットを
1にして他のビットを0にしたデータを生成し、丸め補
正繰返し制御回路109により図7、図8、図9、図10の
制御関係図に示す補正信号および再丸め信号によってビ
ットの補正または丸め加算値の再加算のステップの挿入
を指示しているが、丸め値生成回路106で2-24とそれ以
下の全て、2-25とそれ以下の全て、2- 53とそれ以下の
全て、2-54とそれ以下の全ての重みを持つビットを1
にして他のビットを0にしたデータを生成し、丸め補正
繰返し制御回路109により図15、図16、図17、図18の制
御関係図に示す補正信号および再丸め信号によってビッ
トの補正または丸め加算値の再加算のステップの挿入を
指示するようにしてもよい。こうすることによっても1
ステップの挿入が必要な確率が32分の2と低減され、そ
の結果、演算速度が向上する。これは、丸めモードが正
方向丸めモードまたは負方向丸めモードでは、丸めビッ
ト(R)、スティッキビット(S)のどちらかが1の時に、最
下位ビット(L)へ丸めのための1の加算が必要となるこ
とに注目して、丸めビットとそれ以下の全てのビットの
ビット位置を1にしたデータを加算することによって生
じた桁上げを利用して、最下位ビットへの丸め加算を行
なうことができることを利用している。丸めビットとス
ティッキビットがともに0で丸め加算を発生しない場合
を図28(c)に、それ以外で丸めのための1の加算を発生
する場合を図28(d)、(e)、(f)に示す。Further, in this embodiment, when the rounding mode is the positive direction rounding mode or the negative direction rounding mode, the mantissa addition is performed by the single precision rounding, the mantissa subtraction of the exponent difference 0 or 1 is performed by the single precision rounding, and the mantissa addition is performed by the double precision rounding. , Rounding value generation circuit 10 depending on the case of mantissa subtraction with double precision rounding and exponent difference 0 or 1
6 generates data in which bits having weights of 2 −24 , 2 −25 , 2 −53 , and 2 −54 are set to 1 and other bits are set to 0, and the rounding correction iterative control circuit 109 generates the data shown in FIGS. 9, although the direct insertion step of re-adding the correction or rounding addition value of a bit by the correction signal and the re-rounding signal indicating the control relationship diagram of FIG. 10, and 2 -24 rounding value generating circuit 106 all less, all 2 -25 and less, 2 - 53 and less all the bit with all the weight of the 2 -54 lower 1
To generate data in which other bits are set to 0, and the rounding correction repeating control circuit 109 corrects or rounds the bits by the correction signal and the re-rounding signal shown in the control relation diagrams of FIGS. 15, 16, 17, and 18. The insertion of the step of re-adding the added value may be instructed. By doing this
The probability that a step needs to be inserted is reduced to 2/32, and as a result, the operation speed is improved. This is the addition of 1 for rounding to the least significant bit (L) when either rounding bit (R) or sticky bit (S) is 1 when the rounding mode is positive rounding mode or negative rounding mode. Rounding addition to the least significant bit using the carry generated by adding the rounded bit and the data in which the bit positions of all bits below it are set to 1. Take advantage of what you can do. FIG. 28 (c) shows the case where the rounding bit and the sticky bit are both 0 and no rounding addition occurs, and FIGS. 28 (d), (e), (f) shows the case where the addition of 1 for rounding occurs otherwise. ).
【0076】なお、本実施例では被加減数および加減数
の精度と丸め精度とがともに単精度または倍精度を例に
挙げたが、被加減数および加減数の精度と丸め精度とが
異なる場合でも、丸め値生成回路106で生成する丸め加
算値を丸め精度に対応した丸めビットとし、加算器107
の入力ビット数を扱うデータの最大ビット数に合わせる
ことによって、被加減数および加減数の精度に依存する
ことなく丸め精度に応じた丸めが実現できる。In the present embodiment, the precision of the augend / subtract and the addend / subtract and the rounding precision are both single precision or double precision. However, the rounding addition value generated by the rounding value generation circuit 106 is set as a rounding bit corresponding to the rounding precision, and the adder 107
By adjusting the number of input bits of (1) to the maximum number of bits of data to be handled, rounding according to the rounding precision can be realized without depending on the precision of the augendable number and the addend / subtract number.
【0077】なお、本実施例では、単精度丸めで仮数加
算、単精度丸めで指数差0または1の仮数減算、倍精度
丸めで仮数加算、倍精度丸めで指数差0または1の仮数
減算のそれぞれの場合に応じて、丸め補正繰返し制御回
路109が加算器107の出力の2 1と2-22と2-23と2-24、
20と2-23と2-24と2-25、21と2-51と2-52と
2- 53、20と2-52と2-53と2-54の重みを持つビット
とSビットとを検査して2-22および2-23、2-22および
2-23、2-51および2-52、2-51および2-52の重みを
持つビットの補正を指示しているが、検査するビットと
補正するビットとを最上位ビット方向に増加させてもよ
い。検査するビットと補正するビットの1ビットの増加
ごとに1ステップの挿入が必要な確率が半減され、その
結果、演算速度が向上する。In this embodiment, the mantissa addition is performed by single precision rounding.
Arithmetic, single precision rounding, exponent difference 0 or 1 mantissa subtraction, double precision
Rounding adds mantissa, double precision rounding adds mantissa with exponent difference 0 or 1.
Rounding correction repeat control
Path 109 is 2 of the output of adder 107 1And 2-twenty twoAnd 2-twenty threeAnd 2-twenty four,
20And 2-twenty threeAnd 2-twenty fourAnd 2-twenty fiveTwo1And 2-51And 2-52When
2- 53Two0And 2-52And 2-53And 2-54Bits with weight
And S bit are checked 2-twenty twoAnd 2-twenty threeTwo-twenty twoand
2-twenty threeTwo-51And 2-52Two-51And 2-52The weight of
I am instructing the correction of the bit I have, but with the bit to be inspected
The number of bits to be corrected may be increased toward the most significant bit.
Yes. 1 bit increase of inspection bit and correction bit
The probability of requiring one step insertion for each is halved,
As a result, the calculation speed is improved.
【0078】図2は本発明の第2の実施例における浮動
小数点データの加減算装置のブロック図を示すものであ
る。図2において、図1と同一の構成要素については同
一の番号を付している。同図において、114は単精度で
は2-24の重みを持つビットをキャリ入力(Cin)として、
倍精度では2-53の重みを持つビットをキャリ入力(Cin)
とする2入力の加算器、115は加算器114のキャリ入力(C
in)を決定するキャリ制御装置である。図19、図20、図2
1、図22はキャリ制御装置115の制御関係図で、仮数加算
を実行しかつ丸め精度が単精度の時は図19に、仮数加算
を実行しかつ丸め精度が倍精度の時は図20に、仮数減算
を実行しかつ丸め精度が単精度の時は図21に、仮数減算
を実行しかつ丸め精度が倍精度の時は図22に示すキャリ
入力(Cin)を加算器114に与える。FIG. 2 is a block diagram of a floating point data addition / subtraction device according to the second embodiment of the present invention. 2, the same elements as those in FIG. 1 are designated by the same reference numerals. In the figure, 114 is a carry input (Cin) with a bit having a weight of 2-24 in single precision,
In double precision, carry in a bit with a weight of 2 -53 (Cin)
Is a 2-input adder, and 115 is a carry input (C
This is a carry control device that determines (in). Figure 19, Figure 20, Figure 2
1 and FIG. 22 are control relation diagrams of the carry control device 115. When mantissa addition is performed and the rounding precision is single precision, FIG. 19 is shown. When mantissa addition is performed and the rounding precision is double precision, FIG. 20 is shown. When the mantissa subtraction is performed and the rounding precision is single precision, the carry input (Cin) shown in FIG. 21 is given to the adder 114, and when the mantissa subtraction is performed and the rounding precision is double precision, the carry input (Cin) shown in FIG.
【0079】以上のように構成された本実施例の浮動小
数点データの加減算装置について、以下その動作を説明
する。本実施例は、図1に示す第1の実施例において3
入力の加算器107により2つの浮動小数点データの仮数
の加減算と丸め値生成回路106が生成する丸め加算値の
加算とを行なうかわりに、2入力の加算器114のキャリ
入力(Cin)をキャリ制御装置115で操作して仮数の加減算
と丸め加算値の加算とを行なうものである。以下では仮
数の加減算と丸め加算値の加算の動作のみを説明する
が、その他の動作については第1の実施例と同一であ
る。 ・仮数加算時 最近偶丸めモードの時または正方向丸めモードで演算結
果の符号が正の時または負方向丸めモードで演算結果の
符号が負の時は、丸め精度が単精度か倍精度かに応じ
て、2-24、2-53を丸め加算値として加算するために、
図19、図20のRN,RP(+),RM(-)の欄に示すようにキャリ入
力(Cin)を入力データとは無関係に1にする。The operation of the floating-point data adding / subtracting device of this embodiment having the above-described structure will be described below. This embodiment is the same as the first embodiment shown in FIG.
Instead of performing addition and subtraction of the mantissas of the two floating point data by the input adder 107 and addition of the rounded addition value generated by the rounding value generation circuit 106, carry control of the carry input (Cin) of the two-input adder 114 is carried out. The device 115 is operated to add and subtract mantissas and add rounded addition values. Only the operations of adding / subtracting the mantissa and adding the rounded addition value will be described below, but the other operations are the same as in the first embodiment.・ When adding mantissa If the sign of the operation result is positive in the recent even rounding mode or the positive direction rounding mode, or if the sign of the operation result is negative in the negative direction rounding mode, the rounding precision is single precision or double precision. Accordingly, in order to add 2 -24 , 2 -53 as a rounded addition value,
As shown in the columns of RN, RP (+) and RM (-) in FIGS. 19 and 20, the carry input (Cin) is set to 1 regardless of the input data.
【0080】正方向丸めモードで演算結果の符号が負の
時または負方向丸めモードで演算結果の符号が正の時ま
たは零方向丸めモードの時は、丸め加算値を加算する必
要がないために、図19、図20のRP(-),RM(+),RZの欄に示
すようにキャリ(Cin)を入力データとは無関係に0にす
る。 ・指数差0、1以外の仮数減算時 最近偶丸めモードの時または正方向丸めモードで演算結
果の符号が正の時または負方向丸めモードで演算結果の
符号が負の時は、丸め精度が単精度か倍精度かに応じ
て、2-25、2-54を丸め加算値として加算し、スティッ
キビット(S)の位置に2の補数化のための1を加算する
必要がある。これらの加算は加算されるデータ(桁合わ
せされて1の補数をとられたもの)の2-25桁およびス
ティッキビット(S)、2-54の桁およびスティッキビット
(S)の少なくとも一方が1の時は2- 24、2-53へのキャ
リ入力(Cin)を1にし、加算されるデータの2-25の桁お
よびスティッキビット(S)、2-54の桁およびスティッキ
ビット(S)の両方が0の時は2-24、2-53へのキャリ入
力(Cin)を0とすることで実現できる。従って、図21、
図22のRN,RP(+),RM(-)の欄に示すような入力データに依
存したキャリ入力(Cin)を生成する。When the sign of the operation result is negative in the positive direction rounding mode, or when the sign of the operation result is positive in the negative direction rounding mode or in the zero direction rounding mode, it is not necessary to add the rounding addition value. , Carry (Cin) is set to 0 irrespective of the input data as shown in the columns of RP (-), RM (+), RZ in FIGS. -When mantissa is subtracted except for exponent difference 0 or 1, rounding precision is improved when the result is positive in the even rounding mode or in the positive rounding mode, or when the sign is negative in the negative rounding mode. Depending on whether it is single precision or double precision, it is necessary to add 2 -25 and 2 -54 as rounded addition values and add 1 to the position of the sticky bit (S) for 2's complementing. These additions are 2 -25 digits and sticky bit (S) of the data to be added (digit-aligned and 1's complement), 2 -54 digits and sticky bit.
When at least one of the (S) is 1 2 - 24, 2 -53 carry input to the (Cin) to 1, 2 -25 of digits and the sticky bit data to be added (S), 2 -54 When both the digit and the sticky bit (S) are 0, it can be realized by setting the carry input (Cin) to 2 -24 , 2 -53 to 0. Therefore, in FIG.
The carry input (Cin) depending on the input data as shown in the fields of RN, RP (+), RM (-) in FIG. 22 is generated.
【0081】正方向丸めモードで演算結果の符号が負の
時または負方向丸めモードで演算結果の符号が正の時ま
たは零方向丸めモードの時は、丸め精度が単精度か倍精
度かに応じて、スティッキビット(S)の位置に2の補数
化のための1を加算する必要がある。これらの加算は加
算されるデータ(桁合わせされて1の補数をとられたも
の)の2-25の桁およびスティッキビット(S)、2-54の
桁およびスティッキビット(S)の少なくとも一方が0の
時は2-24、2-53へのキャリ入力(Cin)を0にし、加算
されるデータの2-25の桁およびスティッキビット(S)、
2-54の桁およびスティッキビット(S)の両方が1の時は
2-24、2-53へのキャリ入力(Cin)を1とすることで実
現できる。従って、図21、図22のRP(-),RM(+),RZの欄に
示すような入力データに依存したキャリ入力(Cin)を生
成する。 ・指数差0、1の仮数減算時 丸めは仮数の減算とは同時に実行しない。ただし、丸め
精度が単精度か倍精度かに応じて、スティッキビット
(S)の位置に2の補数化のための1を加算する必要があ
る。これらの加算は加算されるデータ(桁合わせされて
1の補数をとられたもの)の2-25の桁およびスティッ
キビット(S)、2-54の桁およびスティッキビット(S)の
少なくとも一方が0の時は2-24、2-53へのキャリ入力
(Cin)を0にし、加算されるデータの2-25の桁およびス
ティッキビット(S)、2-54の桁およびスティッキビット
(S)の両方が1の時は2-24、2-53へのキャリ入力(Cin)
を1とすることで実現できる。従って、図21、図22のRP
(-),RM(+),RZの欄に示すような入力データに依存したキ
ャリ入力(Cin)を生成する。When the sign of the operation result is negative in the positive direction rounding mode, or when the sign of the operation result is positive in the negative direction rounding mode or in the zero direction rounding mode, the rounding precision depends on whether it is single precision or double precision. Therefore, it is necessary to add 1 to the position of the sticky bit (S) for 2's complementing. These additions are performed by adding at least one of 2 -25 digits and sticky bit (S), 2 -54 digits and sticky bit (S) of the data (digit-aligned and 1's complemented). When it is 0, carry input (Cin) to 2 -24 , 2 -53 is set to 0, and the digit of 2 -25 of the data to be added and the sticky bit (S),
When both the digit of 2 -54 and the sticky bit (S) are 1, it can be realized by setting the carry input (Cin) to 2 -24 , 2 -53 to 1. Therefore, the carry input (Cin) depending on the input data as shown in the columns of RP (−), RM (+), RZ in FIGS. 21 and 22 is generated.・ When mantissa subtraction with exponent difference 0 or 1 Rounding is not executed at the same time as mantissa subtraction. However, depending on whether the rounding precision is single precision or double precision, the sticky bit
It is necessary to add 1 to the position of (S) for 2's complementing. These additions are performed by adding at least one of 2 -25 digits and sticky bit (S), 2 -54 digits and sticky bit (S) of the data (digit-aligned and 1's complemented). Carry input to 2 -24 , 2 -53 when 0
Set (Cin) to 0 and add 2-25 digits and sticky bits (S), 2 -54 digits and sticky bits.
When both (S) are 1, carry input to 2 -24 , 2 -53 (Cin)
It can be realized by setting 1 to 1. Therefore, the RP of FIGS.
Generate carry input (Cin) depending on the input data as shown in the columns of (-), RM (+), RZ.
【0082】上記のいずれの場合も、ステップを挿入し
て行なう丸めは、丸め精度が単精度か倍精度かに応じ
て、2-24、2-53を丸め加算値として加算するためにキ
ャリ入力(Cin)を1にして実現する。In any of the above cases, the rounding performed by inserting a step is carried out to add 2 -24 , 2 -53 as a rounding addition value depending on whether the rounding precision is single precision or double precision. Realize by setting (Cin) to 1.
【0083】以上のように本実施例によっても、仮数加
算時または指数差0、1以外の仮数減算時は、2つの浮
動小数点データの仮数と丸め加算値の三者の和もしくは
前二者の差と後者の和を加算器114で同時に行なう結
果、ほとんどの場合(最近偶丸めモードの時は32分の3
0、正方向丸めモードまたは負方向丸めモードの時は32
分の29、零方向丸めモードの時は1)、加減算に必要な
処理ステップ数は2と小さくなる。また、単一の加算器
114で仮数の加減算と丸め加算値の加算とを実行してい
るため、必要なハードウェアが従来の浮動小数点データ
の加減算装置に比べて少なく、加算器114は2入力で構
成されるため第1の実施例よりもさらにハードウェアが
少なくなる。As described above, according to the present embodiment as well, when adding mantissas or subtracting mantissas other than exponent differences 0 and 1, the sum of the mantissas of two floating point data and the rounded addition value or the former two is calculated. As a result of simultaneously performing the difference and the sum of the latter in the adder 114, in most cases (3/32 in the recent even rounding mode)
0, 32 in positive direction rounding mode or negative direction rounding mode
Min 29, when the null direction rounding mode 1), the processing step number necessary for the addition and subtraction are 2 decreases. Also a single adder
Since the addition and subtraction of the mantissa and the addition of the rounded addition value are executed by 114, the required hardware is smaller than that of the conventional floating point data addition and subtraction device, and the adder 114 is configured with two inputs. The hardware is further reduced as compared with the above embodiment.
【0084】図30は本発明の第3の実施例における浮動
小数点データの乗算装置のブロック図を示すものであ
る。図30において、201は被乗数を保持する被乗数レジ
スタで、1ビットの符号部201sと11ビットの指数部201e
と53ビットの仮数部201fからなる。202は乗数を保持す
る乗数レジスタで、1ビットの符号部202sと11ビットの
指数部202eと53ビットの仮数部202fからなる。被乗数レ
ジスタ仮数部201fと乗数レジスタ仮数部202fの最上位ビ
ットはいずれも20の重みを持ついわゆる「隠れビッ
ト」で正規化数の時は1であり、このビットを除いて被
乗数レジスタ201および乗数レジスタ202はともに倍精度
に合致している。203は被乗数レジスタ符号部201sと乗
数レジスタ符号部202sから被乗数および乗数の符号を読
出して積の符号を生成する符号生成回路、204は被乗数
レジスタ指数部201eと乗数レジスタ指数部202eから被乗
数および乗数の指数を読出して積の指数を算出する11ビ
ットの指数加算器で、Cinを1ビットのキャリ入力とし
てA入力とB入力の加算を行う。205、206はそれぞれ指
数加算器204の2つの入力を選択する11ビットのセレク
タ、207は指数加算器204の出力の最上位ビットを反転す
る最上位ビット補正回路、208は指数加算器204における
加算時の最上位ビットからの桁あふれを保持する1ビッ
トのラッチ、209は指数加算器204の出力とラッチ208の
値により指定した演算精度からの積の上位あふれ(オー
バフロー)と下位あふれ(アンダフロー)を検出する例
外検出回路、210は最上位ビット補正回路207によって最
上位ビットが反転された指数加算器204の出力を保持し
てセレクタ205を通して再び指数加算器204に入力するた
めの11ビットのラッチ、211は積の仮数の1ビットシフ
トの正規化に伴って指数を1だけ増分させるための定数
を生成する正規化補正値生成回路、212は被乗数レジス
タ仮数部201fを読出してその上位27ビットもしくは下位
27ビット(この時の最上位ビットは0とする)を選択し
て出力する被乗数上位下位選択回路、213は乗数レジス
タ仮数部202fを読出してその上位27ビットもしくは下位
27ビット(この時の最上位ビットは0とする)を選択し
て出力する乗数上位下位選択回路、214は27ビットの被
乗数上位下位選択回路212の出力と27ビットの乗数上位
下位選択回路213の出力を乗算してそれぞれ54ビットの
和(サム)と桁上げ(キャリ)を出力する乗算器、21
5、216はそれぞれ乗算器214の和出力と桁上げ出力を保
持する54ビットのラッチ、217は積の仮数を単精度また
は倍精度に丸めるために加算を行う時の定数を生成する
丸め加算値生成回路、218はラッチ216の値と丸め加算値
生成回路217の出力とを選択する54ビットのセレクタ、2
19は丸め加算値生成回路217の出力と後述するラッチ225
に保持されている値とを選択する54ビットのセレクタ、
220はラッチ215に保持されている値とセレクタ218の出
力とセレクタ219の出力とを加算する54ビットの仮数加
算器、221は仮数加算器220の出力を最下位ビット方向に
0ビットまたは1ビットまたは26ビットシフトする54ビ
ットのシフタ、222は仮数加算器220の出力の最上位ビッ
トから26ビット目から47からビット目までの22ビットと
シフタ221における26ビットの最下位ビットからのシフ
トあふれとを入力して丸め精度が単精度か倍精度かに応
じてスティッキビットを生成するスティッキビット生成
回路、223は丸め精度が単精度のときはシフタ221の出力
の最上位ビットから24ビット目を丸め精度が倍精度のと
きは53ビット目を必要に応じて反転して出力する仮数補
正回路、224は仮数加算器220の出力の最上位ビットから
23ビット目から25ビット目までと最下位ビットから3ビ
ット目から最下位ビットまでの合計6ビットと仮数加算
器220における加算時の最上位ビットからの桁あふれの
1ビットとスティッキビット生成回路222が出力するス
ティッキビット1ビットとを入力して丸め精度が単精度
か倍精度かに応じて仮数補正回路223で行うビットの反
転と仮数加算器220における丸め加算値の加算とを制御
する仮数補正制御回路、225はシフタ221の出力を保持す
る54ビットのラッチ、226は積を保持する積レジスタ
で、1ビットの符号部226sと11ビットの指数部226eと53
ビットの仮数部226fからなる。積レジスタ仮数部226fの
最上位ビットも20の重みを持ついわゆる「隠れビッ
ト」で正規化数の時は1であり、このビットを除いて積
レジスタ226は倍精度に合致している。図31は図30に示
す被乗数上位下位選択回路212および乗数上位下位選択
回路213の内部ブロック図で、227は53ビットの入力の上
位27ビットまたは下位26ビットに最上位に0を拡張して
27ビットとしたものを選択するセレクタである。図32は
図30に示す丸め加算値生成回路217が生成する定数を示
す動作説明図で、最上位ビットから25ビット目だけが1
で他が0の丸め加算値Aと最上位ビットから2ビット目
だけが1で他が0の丸め加算値Bと最下位ビットだけが
1で他が0の丸め加算値Cを生成する。図33、図34は図
30に示す仮数補正制御回路224の制御関係図で、丸め精
度が単精度のときは図33に示すように、仮数加算器220
の出力の最上位ビットから23ビット目から25ビット目(Z
22,Z23,Z24)とスティッキビット生成回路222が出力する
スティッキビット(S)と仮数加算器220における桁あふれ
(Cout)とから仮数のビット反転の要否と丸め加算値の再
加算の要否とを決定する。また丸め精度が倍精度のとき
は図34に示すように、仮数加算器220の出力の最下位ビ
ットから3ビット目から最下位ビット(Z51,Z52,Z53)と
スティッキビット生成回路222が出力するスティッキビ
ット(S)と仮数加算器220における桁あふれ(Cout)とから
仮数のビット反転の要否と丸め加算値の再加算の要否と
を決定する。FIG. 30 is a block diagram of a floating point data multiplication device according to the third embodiment of the present invention. In FIG. 30, 201 is a multiplicand register that holds the multiplicand, and is a 1-bit sign part 201s and an 11-bit exponent part 201e.
And a 53-bit mantissa part 201f. Reference numeral 202 denotes a multiplier register that holds a multiplier, and includes a 1-bit sign part 202s, an 11-bit exponent part 202e, and a 53-bit mantissa part 202f. When normalized number with a so-called "hidden bit" most significant bit of the multiplicand register mantissa portion 201f and the multiplier register mantissa portion 202f is with the weight of either 2 0 is 1, the multiplicand register 201 and the multiplier except the bit Both registers 202 are in double precision. Reference numeral 203 denotes a code generation circuit that reads out the sign of the multiplicand and the multiplier from the multiplicand register encoder 201s and the multiplier register encoder 202s and generates the sign of the product. An 11-bit exponent adder that reads out the exponent and calculates the exponent of the product. Adds the A and B inputs with Cin as a 1-bit carry input. 205 and 206 are 11-bit selectors that select two inputs of the exponent adder 204 respectively, 207 is a most significant bit correction circuit that inverts the most significant bit of the output of the exponent adder 204, and 208 is addition in the exponent adder 204. A 1-bit latch that holds the overflow from the most significant bit at the time, 209 is the upper overflow (overflow) and the lower overflow (underflow) of the product from the arithmetic precision specified by the output of exponent adder 204 and the value of latch 208. ), 210 is an 11-bit register for holding the output of the exponent adder 204 whose most significant bit is inverted by the most significant bit correction circuit 207 and inputting it again to the exponent adder 204 through the selector 205. A latch 211 is a normalized correction value generation circuit that generates a constant for incrementing the exponent by 1 in accordance with the normalization of the 1-bit shift of the mantissa of the product. 212 is a multiplicand register mantissa part 201f. The high-order 27 bits or lower
A multiplicand upper / lower selection circuit that selects and outputs 27 bits (the most significant bit at this time is 0), and 213 reads the multiplier register mantissa part 202f and outputs the upper 27 bits or the lower 27 bits.
A multiplier upper / lower selection circuit that selects and outputs 27 bits (the most significant bit at this time is 0), and 214 indicates the output of the 27-bit multiplicand upper / lower selection circuit 212 and the 27-bit multiplier upper / lower selection circuit 213. Multiplier that multiplies outputs and outputs 54-bit sum (sum) and carry (carry), 21
Reference numerals 5 and 216 are 54-bit latches that hold the sum output and carry output of the multiplier 214, respectively, and 217 is a rounded addition value that generates a constant when performing addition to round the mantissa of the product to single precision or double precision. A generation circuit, 218 is a 54-bit selector for selecting the value of the latch 216 and the output of the rounded addition value generation circuit 217, 2
19 is the output of the rounded addition value generation circuit 217 and the latch 225 described later.
54-bit selector, which selects the value held in
Reference numeral 220 denotes a 54-bit mantissa adder that adds the value held in the latch 215 and the output of the selector 218 and the output of the selector 219, and 221 denotes 0 or 1 bit of the output of the mantissa adder 220 in the least significant bit direction. Or a 54-bit shifter that shifts by 26 bits, 222 indicates a shift overflow from 22 bits from the most significant bit to the 47th bit of the output of the mantissa adder 220 and the 26 least significant bit of the shifter 221. To generate a sticky bit depending on whether the rounding precision is single precision or double precision, 223 rounds the 24th bit from the most significant bit of the shifter 221 output when the rounding precision is single precision. When the precision is double precision, the mantissa correction circuit that inverts and outputs the 53rd bit as necessary, 224 indicates the most significant bit of the output of the mantissa adder 220
A total of 6 bits from the 23rd bit to the 25th bit, the least significant bit to the 3rd bit to the least significant bit, and one overflow bit from the most significant bit at the time of addition in the mantissa adder 220 and the sticky bit generation circuit 222 And the mantissa correction for controlling the bit inversion performed by the mantissa correction circuit 223 and the addition of the rounding addition value in the mantissa adder 220 depending on whether the rounding precision is single precision or double precision. A control circuit, 225 is a 54-bit latch that holds the output of the shifter 221, and 226 is a product register that holds the product. 1-bit sign part 226s and 11-bit exponent part 226e and 53
It consists of the mantissa part 226f of the bit. When normalized number with a so-called "hidden bit", also the most significant bit of the product register mantissa portion 226f having a 2 0 weight is 1, product register 226 except for this bit meets the precision. FIG. 31 is an internal block diagram of the multiplicand upper / lower selection circuit 212 and the multiplier upper / lower selection circuit 213 shown in FIG. 30, in which 227 extends 0 to the upper 27 bits or the lower 26 bits of the 53-bit input.
This is a selector that selects a 27-bit type. 32 is an operation explanatory diagram showing constants generated by the rounded addition value generation circuit 217 shown in FIG. 30, and only the 25th bit from the most significant bit is 1
Then, a rounded addition value A of 0 is generated for the other and a rounded addition value B of 2 for only the second bit from the most significant bit is 0, and a rounded addition value C of 1 for only the least significant bit is 1 and the other is 0. Figure 33 and Figure 34
In the control relation diagram of the mantissa correction control circuit 224 shown in FIG. 30, when the rounding precision is single precision, as shown in FIG.
23th to 25th bits (Z
22 , Z 23 , Z 24 ), the sticky bit (S) output by the sticky bit generation circuit 222, and the overflow in the mantissa adder 220.
The necessity of bit inversion of the mantissa and the necessity of re-addition of the rounded addition value are determined from (Cout). When the rounding precision is double precision, as shown in FIG. 34, from the third least significant bit to the least significant bit (Z 51 , Z 52 , Z 53 ) of the output of the mantissa adder 220 and the sticky bit generation circuit 222. Determines the necessity of bit inversion of the mantissa and the necessity of re-addition of the rounded addition value based on the sticky bit (S) output by the above and the overflow (Cout) in the mantissa adder 220.
【0085】以上のように構成された本実施例の浮動小
数点データの乗算装置について、以下その動作を説明す
る。ここでは丸めモードが最近偶丸めモードを例に挙げ
る。The operation of the floating point data multiplication device of this embodiment having the above-described configuration will be described below. Here, the rounding mode is the even rounding mode as an example.
【0086】はじめに被乗数および乗数が単精度で積を
単精度で丸める場合を図35に示す単精度乗算の動作フロ
ー図と図36に示す単精度乗算における加算およびシフト
の態様図を用いて説明する。図35は指数加算器204、例
外検出回路209、乗算器214、仮数加算器220、シフタ22
1、仮数補正回路223の処理ステップ毎の動作の内容を示
したもので、図36はその内、仮数加算器220とシフタ221
における詳細な動作の態様を示したものである。 (1)処理ステップ開始前 単精度の被乗数および乗数を倍精度に拡張してそれぞれ
被乗数レジスタ201と乗数レジスタ202に格納する。この
とき被乗数レジスタ指数部201eと乗数レジスタ指数部20
2eはともに倍精度のバイアス表現(真の指数値=指数部
の値−1023(10))に変換され、被乗数レジスタ仮数部20
1fと乗数レジスタ仮数部202fの下位29ビットには0が埋
められる。 (2)ステップ1 セレクタ205により被乗数レジスタ指数部201eに保持さ
れた被乗数の指数を指数加算器204のA入力に入力し、
セレクタ206により乗数レジスタ指数部202eに保持され
た乗数の指数を指数加算器204のB入力に入力するとと
もにキャリ入力Cinを1にして指数加算器204において加
算を行う。加算結果の最上位ビットを最上位ビット補正
回路207で反転する。最上位ビットが反転した加算結果
をラッチ210に格納する。 First, the case where the multiplicand and the multiplier are single precision and the product is rounded with single precision will be described with reference to the operation flow diagram of single precision multiplication shown in FIG. 35 and the mode diagram of addition and shift in single precision multiplication shown in FIG. . FIG. 35 shows the exponent adder 204, the exception detection circuit 209, the multiplier 214, the mantissa adder 220, and the shifter 22.
1. The contents of the operation of each processing step of the mantissa correction circuit 223 are shown. FIG. 36 shows the mantissa adder 220 and the shifter 221 among them.
3 shows a detailed operation mode in FIG. (1) Before start of processing step The single precision multiplicand and the multiplicand are expanded to double precision and stored in the multiplicand register 201 and the multiplier register 202, respectively. At this time, the multiplicand register exponent part 201e and the multiplier register exponent part 20
Both 2e are converted into a double-precision bias expression (true exponent value = exponent part value-1023 (10) ), and the multiplicand register mantissa part 20
Zeros are filled in 1f and the lower 29 bits of the multiplier register mantissa part 202f. (2) Step 1 The selector 205 inputs the exponent of the multiplicand held in the multiplicand register exponent unit 201e to the A input of the exponent adder 204,
The exponent of the multiplier held in the multiplier register exponent unit 202e by the selector 206 is input to the B input of the exponent adder 204, and the carry input Cin is set to 1 to perform addition in the exponent adder 204. The most significant bit of the addition result is inverted by the most significant bit correction circuit 207. The addition result in which the most significant bit is inverted is stored in the latch 210 .
【0087】[0087]
【0088】[0088]
【0089】[0089]
【0090】ラッチ208はこの時の指数加算器204におけ
る桁あふれを保持する。被乗数上位下位選択回路212は
被乗数レジスタ仮数部201fの上位27ビットを読出して出
力し(図36(a)に示す値Aで、この中に被乗数の仮数部
の有効ビットはすべて含まれ、下位3ビットは0であ
る)、乗数上位下位選択回路213は乗数レジスタ仮数部2
02fの上位27ビットを読出して出力する(図36(a)に示す
値Bで、この中に乗数の仮数部の有効ビットはすべて含
まれ、下位3ビットは0である)。乗算器214は被乗数
上位下位選択回路212および乗数上位下位選択回路213か
らの入力に基づいて乗算を実行し、和出力と桁上げ出力
をそれぞれラッチ215とラッチ216に格納する。同時に符
号生成回路203において被乗数レジスタ符号部201sと乗
数レジスタ符号部202sから被乗数および乗数の符号を読
出して両者の排他的論理和をとり、積の符号を生成して
積レジスタ符号部226sに格納する。 (3)ステップ2 仮数加算器220はラッチ215に保持された乗算器214の和
出力(下位7ビットは0)とセレクタ218によりラッチ2
16に保持された乗算器214の桁上げ出力(下位7ビット
は0)とセレクタ219により丸め加算値生成回路217が生
成する丸め加算値Aとを加算する。この時の仮数加算器
220から桁あふれ(Z-1)の有無により、 ・仮数加算器220から桁あふれがあるとき、即ち仮数部
の積が2以上のとき シフタ221は正規化のために仮数加算器220からの出力を
1ビット最下位ビット方向にシフト(このとき、最上位
ビットに1を埋める)し、セレクタ205およびセレクタ2
06により指数加算器204はラッチ210の値と正規化補正値
生成回路211が出力する定数1を加算して積レジスタ指
数部226eに格納する。 ・仮数加算器220からの桁あふれがないとき、即ち仮数
部の積が1以上2未満のとき シフタ221は正規化を行う必要がないために仮数加算器2
20からの出力をシフトせずにそのまま出力し、セレクタ
205およびセレクタ206により指数加算器204はラッチ210
の値をそのまま出力して積レジスタ指数部226eに格納す
る。のいずれかを実行する。ラッチ208の値は変化させ
ない。例外検出回路209は指数加算器204の出力(Eとす
る)により単精度での積の上位あふれ(OVF)と下位あふ
れ(UNF)を次の論理に基づいて検出する。The latch 208 holds the overflow in the exponent adder 204 at this time. The multiplicand upper / lower selection circuit 212 reads and outputs the upper 27 bits of the multiplicand register mantissa part 201f (the value A shown in FIG. 36 (a) includes all the effective bits of the mantissa part of the multiplicand and the lower 3 The bit is 0), and the multiplier upper / lower selection circuit 213 is a multiplier register mantissa part 2
The upper 27 bits of 02f are read and output (the value B shown in FIG. 36 (a) includes all effective bits of the mantissa part of the multiplier, and the lower 3 bits are 0). The multiplier 214 executes multiplication based on the inputs from the multiplicand upper / lower selection circuit 212 and the multiplier upper / lower selection circuit 213, and stores the sum output and the carry output in the latch 215 and the latch 216, respectively. At the same time, in the code generation circuit 203, the multiplicand register code part 201s and the multiplier register code part 202s are read out to obtain the codes of the multiplicand and the multiplier, the exclusive OR of the two is taken, and the product code is generated and stored in the product register code part 226s. . (3) Step 2 The mantissa adder 220 outputs the sum output (lower 7 bits are 0) of the multiplier 214 held in the latch 215 and the latch 2 by the selector 218.
The carry output (the lower 7 bits are 0) of the multiplier 214 held in 16 and the rounding addition value A generated by the rounding addition value generation circuit 217 are added by the selector 219. Mantissa adder at this time
Depending on the presence / absence of a digit overflow (Z −1 ) from 220: When there is a digit overflow from the mantissa adder 220, that is, when the product of the mantissa parts is 2 or more, the shifter 221 outputs from the mantissa adder 220 for normalization. 1 bit in the direction of the least significant bit (at this time, the most significant bit is filled with 1), and the selector 205 and the selector 2
According to 06, the exponent adder 204 adds the value of the latch 210 and the constant 1 output from the normalized correction value generation circuit 211 and stores the result in the product register exponent part 226e. When there is no overflow from the mantissa adder 220, that is, when the product of the mantissa parts is 1 or more and less than 2, the shifter 221 does not need to perform normalization, so the mantissa adder 2
Output from 20 as it is without shifting, selector
205 and selector 206 cause exponent adder 204 to latch 210
The value of is output as it is and stored in the product register exponent part 226e. Do one of the following. The value of latch 208 does not change. The exception detection circuit 209 detects the upper overflow (OVF) and the lower overflow (UNF) of the single-precision product based on the output (denoted by E) of the exponent adder 204 based on the following logic.
【0091】[0091]
【数11】 [Equation 11]
【0092】スティッキビット生成回路222は仮数加算
器220の出力の最上位ビットから26ビット目から47ビッ
ト目(Z25,・・・Z46)の22ビットの論理和をとり22ビット中
に値1のビットが1つでもあればスティッキビット出力
(S)を1にし、22ビットの全ビットが値0であればステ
ィッキビット出力(S)を0にする。仮数補正制御回路224
は仮数加算器220の出力の最上位ビットから23ビット目
から25ビット目(Z22,Z23,Z2 4)とスティッキビット生成
回路222が出力するスティッキビット(S)と仮数加算器22
0における桁あふれ(Cout=Z-1)に基づいて仮数補正回路
223の制御を行ない、仮数補正回路223は図33の補正信号
の欄が1ならばシフタ221の出力の最上位から24ビット
目(R23)を反転して0ならば反転せずに出力する。同時
に、同図の丸め加算信号の欄が0ならば仮数補正回路22
3の出力の最上位ビットを除く53ビットの下位29ビット
を0にマスクして積レジスタ仮数部226fに格納して処理
を終了する。丸め加算信号の欄が1ならば仮数補正回路
223の出力をラッチ225に格納した後、次の挿入ステップ
を実行する。 (3)挿入ステップ(丸め加算信号の欄が1の時のみ) 仮数加算器220はセレクタ218により丸め加算値生成回路
217が生成する丸め加算値Aとセレクタ219によりラッチ
225が保持する値とを加算する。この時に仮数加算器220
から桁あふれは発生しない。シフタ221は仮数加算器220
の出力をシフトせずにそのまま出力し、仮数補正回路22
3もシフタ221の出力をビット反転せずにそのまま出力す
る。その後、仮数補正回路223の出力の最上位ビットを
除く53ビットの下位29ビットを0にマスクして積レジス
タ仮数部226fに格納して処理を終了する。The sticky bit generation circuit 222 takes the logical sum of 22 bits from the 26th bit to the 47th bit (Z 25 , ... Z 46 ) from the most significant bit of the output of the mantissa adder 220 and outputs the value in 22 bits. Sticky bit output if there is even one bit
(S) is set to 1, and if all 22 bits have the value 0, the sticky bit output (S) is set to 0. Mantissa correction control circuit 224
Is the 23rd to the 25th bit (Z 22 , Z 23 , Z 2 4 ) from the most significant bit of the output of the mantissa adder 220, the sticky bit (S) output from the sticky bit generation circuit 222, and the mantissa adder 22.
Mantissa correction circuit based on overflow at 0 (Cout = Z -1 )
Controlling 223, the mantissa correction circuit 223 inverts the 24th bit (R 23 ) from the most significant output of the shifter 221 if the correction signal column in FIG. 33 is 1, and outputs it without inverting if it is 0. . At the same time, if the rounded addition signal column in the figure is 0, the mantissa correction circuit 22
The lower 29 bits of 53 bits excluding the most significant bit of the output of 3 are masked to 0 and stored in the product register mantissa 226f, and the processing is ended. Mantissa correction circuit if the rounded addition signal column is 1.
After storing the output of 223 in latch 225, the next insertion step is performed. (3) Insertion step (only when the rounding addition signal column is 1) The mantissa adder 220 is a rounding addition value generation circuit by the selector 218.
Latched by rounding addition value A generated by 217 and selector 219
The value held by 225 is added. Mantissa adder 220 at this time
No overflow occurs. Shifter 221 is mantissa adder 220
Of the mantissa correction circuit 22
3 also outputs the output of the shifter 221 as it is without bit inversion. After that, the lower 29 bits of 53 bits excluding the most significant bit of the output of the mantissa correction circuit 223 are masked to 0 and stored in the product register mantissa part 226f, and the process is ended.
【0093】次に被乗数および乗数が倍精度で積を倍精
度で丸める場合を図37に示す倍精度乗算の動作フロー図
と図38、図39に示す倍精度乗算における加算およびシフ
トの態様図を用いて説明する。図37は指数加算器204、
例外検出回路209、乗算器214、仮数加算器220、シフタ2
21、仮数補正回路223の処理ステップ毎の動作の内容を
示したもので、図38、図39はその内、仮数加算器220と
シフタ221における詳細な動作の態様を示したものであ
る。 (1)処理ステップ開始前 倍精度の被乗数および乗数をそれぞれ被乗数レジスタ20
1と乗数レジスタ202に格納する。このとき被乗数レジス
タ指数部201eと乗数レジスタ指数部202eはともに倍精度
のバイアス表現(真の指数値=指数部の値−1023(10))
になっている。 (2)ステップ1 セレクタ205により被乗数レジスタ指数部201eに保持さ
れた被乗数の指数を指数加算器204のA入力に入力し、
セレクタ206により乗数レジスタ指数部202eに保持され
た乗数の指数を指数加算器204のB入力に入力するとと
もにキャリ入力Cinを1にして指数加算器204において加
算を行う。加算結果の最上位ビットを最上位ビット補正
回路207で反転する。最上位ビットが反転した加算結果
をラッチ210に格納する。ラッチ208はこの時の指数加算
器204における桁あふれを保持する。被乗数上位下位選
択回路212は被乗数レジスタ仮数部201fの下位27ビット
を読出して出力し(図38に示すALで、最上位ビットは0
である)、乗数上位下位選択回路213は乗数レジスタ仮
数部202fり下位27ビットを読出して出力する(図38に示
す値BLで、最上位ビットは0である)。乗算器214は被
乗数上位下位選択回路212および乗数上位下位選択回路2
13からの入力に基づいて乗算を実行し、和出力と桁上げ
出力をそれぞれラッチ215とラッチ216に格納する。同時
に符号生成回路203において被乗数レジスタ符号部201s
と乗数レジスタ符号部202sから被乗数および乗数の符号
を読出して両者の排他的論理和をとり、積の符号を生成
して積レジスタ符号部226sに格納する。 (3)ステップ2 仮数加算器220はラッチ215に保持された乗算器214の和
出力(上位2ビットと最下位ビットは0)とセレクタ21
8によりラッチ216に保持された乗算器214の桁上げ出力
(上位2ビットと最下位ビットは0)とセレクタ219に
より丸め加算値生成回路217が生成する丸め加算値Bと
を加算する。この時の仮数加算器220から桁あふれは発
生しない。シフタ221は仮数加算器220の出力(W0,・・・,W
52,0)を最下位ビット方向に26ビットシフト(このとき
上位には0を埋める)して結果(0,・・・,0,W0,・・・,W27)を
ラッチ225に格納する。ラッチ225に格納された値は最も
下位の部分積である。同時に被乗数上位下位選択回路21
2は被乗数レジスタ仮数部201fの下位27ビットを読出し
て出力し(図38に示す値ALで、最上位ビットは0であ
る)、乗数上位下位選択回路213は乗数レジスタ仮数部2
02fの上位27ビットを読出して出力する(図38に示す値B
U)。乗算器214は被乗数上位下位選択回路212および乗
数上位下位選択回路213からの入力に基づいて乗算を実
行し、和出力と桁上げ出力をそれぞれラッチ215とラッ
チ216に格納する。 (4)ステップ3 仮数加算器220はラッチ215に保持された乗算器214の和
出力(最上位ビットと最下位ビットは0)とセレクタ21
8によりラッチ216に保持された乗算器214の桁上げ出力
(最上位ビットと最下位ビットは0)とセレクタ219に
よりラッチ225に保持されたシフタ221の出力(上位26ビ
ットは0)とを加算する。この時に仮数加算器220から
桁あふれは発生しない。シフタ221は仮数加算器220(X0,
・・・,X53)の出力をシフトせずにそのまま出力してラッチ
225に格納する。ラッチ225に格納された値は第1の中位
の部分積までを累算したものである。被乗数上位下位選
択回路212は被乗数レジスタ仮数部201fの上位27ビット
を読出して出力し(図38に示す値AU)、乗数上位下位選
択回路213は乗数レジスタ仮数部202fの下位27ビットを
読出して出力する(図38に示す値BLで、最上位ビットは
0である)。乗算器214は被乗数上位下位選択回路212お
よび乗数上位下位選択回路213からの入力に基づいて乗
算を実行し、和出力と桁上げ出力をそれぞれラッチ215
とラッチ216に格納する。 (5)ステップ4 仮数加算器220はラッチ215に保持された乗算器214の和
出力(最上位ビットと最下位ビットは0)とセレクタ21
8によりラッチ216に保持された乗数器214の桁上げ出力
(最上位ビットと最下位ビットは0)シフタ221の出力
とを加算する。シフタ221は仮数加算器220の出力の54ビ
ット(Y0,・・・Y53)に仮数加算器220からの桁あふれ1ビッ
ト(Y-1)を最上位ビット側に付加した55ビットのデータ
(Y-1,Y0,・・・,Y53)を最下位ビット方向に26ビットシフト
(このとき上位には0を埋める)して結果(0,・・・,0,
Y-1,Y0,・・・,Y27)をラッチ225に格納する。ラッチ225に
格納された値は第2の中位の部分積までを累算したもの
である。同時に、被乗数上位下位選択回路212は被乗数
レジスタ仮数部201fの上位27ビットを読出して出力し
(図38に示す値AU)、乗数上位下位選択回路213は乗数
レジスタ仮数部202fの上位27ビットを読出して出力する
(図38に示す値BU)。乗算器214は被乗数上位下位選択
回路212および乗数上位下位選択回路213からの入力に基
づいて乗算を実行し、和出力と桁上げ出力をそれぞれラ
ッチ215とラッチ216に格納する。 (6)ステップ5 仮数加算器220はラッチ215に保持された乗算器214の和
出力(最下位ビットは0)とセレクタ218によりラッチ2
16に保持された乗算器214の桁上げ出力(最下位ビット
は0)とセレクタ219によりラッチ225に保持されたシフ
タ221の出力(上位25ビットは0)とを加算する。この
時の仮数加算器220から桁あふれ(Z-1)の有無により、 ・仮数加算器220から桁あふれがあるとき、即ち仮数部
の積が2以上のとき シフタ221は正規化のために仮数加算器220からの出力を
1ビット最下位ビット方向にシフト(このとき、最上位
ビットに1を埋める)し、セレクタ205およびセレクタ2
06により指数加算器204はラッチ210の値と正規化補正値
生成回路211が出力する定数1を加算して積レジスタ指
数部226eに格納する。 ・仮数加算器220から桁あふれがないとき、即ち仮数部
の積が1以上2未満のとき シフタ221は正規化を行う
必要がないために仮数加算器220からの出力をシフトせ
ずにそのまま出力し、セレクタ205およびセレクタ206に
より指数加算器204はラッチ210の値をそのまま出力して
積レジスタ指数部226eに格納する。のいずれかを実行す
る。ラッチ208の値は変化させない。例外検出回路209は
指数加算器204の出力(E0,・・・,E10とする)とラッチ208
の値(Ceとする)により倍精度での積の上位あふれ(OV
F)と下位あふれ(UNF)を次の論理式に基づいて検出す
る。ただし、 ̄XはXの反転を表す。Next, an operation flow chart of double-precision multiplication shown in FIG. 37 and a mode diagram of addition and shift in double-precision multiplication shown in FIGS. 38 and 39 in the case where the multiplicand and the multiplier are double-precision and the product is rounded with double-precision. It demonstrates using. FIG. 37 shows the exponent adder 204,
Exception detection circuit 209, multiplier 214, mantissa adder 220, shifter 2
21, the contents of the operation of the mantissa correction circuit 223 for each processing step are shown, and FIG. 38 and FIG. 39 show the detailed operation modes of the mantissa adder 220 and the shifter 221 among them. (1) Before the start of the processing step The double-precision multiplicand and the multiplier are respectively set to the multiplicand register 20.
Stored in 1 and multiplier register 202. At this time, the multiplicand register exponent part 201e and the multiplier register exponent part 202e are both double-precision bias expressions (true exponent value = exponent part value−1023 (10) )
It has become. (2) Step 1 The selector 205 inputs the exponent of the multiplicand held in the multiplicand register exponent unit 201e to the A input of the exponent adder 204,
The exponent of the multiplier held in the multiplier register exponent unit 202e by the selector 206 is input to the B input of the exponent adder 204, and the carry input Cin is set to 1 to perform addition in the exponent adder 204. The most significant bit of the addition result is inverted by the most significant bit correction circuit 207. The addition result in which the most significant bit is inverted is stored in the latch 210 . The latch 208 holds the overflow in the exponent adder 204 at this time. The multiplicand upper / lower selection circuit 212 reads out and outputs the lower 27 bits of the multiplicand register mantissa part 201f (AL shown in FIG. 38, the most significant bit is 0).
The multiplier upper / lower selection circuit 213 reads out and outputs the lower 27 bits of the multiplier register mantissa 202f (value BL shown in FIG. 38, the most significant bit is 0). The multiplier 214 includes a multiplicand upper / lower selection circuit 212 and a multiplier upper / lower selection circuit 2
Multiply is executed based on the input from 13 and the sum output and the carry output are stored in the latch 215 and the latch 216, respectively. At the same time, in the code generation circuit 203, the multiplicand register encoder 201s
And the sign of the multiplicand and the multiplier are read from the multiplier register encoder 202s, the exclusive OR of the two is taken, the product code is generated and stored in the product register encoder 226s. (3) Step 2 The mantissa adder 220 outputs the sum output of the multiplier 214 held in the latch 215 (the upper 2 bits and the lowermost bit are 0) and the selector 21.
The carry output of the multiplier 214 (the upper 2 bits and the least significant bit are 0) held in the latch 216 by 8 and the rounding addition value B generated by the rounding addition value generation circuit 217 are added by the selector 219. At this time, the mantissa adder 220 does not overflow. The shifter 221 outputs the mantissa adder 220 output (W 0 , ..., W
52,0 ) is shifted 26 bits in the direction of the least significant bit (0 is filled in at the higher order at this time) and the result (0, ..., 0, W 0 , ..., W 27 ) is stored in the latch 225. To do. The value stored in latch 225 is the lowest partial product. At the same time, the multiplicand upper / lower selection circuit 21
2 reads out and outputs the lower 27 bits of the multiplicand register mantissa part 201f (value AL shown in FIG. 38, the most significant bit is 0), and the multiplier upper / lower select circuit 213 causes the multiplier register mantissa part 2
Reads and outputs the upper 27 bits of 02f (value B shown in Fig. 38)
U). The multiplier 214 executes multiplication based on the inputs from the multiplicand upper / lower selection circuit 212 and the multiplier upper / lower selection circuit 213, and stores the sum output and the carry output in the latch 215 and the latch 216, respectively. (4) Step 3 The mantissa adder 220 outputs the sum output (the most significant bit and the least significant bit are 0) of the multiplier 214 held in the latch 215 and the selector 21.
The carry output of the multiplier 214 held in the latch 216 by 8 (the most significant bit and the least significant bit is 0) and the output of the shifter 221 held in the latch 225 by the selector 219 (the upper 26 bits are 0) are added. To do. At this time, no overflow occurs from the mantissa adder 220. The shifter 221 is a mantissa adder 220 (X 0 ,
..., X 53 ) output is output as it is without shifting and latched
Store in 225. The value stored in latch 225 is an accumulation up to the first middle partial product. The multiplicand upper / lower selection circuit 212 reads and outputs the upper 27 bits of the multiplicand register mantissa part 201f (value AU shown in FIG. 38), and the multiplier upper / lower selection circuit 213 reads and outputs the lower 27 bits of the multiplier register mantissa part 202f. (The value BL shown in FIG. 38 has the most significant bit 0). The multiplier 214 executes multiplication based on the inputs from the multiplicand upper / lower selection circuit 212 and the multiplier upper / lower selection circuit 213, and latches the sum output and the carry output respectively.
And store in latch 216. (5) Step 4 The mantissa adder 220 outputs the sum output (the most significant bit and the least significant bit are 0) of the multiplier 214 held in the latch 215 and the selector 21.
The carry output (the most significant bit and the least significant bit are 0) of the multiplier 214 held in the latch 216 by 8 is added to the output of the shifter 221. The shifter 221 is 55-bit data in which 54 bits (Y 0 , ... Y 53 ) of the output of the mantissa adder 220 are added with 1-bit overflow (Y -1 ) from the mantissa adder 220 on the most significant bit side.
(Y -1,, Y 0 , ..., Y 53 ) is shifted by 26 bits in the direction of the least significant bit (at this time, the higher order is filled with 0) and the result (0, ..., 0,
Y −1 , Y 0 , ..., Y 27 ) are stored in the latch 225. The value stored in latch 225 is an accumulation up to the second middle partial product. At the same time, the multiplicand upper / lower selecting circuit 212 reads and outputs the upper 27 bits of the multiplicand register mantissa part 201f (value AU shown in FIG. 38), and the multiplier upper / lower selecting circuit 213 reads the upper 27 bits of the multiplier register mantissa part 202f. Output (value BU shown in FIG. 38). The multiplier 214 executes multiplication based on the inputs from the multiplicand upper / lower selection circuit 212 and the multiplier upper / lower selection circuit 213, and stores the sum output and the carry output in the latch 215 and the latch 216, respectively. (6) Step 5 The mantissa adder 220 outputs the sum output (the least significant bit is 0) of the multiplier 214 held in the latch 215 and the latch 2 by the selector 218.
The carry output of the multiplier 214 held in 16 (the least significant bit is 0) and the output of the shifter 221 held in the latch 225 by the selector 219 (the upper 25 bits are 0) are added. Depending on the presence or absence of a digit overflow (Z −1 ) from the mantissa adder 220 at this time: When there is a digit overflow from the mantissa adder 220, that is, when the product of the mantissa parts is 2 or more, the shifter 221 uses the mantissa for normalization. The output from the adder 220 is shifted toward the least significant bit by 1 bit (at this time, the most significant bit is filled with 1), and the selector 205 and the selector 2
According to 06, the exponent adder 204 adds the value of the latch 210 and the constant 1 output from the normalized correction value generation circuit 211 and stores the result in the product register exponent part 226e. -When there is no overflow from the mantissa adder 220, that is, when the product of the mantissa part is 1 or more and less than 2, the shifter 221 does not need to perform normalization, and therefore the output from the mantissa adder 220 is output as it is without shifting. Then, the exponent adder 204 outputs the value of the latch 210 as it is by the selector 205 and the selector 206 and stores it in the product register exponent part 226e. Do one of the following. The value of latch 208 does not change. The exception detection circuit 209 outputs the output of the exponent adder 204 (E 0 , ..., E 10 ) and the latch 208.
The value of ( value of Ce) is the upper overflow (OV
F) and lower overflow (UNF) are detected based on the following formula. However,  ̄X represents the inversion of X.
【0094】[0094]
【数12】 [Equation 12]
【0095】スティッキビット生成回路222はステップ
2でのシフタ221における26ビットの最下位ビットから
のシフトあふれ(W28,・・・,W52,0)とステップ4でのシフ
タ221における26ビットの最下位ビットからのシフトあ
ふれ(Y28,・・・,Y53)とを合わせた52ビットの論理和をと
り52ビット中に値1のビットが1つでもあればスティッ
キビット出力(S)を1にし、52ビットの全ビットが値0
であればスティッキビット出力(S)を0にする。仮数補
正制御回路224は仮数加算器220の出力の最下位ビットか
ら3ビット目から最下位ビット(Z51,Z52,Z53)とスティ
ッキビット生成回路222が出力するスティッキビット(S)
と仮数加算器220における桁あふれ(Cout=Z-1)に基づい
て仮数補正回路223の制御を行い、仮数補正回路223は図
34の補正信号の欄が1ならばシフタ221の出力の最下位
から2ビット目(R52)を反転して0ならば反転せずに出
力する。同時に、同図の丸め加算信号の欄が0ならば仮
数補正回路223の出力の最下位ビットを除く53ビットを
積レジスタ仮数部226fに格納して処理を終了する。丸め
加算信号の欄が1ならば仮数補正回路223の出力をラッ
チ225に格納した後、次の挿入ステップを実行する。 (6)挿入ステップ(丸め加算信号の欄が1の時のみ) 仮数加算器220はセレクタ218により丸め加算値生成回路
217が生成する丸め加算値Cとセレクタ219によりラッチ
225が保持する値とを加算する。この時に仮数加算器220
から桁あふれは発生しない。シフタ221は仮数加算器220
の出力をシフトせずにそのまま出力し、仮数補正回路22
3もシフタ221の出力をビット反転せずにそのまま出力す
る。その後、仮数補正回路223の出力の最下位ビットを
除く53ビットを積レジスタ仮数部226fに格納して処理を
終了する。The sticky bit generation circuit 222 shifts overflows (W 28 , ..., W 52,0 ) from the least significant bit of the 26 bits in the shifter 221 in step 2 and the 26 bits of the 26 bits in the shifter 221 in step 4. The 52 bit OR including the shift overflow (Y 28 , ..., Y 53 ) from the least significant bit is taken, and if there is even one bit of value 1 in 52 bits, the sticky bit output (S) is output. Set to 1 and all 52 bits have value 0
If so, the sticky bit output (S) is set to 0. The mantissa correction control circuit 224 outputs the third bit from the least significant bit (Z 51 , Z 52 , Z 53 ) of the output of the mantissa adder 220 and the sticky bit (S) output by the sticky bit generation circuit 222.
And the mantissa correction circuit 223 is controlled based on the overflow (Cout = Z −1 ) in the mantissa adder 220,
If the column of the correction signal of 34 is 1, the second least significant bit (R 52 ) of the output of the shifter 221 is inverted, and if it is 0, it is output without being inverted. At the same time, if the rounded addition signal column in the figure is 0, 53 bits excluding the least significant bit of the output of the mantissa correction circuit 223 are stored in the product register mantissa part 226f, and the process ends. If the rounded addition signal column is 1, the output of the mantissa correction circuit 223 is stored in the latch 225, and then the following insertion step is executed. (6) Insertion step (only when the rounding addition signal column is 1) The mantissa adder 220 is a rounding addition value generation circuit by the selector 218.
Rounded addition value C generated by 217 and latched by selector 219
The value held by 225 is added. Mantissa adder 220 at this time
No overflow occurs. Shifter 221 is mantissa adder 220
Of the mantissa correction circuit 22
3 also outputs the output of the shifter 221 as it is without bit inversion. After that, 53 bits excluding the least significant bit of the output of the mantissa correction circuit 223 are stored in the product register mantissa part 226f, and the process is ended.
【0096】[0096]
【0097】以上のように本実施例によれば、仮数部に
おける丸め加算値の加算または部分積を累算するための
加算と乗算器214からの和出力と桁上げ出力の加算とを
仮数加算器220で行ない、その結果をシフタ221で正規化
することによりほとんどの場合、処理を終了することが
できる。さらに仮数補正回路223での補正が必要な場合
でも処理ステップ数を増加させることなく終了すること
ができ、仮数加算器220での丸め加算値の加算を再度必
要とする時だけ処理を1ステップだけ挿入することで終
了できる。1ステップの挿入が必要な確率は32分の2と
極めて小さい(仮数のビットパタンが均一に分布すると
仮定した場合)。その結果、ほとんどの場合(確率32分
の30)、単精度乗算に必要な処理ステップ数は2、倍精
度乗算に必要な処理ステップ数は5、と小さくなる。ま
た単一の仮数加算器220で和と桁上げの加算と丸め加算
値の加算または部分積を累算するための加算とを実行し
ているため、必要なハードウェアが従来の浮動小数点デ
ータの乗算装置に比べて少ない。As described above, according to the present embodiment , addition of rounding addition values in the mantissa part or addition for accumulating partial products, and sum output and carry output from the multiplier 214 are performed. The addition can be performed by the mantissa adder 220, and the result can be normalized by the shifter 221. In most cases, the processing can be ended. Further, even if correction by the mantissa correction circuit 223 is necessary, the processing can be ended without increasing the number of processing steps, and only one step is necessary when the addition of the rounded addition value by the mantissa adder 220 is required again. You can finish by inserting. The probability that one step needs to be inserted is as small as 2/32 (assuming that the mantissa bit pattern is evenly distributed). As a result, in most cases (probability of 30/32), the number of processing steps required for single-precision multiplication is 2, and the number of processing steps required for double-precision multiplication is 5. In addition, since the single mantissa adder 220 performs addition of sum and carry and addition of rounded addition value or addition for accumulating partial products, necessary hardware is Fewer than the multiplication device.
【0098】なお、本実施例は最近偶丸めモードを実現
する例を挙げているが、正方向丸めモードや負方向丸め
モードおよび零方向丸めモードについても丸め加算値生
成回路217および仮数補正制御回路224の制御を変えるだ
けで容易に対応できる。この場合の丸めに関する動作は
第1の実施例に示したものと同様で、仮数演算結果のビ
ットの反転や処理ステップの挿入の制御は図7、図8、
図9、図10または図11、図12、図13、図14や図15、図1
6、図17、図18の制御関係図に従う。Although the present embodiment gives an example of realizing the even rounding mode recently, the rounding addition value generation circuit 217 and the mantissa correction control circuit are also used for the positive direction rounding mode, the negative direction rounding mode and the zero direction rounding mode. It can be easily handled by changing the control of 224. The operation related to rounding in this case is similar to that shown in the first embodiment, and the control of bit inversion of the mantissa operation result and the insertion of the processing step is performed with reference to FIGS.
9, FIG. 10 or FIG. 11, FIG. 12, FIG. 13, FIG. 14, FIG.
6, according to the control relationship diagram of FIG. 17, FIG.
【0099】また本実施例では、被乗数および乗数がと
もに単精度で積を単精度に丸める場合と被乗数および乗
数がともに倍精度で積を倍精度に丸める場合を説明した
が、いかなる被乗数と乗数の精度の組合せおよび積の丸
め精度の組合せであっても、スティッキビット生成回路
222におけるスティッキビットの生成論理を丸めを行う
ビットより下位のすべての有効なビットに対応させるこ
とにより、所定の精度に丸めた積を求めることができ
る。In this embodiment, the case where the multiplicand and the multiplier are both single precision and the product is rounded to the single precision and the case where the multiplicand and the multiplier are both double precision and the product is rounded to the double precision are described. Even if the combination of precision and the rounding precision of products are combined, the sticky bit generation circuit
By causing the sticky bit generation logic in 222 to correspond to all valid bits lower than the rounding bit, it is possible to obtain a rounded product with a predetermined precision.
【0100】なお、本実施例では丸め精度が単精度、倍
精度の場合に応じて、仮数補正制御回路224が仮数加算
器220の出力の最上位ビットから23ビット目から25ビッ
ト目までまたは最下位ビットから3ビット目から最下位
ビットまでと仮数加算器220における加算時の最上位ビ
ットからの桁あふれの1ビットとスティッキビット生成
回路222が出力するスティッキビット1ビットとを検査
し、仮数補正回路223がシフタ221の出力の最上位ビット
から24ビット目または53ビット目を反転しているが、検
査するビットと反転するビットとを最上位ビット方向に
増加させてもよい。検査するビットと反転するビットの
1ビットの増加ごとに1ステップの挿入が必要な確率が
半減され、その結果、演算速度が向上する。In this embodiment, depending on whether the rounding precision is single precision or double precision, the mantissa correction control circuit 224 causes the mantissa adder 220 to output from the most significant bit to the 23rd to 25th bits. The third bit to the least significant bit from the lower bit, the 1-bit overflow from the most significant bit at the time of addition in the mantissa adder 220, and the 1-bit sticky bit output from the sticky bit generation circuit 222 are inspected to correct the mantissa. Although the circuit 223 inverts the 24th bit or the 53rd bit from the most significant bit of the output of the shifter 221, the bit to be inspected and the bit to be inverted may be increased in the most significant bit direction. The probability that one step needs to be inserted for each increase of the bit to be checked and the bit to be inverted is halved, and as a result, the operation speed is improved.
【0101】図40は本発明の第4の実施例における浮動
小数点データの除算装置のブロック図を示すものであ
る。図40において、301は被除数を保持する被除数レジ
スタで、1ビットの符号部301sと11ビットの指数部301e
と53ビットの仮数部301fからなる。302は除数を保持す
る除数レジスタで、1ビットの符号部302sと11ビットの
指数部302eと53ビットの仮数部302fからなる。被除数レ
ジスタ仮数部301fと除数レジスタ仮数部302fの最上位ビ
ットはいずれも20の重みを持ついわゆる「隠れビッ
ト」で正規化数の時は1であり、このビットを除いて被
除数レジスタ301および除数レジスタ302はともに倍精度
に合致している。303は被除数レジスタ符号部301sと除
数レジスタ符号部302sから被除数および除数の符号を読
出して商の符号を生成する符号生成回路、304は被除数
レジスタ指数部301eと除数レジスタ指数部302eから被除
数および除数の指数を読出して商の指数を算出する11ビ
ットの指数減算器で、Cinを1ビットのキャリ入力とし
てA入力とB入力の1の補数をとったものとの加算を行
う。305、306はそれぞれ指数減算器304の2つの入力を
選択する11ビットのセレクタ、307は指数減算304の出力
の最上位ビットを反転する最上位ビット補正回路、308
は指数減算器304における加算時の最上位ビットからの
桁あふれを保持する1ビットのラッチ、309は指数減算
器304の出力とラッチ308の値により指定した演算精度か
らの商の上位あふれ(オーバフロー)と下位あふれ(ア
ンダフロー)を検出する例外検出回路、310は最上位ビ
ット補正回路307によって最上位ビットが反転された指
数減算器304の出力を保持してセレクタ305を通して再び
指数減算器304に入力するための11ビットのラッチ、311
は商の仮数の1ビットシフトの正規化に伴って指数を1
だけ減分させるための定数を生成する正規化補正値生成
回路、312は被除数レジスタ仮数部301fと除数レジスタ
仮数部302fとを読出して商の仮数とそれを正規化する必
要があるか否かの信号とを得る公知技術の仮数演算部、
313は商を保持する商レジスタで、1ビットの符号部313
sと11ビットの指数部313eと53ビットの仮数部313fから
なる。商レジスタ仮数部313fの最上位ビットも20の重
みを持ついわゆる「隠れビット」で正規化数の時は1で
あり、このビットを除いて商レジスタ313は倍精度に合
致している。FIG. 40 is a block diagram of a floating point data division device according to the fourth embodiment of the present invention. In FIG. 40, 301 is a dividend register for holding the dividend, which is a 1-bit sign part 301s and an 11-bit exponent part 301e.
And a 53-bit mantissa part 301f. Reference numeral 302 denotes a divisor register that holds a divisor, and includes a 1-bit sign part 302s, an 11-bit exponent part 302e, and a 53-bit mantissa part 302f. The most significant bit of the dividend register mantissa portion 301f and the divisor register mantissa 302f is 1 when the so-called the "hidden bit" of normalized number with the weight of any 2 0, the dividend register 301 and the divisor except this bit The registers 302 both match double precision. Reference numeral 303 denotes a code generation circuit that reads the code of the dividend and divisor from the dividend register code unit 301s and the divisor register code unit 302s to generate the code of the quotient, and 304 denotes the dividend and divisor from the dividend register exponent unit 301e and the divisor register exponent unit 302e. An 11-bit exponent subtractor that reads out the exponent and calculates the quotient exponent performs addition with Cin which is a 1-bit carry input and which is the one's complement of the A and B inputs. Reference numerals 305 and 306 denote 11-bit selectors that select the two inputs of the exponent subtractor 304, 307 denotes a most significant bit correction circuit that inverts the most significant bit of the output of the exponent subtractor 304, and 308.
Is a 1-bit latch that holds the overflow from the most significant bit at the time of addition in exponent subtractor 304, and 309 is the upper overflow of the quotient from the arithmetic precision specified by the output of exponent subtractor 304 and the value of latch 308 (overflow). ) And an exception detection circuit for detecting a lower overflow (underflow), 310 holds the output of the exponent subtractor 304 whose most significant bit has been inverted by the most significant bit correction circuit 307, and again passes through the selector 305 to the exponent subtractor 304. 11-bit latch for input, 311
Is an exponent with the normalization of the 1-bit shift of the quotient mantissa.
A normalization correction value generation circuit for generating a constant for decrementing only, 312 reads the dividend register mantissa part 301f and the divisor register mantissa part 302f and normalizes the mantissa of the quotient. A well-known mantissa arithmetic unit for obtaining a signal and
A quotient register 313 holds a quotient, and is a 1-bit code part 313.
It consists of s, an 11-bit exponent part 313e, and a 53-bit mantissa part 313f. Also the most significant bit of the quotient register mantissa portion 313f when the number of normalized so-called "hidden bit" with a weight of 2 0 is 1, the quotient register 313 except for this bit meets the precision.
【0102】以上のように構成された本実施例の浮動小
数点データの除算装置について、図41に示す除算の動作
フロー図を用いて以下その動作を説明する。同図は指数
減算器304、例外検出回路309、仮数演算部312の処理ス
テップ毎の動作の内容を示したものである。 (1)処理ステップ開始前 被除数および除数が単精度のときは倍精度に拡張してそ
れぞれ被除数レジスタ301と除数レジスタ302に格納す
る。被除数および除数が倍精度のときはそのまま被除数
レジスタ301と除数レジスタ302に格納する。いずれの場
合も被除数レジスタ指数部301eと除数レジスタ指数部30
2eはともに倍精度のバイアス表現(真の指数値=指数部
の値−1023(10))になっている。 (2)ステップ1 セレクタ305により被除数レジスタ指数部301eに保持さ
れた被除数の指数を指数減算器304のA入力に入力し、
セレクタ306により除数レジスタ指数部302eに保持され
た除数の指数を指数減算器304のB入力に入力するとと
もにキャリ入力Cinを0にして指数加算器304においてA
+ ̄B+Cinの加算を行う( ̄BはBの1の補数、Cin=
0のときこの加算はA−B−1と等価である)。加算結
果の最上位ビットを最上位ビット補正回路307で反転す
る。最上位ビットが反転した加算結果をラッチ310に格
納する。ラッチ310に保持される値が正しくバイアスが
かかった商の指数であることは次のように証明できる。 (証明始め)ANSI/IEEE浮動小数点演算規格P754では倍
精度のバイアス値を、The operation of the floating point data division device of the present embodiment having the above configuration will be described below with reference to the operation flow chart of division shown in FIG. The figure shows the contents of the operations of the exponent subtractor 304, the exception detection circuit 309, and the mantissa calculator 312 for each processing step. (1) Before start of processing step When the dividend and the divisor are single precision, they are expanded to double precision and stored in the dividend register 301 and the divisor register 302, respectively. When the dividend and the divisor have double precision, they are stored in the dividend register 301 and the divisor register 302 as they are. In either case, the dividend register exponent part 301e and the divisor register exponent part 30
Both 2e are double-precision bias expressions (true exponent value = exponent part value−1023 (10) ). (2) Step 1 Input the exponent of the dividend held in the dividend register exponent section 301e by the selector 305 to the A input of the exponent subtractor 304,
The exponent of the divisor held in the divisor register exponent unit 302e by the selector 306 is input to the B input of the exponent subtractor 304, and the carry input Cin is set to 0.
+ B + Cin is added (B is the one's complement of B, Cin =
When 0, this addition is equivalent to AB-1). The most significant bit of the addition result is inverted by the most significant bit correction circuit 307. The addition result with the most significant bit inverted is stored in the latch 310. It can be proved that the value held in the latch 310 is an index of the correctly biased quotient. (Begin proof) In ANSI / IEEE floating point arithmetic standard P754, double-precision bias value
【0103】[0103]
【数13】 [Equation 13]
【0104】と定めている。一方、 e1:バイアス表現の被除数の指数部(11ビット) e2:バイアス表現の除数の指数部 (11ビット) ed:バイアス表現の商の指数部 (11ビット) とすると、It is defined as On the other hand, e1: exponent part of dividend of bias expression (11 bits) e2: exponent part of divisor of bias expression (11 bits) ed: exponent part of quotient of bias expression (11 bits)
【0105】[0105]
【数14】 [Numerical equation 14]
【0106】と変形できる( ̄XはXの反転)。第3項の
100 0000 0000(2)の加算は最上位ビットの反転で実現で
きる。 (証明終り)ラッチ308はこの時の指数減算器304におけ
る桁あふれを保持する。仮数演算部312は被除数レジス
タ仮数部301fと除数レジスタ仮数部302fから被除数と除
数を読出して除算を開始する。同時に符号生成回路303
において被除数レジスタ符号部301sと除数レジスタ符号
部302sから被除数および除数の符号を読出して両者の排
他的論理和をとり、商の符号を生成して商レジスタ符号
部313sに格納する。 (3)ステップ2 仮数演算部312は商の仮数部を生成して丸めを行う。生
成した商の仮数部が非正規化数のとき、即ち値が0.5以
上1未満のとき、仮数演算部312は生成した商の仮数部
を1ビット最上位ビット方向にシフトして正規化すると
ともに、セレクタ305およびセレクタ306により指数減算
器304はラッチ310の値から正規化補正値生成回路311が
出力する定数1を減算する。生成した商の仮数部が正規
化数のとき、即ち値が1以上2未満のとき、仮数演算部
312は生成した商の仮数部をそのまま出力するととも
に、セレクタ305により指数減算器304もラッチ310の値
をそのまま出力する。いずれの場合も、仮数演算部312
は、丸め精度が単精度のときは結果の最下位ビットを除
く53ビットの下位29ビットを0にマスクして、丸め精度
が倍精度のときは結果の最下位ビットを除く53ビットを
そのまま商レジスタ仮数部313fに格納し、指数減算器30
4は結果を商レジスタ指数部313eに格納する。ラッチ308
の値は変化させない。例外検出回路309は、丸め精度が
単精度の場合、指数減算器304の出力(Eとする)によ
り商の上位あふれ(OVF)と下位あふれ(UNF)を次の論理に
基づいて検出する。It can be transformed into (X is the inversion of X). Item 3
Addition of 100 0000 0000 (2) can be realized by inverting the most significant bit. (End of certification) The latch 308 holds the overflow in the exponent subtractor 304 at this time. The mantissa calculator 312 reads the dividend and the divisor from the dividend register mantissa part 301f and the divisor register mantissa part 302f, and starts division. At the same time, the code generation circuit 303
At, the code of the dividend and the divisor are read from the dividend register code unit 301s and the divisor register code unit 302s, the exclusive OR of the two is taken, and the quotient code is generated and stored in the quotient register code unit 313s. (3) Step 2 The mantissa calculator 312 generates the mantissa part of the quotient and rounds it. When the mantissa part of the generated quotient is a denormalized number, that is, when the value is 0.5 or more and less than 1, the mantissa arithmetic unit 312 shifts the mantissa part of the generated quotient to the 1-bit most significant bit direction and normalizes it. The selector 305 and selector 306 cause the exponent subtractor 304 to subtract the constant 1 output from the normalized correction value generation circuit 311 from the value in the latch 310. When the mantissa part of the generated quotient is a normalized number, that is, when the value is 1 or more and less than 2, the mantissa operation part
The 312 outputs the mantissa part of the generated quotient as it is, and the exponent subtractor 304 also outputs the value of the latch 310 as it is by the selector 305. In either case, the mantissa calculator 312
Masks the lower 29 bits of the 53 bits excluding the least significant bit of the result to 0 when the rounding precision is single precision, and the 53 bits excluding the least significant bit of the result are rounded as they are when the rounding precision is double precision. Stored in register mantissa 313f, exponent subtractor 30
4 stores the result in the quotient register exponent part 313e. Latch 308
The value of does not change. When the rounding precision is single precision, the exception detection circuit 309 detects the upper overflow (OVF) and the lower overflow (UNF) of the quotient by the output (denoted by E) of the exponent subtractor 304 based on the following logic.
【0107】[0107]
【数15】 [Equation 15]
【0108】丸め精度が倍精度の場合、指数減算器304
の出力(E0,・・・,E10とする)とラッチ308の値(Ceとす
る)により商の上位あふれ(OVF)と下位あふれ(UNF)を次
の論理式に基づいて検出する。ただし、 ̄XはXの反転を
表す。If the rounding precision is double precision, the exponent subtractor 304
Of the quotient ( O 0 , ..., E 10 ) and the value of the latch 308 (Ce), the upper overflow (OVF) and the lower overflow (UNF) of the quotient are detected based on the following logical expressions. However,  ̄X represents the inversion of X.
【0109】[0109]
【数16】 [Equation 16]
【0110】以上のように本実施例によれば、キャリ入
力Cinを0にすることによる指数減算器304での(被除数
の指数)−(除数の指数)−1の減算と最上位ビット補
正回路307での最上位ビットの反転とでバイアス値の加
算を実現し、被除数および除数と同様にバイアスがかか
った浮動小数点形式の商の指数部を単一の処理ステップ
で求めることができるため指数部のバイアスを補正する
ステップを必要となしい。また最上位ビット補正回路30
7は1ビットの排他的論理和ゲートで簡単に実現でき、
その他のバイアス補正のための特別なハードウェアは必
要とせず、ハードウェアを削減できる。As described above, according to this embodiment, the exponent subtractor 304 subtracts (exponent of dividend)-(exponent of divisor) -1 by setting the carry input Cin to 0, and the most significant bit correction circuit. Since the addition of the bias value is realized by the inversion of the most significant bit in 307, and the exponent part of the biased floating-point quotient can be obtained in a single processing step like the dividend and divisor, the exponent part The step of correcting the bias of is unnecessary. Also, the most significant bit correction circuit 30
7 can be easily realized by a 1-bit exclusive OR gate,
No special hardware for bias correction is required and the hardware can be reduced.
【0111】[0111]
【発明の効果】以上説明したように、本発明によれば、
指定した丸めモードと丸め精度で丸めを行なった浮動小
数点データの和、差および積の仮数部を得るのに必要な
処理ステップ数を少なくすることができ、また従来の浮
動小数点データの演算装置に比べて少ないハードウェア
で実現でき、その実用的効果は大きい。As described above, according to the present invention,
It is possible to reduce the number of processing steps required to obtain the mantissa part of the sum, difference, and product of rounded floating-point data with the specified rounding mode and rounding precision. It can be implemented with less hardware, and its practical effects are great.
【0112】また本発明によれば、バイアス補正を行な
った浮動小数点データの商の指数部を得るのに必要な処
理ステップ数を少なくすることができ、また従来の浮動
小数点データの演算装置に比べて少ないハードウェアで
実現でき、その実用的効果は大きい。Further, according to the present invention, it is possible to reduce the number of processing steps required to obtain the exponent part of the quotient of the bias-corrected floating-point data , and it is possible to reduce the number of processing steps compared to the conventional floating-point data arithmetic unit. It can be realized with less hardware, and its practical effect is great.
【図1】本発明の第1の実施例における浮動小数点デー
タの加減算装置のブロック図FIG. 1 is a block diagram of a floating point data addition / subtraction device according to a first embodiment of the present invention.
【図2】本発明の第2の実施例における浮動小数点デー
タの加減算装置のブロック図FIG. 2 is a block diagram of a floating point data addition / subtraction device according to a second embodiment of the present invention.
【図3】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の最近偶丸めモードでの丸め
補正繰返し制御回路109の制御関係図FIG. 3 is a control relationship diagram of a rounding correction iterative control circuit 109 in a nearest even rounding mode of the floating point data adder / subtractor according to the first and second embodiments of the present invention.
【図4】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の最近偶丸めモードでの丸め
補正繰返し制御回路109の制御関係図FIG. 4 is a control relationship diagram of a rounding correction iterative control circuit 109 in a nearest even rounding mode of the floating point data adder / subtractor according to the first and second embodiments of the present invention.
【図5】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の最近偶丸めモードでの丸め
補正繰返し制御回路109の制御関係図FIG. 5 is a control relationship diagram of a rounding correction iterative control circuit 109 in the nearest even rounding mode of the floating point data adder / subtractor according to the first and second embodiments of the present invention.
【図6】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の最近偶丸めモードでの丸め
補正繰返し制御回路109の制御関係図FIG. 6 is a control relationship diagram of a rounding correction iterative control circuit 109 in the nearest even rounding mode of the floating-point data addition / subtraction device in the first and second embodiments of the present invention.
【図7】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の正方向丸めモードまたは負
方向丸めモードでの丸め補正繰返し制御回路109の制御
関係図FIG. 7 is a control relationship diagram of a rounding correction iterative control circuit 109 in a positive rounding mode or a negative rounding mode of the floating-point data adding / subtracting device in the first and second embodiments of the present invention.
【図8】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の正方向丸めモードまたは負
方向丸めモードでの丸め補正繰返し制御回路109の制御
関係図FIG. 8 is a control relationship diagram of a rounding correction iterative control circuit 109 in a positive rounding mode or a negative rounding mode of the floating-point data addition / subtraction device in the first and second embodiments of the present invention.
【図9】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の正方向丸めモードまたは負
方向丸めモードでの丸め補正繰返し制御回路109の制御
関係図FIG. 9 is a control relationship diagram of a rounding correction repeating control circuit 109 in a positive rounding mode or a negative rounding mode of the floating-point data adding / subtracting device according to the first and second embodiments of the present invention.
【図10】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の正方向丸めモードまたは負
方向丸めモードでの丸め補正繰返し制御回路109の制御
関係図FIG. 10 is a control relationship diagram of a rounding correction iterative control circuit 109 in a positive rounding mode or a negative rounding mode of the floating-point data addition / subtraction device in the first and second embodiments of the present invention.
【図11】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の正方向丸めモードまたは負
方向丸めモードでの丸め補正繰返し制御回路109の制御
関係図FIG. 11 is a control relationship diagram of the rounding correction iterative control circuit 109 in the positive-direction rounding mode or the negative-direction rounding mode of the floating-point data addition / subtraction device in the first and second embodiments of the present invention.
【図12】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の正方向丸めモードまたは負
方向丸めモードでの丸め補正繰返し制御回路109の制御
関係図FIG. 12 is a control relationship diagram of a rounding correction repeating control circuit 109 in a positive rounding mode or a negative rounding mode of the floating-point data addition / subtraction device in the first and second embodiments of the present invention.
【図13】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の正方向丸めモードまたは負
方向丸めモードでの丸め補正繰返し制御回路109の制御
関係図FIG. 13 is a control relationship diagram of a rounding correction iterative control circuit 109 in a positive rounding mode or a negative rounding mode of a floating-point data addition / subtraction device in the first and second embodiments of the present invention.
【図14】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の正方向丸めモードまたは負
方向丸めモードでの丸め補正繰返し制御回路109の制御
関係図FIG. 14 is a control relationship diagram of a rounding correction iterative control circuit 109 in a positive rounding mode or a negative rounding mode of the floating-point data addition / subtraction device in the first and second embodiments of the present invention.
【図15】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の正方向丸めモードまたは負
方向丸めモードでの丸め補正繰返し制御回路109の制御
関係図FIG. 15 is a control relationship diagram of the rounding correction iterative control circuit 109 in the positive-direction rounding mode or the negative-direction rounding mode of the floating-point data addition / subtraction device in the first and second embodiments of the present invention.
【図16】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の正方向丸めモードまたは負
方向丸めモードでの丸め補正繰返し制御回路109の制御
関係図FIG. 16 is a control relationship diagram of the rounding correction iterative control circuit 109 in the positive-direction rounding mode or the negative-direction rounding mode of the floating-point data addition / subtraction device in the first and second embodiments of the present invention.
【図17】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の正方向丸めモードまたは負
方向丸めモードでの丸め補正繰返し制御回路109の制御
関係図FIG. 17 is a control relationship diagram of the rounding correction iterative control circuit 109 in the positive rounding mode or the negative rounding mode of the floating-point data addition / subtraction device in the first and second embodiments of the present invention.
【図18】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の正方向丸めモードまたは負
方向丸めモードでの丸め補正繰返し制御回路109の制御
関係図FIG. 18 is a control relationship diagram of the rounding correction iterative control circuit 109 in the positive rounding mode or the negative rounding mode of the floating-point data adding / subtracting device according to the first and second embodiments of the present invention.
【図19】本発明の第2の実施例における浮動小数点デー
タの加減算装置のキャリ制御装置115の制御関係図FIG. 19 is a control relationship diagram of the carry control device 115 of the floating point data addition / subtraction device according to the second embodiment of the present invention.
【図20】本発明の第2の実施例における浮動小数点デー
タの加減算装置のキャリ制御装置115の制御関係図FIG. 20 is a control relationship diagram of a carry control device 115 of the floating point data addition / subtraction device according to the second embodiment of the present invention.
【図21】本発明の第2の実施例における浮動小数点デー
タの加減算装置のキャリ制御装置115の制御関係図FIG. 21 is a control relationship diagram of a carry control device 115 of an adding / subtracting device for floating-point data according to the second embodiment of the present invention.
【図22】本発明の第2の実施例における浮動小数点デー
タの加減算装置のキャリ制御装置115の制御関係図FIG. 22 is a control relationship diagram of the carry control device 115 of the addition / subtraction device for floating-point data according to the second embodiment of the present invention.
【図23】従来の浮動小数点データの加減算装置と本発明
の第1および第2の実施例における浮動小数点データの
加減算装置の処理フロー図FIG. 23 is a processing flowchart of a conventional floating point addition / subtraction device and floating point data addition / subtraction devices according to the first and second embodiments of the present invention.
【図24】本発明の第1の実施例における浮動小数点デー
タの加減算装置の丸め値生成回路106の入出力関係図FIG. 24 is an input / output relationship diagram of the rounding value generation circuit 106 of the floating point data addition / subtraction device according to the first embodiment of the present invention.
【図25】本発明の第1の実施例における浮動小数点デー
タの加減算装置の丸め値生成回路106の入出力関係図FIG. 25 is an input / output relationship diagram of the rounding value generation circuit 106 of the floating point data addition / subtraction device according to the first embodiment of the present invention.
【図26】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の加算器動作と演算結果の符
号決定方法の符号演算関係図FIG. 26 is a code operation relation diagram of the adder operation of the floating-point data addition / subtraction device and the operation result code determination method in the first and second embodiments of the present invention.
【図27】従来の浮動小数点データの加減算装置と本発明
の第1および第2の実施例における浮動小数点データの
加減算装置の丸め加算の有無を示す説明図FIG. 27 is an explanatory diagram showing the presence / absence of rounding addition in the conventional floating point data addition / subtraction device and the floating point data addition / subtraction devices in the first and second embodiments of the present invention.
【図28】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の最近値丸めモードおよび正
方向負方向丸めモード丸めモードでの丸め加算時の桁上
げ発生の原理図FIG. 28 is a principle diagram of a carry occurrence at the time of rounding addition in the nearest value rounding mode and the positive direction negative direction rounding mode rounding mode of the floating-point data addition / subtraction device in the first and second embodiments of the present invention.
【図29】本発明の第1および第2の実施例における浮動
小数点データの加減算装置の原理となる加減算の態様図FIG. 29 is a mode diagram of addition / subtraction, which is the principle of the floating-point data addition / subtraction device in the first and second embodiments of the present invention.
【図30】本発明の第3の実施例における浮動小数点デー
タの乗算装置のブロック図FIG. 30 is a block diagram of a floating point data multiplication device according to a third embodiment of the present invention.
【図31】同実施例における被乗数上位下位選択回路212
および乗数上位下位選択回路213の内部ブロック図FIG. 31 is a multiplicand upper / lower selection circuit 212 in the embodiment.
And block diagram of multiplier upper / lower selection circuit 213
【図32】同実施例における丸め加算値生成回路217の動
作説明図FIG. 32 is an operation explanatory diagram of the rounded addition value generation circuit 217 in the embodiment.
【図33】同実施例における仮数補正制御回路224の制御
関係図FIG. 33 is a control relation diagram of the mantissa correction control circuit 224 in the embodiment.
【図34】同実施例における仮数補正制御回路224の制御
関係図FIG. 34 is a control relationship diagram of the mantissa correction control circuit 224 in the same embodiment.
【図35】同実施例における単精度乗算の動作フロー図FIG. 35 is an operation flowchart of single precision multiplication in the embodiment.
【図36】同実施例における単精度乗算時の加算およびシ
フトの態様図FIG. 36 is a mode diagram of addition and shift at the time of single precision multiplication in the embodiment.
【図37】同実施例における倍精度乗算の動作フロー図FIG. 37 is an operation flowchart of double-precision multiplication in the example.
【図38】同実施例における倍精度乗算時の加算およびシ
フトの態様図FIG. 38 is a mode diagram of addition and shift at the time of double-precision multiplication in the example.
【図39】同実施例における倍精度乗算時の加算およびシ
フトの態様図FIG. 39 is a mode diagram of addition and shift at the time of double-precision multiplication in the example.
【図40】本発明の第4の実施例における浮動小数点デー
タの除算装置のブロック図FIG. 40 is a block diagram of a floating point data division device according to a fourth embodiment of the present invention.
【図41】同実施例における除算の動作フロー図FIG. 41 is an operation flowchart of division in the embodiment.
【図42】従来の浮動小数点データの加減算装置のブロッ
ク図FIG. 42 is a block diagram of a conventional floating point data addition / subtraction device.
【図43】従来の浮動小数点データの乗算装置のブロック
図FIG. 43 is a block diagram of a conventional floating point data multiplication device.
【図44】同従来例における丸め加算値生成回路267の動
作説明図FIG. 44 is an operation explanatory diagram of the rounded addition value generation circuit 267 in the conventional example.
【図45】同従来例における単精度乗算の動作フロー図FIG. 45 is an operation flowchart of single precision multiplication in the conventional example.
【図46】同従来例における倍精度乗算の動作フロー図FIG. 46 is an operation flowchart of double precision multiplication in the conventional example.
101 レジスタ 102 レジスタ 110 レジスタ 113 レジスタ 103 マルチプレクサ 104 マルチプレクサ 105 補数器 106 丸め値生成回路 107 加算器 114 加算器 108 LR1シフタ 109 丸め補正繰返し制御回路 111 シフト数生成回路 112 バレルシフタ 115 キャリ制御装置 101 register 102 register 110 register 113 register 103 multiplexer 103 multiplexer 105 complementer 106 rounding value generation circuit 107 adder 114 adder 108 LR1 shifter 109 rounding correction repetition control circuit 111 shift number generation circuit 112 barrel shifter 115 carry control device
Claims (41)
しくは異符号の減算である真の仮数加算の時は同一指数
に桁合せを行なった第1と第2の仮数の加算と加算を行
なうことおよび丸め精度および丸めモードおよび演算結
果の符号によって一意に定まる丸め加算値との加算とを
同時に行ない、浮動小数点データの演算が同符号の減算
もしくは異符号の加算である真の仮数減算の時は同一指
数に桁合せを行なった第1と第2の仮数の減算と減算を
行なうことおよび丸め精度および丸めモードおよび演算
結果の符号によって一意に定まる丸め加算値との加算と
を同時に行ない、前記第1と第2の仮数および丸め加算
値の加減算ののち演算結果が非正規化数の時は前記演算
結果を1ビットシフトして正規化し、前記正規化ののち
正規化された演算結果の中から真の仮数加算か真の仮数
減算のいずれであるかを示す演算の種類と丸め精度によ
って定まる最下位ビットを含む複数のビットを検査して
前記正規化された演算結果のうち丸め精度によって定ま
る前記最下位ビットまでが所定の精度に丸めた第1の仮
数と第2の仮数の真の仮数加算もしくは真の仮数減算に
対して一致するか、検査したビットより上位への桁上げ
が一致して検査したビットだけが一致しないか、検査し
たビットより上位への桁上げも検査したビットより上位
のビットも一致しないかを判断し、前記判断結果に基づ
いて処理を終了するか、前記正規化された演算結果に対
して検査したビットの一部あるいは全部を補正して処理
を終了するか、前記正規化された演算結果に対して再び
前記丸め加算値を加算して処理を終了するかのいずれか
を行なう浮動小数点データの加減算方法。1. In the case of true mantissa addition in which floating-point data is arithmetically added with the same sign or subtracted with the different sign, addition and addition of the first and second mantissas in which the same exponent is aligned are performed. And a true mantissa subtraction in which the floating-point data is subtracted with the same sign or added with the different sign by simultaneously performing the addition with the rounding addition value that is uniquely determined by the rounding precision, the rounding mode, and the sign of the operation result. Simultaneously performs subtraction and subtraction of the first and second mantissas digit-matched to the same exponent and addition with a rounding addition value that is uniquely determined by the rounding precision, the rounding mode, and the sign of the operation result. After the addition and subtraction of the first and second mantissas and the rounded addition value, when the operation result is a denormalized number, the operation result is shifted by 1 bit for normalization, and the normalized operation is then performed. Rounding out of the normalized operation results by inspecting a plurality of bits including the least significant bit determined by the type of operation and the rounding precision that indicates whether it is true mantissa addition or true mantissa subtraction from the result Carry up to higher bits than the checked bit whether the least significant bit determined by precision matches the true mantissa addition or the true mantissa subtraction of the first mantissa and the second mantissa rounded to a predetermined precision. Is not matched, only a bit that has been inspected does not match, a carry to the higher order of the inspected bit or a higher order bit of the inspected bit does not match, and the process is terminated based on the result of the determination, A part or all of the bits inspected for the normalized operation result are corrected and the processing is terminated, or the rounded addition value is added again to the normalized operation result and the processing is terminated. Addition and subtraction method of floating-point data of the conduct either to.
算と1ビットシフトの正規化と検査とを1つの処理ステ
ップで行ない、前記検査の結果当該検査ビットより上位
への桁上げが一致して検査したビットだけが一致しない
場合は、検査したビットの一部あるいは全部の補正をさ
らに前記処理ステップ内で行ない、前記検査の結果当該
検査ビットより上位への桁上げが一致しない場合は、前
記正規化された演算結果に対する前記丸め加算値の再加
算を前記処理ステップ終了後に新たな処理ステップを挿
入して行なう請求項1記載の浮動小数点データの加減算
方法。2. The addition and subtraction of the first and second mantissas and the rounded addition value, the normalization of 1-bit shift, and the check are performed in one processing step, and as a result of the check, a carry to a higher order than the check bit is performed. If only the checked and matched bits do not match, a part or all of the checked bits are further corrected in the processing step, and if the result of the check is that the carry to the higher order bit does not match. 2. The floating point data addition / subtraction method according to claim 1, wherein the rounded addition value is re-added to the normalized operation result by inserting a new processing step after the processing step is completed.
時の丸め加算値が、丸め精度が2進小数第23位までを有
する単精度で最近偶丸めモードの時または前記単精度で
正方向丸めモードで演算結果の符号が正の時または前記
単精度で負方向丸めモードで演算結果の符号が負の時は
2の-24乗の重みを持つビットを1にして他のビットを
0にした数値で、丸め精度が2進小数第52位までを有す
る倍精度で最近偶丸めモードの時または前記倍精度で正
方向丸めモードで演算結果の符号が正の時または前記倍
精度で負方向丸めモードで出力符号が負の時は2の-53
乗の重みを持つビットを1にして他のビットを0にした
数値で、上記以外の時はすべてのビットを0にした数値
である請求項1記載の浮動小数点データの加減算方法。3. The rounding addition value when the floating point data is calculated by adding a true mantissa is a single precision having a rounding precision of up to 23 decimal places, and is the nearest even rounding mode, or positive in the single precision. When the sign of the operation result is positive in the direction rounding mode or when the sign of the operation result is negative in the single-direction negative rounding mode, the bit having the weight of 2-24 is set to 1 and the other bits are set to 0. The rounding precision is a double precision having up to 52 decimal places in the rounding precision in the even even rounding mode or the positive precision in the double precision rounding mode and the sign of the operation result is positive or the negative in the double precision. -53 of 2 when the output sign is negative in direction rounding mode
2. A method of adding / subtracting floating-point data according to claim 1, wherein the bit having the weight of the power is a value set to 1 and the other bits are set to 0, and all other bits are set to 0 in the other cases.
時の丸め加算値が、丸め精度が2進小数第23位までを有
する単精度で正方向丸めモードで演算結果の符号が正の
時または前記単精度で負方向丸めモードで演算結果の符
号が負の時は2の-23乗の重みを持つビットを1にして
他のビットを0にした数値で、丸め精度が2進小数第52
位までを有する倍精度で正方向丸めモードで演算結果の
符号が正の時または前記倍精度で負方向丸めモードで出
力符号が負の時は2の-52乗の重みを持つビットを1に
して他のビットを0にした数値で、上記以外の時はすべ
てのビットを0にした数値である請求項1記載の浮動小
数点データの加減算方法。4. The rounded addition value when the floating point data is calculated by adding a true mantissa, the rounding precision is a single precision having a binary fraction of up to 23 decimal places, and the sign of the operation result is positive in the positive direction rounding mode. If the sign of the operation result is negative in the negative precision rounding mode in the above single precision or the above-mentioned single precision, it is a numerical value in which the bit having a weight of 2-23 is set to 1 and the other bits are set to 0, and the rounding precision is a binary decimal. 52nd
If the sign of the operation result is positive in the double-precision, positive-direction rounding mode that has up to the order, or if the output sign is negative in the double-precision, negative-direction rounding mode, set the bit with the weight of -52 to 2 to 1 2. A method of adding / subtracting floating-point data according to claim 1, wherein the value is a value in which other bits are set to 0, and the value is set to 0 in all other cases except the above.
時の丸め加算値が、丸め精度が2進小数第23位までを有
する単精度で正方向丸めモードで演算結果の符号が正の
時または前記単精度で負方向丸めモードで演算結果の符
号が負の時は2の-24乗の重みを持つビットとそれより
小さい重みを持つビットとを1にして他のビットを0に
した数値で、丸め精度が2進小数第52位までを有する倍
精度で正方向丸めモードで演算結果の符号が正の時また
は前記倍精度で負方向丸めモードで出力符号が負の時は
2の-53乗の重みを持つビットとそれより小さい重みを
持つビットとを1にして他のビットを0にした数値で、
上記以外の時はすべてのビットを0にした数値である請
求項1記載の浮動小数点データの加減算方法。5. The rounded addition value when the floating-point data operation is a true mantissa addition is a single-precision forward rounding mode in which the rounding precision has up to 23 decimal places, and the sign of the operation result is positive. When the sign of the operation result is negative in the case of negative precision rounding mode in the above single precision, the bit having a weight of 2-24 and the bit having a weight less than that are set to 1 and the other bits are set to 0. Numerical value, the rounding precision is up to 52 decimal places, and is 2 when the sign of the operation result is positive in double precision and positive direction rounding mode or the output sign is negative in the double precision and negative direction rounding mode. -A number that sets the bit with weight of 5th power and the bit with weight less than 1 to 1 and other bits to 0,
The addition / subtraction method of floating-point data according to claim 1, wherein the value is a value in which all bits are set to 0 at times other than the above.
時の丸め加算値が、丸め精度が2進小数第23位までを有
する単精度で最近偶丸めモードの時または前記単精度で
正方向丸めモードで演算結果の符号が正の時または前記
単精度で負方向丸めモードで演算結果の符号が負の時は
2の-25乗の重みを持つビットを1にして他のビットを
0にした数値で、丸め精度が2進小数第52位までを有す
る倍精度で最近偶丸めモードの時または前記倍精度で正
方向丸めモードで演算結果の符号が正の時または前記倍
精度で負方向丸めモードで出力符号が負の時は2の-54
乗の重みを持つビットを1にして他のビットを0にした
数値で、上記以外の時はすべてのビットを0にした数値
である請求項1記載の浮動小数点データの加減算方法。6. The rounding addition value when the floating-point data operation is true mantissa subtraction is a single precision having a rounding precision of up to 23 decimal places and is the nearest even rounding mode, or positive in the single precision. When the sign of the operation result is positive in the direction rounding mode or when the sign of the operation result is negative in the single-direction negative direction rounding mode, the bit having the weight of 2-25 is set to 1 and the other bits are set to 0. The rounding precision is a double precision having up to 52 decimal places in the rounding precision in the even even rounding mode or the positive precision in the double precision rounding mode and the sign of the operation result is positive or the negative in the double precision. -54 of 2 when the output sign is negative in the direction rounding mode
2. A method of adding / subtracting floating-point data according to claim 1, wherein the bit having the weight of the power is a value set to 1 and the other bits are set to 0, and all other bits are set to 0 in the other cases.
時の丸め加算値が、丸め精度が2進小数第23位までを有
する単精度で正方向丸めモードで演算結果の符号が正の
時または前記単精度で負方向丸めモードで演算結果の符
号が負の時は2の-24乗の重みを持つビットを1にして
他のビットを0にした数値で、丸め精度が2進小数第52
位までを有する倍精度で正方向丸めモードで演算結果の
符号が正の時または前記倍精度で負方向丸めモードで出
力符号が負の時は2の-53乗の重みを持つビットを1に
して他のビットを0にした数値で、上記以外の時はすべ
てのビットを0にした数値である請求項1記載の浮動小
数点データの加減算方法。7. The rounded addition value when the floating point data is calculated by the true mantissa subtraction is single precision with the rounding precision having up to 23 decimal places, and the sign of the operation result is positive in the forward rounding mode. If the sign of the operation result is negative in the above-mentioned single-precision negative-direction rounding mode, the bit with a weight of 2-24 is set to 1 and the other bits are set to 0. Rounding precision is a binary decimal. 52nd
If the sign of the operation result is positive in the double-precision, positive-direction rounding mode that has up to the order, or if the output sign is negative in the double-precision, negative-direction rounding mode, set the bit with a weight of -53 to 2 to 1 2. A method of adding / subtracting floating-point data according to claim 1, wherein the value is a value in which other bits are set to 0, and the value is set to 0 in all other cases except the above.
時の丸め加算値が、丸め精度が2進小数第23位までを有
する単精度で正方向丸めモードで演算結果の符号が正の
時または前記単精度で負方向丸めモードで演算結果の符
号が負の時は2の-25乗の重みを持つビットとそれより
小さい重みを持つビットとを1にして他のビットを0に
した数値で、丸め精度が2進小数第52位までを有する倍
精度で正方向丸めモードで演算結果の符号が正の時また
は前記倍精度で負方向丸めモードで出力符号が負の時は
2の-54乗の重みを持つビットとそれより小さい重みを
持つビットとを1にして他のビットを0にした数値で、
上記以外の時はすべてのビットを0にした数値である請
求項1記載の浮動小数点データの加減算方法。8. The rounding addition value when the floating-point data operation is a true mantissa subtraction is a single-precision forward rounding mode in which the rounding precision has up to 23 decimal places, and the sign of the operation result is positive. If the sign of the operation result is negative in the negative precision rounding mode in the above single precision, the bit having a weight of 2-25 and the bit having a weight less than that are set to 1 and the other bits are set to 0. Numerical value, the rounding precision is up to 52 decimal places, and is 2 when the sign of the operation result is positive in double precision and positive direction rounding mode or the output sign is negative in the double precision and negative direction rounding mode. -A number that sets the bit with weight of 5 to the power of 4 and the bit with lower weight to 1 and other bits to 0,
The addition / subtraction method of floating-point data according to claim 1, wherein the value is a value in which all bits are set to 0 at times other than the above.
ビットが、浮動小数点データの演算が真の仮数加算でか
つ丸め精度が2進小数第23位までを有する単精度の時は
2の-22乗と2の-23乗と2の-24乗の重みを持つ3ビッ
トとそれより小さい重みを持つ各ビットの論理和をとっ
た1ビットで、真の仮数加算でかつ丸め精度が2進小数
第52位までを有する倍精度の時は2の-51乗と2の-52乗
と2の-53乗の重みを持つ3ビットとそれより小さい重
みを持つ各ビットの論理和をとった1ビットで、真の仮
数減算で前記単精度の時は2の-23乗と2の-24乗の重み
を持つ各ビットとそれより小さい重みを持つ各ビットの
論理和をとった1ビットで、真の仮数減算で前記倍精度
の時2の-52乗と2の-53乗と2の-54乗の重みを持つビ
ットとそれより小さい重みを持つビットの論理和をとっ
た1ビットである請求項1記載の浮動小数点データの加
減算方法。9. When the check bit of the normalized operation result after the normalization is single precision when the floating point data operation is true mantissa addition and the rounding precision has up to 23 decimal places of binary fraction. It is a 1-bit that is the logical sum of 3 bits with weights of −22, 2−23 and 2−24, and each bit with a weight less than that, with true mantissa addition and rounding precision. In the case of double precision with up to the 52th decimal place, the logical sum of 3 bits with the weight of 2 -51, 2 -52 and 2 -53 and each bit with less weight is calculated. 1 bit is taken, and in the case of the above-mentioned single precision in true mantissa subtraction, each bit having a weight of 2 -23 and 2 -24 is ORed with each bit having a weight less than 1 Bits with weights of -52, 2 -53 and 2 -54 when double precision is used in true mantissa subtraction and bits with weights smaller than that. 2. The method of adding / subtracting floating-point data according to claim 1, wherein the addition / subtraction is 1 bit obtained by logically summing the bits.
丸め精度が2進小数第23位までを有する単精度の時は2
の-23乗の重みを持つビットまたは2の-22乗と2の-23
乗の重みを持つビットで、丸め精度が2進小数第52位ま
でを有する倍精度の時は2の-52乗の重みを持つビット
または2の-51乗と2の-52乗の重みを持つビットである
請求項1記載の浮動小数点データの加減算方法。10. A bit to be corrected based on the judgment result is
2 if the rounding precision is single precision with up to 23 decimal places
Bits with weight of -23 or 2 -22 and 2 -23
Bits with power of 2 and rounding precision with double precision having up to 52 decimal places, bits with weight of -52 to 2 or weight of -51 to 2 and -52 to 2 The addition / subtraction method for floating-point data according to claim 1, wherein the addition / subtraction is a bit that has.
もしくは異符号の減算である真の仮数加算か同符号の減
算もしくは異符号の加算である真の仮数減算のいずれで
あるかを示す演算の種類と丸め精度と丸めモードと演算
結果の符号によって一意に定まる丸め加算値を生成する
丸め加算値生成手段と、真の仮数加算時は同一指数に桁
合せを行なった第1と第2の仮数の加算と前記加算結果
と前記丸め加算値生成手段が生成する丸め加算値との加
算とを同時に行ない真の仮数減算時は同一指数に桁合せ
を行なった第1と第2の仮数の減算と前記減算結果と前
記丸め加算値生成手段が生成する丸め加算値との加算と
を同時に行なう仮数加減算実行手段と、前記仮数加減算
実行手段による演算結果が非正規化数の時は前記演算結
果をシフトして正規化する正規化手段と、前記正規化手
段の出力の中から丸め精度によって定まる最下位ビット
を含む複数のビットを検査して前記正規化手段の出力の
うち丸め精度によって定まる前記最下位ビットまでが所
定の精度に丸めた第1の仮数と第2の仮数の真の仮数加
算もしくは真の仮数減算に対して一致するか、検査した
ビットより上位への桁上げが一致して検査したビットだ
けが一致しないか、検査したビットより上位への桁上げ
も検査したビットより上位のビットも一致しないかを判
断する演算結果検査手段と、前記正規化手段の出力に対
して前記演算結果検査手段が検査したビットの一部ある
いは全部を補正する丸め補正手段とを備え、前記演算結
果検査手段が前記正規化手段の出力のうち丸め精度によ
って定まる前記最下位ビットまでが所定の精度に丸めた
第1の仮数と第2の仮数の真の仮数加算もしくは真の仮
数減算に対して一致すると判断した場合は処理を終了
し、検査したビットより上位への桁上げが一致して検査
したビットだけが一致しないと判断した場合は前記丸め
補正手段により前記正規化手段の出力の一部あるいは全
部を補正して処理を終了し、検査したビットより上位へ
の桁上げも検査したビットより上位のビットも一致しな
いと判断した場合は前記正規化手段の出力に対して前記
丸め加算値生成手段および前記仮数加減算実行手段によ
り再び丸め加算値を加算して処理を終了することを特徴
とする浮動小数点データの加減算装置。11. An operation indicating whether the operation of floating-point data is a true mantissa addition that is addition of the same sign or a subtraction of different signs, or a subtraction of the same sign or a true mantissa subtraction that is addition of different signs. Rounding addition value generation means for generating a rounding addition value that is uniquely determined by the type, rounding precision, rounding mode, and sign of the operation result, and the first and second numbers that perform digit alignment on the same exponent during true mantissa addition. Simultaneous addition of the mantissa and addition of the addition result and the rounded addition value generated by the rounding addition value generation means are performed at the same time, and at the time of true mantissa subtraction, the first and second mantissas are digit-matched to the same exponent. And the mantissa addition / subtraction executing means for simultaneously performing addition of the subtraction result and the rounding addition value generated by the rounding addition value generating means, and the operation result when the operation result by the mantissa addition / subtraction executing means is a denormalized number. Shift positive A plurality of bits including the least significant bit determined by rounding precision from the output of the normalizing means and the normalizing means, and the least significant bit determined by the rounding precision among the outputs of the normalizing means Only the bits that have been checked because they match the true mantissa addition or true mantissa subtraction of the first mantissa and the second mantissa rounded to a predetermined precision An operation result inspecting unit that determines whether they do not match, or whether a carry to an upper bit of the inspected bit does not match an upper bit of the inspected bit, and the operation result inspecting unit inspects the output of the normalizing unit. Rounding correction means for correcting a part or all of the processed bits, and the operation result inspection means outputs up to the least significant bit among the outputs of the normalization means. When it is determined that the first mantissa and the second mantissa rounded to a constant precision match in true mantissa addition or true mantissa subtraction, the process is terminated, and the carry to the higher bits than the inspected bit is one. If it is determined that only the inspected bits do not match, the rounding correction means corrects a part or all of the output of the normalization means to end the processing, and the carry to the higher order than the inspected bits is also inspected. If it is determined that the bits higher than the above bit do not match, the rounding addition value generating means and the mantissa addition / subtraction executing means add the rounding addition value again to the output of the normalizing means, and the processing is terminated. Characteristic floating point data addition / subtraction device.
の仮数および丸め加算値の加減算と正規化手段における
正規化と演算結果検査手段における検査とを1つのマシ
ンサイクルで行ない、前記検査の結果当該検査ビットよ
り上位への桁上げが一致して検査したビットだけが一致
しない場合は、丸め補正手段における検査したビットの
一部あるいは全部の補正をさらに前記マシンサイクル内
で行ない、前記検査の結果当該検査ビットより上位への
桁上げが一致しない場合は、前記仮数加減算実行手段に
おける丸め加算値の再加算を前記マシンサイクル終了後
に新たなマシンサイクルを挿入して行なう請求項11記載
の浮動小数点データの加減算装置。12. A first and second mantissa addition / subtraction executing means.
The addition and subtraction of the mantissa and the rounded addition value, the normalization by the normalizing means, and the check by the operation result checking means are performed in one machine cycle, and as a result of the check, it is inspected that the carry to the higher order than the check bit is the same. If only the bits do not match, a part or all of the checked bits in the rounding correction means are further corrected within the machine cycle, and if the result of the check is that the carry to the higher order than the check bit does not match, 12. The addition / subtraction device for floating-point data according to claim 11, wherein the rounding addition value in the mantissa addition / subtraction executing means is added again by inserting a new machine cycle after the end of the machine cycle.
値が、浮動小数点データの演算が真の仮数加算の時で、
丸め精度が2進小数第23位までを有する単精度で最近偶
丸めモードの時または前記単精度で正方向丸めモードで
演算結果の符号が正の時または前記単精度で負方向丸め
モードで演算結果の符号が負の時は2の-24乗の重みを
持つビットを1にして他のビットを0にした数値で、丸
め精度が2進小数第52位までを有する倍精度で最近偶丸
めモードの時または前記倍精度で正方向丸めモードで演
算結果の符号が正の時または前記倍精度負方向丸めモー
ドで出力符号が負の時は2の-53乗の重みを持つビット
を1にして他のビットを0にした数値で、浮動小数点デ
ータの演算が真の仮数減算の時で、丸め精度が前記単精
度で最近偶丸めモードの時または前記単精度で正方向丸
めモードで演算結果の符号が正の時または前記単精度で
負方向丸めモードで演算結果の符号が負の時は2の-25
乗の重みを持つビットを1にして他のビットを0にした
数値で、丸め精度が前記倍精度で最近偶丸めモードの時
または前記倍精度で正方向丸めモードで演算結果の符号
が正の時または前記倍精度で負方向丸めモードで出力符
号が負の時は2の-54乗の重みを持つビットを1にして
他のビットを0にした数値で、上記以外の時はすべての
ビットを0にした数値である請求項11記載の浮動小数点
データの加減算装置。13. The rounded addition value generated by the rounded addition value generation means is when the operation of floating-point data is true mantissa addition,
Rounding precision with up to 23 decimal places in single precision in the even rounding mode or in the above single precision in the positive direction rounding mode When the sign of the operation result is positive or in the above single precision in the negative direction rounding mode When the sign of the result is negative, it is a numerical value in which the bit having the weight of 2-24 is set to 1 and the other bits are set to 0, and the rounding precision is the double even precision rounding up to the 52nd decimal place. In mode or in the double precision positive rounding mode when the sign of the operation result is positive or in the double precision negative direction rounding mode and the output sign is negative, set the bit with the weight of -53 to 2 to 1. And the other bits are set to 0, the floating-point data operation is true mantissa subtraction, the rounding precision is the single precision and the even rounding mode, or the single precision is the positive direction rounding mode. When the sign of is positive or in the single precision in the negative direction rounding mode -25 if the sign of the result is negative
A value in which the bit with the weight of the power of 1 is set to 1 and the other bits are set to 0. When the rounding precision is the double precision and the even rounding mode is in the nearest even rounding mode, or the double precision is the positive direction rounding mode, the sign of the operation result is positive. If the output sign is negative in negative double-precision rounding mode with the above double precision, it is a numerical value in which the bit having the weight of -54 to 2 is set to 1 and the other bits are set to 0. In other cases, all bits are set. 12. The floating point data adding / subtracting device according to claim 11, which is a numerical value in which is zero.
値が、浮動小数点データの演算が真の仮数加算の時で、
丸め精度が2進小数第23位までを有する単精度で正方向
丸めモードで演算結果の符号が正の時または前記単精度
で負方向丸めモードで演算結果の符号が負の時は2の-2
3乗の重みを持つビットを1にして他のビットを0にし
た数値で、丸め精度が2進小数第52位までを有する倍精
度で正方向丸めモードで演算結果の符号が正の時または
前記倍精度負方向丸めモードで出力符号が負の時は2の
-52乗の重みを持つビットを1にして他のビットを0に
した数値で、浮動小数点データの演算が真の仮数減算の
時で、丸め精度が前記単精度で正方向丸めモードで演算
結果の符号が正の時または前記単精度で負方向丸めモー
ドで演算結果の符号が負の時は2の-24乗の重みを持つ
ビットを1にして他のビットを0にした数値で、丸め精
度が前記倍精度で正方向丸めモードで演算結果の符号が
正の時または前記倍精度で負方向丸めモードで出力符号
が負の時は2の-53乗の重みを持つビットを1にして他
のビットを0にした数値で、上記以外の時はすべてのビ
ットを0にした数値である請求項11記載の浮動小数点デ
ータの加減算装置。14. The rounded addition value generated by the rounded addition value generation means is when the operation of floating-point data is true mantissa addition,
If the sign of the operation result is positive in the single-precision, positive-direction rounding mode with rounding precision up to 23 decimal places, or if the sign of the operation result is negative in the single-precision, negative-direction rounding mode, the value of 2 is- 2
A numeric value in which the bit with the weight of the third power is set to 1 and the other bits are set to 0, and the rounding precision is double precision with binary fraction up to the 52nd decimal place. If the output sign is negative in the double-precision negative-direction rounding mode, it becomes 2
-A numerical value in which the bit with the weight of the 52nd power is set to 1 and the other bits are set to 0. When the floating point data is calculated by true mantissa subtraction, the rounding precision is the single precision and the calculation result in the forward rounding mode. When the sign of is positive or when the sign of the operation result is negative in the above-mentioned single precision negative direction rounding mode, the bit with weight of 2-24 is set to 1 and the other bits are set to 0, and rounded. When the precision is the above-mentioned double precision and the positive direction rounding mode and the sign of the operation result is positive, or when the above-mentioned double precision and the negative direction rounding mode and the output sign is negative, the bit having the weight of -53 to 2 is set to 1. 12. The floating-point data adding / subtracting device according to claim 11, which is a numerical value in which other bits are set to 0 and is set to a numerical value in which all the bits are set to 0 in cases other than the above.
値が、浮動小数点データの演算が真の仮数加算の時で、
丸め精度が2進小数第23位までを有する単精度で正方向
丸めモードで演算結果の符号が正の時または前記単精度
で負方向丸めモードで演算結果の符号が負の時は2の-2
4乗の重みを持つビットとそれより小さい重みを持つビ
ットとを1にして他のビットを0にした数値で、丸め精
度が2進小数第52位までを有する倍精度で正方向丸めモ
ードで演算結果の符号が正の時または前記倍精度負方向
丸めモードで出力符号が負の時は2の-53乗の重みを持
つビットとそれより小さい重みを持つビットとを1にし
て他のビットを0にした数値で、浮動小数点データの演
算が真の仮数減算の時で、丸め精度が前記単精度で正方
向丸めモードで演算結果の符号が正の時または前記単精
度で負方向丸めモードで演算結果の符号が負の時は2の
-25乗の重みを持つビットとそれより小さい重みを持つ
ビットとを1にして他のビットを0にした数値で、丸め
精度が前記倍精度で正方向丸めモードで演算結果の符号
が正の時または前記倍精度で負方向丸めモードで出力符
号が負の時は2の-54乗の重みを持つビットとそれより
小さい重みを持つビットとを1にして他のビットを0に
した数値で、上記以外の時はすべてのビットを0にした
数値である請求項11記載の浮動小数点データの加減算装
置。15. The rounded addition value generated by the rounded addition value generation means is when the operation of floating-point data is true mantissa addition,
If the sign of the operation result is positive in the single-precision, positive-direction rounding mode with rounding precision up to 23 decimal places, or if the sign of the operation result is negative in the single-precision, negative-direction rounding mode, the value of 2 is- 2
It is a numerical value in which the bit with the weight of the fourth power and the bit with the weight less than that are set to 1 and the other bits are set to 0, and the rounding precision is double precision with up to the 52nd decimal place. When the sign of the operation result is positive or when the output sign is negative in the double-precision negative direction rounding mode, the bit having a weight of -53 to the power of 2 and the bit having a weight smaller than that are set to 1 and other bits are set. Is 0, the floating-point data operation is true mantissa subtraction, the rounding precision is the single precision and the positive direction rounding mode, and the sign of the operation result is positive, or the single precision is the negative direction rounding mode. When the sign of the operation result is negative,
-A numerical value in which bits with weights of -25th power and bits with lower weights are set to 1 and other bits are set to 0. Rounding precision is double precision, and the sign of the operation result is positive in the positive direction rounding mode. When the output sign is negative in negative precision rounding mode with double precision, the bit with weight of -54 to 2 and the bit with weight less than 1 are set to 1 and the other bits are set to 0. 12. The addition / subtraction device for floating-point data according to claim 11, which is a numerical value in which all bits are set to 0 at times other than the above.
浮動小数点データの演算が真の仮数加算でかつ丸め精度
が2進小数第23位までを有する単精度の時は2の-22乗
と2の-23乗と2の-24乗の重みを持つ3ビットとそれよ
り小さい重みを持つ各ビットの論理和をとった1ビット
で、真の仮数加算でかつ丸め精度が2進小数第52位まで
を有する倍精度の時は2の-51乗と2の-52乗と2の-53
乗の重みを持つ3ビットとそれより小さい重みを持つ各
ビットの論理和をとった1ビットで、真の仮数減算で前
記単精度の時は2の-23乗と2の-24乗と2の-25乗の重
みを持つ3ビットとそれより小さい重みを持つ各ビット
の論理和をとった1ビットで、真の仮数減算で前記倍精
度の時は2の-52乗と2の-53乗と2の-54乗の重みを持
つ3ビットとそれより小さい重みを持つ各ビットの論理
和をとった1ビットである請求項11記載の浮動小数点デ
ータの加減算装置。16. The bit checked by the operation result checking means is
When the operation of floating-point data is true mantissa addition and the rounding precision is up to 23 decimal places, it has a weight of 2-22, 2-23 and 2-24. 1 bit that is the logical sum of 3 bits and each bit with a weight smaller than that, and in the case of true mantissa addition and double precision with rounding precision up to 52 decimal places, it is 2 −51 2 -52 and 2 -53
It is 1 bit that is the logical sum of 3 bits having the weight of the power of 2 and each bit having the weight less than that. In the case of the single precision by the true mantissa subtraction, the power of 2 -23 and the power of 2 -24 and 2 3 bits having a weight of -25 to the OR of each bit having a weight smaller than that, and 2 bits of -52 and 2 of -53 when the double precision is obtained by true mantissa subtraction. 12. The addition / subtraction device for floating-point data according to claim 11, wherein 3 bits having a weight of the power of 2 and −54 to a power of 2 and 1 bit obtained by logically adding each bit having a weight less than that.
が2進小数第23位までを有する単精度の時は2の-23乗
の重みを持つビットまたは2の-22乗と2の-23乗の重み
を持つビットで、丸め精度が2進小数第52位までを有す
る倍精度の時は2の-52乗の重みを持つビットまたは2
の-51乗と2の-52乗の重みを持つビットである請求項11
記載の浮動小数点データの加減算装置。17. When the bit to be corrected by the correction means is a single precision having a rounding precision of up to 23 decimal places, a bit having a weight of 2 -23 or 2 -22 and 2-. A bit with a weight of 23, and a bit with a weight of -52 to the power of 2 when the rounding precision is double precision with up to 52 decimal places or 2
12. Bits having weights of −51 and 2 −52.
Addition / subtraction device for the described floating point data.
れぞれの仮数部を乗算して積を和(サム)と桁上げ(キ
ャリ)に分けて求め、前記乗算ののち前記和と前記桁上
げと丸め精度および丸めモードおよび前記被乗数および
前記乗数の符号によって一意に定まる丸め加算値とを加
算する演算を行い、前記演算ののち演算結果が非正規化
数の時は前記演算結果を1ビットシフトして正規化し、
前記正規化ののち正規化された演算結果の中から丸め精
度によって定まる最下位ビットを含む複数のビットを検
査て前記正規化された演算結果のうち丸め精度によって
定まる前記最下位ビットまでが所定の精度に丸めた前記
被乗数の仮数と前記乗数の仮数の積に対して一致する
か、検査したビットより上位への桁上げが一致して検査
したビットだけが一致しないか、検査したビットより上
位への桁上げも検査したビットより上位のビットも一致
しないかを判断し、前記判断結果に基づいて処理を終了
するか、前記正規化された演算結果に対して検査したビ
ットの一部あるいは全部を補正して処理を終了するか、
前記正規化された演算結果に対して再び前記丸め加算値
を加算して処理を終了するかのいずれかを行なう浮動小
数点データの乗算方法。18. Multiplying each mantissa part of a multiplicand and a multiplier in a floating point format to obtain a product by dividing the product into a sum (sum) and a carry (carry), and after the multiplication, the sum, the carry and the rounding. An operation of adding the rounding addition value uniquely determined by the precision and the rounding mode and the sign of the multiplicand and the multiplier is performed, and when the operation result is a denormalized number, the operation result is shifted by 1 bit. Normalize,
After the normalization, a plurality of bits including the least significant bit determined by the rounding precision are inspected from the normalized operation result, and up to the least significant bit determined by the rounding precision among the normalized operation results are predetermined. Whether the product of the mantissa of the multiplicand and the mantissa of the multiplier rounded to precision matches, or the carry to the upper bits of the inspected bits match and only the inspected bits do not match, or the higher bits than the inspected bits Carry is also determined whether the higher bits than the inspected bit do not match, the process is terminated based on the determination result, or a part or all of the bits inspected for the normalized operation result are Correct and finish the process,
A method of multiplying floating-point data, wherein the rounded addition value is added again to the normalized operation result and the processing is ended.
ットシフトの正規化と検査とを1つの処理ステップで行
ない、前記検査の結果当該検査ビットより上位への桁上
げが一致して検査したビットだけが一致しない場合は、
検査したビットの一部あるいは全部の補正をさらに前記
処理ステップ内で行ない、前記検査の結果当該検査ビッ
トより上位への桁上げが一致しない場合は、前記正規化
された演算結果に対する前記丸め加算値の再加算を前記
処理ステップ終了後に新たな処理ステップを挿入して行
う請求項18記載の浮動小数点データの乗算方法。19. The sum, carry, rounding addition value addition, 1-bit shift normalization, and check are performed in one processing step, and as a result of the check, carry to a higher order than the check bit is matched. If only the bits examined by
If some or all of the inspected bits are further corrected in the processing step, and if the result of the inspection is that the carry to the higher order than the inspection bit does not match, the rounded addition value for the normalized operation result is added. 20. The floating point data multiplication method according to claim 18, wherein the re-addition is performed by inserting a new processing step after the completion of the processing step.
位までを有する単精度で最近丸めモードの時または前記
単精度で正方向丸めモードで演算結果の符号が正の時ま
たは前記単精度で負方向丸めモードで演算結果の符号が
負の時は2の-24乗の重みを持つビットを1にして他の
ビットを0にした数値で、丸め精度が2進小数第52位ま
でを有する倍精度で最近偶丸めモードの時または前記倍
精度で正方向丸めモードで演算結果の符号が正の時また
は前記倍精度で負方向丸めモードで出力符号が負の時は
2の-53乗の重みを持つビットを1にして他のビットを
0にした数値で、上記以外の時はすべてのビットを0に
した数値である請求項18記載の浮動小数点データの乗算
方法。20. The rounding addition value has a rounding precision of a binary decimal number 23.
2 when the precision of the single-precision most recent rounding mode with up to the order or the positive sign of the operation result in the single-precision positive-direction rounding mode or the negative sign of the operation result in the single-precision negative-direction rounding mode A number that has a bit with a weight of -24 raised to 1 and other bits to 0. Rounding precision is double precision with up to 52 decimal places. When the sign of the operation result is positive in the direction rounding mode or when the output sign is negative in the double precision negative direction rounding mode, the bit having the weight of -53 to 2 is set to 1 and the other bits are set to 0. 19. The method of multiplying floating-point data according to claim 18, which is a numerical value and is a numerical value in which all bits are set to 0 except the above.
位までを有する単精度で正方向丸めモードで演算結果の
符号が正の時または前記単精度で負方向丸めモードで演
算結果の符号が負の時は2の-23乗の重みを持つビット
を1にして他のビットを0にした数値で、丸め精度が2
進小数第52位までを有する倍精度で正方向丸めモードで
演算結果の符号が正の時または前記倍精度で負方向丸め
モードで出力符号が負の時は2の-52乗の重みを持つビ
ットを1にして他のビットを0にした数値で、上記以外
の時はすべてのビットを0にした数値である請求項18記
載の浮動小数点データの乗算方法。21. The rounding addition value has a rounding precision of a binary decimal number 23.
When the sign of the operation result is positive in the single-precision, positive-direction rounding mode with up to the order, or when the sign of the operation result is negative in the single-precision, negative-direction rounding mode, the bit with the weight of 2 to -23 is set. Rounding precision is 2 with 1 and other bits set to 0.
When the sign of the operation result is positive in the double-precision, positive-direction rounding mode having up to 52 decimal places, or when the output sign is negative in the double-precision, negative-direction rounding mode, the weight is 2 −52. 19. The method of multiplying floating-point data according to claim 18, wherein the value is a numerical value in which one bit is set to 1 and the other bits are set to 0, and all the bits are set to 0 in the cases other than the above.
位までを有する単精度で正方向丸めモードで演算結果の
符号が正の時または前記単精度で負方向丸めモードで演
算結果の符号が負の時は2の-24乗の重みを持つビット
とそれより小さい重みを持つビットとを1にして他のビ
ットを0にした数値で、丸め精度が2進小数第52位まで
を有する倍精度で正方向丸めモードで演算結果の符号が
正の時または前記倍精度で負方向丸めモードで出力符号
が負の時は2の-53乗の重みを持つビットとそれより小
さい重みを持つビットとを1にして他のビットを0にし
た数値で、上記以外の時はすべてのビットを0にした数
値である請求項18記載の浮動小数点データの乗算方法。22. The rounding addition value has a rounding precision of a binary decimal number 23.
When the sign of the operation result is positive in the single-precision, positive-direction rounding mode having up to the unit, or when the sign of the operation result is negative in the single-precision, negative-direction rounding mode, a bit having a weight of 2-24 When a bit with a smaller weight is set to 1 and the other bits are set to 0, the rounding precision is double precision with binary fraction up to the 52nd decimal place, and the sign of the operation result is positive in the positive direction rounding mode. Alternatively, when the output sign is negative in the double-precision negative-direction rounding mode, a bit having a weight of -53 to the power of 2 and a bit having a weight less than that are set to 1 and other bits are set to 0, 19. The method of multiplying floating-point data according to claim 18, which is a numerical value in which all bits are set to 0 at times other than the above.
査ビットが、丸め精度が2進小数第23位までを有する単
精度の時は2の-22乗と2の-23乗と2の-24乗の重みを
持つ3ビットとそれより小さい重みを持つ各ビットの論
理和をとった1ビットで、丸め精度が2進小数第52位ま
でを有する倍精度の時は2の-51乗と2の-52乗と2の-5
3乗の重みを持つ3ビットとそれより小さい重みを持つ
各ビットの論理和をとった1ビットである請求項18記載
の浮動小数点データの乗算方法。23. When the check bit of the normalized operation result after the normalization is single precision having rounding precision up to the 23rd decimal place, 2-22 and 2-23. 3 bits with a weight of -24th power of 1 and 1 bit obtained by ORing each bit with a weight less than that. When rounding precision is double precision with up to 52 decimal places, it is -51 of 2 Square and 2-5 2 Square and 2-5
19. The method of multiplying floating-point data according to claim 18, wherein 3 bits having a weight of a cube of 3 and 1 bit having a weight less than that are ORed.
丸め精度が2進小数第23位までを有する単精度の時は2
の-23乗の重みを持つビットまたは2の-22乗と2の-23
乗の重みを持つビットで、丸め精度が2進小数第52位ま
でを有する倍精度の時は2の-52乗の重みを持つビット
または2の-51乗と2の-52乗の重みを持つビットである
請求項18記載の浮動小数点データの乗算方法。24. A bit to be corrected based on the judgment result is
2 if the rounding precision is single precision with up to 23 decimal places
Bits with weight of -23 or 2 -22 and 2 -23
Bits with power of 2 and rounding precision with double precision having up to 52 decimal places, bits with weight of -52 to 2 or weight of -51 to 2 and -52 to 2 19. The method of multiplying floating-point data according to claim 18, which is a bit that has.
点形式の被乗数および乗数の仮数部の長さに等しいかも
しくは仮数部の長さよりも長くその入力に対して少なく
とも入力の2倍のビットの幅の和(サム)と桁上げ(キ
ャリ)とを出力する仮数乗算手段と、丸め精度と丸めモ
ードと2つの浮動小数点データの符号とによって一意に
定まる丸め加算値を生成する丸め加算値生成手段と、前
記仮数乗算手段の和出力と桁上げ出力および前記丸め加
算値生成手段からの丸め加算値の三者の加算を同時に行
う仮数加算手段と、前記仮数加算手段による演算結果が
非正規化数の時は前記演算結果をシフトして正規化する
正規化手段と、前記正規化手段の出力の中から丸め精度
によって定まる最下位ビットを含む複数のビットを検査
して前記正規化手段の出力のうち丸め精度によって定ま
る前記最下位ビットまでが所定の精度に丸めた前記被乗
数の仮数と前記乗数の仮数の積に対して一致するか、検
査したビットより上位への桁上りが一致して検査したビ
ットだけが一致しないか、検査したビットより上位への
桁上りも検査したビットより上位のビットも一致しない
かを判断する演算結果検査手段と、前記正規化手段の出
力に対して前記演算結果検査手段が検査したビットの一
部あるいは全部を補正する丸め補正手段とを備え、浮動
小数点形式の被乗数および乗数のそれぞれの仮数部を前
記仮数乗算手段に入力して得られる和出力および桁上げ
出力と前記丸め加算値生成手段からの丸め加算値の三者
の和を前記仮数加算手段で求めその結果を前記正規化手
段において正規化したのち前記演算結果検査手段が前記
正規化手段の出力のうち丸め精度によって定まる前記最
下位ビットまでが所定の精度に丸めた積の仮数に対して
一致すると判断した場合は処理を終了し、検査したビッ
トより上位への桁上げが一致して検査したビットだけが
一致しないと判断した場合は前記丸め補正手段により前
記正規化手段の出力の一部あるいは全部を補正して処理
を終了し、検査したビットより上位への桁上げも検査し
たビットより上位のビットも一致しないと判断した場合
は前記正規化手段の出力に対して前記丸め加算値生成手
段および前記仮数加算手段により再び丸め加算値を加算
して処理を終了することを特徴とする浮動小数点データ
の乗算装置。25. The bit widths of the two inputs are both equal to or longer than the length of the mantissa part of the multiplicand and the multiplier in the floating-point format, and are longer than the length of the mantissa part, at least twice as many bits as the inputs. Mantissa multiplication means for outputting the sum (sum) of widths and carry (carry), and rounding addition value generation means for generating a rounding addition value uniquely determined by the rounding precision, the rounding mode, and the sign of the two floating point data. And a mantissa adding means for simultaneously performing the sum output and carry output of the mantissa multiplying means and the addition of the three rounding addition values from the rounding addition value generating means, and the operation result by the mantissa addition means being a denormalized number. In the case of, the normalization means for shifting and normalizing the operation result, and a plurality of bits including the least significant bit determined by the rounding precision among the outputs of the normalization means are inspected to perform the normalization procedure. Of the output of the above, up to the least significant bit determined by the rounding precision is the same as the product of the mantissa of the multiplicand and the mantissa of the multiplier rounded to a predetermined precision, or the carry to the higher bits than the inspected bit is the same. Operation result inspecting means for deciding whether only the inspected bits do not match, or whether the carry to the upper bits of the inspected bits or the upper bits of the inspected bits do not match, and Rounding correction means for correcting some or all of the bits inspected by the operation result inspection means, and the sum output and digit obtained by inputting the mantissa parts of the multiplicand and the multiplier in the floating point format into the mantissa multiplication means. The sum of the three values of the rounded output and the rounded addition value from the rounded addition value generation means is obtained by the mantissa addition means, and the result is normalized by the normalization means, and then the calculation is performed. If the result inspecting means determines that the least significant bit determined by the rounding precision among the outputs of the normalizing means matches the mantissa of the product rounded to a predetermined precision, the processing is terminated and the higher bits than the inspected bit Only the bits that the carry to
If it is determined that they do not match, the rounding correction means corrects a part or all of the output of the normalization means, and the processing is terminated. Carry to the higher bits than the inspected bits and bits higher than the inspected bits are performed. If it is determined that they do not match, the rounding addition value generating means and the mantissa adding means add the rounding addition values again to the output of the normalizing means, and the processing is terminated, and the multiplication of the floating point data is performed. apparatus.
力および丸め加算値の加算と正規化手段における正規化
と演算結果検査手段における検査とを1つのマシンサイ
クルで行ない、前記検査の結果当該検査ビットより上位
への桁上げが一致して検査したビットだけが一致しない
場合は、丸め補正手段における検査したビットの一部あ
るいは全部の修正をさらに前記マシンサイクル内で行な
い、前記検査の結果当該検査ビットより上位への桁上げ
が一致しない場合は、前記仮数加算手段における丸め加
算値の再加算を前記マシンサイクル終了後に新たなマシ
ンサイクルを挿入して行なう請求項25記載の浮動小数点
データの乗算装置。26. Sum output, carry output, rounding addition value addition in the mantissa adding means, normalization in the normalization means, and inspection in the operation result inspection means are performed in one machine cycle, and the inspection result is concerned. If the carry to the upper bits is the same and only the inspected bit does not match, some or all of the inspected bits in the rounding correction means are further corrected within the machine cycle, and as a result of the inspection, the inspection concerned. 26. The floating-point data multiplication device according to claim 25, wherein when the carry to the upper bits does not match, the rounded addition value in the mantissa adding means is added again by inserting a new machine cycle after the end of the machine cycle. .
値が、丸め精度が2進小数第23位までを有する単精度で
最近偶丸めモードの時または前記単精度で正方向丸めモ
ードで演算結果の符号が正の時または前記単精度で負方
向丸めモードで演算結果の符号が負の時は2の-24乗の
重みを持つビットを1にして他のビットを0にした数値
で、丸め精度が2進小数第52位までを有する倍精度で最
近偶丸めモードの時または前記倍精度で正方向丸めモー
ドで演算結果の符号が正の時または前記倍精度負方向丸
めモードで出力符号が負の時は2の-53乗の重みを持つ
ビットを1にして他のビットを0にした数値で、上記以
外の時はすべてのビットを0にした数値である請求項25
記載の浮動小数点データの乗算装置。27. The rounding addition value generated by the rounding addition value generation means is calculated in the single precision nearest even rounding mode having a rounding precision of up to 23 decimal places or in the forward rounding mode in the single precision. When the sign of the result is positive or when the sign of the operation result in the negative precision rounding mode in the above-mentioned single precision is negative, it is a numerical value in which the bit with the weight of 2-24 is set to 1 and the other bits are set to 0, Rounding precision with up to 52 decimal places in double precision in the even rounding mode or in the double precision in the positive direction rounding mode, when the sign of the operation result is positive or in the double precision negative direction rounding mode, the output sign 25 is a numerical value in which a bit having a weight of 2 −53 is set to 1 and the other bits are set to 0, and otherwise is a numerical value in which all the bits are set to 0.
The described floating point data multiplication device.
値が、丸め精度が2進小数第23位までを有する単精度で
正方向丸めモードで演算結果の符号が正の時または前記
単精度で負方向丸めモードで演算結果の符号が負の時は
2の-23乗の重みを持つビットを1にして他のビットを
0にした数値で、丸め精度が2進小数第52位までを有す
る倍精度で正方向丸めモードで演算結果の符号が正の時
または前記倍精度負方向丸めモードで出力符号が負の時
は2の-52乗の重みを持つビットを1にして他のビット
を0にした数値で、上記以外の時はすべてのビットを0
にした数値である請求項25記載の浮動小数点データの乗
算装置。28. The rounding addition value generated by the rounding addition value generating means is a single precision having a rounding precision of up to 23 decimal places in the forward rounding mode, and when the sign of the operation result is positive or the single precision. When the sign of the operation result is negative in the negative direction rounding mode, the bit with weight of 2-23 is set to 1 and the other bits are set to 0, and the rounding precision is up to the 52nd decimal place. If the sign of the operation result is positive in the double-precision, positive-direction rounding mode, or if the output sign is negative in the double-precision, negative-direction rounding mode, set the bit having the weight of -52 to 2 to 1 and set the other bits. Is a numerical value with 0 set, and in all other cases, all bits are set to 0
26. The floating-point data multiplication device according to claim 25, which is a numerical value of
値が、丸め精度が2進小数第23位までを有する単精度で
正方向丸めモードで演算結果の符号が正の時または前記
単精度で負方向丸めモードで演算結果の符号が負の時は
2の-24乗の重みを持つビットとそれより小さい重みを
持つビットとを1にして他のビットを0にした数値で、
丸め精度が2進小数第52位までを有する倍精度で正方向
丸めモードで演算結果の符号が正の時または前記倍精度
負方向丸めモードで出力符号が負の時は2の-53乗の重
みを持つビットとそれより小さい重みを持つビットとを
1にして他のビットを0にした数値で、上記以外の時は
すべてのビットを0にした数値である請求項25記載の浮
動小数点データの乗算装置。29. The rounding addition value generated by the rounding addition value generation means is a single precision having a rounding precision of up to 23 decimal places in the positive rounding mode, and the sign of the operation result is positive or the single precision. In the negative direction rounding mode, when the sign of the operation result is negative, it is a numerical value in which the bit having the weight of 2-24 is set to 1 and the bit having the weight smaller than that, and the other bits are set to 0.
Rounding precision is up to 52 decimal places. In double precision and positive direction rounding mode, when the sign of the operation result is positive, or when the double precision negative direction rounding mode and the output sign is negative, 26. Floating-point data according to claim 25, which is a numerical value in which a bit having a weight and a bit having a smaller weight are set to 1 and other bits are set to 0, and in all other cases, all bits are set to 0. Multiplication device.
丸め精度が2進小数第23位までを有する単精度の時は2
の-22乗と2の-23乗と2の-24乗の重みを持つ3ビット
とそれより小さい重みを持つ各ビットの論理和をとった
1ビットで、丸め精度が2進小数第52位までを有する倍
精度の時は2の-51乗と2の-52乗と2の-53乗の重みを
持つ3ビットとそれより小さい重みを持つ各ビットの論
理和をとった1ビットである請求項25記載の浮動小数点
データの乗算装置。30. The bit checked by the operation result checking means is
2 if the rounding precision is single precision with up to 23 decimal places
Rounding precision is the 52nd place of the binary decimal number with 1 bit that is the logical sum of 3 bits with the weights of −22, 2−23 and 2−24 In case of double precision having up to, it is 1 bit obtained by ORing 3 bits having weights of -51 to 2 to -52 to 2 to -53 and each bit having less weight. 26. The floating point data multiplication device according to claim 25.
が2進小数第23位までを有する単精度の時は2の-23乗
の重みを持つビットまたは2の-22乗と2の-23乗の重み
を持つビットで、丸め精度が2進小数第52位までを有す
る倍精度の時は2の-52乗の重みを持つビットまたは2
の-51乗と2の-52乗の重みを持つビットである請求項25
記載の浮動小数点データの乗算装置。31. When the bit to be corrected by the correcting means is a single precision having a rounding precision of up to 23 decimal places, a bit having a weight of 2 -23 or 2 -22 and 2-. A bit with a weight of 23, and a bit with a weight of -52 to the power of 2 when the rounding precision is double precision with up to 52 decimal places or 2
26. Bits having weights of -51 and 2 -52.
The described floating point data multiplication device.
する被乗数保持手段と、浮動小数点形式の乗数の仮数部
を保持する乗数保持手段と、2つの入力のうち少なくと
も一方の入力のビット幅が前記被乗数および前記乗数の
仮数部の長さより短くその入力に対して少なくとも入力
の2倍のビット幅の和(サム)と桁上げ(キャリ)とを
出力する仮数乗算手段と、前記仮数乗算手段の被乗数入
力のビット幅が前記被乗数の仮数部の長さよりも短かい
場合は前記被乗数保持手段に保持された被乗数の仮数部
の最上位ビットから最下位ビットまでを複数の前記仮数
乗算手段の被乗数入力のビット幅の部分仮数部に分割し
その中から処理ステップ毎に1つを選択して出力する部
分被乗数選択手段と、前記仮数乗算手段の乗数入力のビ
ット幅が前記乗数の仮数部の長さよりも短かい場合は前
記乗数保持手段に保持された乗数の仮数部の最上位ビッ
トから最下位ビットまでを複数の前記仮数乗算手段の乗
数入力のビット幅の部分仮数部に分割しその中から処理
ステップ毎に1つを選択して出力する部分乗数選択手段
と、丸め精度と丸めモードと2つの浮動小数点データの
符号とによって一意に定まる丸め加算値を生成する丸め
加算値生成手段と、処理の最初のステップは前記仮数乗
算手段の和出力と桁上げ出力および前記丸め加算値生成
手段からの丸め加算値の三者の加算を同時に行い最初の
部分積を生成し、以降のステップは前記仮数乗算手段の
和出力桁上げ出力および直前のステップで生成されシフ
トされた部分積の三者の加算を同時に行い新たな部分積
を生成する仮数加算手段と、処理の最初または中間ステ
ップは前記仮数加算手段から得られる部分積を当該ステ
ップで前記仮数乗算手段において乗算された乗数および
被乗数の部分仮数部の位置で定まるビット数だけ最下位
ビット方向にシフトし、最終のステップでは前記仮数加
算手段から得られる演算結果が非正規化数の時は前記演
算結果をシフトして正規化するシフト手段と、処理の最
初または中間ステップに前記シフト手段の出力を次ステ
ップの前記仮数加算手段における入力として保持する部
分積保持手段と、処理の最初または中間ステップにおけ
る前記シフト手段でのシフトあふれの各ビットと処理の
最終ステップにおける前記シフト手段の出力の中の丸め
精度によって定まる最下位ビットを含む複数のビットと
を検査して処理の最終ステップにおける前記シフト手段
の出力のうち丸め精度によって定まる前記最下位ビット
までが所定の精度に丸めた前記被乗数の仮数と前記乗数
の仮数の積に対して一致するか、検査したビットより上
位への桁上りが一致して検査したビットだけが一致しな
いか、検査したビットより上位への桁上りも検査したビ
ットより上位のビットも一致しないかを判別する演算結
果検査手段と、前記シフト手段の出力に対して前記演算
結果検査手段が検査したビットの一部あるいは全部を補
正する丸め補正手段とを備え、前記部分被乗数選択手段
と前記部分乗数選択手段において被乗数および乗数の仮
数部の部分を下位から順にかつすべての組合せを選択し
て前記仮数乗算手段に入力して、順次得られる和出力お
よび桁上げ出力と前記丸め加算値生成手段からの丸め加
算値または前記部分積保持手段に保持されている値の三
者の和を前記仮数加算手段で求めその結果を前記シフト
手段においてシフトし再び前記部分積保持手段に格納す
るかもしくは前記シフト手段で最終の演算結果を正規化
したのち前記演算結果検査手段が前記シフト手段の出力
のうち丸め精度によって定まる前記最下位ビットまでが
所定の精度に丸めた積の仮数に対して一致すると判断し
た場合は処理を終了し、検査したビットより上位への桁
上げが一致して検査したビットだけが一致しないと判断
した場合は前記丸め補正手段により前記シフト手段の出
力の一部あるいは全部を補正して処理を終了し、検査し
たビットより上位への桁上げも検査したビットより上位
のビットも一致しないと判断した場合は前記シフト手段
の出力に対して前記丸め加算値生成手段および前記仮数
加算手段により丸め加算値を加算して処理を終了するこ
とを特徴とする浮動小数点データの乗算装置。32. A multiplicand holding means for holding a mantissa part of a multiplicand in a floating point format, a multiplier holding means for holding a mantissa part of a multiplier in a floating point format, and a bit width of at least one of two inputs A mantissa multiplication means for outputting a sum (sum) and a carry (carry) of at least twice the bit width of the input, which is shorter than the length of the mantissa part of the multiplicand and the multiplier, and the mantissa multiplication means. When the bit width of the multiplicand input is shorter than the length of the mantissa part of the multiplicand, the multiplicand inputs of the mantissa multiplying means from the most significant bit to the least significant bit of the mantissa part of the multiplicand held in the multiplicand holding means The partial multiplicand selecting means for dividing the partial mantissa part having the bit width of 1 and selecting and outputting one for each processing step, and the bit width of the multiplier input of the mantissa multiplying means is the multiplier. When the mantissa part is shorter than the length, the most significant bit to the least significant bit of the mantissa part of the multiplier held in the multiplier holding means is divided into a plurality of partial mantissa parts of the bit width of the multiplier input of the mantissa multiplying means. Then, a partial multiplier selecting means for selecting and outputting one for each processing step among them, and a rounded addition value generation for generating a rounded addition value uniquely determined by the rounding precision, the rounding mode, and the sign of two floating point data Means and the first step of the processing, the sum output and carry output of the mantissa multiplication means and the addition of three of the rounding addition values from the rounding addition value generation means are performed at the same time to generate the first partial product. The step is a mantissa adding means for simultaneously performing the sum output carry output of the mantissa multiplying means and the addition of the three partial products generated in the immediately preceding step and shifted to generate a new partial product, and In the first or intermediate step, the partial product obtained from the mantissa adding means is shifted in the least significant bit direction by the number of bits determined by the positions of the partial mantissa parts of the multiplier and the multiplicand multiplied in the mantissa multiplying means in the step, and the final bit In the step, when the operation result obtained from the mantissa adding means is a non-normalized number, a shift means for shifting the operation result to normalize it and an output of the shift means in the first or intermediate step of the process The partial product holding means held as an input in the mantissa adding means, each bit of the shift overflow in the shift means in the first or intermediate step of the processing and the rounding precision determined by the rounding precision in the output of the shift means in the final step of the processing. The shift means in the final step of processing by inspecting a plurality of bits including lower bits Of the output of the above, up to the least significant bit determined by the rounding precision is the same as the product of the mantissa of the multiplicand and the mantissa of the multiplier rounded to a predetermined precision, or the carry to the higher bits than the inspected bit is the same. Operation result inspecting means for determining whether only the inspected bits do not match, or whether the carry to the upper bits of the inspected bits does not match the upper bits of the inspected bits, and the operation for the output of the shift means. Rounding correction means for correcting a part or all of the bits inspected by the result inspection means, and the partial multiplicand selection means and the mantissa part of the multiplicand in the partial multiplier selection means are arranged in order from the lowermost and all combinations. Is input to the mantissa multiplication means and sequentially obtained sum output and carry output, and the rounding addition value from the rounding addition value generating means or the section The sum of the three values held in the product holding means is obtained by the mantissa adding means and the result is shifted by the shift means and stored again in the partial product holding means, or the final calculation result is obtained by the shift means. After normalization, if the operation result inspection means determines that the least significant bit of the output of the shift means determined by the rounding precision matches the mantissa of the product rounded to a predetermined precision, the process is terminated, When it is determined that the carry to the higher order than the inspected bit matches and only the inspected bit does not match, a part or all of the output of the shift means is corrected by the rounding correction means, the processing is terminated, and the inspection is performed. If it is determined that the carry to the upper bits of the selected bits does not match the upper bits of the inspected bits, the rounded addition value is generated for the output of the shift means. Multiplier floating point data, characterized in that the process ends by adding the addition value rounding the stage and the mantissa addition means.
ける和出力と桁上げ出力および部分積保持手段に保持さ
れている値の加算とシフト手段における正規化と演算結
果検査手段における検査とを1つのマシンサイクルで行
ない、前記検査の結果当該検査ビットより上位への桁上
げが一致して検査したビットだけが一致しない場合は、
丸め補正手段における検査したビットの一部あるいは全
部の修正をさらに前記マシンサイクル内で行ない、前記
検査の結果当該検査ビットより上位への桁上げが一致し
ない場合は、前記仮数加算手段における丸め加算値の加
算を前記マシンサイクル終了後に新たなマシンサイクル
を挿入して行なう請求項32記載の浮動小数点データの乗
算装置。33. In the final step of the processing, the sum output and carry output in the mantissa adding means, the addition of the values held in the partial product holding means, the normalization in the shift means and the check in the operation result checking means are combined into one. In the machine cycle, if the result of the above check is that the carry to the higher order bit of the check bit matches and only the bit that has been checked does not match,
If some or all of the inspected bits in the rounding correction means are further modified within the machine cycle, and the result of the inspection is that the carry to the higher order than the inspection bit does not match, the rounded addition value in the mantissa adder means 33. The floating point data multiplication device according to claim 32, wherein the addition is performed by inserting a new machine cycle after the end of the machine cycle.
値が、丸め精度が2進小数第23位までを有する単精度で
最近偶丸めモードの時または前記単精度で正方向丸めモ
ードで演算結果の符号が正の時または前記単精度で負方
向丸めモードで演算結果の符号が負の時は2の-24乗の
重みを持つビットを1にして他のビットを0にした数値
で、丸め精度が2進小数第52位までを有する倍精度で最
近偶丸めモードの時または前記倍精度で正方向丸めモー
ドで演算結果の符号が正の時または前記倍精度負方向丸
めモードで出力符号が負の時は2の-53乗の重みを持つ
ビットを1にして他のビットを0にした数値で、上記以
外の時はすべてのビットを0にした数値である請求項32
記載の浮動小数点データの乗算装置。34. The rounding addition value generated by the rounding addition value generation means is calculated in the single precision nearest even rounding mode having the rounding precision up to the 23rd decimal place or in the forward rounding mode in the single precision. When the sign of the result is positive or when the sign of the operation result in the negative precision rounding mode in the above-mentioned single precision is negative, it is a numerical value in which the bit with the weight of 2-24 is set to 1 and the other bits are set to 0, Rounding precision with up to 52 decimal places in double precision in the even rounding mode or in the double precision in the positive direction rounding mode, when the sign of the operation result is positive or in the double precision negative direction rounding mode, the output sign 32 is a numerical value in which a bit having a weight of -53 to 2 is set to 1 and other bits are set to 0 when is negative, and is a numerical value in which all bits are set to 0 otherwise.
The described floating point data multiplication device.
値が、丸め精度が2進小数第23位までを有する単精度で
正方向丸めモードで演算結果の符号が正の時または前記
単精度で負方向丸めモードで演算結果の符号が負の時は
2の-23乗の重みを持つビットを1にして他のビットを
0にした数値で、丸め精度が2進小数第52位までを有す
る倍精度で正方向丸めモードで演算結果の符号が正の時
または前記倍精度負方向丸めモードで出力符号が負の時
は2の-52乗の重みを持つビットを1にして他のビット
を0にした数値で、上記以外の時はすべてのビットを0
にした数値である請求項32記載の浮動小数点データの乗
算装置。35. The rounding addition value generated by the rounding addition value generating means is single precision having a rounding precision of up to 23 decimal places in the positive direction rounding mode, and the sign of the operation result is positive or the single precision. When the sign of the operation result is negative in the negative direction rounding mode, the bit with weight of 2-23 is set to 1 and the other bits are set to 0, and the rounding precision is up to the 52nd decimal place. If the sign of the operation result is positive in the double-precision, positive-direction rounding mode, or if the output sign is negative in the double-precision, negative-direction rounding mode, set the bit having the weight of -52 to 2 to 1 and set the other bits. Is a numerical value with 0 set, and in all other cases, all bits are set to 0
33. The multiplying device for floating-point data according to claim 32, which is a numerical value of
値が、丸め精度が2進小数第23位までを有する単精度で
正方向丸めモードで演算結果の符号が正の時または前記
単精度で負方向丸めモードで演算結果の符号が負の時は
2の-24乗の重みを持つビットとそれより小さい重みを
持つビットとを1にして他のビットを0にした数値で、
丸め精度が2進小数第52位までを有する倍精度で正方向
丸めモードで演算結果の符号が正の時または前記倍精度
負方向丸めモードで出力符号が負の時は2の-53乗の重
みを持つビットとそれより小さい重みを持つビットとを
1にして他のビットを0にした数値で、上記以外の時は
すべてのビットを0にした数値である請求項32記載の浮
動小数点データの乗算装置。36. The rounding addition value generated by the rounding addition value generating means is a single precision having a rounding precision of up to 23 decimal places in the positive direction rounding mode and the sign of the operation result is positive, or the single precision. In the negative direction rounding mode, when the sign of the operation result is negative, it is a numerical value in which the bit having the weight of 2-24 is set to 1 and the bit having the weight smaller than that, and the other bits are set to 0.
Rounding precision is up to 52 decimal places. In double precision and positive direction rounding mode, when the sign of the operation result is positive, or when the double precision negative direction rounding mode and the output sign is negative, 33. Floating point data according to claim 32, which is a numerical value in which a bit having a weight and a bit having a smaller weight are set to 1 and other bits are set to 0, and all the bits are set to 0 in the cases other than the above. Multiplication device.
丸め精度が2進小数第23位までを有する単精度の時は2
の-22乗と2の-23乗と2の-24乗の重みを持つ3ビット
とそれより小さい重みを持つ各ビットの論理和をとった
1ビットで、丸め精度が2進小数第52位までを有する倍
精度の時は2の-51乗と2の-52乗と2の-53乗の重みを
持つ3ビットとそれより小さい重みを持つ各ビットの論
理和をとった1ビットである請求項32記載の浮動小数点
データの乗算装置。37. The bit checked by the operation result checking means is
2 if the rounding precision is single precision with up to 23 decimal places
Rounding precision is the 52nd place of the binary decimal number with 1 bit that is the logical sum of 3 bits with the weights of −22, 2−23 and 2−24 In case of double precision having up to, it is 1 bit obtained by ORing 3 bits having weights of -51 to 2 to -52 to 2 to -53 and each bit having less weight. 33. The floating point data multiplication device according to claim 32.
が2進小数第23位までを有する単精度の時は2の-23乗
の重みを持つビットまたは2の-22乗と2の-23乗の重み
を持つビットで、丸め精度が2進小数第52位までを有す
る倍精度の時は2の-52乗の重みを持つビットまたは2
の-51乗と2の-52乗の重みを持つビットである請求項32
記載の浮動小数点データの乗算装置。38. When the bit to be corrected by the correction means is a single precision having a rounding precision of up to 23 decimal places, a bit having a weight of 2-23 or 2-22 and 2-. A bit with a weight of 23, and a bit with a weight of -52 to the power of 2 when the rounding precision is double precision with up to 52 decimal places or 2
32. Bits having weights of -51 and 2 -52.
The described floating point data multiplication device.
被除数の指数部から同一浮動小数点形式の除数の指数部
を減じた値に1だけ小さい値を求める演算を行い、前記
演算を行ったのち前記演算結果の最上位ビットを反転す
ることにより、前記被除数および前記除数と同様に偏位
した浮動小数点形式の商の指数部を単一の処理ステップ
で求めることを特徴とする浮動小数点データの除算方
法。39. An operation for obtaining a value smaller by one than the value obtained by subtracting the exponent part of the divisor in the same floating-point format from the exponent part of the dividend in the floating-point format having a deviated exponent part, and performing the above-mentioned operation After that, by inverting the most significant bit of the operation result, the exponent part of the quotient in the floating-point format, which is offset like the dividend and the divisor, is obtained in a single processing step. Division method.
被除数の指数部から同一浮動小数点形式の除数の指数部
を減じた値に1だけ小さい値を求める指数減算手段と、
前記指数減算手段の出力の最上位ビットの反転を行う最
上位ビット補正手段とを備え、2つの浮動小数点データ
の指数値の減算と偏位補正とを同時に実行して前記被除
数および前記除数と同様に偏位した浮動小数点形式の商
の指数部を得ることを特徴とする浮動小数点データの除
算装置。40. An exponent subtraction means for obtaining a value smaller by 1 than a value obtained by subtracting the exponent part of the divisor in the same floating-point format from the exponent part of the dividend in the floating-point format having a deviated exponent part,
A most significant bit correcting means for inverting the most significant bit of the output of the exponent subtracting means, and simultaneously performing the subtraction of the exponent value of the two floating point data and the deviation correction, the same as the dividend and the divisor. An apparatus for dividing floating-point data, characterized in that the exponent part of the quotient of the floating-point format is obtained.
被除数の指数部から同一浮動小数点形式の除数の指数部
を減じた値に1だけ小さい値を求める指数減算手段と、
前記指数減算手段の出力の最上位ビットの反転を行う最
上位ビット補正手段と、前記最上位ビット補正手段によ
って最上位ビットが反転された前記指数減算手段の出力
に対して前記被除数の仮数部を前記除数の仮数部で除し
た商を正規化するためのシフトビット数に等しい数を加
減算する正規化指数補正手段と、前記指数減算手段の最
上位ビットからの桁上りを示すキャリ出力と前記正規化
指数補正手段からの出力とにより商の上位あふれと下位
あふれとを検出する例外検出手段とを備え、2つの浮動
小数点データの指数値の減算と偏位補正とを同時に実行
して前記被除数および前記除数と同様に偏位した浮動小
数点形式の商の指数部を得、さらに商の仮数部を正規化
した後の所定の演算精度からの商の上位あふれと下位あ
ふれとを検出することを特徴とする浮動小数点データの
除算装置。41. An exponent subtraction means for obtaining a value smaller by 1 than a value obtained by subtracting the exponent part of the divisor in the same floating-point format from the exponent part of the dividend in the floating-point format having a deviated exponent part,
The most significant bit correction means for inverting the most significant bit of the output of the exponent subtraction means, and the mantissa part of the dividend for the output of the exponent subtraction means having the most significant bit inverted by the most significant bit correction means. Normalized exponential correction means for adding / subtracting a number equal to the number of shift bits for normalizing the quotient obtained by dividing the mantissa part of the divisor, carry output indicating the carry from the most significant bit of the exponent subtracting means, and the normal An exception detection unit for detecting upper and lower overflows of the quotient based on the output from the variable exponent correction unit, and the subtraction of the exponent value of the two floating-point data and the deviation correction are simultaneously performed, and the dividend and Similar to the divisor, the exponent part of the quotient in the floating-point format is obtained, and the upper and lower overflows of the quotient from the predetermined arithmetic precision after normalizing the mantissa part of the quotient are detected. Divider unit of floating-point data, wherein the door.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3180865A JPH0823812B2 (en) | 1990-08-24 | 1991-07-22 | Floating point data calculation method and calculation device |
Applications Claiming Priority (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP22276390 | 1990-08-24 | ||
JP2-293836 | 1990-10-30 | ||
JP2-222763 | 1990-10-30 | ||
JP29383690 | 1990-10-30 | ||
JP3180865A JPH0823812B2 (en) | 1990-08-24 | 1991-07-22 | Floating point data calculation method and calculation device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH04357522A JPH04357522A (en) | 1992-12-10 |
JPH0823812B2 true JPH0823812B2 (en) | 1996-03-06 |
Family
ID=27324915
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP3180865A Expired - Lifetime JPH0823812B2 (en) | 1990-08-24 | 1991-07-22 | Floating point data calculation method and calculation device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0823812B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3313002B2 (en) * | 1994-12-02 | 2002-08-12 | 三菱電機株式会社 | Floating point arithmetic unit |
US9146706B2 (en) | 2006-05-05 | 2015-09-29 | Qualcomm Incorporated | Controlled-precision iterative arithmetic logic unit |
CN117891430B (en) * | 2024-03-18 | 2024-05-14 | 中科亿海微电子科技(苏州)有限公司 | Floating point multiplication and addition structure applied to FPGA embedded DSP |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS59117637A (en) * | 1982-12-24 | 1984-07-07 | Toshiba Corp | Floating point multiplier |
JPH01321516A (en) * | 1987-06-19 | 1989-12-27 | Digital Equip Corp <Dec> | Apparatus and method for accelerating addition and subtraction of floating point by accelerating effective subtraction procedure |
-
1991
- 1991-07-22 JP JP3180865A patent/JPH0823812B2/en not_active Expired - Lifetime
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS59117637A (en) * | 1982-12-24 | 1984-07-07 | Toshiba Corp | Floating point multiplier |
JPH01321516A (en) * | 1987-06-19 | 1989-12-27 | Digital Equip Corp <Dec> | Apparatus and method for accelerating addition and subtraction of floating point by accelerating effective subtraction procedure |
Also Published As
Publication number | Publication date |
---|---|
JPH04357522A (en) | 1992-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0472148B1 (en) | Method and apparatus for computing floating point data | |
US5619439A (en) | Shared hardware for multiply, divide, and square root exponent calculation | |
JP3689183B2 (en) | Accurate and effective sticky bit calculation for accurate floating-point division / square root operations | |
KR920005226B1 (en) | Floating point arithmetic units | |
US5197023A (en) | Hardware arrangement for floating-point addition and subtraction | |
JP2938547B2 (en) | Method and device for arithmetic processing | |
US10019231B2 (en) | Apparatus and method for fixed point to floating point conversion and negative power of two detector | |
US5995991A (en) | Floating point architecture with tagged operands | |
JP4388543B2 (en) | 3-input floating-point adder / subtracter | |
EP0356153B1 (en) | Radix-2**n divider method and apparatus using overlapped quotient bit selection and concurrent quotient rounding and correction | |
US5132925A (en) | Radix-16 divider using overlapped quotient bit selection and concurrent quotient rounding and correction | |
US20070156803A1 (en) | Overflow detection and clamping with parallel operand processing for fixed-point multipliers | |
US5408426A (en) | Arithmetic unit capable of performing concurrent operations for high speed operation | |
JPH05250146A (en) | Arithmetic operation circuit executing integer involution processing | |
KR20210147070A (en) | multi-input floating point adder | |
KR20080054435A (en) | Arithmetic unit and method for performing division or square root operations of floating point numbers | |
US6598065B1 (en) | Method for achieving correctly rounded quotients in algorithms based on fused multiply-accumulate without requiring the intermediate calculation of a correctly rounded reciprocal | |
JPH0823812B2 (en) | Floating point data calculation method and calculation device | |
JP2558669B2 (en) | Floating point arithmetic unit | |
US20030115236A1 (en) | Elimination of rounding step in the short path of a floating point adder | |
JPH0283728A (en) | floating point multiplier | |
JPH04172526A (en) | Floating point divider | |
JP2003084969A (en) | Floating-point remainder arithmetic unit, information processing device, and computer program | |
JP3187824B2 (en) | Normalization circuit | |
JP4428778B2 (en) | Arithmetic device, arithmetic method, and computing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080306 Year of fee payment: 12 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090306 Year of fee payment: 13 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100306 Year of fee payment: 14 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110306 Year of fee payment: 15 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110306 Year of fee payment: 15 |
|
EXPY | Cancellation because of completion of term | ||
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120306 Year of fee payment: 16 |