JPH02214931A - Floating point arithmetic circuit - Google Patents

Floating point arithmetic circuit

Info

Publication number
JPH02214931A
JPH02214931A JP1035128A JP3512889A JPH02214931A JP H02214931 A JPH02214931 A JP H02214931A JP 1035128 A JP1035128 A JP 1035128A JP 3512889 A JP3512889 A JP 3512889A JP H02214931 A JPH02214931 A JP H02214931A
Authority
JP
Japan
Prior art keywords
circuit
output
mantissa
rounding
shift
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
JP1035128A
Other languages
Japanese (ja)
Inventor
Hiroyuki Yoshida
裕之 吉田
Toshio Jufuku
寿福 利夫
Shoichi Imazeki
今関 將市
Mitsuharu Baba
光晴 馬場
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP1035128A priority Critical patent/JPH02214931A/en
Publication of JPH02214931A publication Critical patent/JPH02214931A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten the computing time by sorting the interim results of arithmetic operations of a mantissa part and carrying out both normalizing and rounding processes in parallel with each other. CONSTITUTION:A mantissa part arithmetic circuit 2 performs an arithmetic operation with two mantissa parts after a digit matching process and outputs this computing result to a normalizing shift value detecting circuit 3, a shift circuit 4 and a rounding process circuit 5. The circuit 3 detects the shift value to normalize the output of the circuit 2 and decides a valid or invalid state of the rounding process. A selection circuit 11 selects the output of the circuit 4 with an invalid rounding process decided by the circuit 3 and then selects the output of the circuit 5 with a valid rounding process respectively to output these outputs as the computing results of the mantissa part. Thus it is possible to omit the rounding process with the output of the circuit 4 decided as the computing result of the mantissa part in the case the rounding process is invalid. As a result, the computing time is shortened by the necessary time and a floating point arithmetic is carried out at a high speed.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は浮動小数点演算回路における正規化処理と丸め
処理に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to normalization processing and rounding processing in a floating point arithmetic circuit.

(従来の技術) 第4図は従来の浮動小数点演算回路の一例を示すブロッ
ク図である(例えば、「昭和61年度電子通信学会総合
全国大会講演論文集nJ(昭6l−3−5)電子通信学
会P2−157)。
(Prior Art) Fig. 4 is a block diagram showing an example of a conventional floating-point arithmetic circuit (for example, ``1986 Institute of Electronics and Communication Engineers Comprehensive National Conference Proceedings nJ (1986 1-3-5) Electronic Communication Conference P2-157).

この浮動小数点演算回路は第1オペランドと第2オペラ
ンドの指数部の大小を比較して桁合わせ処理を行う前処
理部101と、桁合わせ後の仮数部同士の演算を行う仮
数部演算回路102と、仮数部演算回路102の出力を
正規化するためのシフト量を検出する正規化シフト量検
出回路103と、正規化シフト量検出回路103が検出
したシフト量に従い仮数部演算回路102の出力の正規
化処理を行うシフト回路104と、シフト回路104の
出力の丸め処理を行う丸め処理回路105と、指数部の
補正値として正規化シフト量検出回路103の出力値か
または丸め処理回路105の出力値を選択する選択回路
110と、選択回路110の出力に基づき前処理部10
1の出力である指数部の補正を行う指数部演算回路10
6と、指数部演算回路106の出力と丸め処理回路10
5の出力とから最終結果を合成する後処理部107とか
ら構成されている。
This floating point arithmetic circuit includes a preprocessing unit 101 that performs digit alignment processing by comparing the exponent parts of the first and second operands, and a mantissa arithmetic circuit 102 that performs an operation between the mantissa parts after digit alignment. , a normalization shift amount detection circuit 103 that detects a shift amount for normalizing the output of the mantissa calculation circuit 102, and a normalization shift amount detection circuit 103 that detects the shift amount for normalizing the output of the mantissa calculation circuit 102; A shift circuit 104 performs rounding processing on the output of the shift circuit 104, a rounding processing circuit 105 performs rounding processing on the output of the shift circuit 104, and the output value of the normalized shift amount detection circuit 103 or the output value of the rounding processing circuit 105 is used as the correction value of the exponent part. a selection circuit 110 that selects a preprocessor 10 based on the output of the selection circuit 110
Exponent part calculation circuit 10 that corrects the exponent part which is the output of
6, the output of the exponent calculation circuit 106 and the rounding processing circuit 10
5 and a post-processing unit 107 that synthesizes the final result from the outputs of 5.

次にこの浮動小数点演算回路の動作について説明する。Next, the operation of this floating point arithmetic circuit will be explained.

本説明で用いる浮動小数点データ形式は、第2図の(イ
)に示すように浮動小数点数を(−1)s・2°−12
7・(1+f)且つO≦f〈1としたとき、1ピントの
符号部Sと8ビツトの指数部e1及び23ヒ゛ノド絶対
値表現の仮数部fとから成る32ビツトのデータとする
。この32ビット形式の2つのオペランドを以下に述べ
る■〜■の順序で処理する。
The floating point data format used in this explanation is (-1)s・2°-12 floating point numbers as shown in (a) in Figure 2.
7.(1+f) and O≦f<1, the data is 32 bits consisting of a sign part S of 1 pint, an exponent part e1 of 8 bits, and a mantissa part f of 23-bit absolute value representation. These two operands in 32-bit format are processed in the following order.

■ 前処理部101は、両オペランドの指数部の大小を
比較し、指数部の値が小さい方の仮数部を指数部の差分
だけ右シフトする。両オペランドの仮数部は、第2図の
(ロ)に示すように23ビツトの仮数部fの最上位桁に
隠しピノ) ” 1 ’″を付加しさらに1ビツトの拡
張ビットを最下位に付加した25ビツトの中間形式で出
力される。最下位桁の拡張ビットには前記右シフト時に
桁あぶれを起こしたビットが格納される。また同時にこ
のときの指数部の値も出力される。
(2) The preprocessing unit 101 compares the exponent parts of both operands, and shifts the mantissa part with the smaller value of the exponent part to the right by the difference in the exponent parts. As shown in Figure 2 (b), the mantissa parts of both operands are 23-bit mantissa f, with a hidden pinot (1') added to the most significant digit, and a 1-bit extension bit added to the least significant digit. It is output in a 25-bit intermediate format. The least significant bit, the extension bit, stores the bit that caused the digit error during the right shift. At the same time, the value of the exponent part at this time is also output.

■ 仮数部演算回路)02は、この中間形式の仮数部同
士を演算し第2図のe→に示すように中間形式の最上位
桁にオーバフロービットを付加した26ビノトの仮数部
演算結果を得る。
■ Mantissa calculation circuit) 02 calculates the mantissa parts of this intermediate format and obtains a 26-bit mantissa calculation result with an overflow bit added to the most significant digit of the intermediate format as shown in e→ in Figure 2. .

■ 正規化シフト量検出回路103は、前記仮数部演算
結果の上位桁から連続している′0′″の数を検出し、
指数部補正量と正規化シフト量を算出する。
■ The normalization shift amount detection circuit 103 detects the number of consecutive '0''' from the upper digit of the mantissa calculation result,
Calculate the exponent correction amount and normalization shift amount.

■ 正規化シフト量検出回路103の出力に従い、シフ
ト回路104は仮数部演算回路102の出力のシフト処
理を行う。
(2) According to the output of the normalized shift amount detection circuit 103, the shift circuit 104 performs a shift process on the output of the mantissa calculation circuit 102.

■ 丸め処理回路105はシフト回路104の出力に対
し丸め処理を行う。丸め処理において」−1加算の結果
、オーバフローを生じた場合は加算結果を1ビツト右シ
フトした値が丸め処理回路105の出力となり、更に指
数部補正量として°+1”′を出力する。一方オーパフ
ローが生じない場合は+1加算結果が丸め処理回路10
5の出力となり、指数部補正量は正規化シフト量検出回
路103の出力が有効となる。
(2) The rounding processing circuit 105 performs rounding processing on the output of the shift circuit 104. In the rounding process, if an overflow occurs as a result of addition of -1, the value obtained by shifting the addition result to the right by 1 bit becomes the output of the rounding processing circuit 105, and further outputs °+1'' as the exponent part correction amount. If no flow occurs, the +1 addition result is sent to the rounding processing circuit 10.
5, and the output of the normalization shift amount detection circuit 103 becomes effective as the exponent part correction amount.

■ 指数部の補正量とj−で、正規化シフト量検出回路
103の出力か、または丸め処理回路1θ5の出力のど
ちらかを選択回路110で選択する。
(2) Based on the correction amount of the exponent part and j-, the selection circuit 110 selects either the output of the normalization shift amount detection circuit 103 or the output of the rounding processing circuit 1θ5.

■ 指数部演算回路106は選択回路110の出力に従
い前処理部101の出力の指数部を補正する。
(2) The exponent part calculation circuit 106 corrects the exponent part of the output of the preprocessing section 101 according to the output of the selection circuit 110.

■ 後処理部107で指数部演算回路1θ6の出力と丸
め処理回路105の出力を合成し最終結果を得る。
(2) The post-processing unit 107 combines the output of the exponent calculation circuit 1θ6 and the output of the rounding processing circuit 105 to obtain a final result.

(発明が解決しようとする課題) しかしながら、上記構成の浮動小数点演算回路における
演算時間Tは、正規化処理にががる時間をTn 、丸め
処理にかかる時間をTr 、その他の処理時間をTmと
したとき、T=Tm + Tn−h Trとなり、正規
化処理時間及び丸め処理時間にょシ浮動小数点演算時間
が延びるという問題点があった。
(Problem to be Solved by the Invention) However, the calculation time T in the floating point arithmetic circuit with the above configuration is as follows: time required for normalization processing is Tn, time required for rounding processing is Tr, and other processing time is Tm. In this case, T=Tm+Tn-h Tr, which causes a problem in that the normalization processing time and rounding processing time, as well as the floating point calculation time, are extended.

本発明は、以上述べた正規化処理時間と丸め処理時間を
逐次に実行することにより浮動小数点演算時間が延びる
という問題点を除去し、高速な浮動小数点演算回路を提
供することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide a high-speed floating-point arithmetic circuit by eliminating the problem that the floating-point arithmetic time is increased by sequentially executing the normalization processing time and the rounding processing time described above.

(課題を解決するための手段) 本発明は上記目的を達成するため、桁合わせ後の仮数部
同士の演算を行う仮数部演算回路と、前記仮数部演算回
路の出力から該出力を正規化するためのシフト量を検出
する正規化シフト量検出回路と、前記仮数部演算回路の
出力を前記シフト量に従いシフトして正規化するシフト
回路と、前記仮数部演算回路の出力の丸め処理を行う丸
め処理回路と、前記シフト量が丸め処理を無効にする値
であるときは前記シフト回路の出力を選択し、無効にす
る値でないときは前記丸め処理回路の出力を選択して仮
数部演算結果とする選択回路とを備えたものである。
(Means for Solving the Problems) In order to achieve the above object, the present invention includes a mantissa calculation circuit that performs calculations between mantissa parts after digit alignment, and normalizes the output from the output of the mantissa calculation circuit. a normalization shift amount detection circuit for detecting a shift amount for the calculation, a shift circuit for normalizing the output of the mantissa calculation circuit by shifting it according to the shift amount, and a rounding circuit for rounding the output of the mantissa calculation circuit. a processing circuit, and when the shift amount is a value that disables rounding processing, selects the output of the shift circuit, and when the shift amount is not a value that disables rounding processing, selects the output of the rounding processing circuit and converts it into a mantissa operation result. It is equipped with a selection circuit for

(作用) 仮数部演算回路は桁合わせ後の仮数部同士について演算
を行い、その結果を正規化シフト量検出回路、シフト回
路および丸め処理回路に出力する。
(Operation) The mantissa calculation circuit performs calculations on the mantissa parts after digit alignment, and outputs the result to the normalized shift amount detection circuit, the shift circuit, and the rounding processing circuit.

正規化シフト量検出回路は前記出方を正規化するための
シフト量を検出し、丸め処理の有効、無効を判別する。
The normalization shift amount detection circuit detects the shift amount for normalizing the output, and determines whether rounding processing is valid or invalid.

判別は、左へ1ビツト以上シフトするとき、丸め処理が
無効になることに着目して行うことができる。シフト回
路は仮数部演算回路の出力を前記シフト量に従いシフト
し、正規化を行い仮数部を出力する。一方、丸め処理回
路もそれと並列に仮数部演算回路の出力について丸め処
理を行い仮数部を出力する。選択回路は正規化シフト量
検出回路の判別の結果に従い丸め処理が無効の場合には
シフト回路の出力を、有効の場合には丸め処理回路の出
力を選択し、仮数部演算結果として出力する。
The determination can be made by noting that the rounding process becomes invalid when shifting one or more bits to the left. The shift circuit shifts the output of the mantissa calculation circuit according to the shift amount, normalizes it, and outputs the mantissa. On the other hand, the rounding processing circuit also performs rounding processing on the output of the mantissa calculation circuit in parallel and outputs the mantissa. The selection circuit selects the output of the shift circuit when the rounding process is invalid according to the determination result of the normalized shift amount detection circuit, and selects the output of the rounding process circuit when the rounding process is valid, and outputs the result as the mantissa calculation result.

すなわち、丸め処理が無効である場合にはシフト回路の
出力を仮数部演算結果とすることにょシ丸め処理を省略
し、その必要処理時間だけ短縮して浮動小数点演算の高
速化を図るものである。
In other words, when rounding is disabled, the output of the shift circuit is used as the mantissa operation result, omitting rounding, and reducing the necessary processing time to speed up floating-point operations. .

(実施例) 第1図は本発明の実施例を示すブロック図である。すな
わち本実施例は第1オペランドと第2オペランドの指数
部の大小を比較して桁合わせ処理を行う前処理部1と、
桁合わせ後の仮数部同士の演算を行う仮数部演算回路2
と、仮数部演算回路2の出力を正規化するためのシフト
量を検出すると共に指数部補正量を出力する正規化シフ
ト量検出回路3と、正規化シフト量検出回路3が検出し
たシフト量に従い仮数部演算回路2の出力の正規化処理
を行い仮数部を出力するシフト回路4と、仮数部演算回
路2の出力の丸め処理を行い仮数部と指数部補正量とを
出力する丸め処理回路5と、正規化シフト量検出回路3
からの指数部補正量かまたは丸め処理回路5からの指数
部補正量を選択する選択回路10と、選択回路10の出
力に従い前処理部1の出力の指数部の補正を行う指数部
演算回路6と、シフト回路4から出力される仮数部かま
たは丸め処理回路5から出力される仮数部を選択する選
択回路11と、選択回路10の出力と選択回路1ノの出
力とを合成して最終結果を得る後処理部7とから構成さ
れている。
(Embodiment) FIG. 1 is a block diagram showing an embodiment of the present invention. That is, this embodiment includes a preprocessing unit 1 that performs digit alignment processing by comparing the magnitudes of the exponent parts of the first operand and the second operand;
Mantissa calculation circuit 2 that performs calculations between mantissa parts after digit alignment
and a normalization shift amount detection circuit 3 that detects the shift amount for normalizing the output of the mantissa calculation circuit 2 and outputs an exponent correction amount, and according to the shift amount detected by the normalization shift amount detection circuit 3. A shift circuit 4 that normalizes the output of the mantissa calculation circuit 2 and outputs the mantissa; and a rounding circuit 5 that performs rounding of the output of the mantissa calculation circuit 2 and outputs the mantissa and exponent correction amount. and normalized shift amount detection circuit 3
a selection circuit 10 that selects the exponent correction amount from the rounding processing circuit 5 or the exponent correction amount from the rounding processing circuit 5; and an exponent calculation circuit 6 that corrects the exponent part of the output of the preprocessing section 1 according to the output of the selection circuit 10. A selection circuit 11 selects the mantissa output from the shift circuit 4 or the mantissa output from the rounding circuit 5, and the output of the selection circuit 10 and the output of the selection circuit 1 are combined to produce a final result. The post-processing section 7 obtains the following information.

このように、本実施例はシフト回路4と丸め処理回路5
とを並列に構成した点に特徴があり、この点で第4図に
示す従来の浮動小数点演算回路の構成と大きく異ってい
る。
In this way, in this embodiment, the shift circuit 4 and the rounding circuit 5
It is characterized in that it is configured in parallel, and in this point it is greatly different from the configuration of the conventional floating point arithmetic circuit shown in FIG.

次に本実施例の動作について説明する。なお、本実施例
で用いる浮動小数点データ形式は、第4図に示す従来の
浮動小数点演算回路の動作説明で用いた形式と同様であ
るとし、また前処理部1から仮数部演算回路2−!での
動作は既に説明した第4図の前処理部101から仮数部
演算回路102までの動作と同様であるので、本実施例
の動作のうち仮数部演算回路2の出力を得た後からの動
作について説明する。
Next, the operation of this embodiment will be explained. The floating point data format used in this embodiment is the same as the format used in the explanation of the operation of the conventional floating point arithmetic circuit shown in FIG. The operation in is the same as the operation from the preprocessing section 101 to the mantissa calculation circuit 102 in FIG. 4, which has already been explained. The operation will be explained.

まず、最終結果の仮数部を仮数部演算回路2から求める
場合について述べる。正規化処理において左シフト操作
が行われる場合は、下位の桁に順次゛′0”が補われる
。従って、第2図の(ロ)に示すような本実施例におけ
るデータ形式では最下位桁の拡張ビット数が1ビツトで
あることから、1ビツト以上の左シフトが生じると拡張
ビットの値はIf OITとなり、丸め処理は無効にな
る。一方、シフト量がOビットの場合または1ビツト右
シフトする場合には丸め処理が有効となり、丸め処理に
おける+1加算を行うピット位置と1ビツトのシフト処
理の有無を考慮することにより必要とする仮数部、指数
部補正量を得ることができるのでシフト回路4による正
規化シフト処理を無効とすることができる。つまシ、仮
数部演算回路2の出力結果における上位2ビツト(ビッ
ト位置:25゜24)を判別することによシ、正規化シ
フト回路4の出力の仮数部が有効となる場合と丸め処理
回路5の出力の仮数部が有効となる場合とは区別するこ
とができ、これによシ正規化処理と丸め処理とを並列に
実行させることが可能となる。
First, the case where the mantissa part of the final result is obtained from the mantissa calculation circuit 2 will be described. When a left shift operation is performed in the normalization process, the lower digits are supplemented with ``0'' in sequence. Therefore, in the data format of this embodiment as shown in (b) of FIG. Since the number of extension bits is 1 bit, if a left shift of 1 bit or more occurs, the value of the extension bit becomes If OIT, and rounding becomes invalid.On the other hand, if the shift amount is O bits or a 1 bit right shift In this case, rounding processing becomes effective, and the required mantissa and exponent correction amounts can be obtained by considering the pit position where +1 addition is performed in rounding processing and the presence or absence of 1-bit shift processing, so the shift circuit By determining the upper two bits (bit position: 25°24) of the output result of the mantissa calculation circuit 2, the normalization shift processing by the normalization shift circuit 4 can be invalidated. It is possible to distinguish between a case where the mantissa part of the output of the rounding circuit 5 is valid and a case where the mantissa part of the output of the rounding circuit 5 is valid, and thereby the normalization process and the rounding process can be executed in parallel. becomes possible.

前記上位2ビツト(ビット位置:25,24)のパター
ンが°00゛、 ” 01′”、 ” i o″′” 
11 ”の各場合について、第3図に示すデータ形式を
参照しながら以下詳細に説明する。
The pattern of the upper 2 bits (bit positions: 25, 24) is °00゛, "01'", "io"'
11'' will be described in detail below with reference to the data format shown in FIG.

■ 仮数部演算回路2の出力の上位2ビツトがII O
OIIのパターンの場合には、第3図の(イ)に示すよ
うに正規化シフト処理において1ビツト以上(ニー24
ビツト、iは隠しビットのピット位置)の左シフト操作
が行われる。この左シフト操作により下位の桁には1ビ
ツト以上の“0゛′が補われるため丸め処理が無効であ
υ、シフト回路4の出力が有効となる。シフト後のビッ
ト23からビット1がシフト回路4の出力となる。
■ The upper 2 bits of the output of the mantissa calculation circuit 2 are II O
In the case of the OII pattern, as shown in FIG.
A left shift operation is performed on the bit (i is the pit position of the hidden bit). As a result of this left shift operation, the lower digits are supplemented with one or more "0" bits, so the rounding process becomes invalid υ, and the output of shift circuit 4 becomes valid. Bit 1 is shifted from bit 23 after the shift. This becomes the output of circuit 4.

■ 仮数部演算回路2の出力の上位2ビツトが01”′
のノ9ターンの場合には左シフト操作は行われないので
丸め処理回路5の出力が有効となる。
■ The upper 2 bits of the output of mantissa calculation circuit 2 are 01'''
In the case of turn 9, no left shift operation is performed, so the output of the rounding processing circuit 5 is valid.

第3図の(ロ)に示すように最下位ビットに1を加算す
ることによυ丸め処理を行い、その結果、桁上がシが無
く最上位ビット(ビット位置:25)が第3図の()う
に示すように0′″となるときは加算結果のビット23
からビット1が、また桁上がシを生じて最上位ビット(
ビット位置:25)が第3図のに)に示すように1゛′
となるときは加算結果のピント24からビット2が、そ
れぞれ丸め処理回路5の出力となる。
As shown in Figure 3 (b), υ rounding is performed by adding 1 to the least significant bit, and as a result, there is no digit and the most significant bit (bit position: 25) is shown in Figure 3. As shown in (), when the result is 0'', bit 23 of the addition result
bit 1 is generated, and the most significant bit (
Bit position: 25) is 1゛' as shown in Figure 3)
When , bit 2 from pinto 24 of the addition result becomes the output of the rounding processing circuit 5, respectively.

■ 仮数部演算回路の出力の上位2ビツトが”10’″
のパターンの場合には、左シフト操作は行われないので
丸め処理回路5の出力が有効となる。第3図の((ホ)
に示すように拡張ビットに対応する下位2ビツト目(ビ
ット位置:1)に1を加算することによシ丸め処理を行
い、ビット24が′0′であることから桁上りの有無に
関係なく加算結果のビット24からビット2が丸め処理
回路5の出力となる。
■ The upper 2 bits of the output of the mantissa arithmetic circuit are "10'"
In the case of the pattern, the left shift operation is not performed, so the output of the rounding circuit 5 is valid. Figure 3 ((E)
As shown in the figure, rounding is performed by adding 1 to the second lower bit (bit position: 1) corresponding to the extension bit, and since bit 24 is '0', regardless of whether there is a carry or not, Bits 24 to 2 of the addition result become the output of the rounding circuit 5.

■ 仮数部演算回路2の出力の上位2ビツトが11″の
パターンの場合には、左シフト操作は行われないので丸
め処理回路5の出力が有効となる。この場合、第3図(
へ)に示すように下位2ビツト目(ビット位置:l)は
常に0゛′となるためあえて1を加算する必要はなく、
従って仮数部演算回路2の出力のビット24からピント
2がそのまま丸め処理回路5の出力となる。
■ If the upper two bits of the output of the mantissa arithmetic circuit 2 are a pattern of 11'', the left shift operation is not performed and the output of the rounding processing circuit 5 becomes valid. In this case, as shown in FIG.
As shown in ), the second lower bit (bit position: l) is always 0', so there is no need to add 1.
Therefore, the pinto 2 from bit 24 of the output of the mantissa calculation circuit 2 becomes the output of the rounding processing circuit 5 as it is.

次に、最終結果である指数部を前処理部1から求める場
合について説明する。最終結果の指数部は、正規化シフ
ト量検出回路3からの補正量域たは丸め処理回路5から
の補正量を選択回路10により選択し、指数部演算回路
6において前処理部1の出力の指数部を選択した補正量
の値に基づいて補正することにより得るものである。
Next, the case where the exponent part, which is the final result, is obtained from the preprocessing section 1 will be explained. For the exponent part of the final result, the selection circuit 10 selects the correction amount range from the normalized shift amount detection circuit 3 or the correction amount from the rounding processing circuit 5, and the exponent part calculation circuit 6 selects the correction amount range from the normalization shift amount detection circuit 3 or the correction amount from the rounding processing circuit 5. This is obtained by correcting the exponent part based on the value of the selected correction amount.

まず、上述の■の場合には、仮数部演算回路2の出力に
つき(1−24)ビットの左シフト操作が行われシフト
回路4の出力が有効となるので、正規化シフト量検出回
路3から出力される補正値“+ 、−24++が選択回
路10により選択される。
First, in the case of (■) above, a (1-24) bit left shift operation is performed on the output of the mantissa calculation circuit 2 and the output of the shift circuit 4 becomes valid, so the normalized shift amount detection circuit 3 The output correction values "+" and "-24++" are selected by the selection circuit 10.

また、上述の■、■、■の場合には、左シフト操作が行
われないことから丸め処理回路5の出力が有効となるの
で、丸め処理回路5から出力される補正量、すなわちオ
ーバフロービット(ビット位置:25)の値が選択回路
10により選択される。つまり、■の場合には、第3図
の(ハ)に示すように丸め処理における加算後のオーバ
フローピットの値が0″ときはパ0”が、第3図のに)
に示すように加算後のオーバフロービットが1”のとき
は” + 1 ”が補正量として選択される。また■、
■の場合には、第3図の(ホ)、(へ)に示すようにオ
ーバフロービットの値が” 1 ”であるので、” +
 1 ”が補正量として選択される。
In addition, in the cases of ■, ■, and ■ mentioned above, the output of the rounding processing circuit 5 is valid because the left shift operation is not performed, so the correction amount output from the rounding processing circuit 5, that is, the overflow bit ( The value of bit position: 25) is selected by the selection circuit 10. In other words, in the case of ■, as shown in (c) in Figure 3, when the value of the overflow pit after addition in rounding processing is 0'', the value is 0'';
As shown in , when the overflow bit after addition is 1", "+1" is selected as the correction amount. Also, ■,
In the case of ■, the value of the overflow bit is "1" as shown in (e) and (f) of Figure 3, so "+
1'' is selected as the correction amount.

以上、説明したように本実施例では、最終結果の仮数部
としては、上述の■の場合には正規化シフト回路4の出
力が、■、■、■の場合には丸め処理回路5の出力が選
択回路11により選択され後処理部7に供給される。ま
た、最終結果の指数部の補正量としては、■の場合には
正規化シフト量検出回路3の出力値である1−24′′
が、■。
As explained above, in this embodiment, the mantissa part of the final result is the output of the normalization shift circuit 4 in the case of (■) mentioned above, and the output of the rounding processing circuit 5 in the cases of (■, ■, ■) is selected by the selection circuit 11 and supplied to the post-processing section 7. In addition, the correction amount of the exponent part of the final result is 1-24'', which is the output value of the normalized shift amount detection circuit 3 in the case of ■.
But ■.

■、■の場合には丸め処理回路5の出力であるオパフロ
ービノト(ピット位置=25)の値(”0°′または”
1”)に対応して0゛′または°+1′″が選択回路1
0により選択される。
In the case of ■,
1”), 0゛′ or °+1′″ is the selection circuit 1
Selected by 0.

従って、正規化処理と丸め処理とを並列に実行すること
が可能となシ、丸め処理が無効の場合にはこれを省略す
ることにより浮動小数点演算時間を短縮することができ
る。すなわち、正規化処理時間をTn 、丸め処理時間
をTr 、その他の処理時間をTmとした場合、一般に
Tn > Trであるから、選択回路の遅延時間が無視
できるものとすると、浮動小数点演算時間TはTm +
 Tnとなり、従ってT(Tm 十Tn + Trとな
るので、浮動小数点演算時間Tを丸め処理時間Trに相
当する時間短縮することができることとなる。
Therefore, normalization processing and rounding processing can be executed in parallel, and floating point calculation time can be shortened by omitting rounding processing when it is disabled. That is, if the normalization processing time is Tn, the rounding processing time is Tr, and the other processing time is Tm, generally Tn > Tr, so assuming that the delay time of the selection circuit can be ignored, the floating point calculation time T is Tm +
Therefore, since T(Tm + Tn + Tr), the floating point calculation time T can be shortened by the time equivalent to the rounding processing time Tr.

(発明の効果) 以上、詳細に説明したように本発明によれば、仮数部演
算の中間結果を正規化処理する際に丸め処理が無効とな
る正規化シフト量に着目し、その中間結果を分類するこ
とによシ正規化処理と丸め処理とを並列に実行すること
が可能となり、選択回路等の若干のハードウェアを付加
することで浮動小数点演算時間を丸め処理にかかる時間
だけ短縮できる。
(Effects of the Invention) As described in detail above, according to the present invention, when normalizing the intermediate result of the mantissa operation, attention is paid to the normalization shift amount that makes rounding processing invalid, and the intermediate result is By classifying, normalization processing and rounding processing can be executed in parallel, and by adding some hardware such as a selection circuit, floating point calculation time can be reduced by the time required for rounding processing.

本発明は、実施例の説明において用いた浮動小数点ヲ(
−1)s・2e−127・(1+f)且ツ0≦f〈1テ
アルトした32ビツトのデータ形式の場合に限定される
ものではなく、指数部と仮数部とを持つ一般の浮動小数
点データ形式の場合についても適用することができ、同
様の効果が期待できる。
The present invention utilizes floating point numbers (
-1) s・2e−127・(1+f) and 0≦f<1 Not limited to the 32-bit data format with teal, but a general floating point data format with an exponent and a mantissa. It can also be applied to the case of , and similar effects can be expected.

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

第1図は本発明の実施例のブロック図、第2図第3図は
データ形式を示す図、第4図は従来の浮動小数点演算回
路のブロック図である。 1・・・前処理部、2・・・仮数部演算回路、3・・・
正規化シフト量検出回路、4・・・シフト回路、5・・
・丸め処理回路、6・・・指数部演算回路、7・・・後
処理部、10.11・・・選択回路。 特許出願人 沖電気工業株式会社 夕形式 第3図 デ 第1オペランド 第2オペランド 演算結果 従来の浮動/」・数点演算回路 第4図
FIG. 1 is a block diagram of an embodiment of the present invention, FIGS. 2, 3, and 3 are diagrams showing data formats, and FIG. 4 is a block diagram of a conventional floating point arithmetic circuit. 1... Preprocessing section, 2... Mantissa calculation circuit, 3...
Normalized shift amount detection circuit, 4... Shift circuit, 5...
- Rounding processing circuit, 6... exponent part calculation circuit, 7... post-processing section, 10.11... selection circuit. Patent applicant: Oki Electric Industry Co., Ltd. Figure 3: First operand, second operand Operation result Conventional floating/multiple point calculation circuit Figure 4

Claims (1)

【特許請求の範囲】 桁合わせ後の仮数部同士の演算を行う仮数部演算回路と
、 前記仮数部演算回路の出力から該出力を正規化するため
のシフト量を検出する正規化シフト量検出回路と、 前記仮数部演算回路の出力を前記シフト量に従いシフト
して正規化するシフト回路と、 前記仮数部演算回路の出力の丸め処理を行う丸め処理回
路と、 前記シフト量が丸め処理を無効にする値であるときは前
記シフト回路の出力を選択し、無効にする値でないとき
は前記丸め処理回路の出力を選択して仮数部演算結果と
する選択回路とを具備したことを特徴とする浮動小数点
演算回路。
[Scope of Claims] A mantissa calculation circuit that performs an operation between mantissa parts after digit alignment; and a normalization shift amount detection circuit that detects a shift amount for normalizing the output from the output of the mantissa calculation circuit. a shift circuit that shifts and normalizes the output of the mantissa calculation circuit according to the shift amount; a rounding circuit that performs rounding processing of the output of the mantissa calculation circuit; and a shift circuit that performs rounding processing of the output of the mantissa calculation circuit; a selection circuit that selects the output of the shift circuit when the value is a value to be invalidated, and selects the output of the rounding circuit when the value is not an invalid value, and uses the selection circuit as the result of the mantissa operation. Decimal point calculation circuit.
JP1035128A 1989-02-16 1989-02-16 Floating point arithmetic circuit Pending JPH02214931A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1035128A JPH02214931A (en) 1989-02-16 1989-02-16 Floating point arithmetic circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1035128A JPH02214931A (en) 1989-02-16 1989-02-16 Floating point arithmetic circuit

Publications (1)

Publication Number Publication Date
JPH02214931A true JPH02214931A (en) 1990-08-27

Family

ID=12433295

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1035128A Pending JPH02214931A (en) 1989-02-16 1989-02-16 Floating point arithmetic circuit

Country Status (1)

Country Link
JP (1) JPH02214931A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05324270A (en) * 1991-09-25 1993-12-07 Matsushita Electric Ind Co Ltd Method and device for converting format for floating point number
US5831884A (en) * 1994-12-02 1998-11-03 Mitsubishi Denki Kabushiki Kaisha Apparatus for performing arithmetic operation of floating point numbers capable of improving speed of operation by performing canceling prediction operation in parallel

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05324270A (en) * 1991-09-25 1993-12-07 Matsushita Electric Ind Co Ltd Method and device for converting format for floating point number
US5831884A (en) * 1994-12-02 1998-11-03 Mitsubishi Denki Kabushiki Kaisha Apparatus for performing arithmetic operation of floating point numbers capable of improving speed of operation by performing canceling prediction operation in parallel

Similar Documents

Publication Publication Date Title
US8626813B1 (en) Dual-path fused floating-point two-term dot product unit
CA1324217C (en) Pipelined floating point adder for digital computer
KR100264962B1 (en) Combined leading one and leading zero anticipator
JPH07281872A (en) Efficient detection system of floating-point overflow and underflow
US7720898B2 (en) Apparatus and method for adjusting exponents of floating point numbers
US7634527B2 (en) Reciprocal estimate computation methods and apparatus
US7290023B2 (en) High performance implementation of exponent adjustment in a floating point design
US5931896A (en) Floating point addition and subtraction arithmetic circuit performing preprocessing of addition or subtraction operation rapidly
JPH02214931A (en) Floating point arithmetic circuit
JPH0239809B2 (en)
US11366638B1 (en) Floating point multiply-add, accumulate unit with combined alignment circuits
US20180239589A1 (en) Zero detection of a sum of inputs without performing an addition
JPH04350724A (en) Shift extent detecting circuit
EP1282034A2 (en) Elimination of rounding step in the short path of a floating point adder
JP2919386B2 (en) Floating-point detector and floating-point detector
US6581087B1 (en) Floating point adder capable of rapid clip-code generation
US5838601A (en) Arithmetic processing method and arithmetic processing device
JP2517064B2 (en) Denormalized number processing method
JP3174974B2 (en) Floating point arithmetic device and method
JP3555881B2 (en) Arithmetic circuit and its error detection method
JP2723707B2 (en) Normalization circuit
JP3187402B2 (en) Floating point data addition / subtraction circuit
JP3950920B2 (en) Multiply-accumulator and data processing device
JPH08202530A (en) Processor and method for floating decimal point addition and subtraction having before-normalization rounding means
JPH05204606A (en) Floating point arithmetic system and unit