JP2561638B2 - Floating point arithmetic circuit - Google Patents

Floating point arithmetic circuit

Info

Publication number
JP2561638B2
JP2561638B2 JP62183293A JP18329387A JP2561638B2 JP 2561638 B2 JP2561638 B2 JP 2561638B2 JP 62183293 A JP62183293 A JP 62183293A JP 18329387 A JP18329387 A JP 18329387A JP 2561638 B2 JP2561638 B2 JP 2561638B2
Authority
JP
Japan
Prior art keywords
output
circuit
exponent
input data
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP62183293A
Other languages
Japanese (ja)
Other versions
JPS6428725A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP62183293A priority Critical patent/JP2561638B2/en
Publication of JPS6428725A publication Critical patent/JPS6428725A/en
Application granted granted Critical
Publication of JP2561638B2 publication Critical patent/JP2561638B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、浮動小数点演算回路に関し、例えば浮動
小数点演算回路を持つディジタル・ジクナル・プロセッ
サ又は浮動小数点演算プロセッサを含むマイクロコンピ
ュータシステムに利用して有効な技術に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a floating point arithmetic circuit, for example, a digital digital processor having a floating point arithmetic circuit or a microcomputer system including the floating point arithmetic circuit. It relates to effective technology.

〔従来の技術〕[Conventional technology]

浮動小数点演算回路に関しては、例えば、日経マグロ
ウヒル社1986年8月25日付『日経エレクトロニクス』頁
201〜頁209がある。
For the floating-point arithmetic circuit, see, for example, “Nikkei Electronics”, Nikkei McGraw-Hill, Inc., August 25, 1986.
There are pages 201 to 209.

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

浮動小数点演算回路では、数表現を仮数部と指数部に
より行う。このことから、2つのデータのうち、一方の
仮数部を零にして、指数部に一定のデータを供給する
と、指数部の差分に従ったシフト動作を行わせることが
できる。しかしながら、浮動小数点演算回路は、通常の
浮動小数点演算動作において指数部のオーバーフローや
アンンダーフローが仮数部出力の計算で多くの問題を引
き起こすため、それらの保護回路が設けられている。そ
れ故、上記手法を用いるとしても、例えば仮数部が16ビ
ットからなるデータの場合、右シフトは15ビットまでの
ように限定され、左シフトは最大値に固定されてしま
う。
In the floating point arithmetic circuit, the number representation is performed by the mantissa part and the exponent part. From this, when one of the two data has a mantissa of zero and constant data is supplied to the exponent, the shift operation can be performed according to the difference between the exponents. However, the floating-point arithmetic circuit is provided with a protection circuit because overflow or underflow of the exponent causes many problems in the calculation of the output of the mantissa in the normal floating-point arithmetic operation. Therefore, even if the above method is used, for example, in the case of data whose mantissa part is 16 bits, right shift is limited to 15 bits and left shift is fixed to the maximum value.

この発明の目的は、高速シフト機能を持つようにされ
た浮動小数点演算回路を提供することにある。
An object of the present invention is to provide a floating point arithmetic circuit having a high speed shift function.

この発明の前記ならびにそのほかの目的と新規な特徴
は、本明細書の記述および添付図面から明らかになるで
あろう。
The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

〔問題点を解決するための手段〕[Means for solving problems]

本願において開示される発明のうち代表的なものの概
要を簡単に説明すれば、下記の通りである。すなわち、
浮動小数点演算回路に、演算結果を正規化させる機能
と、出力のオーバーフロー保護機能とを特定の動作モー
ドの指定によって停止させる機能を付加する。
The outline of a typical one of the inventions disclosed in the present application will be briefly described as follows. That is,
The floating point arithmetic circuit is provided with a function of normalizing the arithmetic result and a function of stopping the output overflow protection function by designating a specific operation mode.

〔作 用〕[Work]

上記した手段によれば、上記動作モードのとき指数部
の演算動作を利用して任意のビットの左右シフト動作を
実現できる。
According to the above-mentioned means, it is possible to realize the left-right shift operation of any bit by utilizing the arithmetic operation of the exponent part in the above operation mode.

〔実施例〕〔Example〕

第1図には、この発明に係る浮動小数点演算回路の一
実施例のブロック図が示されている。同図の各回路ブロ
ックは、公知の半導体集積回路の製造技術によって、特
に制限されないが、単結晶シリコンのような1個の半導
体基板上において形成される。
FIG. 1 shows a block diagram of an embodiment of a floating point arithmetic circuit according to the present invention. Although not particularly limited, each circuit block shown in the figure is formed on a single semiconductor substrate such as single crystal silicon by a known semiconductor integrated circuit manufacturing technique.

特に制限されないが、16ビットからなる仮数部と4ビ
ットからなる指数部とによって表現される合計20ビット
のデータが伝えられる一方のデータバスXorY−BUSを通
して供給される信号は、セレクタ1と指数部比較回路9
の一方の入力にそれぞれ供給される。上記同様に16ビッ
トからなる仮数部と4ビットからなる指数部とによって
表現される合計20ビットのデータが伝えられる他方のデ
ータバスD−BUSを通して供給される信号は、セレクタ
1と指数部比較回路9の他方の入力にそれぞれ供給され
る。
Although not particularly limited, a signal supplied through one of the data buses XorY-BUS, which transmits 20 bits of data expressed by a 16-bit mantissa part and a 4-bit exponent part, is a selector 1 and an exponent part. Comparison circuit 9
Is supplied to one input of each. Similarly to the above, the signal supplied through the other data bus D-BUS, which transmits the data of 20 bits in total expressed by the mantissa part consisting of 16 bits and the exponent part consisting of 4 bits, is the selector 1 and the exponent part comparison circuit. 9 to the other input, respectively.

上記指数部比較回路9は、上記両データの指数部eAと
eBとを比較して、小さい値を持つ指数部を右シフタ2に
伝えるよう上記セレクタ1の制御を行う。例えば、上記
データバスXorY−BUSから供給されるデータの指数部がe
Aで、上記データバスD−BUSから供給されるデータの指
数部がeBであるとし、eA>eBなら、上記セレクタ1によ
って交差的に仮数部のデータを出力させ、eA<eBなら、
上記セレクタ1によってそのまま仮数部のデータを出力
させる。これによって、右シフタ2側には常に指数部の
小さい方に対応した仮数部のデータが供給される。
The exponent part comparison circuit 9 compares the exponent part eA of both data with the exponent part eA.
By comparing with eB, the selector 1 is controlled so that the exponent part having a smaller value is transmitted to the right shifter 2. For example, the exponent part of the data supplied from the data bus XorY-BUS is e
In A, it is assumed that the exponent part of the data supplied from the data bus D-BUS is eB, and if eA> eB, the selector 1 outputs the data of the mantissa part crosswise, and if eA <eB,
The selector 1 outputs the mantissa data as it is. As a result, the mantissa part data corresponding to the smaller exponent part is always supplied to the right shifter 2 side.

上記右シフタ2には、指数部比較回路9によって形成
されたその差分、言い換えるならば減算されたシフト量
|eA−eB|が供給される。これによって、指数部が小さい
方の仮数部のデータがシフト量|eA−eB|に相当するビッ
トだけ右方向にシフトされる。これにより、両データの
指数部が大きい方に合わせ込まれる。
In the right shifter 2, the difference formed by the exponent part comparison circuit 9, in other words, the subtracted shift amount.
| eA−eB | is supplied. As a result, the data of the mantissa part having the smaller exponent part is shifted to the right by a bit corresponding to the shift amount | eA−eB |. As a result, the exponent part of both data is adjusted to the larger one.

上記のデータ操作によって、仮数部のデータビットが
一致するので、固定算術論理演算ユニット(以下、単に
ALUという)3による加減算の実行が行われる。
Since the data bits of the mantissa part are matched by the above data operation, the fixed arithmetic logic operation unit (hereinafter, simply
The addition / subtraction is executed by ALU 3.

上記ALU3の出力信号は、左シフタ6に入力される。こ
の左シフタ6は、上記ALU3の演算結果(仮数部)を正規
化するために用いられる。すなわち、上記ALU3の出力信
号は、0.1検出回路4にも入力され、ここで小数点以下
の1又は0の数の計数し、その計数分だけ左シフタ6の
シフト動作を行われる。すなわち、上記演算結果が正の
値の場合、小数点以下第1位が1に、負値の場合、0に
なるまで上記左シフタ6が演算結果の仮数部のデータを
シフトさせる。
The output signal of the ALU3 is input to the left shifter 6. The left shifter 6 is used to normalize the calculation result (mantissa part) of the ALU3. That is, the output signal of the ALU 3 is also input to the 0.1 detection circuit 4, where the number of 1s or 0s below the decimal point is counted, and the shift operation of the left shifter 6 is performed by the counted number. That is, when the operation result is a positive value, the left shifter 6 shifts the data of the mantissa part of the operation result until the first place after the decimal point is 1, and when it is a negative value, it becomes 0.

上記左シフタ6を通して正規化された仮数部の演算結
果は、オーバーフロー保護回路7を通してアキュムレー
タ8の仮数部に供給される。オーバーフロー保護回路7
は、上記演算結果のオーバーフロー出力を禁止する。す
なわち、上記演算結果にオーバーフローが生じてもその
効果を最大値に固定する機能を持つ。このようなオーバ
ーフロー保護機能によって、無限大オペランドが生じて
全体の演算シーケンスが停止してしまうのを防止する。
The operation result of the mantissa part normalized by the left shifter 6 is supplied to the mantissa part of the accumulator 8 through the overflow protection circuit 7. Overflow protection circuit 7
Prohibits overflow output of the above calculation result. That is, even if an overflow occurs in the above calculation result, it has a function of fixing the effect to the maximum value. Such an overflow protection function prevents an infinite operand from occurring and stopping the entire operation sequence.

指数部加減算回路10は、上記指数部eAとeBの加減算を
行い、上記アキュムレータ8の指数部に供給される。こ
のアキュムレータ8に保持された演算結果は、上記デー
タバスD−BUSを通して再演算又は所定に記憶回路に格
納される。
The exponent part addition / subtraction circuit 10 performs addition / subtraction of the exponent parts eA and eB and supplies the result to the exponent part of the accumulator 8. The calculation result held in the accumulator 8 is recalculated or stored in a predetermined storage circuit through the data bus D-BUS.

この実施例では、上記浮動小数点演算回路による高速
シフト機能を実現するため、次の回路が付加される。特
に制限されないが、特定の動作モードの指定によりシフ
トモード信号SFMが決定される。この信号SFMは、通常の
浮動小数点演算モードのときには、ロウレベル(論理
“0")され、上記シフトモードの時にハイレベル(論理
“1")にされる。
In this embodiment, the following circuit is added in order to realize the high speed shift function by the floating point arithmetic circuit. Although not particularly limited, the shift mode signal SFM is determined by the designation of a specific operation mode. The signal SFM is set to low level (logic "0") in the normal floating point operation mode, and is set to high level (logic "1") in the shift mode.

この信号SFMは、一方において新たに設けられるセレ
クタ5の切り換え制御を行う。上記0.1検出回路4の出
力信号は、上記セレクタ5の一方の入力に供給される。
上記セレクタ5の他方の入力には、上記指数部比較回路
で形成されたシフト量|eA−eB|が供給される。セレクタ
5は、信号SFMがロウレベルのとき、上記0.1検出回路4
の出力信号を左シフタ6に伝える。これによって、前記
のような演算結果の正規化が行われる。セレクタ5は、
信号SFMがハイレベルのとき、上記シフト量|eA−eB|を
左シフタ6に伝える。これによって、後述するような左
シフト動作が実現される。
On the one hand, this signal SFM controls the switching of the newly provided selector 5. The output signal of the 0.1 detection circuit 4 is supplied to one input of the selector 5.
The other input of the selector 5 is supplied with the shift amount | eA−eB | formed by the exponential part comparison circuit. When the signal SFM is at low level, the selector 5 detects the 0.1 detection circuit 4 described above.
To the left shifter 6. As a result, the operation result is normalized as described above. The selector 5 is
When the signal SFM is at high level, the shift amount | eA-eB | is transmitted to the left shifter 6. As a result, a left shift operation as will be described later is realized.

上記信号SFMは、他方においてオーバーフロー保護回
路7に供給される。オーバーフロー保護回路7は、上記
信号SFMがハイレベルのとき、言い換えるならばシフト
動作モードのときその動作が無効にされる。すなわち、
オーバーフロー保護回路7は、上記信号SFMがハイレベ
ルのとき入力信号(左シフタ7の出力信号)をそのまま
アキュムレータ8に伝える。
On the other hand, the signal SFM is supplied to the overflow protection circuit 7. The operation of the overflow protection circuit 7 is invalidated when the signal SFM is at a high level, in other words, in the shift operation mode. That is,
The overflow protection circuit 7 transmits the input signal (the output signal of the left shifter 7) as it is to the accumulator 8 when the signal SFM is at the high level.

(1)右シフト動作は、下記のように行われる。(1) The right shift operation is performed as follows.

例えば、シフトすべきデータの仮数部の値が、0.100
0101 0010 1010で、指数部(eA)が、0001であるとす
る。これを右方向に5ビットシフトさせるとき、他方の
データとして、仮数部が、0.000 0000 0000 0000(零)
に指定し、指数部(eB)をその5ビットシフト量に対応
して0110に設定する。
For example, the mantissa value of the data to be shifted is 0.100.
[0101] In 1010, it is assumed that the exponent part (eA) is 0001. When this is shifted to the right by 5 bits, the mantissa is 0.000 0000 0000 0000 (zero) as the other data.
And the exponent part (eB) is set to 0110 corresponding to the 5-bit shift amount.

この場合、指数部eAの値が小さいから、セレクタ1
は、上記シフトすべきデータの仮数部を右シフタ2に供
給する。右シフタ2は、上記指数部の差分eB−eA(十進
数で6−1=5)だけ右方向にシフトさせる。これによ
り、右シフタ2を通して出力される仮数部のデータは、
0.000 0010 0010 1000となり、LSB以上のビット、0110
は切り捨てられる。
In this case, the value of exponent eA is small, so selector 1
Supplies the mantissa part of the data to be shifted to the right shifter 2. The right shifter 2 shifts to the right by the difference eB-eA (decimal 6-1 = 5) of the exponent part. As a result, the mantissa data output through the right shifter 2 is
0.000 0010 0010 1000 becomes, and bits more than LSB, 0110
Is truncated.

ALU3は、他方データが上記のように零(0.000 0000 0
000 0000)であることから、上記右シフトされたデータ
をそのまま出力させる。
On the other hand, the data of ALU3 is zero (0.000 0000 0
000 0000), the above right-shifted data is output as it is.

上記のようなシフト動作モードのとき、上記信号SFM
のハイレベルによって、0.1検出回路4の出力が無効に
され、左シフタ6による正規化が行われないこと、及び
上記のようにeAが小さいときには、その差分が負の値に
なることから左方向のシフトが無効になって、上記ALU3
の出力をそのまま伝える。なお、上記指数部比較回路9
において、指数部eAとeBの大小関係から上記条件のとき
セレクタ5に供給するシフト量を0にするものとしても
よい。
In the shift operation mode as described above, the above signal SFM
The output of the 0.1 detection circuit 4 is invalidated by the high level of, and the normalization by the left shifter 6 is not performed, and when eA is small as described above, the difference becomes a negative value. Shift is disabled, above ALU3
The output of is transmitted as it is. The exponent comparison circuit 9
In the above, the shift amount supplied to the selector 5 may be set to 0 under the above condition due to the magnitude relationship between the exponents eA and eB.

また、上記信号SFMのハイレベルによってオーバーフ
ロー保護回路7の動作が禁止されるから、アキュムレー
タ8には、上記右シフタ2により形成された仮数部のデ
ータが格納されるものとなる。指数部にはそのまま0001
が格納される。すなわち、このときには、指数部加減算
回路の動作も無効にされる。なお、上記オーバーフロー
保護回路7の動作を無効にすることは、上記右シフト動
作でオーバーフローが生じ得ないことから実質的な意味
を持たない。
Further, since the operation of the overflow protection circuit 7 is prohibited by the high level of the signal SFM, the accumulator 8 stores the data of the mantissa part formed by the right shifter 2. The index part is 0001 as it is
Is stored. That is, at this time, the operation of the exponent addition / subtraction circuit is also invalidated. It should be noted that disabling the operation of the overflow protection circuit 7 has no substantial meaning because an overflow cannot occur in the right shift operation.

(2)左シフト動作は、下記のように行われる。(2) The left shift operation is performed as follows.

例えば、シフトすべきデータの仮数部の値が、0.100
0101 0010 1010で、指数部(eA)が、0110であるとす
る。これを左方向に5ビットシフトさせるとき、他方の
データとして、仮数部が、0.000 0000 0000 0000(零)
に指定し、指数部(eB)をその5ビットシフト量に対応
して0001に設定する。
For example, the mantissa value of the data to be shifted is 0.100.
[0101] In 1010, the exponent part (eA) is 0110. When shifting this to the left by 5 bits, the mantissa part is 0.000 0000 0000 0000 (zero) as the other data.
, And sets the exponent part (eB) to 0001 corresponding to the 5-bit shift amount.

この場合、指数部eBの値が小さいから、セレクタ1
は、上記シフトすべきデータの仮数部をALUに伝える。
そして、右シフタ2には上記零のデータが格納され、そ
のシフト動作は無意味となるからeA−eBが正の値を採る
とき上記右シフタ2の動作を禁止してもよい。
In this case, the value of exponent eB is small, so selector 1
Tells the ALU the mantissa part of the data to be shifted.
Since the zero data is stored in the right shifter 2 and its shift operation is meaningless, the operation of the right shifter 2 may be prohibited when eA-eB takes a positive value.

したがって、ALU3の出力からは上記データが0.100 01
01 0010 1010がそのまま出力される。しかし、eA−eBが
上記のように正の値を採るとき、セレクタ5が有効なシ
フト量として左シフタ6に伝えるため、左シフタ6は、
上記指数部の差分eB−eA(十進数で6−1=5)だけ左
方向にシフトさせる。これにより、左シフタ6を通して
出力される仮数部のデータは、1.010 0011 0100 0000と
なり、オーバーフローを生じる。しかしながら、上記信
号SFMのハイレベルによってオーバーフロー保護回路7
の動作が禁止されるから、アキュムレータ8には、上記
左シフタ6により形成された仮数部のデータが格納され
るものとなる。なお、このときMSB(サインビット)が
1で、負数を表現する形式になっているが、この動作モ
ードではデータのシフト動作モードであることから、単
なるビット操作と扱われるものであるので問題ない。
Therefore, the above data is 0.100 01 from the output of ALU3.
01 0010 1010 is output as is. However, when eA-eB takes a positive value as described above, the selector 5 notifies the left shifter 6 as an effective shift amount, so that the left shifter 6
It shifts to the left by the difference eB-eA (6-1 = 5 in decimal) of the exponent part. As a result, the data of the mantissa part output through the left shifter 6 becomes 1.010 0011 0100 0000, and overflow occurs. However, depending on the high level of the signal SFM, the overflow protection circuit 7
Since the above operation is prohibited, the data of the mantissa part formed by the left shifter 6 is stored in the accumulator 8. At this time, the MSB (sign bit) is 1, and the format is such that it represents a negative number. However, since this operation mode is a data shift operation mode, it is treated as a simple bit operation, so there is no problem. .

この実施例では、仮数部が零で、指数eB(スケーリン
グ定数)なる値の供給によって、浮動小数点演算回路に
よるシフト動作を行わせることができる。上記シフト動
作と、上記スケーリング定数を特定のコマンドにより指
定することによって、1つの命令サイクルによってデー
タの左右任意のビットのシフトが実現できる。これによ
り、従来のように複数ビットのシトフ動作を行うにあた
り、1ビットシフトサイクルを複数回実行する場合に比
べて高速なシフト動作を実現できる。
In this embodiment, the mantissa is zero, and the shift operation by the floating-point arithmetic circuit can be performed by supplying the value of exponent eB (scaling constant). By designating the shift operation and the scaling constant with a specific command, it is possible to realize the shift of any bit on the left and right of the data in one instruction cycle. As a result, in performing a multi-bit shift operation as in the related art, it is possible to realize a higher-speed shift operation as compared with the case where a 1-bit shift cycle is executed multiple times.

上記の実施例から得られる作用効果は、下記の通りで
ある。すなわち、 (1)浮動小数点演算回路に演算結果を正規化させる機
能と出力のオーバーフロー保護機能とを特定の動作モー
ドの指定によって停止させる機能を付加して、その動作
モードにおいて一方の入力にシフトすべきデータを供給
し、他方の入力に仮数部が零で指数部にシフト量に対応
したデータを供給することによって、左右シフト動作を
実現できるという効果がえられる。
The operation and effect obtained from the above embodiment is as follows. That is, (1) a function for normalizing the operation result and a function for protecting the overflow of the output are added to the floating-point arithmetic circuit by the function of designating a specific operation mode, and one input is shifted in that operation mode. By supplying power data and supplying the other input with data whose mantissa part is zero and whose exponent part corresponds to the shift amount, it is possible to realize the left-right shift operation.

(2)上記動作モードとスケーリング定数としての仮数
部と指数部のデータとを特定のコマンドにより指定す
る。これにより、1命令サイクルにより任意ビットの左
右シフトを実現できるという効果が得られる。
(2) The operation mode, the mantissa part as a scaling constant, and the exponent part data are specified by a specific command. As a result, it is possible to achieve an effect that an arbitrary bit can be shifted left and right in one instruction cycle.

(3)上記(1)ないし(2)により、浮動小数点演算
回路の多機能化が実現できるという効果が得られる。
(3) With the above (1) and (2), it is possible to obtain the effect that the floating-point arithmetic circuit can be made multifunctional.

以上本願発明者によってなされた発明を実施例に基づ
き具体的に説明したが、本願発明は前記実施例に限定さ
れるものではなく、その要旨を逸脱しない範囲で種々変
更可能であることはいうまでもない。例えば、シフト動
作モードにおいて、右シフタと左シフタの動作を択一的
に行う動作の制御は、右シフト用のコマンドと左シフト
用のコマンドに従って行わせるものとしもよい。また、
シフト量は、シフトすべきデータの指数部に対して、シ
フト量を加減算して上記指数eAを指数比較回路等の内部
で発生させるものであってもよい。このように、上記右
シフタと左シフタをシフト方向に合わせて実質的に択一
的に動作させる方式は、種々の実施形態を採ることがで
きる。
Although the invention made by the inventor of the present application has been specifically described based on the embodiment, the invention of the present application is not limited to the embodiment and various modifications can be made without departing from the scope of the invention. Nor. For example, in the shift operation mode, the operation of selectively performing the operation of the right shifter and the operation of the left shifter may be performed according to a command for right shift and a command for left shift. Also,
The shift amount may be such that the shift amount is added to or subtracted from the exponent part of the data to be shifted to generate the exponent eA inside the exponent comparison circuit or the like. As described above, various embodiments can be adopted as the method of operating the right shifter and the left shifter in a substantially alternate manner according to the shift direction.

この発明は、ディジタル・シグナル・プロセッサやコ
プロセッサ等のように浮動小数点演算回路を含むもの、
又は浮動小数点演算回路そのものに広く利用できるもの
である。
The present invention includes a floating point arithmetic circuit such as a digital signal processor or a coprocessor,
Alternatively, it can be widely used in the floating point arithmetic circuit itself.

〔発明の効果〕〔The invention's effect〕

本願において開示される発明のうち代表的なものによ
って得られる効果を簡単に説明すれば、下記の通りであ
る。すなわち、浮動小数点演算回路に演算結果を正規化
させる機能と出力のオーバーフロー保護機能とを特定の
動作モードの指定によって停止させる機能を付加して、
その動作モードにおいて一方の入力にシフトすべきデー
タを供給し、他方の入力に仮数部が零で指数部にシフト
量に対応したデータを供給することによって、左右シフ
ト動作を実現できる。
The effect obtained by the representative one of the inventions disclosed in the present application will be briefly described as follows. That is, a function for normalizing the operation result and an output overflow protection function for the floating-point operation circuit are added by a function for stopping the operation by designating a specific operation mode.
In the operation mode, the data to be shifted is supplied to one input, and the data corresponding to the shift amount is supplied to the other input with the mantissa part being zero and the exponent part, whereby the left-right shift operation can be realized.

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

第1図は、この発明に係る浮動小数点演算回路の一実施
例を示すブロック図である。 1,5……セレタタ、2……右シフタ、ALU……固定算術論
理演算ユニット、4……0.1検出回路、6……左シフ
タ、7……オーバーフロー保護回路、8……アキュムレ
ータ、9……指数部比較回路、10……指数部加減算回路
FIG. 1 is a block diagram showing an embodiment of a floating point arithmetic circuit according to the present invention. 1,5 …… Selector, 2 …… Right shifter, ALU …… Fixed arithmetic logic operation unit, 4 …… 0.1 detection circuit, 6 …… Left shifter, 7 …… Overflow protection circuit, 8 …… Accumulator, 9 …… Exponent part comparison circuit, 10 ... Exponent part addition / subtraction circuit

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】仮数部と指数部からなる2つの入力データ
のうちの指数部の大小比較と差分を検出する指数部比較
回路と、 上記指数部比較回路の大小比較出力により制御されて上
記2つの入力データのうち、上記指数部の大きい方の入
力データの加数部を第1の出力側に伝え、小さい方の入
力データの加数部を第2の出力側に伝える第1のセレク
タと、 上記第1のセレクタの第2の出力側から出力される入力
データの加数部を上記指数部比較回路の差分出力に応じ
てシフトさせる右シフタと、 上記第1のセレクタの第1の出力側から出力された入力
データの加数部と、上記右シフタから出力される入力デ
ータの加数部とを受ける固定算術演算ユニットと、 上記固定算術演算ユニットの出力信号を受ける0.1検出
回路と、 上記固定算術演算ユニットの出力信号を受けて、上記0.
1検出回路の検出信号により制御される左シフタと、 上記左シフタの出力信号を受けてそのオーバーフローを
検出し、オーバーフローが発生すると結果を最大値に固
定するオーバーフロー保護回路とを含む浮動小数点演算
回路において、 シフトモード信号と第2のセレクタを追加し、 上記シフトモード信号が有効とされるときに、上記2つ
の入力データのうちの一方の入力データはシフトされる
べきデータとし、他方の入力データの仮数部を零とし、
かかる他方の入力データの指数部は上記シフトされるべ
きデータの指数部との差分に設定し、 上記シフトモード信号が有効とされるときには上記第2
のセレクタを制御して上記左シフタに入力される制御信
号を0.1検出回路の検出信号に代えて上記指数部比較回
路の差分出力に切り換え、上記シフトモード信号により
上記オーバーフロー保護回路の動作を無効にして入力信
号をそのまま出力させてなることを特徴とする浮動小数
点演算回路。
1. An exponent part comparison circuit for detecting a size comparison and a difference between exponent parts of two input data consisting of a mantissa part and an exponent part; and a size comparison output of the exponent part comparison circuit for controlling the above-mentioned 2 Of the two input data, a first selector that transmits the addend of the input data with the larger exponent to the first output side and the addend of the input data with the smaller exponent to the second output A right shifter for shifting the addend part of the input data output from the second output side of the first selector according to the difference output of the exponential part comparison circuit; and the first output of the first selector. A fixed arithmetic operation unit that receives the addend part of the input data output from the side and the addend part of the input data output from the right shifter, and a 0.1 detection circuit that receives the output signal of the fixed arithmetic operation unit, Fixed arithmetic operation above In response to the door of the output signal, above 0.
1 Floating-point arithmetic circuit including a left shifter controlled by the detection signal of the detection circuit and an overflow protection circuit that receives the output signal of the left shifter, detects the overflow, and fixes the result to the maximum value when the overflow occurs In, a shift mode signal and a second selector are added, and when the shift mode signal is enabled, one of the two input data is data to be shifted and the other input data is Let the mantissa part of be zero,
The exponent part of the other input data is set to the difference from the exponent part of the data to be shifted, and the second mode is set when the shift mode signal is valid.
Of the overflow control circuit by switching the control signal input to the left shifter to the differential output of the exponential part comparison circuit in place of the detection signal of the 0.1 detection circuit, and invalidating the operation of the overflow protection circuit by the shift mode signal. Floating point arithmetic circuit characterized by outputting the input signal as it is.
JP62183293A 1987-07-24 1987-07-24 Floating point arithmetic circuit Expired - Lifetime JP2561638B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62183293A JP2561638B2 (en) 1987-07-24 1987-07-24 Floating point arithmetic circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62183293A JP2561638B2 (en) 1987-07-24 1987-07-24 Floating point arithmetic circuit

Publications (2)

Publication Number Publication Date
JPS6428725A JPS6428725A (en) 1989-01-31
JP2561638B2 true JP2561638B2 (en) 1996-12-11

Family

ID=16133124

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62183293A Expired - Lifetime JP2561638B2 (en) 1987-07-24 1987-07-24 Floating point arithmetic circuit

Country Status (1)

Country Link
JP (1) JP2561638B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS581244A (en) * 1981-06-26 1983-01-06 Fujitsu Ltd Detecting method for exception of floating decimal point instruction
JPS60245046A (en) * 1984-05-21 1985-12-04 Fujitsu Ltd Logical shift arithmetic circuit

Also Published As

Publication number Publication date
JPS6428725A (en) 1989-01-31

Similar Documents

Publication Publication Date Title
US5010508A (en) Prenormalization for a floating-point adder
DE69416283D1 (en) Overflow control for arithmetic operations
WO1999056202A1 (en) Method and apparatus for floating point operations and format conversion operations
EP0530372B1 (en) Numerical expression converter and vector processor using the same
EP0529101B1 (en) Floating-point dividing circuit
US4796218A (en) Arithmetic circuit capable of executing floating point operation and fixed point operation
US5303175A (en) Floating point arithmetic unit
US4992969A (en) Integer division circuit provided with a overflow detector circuit
US5671171A (en) Shared rounding hardware for multiplier and divider/square root unit using conditional sum adder
US5337265A (en) Apparatus for executing add/sub operations between IEEE standard floating-point numbers
US5764549A (en) Fast floating point result alignment apparatus
JP2561638B2 (en) Floating point arithmetic circuit
JP2511527B2 (en) Floating point arithmetic unit
US5920493A (en) Apparatus and method to determine a most significant bit
US6779008B1 (en) Method and apparatus for binary leading zero counting with constant-biased result
US6219684B1 (en) Optimized rounding in underflow handlers
US4977534A (en) Operation circuit based on floating-point representation with selective bypass for increasing processing speed
KR100431726B1 (en) Method for performing signed division
US20040098439A1 (en) Apparatus and method for sharing overflow/underflow compare hardware in a floating-point multiply-accumulate (FMAC) or floating-point adder (FADD) unit
JPH06250820A (en) Exponential underflow in floating-point adder and method and equipment for detecting overflow
JPS6133539A (en) Floating point arithmetic unit
JPH0383126A (en) Floating-point multiplier
US5926407A (en) Combined add/shift structure
JP2801472B2 (en) Floating point arithmetic unit
JP2005115410A (en) Operation unit