JP3137131B2 - Floating point multiplier and multiplication method - Google Patents

Floating point multiplier and multiplication method

Info

Publication number
JP3137131B2
JP3137131B2 JP03331644A JP33164491A JP3137131B2 JP 3137131 B2 JP3137131 B2 JP 3137131B2 JP 03331644 A JP03331644 A JP 03331644A JP 33164491 A JP33164491 A JP 33164491A JP 3137131 B2 JP3137131 B2 JP 3137131B2
Authority
JP
Japan
Prior art keywords
precision
exponent
multiplier
digit
multiplicand
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP03331644A
Other languages
Japanese (ja)
Other versions
JPH05165605A (en
Inventor
好正 竹部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP03331644A priority Critical patent/JP3137131B2/en
Publication of JPH05165605A publication Critical patent/JPH05165605A/en
Application granted granted Critical
Publication of JP3137131B2 publication Critical patent/JP3137131B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、受動小数点乗算器及び
乗算方法に係り、特に、二進法の浮動小数点で表された
乗数及び被乗数の指数部同士の加算、及びバイアス値の
減算を行い、この演算結果について、仮数部に関する演
算結果に基づいて桁上げの処理を行う浮動小数点乗算器
及び乗算方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a passive-point multiplier and a multiplication method, and more particularly, to an addition of exponents of a multiplier and a multiplicand expressed in a binary floating-point and a subtraction of a bias value. The present invention relates to a floating-point multiplier and a multiplication method for performing a carry process on a calculation result based on a calculation result regarding a mantissa.

【0002】本発明に係る浮動小数点乗算器及び乗算方
法は、例えば、IEEE754−1985規格における
2つ以上の精度に対応するものである。IEEE規格で
は、単精度、倍精度、拡張倍精度という3通りの精度の
数値表現が定義されており、それぞれの指数部は8ビッ
ト、11ビット、15ビットの幅をもつ。
[0002] A floating point multiplier and a multiplication method according to the present invention correspond to, for example, two or more accuracies in the IEEE 754-1985 standard. In the IEEE standard, three types of numerical expressions of precision, single precision, double precision, and extended double precision, are defined, and each exponent has a width of 8, 11, or 15 bits.

【0003】IEEE規格による表現では、指数は実際
の値xにバイアスとして定数Bを加えた数X=x+Bを
演算に用いる。具体的には表1のように定義されてい
る。
In the expression based on the IEEE standard, the exponent uses a number X = x + B obtained by adding a constant B as a bias to an actual value x for calculation. Specifically, it is defined as shown in Table 1.

【0004】[0004]

【表1】 演算における指数の演算の場合、積の指数zと乗数/被
乗数の指数X,Yは次のような関係となる。([]内
は、仮数部の演算結果により行う可能性のある演算) 実際に乗算器の中では、式のような演算が行われる。
[Table 1] In the case of an exponent operation in the operation, the exponent z of the product and the exponents X and Y of the multiplier / multiplicand have the following relationship. (Operations in [] may be performed based on the result of mantissa operation) Actually, an operation such as an expression is performed in the multiplier.

【0005】[0005]

【従来の技術】従来、図5に示すような、浮動小数点乗
算器のうちの指数部に関する演算装置があった。本演算
装置は同図に示すように、単精度、倍精度、拡張倍精度
の3種類の精度で指数部の演算を行うことができる演算
装置であり、単精度用指数部演算装置531 と、倍精度
用指数部演算装置532 と、拡張倍精度用指数部演算装
置533 と、指示によりこれら、3種類の演算装置のう
ちの1つを選択する選択手段50とを有するものであ
る。また、各演算装置531 ,532 ,533 には各
々、二進法の浮動小数点で表された乗数及び被乗数の指
数部同士の加算、及びバイアス値の減算を行う指数部演
算手段511 ,512 ,513 と、指数部演算手段によ
る指数部に関する演算結果について、仮数部に関する演
算結果に基づいて桁上げの処理を行う後処理手段5
1 ,522 ,523 とを各々有するものである。
2. Description of the Related Art Conventionally, there has been an arithmetic unit relating to an exponent part of a floating-point multiplier as shown in FIG. As this operation apparatus shown in the drawing, single, double, an arithmetic unit capable of performing the calculation of the exponent in the double-extended three precision and single precision for exponent arithmetic unit 53 1 , those having a double-precision for exponent arithmetic unit 53 2, and double extended precision for exponent arithmetic unit 53 3, and selecting means 50 for these, to select one of three types of arithmetic unit by an instruction . Each of the arithmetic units 53 1 , 53 2 , and 53 3 has exponent arithmetic means 51 1 , 51 for performing addition of exponents of multipliers and multiplicands represented by binary floating-point numbers and subtracting bias values. 2, 51 3 and, for calculation results on the exponent part by the exponent part calculation unit, post-processing unit 5 for processing the carry on the basis of the calculation results for the mantissa
21 1 , 52 2 , and 52 3 respectively.

【0006】また、各演算装置の指数部演算手段は、各
精度に対応する桁幅等の演算能力をもつものである。す
なわち、単精度の場合には、8ビットの桁幅、倍精度の
場合には、11ビットの桁幅、拡張倍精度の場合には、
15ビットの桁幅をもつとともに、各精度に対応して、
異なるバイアス値が用いられる。
[0006] The exponent calculation means of each calculation device has a calculation capability such as a digit width corresponding to each precision. That is, in the case of single precision, the digit width of 8 bits, in the case of double precision, the digit width of 11 bits, and in the case of extended double precision,
With a digit width of 15 bits and corresponding to each precision,
Different bias values are used.

【0007】[0007]

【発明が解決しようとする課題】ところで、以上説明し
たように、従来例に係る浮動小数点乗算器にあっては、
複数の精度の乗算が可能な乗算器の場合には、各精度に
対応して、別々の指数部演算用の演算装置を設けるよう
にしている。これは、各精度で必要とする桁幅が異なる
からだけではなく、表1に示すように、バイアス値Bも
精度によって異なるからである。そのため、従来例にあ
っては、複数の精度の乗算が可能な浮動小数点乗算器に
あっては、式の演算を実現するには、各精度毎に別々
の演算装置が必要となり、部品点数の増大、制作費用の
増大、制作の手間の増加、及び装置の大型化につながる
という問題点を有していた。
By the way, as described above, in the conventional floating point multiplier,
In the case of a multiplier capable of multiplying a plurality of precisions, a separate arithmetic unit for exponent operation is provided for each precision. This is not only because the required digit width differs for each precision, but also because the bias value B varies depending on the precision as shown in Table 1. Therefore, in the conventional example, in a floating-point multiplier capable of multiplying a plurality of precisions, a separate arithmetic unit is required for each precision in order to realize the operation of the expression, and the number of parts is reduced. There is a problem that it leads to an increase in production cost, an increase in production time, and an increase in size of the apparatus.

【0008】そこで、本発明は、複数の精度に対応して
浮動小数点の乗算が可能であるが、それによって、部品
点数の増加、制作費用の増大、制作の手間の増加及び装
置の大型化につながらない浮動小数点乗算器及び乗算方
法を提供することを目的としてなされたものである。
Therefore, the present invention enables floating-point multiplication in accordance with a plurality of precisions, which leads to an increase in the number of parts, an increase in production cost, an increase in production time, and an increase in the size of the apparatus. The purpose of the present invention is to provide a floating-point multiplier and a multiplication method that cannot be connected.

【0009】[0009]

【課題を解決するための手段】以上の技術的課題を解決
するため、第一の発明は、図1に示すように、二進法の
浮動少数点で表された乗数及び被乗数の指数部同士の加
算、及びバイアス値の補数の加算を行う指数部演算手段
10と、乗数及び被乗数の仮数部同士の乗算を行う仮数
部乗算回路と、指数部演算手段10による指数部に関す
る演算結果について、仮数部乗算回路による仮数部に関
する演算結果に基づいて桁上げの処理を行う後処理手段
20とを有し、前記指数部演算手段10及び後処理手段
20は、少なくとも2種類の精度のうち、高精度に対応
した桁幅及びバイアス値での演算及び処理を行うととも
に、低精度の演算を行う場合には、高精度に対応した桁
幅のうち、上位桁から低精度に対応した桁幅分までの桁
には低精度で表された指数部を割り当て、残りの各桁に
は1を割り当てたものを併合して乗数又は被乗数の指数
部として、前記指数部演算手段10に供給するプリ処理
手段30a,30bを設けたものである。
In order to solve the above technical problem, a first invention is to add an exponent part of a multiplier and a multiplicand represented by a binary floating point as shown in FIG. , And an exponent part operation means 10 for adding the complement of the bias value, a mantissa part multiplication circuit for multiplying the mantissa parts of the multiplier and the multiplicand, and a mantissa part multiplication operation result of the exponent part by the exponent part operation means 10. And a post-processing means for performing carry-out processing based on the result of the operation concerning the mantissa by the circuit. The exponent part calculating means and the post-processing means correspond to high precision among at least two kinds of precision. When performing low-precision calculations while performing calculations and processing using the specified digit width and bias value, the digits from the upper digits to the digits corresponding to the low-precision digits in the digit widths corresponding to the high precision are used. Is represented with low precision Pre-processing means 30a and 30b for supplying the exponent part to the exponent part calculation means 10 as the exponent part of the multiplier or the multiplicand by merging the exponent parts assigned to 1 and the remaining digits. .

【0010】二進法の浮動少数点で表された乗数及び被
乗数の指数部同士の加算、及びバイアス値の補数の加算
を行う(S2)とともに、乗数及び被乗数の仮数部同士
の乗算を行い、該仮数部に関する演算結果に基づいて桁
上げの処理を行い(S3)、乗数及び被乗数の指数部同
士の加算、バイアス値の数の加算及び桁上げの処理
は、少なくとも2種類の精度のうち、高精度に対応した
桁幅及びバイアス値で行うとともに、低精度の演算を行
う場合には、乗数及び被乗数の指数部同士の加算、及び
バイアス値の補数の加算を行う(S2)前に、高精度に
対応した桁幅のうち、上位桁から低精度に対応した桁幅
分までの桁には低精度で表された指数部を割り当て、残
りの各桁には1を割り当てたものを併合して乗数または
被乗数の指数部とする(S1)ものである。
The addition of the exponents of the multiplier and the multiplicand represented by the binary floating-point number and the addition of the complement of the bias value are performed (S2), and the multiplication of the mantissa of the multiplier and the multiplicand is performed. performs processing carry on the basis of the calculation results for parts (S3), the addition of the exponent portions of the multiplier and multiplicand, processing complement addition and carry the bias value, the at least two types of precision, high When performing low-precision calculations while performing calculations with the digit width and bias value corresponding to the precision, before performing addition of the exponent parts of the multiplier and the multiplicand and addition of the complement of the bias value (S2), In the digit widths corresponding to, the exponent part represented with low precision is assigned to the digits from the high-order digit to the digit width corresponding to low precision, and 1 is assigned to each of the remaining digits and merged. Exponent of multiplier or multiplicand (S1) is intended.

【0011】[0011]

【作用】少なくとも、2種類の精度での乗算が可能な場
合に、低精度での乗算の指示があると、乗算を行おうと
する浮動小数点で表された乗数及び被乗数について、指
数部と仮数部に分離し、乗数及び被乗数の当該指数部が
各々前記プリ処理手段30a,30bに入力する。ここ
で、二進法の浮動小数点により被乗数及び乗数を表す
と、各々QX ・2X ,QY ・2Y となり、QX ,QY
被乗数及び乗数の仮数部といい、2の巾X,Yを被乗数
及び乗数の指数部という。当該被乗数と乗数との間で乗
算を行うと、その積は(QX ・QY )・2X+Y となり、
本発明はこの指数部の演算に係るものである。
When multiplication with at least two types of precision is possible, if multiplication with low precision is instructed, the exponent part and the mantissa part of the floating-point multiplier and multiplicand to be multiplied are given. And the exponents of the multiplier and the multiplicand are input to the pre-processing means 30a and 30b, respectively. Here, when the multiplicand and the multiplier are expressed by a binary floating point, they become Q X · 2 X and Q Y · 2 Y , respectively, and Q X and Q Y are called mantissa parts of the multiplicand and the multiplier, and the widths X and Y of 2 Are referred to as the multiplicand and the exponent of the multiplier. When the multiplication is performed between the multiplicand and the multiplier, the product is (Q X · Q Y ) · 2 X + Y ,
The present invention relates to the calculation of the exponent.

【0012】ステップS1で、前記プリ処理手段30
a,30bは少なくとも2種類の精度のうち、高精度に
対応する桁幅のうち、上位桁から低精度の桁幅分には本
来の低精度で表された指数部を割り当て、残りの各桁に
は1を割り当てた上で併合する。併合されたデータは、
2種類の精度のうち、高精度の演算に対応する態様であ
る。
In step S1, the pre-processing means 30
“a” and “30b” are assigned the exponent part represented by the original low precision to the low-precision digit width from the high-order digit in the digit width corresponding to the high precision among the at least two types of precision, and Is assigned to 1 and then merged. The merged data is
This is a mode corresponding to a high-precision calculation among two types of precision.

【0013】今、説明上簡単のために、2種類の精度が
選択可能であるとし、そのうち高精度に対応する長桁幅
をLビット、低精度に対応する短桁幅をS(<L)ビッ
トとして、プリ処理手段30a,30bの処理について
説明する(L及びSは自然数)。すなわち、入力された
被乗数及び乗数の2つの指数部X=(X0 ・・・ XS-1),
Y=(Y0 ・・・Y S-1)に対して、プリ処理手段30a,
30bは以下のようなLビットの数X’,Y’を出力す
る。 X’=(X0 ・・・ XS-1 1…1) Y’=(Y0 ・・・ YS-1 1…1)
For the sake of simplicity, it is assumed that two types of precision can be selected. Among them, a long digit width corresponding to high precision is L bits, and a short digit width corresponding to low precision is S (<L). The processing of the pre-processing units 30a and 30b will be described as bits (L and S are natural numbers). That is, the two exponents X = (X 0 ... X S-1 ) of the input multiplicand and multiplier.
For Y = (Y 0 ... Y S-1 ), the pre-processing means 30a,
30b outputs the following L-bit numbers X 'and Y'. X '= (X 0 ··· X S-1 1 ... 1) Y' = (Y 0 ··· Y S-1 1 ... 1)

【0014】ステップS2では、前記指数部演算手段1
0により、指数部X’とY’との加算が行われた後、バ
イアス値Bの減算が行われる。すなわち、Z’=X’+
Y’−Bが得られる。ここで、当該指数部演算手段10
は高精度に対応する演算能力があり、バイアス値Bは高
精度に対応する値2L-1 −1に設定されている。ところ
で、バイアス値B=2L-1 −1=(011・・・11)
を減算するのはBの2の補数−B=(100・・・0
1)を加算するのと同様である。したがって、次のよう
な演算を行う。 ここで、Z’の上位SビットZ= (Z 0 ・・・Z S-1)と
の関係を求めると、 Z’=X’+Y’−B すなわち、左辺=Z・2L-S +1・2L-S-1 +…+1・20 右辺=X・2L-S +1・2L-S-1 +…+1・20 +Y・2L-S +1・2L-S-1 +…+1・20 +2L-1 +1
In step S2, the exponent part operation means 1
With the addition of 0, the exponent parts X ′ and Y ′ are added, and then the bias value B is subtracted. That is, Z ′ = X ′ +
Y′-B is obtained. Here, the exponent part calculating means 10
Has a calculation capability corresponding to high precision, and the bias value B is set to a value 2 L−1 −1 corresponding to high precision. By the way, the bias value B = 2 L−1 −1 = (011... 11)
Is subtracted from the two's complement of B−B = (100... 0
This is the same as adding 1). Therefore, the following operation is performed. Here, when the relation of Z ′ with the upper S bits Z = (Z 0 ... Z S−1 ) is obtained, Z ′ = X ′ + Y′−B, that is, the left side = Z · 2 LS + 1 · 2 LS -1 + ... + 1 - 2 0 right = X · 2 LS +1 · 2 LS-1 + ... + 1 · 2 0 + Y · 2 LS +1 · 2 LS-1 + ... + 1 · 2 0 +2 L-1 +1

【0015】両辺を2L-S で割って、等しいとおくと、 Z+1/2+…+1/2L-S =X+Y+2・(1/2+…+ 1/2L-S )+1/2L-S +2S-1 が得られ、さらに変形すると、 Z=X+Y+2S-1 +1=X+Y−(2S-1 −1) … となる。この式は、低精度の場合に行われるべき処理
に対応(加算して、低精度のバイアス値を減算)してい
る。
[0015] by dividing both sides by 2 LS, when set equal, Z + 1/2 + ... + 1/2 LS = X + Y + 2 · (1/2 + ... + 1/2 LS) +1/2 LS +2 S-1 is obtained, When further deformed, Z = X + Y + 2 S−1 + 1 = X + Y− (2 S−1 −1). This equation corresponds to the processing to be performed in the case of low precision (addition and subtraction of the low precision bias value).

【0016】ステップS3で、前記後処理手段20によ
り、仮数部からの指令があると、インクリメントを行っ
た数A’が次のように得られる。 ここで、A’の上位桁からSビットまでの短桁分A=
(A O ・・・A S-1 ) は、 であり、式は、低精度の場合の式に一致し、高精
度の能力をもつ指数部演算手段10及び後処理手段20
を用いて、低精度の指数部の演算を行うことができるこ
とになる。尚、高精度により、指数部の演算を行う場合
には、従来の場合と何ら変わりなく、プリ処理手段30
a,30bは入力した指数部をそのまま出力するに過ぎ
ない。
In step S3, when there is an instruction from the mantissa by the post-processing means 20, the incremented number A 'is obtained as follows. Here, a short digit A = from the upper digit of A ′ to the S bit
(A O・ ・ ・ A S-1 ) The exponent part calculation means 10 and the post-processing means 20 have the same formula as that of the low precision case, and have high precision capability.
Can be used to perform a low-precision exponent operation. Incidentally, when the calculation of the exponent part is performed with high accuracy, the pre-processing means 30 is no different from the conventional case.
a and 30b merely output the input exponent part as it is.

【0017】[0017]

【実施例】本発明の実施例に係る浮動小数点乗算器及び
乗算方法について説明する。図3には、本実施例に係る
浮動小数点乗算器の全体図を示すものである。同図に示
すように、本乗算器は、二進法の浮動小数点で表された
乗数及び被乗数の指数部同士の加算、及びバイアス値B
の減算を行う加算器である指数部演算回路1と、当該指
数部演算回路1による指数部に関する演算結果につい
て、仮数部に関する演算結果に基づいて桁上げの処理を
行う後処理回路2とを有し、当該指数部演算回路1及び
後処理回路2には、少なくとも二種類の精度のうち、高
精度に対応した桁幅及びバイアス値での演算及び処理を
行うものである。また、本実施例にあっては、低精度の
演算を行う場合には、高精度の桁幅のうち上位桁から低
精度の桁幅分までには本来の低精度で表された指数部を
割り当て、残りの各桁には“1”を割り当てたものを併
合して乗数または被乗数の指数部として、前記指数部演
算回路1に供給するプリ処理回路3a,3bを設けたも
のである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS A floating point multiplier and a multiplying method according to an embodiment of the present invention will be described. FIG. 3 is an overall view of the floating-point multiplier according to the present embodiment. As shown in the figure, the present multiplier performs addition of exponent parts of a multiplier and a multiplicand represented by a floating point number in a binary system, and a bias value B.
An exponent part operation circuit 1 that is an adder for performing subtraction of the exponent part, and a post-processing circuit 2 that performs a carry process on the operation result of the exponent part by the exponent part operation circuit 1 based on the operation result of the mantissa part. The exponent part operation circuit 1 and the post-processing circuit 2 perform operations and processes with a digit width and a bias value corresponding to high accuracy among at least two types of accuracy. Further, in the present embodiment, when performing low-precision arithmetic, the exponent part represented by the original low precision is used in the high-precision digit width from the upper digit to the low-precision digit width. Pre-processing circuits 3a and 3b to be supplied to the exponent part operation circuit 1 are provided as an exponent part of a multiplier or a multiplicand by merging the numbers to which "1" is assigned to each of the remaining digits.

【0018】さらに、前記後処理回路2は同図に示すよ
うに、当該指数部演算回路1の演算結果を保持して、タ
イミングの調整を行うレジスタ21,22と、前記指数
部演算回路1による指数部に関する演算結果について桁
上げを行う桁上げ回路23と、仮数部の演算結果に基づ
いて桁上げを行うか行わないかの選択を行うマルチプレ
クサ24と、を有する。
Further, as shown in the figure, the post-processing circuit 2 holds registers 21 and 22 for holding the operation result of the exponent part operation circuit 1 and adjusting timing, and the exponent part operation circuit 1 It has a carry circuit 23 for carrying a calculation result on the exponent part, and a multiplexer 24 for selecting whether to carry or not to carry based on the result of the mantissa operation.

【0019】その他、本実施例にあっては、同図に示す
ように、精度モードに従って、指数部と仮数部とを切り
換えるアライン回路4a,4bと、仮数部の乗数及び被
乗数を一時保持するレジスタ5a,5bと、仮数部の乗
算を行う仮数部乗算回路6と、仮数部の積を保持するレ
ジスタ7と、仮数部の乗算結果の丸め及び正規化を行う
正規化回路8と、乗数又は被乗数のオペランドのチェッ
クを行うチェック部9,91と、当該チェック結果の状
態を示すステータス信号を保持するレジスタ92と、
∞,NAN 等(非数値)といった特殊な演算結果を生成す
る生成部93と、マルチプレクサ94と、乗算の最終的
な結果である積を保持するレジスタ95と、EXCP
(例外信号、IEEE規格の場合には4通りの例外通知
が定義されている)を保持するレジスタ96と、を有す
るものである。
In addition, in the present embodiment, as shown in the figure, aligning circuits 4a and 4b for switching between an exponent part and a mantissa part according to the precision mode, and a register for temporarily holding the multiplier and multiplicand of the mantissa part. 5a, 5b, a mantissa multiplying circuit 6 for multiplying the mantissa, a register 7 for holding the product of the mantissa, a normalizing circuit 8 for rounding and normalizing the multiplication result of the mantissa, a multiplier or multiplicand Check units 9 and 91 for checking the operands of the above, a register 92 for holding a status signal indicating the state of the check result,
A generation unit 93 for generating a special operation result such as), NAN, etc. (non-numeric value), a multiplexer 94, a register 95 for holding a product as a final result of multiplication, and an EXCP
(Exception signal, four types of exception notification are defined in the case of the IEEE standard).

【0020】本実施例にあっては、説明の簡単のためI
EEE規格の単精度(低精度)/倍精度(高精度)の選
択が可能な浮動小数点乗算器を説明する。ここで、単精
度の場合の桁幅(ビット幅)は8ビットで、バイアス値
Bは、2 7 −1である。また、倍精度の場合の桁幅は1
1ビットで、バイアス値Bは、2 10−1であるが、前記
指数部演算回路1等には、倍精度の場合の桁幅(11ビ
ット)及びバイアス値Bは210−1が備えられている。
図4には本実施例に係る乗算器のうち、指数部の演算に
係る部分を抜き出して示したものである。
In this embodiment, for the sake of simplicity, I
Selection of single precision (low precision) / double precision (high precision) of EEE standard
A description will be given of a floating-point multiplier which can be selected. Where
The digit width (bit width) in the case of degrees is 8 bits, and the bias value
B is 2 7It is -1. The digit width for double precision is 1
With one bit, the bias value B is 2 Ten-1 but
The exponent part arithmetic circuit 1 and the like have a digit width (11 bits) in the case of double precision.
And the bias value B are 2Ten-1 is provided.
FIG. 4 illustrates the operation of the exponent part in the multiplier according to the present embodiment.
These parts are extracted and shown.

【0021】同図に示すように、前記プリ処理回路3
a,3bは、IEEE規格に基づく倍精度に対応する桁
幅である11ビットが設けられ、その最上位桁から単精
度に対応する桁幅である8ビット分は入力したデータを
そのまま出力する信号線であり、残りの桁幅である3ビ
ット分の各信号線は、各プリ処理回路3a,3bに各々
設けたOR素子31a,32a,33a.31b,32
b,33bの一方の端子に入力するように設けられ、当
該OR素子の他方の端子には、単精度モードと倍精度モ
ードとの切換えを指示する信号線(+SEL SNG)が接続
し、各OR素子31a等の各3ビット分の出力信号線は
単精度分の8ビット信号線と併合されて、各々前記指数
部演算回路1に入力するように構成されている。ここ
で、単精度モードと倍精度モードとの切換えは、+SEL
SNG を各々“1”と“0”との間で切換えることにより
行われる。
As shown in FIG.
Signals a and 3b are provided with 11 bits which is a digit width corresponding to double precision based on the IEEE standard, and 8 bits which is a digit width corresponding to single precision from the most significant digit are signals for directly outputting input data. , And the signal lines for the remaining digit width of 3 bits are OR elements 31a, 32a, 33a... Provided in the respective pre-processing circuits 3a, 3b. 31b, 32
b, 33b, and a signal line (+ SEL) for instructing switching between the single precision mode and the double precision mode is provided to the other terminal of the OR element. SNG) are connected, and the output signal lines for each 3 bits of each OR element 31a and the like are combined with the 8-bit signal lines for single precision, and each is input to the exponent part operation circuit 1. . Here, switching between the single precision mode and the double precision mode is performed by + SEL
This is done by switching the SNG between "1" and "0" respectively.

【0022】続いて、本実施例に係る浮動小数点乗算器
のうちの指数部の演算に関する動作について説明する。
単精度モードでの乗算を行う場合、前記アライン回路4
a,4bにより、被乗数及び乗数について、仮数部と指
数部に切り分けられ、被乗数及び乗数の指数部が前記1
1ビットの長桁幅のうち最上位桁から左詰めにして、8
ビット分として、前記各プリ処理回路3a,3bに入力
する。入力した被乗数と乗数との8ビットの2つの指数
部を各々X=(X0 ・・・ X7) , Y=(Y0 ・・・Y7) と
する。単精度モードでの乗算の指示があると、前記プリ
処理回路3a,3bの前記OR素子31a,32a,3
3a,31b,32b,33bの一方の端子に接続され
た+SEL SNG 信号線が“1”状態となる。
Next, the operation relating to the operation of the exponent part in the floating-point multiplier according to the present embodiment will be described.
When performing multiplication in the single precision mode, the alignment circuit 4
The multiplicand and the multiplier are divided into a mantissa part and an exponent part according to a and 4b.
8 bits left-justified from the most significant digit of the 1-bit long digit width
The bits are input to the pre-processing circuits 3a and 3b. X = (X 0 ... X 7 ) and Y = (Y 0 ... Y 7 ) represent two 8-bit exponents of the input multiplicand and multiplier. When there is an instruction for multiplication in the single precision mode, the OR elements 31a, 32a, 3
+ SEL connected to one terminal of 3a, 31b, 32b, 33b The SNG signal line goes to "1" state.

【0023】したがって、プリ処理回路3a,3bは、
11ビットの桁幅のうち、最上位桁から左詰めにして8
ビット分にはアライン回路4a,4bから送出された指
数部のデータが、残りの空いている3ビット分には前記
OR素子31a,32a,33a,31b,32b,3
3bから出力された“111”データが割り当てられた
ものが併合された以下のような11ビットの数X’,
Y’を出力する(前述した場合でL=11,S=8)。 X’=(X0 ・・・ X7 111) Y’=(Y0 ・・・ Y7 111) 当該X’及びY’は前記指数部演算回路1に入力するこ
とになる。当該演算回路1では、入力された2つのデー
タを加算し、倍精度の場合のバイアス値B=210−1を
減算したデータZ’=X’+Y’−(210−1)が求め
られる。
Therefore, the pre-processing circuits 3a and 3b
Of the 11-bit digit width, 8
The exponent data sent from the aligning circuits 4a and 4b is stored in the bits, and the OR elements 31a, 32a, 33a, 31b, 32b and 32b are written in the remaining three bits.
An 11-bit number X ', as shown below, in which the data to which "111" data output from 3b is allocated is merged.
Y ′ is output (L = 11, S = 8 in the case described above). X ′ = (X 0 ... X 7 111) Y ′ = (Y 0 ... Y 7 111) The X ′ and Y ′ are input to the exponent part operation circuit 1. In the arithmetic circuit 1, data Z '= X' + Y '-(2 10 -1) is obtained by adding the two input data and subtracting the bias value B = 2 10 -1 in the case of double precision. .

【0024】このとき、倍精度のバイアス値B=(01
111111111)を減算するのは、Bの2の補数−
B=(10000000001)を加算するのと同様で
ある。したがって、次のような演算が当該演算回路1で
行われる。 ここで、Z’の上位8ビットZ= (Z0・・・ Z7)は前述
した理由から、 Z=X+Y−(27 −1) … となっている。即ち、前述のに示したように、27
1は単精度のバイアス値Bに相当し式は単精度の場合
に演算されるべき式と同じ結果が得られることになる。
At this time, the double-precision bias value B = (01)
111111111) is subtracted from the 2's complement of B-
This is the same as adding B = (1000000001). Therefore, the following operation is performed in the operation circuit 1. Here, the upper 8 bits Z = (Z 0 ... Z 7 ) of Z ′ are Z = X + Y− (2 7 −1). That is, as described above, 2 7
1 corresponds to the single-precision bias value B, and the expression yields the same result as the expression to be calculated in the single-precision case.

【0025】後処理回路2では、仮数部の演算結果に基
づいて、桁上げの指令があると、指数部演算回路1で得
られた演算結果( Z C Z0 ・・・ Z7 111) に1を加
算することになる。その結果A’が以下のように得られ
ることになる。 ここで、A’の上位8ビットA=(A O ・・・A 7 )
は、 となる。このは単精度の場合の式に相当するもので
ある。
In the post-processing circuit 2, if there is a carry instruction based on the result of the mantissa operation, the operation result (Z C Z 0 ... Z 7 111) obtained by the exponent operation circuit 1 is added to the result. 1 will be added. As a result, A 'is obtained as follows. Here, the upper 8 bits of A 'A = (A O ... A 7 )
Is Becomes This corresponds to the expression for the case of single precision.

【0026】一方、倍精度での指数部の演算を行う場合
には、従来例と全く同じ動作を行うことになり、前記プ
リ処理回路3a,3bは11ビットの指数部を前記アラ
イン回路4a,4bから受け取ると、前記OR素子の一
方の端子の信号線+SEL SNGには“0”が設定されてお
り、入力した当該データはそのまま、前記指数部演算回
路1に入力し、通常の処理が行われることになり、従来
と変わりはない。
On the other hand, when the operation of the exponent part is performed in double precision, the same operation as in the conventional example is performed, and the pre-processing circuits 3a and 3b add the 11-bit exponent part to the alignment circuits 4a and 4a. 4b, the signal line of one terminal of the OR element + SEL “0” is set in SNG, and the input data is directly input to the exponent part operation circuit 1 and normal processing is performed, which is no different from the conventional one.

【0027】尚、以上の説明においては、単精度と倍精
度との2種類の場合について説明したが、当該場合に限
られることなく、3種類以上の精度の場合にあっても、
その最高の精度を前述した高精度として適用し、最高の
精度以外の精度に関しては、低精度として適用すれば良
い。また、図4の回路にあっては、正論理の場合を示し
たが、負論理で回路を構成するようにしても良い。その
場合には、OR素子に代えて、NOR素子を用いれば良
い。
In the above description, two types of cases, single precision and double precision, have been described. However, the present invention is not limited to this case.
The highest accuracy may be applied as the high accuracy described above, and the accuracy other than the highest accuracy may be applied as the low accuracy. Further, although the case of the positive logic is shown in the circuit of FIG. 4, the circuit may be configured by the negative logic. In that case, a NOR element may be used instead of the OR element.

【0028】[0028]

【発明の効果】以上説明したように、本発明にあって
は、乗数及び被乗数の指数部の演算を行う際に、少なく
とも2つの精度のうち、低精度の演算を行う場合には、
高精度で必要とする桁幅のうち、上位桁から、低精度で
必要とする桁幅分までの桁には低精度で表された指数部
を割り当て、残りの各桁には“1”を割り当てたもの
を、併合して乗数または被乗数の指数部として、演算を
行うようにしている。したがって、複数の精度の浮動小
数点の乗算を共通の回路で行うことができるので、部品
点数の増加、作費用の増大、及び装置の大型化を招か
ない。また、本発明によれば、低精度の演算の場合に
は、必要とする桁幅の残りの各下位桁に“1”を割り当
てているので、仮数部からの桁上げに基づく処理の後に
は、指数部の演算は必要ではなく、演算工程数を削減し
演算速度の向上を図ることができる。さらに、本発明に
あっては、前記指数部同士の加算及び前記バイアス値の
補数の加算に並行して、乗数及び被乗数の仮数部同士の
演算を行うようにしているので乗算の処理時間を短縮化
することができる。
As described above, according to the present invention, when calculating the exponent part of the multiplier and the multiplicand, when performing low-precision calculation of at least two precisions,
Of the digit widths required for high precision, exponents represented with low precision are assigned to digits from the upper digit to the digit width required for low precision, and "1" is assigned to each of the remaining digits. The assigned ones are merged and operated as the exponent part of the multiplier or the multiplicand. Therefore, it is possible to perform floating-point multiplication of the plurality of precision in a common circuit, increase in the number of components, increase in the manufacturing operation costs, and does not cause an increase in the size of the apparatus. Further, according to the present invention, in the case of a low-precision operation, "1" is assigned to each of the remaining lower digits of the required digit width, so that after the process based on the carry from the mantissa, The operation of the exponent part is not required, and the number of operation steps can be reduced and the operation speed can be improved. Further, in the present invention, the arithmetic operation between the mantissa parts of the multiplier and the multiplicand is performed in parallel with the addition of the exponent parts and the addition of the complement of the bias value, so that the processing time of the multiplication is reduced. Can be

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

【図1】第一の発明の原理ブロック図FIG. 1 is a block diagram of the principle of the first invention.

【図2】第二の発明の原理流れ図FIG. 2 is a flowchart of the principle of the second invention.

【図3】実施例に係る乗算器の全体ブロック図FIG. 3 is an overall block diagram of a multiplier according to the embodiment;

【図4】実施例に係る乗算器の指数部の演算に関する装
置部分のブロック図
FIG. 4 is a block diagram of a device related to an operation of an exponent part of the multiplier according to the embodiment;

【図5】従来例に係るブロック図FIG. 5 is a block diagram according to a conventional example.

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

10(1) 指数部演算手段(指数部演算回路) 20(2) 後処理手段(後処理回路) 30a,30b プリ処理手段(プリ処理回路) 10 (1) Exponent part operation means (exponent part operation circuit) 20 (2) Post-processing means (post-processing circuit) 30a, 30b Pre-processing means (pre-processing circuit)

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 二進法の浮動数点で表された乗数及び
被乗数の指数部同士の加算、及びバイアス値の補数の加
算を行う指数部演算手段と、前記指数部演算手段による前記指数部同士の加算及び前
記バイアス値の補数の加算に並行して、 乗数及び被乗数
の仮数部同士の乗算を行う仮数部乗算回路と、 指数部演算手段による指数部に関する演算結果につい
て、仮数部乗算回路による仮数部に関する演算結果に基
づいて桁上げの処理を行う後処理手段とを有し、 前記指数部演算手段及び後処理手段は、少なくとも2種
類の精度のうち、高精度に対応した桁幅を有し、高精度
の演算を行う場合には、高精度に対応した桁幅及びバイ
アス値での演算及び処理を行うとともに、 低精度の演算を行う場合には、高精度に対応した桁幅の
うち、上位桁から低精度に対応した桁幅分までの桁には
低精度で表された指数部を割り当て、残りの各桁には1
を割り当てたものを併合して乗数又は被乗数の指数部と
して、前記指数部演算手段に供給するプリ処理手段を設
けたことを特徴とする浮動数点乗算器。
1. A sum of the multiplier and multiplicand exponent portions of the expressed in floating-point binary, and the exponent calculation means for adding the complement of the bias value, the exponent portions by the exponent part arithmetic means Addition and before
A mantissa multiplying circuit for multiplying the mantissas of the multiplier and the multiplicand in parallel with the addition of the complement of the bias value; And a post-processing means for performing a carry process based on the result. The exponent part calculating means and the post-processing means have a digit width corresponding to high precision among at least two kinds of precision, and have high precision.
When performing the calculation of , the calculation and processing with the digit width and bias value corresponding to high precision are performed, and when performing the calculation of low precision, the higher digit of the digit width corresponding to high precision is calculated. Digits up to the low-precision digit width are assigned low-precision exponents, and each remaining digit is 1
Merges those assigned as exponent of the multiplier or the multiplicand, floating-point multiplier, characterized in that a pre-processing means for supplying to said exponent calculation means.
【請求項2】 二進法の浮動数点で表された乗数及び
被乗数の指数部同士の加算、及びバイアス値の補数の加
に並行して、乗数及び被乗数の仮数部同士の乗算を行
い、該仮数部に関する演算結果に基づいて桁上げの処理
を行い、 乗数及び被乗数の指数部同士の加算、バイアス値の補数
の加算及び桁上げの処理は、少なくとも2種類の精度の
うち、高精度に対応した桁幅で可能であり、高精度の演
算を行う場合には、高精度に対応した桁幅及びバイアス
値で行うとともに、 低精度の演算を行う場合には、乗数及び被乗数の指数部
同士の加算、及びバイアス値の補数の加算を行う前に、
高精度に対応した桁幅のうち、上位桁から低精度に対応
した桁幅分までの桁には低精度で表された指数部を割り
当て、残りの各桁には1を割り当てたものを併合して乗
数又は被乗数の指数部とすることを特徴とする浮動
点乗算方法。
2. A floating-adder of the multiplier and the exponent portions of the multiplicand represented by several points binary, and in parallel with the addition of the complement of the bias value, multiplies between the mantissa of the multiplier and multiplicand, the Carry-out processing is performed based on the result of mantissa operation. Addition of exponents of multipliers and multiplicands, addition of complements of bias values, and carry-over processing correspond to high precision among at least two types of precision. With a high precision performance.
When performing the arithmetic, the digit width and the bias value corresponding to the high precision are used, and when performing the low precision arithmetic, the addition of the exponent parts of the multiplier and the multiplicand and the addition of the complement of the bias value are performed. before,
Of the digit widths corresponding to high precision, the exponent part represented with low precision is assigned to the digits from the upper digit to the digit width corresponding to low precision, and 1 is assigned to each of the remaining digits. floating number <br/> point multiplication method characterized by the exponent of the multiplier or the multiplicand by.
JP03331644A 1991-12-16 1991-12-16 Floating point multiplier and multiplication method Expired - Fee Related JP3137131B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03331644A JP3137131B2 (en) 1991-12-16 1991-12-16 Floating point multiplier and multiplication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03331644A JP3137131B2 (en) 1991-12-16 1991-12-16 Floating point multiplier and multiplication method

Publications (2)

Publication Number Publication Date
JPH05165605A JPH05165605A (en) 1993-07-02
JP3137131B2 true JP3137131B2 (en) 2001-02-19

Family

ID=18245971

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03331644A Expired - Fee Related JP3137131B2 (en) 1991-12-16 1991-12-16 Floating point multiplier and multiplication method

Country Status (1)

Country Link
JP (1) JP3137131B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112101541B (en) * 2019-06-18 2023-01-17 上海寒武纪信息科技有限公司 Device, method, chip and board card for splitting high-bit-width data

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6168637A (en) * 1984-07-16 1986-04-09 Nec Corp Arithmetic unit
JPH02259927A (en) * 1989-03-31 1990-10-22 Fujitsu Ltd Floating point multiplier

Also Published As

Publication number Publication date
JPH05165605A (en) 1993-07-02

Similar Documents

Publication Publication Date Title
US6233597B1 (en) Computing apparatus for double-precision multiplication
US6925480B2 (en) Microarchitecture of an arithmetic unit
EP0472139A2 (en) A floating-point processor
JPH02196328A (en) Floating point computing apparatus
JP2002108606A (en) Sticky bit generating circuit and multiplier
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
EP0717350A2 (en) High-speed division and square root calculation unit
EP2435904B1 (en) Integer multiply and multiply-add operations with saturation
EP0529101B1 (en) Floating-point dividing circuit
JPH02115928A (en) Circuit and method of predicting sticky bit value
US6182100B1 (en) Method and system for performing a logarithmic estimation within a data processing system
US7373369B2 (en) Advanced execution of extended floating-point add operations in a narrow dataflow
EP0416308A2 (en) Rectangular array signed digit multiplier
JPH02294731A (en) Floating point arithmetic processor
JP2006172035A (en) Division/square root extraction computing element
US7016930B2 (en) Apparatus and method for performing operations implemented by iterative execution of a recurrence equation
US6990505B2 (en) Method/apparatus for conversion of higher order bits of 64-bit integer to floating point using 53-bit adder hardware
US7080112B2 (en) Method and apparatus for computing an approximation to the reciprocal of a floating point number in IEEE format
JPH0568725B2 (en)
JP3137131B2 (en) Floating point multiplier and multiplication method
US5206825A (en) Arithmetic processor using signed-digit representation of external operands
US5153847A (en) Arithmetic processor using signed digit representation of internal operands
US6317772B1 (en) Split remainder divider
JP4428778B2 (en) Arithmetic device, arithmetic method, and computing device

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19970909

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

Free format text: PAYMENT UNTIL: 20071208

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20081208

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20091208

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees