JPH0415728A - Floating point arithmetic unit - Google Patents

Floating point arithmetic unit

Info

Publication number
JPH0415728A
JPH0415728A JP2112325A JP11232590A JPH0415728A JP H0415728 A JPH0415728 A JP H0415728A JP 2112325 A JP2112325 A JP 2112325A JP 11232590 A JP11232590 A JP 11232590A JP H0415728 A JPH0415728 A JP H0415728A
Authority
JP
Japan
Prior art keywords
mantissa
exponent
operand
selector
subtractor
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
JP2112325A
Other languages
Japanese (ja)
Inventor
Kenji Yamada
山田 賢次
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 VLSI Ltd
Fujitsu Ltd
Original Assignee
Fujitsu VLSI Ltd
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 VLSI Ltd, Fujitsu Ltd filed Critical Fujitsu VLSI Ltd
Priority to JP2112325A priority Critical patent/JPH0415728A/en
Publication of JPH0415728A publication Critical patent/JPH0415728A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To increase the floating point arithmetic processing speed by calculating an exponent and a mantissa which are normalized based on the exponent selected by an exponent selector and the mantissa selected by a mantissa selector respectively. CONSTITUTION:When the difference is obtained between the exponents of an optional operand to be computed and an optional operand, a mantissa candidate computing element 13 prepares the mantissa adders/subtractors 13a in number corresponding to the difference between both exponents. Then each adder/subtractor 13a performs the mantissa addition/subtraction operations in all combinations possible for each difference between both optional exponents. The addition/subtraction operations are carried out to the mantissas Fa and Fb of a computed operand Fa2<ea> and an operand Fb2<eb> to be inputted in all possible combinations. A mantissa selector 14 inputs the computed value of each adder/subtractor 13a and selects the computed value of the adder/subtractor 13a corresponding to the exponent difference computed by a subtractor 11 out of the computed values of those addres/subtractors 13a as a mantissa fa. A floating point normalizing unit 15 inputs the an exponent ea selected by an exponent selector 12 and the mantissa fa selected by the selector 14 and then outputs a nromalized exponent er and a normalized mantissa Fr. Thus the arithmetic processing speed is increased.

Description

【発明の詳細な説明】 [概要] 演算装置に係り、詳しくは浮動小数点演算装置に関し、 浮動小数点正規化器に入力される前までの非正規化指数
及び非正規化仮数の演算処理速度を上げ装置全体として
演算処理の高速化を図ることができる浮動小数点演算装
置、及び、非正規化指数及び仮数を正規化する演算処理
速度を上げ装置全体として演算処理高速化を図ることが
できる浮動小数点正規化装置を提供することを目的とし
、被演算数と演算数の両指数の指数差を求める引算器と
、引算器が演算した指数差に基づいて大きい方の指数を
選択する指数セレクタと、任意の被演算数と演算数の両
指数から差を求める時、その両指数から考えられる差毎
に仮数加減算器を設け、その各加減算器にてその差毎に
考えられる全ての組み合わせの仮数加減算を、入力され
る被演算数と演算数の両仮数に対して実行する仮数候補
演算器と、仮数候補演算器の加減算器内から引算器が演
算した指数差に対応する加減算器の仮数加減算して求め
た仮数を選択する仮数セレクタと、指数セレクタが選択
した指数と仮数セレクタが選択した仮数とに基づいて正
規化した指数と仮数を演算する浮動小数点正規化器とか
ら構成するとともに、複数ビットからなる非正規化仮数
が最上位ビットから数えた0以外の値が来るまでのビッ
ト長又は所定ビット位置の値を検出する検出エンコーダ
と、検出エンコーダが検出した検出結果をシフト量とし
て前記非正規化仮数を桁移動させ正規化仮数とするシフ
タと、非正規化指数に対して正規化された時に予想され
る全ての指数を演算すべく、多数の演算器から構成され
た指数候補演算器と、指数候補演算器で求めた各指数の
中から検出エンコーダが検出したビット数に対応する指
数を正規化指数として選択する指数セレクタとから構成
する。
[Detailed Description of the Invention] [Summary] This invention relates to an arithmetic unit, more specifically to a floating point arithmetic unit, to increase the arithmetic processing speed of a denormalized exponent and a denormalized mantissa before being input to a floating point normalizer. A floating point arithmetic unit that can speed up arithmetic processing as a whole device, and a floating point normal that can increase the speed of arithmetic processing for normalizing unnormalized exponents and mantissas and speed up arithmetic processing as a whole device. The purpose of the present invention is to provide a subtracter that calculates the exponent difference between the exponents of an operand and an operand, and an exponent selector that selects the larger exponent based on the exponent difference calculated by the subtracter. , when calculating a difference from both exponents of an arbitrary operand and an operand, a mantissa adder/subtractor is provided for each possible difference between the two exponents, and each adder/subtractor calculates the mantissas of all possible combinations for each difference. A mantissa candidate calculator that performs addition and subtraction on both the mantissas of the input operand and the operand, and a mantissa of the adder/subtractor that corresponds to the exponent difference calculated by the subtracter from within the adder/subtracter of the mantissa candidate calculator. Consisting of a mantissa selector that selects a mantissa obtained by addition and subtraction, and a floating-point normalizer that operates a normalized exponent and mantissa based on the exponent selected by the exponent selector and the mantissa selected by the mantissa selector, and A detection encoder detects the bit length or the value at a predetermined bit position until the non-normalized mantissa consisting of multiple bits reaches a value other than 0 counted from the most significant bit, and the detection result detected by the detection encoder is used as the shift amount. A shifter that shifts the unnormalized mantissa by digits to make it a normalized mantissa, and an exponent candidate operation that is composed of a large number of calculators to calculate all the exponents expected when the unnormalized exponent is normalized. and an exponent selector that selects, as a normalized exponent, an exponent corresponding to the number of bits detected by the detection encoder from among the exponents determined by the exponent candidate calculator.

[産業上の利用分野] 本発明は演算装置に係り、詳しくは浮動小数点演算装置
に関するものである。
[Industrial Field of Application] The present invention relates to an arithmetic device, and more particularly to a floating point arithmetic device.

近年、コンピュータシステムにおいて浮動小数点演算処
理速度はより高速化が要求されている。
In recent years, there has been a demand for faster floating point arithmetic processing speeds in computer systems.

そのため、浮動小数点演算装置内の各演算部での高速処
理化が重要となる。
Therefore, it is important to increase the speed of processing in each calculation unit in the floating-point calculation device.

[従来の技術] 従来、浮動小数点演算装置では、例えば被演算数Fa 
2°“と演算数Fb 2°5を加減算する場合、第6図
に示すように指数引算器Iにて指数eaと指数ebを減
算し、その指数差(=eb −ea )を指数セレクタ
2に出力する。指数セレクタ2は指数eaと指数ebを
入力し前記指数差に基づいて指数の大きい方(ea >
ebとする)を選択する。一方、仮数セレクタ3は小さ
い指数を持つ仮数(この場合、Fb)をバレルシフタ4
に、大きい指数を持つ仮数(この場合、Fa)を仮数加
減算器5に出力する。バレルシフタ4は仮数Fbを前記
指数差(=eb −ea )だけシフトして等値化し仮
数加減算器5に出力する。仮数加減算器5は等値化され
た仮数Fa、Fbを加減算fa(=Fa+:Fb2 (
eb−sat  =F、 2−ac )する。そして、
指数セレクタ2で選択した指数eaと、仮数加減算器5
からの仮数faは浮動小数点正規化装置6に出力され正
規化される。
[Prior Art] Conventionally, in a floating point arithmetic device, for example, the operand Fa
When adding or subtracting 2°" and the operational number Fb 2°5, the exponent ea and the exponent eb are subtracted by the exponent subtractor I as shown in FIG. The exponent selector 2 inputs the exponent ea and the exponent eb, and selects the larger exponent (ea >
eb). On the other hand, the mantissa selector 3 transfers the mantissa with a small exponent (Fb in this case) to the barrel shifter 4.
Then, a mantissa having a large exponent (Fa in this case) is output to the mantissa adder/subtractor 5. The barrel shifter 4 shifts the mantissa Fb by the exponent difference (=eb-ea), equalizes it, and outputs it to the mantissa adder/subtractor 5. The mantissa adder/subtractor 5 adds and subtracts the equalized mantissas Fa and Fb fa(=Fa+:Fb2 (
eb-sat =F, 2-ac). and,
The exponent ea selected by the exponent selector 2 and the mantissa adder/subtractor 5
The mantissa fa from is output to the floating point normalizer 6 and normalized.

浮動小数点正規化装置6は第7図に示すように指数引算
器6a、検出エンコーダ6b及びバレルシフタ6Cとか
ら構成されていて、検出エンコーダ6bは仮数加減算器
5が演算した非正規化の仮数fa  (=Fr 2−”
 )を最上位ビットから数えて最初に「l」が検出され
るビット位置に対応する数値(桁)を求めて、その値(
=−ec)を指数引算器6a及びバレルシフタ6cに出
力する。
As shown in FIG. 7, the floating point normalization device 6 is composed of an exponent subtracter 6a, a detection encoder 6b, and a barrel shifter 6C. (=Fr 2-”
), counting from the most significant bit, find the numerical value (digit) corresponding to the bit position where "l" is first detected, and calculate the value (
=-ec) is output to the exponent subtractor 6a and barrel shifter 6c.

指数引算器6aは指数セレクタ2からの非正規化の指数
eaを値(=−ec)で引くことによって正規化指数e
r  (=ea +ec )を求める。
The exponent subtracter 6a subtracts the non-normalized exponent ea from the exponent selector 2 by the value (=-ec) to obtain the normalized exponent e.
Find r (=ea + ec).

方、バレルシフタ6cは仮数加減算器5が演算した非正
規化の仮数fa  (=Fr 2°e)を検出エンコー
ダ6bが求めた数値(桁)ac分だけ右にシフトして正
規化仮数(=Fr)を求めている。
On the other hand, the barrel shifter 6c shifts the non-normalized mantissa fa (=Fr 2°e) calculated by the mantissa adder/subtractor 5 to the right by the numerical value (digit) ac calculated by the detection encoder 6b, and converts it into a normalized mantissa (=Fr ) are looking for.

こうして、Fa2”±F b 2 ”= F r 2 
”の浮動小数点演算が行われている。
Thus, Fa2”±F b 2 ”= F r 2
” floating point operations are being performed.

[発明が解決しようとする課題] しかしながら、上記のように浮動小数点演算装置におい
て非正規化仮数を求めるまでの処理として、まず指数差
を求め、次にその指数差に応じて仮数を選択しシフトさ
せ、その後に非正規化仮数の演算を実行するようになっ
ていて、処理段数が多く高速化を図る上で問題であった
[Problem to be Solved by the Invention] However, as described above, in the floating point arithmetic unit, as a process to obtain the denormalized mantissa, first the exponent difference is obtained, and then the mantissa is selected and shifted according to the exponent difference. This method requires a large number of processing stages, which poses a problem in achieving high speed.

しかも、浮動小数点演算装置中の浮動小数点正規化装置
6においても検出エンコーダ6bがビット位置を求めた
後、その求めた値がら指数及び仮数を正規化するように
なっているので、処理段数が多く高速化を図る上で問題
であった。
Moreover, in the floating point normalization device 6 in the floating point arithmetic unit, after the detection encoder 6b obtains the bit position, the exponent and mantissa are normalized based on the obtained value, so the number of processing stages is large. This was a problem when trying to speed up the process.

第1の発明は上記問題点を解決するためになされたもの
であって、その目的は浮動小数点正規化器に入力される
前までの非正規化指数及び非正規化仮数の演算処理速度
を上げ装置全体として演算処理の高速化を図ることがで
きる浮動小数点演算装置を提供することにある。
The first invention was made to solve the above problems, and its purpose is to increase the processing speed of unnormalized exponents and unnormalized mantissas before they are input to the floating-point normalizer. It is an object of the present invention to provide a floating point arithmetic device that can speed up the arithmetic processing of the device as a whole.

第2の発明は同じく上記問題点を解決するためになされ
たものであって、その目的は非正規化指数及び仮数を正
規化する演算処理速度を上げ装置全体として演算処理高
速化を図ることができる浮動小数点正規化装置を提供す
ることにある。
The second invention was also made to solve the above problem, and its purpose is to increase the processing speed of normalizing the non-normalized exponent and the mantissa, thereby increasing the processing speed of the entire device. The purpose of the present invention is to provide a floating point normalizer that can perform the following steps.

[課題を解決するための手段] 第1図は第1の発明の浮動小数点演算装置の原理説明図
であって、引算器11は被演算数Fa2″′1と演算数
Fb2@bの両指数ea、ebの指数差を求める演算器
であって、その指数差は指数セレクタ12と仮数セレク
タ14に出力される。指数セレクタ12は被演算数Fa
2”と演算数Fb2”の両指数ea、ebを入力し、前
記指数差に基づいて大きい方の指数を選択する。
[Means for Solving the Problems] FIG. 1 is a diagram illustrating the principle of a floating point arithmetic device according to the first invention, in which a subtracter 11 operates on both an operand Fa2'''1 and an operand Fb2@b. This is an arithmetic unit that calculates the exponent difference between exponents ea and eb, and the exponent difference is output to the exponent selector 12 and the mantissa selector 14.The exponent selector 12 selects the operand Fa.
2'' and the arithmetic number Fb2'' are input, and the larger exponent is selected based on the exponent difference.

仮数候補演算器13は任意の被演算数と演算数の両指数
から差を求める時、その両指数から考えられる差に対応
した数の仮数加減算器13aだけ設け、その各加減算器
13aにて任意の両指数からその差色に考えられる全て
の組み合わせの仮数加減算を行う。そして、仮数候補演
算器13は入力される被演算数Fa2°″と演算数Fb
 2°5の両成敗Fa、Fbに対して考えられる全ての
組み合わせの加減算を実行する。
When calculating a difference from both exponents of an arbitrary operand and an operand, the mantissa candidate arithmetic unit 13 is provided with only mantissa adders/subtractors 13a of numbers corresponding to the possible difference from both exponents, and each adder/subtractor 13a calculates an arbitrary value. Perform addition and subtraction of mantissas for all possible combinations of the difference color from both exponents. Then, the mantissa candidate arithmetic unit 13 inputs the input operand Fa2°'' and the operand Fb.
Addition and subtraction of all possible combinations are performed for both success and failure Fa and Fb of 2°5.

仮数セレクタ14は仮数候補演算器13の各加減算器1
3aの演算値を入力しその各演算値の内から引算器11
が演算した指数差に対応する加減算器13aの演算値を
仮数faとして選択する。
The mantissa selector 14 is connected to each adder/subtracter 1 of the mantissa candidate arithmetic unit 13.
Input the calculated value of 3a and subtracter 11 from each calculated value.
The calculated value of the adder/subtractor 13a corresponding to the exponent difference calculated by is selected as the mantissa fa.

そして、浮動小数点正規化器15は指数セレクタ12が
選択した指数eaと仮数セレクタ14か選択した仮数f
aを入力し、正規化した指数erと仮数F「にして出力
する。
The floating point normalizer 15 then uses the exponent ea selected by the exponent selector 12 and the mantissa f selected by the mantissa selector 14.
Input a, convert it into a normalized exponent er and a mantissa F, and output it.

第2図は第2の発明の浮動小数点正規化装置の原理説明
図であって、検出エンコーダ21は正規化されていない
非正規化仮数faを入力し、その非正規化仮数faか最
上位ビットから数えて0以外の値が来るまでのビット長
又は所定ビット位置の値を検出し、その検出結果をシフ
タ22と指数セレクタ24に出力する。シフタ22は検
出エンコーダ21か検出した検出結果をシフト量として
非正規化仮数faを桁移動させ正規化仮数Frとする。
FIG. 2 is an explanatory diagram of the principle of the floating point normalization device of the second invention, in which the detection encoder 21 inputs a non-normalized mantissa fa that has not been normalized, and detects the most significant bit of the non-normalized mantissa fa. The bit length counting from 0 until a value other than 0 arrives or the value at a predetermined bit position is detected, and the detection result is output to the shifter 22 and the exponent selector 24. The shifter 22 uses the detection result detected by the detection encoder 21 as a shift amount to shift the non-normalized mantissa fa by digits to obtain a normalized mantissa Fr.

指数候補演算器23は複数の演算器23aを備え、その
各演算器23aにて正規化された時に予想される全ての
指数を演算する。そして、指数候補演算器23は入力さ
れる指数eaに対して正規化された時に予想される全て
の指数を求める。
The exponent candidate calculator 23 includes a plurality of calculators 23a, and each of the calculators 23a calculates all the exponents expected when normalized. Then, the exponent candidate calculator 23 calculates all exponents expected when the input exponent ea is normalized.

指数セレクタ24は選択された非正規化指数と指数候補
演算器23で求めた各指数を入力し、その各指数の中か
ら検出エンコーダ21が検出した検出結果に対応する指
数を正規化指数erとして選択する。
The exponent selector 24 inputs the selected non-normalized exponent and each exponent obtained by the exponent candidate calculator 23, and selects the exponent corresponding to the detection result detected by the detection encoder 21 from among the exponents as the normalized exponent er. select.

[作用] 第1の発明の浮動小数点演算装置において、仮数候補演
算器13の各加減算器13aにて入力される被演算数F
a 2”“と演算数Fb 2°5の両成敗Fa、Fbに
対して考えられる全ての組み合わせの加減算を同時に予
め求めておき、それを仮数セレクタ14にて引算器11
が演算した指数差に対応する加減算器13aの演算値を
仮数faとしたので、浮動小数点正規化器15に入力さ
れる前までの浮動小数点加減算における非正規化仮数f
aの演算処理段数は減少するとともに引算器11の演算
結果を待たないで仮数の演算が実行でき、その分だけ浮
動小数点演算装置の演算処理速度は速くなる。
[Operation] In the floating point arithmetic device of the first invention, the operand F input to each adder/subtractor 13a of the mantissa candidate arithmetic unit 13
Additions and subtractions of all possible combinations for both success and failure Fa and Fb of a 2"" and the operation number Fb 2°5 are obtained in advance at the same time, and the additions and subtractions of all possible combinations are calculated in advance using the mantissa selector 14 and the subtractor 11
Since the calculated value of the adder/subtractor 13a corresponding to the exponent difference calculated by is set as the mantissa fa, the unnormalized mantissa f in the floating point addition/subtraction before being input to the floating point normalizer 15
The number of arithmetic processing stages of a is reduced, and the mantissa arithmetic operation can be executed without waiting for the arithmetic result of the subtracter 11, and the arithmetic processing speed of the floating point arithmetic unit is correspondingly increased.

第2の発明の浮動小数点正規化装置において、指数候補
演算器23の各演算器23aにて選択された指数に対し
て正規化された時に予想される全ての指数を予め求めて
おき、その各指数と選択された非正規化指数eaの中か
ら指数セレクタ24にて検出エンコーダ21が検出した
検出結果に対応する指数を正規化指数erとしたので、
検出エンコーダ21の検出結果を待って正規化指数er
の演算をすることがなくなり、その分だけ浮動小数点正
規化装置の演算処理は速くなる。
In the floating point normalization device of the second invention, all exponents expected when normalized to the exponent selected by each arithmetic unit 23a of the exponent candidate arithmetic unit 23 are calculated in advance, and each of the exponents is calculated in advance. Since the index corresponding to the detection result detected by the detection encoder 21 in the index selector 24 from among the index and the selected non-normalized index ea is set as the normalized index er,
Waiting for the detection result of the detection encoder 21, the normalization index er
This eliminates the need for calculations, and the calculation processing of the floating-point normalizer becomes faster.

[実施例] 以下、本発明を浮動小数点演算装置を具備したコンピュ
ータに具体化した一実施例を図面に従って説明する。
[Embodiment] An embodiment in which the present invention is embodied in a computer equipped with a floating-point arithmetic unit will be described below with reference to the drawings.

第3図において、n+1個のレジスタrO−rnは数値
データが記憶されるレジスタであって、メモリ31又は
入出力インターフェイス32を介して数値演算のための
浮動小数点表示又は固定小数点表示の数値データが入力
される。レジスタrO〜rnはそれぞれ被演算数用のデ
ータラインLlと演算数用のデータラインL2に接続さ
れていて、当該保持している数値データを被演算数又は
演算数として出力することができる。
In FIG. 3, n+1 registers rO-rn are registers in which numerical data is stored, and numerical data in floating point representation or fixed point representation for numerical calculations is stored through memory 31 or input/output interface 32. is input. The registers rO to rn are respectively connected to the data line Ll for the operand and the data line L2 for the operand, and can output the numerical data held therein as the operand or the operand.

整数演算装置33はデータラインLl、L2を介してレ
ジスタrO〜rnに接続され、各レジスタrO〜rnの
中から選択された2つのレジスタの固定小数点表示の数
値データを被演算数と演算数として入力する。そして、
整数演算装置33はその入力した被演算数と演算数に基
づいて整数演算を実行し、その演算結果を前記メモリ3
1又は入出力インターフェイス32に出力する。
The integer arithmetic unit 33 is connected to registers rO to rn via data lines Ll and L2, and calculates numerical data in fixed point representation of two registers selected from each register rO to rn as an operand and an operand. input. and,
The integer arithmetic device 33 executes an integer arithmetic operation based on the input operand and the arithmetic number, and stores the arithmetic result in the memory 3.
1 or the input/output interface 32.

浮動小数点加減算装置34はデータラインLl。Floating point adder/subtracter 34 is connected to data line Ll.

L2を介してレジスタrO〜rnに接続され、各レジス
タrO〜rnの中から選択された2つのレジスタの浮動
小数点表示の数値データを被演算数と演算数として入力
する。そして、浮動小数点加減算装置34は入力した被
演算数と演算数に基づいて浮動小数点演算(加減算)を
実行し、その演算結果を前記メモリ31又はレジスタ又
は入出力インターフェイス32に出力する。
It is connected to registers rO to rn via L2, and inputs numerical data in floating point representation of two registers selected from each register rO to rn as operands and operands. The floating point addition/subtraction device 34 executes floating point operations (addition/subtraction) based on the input operands and operands, and outputs the operation results to the memory 31 or the register or input/output interface 32.

浮動小数点加減算装置34を詳述すると、引算器11及
び指数セレクタ12はデータラインLl。
To explain the floating point adder/subtracter 34 in detail, the subtracter 11 and the exponent selector 12 are connected to the data line Ll.

L2を介してレジスタrO〜rnに接続され、選択され
た2つのレジスタの浮動小数点表示の数値データ、即ち
演算数と被演算数のうちの指数を入力するようになって
いる。引算器11はこの被演算数と演算数の両指数の指
数差を求め、その結果を指数セレクタ12と仮数セレク
タ14に出力する。指数セレクタ12はこの指数差に基
づいて大きい方の指数を選択し浮動小数点正規化器15
に出力する。
It is connected to the registers rO to rn via L2, and is configured to input numerical data in floating point representation of the two selected registers, that is, the exponent of the operand and the operand. The subtracter 11 calculates the exponent difference between the exponents of the operand and the operand, and outputs the result to the exponent selector 12 and the mantissa selector 14. The exponent selector 12 selects the larger exponent based on this exponent difference, and the floating point normalizer 15 selects the larger exponent.
Output to.

仮数候補演算器13は多数の仮数加減算器13aで構成
され、各加減算器13aはデータラインL1.L2を介
してレジスタrO〜rnに接続され、前記選択された2
つのレジスタの浮動小数点表示の数値データ、即ち演算
数と被演算数のうちの仮数をそれぞれ入力する。加減算
器13aの数は任意の被演算数と演算数の両指数から差
を求める時、その両指数から考えられる差に対応した数
だけ設けられている。例えば、指数が7ビツトで構成さ
れている場合には15個の加減算器13aで仮数候補演
算器13を構成している。そして、仮数候補演算器13
の各加減算器13aによって任意の両指数からその差色
に考えられる全ての組み合わせの仮数加減算が実行され
る。
The mantissa candidate arithmetic unit 13 is composed of a large number of mantissa adders/subtractors 13a, and each adder/subtractor 13a is connected to the data line L1. The selected 2
Numerical data in floating point representation in two registers, ie, the operand and the mantissa of the operand, are respectively input. The number of adders/subtractors 13a is provided in a number corresponding to the difference that can be considered from both exponents when calculating a difference from both exponents of an arbitrary operand and an operand. For example, when the exponent is composed of 7 bits, the mantissa candidate arithmetic unit 13 is composed of 15 adders/subtractors 13a. Then, the mantissa candidate calculator 13
Each adder/subtractor 13a performs mantissa addition/subtraction of all possible combinations of the difference color from arbitrary two exponents.

仮数セレクタ14は引算器11が演算した指数差を入力
し、その指数差に対応した仮数加減算を実行した仮数候
補演算器13中の加減算器13aを選択しその演算値を
仮数として浮動小数点正規化器15に出力する。
The mantissa selector 14 inputs the exponent difference calculated by the subtractor 11, selects the adder/subtractor 13a in the mantissa candidate calculator 13 that has performed the mantissa addition/subtraction corresponding to the exponent difference, and uses the calculated value as the mantissa to convert the floating point normal. output to converter 15.

浮動小数点正規化器15の検出エンコーダ21及びバレ
ルシフタ22は前記正規化されていない仮数セレクタ1
4が選択した仮数(非正規化仮数)を入力する。検出エ
ンコーダ21はその非正規化仮数が最上位ビットから数
えて何ビット目にO以外の値が有るかを検出し、その検
出結果をシフタ22と指数セレクタ24に出力する。シ
フタ22は検出エンコーダ21が検出したビット数をシ
フト量として非正規化仮数を桁移動させ正規化仮数とし
て出力する。
The detection encoder 21 and barrel shifter 22 of the floating point normalizer 15 are connected to the unnormalized mantissa selector 1.
4. Input the selected mantissa (non-normalized mantissa). The detection encoder 21 detects which bit of the non-normalized mantissa has a value other than O, counting from the most significant bit, and outputs the detection result to the shifter 22 and the exponent selector 24. The shifter 22 uses the number of bits detected by the detection encoder 21 as a shift amount to shift the non-normalized mantissa and outputs it as a normalized mantissa.

指数候補演算器23は多数の演算器としての弓算器23
aで構成され、それぞれ前記指数セレクタ12が指数差
に基づいて選択した大きい方の指数(非正規化指数)を
被演算数として入力する。
The index candidate calculator 23 is a bow calculator 23 as a large number of calculators.
a, and the larger exponent (non-normalized exponent) selected by the exponent selector 12 based on the exponent difference is input as the operand.

引算器23aの数は仮数のビット精度数だけ設けられて
いる。例えば、仮数が24ビツトで構成されている場合
には24個の引算器23aで指数候補演算器23を構成
し、各引算器23aは対応する「1」〜「24」の値を
演算数として入力する。
The number of subtracters 23a is equal to the number of bit precisions of the mantissa. For example, when the mantissa is composed of 24 bits, the exponent candidate calculator 23 is composed of 24 subtracters 23a, and each subtracter 23a calculates the corresponding value from "1" to "24". Enter as a number.

尚、本実施例の指数候補演算器23は非正規化指数がそ
のまま正規化指数となる場合を考慮して引算器を使用し
ないでそのまま指数セレクタ24に出力しているが、0
の減算を行う引算器23aを使用してもよい。そして、
指数候補演算器23の各引算器23aによって入力され
る指数に対して正規化された時に予想される全ての指数
を求める。
Note that the exponent candidate arithmetic unit 23 of this embodiment outputs the unnormalized exponent as it is to the exponent selector 24 without using a subtracter in consideration of the case where the unnormalized exponent becomes the normalized exponent as it is.
You may also use a subtracter 23a that performs subtraction. and,
All the exponents expected when the exponents inputted by each subtractor 23a of the exponent candidate calculator 23 are normalized are determined.

指数セレクタ24は指数候補演算器23から出力される
非正規化指数と各引算器23aで求めた各指数を入力し
、その各指数の中から前記検出エンコーダ21か検出し
たビット数に対応する指数を正規化指数として選択する
The exponent selector 24 inputs the non-normalized exponent outputted from the exponent candidate calculator 23 and each exponent obtained by each subtractor 23a, and selects the number of bits detected by the detection encoder 21 from among the exponents. Select the index as the normalization index.

そして、指数セレクタ24か選択した指数と仮数セレク
タ14が選択した仮数は正規化された指数と仮数として
メモリ31又は入出力インターフェイス32に出力され
る。
Then, the exponent selected by the exponent selector 24 and the mantissa selected by the mantissa selector 14 are output to the memory 31 or the input/output interface 32 as normalized exponents and mantissas.

次に、上記のように構成された浮動小数点演算装置34
の作用について説明する。
Next, the floating point arithmetic unit 34 configured as described above
The effect of this will be explained.

今、レジスタrOの浮動小数点表示された数値データF
a 2@”を被演算数とし、レジスタr1の浮動小数点
表示された数値データFb2@bを演算数として、浮動
小数点加減算装置34にて加算する場合、両指数ea、
ebが引算器11及び指数セレクタ12に出力される。
Now, the numerical data F displayed as a floating point in register rO
a2@” as the operand and the floating-point displayed numerical data Fb2@b of the register r1 as the operand, and when the floating-point addition/subtraction unit 34 adds them, both exponents ea,
eb is output to the subtracter 11 and exponent selector 12.

引算器11にて求めた指数差ec  (=ea −eb
 )に基づいて指数セレクタ12は大きい方の指数を選
択し、指数候補演算器23の各引算器23a及び指数セ
レクタ24に出力する。
The exponent difference ec (=ea −eb
), the exponent selector 12 selects the larger exponent and outputs it to each subtracter 23a of the exponent candidate calculator 23 and the exponent selector 24.

一方、両仮数Fa、Fbは仮数候補演算器13の各仮数
加減算器13aに入力される。各加減算器13aは被演
算数Fa 2°1と演算数Fb 2°5の両仮数Fa、
Fbに対して考えられる全ての組み合わせの加算を同時
に求める。即ち、ある加減算器13aは指数差ecが「
l」の場合、又ある加減算器13aは指数差ecが「2
」場合といったように、考えられる指数差eS、即ち=
n −n(nは整数、指数が7ビツトで構成されている
場合にはn=7で15通りの指数差eCか考えられる)
に対してそれぞれの加減算器13aは同時に以下の対応
する仮数演算を実行する。
On the other hand, both mantissas Fa and Fb are input to each mantissa adder/subtractor 13a of the mantissa candidate calculator 13. Each adder/subtractor 13a has both mantissas Fa of the operand Fa 2°1 and the operand Fb 2°5,
Additions of all possible combinations to Fb are determined simultaneously. That is, a certain adder/subtractor 13a has an exponent difference ec of "
l'', a certain adder/subtractor 13a has an exponent difference ec of ``2''.
”, the possible index difference eS, i.e. =
n - n (n is an integer; if the exponent is made up of 7 bits, n = 7 and there are 15 possible exponent differences eC)
, the respective adders/subtractors 13a simultaneously execute the following corresponding mantissa operations.

Fb、Fa2  ”+Fb、−・・・・・・・・−Fa
 2  ’+Fb 、  Fa +Fb 、  Fa 
+Fb 2・・・・・・・Fa 十Fb 2    F
a仮数セレクタ14は引算器11が演算した指数差ec
に対応する仮数候補演算器13の各加減算器13aを選
択しその加減算器13aの演算値を非正規化仮数faと
して検出エンコーダ21及びバレルシフタ22に出力す
る。
Fb, Fa2 ”+Fb, -・・・・・・・・・-Fa
2'+Fb, Fa +Fb, Fa
+Fb 2...Fa 10Fb 2 F
The a mantissa selector 14 calculates the exponent difference ec calculated by the subtractor 11.
, and outputs the calculated value of the adder/subtractor 13a to the detection encoder 21 and barrel shifter 22 as a non-normalized mantissa fa.

検出エンコーダ21はこの非正規化仮数faか最上位ビ
ットから数えて何ビット目に0以外の値が有るかを検出
し、その検出結果をバレルシフタ22に出力する。シフ
タ22は検出デコーダ21か検出したビット数をシフト
量として非正規化仮数を桁移動させ正規化仮数Frとす
る。
The detection encoder 21 detects which bit of the non-normalized mantissa fa has a value other than 0, counting from the most significant bit, and outputs the detection result to the barrel shifter 22. The shifter 22 uses the number of bits detected by the detection decoder 21 as a shift amount to shift the non-normalized mantissa by digits to obtain a normalized mantissa Fr.

一方、指数セレクタ12か選択した非正規化指数eaを
入力した指数候補演算器23はその各弓算器23aを使
用して以下のような正規化された時に予想される全ての
指数を演算する。
On the other hand, the exponent candidate calculation unit 23, which has input the non-normalized exponent ea selected by the exponent selector 12, uses each of its bow calculators 23a to calculate all the exponents expected when normalized as shown below. .

ea−1,ea −2,・串・・・ea −n尚、非正
規化指数がそのまま正規化指数と予想される指数、即ち
指数eaは引算器で演算されることなくそのまま出力さ
れる。又、nは仮数のビット数である。
ea-1, ea-2, · Kushi... ea -nThe non-normalized exponent is expected to be the normalized exponent, that is, the exponent ea, which is output as is without being calculated by the subtractor. . Also, n is the number of bits of the mantissa.

次段の指数セ、レクタ24は前段の指数セレクタ12の
非正規化指数eaと指数候補演算器23で求めた各指数
ea−1−ea−nを入力し、その各指数ea −ea
 −nの中から前記検出エンコーダ21が検出したビッ
ト数に対応する指数を正規化指数erとして選択する。
The next-stage index selector 24 inputs the unnormalized index ea of the previous-stage index selector 12 and each index ea-1-ea-n obtained by the index candidate calculator 23, and inputs each index ea-ea
-n, the exponent corresponding to the number of bits detected by the detection encoder 21 is selected as the normalization exponent er.

このように、本実施例の浮動小数点演算装置においては
、各加減算器13aにて入力される被演算数Fa2”と
演算数Fb2e1′の両仮数Fa。
In this way, in the floating point arithmetic device of this embodiment, both the mantissas Fa of the operand Fa2'' and the operand Fb2e1' are input to each adder/subtractor 13a.

Fbに対して考えられる全ての組み合わせの加減算を同
時に予め求めておき、それを仮数セレクタ14にて引算
器11が演算した指数差eCに対応する加減算器13a
の演算値を仮数faとしたので、従来のように引算器1
1の演算結果を待たないで数の演算が実行でき、その分
だけ浮動小数点演算装置の演算処理速度は速くなる。
Additions and subtractions of all possible combinations to Fb are obtained in advance at the same time, and the additions and subtractions are calculated by the mantissa selector 14 to the adder/subtractor 13a corresponding to the exponent difference eC calculated by the subtracter 11.
Since the calculated value of is set as the mantissa fa, the subtracter 1 is used as in the conventional method.
Numerical operations can be performed without waiting for the operation result of 1, and the processing speed of the floating-point arithmetic unit increases accordingly.

しかも、正規化装置15において指数候補演算器23に
て選択された指数に対して正規化された時に予想される
全ての指数を予め求めておき、その各指数と選択された
非正規化指数eaO中から指数セレクタ24にて検出エ
ンコーダ21が検出したビット数に対応する指数を正規
化指数erとしたので、検出エンコーダ2Iの検出結果
を待って正規化指数erの演算をすることがなくなり、
その分だけ浮動小数点正規化装置の演算処理は速くなる
。その結果、浮動小数点演算装置全体としてさらに演算
処理速度がさらに高速になる。
Moreover, in the normalization device 15, all the exponents expected when the exponent selected by the exponent candidate calculator 23 is normalized are obtained in advance, and each of the exponents and the selected unnormalized exponent eaO are calculated in advance. Since the exponent selector 24 uses the exponent corresponding to the number of bits detected by the detection encoder 21 as the normalization exponent er, there is no need to wait for the detection result of the detection encoder 2I to calculate the normalization exponent er.
The arithmetic processing of the floating point normalizer becomes faster by that much. As a result, the processing speed of the floating-point arithmetic device as a whole becomes even faster.

尚、本発明は前記実施例に限定されるものではなく、第
4図に示すように、指数セレクタ12及び仮数セレクタ
14の出力段にパイプラインレジスタ35a、35bを
設け、同パイプラインレジスタ35a、35bを介して
各非正規化指数及び非正規化仮数を順次正規化装置15
に出力するようにして、連続して浮動小数点演算を行う
場合の処理速度の高速化を図るようにしてもよい。尚、
レジスタr ml、  r m2は連続して行われた各
演算結果が一時記憶されるようになっている。
It should be noted that the present invention is not limited to the embodiment described above, and as shown in FIG. The normalizer 15 sequentially converts each unnormalized exponent and unnormalized mantissa through 35b.
Alternatively, the processing speed may be increased when continuous floating point operations are performed. still,
The registers r ml and r m2 are designed to temporarily store the results of each consecutive operation.

又、前記浮動小数点正規化装置は加減算装置に具体化し
たが乗算装置に具体化してもよい。
Furthermore, although the floating point normalization device is embodied in an addition/subtraction device, it may also be embodied in a multiplication device.

第5図は浮動小数点乗算装置を示し、被演算数Fa2”
の仮数Faと演算数Fb2sbの仮数Fbを掛算する乗
算器41と、両指数ea、ebを入力しそれぞれある条
件で加算する演算器としての加算器42a、42bから
なる指数候補演算器42と、指数セレクタ24及びバレ
ルシフタ22とから構成されている。そして、乗算器4
1は両仮数Fa、Fbを掛算しその結果を非正規化仮数
としてバレルシフタ22に出力する。又、この乗算器4
1は前記実施例の検出エンコーダ21に相当する機能を
持たせ、その演算結果における最上位ビットの値、即ち
正規化のためのシフト値である「0」又は「1」の値を
シフタ22及び指数セレクタ24に出力する。そして、
シフタ22は「0」であればそまま正規化仮数として仮
数Fa。
Figure 5 shows a floating point multiplication device, with the operand Fa2''
A multiplier 41 that multiplies the mantissa Fa of , by the mantissa Fb of the operation number Fb2sb, and an exponent candidate calculator 42 consisting of adders 42a and 42b that input both exponents ea and eb and add them under certain conditions, respectively. It is composed of an index selector 24 and a barrel shifter 22. And multiplier 4
1 multiplies both mantissas Fa and Fb and outputs the result to the barrel shifter 22 as a non-normalized mantissa. Also, this multiplier 4
1 has a function equivalent to the detection encoder 21 of the above embodiment, and transfers the value of the most significant bit in the calculation result, that is, the value of "0" or "1" which is a shift value for normalization, to the shifter 22 and It is output to the index selector 24. and,
If the shifter 22 is "0", the mantissa Fa is directly used as the normalized mantissa.

Fbを掛算した結果を出力し、「1」であれば仮数Fa
、Fbを掛算した結果を最下位ビット側に1ビツトシフ
トして正規化し出力する。
Output the result of multiplying by Fb, and if it is "1", the mantissa Fa
, Fb, and the result is shifted by one bit toward the least significant bit, normalized, and output.

一方、指数候補演算器42の加算器42aは両指数ea
、ebの加算を行い、加算器42bは両指数ea、eb
及び1を加算した演算を行う。即ち、ここでは前記乗算
器41の演算結果に基づいて予想される2つの正規化指
数を予め求めている。
On the other hand, the adder 42a of the index candidate arithmetic unit 42
, eb, and the adder 42b adds both exponents ea, eb
and 1 is added. That is, here, two expected normalization exponents are obtained in advance based on the calculation results of the multiplier 41.

そして、指数セレクタ24は乗算器41の値がr ()
 」であれば加算器42aの値を正規化指数として出力
し、「1」であれば加算器42bの値を正規化指数とし
て出力する。
Then, the exponent selector 24 determines that the value of the multiplier 41 is r()
”, the value of the adder 42a is output as the normalized exponent, and if it is “1”, the value of the adder 42b is output as the normalized exponent.

従って、この場合においても、 Fa 2”・Fb 2@b=Fr 2”を行う浮動小数
点乗算装置における正規化のための処理速度は速くなる
Therefore, even in this case, the processing speed for normalization in the floating-point multiplication device that performs Fa 2''·Fb 2@b=Fr 2'' becomes faster.

[発明の効果] 以上詳述したように、本発明の浮動小数点演算装置によ
れば、浮動小数点正規化器に入力される前までの非正規
化指数及び非正規化仮数の演算処理速度を上げ装置全体
として演算処理の高速化を図ることができる効果を有す
る。
[Effects of the Invention] As detailed above, according to the floating point arithmetic device of the present invention, the processing speed of the unnormalized exponent and the unnormalized mantissa before being input to the floating point normalizer can be increased. This has the effect of increasing the speed of arithmetic processing in the entire device.

又、本発明の浮動小数点正規化装置においても非正規化
指数及び仮数を正規化する演算処理速度を上げることが
でき、浮動小数点演算装置全体として演算処理高速化を
図ることかできる効果を有する。
Further, in the floating point normalization device of the present invention, the processing speed for normalizing the non-normalized exponent and the mantissa can be increased, and the floating point processing device as a whole has the effect of increasing the processing speed.

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

第1図は本発明の浮動小数点演算装置の原理説明図、 第2図は本発明の浮動小数点正規化装置の原理説明図、 第3図は本発明を具体化した浮動小数点演算装置の構成
を示すブロック図、 第4図は本発明を具体化した浮動小数点演算装置の別個
を示すブロック図、 第5図は浮動小数点乗算装置の構成を示すブロック図、 第6図は従来の浮動小数点加減算装置の電気ブロック回
路図、 第7図は従来の浮動小数点正規化装置の電気ブロック回
路図である。 図中、 11は引算器、 12は指数セレクタ、 13は仮数候補演算器、 14ま仮数セレクタ、 15は浮動小数点正規化器、 21よ検出エンコーダ、 22はシフタ、 23は指数候補演算器、 24は指数セレクタである。 第 1 図 第−の発明の詳細な説明図 第 2 図 第二の発明の原理説明図 r r r
Fig. 1 is an explanatory diagram of the principle of a floating point arithmetic device of the present invention, Fig. 2 is an explanatory diagram of the principle of a floating point normalization device of the present invention, and Fig. 3 is a diagram illustrating the configuration of a floating point arithmetic device embodying the present invention. FIG. 4 is a block diagram showing a separate floating-point arithmetic unit embodying the present invention; FIG. 5 is a block diagram showing the configuration of a floating-point multiplication device; FIG. 6 is a conventional floating-point addition/subtraction device. FIG. 7 is an electrical block circuit diagram of a conventional floating point normalizer. In the figure, 11 is a subtracter, 12 is an exponent selector, 13 is a mantissa candidate arithmetic unit, 14 is a mantissa selector, 15 is a floating point normalizer, 21 is a detection encoder, 22 is a shifter, 23 is an exponent candidate arithmetic unit, 24 is an index selector. Fig. 1 Detailed explanatory diagram of the invention in Fig. 2 Fig. 2 An explanatory diagram of the principle of the invention in Fig. 2 r r r

Claims (1)

【特許請求の範囲】 1、被演算数と演算数の両指数の指数差を求める引算器
(11)と、 引算器(11)が演算した指数差に基づいて大きい方の
指数を選択する指数セレクタ(12)と、任意の被演算
数と演算数の両指数から差を求める時、その両指数から
考えられる差毎に仮数加減算器(13a)を設け、その
各加減算器(13a)にてその差毎に考えられる全ての
組み合わせの仮数加減算を、入力される被演算数と演算
数の両仮数に対して実行する仮数候補演算器(13)と
、仮数候補演算器(13)の加減算器(13a)内から
引算器(11)が演算した指数差に対応する加減算器(
13a)の仮数加減算して求めた仮数を選択する仮数セ
レクタ(14)と、 指数セレクタ(12)が選択した指数と仮数セレクタ(
14)が選択した仮数とに基づいて正規化した指数と仮
数を演算する浮動小数点正規化器(15)と からなる浮動小数点演算装置。 2、複数ビットからなる非正規化仮数が最上位ビットか
ら数えた0以外の値が来るまでのビット長又は所定ビッ
ト位置の値を検出する検出エンコーダ(21)と、 前記検出エンコーダ(21)が検出した検出結果をシフ
ト量として前記非正規化仮数を桁移動させ正規化仮数と
するシフタ(22)と、 非正規化指数に対して正規化された時に予想される全て
の指数を演算すべく、多数の演算器(23a)から構成
された指数候補演算器(23)と、 指数候補演算器(23)で求めた各指数の中から検出エ
ンコーダ(21)が検出した検出結果に対応する指数を
正規化指数として選択する指数セレクタ(24)と からなる浮動小数点正規化装置。
[Claims] 1. A subtractor (11) for calculating the exponent difference between the exponents of the operand and the operand, and selecting the larger exponent based on the exponent difference calculated by the subtractor (11). When calculating a difference from both exponents of an arbitrary operand and an operand, a mantissa adder/subtractor (13a) is provided for each possible difference between the two exponents, and each adder/subtractor (13a) a mantissa candidate arithmetic unit (13) that performs all possible combinations of mantissa addition and subtraction for each difference on both the input mantissas of the operand and the operand; The adder/subtracter (13a) corresponds to the exponent difference calculated by the subtracter (11)
The mantissa selector (14) selects the mantissa obtained by adding and subtracting the mantissas in 13a), and the exponent selected by the exponent selector (12) and the mantissa selector (
14) A floating point arithmetic unit comprising a floating point normalizer (15) which calculates a normalized exponent and a mantissa based on the mantissa selected by the operator. 2. A detection encoder (21) that detects the bit length of a non-normalized mantissa consisting of a plurality of bits until a value other than 0, counted from the most significant bit, or a value at a predetermined bit position; and the detection encoder (21) A shifter (22) that uses the detected detection result as a shift amount to shift the unnormalized mantissa by digits to make it a normalized mantissa; , an index candidate calculator (23) composed of a large number of calculators (23a), and an index corresponding to the detection result detected by the detection encoder (21) from among the indices obtained by the index candidate calculator (23). and an exponent selector (24) for selecting the normalization exponent.
JP2112325A 1990-04-28 1990-04-28 Floating point arithmetic unit Pending JPH0415728A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2112325A JPH0415728A (en) 1990-04-28 1990-04-28 Floating point arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2112325A JPH0415728A (en) 1990-04-28 1990-04-28 Floating point arithmetic unit

Publications (1)

Publication Number Publication Date
JPH0415728A true JPH0415728A (en) 1992-01-21

Family

ID=14583852

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2112325A Pending JPH0415728A (en) 1990-04-28 1990-04-28 Floating point arithmetic unit

Country Status (1)

Country Link
JP (1) JPH0415728A (en)

Similar Documents

Publication Publication Date Title
JP6001276B2 (en) Apparatus and method for performing floating point addition
US8499017B2 (en) Apparatus and method for performing fused multiply add floating point operation
EP0472148B1 (en) Method and apparatus for computing floating point data
US5197023A (en) Hardware arrangement for floating-point addition and subtraction
US4849923A (en) Apparatus and method for execution of floating point operations
US5677861A (en) Arithmetic apparatus for floating-point numbers
JP2008152360A (en) Floating-point adder/subtractor of three-term input
JPH09507941A (en) Block normalization without wait cycles in a multi-add floating point sequence
JP3313560B2 (en) Floating point processor
US20050228844A1 (en) Fast operand formatting for a high performance multiply-add floating point-unit
USH1222H (en) Apparatus for determining sticky bit value in arithmetic operations
US20090164544A1 (en) Dynamic range enhancement for arithmetic calculations in real-time control systems using fixed point hardware
JPH0415728A (en) Floating point arithmetic unit
JPH0540605A (en) Floating point multiplier
JPH0283728A (en) Floating point multiplier
JP3064405B2 (en) Complex number processing
JPH04172526A (en) Floating point divider
JP4428778B2 (en) Arithmetic device, arithmetic method, and computing device
JP2512230B2 (en) Processor
JPH0361224B2 (en)
JP3229057B2 (en) Exception handling device
JP2512801B2 (en) Multiplier
JP3100868B2 (en) Arithmetic unit for floating point numbers
JPH0540609A (en) Floating point divider
JPH0540606A (en) Floating point multiplier/divider