JPH03225522A - Floating point arithmetic unit - Google Patents

Floating point arithmetic unit

Info

Publication number
JPH03225522A
JPH03225522A JP2060290A JP2060290A JPH03225522A JP H03225522 A JPH03225522 A JP H03225522A JP 2060290 A JP2060290 A JP 2060290A JP 2060290 A JP2060290 A JP 2060290A JP H03225522 A JPH03225522 A JP H03225522A
Authority
JP
Japan
Prior art keywords
circuit
selection
selector
processing
output
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.)
Pending
Application number
JP2060290A
Other languages
Japanese (ja)
Inventor
Akira Katsuno
昭 勝野
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 JP2060290A priority Critical patent/JPH03225522A/en
Publication of JPH03225522A publication Critical patent/JPH03225522A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To decrease the number of incrementer circuits and to realize high integration by using one incrementer circuit for both a rounding process and an absolute value generating process in common. CONSTITUTION:When the exponent parts Ex and Ey of input data X and Y are so set that Ex>Ey or Ex = Ey and the arithmetic result of an arithmetic circuit 32 is plus, a critical path is in the order of the circuit 32, a selector 34, a multi-bit left shifter 35, a selector 37, the incremeter circuit 38, a 1-bit right shifter 40, and a selector 39. When Ex = Ey and the arithmetic circuit of the circuit 32 is minus, on the other hand, the path is in the order of the circuit 32, an inverter circuit 36, the selector 34, the multi-bit left shifter 35, and the selector 39. The circuit 38 which performs both the rounding process and absolute value generating process need not perform the rounding process when Ex - Ey =0 and it is not necessary to perform the rounding process and absolute value generating process, so the circuit 38 can be used in common for both the rounding process and absolute value generating process. Consequent ly, one incrementer circuit can be omitted and the high integration becomes possible.

Description

【発明の詳細な説明】 〔概要] 浮動小数点表記の数を加減算する浮動小数点演算装置に
関し、 丸め処理と絶対値化処理とで、ひとつのインクリメンタ
回路を共用できるようにし、インクリメンタ回路数を削
減して、集積化に適した浮動小数点演算装置を提供する
ことを目的とし、浮動小数点形式の二つの数の仮数部の
桁合わせを行う桁合わせ回路と、桁合わせした仮数部を
加算あるいは減算する加減算回路と、加減算回路の演算
結果が正値の場合には第1指示信号を発生する一方、負
値の場合には第2指示信号を発生する信号発生回路と、
加減算回路の出力を選択する第1選択状態または第2処
理回路の出力を選択する第2選択状態の何れかを取り得
る第1選択回路と、第1選択回路の出力を正規化処理す
る第1処理回路と、加減算回路の出力を極性反転する反
転回路と、第1処理回路の出力を選択する第1選択状態
または反転回路の出力を選択する第2選択状態の何れか
を取り得る第2選択回路と、第2選択回路の出力を丸め
あるいは絶対値化処理する第2処理回路と、第2処理回
路の出力を選択する第1選択状態または第1処理回路の
出力を選択する第2選択状態の何れかを取り得る第3選
択回路と、を備え、前記各選択回路は、第1指示信号に
応答して第1選択状態を取る一方、第2指示信号に応答
して第2選択状態を取ること、を特徴として構成する。
[Detailed Description of the Invention] [Summary] Regarding a floating point arithmetic unit that adds and subtracts numbers in floating point notation, one incrementer circuit can be shared for rounding processing and absolute value processing, and the number of incrementer circuits can be reduced. The purpose is to provide a floating-point arithmetic unit that is suitable for integration and has a digit-alignment circuit that aligns the mantissas of two numbers in floating-point format, and adds or subtracts the digit-aligned mantissas. a signal generation circuit that generates a first instruction signal when the operation result of the addition and subtraction circuit is a positive value, and generates a second instruction signal when the operation result is a negative value;
a first selection circuit that can take either a first selection state that selects the output of the addition/subtraction circuit or a second selection state that selects the output of the second processing circuit; and a first selection circuit that normalizes the output of the first selection circuit. a processing circuit, an inversion circuit that inverts the polarity of the output of the addition/subtraction circuit, and a second selection that can take either a first selection state that selects the output of the first processing circuit or a second selection state that selects the output of the inversion circuit. a second processing circuit that rounds or converts the output of the second selection circuit into an absolute value; and a first selection state that selects the output of the second processing circuit or a second selection state that selects the output of the first processing circuit. and a third selection circuit capable of taking any of the following, each selection circuit taking the first selection state in response to the first instruction signal and taking the second selection state in response to the second instruction signal. Constructed as a characteristic.

[産業上の利用分野] 本発明は、浮動小数点演算装置、特に、浮動小数点表記
の数を加減算する浮動小数点演算装置に関する。
[Industrial Application Field] The present invention relates to a floating point arithmetic device, and particularly to a floating point arithmetic device that adds and subtracts numbers in floating point notation.

近年、NC(数値制御)やグラフィックス表示装置、計
測器などの複雑な計算を高速に実行する分野で、F P
 U (floating point proces
sing u−nit  :浮動小数点演算装置)の需
要が増加している。
In recent years, F P
U (floating point processes
Demand for floating point arithmetic units (sing u-nits) is increasing.

FPUは浮動小数点表記法の数に対して必要な演算処理
を実行しその答えを得るもので、固定小数点方式の演算
に比べてダイナミックレンジが広い、精度が高いなどの
特長がある。
The FPU performs the necessary arithmetic processing on numbers in floating point notation to obtain the answer, and has features such as a wider dynamic range and higher precision than fixed point arithmetic.

〔従来の技術〕[Conventional technology]

例えば、浮動小数点表記の数の加減算は、第3図にその
処理フロー(但し、仮数部の処理フロー)を示すように
、ステップS1で入力データX、Yの仮数部の桁を揃え
て固定小数点形式に変換し、ステップS2で加算あるい
は減算を実行した後、ステ、プS3から35で順次に、
絶対値化処理、正規化処理および丸め処理を適宜に施し
て、出力データZを得る。
For example, when adding or subtracting numbers in floating point notation, the processing flow (however, the processing flow for the mantissa part) is shown in Figure 3. In step S1, the digits of the mantissa parts of input data After converting to the format and performing addition or subtraction in step S2, sequentially in steps S3 to 35,
Output data Z is obtained by appropriately performing absolute value processing, normalization processing, and rounding processing.

すなわち、二つの数(X)、(Y)の各数の符号、指数
および仮数をそれぞれ(SX、EX。
That is, the sign, exponent, and mantissa of the two numbers (X) and (Y) are respectively (SX, EX).

F、)、(sy、EY、FY )としたとき、加減算で
は、まず指数Eつ、EYを比較して、大きな値の指数に
小さな値の指数を揃え、小さな指数を持つ数の仮数を、
指数の差だけ右にシフトする。
F, ), (sy, EY, FY), in addition and subtraction, first compare the exponents E and EY, align the exponent of the small value with the exponent of the large value, and set the mantissa of the number with the small exponent,
Shift to the right by the difference in exponents.

次に、符号を考慮して仮数の加算あるいは減算を行い、
その結果を正規化し、正規化に要したシフトfiたけ指
数を減らす。このとき指数がアンダーフローすれば答え
Zをゼロとするか、または、Zを非正規化数とする。(
反故の加減算結果がオーバーフローしたときには、仮数
を正規化して指数を増す。このとき指数がオーバーフロ
ーすれば、演算不能としてフラグをたてる。このように
して、Sz 、Ez 、Fzを求めることができる。
Next, add or subtract the mantissas considering the sign,
The result is normalized and the index is reduced by the shift fi required for normalization. At this time, if the exponent underflows, the answer Z is set to zero or Z is set to be a non-normalized number. (
When the result of addition/subtraction overflows, the mantissa is normalized and the exponent is increased. If the exponent overflows at this time, it is flagged as unoperable. In this way, Sz, Ez, and Fz can be determined.

ここで、上記入力データX、Yは、例えばIEE E 
(Institute of Electrical 
and Electronics Engineers
)データ形式の浮動小数点表記法で表現する。I EE
Eデータ形式は単精度(32ビツト)と倍精度(64ビ
ツト)の2形式があり、倍精度は、1ビツトの符号部(
S)、11ビツトの指数部(E)および52ピントの仮
数部(F)からなり、S、E、Fで次式■の数を表現す
る。
Here, the input data X and Y are, for example, IEEE E
(Institute of Electrical
and Electronics Engineers
) expressed in floating point notation of the data format. IEE
There are two types of E data formats: single precision (32 bits) and double precision (64 bits).Double precision has a 1-bit sign part (
S), an exponent part (E) of 11 bits, and a mantissa part (F) of 52 bits, and S, E, and F represent the number of the following formula (2).

(−1)’ 2E−bi” (1,F)・・・・・・■
但し、bias−1023 以下、本明細書に使用する浮動小数点形式の二つの数(
X、Y)は、次式■、■で表現されるものとする。
(-1)' 2E-bi” (1,F)・・・・・・■
However, below bias-1023, two numbers in floating point format used in this specification (
X, Y) shall be expressed by the following formulas (1) and (2).

X== (l ) 5X2Ex−baas  (l 、
  )’ x ) 、、−−−−■Y= (−1)”2
°ゞ−”S (1,Fy)・・・・・・■第4図は、第
3図の処理を実行する従来例のブロック構成図で、大別
して指数処理部20と仮数処理部21とに分けられる。
X== (l) 5X2Ex-baas (l,
)' x ) ,,---■Y= (-1)"2
°ゞ−”S (1, Fy)・・・・・・■ FIG. 4 is a block diagram of a conventional example that executes the process shown in FIG. It can be divided into

指数処理部20は、符号演算器20a、指数比較器20
b、シフト量制御器20c、指数演算器20dおよび第
1インクリメンタ20eを備え、また、仮数処理部21
は、第1セレクタ21a1第2セレクタ21b1多ビツ
ト右シフタ21c、加減算器21d、反転回路21e、
第2インクリメンタ21f、第3セレクタ21g、シフ
ト量検出器21h、多ビツト左シフタ21i、丸め制御
器21j、第3インクリメンタ21におよび1ビツト右
シツク211を備える。
The exponent processing unit 20 includes a sign calculator 20a and an exponent comparator 20.
b, a shift amount controller 20c, an exponent operator 20d, and a first incrementer 20e, and a mantissa processing unit 21
are a first selector 21a, a second selector 21b, a multi-bit right shifter 21c, an adder/subtractor 21d, an inversion circuit 21e,
A second incrementer 21f, a third selector 21g, a shift amount detector 21h, a multi-bit left shifter 21i, a rounding controller 21j, a third incrementer 21, and a 1-bit right shifter 211 are provided.

このような構成において、仮数部の各処理、すなわち、 (■)「桁合わせ処理」は、指数比較器20bで入力デ
ータX、Yの指数部Ex、Evを比較し、例えばEx 
>Evであれば、第1セレクタ21aでFXを、また、
第2セレクタ21bでFyを選択し、シフト量制御器2
0cからの信号に基づいて多ビット右シフタ21cによ
りF、を、(Ex  Ey)桁だけ右シフトしてFXと
の桁合わせを行い、(■)「加減算処理」は、第1セレ
クタ21aからのF、と桁合わせしたF7とを加減算器
21dに入力し、符号Sx、Svを考慮して加算あるい
は減算を実行し、 (■)「絶対値化処理」は、加減算結果のビットデータ
を反転回路21eによって反転し、第2インクリメンタ
21fによって負の補数を取ることで行い、 (■)「正規化処理」は、シフト量検出器21hからの
信号に従って多ビツト左シフタ21iにより行うととも
に、オーバフロー時には1ビツト右シフタ21ffiに
よっても行い、 (■)「丸め処理」は、丸め制御器21jおよび第3イ
ンクリメンタ21kによって行う。
In such a configuration, each process of the mantissa part, that is, (■) "digit matching process" is performed by comparing the exponent parts Ex and Ev of the input data X and Y in the exponent comparator 20b, and for example, Ex
>Ev, the first selector 21a selects FX, and
Select Fy with the second selector 21b, and shift amount controller 2
Based on the signal from 0c, the multi-bit right shifter 21c shifts F by (Ex Ey) digits to the right to match the digits with FX. F, and F7 with digits aligned are input to the adder/subtractor 21d, and addition or subtraction is performed taking into account the signs Sx and Sv. 21e, and a negative complement is taken by the second incrementer 21f. (■) "Normalization processing" is performed by the multi-bit left shifter 21i according to the signal from the shift amount detector 21h. It is also performed by the 1-bit right shifter 21ffi, and (■) "Rounding processing" is performed by the rounding controller 21j and the third incrementer 21k.

したがって、第4図におけるクリティカルバスは、以下
の通りとなる。
Therefore, the critical bus in FIG. 4 is as follows.

指数比較器20b→ シフト量制御器20c→ 多ビット右シフタ21c→ 加減算器21d→ 反転回路21e→ 第2インクリメンタ21f→ 第3セレクタ21g→ シフト量検出器21h→ 多ビツト左シフタ211→ 第3インクリメンタ21に→ 1ビツト右シフタ21i!。Index comparator 20b→ Shift amount controller 20c→ Multi-bit right shifter 21c→ Adder/subtractor 21d→ Inversion circuit 21e→ Second incrementer 21f→ 3rd selector 21g→ Shift amount detector 21h→ Multi-bit left shifter 211→ To the third incrementer 21 → 1 bit right shifter 21i! .

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

しかしながら、かかる従来の浮動小数点演算装置にあっ
ては、「絶対値化処理」と「丸め化処理」の各処理ごと
に専用のインクリメンタ(第2インクリメンタ21fお
よび第3インクリメンタ21k)を備える構成となって
いたため、インクリメンタ回路の占有面積が、例えば加
減算器21dの次に大きいことから、浮動小数点演算装
置全体の回路規模増大を招き、集積化を阻害するといっ
た解決すべき課題があった。
However, in such a conventional floating point arithmetic unit, a dedicated incrementer (second incrementer 21f and third incrementer 21k) is provided for each of "absolute value processing" and "rounding processing". Because of this structure, the area occupied by the incrementer circuit is the second largest after, for example, the adder/subtractor 21d, which leads to an increase in the circuit scale of the entire floating-point arithmetic unit and hinders integration, which is a problem that needs to be solved. .

〔発明の目的〕[Purpose of the invention]

本発明は、このような問題点に鑑みてなされたもので、
丸め処理と絶対値化処理とでひとつのインクリメンタ回
路を共用できるようにし、インクリメンタ回路数を削減
して、集積化に適した浮動小数点演算装置を提供するこ
とを目的としている。
The present invention was made in view of these problems, and
The purpose of this invention is to enable a single incrementer circuit to be shared for rounding processing and absolute value processing, reduce the number of incrementer circuits, and provide a floating-point arithmetic unit suitable for integration.

〔課題を解決するための手段〕[Means to solve the problem]

本発明は、上記目的を達成するためその原理構成図を第
1図に示すように、浮動小数点形式の二つの数(x、y
)の仮数部の桁合わせを行う桁合わせ回路10と、桁合
わせした仮数部を加減あるいは減算する加減算回路11
と、加減算回路11の演算結果が正値の場合には第1指
示信号を発生する一方、負値の場合には第2指示信号を
発生する信号発生回路12と、加減算回路11の出力を
選択する第1選択状態または第2処理回路17の出力を
選択する第2選択状態の何れかを取り得る第1選択回路
13と、第1選択回路13の出力を正規化処理する第1
処理回路14と、加減算回路11の出力を極性反転する
反転回路15と、第1処理回路14の出方を選択する第
1選択状態または反転回路15の出力を選択する第2選
択状態の何れかを取り得る第2選択回路工6と、第2゛
選択回路16の出力を丸めあるいは絶対値化処理する第
2処理回路17と、第2処理回路17の出力を選択する
第1選択状態または第1処理回路14の出力を選択する
第2選択状態の何れかを取り得る第3選択回路18と、
を備え、前記各選択回路13.16.18は、第1指示
信号に応答して第1選択状態を取る一方、第2指示信号
に応答して第2選択状態を取ること、を特徴としている
In order to achieve the above object, the present invention has two numbers (x, y,
), and an addition/subtraction circuit 11 that adds or subtracts the digit-adjusted mantissa part.
and a signal generating circuit 12 which generates a first instruction signal when the calculation result of the addition/subtraction circuit 11 is a positive value, and generates a second instruction signal when the calculation result is a negative value, and the output of the addition/subtraction circuit 11 are selected. a first selection circuit 13 that can take either a first selection state that selects the output of the second processing circuit 17 or a second selection state that selects the output of the second processing circuit 17;
The processing circuit 14, the inversion circuit 15 that inverts the polarity of the output of the addition/subtraction circuit 11, and either a first selection state in which the output of the first processing circuit 14 is selected or a second selection state in which the output of the inversion circuit 15 is selected. a second selection circuit 6 that can take the output of the second selection circuit 16, a second processing circuit 17 that rounds or converts the output of the second selection circuit 16 into an absolute value, and a first selection state or a second selection circuit that selects the output of the second processing circuit 17; a third selection circuit 18 that can take any of the second selection states for selecting the output of the first processing circuit 14;
Each of the selection circuits 13, 16 and 18 assumes a first selection state in response to a first instruction signal, and assumes a second selection state in response to a second instruction signal. .

〔作用〕[Effect]

本発明では、加減算回路11の演算結果が正値の場合の
クリティカルバスと、負値の場合のクリティカルパスと
が、以下の通りとなる。
In the present invention, the critical bus when the calculation result of the addition/subtraction circuit 11 is a positive value and the critical path when the calculation result is a negative value are as follows.

−正道■場金− 加減算回路11→ 第1選択回路13→ 第1処理回路14→ 第2選択回路16→ 第2処理回路17→ 第3選択回路18、 一1並少l金− 加減算回路11→ 反転回路15→ 第2選択回路16→ 第2処理回路17→ 第1選択回路13→ 第1処理回路14→ 第3選択回路18、 ここで、第2処理回路17は丸め処理および絶対値化処
理を行うものであるが、丸め処理は、演算結果が負値(
データX、Yの指数の差がゼロ)のときに行う必要がな
(、また、丸め処理と絶対値化処理とは同時に行う必要
がないがら、第2処理回路17を実現するためのインク
リメンタ回路をひとつにして回路規模の削減が図られる
-Correct road■ place money- Addition/subtraction circuit 11 → first selection circuit 13 → first processing circuit 14 → second selection circuit 16 → second processing circuit 17 → third selection circuit 18, 11 ordinary l money- addition/subtraction circuit 11 → Inversion circuit 15 → Second selection circuit 16 → Second processing circuit 17 → First selection circuit 13 → First processing circuit 14 → Third selection circuit 18, where the second processing circuit 17 performs rounding processing and absolute value conversion. However, rounding processing is performed when the operation result is a negative value (
Although it is not necessary to perform rounding processing and absolute value processing at the same time when the difference between the exponents of data By combining the circuits into one, the circuit scale can be reduced.

〔実施例] 以下、本発明を図面に基づいて説明する。〔Example] Hereinafter, the present invention will be explained based on the drawings.

第2図は本発明に係る浮動小数点演算装置の一実施例を
示す図であり、第4図の仮数処理部21に対応する要部
を示す図である。なお、第2図に示していない部分につ
いては、第4図を参照するものとする。
FIG. 2 is a diagram showing an embodiment of a floating point arithmetic device according to the present invention, and is a diagram showing a main part corresponding to the mantissa processing section 21 in FIG. 4. For parts not shown in FIG. 2, refer to FIG. 4.

まず、構成を説明する。第2図において、30は仮数処
理部であり、仮数処理部30は以下の各部を備えて構成
する。
First, the configuration will be explained. In FIG. 2, numeral 30 represents a mantissa processing section, and the mantissa processing section 30 includes the following sections.

すなわち、第1セレクタ31a、第2セレクタ31bお
よび多ビット右シフタ31cを含み、浮動小数点形式の
二つの数(x、y)の仮数部(FX、FY)の桁合わせ
を行う桁合わせ回路31と、桁合わせした仮数部を加算
あるいは減算する加減算回路32と、加′$i算回路3
2の演算結果が正(プラス)値の場合には第1指示信号
S、を発生する一方、負(マイナス)値の場合には第2
指示信号3.4を発生する信号発生回路33と、加減算
回路32の出力を選択する第1選択状態(ステートP1
)または後述のインクリメンタ回路38の出力を選択す
る第2選択状態(ステー1−Nl)の何れかを取り得る
第1選択回路としての第3セレクタ34と、第3セレク
タ34の出力を正規化処理する第1処理回路としての多
ビツト左シフタ35と、加減算回路32の出力をビット
反転する反転回路36と、多ビツト左シフタ35の出力
を選択する第1選択状態(ステートpz)または反転回
路36の出力を選択する第2選択状態(ステー)Nz)
の何れかを取り得る第2選択回路としての第4セレクタ
37と、第4セレクタ37の出力を丸めあるいは絶対値
化処理する第2処理回路としてのインクリメンタ回路3
8と、インクリメンタ回路3日の出力を選択する第1選
択状態(ステ)P3 )または多ビツト左シフタ35の
出力を選択する第2選択状態(ステートN3)の何れか
を取り得る第3選択回路としての第5セレクタ39と、
を備えて構成する。
That is, a digit alignment circuit 31 includes a first selector 31a, a second selector 31b, and a multi-bit right shifter 31c, and aligns the digits of the mantissa parts (FX, FY) of two numbers (x, y) in floating point format. , an addition/subtraction circuit 32 that adds or subtracts the mantissa part whose digits have been aligned, and an addition '$i calculation circuit 3.
If the calculation result of step 2 is a positive value, the first instruction signal S is generated, while if the result is a negative value, the second instruction signal S is generated.
A first selection state (state P1) selects the signal generation circuit 33 that generates the instruction signal 3.4 and the output of the addition/subtraction circuit 32.
) or a second selection state (stay 1-Nl) that selects the output of the incrementer circuit 38, which will be described later, and normalizes the output of the third selector 34. A multi-bit left shifter 35 as a first processing circuit for processing, an inversion circuit 36 that bit-inverts the output of the addition/subtraction circuit 32, and a first selection state (state pz) or inversion circuit that selects the output of the multi-bit left shifter 35. 2nd selection state (stay) to select 36 outputs (Nz)
a fourth selector 37 as a second selection circuit that can take any of the following; and an incrementer circuit 3 as a second processing circuit that rounds or converts the output of the fourth selector 37 into an absolute value.
8, and a third selection state that can be either a first selection state (state P3) that selects the output of the third day of the incrementer circuit or a second selection state (state N3) that selects the output of the multi-bit left shifter 35. A fifth selector 39 as a circuit,
and configure it.

但し、前記第3〜第5セレクタ34.37.39は、第
1指示信号(S、)に応答して第1選択状態(ステート
p、 、p2、P3)を取る一方、第2指示信号(SN
)に応答して第2選択状態(ステートN+ 、Nz 、
N3 )を取るようになっている。
However, the third to fifth selectors 34, 37, and 39 assume the first selection state (states p, , p2, and P3) in response to the first instruction signal (S,), while SN
) in response to the second selected state (states N+, Nz,
N3).

なお、40は1ビツト右シフタ、41はシフト量検出器
、42は丸め制御器である。
Note that 40 is a 1-bit right shifter, 41 is a shift amount detector, and 42 is a rounding controller.

次に、作用を説明する。Next, the effect will be explained.

まず、指数処理部20(第4図参照)で入力データX、
Yの指数部Ex 、Evを比較し、例えばEX>EYで
あれば、第1セレクタ31aでデータXの仮数部F、を
、また、第2セレクタ31bでデータYの仮数部FYを
選択し、シフト量制御器20c(第4図参照)からの信
号に基づいて多ビット右シフク31cによりFyを、(
EX−E、)桁だけ右シフトしてFxとの桁合わ廿を行
う。
First, the input data X,
The exponent parts Ex and Ev of Y are compared, and if, for example, EX>EY, the first selector 31a selects the mantissa part F of data X, and the second selector 31b selects the mantissa part FY of data Y, Based on the signal from the shift amount controller 20c (see FIG. 4), the multi-bit right shifter 31c shifts Fy to (
EX-E, ) digits are shifted to the right and the digits are aligned with Fx.

次に、桁を合わせたFvとFxとを加減算器21dに入
力し、符号SX、SYを考慮して加算あるいは減算を実
行する。このとき加減算回路32の演算結果に従って信
号発生回路33から所定の指示信号を出力する。ここで
、Ex≠Eyの場合を考えると減算の場合には常に大き
い仮数、即ちこの場合FXから小さい仮GFvをひくた
めに、常に、加減算器21dの演算結果は正値であるか
ら、指示信号は第1指示信号SPとなる。これにより、
第3セレクタ34、第4セレクタ37および第5セレク
タ39は、全て第1選択状態(ステー)P、 、P、、
P3)となり、このときのクリティカルパスは、加減算
回路32→ 第3セレクタ34→ 多ビツト左シフタ35→ 第4セレクタ37→ インクリメンタ回路38→ 1ビツト右シツク40→ 第5セレクタ39、 となる。
Next, Fv and Fx whose digits have been matched are input to the adder/subtractor 21d, and addition or subtraction is executed taking into account the codes SX and SY. At this time, a predetermined instruction signal is output from the signal generation circuit 33 according to the calculation result of the addition/subtraction circuit 32. Here, considering the case of Ex≠Ey, in the case of subtraction, the small temporary GFv is always subtracted from the large mantissa, that is, FX in this case, so the calculation result of the adder/subtractor 21d is always a positive value, so the instruction signal becomes the first instruction signal SP. This results in
The third selector 34, the fourth selector 37, and the fifth selector 39 are all in the first selection state (stay) P, , P, ,
P3), and the critical path at this time is as follows: addition/subtraction circuit 32 → third selector 34 → multi-bit left shifter 35 → fourth selector 37 → incrementer circuit 38 → 1-bit right shift 40 → fifth selector 39.

一方、指数処理部20(第4図参照)で入力データχ、
Yの指数部を比較した結果、Ex=Eyであれば、仮数
の大小関係を判定できないため加減算回路32の演算結
果が正値の場合と負値の場合とがある。加減算回路32
の演算結果が負値の場合は、信号発生回路33からは第
2指示信号SNが出力される。これにより、第3セレク
タ34、第4セレクタ37および第5セレクタ39は、
すべて第2選択状態(ステートN+ 、Nz 、N3 
)となり、このときのり:Jティカルパスは、 加減算回路32→ 反転回路36→ 第4セレクク37→ インクリメンタ回路33→ 第3セレクタ34→ 多ビツト左シフタ35→ 第5セレクタ39、 となる。
On the other hand, the input data χ,
As a result of comparing the exponent parts of Y, if Ex=Ey, the magnitude relationship of the mantissas cannot be determined, so the calculation result of the addition/subtraction circuit 32 may be a positive value or a negative value. Addition/subtraction circuit 32
If the calculation result is a negative value, the signal generation circuit 33 outputs the second instruction signal SN. As a result, the third selector 34, the fourth selector 37, and the fifth selector 39
All in the second selection state (states N+, Nz, N3
), and in this case, the paste:J logical path is as follows: Addition/subtraction circuit 32→Inversion circuit 36→Fourth selector 37→Incrementer circuit 33→Third selector 34→Multi-bit left shifter 35→Fifth selector 39.

ここで、第2処理回路としてのインクリメンタ回路38
は、丸め処理および絶対値化処理を行うものであるが、
丸め処理は、Ex  Ey−0のときに行う必要がなく
、また、丸め処理と絶対値化処理とは同時に行う必要が
ないから、丸め処理と絶対値化処理とでインクリメンタ
回路38を共用でき、従来例うこ比してインクリメンタ
回路を1つだけ削減できる。
Here, the incrementer circuit 38 as the second processing circuit
performs rounding and absolute value processing, but
Rounding processing does not need to be performed when Ex Ey-0, and rounding processing and absolute value processing do not need to be performed at the same time, so the incrementer circuit 38 can be shared by rounding processing and absolute value processing. , the number of incrementer circuits can be reduced by one compared to the conventional example.

本実施例では、新たに2つのセレクタ(第3セレクタ3
4及び第5セレクタ39)を追加する。しかし、通常、
二つ分のセレクタ面積よりもひとつのインクリメンタ回
路の面積の方が遥かに大きいから、浮動小数点演算装置
全体の面積を大幅に削減でき、集積化に寄与することが
できる。
In this embodiment, two new selectors (third selector 3
4 and a fifth selector 39) are added. However, usually
Since the area of one incrementer circuit is much larger than the area of two selectors, the area of the entire floating-point arithmetic unit can be significantly reduced, contributing to integration.

また、本実施例では、第5セレクタ39を第2選択状態
(ステートN、)にすることにより、インクリメンタ回
路38をパスできるので、処理速度を向上できる効果も
ある。
Furthermore, in this embodiment, by setting the fifth selector 39 to the second selection state (state N), the incrementer circuit 38 can be passed, which has the effect of improving the processing speed.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、丸め処理と絶対値化処理とでひとつの
インクリメンタ回路を共用でき、インクリメンタ回路数
を削減して、集積化に適した浮動小数点演算装置を提供
することができる。
According to the present invention, it is possible to share one incrementer circuit for rounding processing and absolute value processing, reducing the number of incrementer circuits, and providing a floating point arithmetic device suitable for integration.

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

第1図は本発明の原理構成図、 第2図は本発明に係る浮動小数点演算装置の一実施例を
示すその要部構成図である。 第3.4図は従来例を示す図であり、 第3図はその加減算処理のフロー図、 第4図はその構成図である。 10・・・・・・桁合わせ回路、 11・・・・・・加減算回路、 12・・・・・・信号発生回路、 13・・・・・・第1選択回路、 14・・・・・・第1処理回路、 15・・・・・・反転回路、 16・・・・・・第2選択回路、 17・・・・・・第2処理回路、 18・・・・・・第3選択回路、 31・・・・・・桁合わせ回路、 32・・・・・・加減算回路、 33・・・・・・信号発生回路、 34・・・・・・第3セレクタ(第1選択回路)、35
・・・・・・多ビット左シック(第1処理回路)36・
・・・・・反転回路、 37・・・・・・第4セレクタ(第2選択回路)、38
・・・・・・インクリメンタ回路 (第2処理回路) 39・・・・・・第5セレクタ (第3選択回路) 第 図 従来例の加減算処理のフロー図 第 図
FIG. 1 is a diagram illustrating the principle of the present invention, and FIG. 2 is a diagram illustrating an embodiment of a floating-point arithmetic unit according to the present invention. Fig. 3.4 is a diagram showing a conventional example, Fig. 3 is a flow diagram of its addition/subtraction processing, and Fig. 4 is its configuration diagram. 10... Digit alignment circuit, 11... Addition/subtraction circuit, 12... Signal generation circuit, 13... First selection circuit, 14...・First processing circuit, 15... Inversion circuit, 16... Second selection circuit, 17... Second processing circuit, 18... Third selection circuit, 31... digit alignment circuit, 32... addition/subtraction circuit, 33... signal generation circuit, 34... third selector (first selection circuit) , 35
...Multi-bit left thick (first processing circuit) 36.
...Inverting circuit, 37...Fourth selector (second selection circuit), 38
...Incrementer circuit (second processing circuit) 39...Fifth selector (third selection circuit) Fig. Flowchart of conventional addition/subtraction processing Fig.

Claims (1)

【特許請求の範囲】 浮動小数点形式の二つの数(X、Y)の仮数部の桁合わ
せを行う桁合わせ回路(10)と、桁合わせした仮数部
を加算あるいは減算する加減算回路(11)と、 加減算回路(11)の演算結果が正値の場合には第1指
示信号を発生する一方、負値の場合には第2指示信号を
発生する信号発生回路(12)と、加減算回路(11)
の出力を選択する第1選択状態または第2処理回路(1
7)の出力を選択する第2選択状態の何れかを取り得る
第1選択回路(13)と、 第1選択回路(13)の出力を正規化処理する第1処理
回路(14)と、 加減算回路(11)の出力を極性反転する反転回路(1
5)と、 第1処理回路(14)の出力を選択する第1選択状態ま
たは反転回路(15)の出力を選択する第2選択状態の
何れかを取り得る第2選択回路(16)と、 第2選択回路(16)の出力を丸めあるいは絶対値化処
理する第2処理回路(17)と、第2処理回路(17)
の出力を選択する第1選択状態または第1処理回路(1
4)の出力を選択する第2選択状態の何れかを取り得る
第3選択回路(18)と、を備え、 前記各選択回路(13、16、18)は、第1指示信号
に応答して第1選択状態を取る一方、第2指示信号に応
答して第2選択状態を取ること、を特徴とする浮動小数
点演算装置。
[Claims] A digit alignment circuit (10) that aligns the digits of the mantissas of two floating-point numbers (X, Y), and an addition/subtraction circuit (11) that adds or subtracts the digit-aligned mantissas. , a signal generating circuit (12) that generates a first instruction signal when the calculation result of the addition/subtraction circuit (11) is a positive value, and generates a second instruction signal when the calculation result is a negative value; )
A first selection state or a second processing circuit (1
7); a first selection circuit (13) that can take any of the second selection states; a first processing circuit (14) that normalizes the output of the first selection circuit (13); An inverting circuit (1) that inverts the polarity of the output of the circuit (11).
5); and a second selection circuit (16) capable of taking either a first selection state in which the output of the first processing circuit (14) is selected or a second selection state in which the output of the inversion circuit (15) is selected; a second processing circuit (17) that rounds or converts the output of the second selection circuit (16) into an absolute value;
A first selection state or a first processing circuit (1
and a third selection circuit (18) capable of taking either of the second selection states for selecting the output of 4), each of the selection circuits (13, 16, 18) responding to the first instruction signal. A floating point arithmetic device characterized in that it takes a first selection state and takes a second selection state in response to a second instruction signal.
JP2060290A 1990-01-31 1990-01-31 Floating point arithmetic unit Pending JPH03225522A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2060290A JPH03225522A (en) 1990-01-31 1990-01-31 Floating point arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2060290A JPH03225522A (en) 1990-01-31 1990-01-31 Floating point arithmetic unit

Publications (1)

Publication Number Publication Date
JPH03225522A true JPH03225522A (en) 1991-10-04

Family

ID=12031816

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2060290A Pending JPH03225522A (en) 1990-01-31 1990-01-31 Floating point arithmetic unit

Country Status (1)

Country Link
JP (1) JPH03225522A (en)

Similar Documents

Publication Publication Date Title
US5148386A (en) Adder-subtracter for signed absolute values
US5111421A (en) System for performing addition and subtraction of signed magnitude floating point binary numbers
US6175851B1 (en) Fast adder/subtractor for signed floating point numbers
US20200183650A1 (en) Radix-1000 decimal floating-point numbers and arithmetic units using a skewed representation of the fraction
JPH09212337A (en) Floating point processor
JP2511527B2 (en) Floating point arithmetic unit
JP2008152360A (en) 3-input floating-point adder / subtracter
KR19980082906A (en) How to Convert Floating-Point Numbers to Integer Types
JPS63167930A (en) floating point arithmetic unit
JPH03225522A (en) Floating point arithmetic unit
JP3675111B2 (en) 3-input comparator
JPH0511980A (en) Overflow detecting method and circuit
JP3187402B2 (en) Floating point data addition / subtraction circuit
JP2578482B2 (en) Floating point arithmetic unit
JP2902041B2 (en) Floating point arithmetic unit
JP3100868B2 (en) Arithmetic unit for floating point numbers
JPH0225924A (en) Floating point arithmetic processor
JP3522167B2 (en) Arithmetic processing circuit and arithmetic processing method
JP2537876B2 (en) Rounding circuit
JP3124286B2 (en) Floating point arithmetic unit
JP2622012B2 (en) Shift circuit
JPH0659862A (en) Multiplier
JPH0361224B2 (en)
JPH0552532B2 (en)
JP2001034455A (en) Adding device, subtracting device, multiplying device and dividing device