JP3187402B2 - Floating point data addition / subtraction circuit - Google Patents

Floating point data addition / subtraction circuit

Info

Publication number
JP3187402B2
JP3187402B2 JP19284989A JP19284989A JP3187402B2 JP 3187402 B2 JP3187402 B2 JP 3187402B2 JP 19284989 A JP19284989 A JP 19284989A JP 19284989 A JP19284989 A JP 19284989A JP 3187402 B2 JP3187402 B2 JP 3187402B2
Authority
JP
Japan
Prior art keywords
circuit
data
addition
subtraction
mantissa
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
JP19284989A
Other languages
Japanese (ja)
Other versions
JPH0357019A (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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP19284989A priority Critical patent/JP3187402B2/en
Publication of JPH0357019A publication Critical patent/JPH0357019A/en
Application granted granted Critical
Publication of JP3187402B2 publication Critical patent/JP3187402B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、正規化された浮動小数点データの加減算回
路に関するもので、特にデジタル・シグナル・プロセッ
サ(略してDSP)や高位マイコンに使用されるものであ
る。
The present invention relates to a circuit for adding and subtracting normalized floating-point data, and particularly to a digital signal processor (DSP for short) and a high-level circuit. It is used for microcomputers.

(従来の技術) DSPや高位マイコン等、高精度で広いダイナミックレ
ンジを実現する信号処理LSIには、正規化された浮動小
数点データが広く使用されている。ところで上記信号処
理LSIは、高速性が要求されている。その高速化を制限
しているものの1つに、浮動小数点データ加減算回路
(FASUという)がある。
(Prior Art) Normalized floating-point data is widely used in signal processing LSIs that realize a high precision and a wide dynamic range, such as DSPs and high-level microcomputers. Incidentally, the signal processing LSI is required to have high speed. One of the factors that limit the increase in speed is a floating point data addition / subtraction circuit (referred to as FASU).

まず、従来の浮動小数点加減算回路(FASU)について
説明する。
First, a conventional floating point addition / subtraction circuit (FASU) will be described.

第29図に従来のFASUのブロック図を示す。 FIG. 29 shows a block diagram of a conventional FASU.

まず桁合せ回路1により入力Xと入力Yの指数部デー
タを比較して、その差に従い仮数部データの桁合せ操作
を行なう。その時に、指数部の差が仮数部桁合せ桁より
大きい場合、指数部が小なる一方の仮数部データを0に
固定する(0判定回路)。
First, the exponent part data of the input X and the input Y are compared by the digit aligning circuit 1, and the mantissa data is aligned according to the difference. At this time, if the difference between the exponents is larger than the mantissa digit alignment digit, one of the mantissa data having the smaller exponent is fixed to 0 (0 determination circuit).

次に、加減算回路2により、桁合せされた2入力の仮
数部データの加減算を行なう。
Next, the addition / subtraction circuit 2 performs addition / subtraction of the two-input mantissa data that has been digit-aligned.

最後に、正規化回路3により、仮数部の加減算結果か
ら正規化量を見積り、その見積りに従い加減算結果を正
規化する。
Finally, the normalization circuit 3 estimates the amount of normalization from the result of addition and subtraction of the mantissa, and normalizes the result of addition and subtraction according to the estimation.

第30図は、従来の32E6(仮数部32ビット,指数部6ビ
ット)FASUの回路ブロック図である。次にこの回路につ
いて説明する。
FIG. 30 is a circuit block diagram of a conventional 32E6 (mantissa part 32 bits, exponent part 6 bits) FASU. Next, this circuit will be described.

まず減算回路4によって、入力Xの指数部データXE
と、入力Yの指数部データYEとの減算を行なう。その減
算結果に従い仮数部データXMまたはYMを、右方向にシフ
トすることによって桁合せを行なう。その時シフトは、
Xシフタ5、Yシフタ6にて行なわれる。次表にシフト
条件を記載する。
First, the exponent part data XE of the input X is input by the subtraction circuit 4.
With the exponent part data YE of the input Y. Digit alignment is performed by shifting the mantissa data XM or YM to the right according to the result of the subtraction. Then the shift is
This is performed by the X shifter 5 and the Y shifter 6. The following table shows the shift conditions.

次に、桁合せ後の仮数部データXM′とYM′を、命令に
従い、加減算回路7で加算または減算を行なう。上記加
減算回路7にて加減算された出力データの正規化を行な
うための正規化量検出回路8と左シフト回路9と減算回
路10によって正規化回路が構成されている。上記加減算
結果ZM′を回路8に入力し、仮数部データの正規化量を
検出する。その正規化量に従い、仮数部ZM′を左にシフ
トする。また回路10により、正規化量を指数部ZE′から
減算する。その出力結果である仮数部出力ZMと指数部出
力ZEがそれぞれ浮動小数点加減算回路出力となる。
Next, the mantissa data XM 'and YM' after digit matching are added or subtracted by the addition / subtraction circuit 7 according to the instruction. A normalization circuit includes a normalization amount detection circuit 8, a left shift circuit 9, and a subtraction circuit 10 for normalizing the output data added and subtracted by the addition and subtraction circuit 7. The addition / subtraction result ZM 'is input to the circuit 8, and the normalized amount of the mantissa data is detected. The mantissa ZM 'is shifted to the left according to the normalized amount. Further, the circuit 10 subtracts the normalized amount from the exponent part ZE '. The mantissa output ZM and the exponent output ZE, which are the output results, become the outputs of the floating point addition / subtraction circuit.

次に実際に数値を代入してX−Yの減算方法を説明す
る。データ長は、仮数部が32ビット(bit),指数部が
6ビット(bit)とする。下記の仮数部1bit目は符号bit
である。Eの左側は仮数部データ、右側は指数部データ
である。
Next, a method of subtracting XY by actually substituting numerical values will be described. The data length is such that the mantissa part is 32 bits and the exponent part is 6 bits. The first bit of the mantissa below is the sign bit
It is. The left side of E is mantissa data and the right side is exponent data.

上式を求める時、まずXE−YEを求める。 When calculating the above equation, first, XE-YE is determined.

上の計算結果のXE>YE、|XE−YE|=4から、YMを右に
4bitシフトして減算を行なう。
From XE> YE, | XE−YE | = 4 in the above calculation result, YM
Subtract by 4 bit shift.

即ち減算結果ZM′から正規化量を検出する。符号bit
は0で、それから0が1bit連続であるので、正規化量は
D=1つまり1ビットシフトである。
That is, the normalized amount is detected from the subtraction result ZM '. Sign bit
Is 0, and since 0 is continuous for 1 bit, the normalized amount is D = 1, that is, 1 bit shift.

次に正規化量に従い仮数部ZM′を左に1bitシフトす
る。その出力結果ZMが仮数部の出力となる。また指数部
は、「XE−YE>0」であるため、桁合せ回路でXE,YEと
もに、XEの指数部100000に合せ込まれており、ZE′はZ
E′=XE=100000となる。その後正規化量D=1に従
い、仮数部データが左に1bitシフトしたため、指数部デ
ータは1だけ減少する。よって指数部データZEは、0111
11となる。
Next, the mantissa part ZM 'is shifted one bit to the left according to the normalization amount. The output result ZM is the output of the mantissa. Since the exponent part is “XE−YE> 0”, both XE and YE are adjusted to the exponent part 100000 of XE by the digit matching circuit, and ZE ′ is Z
E '= XE = 100000. After that, the mantissa data is shifted to the left by 1 bit according to the normalization amount D = 1, so that the exponent data decreases by one. Therefore, the exponent part data ZE is 0111
It becomes 11.

この場合XE=100000,YE=011111で、これら両者は1bi
tちがいだから、桁合せのため、YMを右1bitシフトす
る。
In this case, XE = 100000 and YE = 011111.
Since t is different, YM is shifted right by 1 bit for digit alignment.

ここでZM′=00000100…000,ZE′=100000であり、Z
M′より正規量を見積る。符号bitのあとに0が4個だか
らD=4である。即ちZM′を左へ4bitシフトし、ZE′を
4減少する。つまりZM=01000000…000,ZE=011100とな
る。
Here, ZM '= 00000100 ... 000, ZE' = 100000 and Z
Estimate the normal quantity from M '. Since there are four 0s after the sign bit, D = 4. That is, ZM 'is shifted to the left by 4 bits, and ZE' is reduced by 4. That is, ZM = 01000000 ... 000 and ZE = 011100.

の場合は、XE−YE=2だから、桁合せすると、 これを正規化すると(1bitシフト) Z=010011…10 E 011111 となる。 In the case of, since XE−YE = 2, When this is normalized (one-bit shift), Z = 010011... 10 E 0111111 is obtained.

第31図は従来の仮数部31bit、指数部6bitの浮動小数
点加減算回路のブロック図である。次にこの回路につい
て説明する。ここではXシフタ5、Yシフタ6、減算回
路4等に含まれていた0固定回路12,13、0判定回路1
4、シフト量検出回路15等を取り出して示してある。
FIG. 31 is a block diagram of a conventional floating point addition / subtraction circuit having a 31-bit mantissa part and a 6-bit exponent part. Next, this circuit will be described. Here, the 0 fixed circuits 12, 13 and the 0 determination circuit 1 included in the X shifter 5, the Y shifter 6, the subtraction circuit 4, etc.
4. The shift amount detection circuit 15 and the like are extracted and shown.

この回路は、まず、減算回路4によって入力Xの指数
部データXEと、入力Yの指数部データYEとの差を求め、
その結果に従い仮数部データXMまたはYMを右方向にシフ
トすることによって桁合せを行なう。その時のシフトは
Xシフト回路5、Yシフト回路6にて行なわれる。その
時のシフト量と条件を第32図に記載する。
In this circuit, first, the difference between the exponent part data XE of the input X and the exponent part data YE of the input Y is obtained by the subtraction circuit 4,
Digit alignment is performed by shifting the mantissa data XM or YM to the right according to the result. The shift at that time is performed by the X shift circuit 5 and the Y shift circuit 6. FIG. 32 shows the shift amounts and conditions at that time.

次に、桁合せの後の仮数部データXM′とYM′を、命令
に従い31bit加減算回路7により加減算を行なう。
Next, the mantissa data XM 'and YM' after the digit alignment are added / subtracted by the 31-bit addition / subtraction circuit 7 according to the instruction.

最後に、加減算回路7の出力結果に従い、出力データ
の正規化を行なう。まず、31bit加減算回路7の出力結
果を入力とし、正規化量検出回路8によって正規化量を
検出する。その値に従い仮数部を左シフトし、それをZM
とする。また、減算回路10により正規化量を指数部ZE′
から減算し、その結果をZEとする。その出力結果ZMとZE
を、浮動小数点加減算回路の出力結果とする。
Finally, the output data is normalized according to the output result of the addition / subtraction circuit 7. First, the output result of the 31-bit addition / subtraction circuit 7 is input, and the normalization amount detection circuit 8 detects the normalization amount. Shift the significand to the left according to that value, and convert it to ZM
And Further, the normalized amount is calculated by the subtraction circuit 10 into the exponent part ZE ′.
, And the result is ZE. The output results ZM and ZE
Is the output result of the floating point addition / subtraction circuit.

(発明が解決しようとする課題) 第30図のデータ長32E6の浮動小数点加減算回路は、入
力データとしては、32E6の正規化入力信号XとYと、加
算,減算を選択する演算命令があり、出力に関しては、
入力信号X,Yを、演算命令に従い、加減算を行なった結
果Zを出力する。
(Problems to be Solved by the Invention) The floating-point addition / subtraction circuit having a data length of 32E6 shown in FIG. 30 includes, as input data, normalized input signals X and Y of 32E6 and an operation instruction for selecting addition or subtraction. As for the output,
The result Z obtained by adding and subtracting the input signals X and Y according to the operation instruction is output.

前述しているように入力信号X,Yを入れてから計算出
力Z(ZEとZM)が出てくるまでに、直列に次の回路を通
る。
As described above, after the input signals X and Y are input, before the calculation outputs Z (ZE and ZM) are output, the signal passes through the next circuit in series.

1) 6bitの減算回路4からシフト量を算出する。1) The shift amount is calculated from the 6-bit subtraction circuit 4.

2) 上記1)の結果から31bit(5段)のシフタ5,6を
通る。
2) From the result of the above 1), the signal passes through shifters 5 and 6 of 31 bits (5 stages).

3) 上記2)の結果を32bitの、加減算回路7で計算
する。
3) The result of the above 2) is calculated by a 32-bit addition / subtraction circuit 7.

4) 計算結果「32bit+キャリー」を入力として、5bi
t出力する正規化量算出のエンコーダ回路8を通る。
4) Input the calculation result "32bit + carry" and input 5bi
The signal passes through the encoder circuit 8 for calculating the normalized amount to be output.

5) エンコーダ8により検出された正規化量に従い、
仮数部データをシフトする31bit(5段)のシフタ9を
通る。
5) According to the normalized amount detected by the encoder 8,
The data passes through a 31-bit (5-stage) shifter 9 for shifting the mantissa data.

5)′エンコーダ8により検出された正規化量に従い、
指数部データを削減させる6bit減算回路10を通る。
5) ′ According to the normalized amount detected by the encoder 8,
It passes through a 6-bit subtraction circuit 10 for reducing exponent data.

以上浮動小数点加減算回路は、1)〜5)、または
1)〜4),5)′を直列に信号が流れるため、演算速度
が遅くなる欠点があり、信号処理LSIの高速化を制限す
る原因の1つになっている。
As described above, the floating-point addition / subtraction circuit has a drawback that the operation speed is slow because the signal flows in series 1) to 5) or 1) to 4), 5) ', and this limits the speeding up of the signal processing LSI. It has become one of.

また第31図の従来のFASUでは、加減算時において、2
入力指数部の差が仮数部データの桁数以上、つまりシフ
ト量以上の時はシフト不可となり、加減算回路入力YE′
またはXM′の指数部の小なる数の仮数部データを0に固
定して、加減算を行なっている(第32図)。
In addition, in the conventional FASU shown in FIG.
When the difference between the input exponents is equal to or greater than the number of digits of the mantissa data, that is, when the shift amount is equal to or greater than the shift amount, the shift cannot be performed.
Alternatively, addition and subtraction are performed by fixing the mantissa data of a small number of the exponent part of XM 'to 0 (FIG. 32).

このため、浮動小数点加減算回路(FASU)の演算経路
のクリティカルパスに、減算回路4の出力結果からXMま
たはYMを0に固定するための0判定回路14と、31bit加
減算回路7の入力信号XM′またはYM′を、0判定回路14
の出力結果に従い、オール“0"に固定するための0固定
回路12,13が挿入されている。これは、浮動小数点加減
算回路のゲート段数の増加を意味しており、高速化のさ
またげになっている。
Therefore, a 0 determination circuit 14 for fixing XM or YM to 0 based on the output result of the subtraction circuit 4 and an input signal XM ′ of the 31-bit addition / subtraction circuit 7 are provided on the critical path of the operation path of the floating-point addition / subtraction circuit (FASU). Alternatively, YM 'can be
According to the output result of (1), 0 fixing circuits 12, 13 for fixing all to "0" are inserted. This means an increase in the number of gate stages of the floating point addition / subtraction circuit, which hinders speeding up.

また第31図の浮動小数点加減算回路では、正規化回路
において、仮数部加減算回路7の出力結果から正規化量
を検出しているため、正規化、つまり仮数部の正規化量
分の左シフトと指数部の正規化量分の減算が、仮数部の
加減算結果が検出されるまで行なわれず、高速化が難し
かった。
In the floating-point addition / subtraction circuit of FIG. 31, since the normalization circuit detects the normalization amount from the output result of the mantissa addition / subtraction circuit 7, the normalization, that is, the left shift by the normalization amount of the mantissa part is performed. Subtraction by the normalized amount of the exponent part is not performed until the result of addition / subtraction of the mantissa is detected, making it difficult to increase the speed.

そこで本発明の目的は、前記従来のものより高速化が
可能となる浮動小数点データ加減算回路を提供すること
にある。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a floating-point data addition / subtraction circuit which can operate at a higher speed than the conventional one.

[発明の構成] (課題を解決するための手段と作用) 本発明は、少くとも第1、第2の仮数部データ演算経
路を有し、前記第1の仮数部データ演算経路は、所定の
桁数の桁合せ機能を有し、この所定の桁数の範囲内で指
数部データの差に応じて仮数部データの桁合せを行なう
桁合せ回路と、該回路により桁合せされた仮数部データ
の加算または減算を行なう加減算回路と、該回路での演
算結果から正規化量を検出する正規化量検出回路と、前
記正規化量に応じて仮数部データの正規化を行なう正規
化用シフタとを有し、前記第2の仮数部データ演算経路
は、入力オペランドスルーの経路と入力オペランドの符
号反転回路を有し、前記第1、第2の仮数部データ演算
経路を並列に動作させ、浮動小数点データの加算命令時
において、指数部の差が仮数部桁合せ桁数より大きい
時、指数部が大であるオペランドのスルーデータを加減
算結果とし、浮動小数点データの減算命令時において、
指数部の差が仮数部桁合せ桁数より大きい時、2つのオ
ペランド内の被減数が大である時は被減数側のスルーデ
ータを、減数が大である時は減数側の符号反転データ
を、加減算結果とするものであり、指数部データの差に
応じて前記第1、第2の仮数部データ演算経路の出力を
選択することを特徴とする浮動小数点データ加減算回路
である。
The present invention has at least first and second mantissa data operation paths, and the first mantissa data operation path includes a predetermined mantissa data operation path. A digit aligning circuit having a digit aligning function for performing digit alignment of mantissa data in accordance with a difference between exponent data within a predetermined digit range; and mantissa data adjusted by the circuit. An addition / subtraction circuit for performing addition or subtraction, a normalization amount detection circuit for detecting a normalization amount from an operation result of the circuit, and a normalization shifter for normalizing mantissa data in accordance with the normalization amount. Wherein the second mantissa data operation path has an input operand through path and an input operand sign inverting circuit, and operates the first and second mantissa data operation paths in parallel, When adding decimal point data, During but larger mantissa digits combined digits, through data operand exponent is larger as addition and subtraction result at the time of subtraction instruction of floating point data,
When the difference between the exponents is greater than the number of digits for the mantissa, the through data on the minuend is added when the minuend in the two operands is large, and the sign-reversed data on the minuend is added or subtracted when the minuend is large. A floating-point data addition / subtraction circuit, wherein the output of the first and second mantissa data operation paths is selected according to the difference between the exponent data.

また、本発明は、指数部データの差に応じて仮数部デ
ータの桁合せを行なう桁合せ回路と、該回路により桁合
せされた仮数部データの加算または減算を行なう加減算
回路と、該回路での演算前の仮数部データの各ビットの
一部とその前後の数ビットを用いて、桁上がり信号を伴
わずに論理演算し、その演算結果からフラグを立て、そ
れを正規化量エンコード回路の入力とする正規化量検出
回路と、該回路の出力に応じて前記加減算回路からの仮
数部データの正規化を行なう正規化用シフタと、該シフ
タの出力から該出力データを右または左へ1ビットシフ
トするか否かを選択する手段とを具備したことを特徴と
する浮動小数点データ加減算回路である。
The present invention also provides a digitizing circuit for performing digit alignment of mantissa data in accordance with a difference between exponent data, an addition / subtraction circuit for adding or subtracting mantissa data aligned by the circuit, Using a part of each bit of the mantissa data before the operation and several bits before and after the operation, a logical operation is performed without a carry signal, a flag is set from the operation result, and the flag is set by the normalization amount encoding circuit. A normalization amount detection circuit as an input, a normalization shifter for normalizing the mantissa data from the addition / subtraction circuit in accordance with the output of the circuit, and a right or left one of the output data from the output of the shifter Means for selecting whether or not to perform a bit shift.

即ち本発明は、従来技術のデータの流れに対して、あ
る条件を加味した複数のデータパスを設け、それぞれを
浮動小数点データによって、選択的に制御,選択する事
によって、各データパス系の回路機能を単純にし、回路
のゲート段数の減少を企てる。また本発明は、従来技術
における0判定回路および0固定回路による処理速度の
低下を軽減するため、桁合せのために生じるシフト量に
よって選択される少くとも2系統の演算回路を設け、こ
れらの演算結果を選択することで、高速性を実現してい
る。即ち指数部の減算によって仮数部のシフト量が仮数
部の桁数未満である時は、従来技術と同様の加減算回路
の演算結果が選択される。ただし、この回路には0固定
回路は付加されていない。つまり、指数部の小さい方の
データの仮数部を、指数部の減算結果分右シフトし加減
算を行ない、その後正規化をする。また、指数部の減算
によって仮数部のシフト量が仮数部の桁数以上である時
は、データスルーもしくは符号反転の回路が選択され
る。上記の2系統の回路は並列に処理され、指数部入力
により最後に選択される。
That is, the present invention provides a plurality of data paths in consideration of a certain condition with respect to the data flow of the prior art, and selectively controls and selects each of the data paths with floating-point data. The function is simplified and the number of gate stages of the circuit is reduced. Further, in order to reduce the reduction in processing speed due to the 0 decision circuit and the 0 fixing circuit in the prior art, at least two operation circuits selected by a shift amount generated for digit alignment are provided. High speed is realized by selecting the result. That is, when the shift amount of the mantissa part is smaller than the number of digits of the mantissa part due to the subtraction of the exponent part, the operation result of the addition / subtraction circuit similar to the conventional technique is selected. However, a 0 fixed circuit is not added to this circuit. In other words, the mantissa part of the data with the smaller exponent part is shifted right by the subtraction result of the exponent part, and is subjected to addition / subtraction, and then normalization is performed. When the shift amount of the mantissa is greater than or equal to the number of digits of the mantissa due to the subtraction of the exponent, a data through or sign inversion circuit is selected. The above two circuits are processed in parallel, and are finally selected by the exponent input.

また本発明では、正規化回路において正規化量を桁合
せ後のデータ、すなわち仮数部加減算回路の入力データ
から検出することを特徴としている。正規化量の検出、
および正規化に費やされる処理のほとんどは、仮数部加
減算回路の入力データを用いることにより、仮数部加減
算と並列に処理される。
Further, the present invention is characterized in that the normalization circuit detects the normalization amount from the data after digit matching, that is, the input data of the mantissa addition / subtraction circuit. Detection of normalized amount,
Most of the processing used for normalization is performed in parallel with mantissa addition / subtraction by using input data of a mantissa addition / subtraction circuit.

また本発明では、仮数部データの加減算回路の出力が
オーバーフローした時、1ビット右シフトする回路を正
規化用シフタから取り出し、これらを並列に選択使用す
ることにより、ゲート段数を減らし、高速化をはかって
いる。
Further, in the present invention, when the output of the adder / subtractor circuit for the mantissa data overflows, a circuit that shifts right by one bit is taken out from the normalization shifter, and these are selectively used in parallel, thereby reducing the number of gate stages and increasing the speed. I am wearing it.

(実施例) 以下図面を参照して本発明の実施例を説明する。第1
図はこの発明の途中の過程で考えられた浮動小数点デー
タ加減算回路の構成図であり、経路Aは、桁合せ回路2
1、加減算回路22、±1bitシフトの正規化回路23よりな
る。経路Bは、最大1bitシフトの桁合せ回路24、加減算
回路25、正規化回路26よりなる。経路A,Bは、セレクタ
回路27への制御信号Cで、いずれかが選択され、それが
出力Zとなる。
Embodiment An embodiment of the present invention will be described below with reference to the drawings. First
FIG. 1 is a configuration diagram of a floating-point data addition / subtraction circuit considered in the course of the present invention.
1, an addition / subtraction circuit 22, and a ± 1 bit shift normalization circuit 23. The path B includes a digit aligning circuit 24 for shifting up to 1 bit, an adding / subtracting circuit 25, and a normalizing circuit 26. The paths A and B are selected by the control signal C to the selector circuit 27, and the selected signal is the output Z.

正規化された2つの浮動小数点信号の仮数部条件は、 010000……000≦XM≦0111……111 …(1) 010000……000≦YM≦0111……111 …(2) である。ここでは簡単のためXM,YMが両方とも正の場合
について説明するがXM,YMが2の補数表現であることを
考慮すれば、XM,YMの片方または両方が負である場合も
同様に説明できる。ここでXM(XM>0の場合)の左辺及
び右辺の最上位ビットの重みは「1」,次の桁の重みは
「1/2」,次の桁の重みは「1/4」,…であり、YMについ
ても同様である。従って(1)式のXMの左辺及び(2)
式のYMの左辺は、共に「1/2」を表わしている。またXM
の右辺及びYMの右辺は、共に最下位ビット分だけ「1」
より小さい数を表わしている。
The mantissa conditions of the two normalized floating-point signals are 010000... 000 ≤ XM ≤ 0111 ...... 111 (1) 010000 ... 000 ≤ YM ≤ 0111 ... 111 (2) Here, for the sake of simplicity, the case where both XM and YM are positive will be described. However, considering that XM and YM are two's complement expressions, the same description applies when one or both of XM and YM are negative. it can. Here, the weight of the most significant bit on the left and right sides of XM (when XM> 0) is “1”, the weight of the next digit is “1/2”, the weight of the next digit is “1/4”,. The same applies to YM. Therefore, the left side of XM in equation (1) and (2)
Both the left sides of YM in the equation represent "1/2". Also XM
Are both "1" for the least significant bit.
Represents a smaller number.

(5)式から、YMを2bit以上右にシフトした時、 となり、正規化は、高々1以下となる。換言すれば
「1」の場合1bitシフト,「0」の場合シフトなしであ
る。また(6)式から、XMを2bit以上右へシフトした場
合、 となり、正規化量は高々1以下となる。
From equation (5), when YM is shifted to the right by 2 bits or more, And the normalization is at most 1 or less. In other words, "1" means 1-bit shift, and "0" means no shift. From equation (6), if XM is shifted to the right by 2 bits or more, And the normalized amount is at most 1 or less.

以上の結果から、2bit以上の正規化シフトが必要な条
件としては、桁合せ量(指数部の値による仮数部どうし
の桁合せ量)が1bit以下つまり|XE−YE|≦1の時であ
る。
From the above results, the condition that the normalized shift of 2 bits or more is required is when the amount of alignment (the amount of alignment of the mantissa between the exponents) is 1 bit or less, ie, | XE−YE | ≦ 1. .

第1図の回路は、2つの加減算経路A,Bを設け、Aは
従来の桁合せ回路を持っているが、正規化量が高々1bit
であり、Bは、桁合せが1bit以下であるが、従来の正規
化回路を持っている。この信号経路Aの出力とBの出力
を別々に求め、最後にAの出力またはBの出力を信号C
で選択する。その時の信号Cによる選択条件として、2
入力信号の差|XE−YE|≦1を使用する。以上の特徴によ
って、高速化を実現できることは後述する。
The circuit of FIG. 1 is provided with two addition and subtraction paths A and B, and A has a conventional alignment circuit, but the normalized amount is at most 1 bit.
And B has a conventional normalization circuit although the digit alignment is 1 bit or less. The output of the signal path A and the output of B are obtained separately, and finally the output of A or the output of B is
To select. As a selection condition by the signal C at that time, 2
Use the difference | XE−YE | ≦ 1 of the input signals. It will be described later that high speed can be realized by the above features.

第2図は第1図の具体例である。 FIG. 2 is a specific example of FIG.

1)信号経路Aについては、 (i)2入力信号の指数部の差「XE−YE」を減算回路31
で算出する。その差に従い、Xシフタ211,Yシフタ212
より、XMまたはYMを右にシフトする事で桁合せを行な
う。ただし、条件として、「XE−YE>31」の時はYM=0
とする。「XE−YE<−31」の時はXM=0とする。これら
は共にシフト範囲をこえた時である。
1) For the signal path A, (i) subtracting the difference “XE−YE” between the exponents of the two input signals into the subtraction circuit 31
Is calculated by Accordance with the difference, the X shifters 21 1, Y shifter 21 2 performs digit combined by shifting the XM or YM right. However, as a condition, when “XE−YE> 31”, YM = 0
And When “XE−YE <−31”, XM = 0. These are when the shift range is exceeded.

(ii)上記(i)によって、桁合せ後の仮数部データY
M′1とYM′1を、加算又は減算命令によって加減算回
路22で加算又は減算する。また指数部データの大きい方
をセレクタ32でセレクトし、これをZE′として減算回路
34へ出力する。
(Ii) According to (i) above, the mantissa data Y after digit alignment
M′1 and YM′1 are added or subtracted by the addition / subtraction circuit 22 according to an addition or subtraction instruction. Also, the larger exponent part data is selected by the selector 32, and this is set as ZE 'and the subtraction circuit is used.
Output to 34.

(iii)加減算回路22の出力結果ZM′1を、±1bit正規
化用エンコーダ33に入力し、ZM′1の上位数ビットから
左又は右1bitシフト制御信号を出力する。そのシフト制
御信号に従い左右1bitシフタ23によって正規化を行な
う。このシフタ23の出力を信号経路Aの仮数部出力ZM1
とする。
(Iii) The output result ZM'1 of the addition / subtraction circuit 22 is input to the ± 1 bit normalization encoder 33, and a left or right 1 bit shift control signal is output from the upper several bits of ZM'1. Normalization is performed by the left and right 1-bit shifters 23 according to the shift control signal. The output of the shifter 23 is output to the mantissa output ZM1 of the signal path A.
And

ここで、ZM′1の正規化量が、±1bit以上になる可能
性はあるが、その時の出力セレクタ27は、経路Bを選択
するので、don't Care(関係なし)である。
Here, there is a possibility that the normalized amount of ZM'1 becomes ± 1 bit or more, but since the output selector 27 selects the path B, it is “don't care” (no relation).

2)次に信号経路Bについては、 (i)2入力信号の指数部下位2bitつまりXE1,XE0,YE1,
YE0を入力として、第3図に従い、1bitシフタ241または
242でXMまたはYMを1bit右にシフトする。第3図で
「X」は不定の意味である。第6図は第5図のカルノー
マップをもとに設計した信号XS(Xシフト),YS(Yシ
フト)の発生回路である。
2) Next, regarding the signal path B, (i) the lower 2 bits of the exponent part of the two input signals, that is, XE1, XE0, YE1,
As input YE0, according FIG. 3, 1bit shifter 24 1 or
24 2 shifts XM or YM right by 1 bit. In FIG. 3, "X" has an undefined meaning. FIG. 6 shows a circuit for generating signals XS (X shift) and YS (Y shift) designed based on the Carnot map of FIG.

(ii)上記(i)により、桁合せ後の仮数部データXM′
2とYM′2を、加算又は減算命令によって、加減算回路
25で加減算する。
(Ii) According to (i) above, mantissa data XM 'after digit alignment
2 and YM'2 are added or subtracted by an addition or subtraction instruction.
Add or subtract 25.

(iii)加減算回路25の出力結果ZM′2に対し、正規化
量検出回路35によって正規化量を検出する。その検出結
果に従って、31bit左シフタ26によってシフトする事で
正規化を行なう。そのシフタ26の出力を信号経路Bの仮
数部データZM2とする。
(Iii) A normalization amount is detected by the normalization amount detection circuit 35 for the output result ZM'2 of the addition / subtraction circuit 25. According to the detection result, normalization is performed by shifting by the 31-bit left shifter 26. The output of the shifter 26 is used as the mantissa data ZM2 of the signal path B.

3)次に仮数部出力結果ZM1,ZM2及び正規化量結果M1ま
たは、M2の選択用セレクタ27,セレクタ36の制御信号の
選択条件は、第4図によって求まる。
3) Next, the mantissa output results ZM1 and ZM2 and the normalized amount result M1 or the selection condition of the control signals of the selectors 27 and 36 for selecting M2 are determined by FIG.

入力信号XM,YMの符号bit、加減算命令、指数部XE,YE
の減算結果によって、第7図の如く選択信号Cが作ら
れ、それに従いセレクタ27,セレクタ36で出力結果が選
択され、出力される。
Sign bit of input signal XM, YM, addition / subtraction instruction, exponent part XE, YE
7, the selection signal C is generated as shown in FIG. 7, and the selector 27 and the selector 36 select and output the output result accordingly.

上記第2図の回路によれば次の利点がある。 The circuit of FIG. 2 has the following advantages.

即ち第30図の如く、従来の32E6の浮動小数点の加減算
においては、その信号経路が、まず6bit減算回路4によ
って指数部の差を求め、指数部の差に従い、Xシフタ5
またはYシフタ6(31bitシフタ)により、桁合せを行
なう。そのデータを32bit加減算回路7にて加減算し、
その加減算結果を用いて正規化量を検出し、この正規化
量に従い、シフタ9でシフトを行なう。その時のデータ
の回路遅延は、 (1) 6bit減算回路4→5段シフト回路5または6→
32bit加減算回路7→−1bit,+31bitエンコーダ8→5
段シフト回路9 となる。
That is, as shown in FIG. 30, in the conventional 32E6 floating-point addition / subtraction, the signal path first obtains the difference of the exponent part by the 6-bit subtraction circuit 4, and according to the difference of the exponent part, the X shifter 5
Alternatively, digit alignment is performed by a Y shifter 6 (31-bit shifter). The data is added and subtracted by a 32-bit addition / subtraction circuit 7,
A normalization amount is detected using the result of the addition and subtraction, and the shifter 9 shifts according to the normalization amount. The data circuit delay at that time is as follows: (1) 6-bit subtraction circuit 4 → five-stage shift circuit 5 or 6 →
32bit addition / subtraction circuit 7 → -1bit, + 31bit encoder 8 → 5
The stage shift circuit 9 is obtained.

一方、第2図の回路では、 (2) 6bit減算回路31→5段シフト回路211または212
→32bit加減算回路22→±1bitエンコーダ33→1段シフ
ト回路23→セレクト回路27 または、 (3) 4入力制御回路(第6図)→1段シフト回路24
1または242→32bit加減算回路25→+31bitエンコーダ25
→5段シフト回路26→セレクト回路27 回路遅延は、信号パス(2),(3)の遅い方になる。
明らかに(2),(3)は、(1)に比べゲート段数が
少く、高速性が実現できる。
On the other hand, in the circuit of FIG. 2, (2) 6bit subtraction circuit 31 → 5-stage shift circuit 21 1 or 21 2
→ 32 bit addition / subtraction circuit 22 → ± 1 bit encoder 33 → 1-stage shift circuit 23 → select circuit 27 or (3) 4-input control circuit (Fig. 6) → 1-stage shift circuit 24
1 or 24 2 → 32-bit addition / subtraction circuit 25 → + 31-bit encoder 25
→ 5-stage shift circuit 26 → select circuit 27 The circuit delay is the slower of the signal paths (2) and (3).
Obviously, (2) and (3) have a smaller number of gate stages than (1) and can achieve high speed.

第8図は従来の第31図を改良した本発明の実施例で、
これは仮数部31bit,指数部6bitのFASUに適用したもので
ある。第9図(a)は一般的な1bit減算器のブロック
図、第9図(b)はその真理値表、第9図(c)は同回
路図、第10図は第9図の1bit減算器を利用した減算回路
4及び0判定回路14の回路図、第11図(a),第12図は
従来のXシフト回路,Yシフト回路図、第11図(b)は回
路部51のブロック図、第11図(c)は同詳細回路図、第
13図,第14図は第8図のXシフト回路5,Yシフト回路6
を示す。
FIG. 8 shows an embodiment of the present invention obtained by improving the conventional FIG. 31.
This is applied to FASU with 31 bits of mantissa and 6 bits of exponent. 9 (a) is a block diagram of a general 1-bit subtractor, FIG. 9 (b) is a truth table thereof, FIG. 9 (c) is a circuit diagram thereof, and FIG. 10 is 1-bit subtraction of FIG. 11 (a) and FIG. 12 are diagrams of a conventional X shift circuit and Y shift circuit, and FIG. 11 (b) is a block diagram of a circuit section 51. FIG. 11 (c) is the detailed circuit diagram of FIG.
13 and 14 show the X shift circuit 5 and the Y shift circuit 6 in FIG.
Is shown.

第8図において41〜44はセレクタで、それぞれ選択入
力(C1,C2)が“1"の時、A0〜A3側の入力が選択され、
選択入力が“0"の時、他方の入力が選択される。45はPM
スルー/−PM回路であり、この回路45は、Xの仮数部XM
側が選択されるかまたは加算(X+Y)の時にセレクタ
41の出力PMをスルーし、Yの仮数部YM側が選択されかつ
減算(X−Y)の時にセレクタ41の出力PMを反転して出
力する。この第8図では、 (1) 入力データの指数部の差の絶対値|XE−YE|を減
算回路4によって検出し、これが31未満の時は最終的に
以下の回路が選択される。
In FIG. 8, 41 to 44 are selectors, and when the selection inputs (C 1 , C 2 ) are “1”, the inputs on the A 0 to A 3 side are selected,
When the selection input is "0", the other input is selected. 45 is PM
This is a through / −PM circuit, and this circuit 45 is a mantissa XM of X
Selector when side is selected or added (X + Y)
The output PM of the selector 41 is passed through and the output PM of the selector 41 is inverted and output when the mantissa YM side of Y is selected and subtraction (XY) is performed. In FIG. 8, (1) the absolute value | XE-YE | of the difference between the exponents of the input data is detected by the subtraction circuit 4, and when this is less than 31, the following circuit is finally selected.

まず、桁合せのため、XE−YEの値によって仮数部XM,Y
Mに対し、第15図に示すシフトを行なう。
First, for digit alignment, the mantissa part XM, Y is determined by the value of XE−YE.
The shift shown in FIG. 15 is performed on M.

つまり0固定は行なわず、また|XE−YE|≧31の範囲で
はデータは保証しなくて良い。
That is, 0 is not fixed, and data need not be guaranteed in the range of | XE-YE | ≧ 31.

次に、上記のシフタで得られた仮数部XM′、YM′に対
して、31bit加減算回路7により演算を行なう。
Next, the mantissa parts XM 'and YM' obtained by the shifter are operated by the 31-bit addition / subtraction circuit 7.

次に、上記の加減算回路7によって得られた仮数部Z
M′を正規化するために、正規化量検出回路8によって
正規化量を検出する。ここで正規化量検出回路8は、仮
数部ZM′を入力とし、上位bitを優先するプライオリテ
ィー・エンコーダである。
Next, the mantissa part Z obtained by the above addition / subtraction circuit 7
In order to normalize M ′, a normalization amount is detected by a normalization amount detection circuit 8. Here, the normalization amount detection circuit 8 is a priority encoder that receives the mantissa part ZM ′ and gives priority to the upper bits.

上記正規化量で仮数部ZM′を左シフトしたものを仮数
部出力とする。
The mantissa part ZM 'is shifted to the left by the above-mentioned normalized amount, and is set as the mantissa part output.

減算回路10によって、指数部データXEおよびYEの大き
い方から、上記正規化量を差し引いて、これを指数部出
力B3とする。
By the subtraction circuit 10, from the larger exponent part data XE and YE, by subtracting the normalization amount, which is an exponent output B 3.

(2) 減算回路4の出力|XE−YE|が31以上の時は、最
終的に以下の回路が選択される。
(2) When the output | XE−YE | of the subtraction circuit 4 is 31 or more, the following circuit is finally selected.

この回路は、セレクタ41およびPMスルー/−PM回路45
からなり、第16図に示す演算結果が出力される。
This circuit comprises a selector 41 and a PM through / -PM circuit 45.
And the operation result shown in FIG. 16 is output.

この第16図において「命令」とはX+Y,X−Yのこと
であり、「加算及び減算」とは、加算の場合でも減算の
場合でもという意味である。
In FIG. 16, the "instruction" means X + Y, XY, and the "addition and subtraction" means both addition and subtraction.

(3) 前述した通り、最後に上記(1)および(2)
の出力が、減算回路4の演算結果から0判定回路14によ
り選択され、これを出力ZMおよびZEとする。
(3) As described above, finally, (1) and (2) above
Is selected by the 0 determination circuit 14 from the operation result of the subtraction circuit 4, and these are output ZM and ZE.

本実施例では、並列に処理される2系統の演算結果
が、0判定回路14により最後に選択される。つまり、本
実施例による浮動小数点加減算回路においては、0判定
回路14はクリティカルパスに含まれない。また、第31図
の従来技術において0判定回路14の演算結果を入力とす
る0固定回路12,13が、本実施例による浮動小数点加減
算回路では存在しない。従来技術では、0判定回路及び
0固定回路による処理速度の低下が大きかったが、本発
明では、これを回避することで高速性を実現している。
In the present embodiment, two system operation results processed in parallel are finally selected by the 0 determination circuit 14. That is, in the floating point addition / subtraction circuit according to the present embodiment, the 0 determination circuit 14 is not included in the critical path. Further, in the prior art shown in FIG. 31, the floating point addition / subtraction circuit according to the present embodiment does not include the 0 fixed circuits 12 and 13 which receive the operation result of the 0 determination circuit 14 as an input. In the related art, the processing speed is largely reduced by the 0 determination circuit and the 0 fixing circuit, but in the present invention, high speed is realized by avoiding this.

第17図ないし第19図は加減算前の仮数部データから正
規化量を検出し、高速化をはかる実施例である。図中51
はYMスルー/−YM回路で、減算の場合、仮数部YMの符号
を反転する。81は正規化量検出回路8のエンコーダ、52
〜54は減算回路、55は1ビット修正検出回路、56は左1b
itシフタ、57は右1bitシフタ、58,59はセレクタであ
る。シフタ56は1bitシフト不足の時、左へ1bitシフトす
るもの、シフタ57は1bitシフトしすぎの時、右へ1ビッ
トもどすものである。正規化データをそのまゝ通過させ
たい時は、経路60を用いる。
FIGS. 17 to 19 show an embodiment in which the normalized amount is detected from the mantissa data before addition and subtraction to increase the speed. In the figure 51
Is a YM through / -YM circuit, and in the case of subtraction, inverts the sign of the mantissa YM. 8 1 is the encoder of the normalization amount detection circuit 8, 52
~ 54 is a subtraction circuit, 55 is a 1-bit correction detection circuit, 56 is 1b on the left
It is a shifter, 57 is a right 1-bit shifter, and 58 and 59 are selectors. The shifter 56 shifts one bit to the left when the 1-bit shift is insufficient, and the shifter 57 shifts one bit to the right when the shift is too much. When it is desired to pass the normalized data as it is, the path 60 is used.

(1) 最初に、本発明の特徴である正規化量検出の実
施例について説明する。
(1) First, an embodiment of normalization amount detection which is a feature of the present invention will be described.

ここで、仮数部データは隠れbit無しの2の補正数表
現であるとし、加算命令だけを考える。
Here, it is assumed that the mantissa data is a correction number expression of 2 with no hidden bits, and only an addition instruction is considered.

まず、桁合せ後の仮数部データがXM′、YM′が同符号
である場合、その加算結果について、正規化による左シ
フトは行なわれない。つまり、加算結果においては、X
M′、YM′が異符号である場合のみを考えれば良い。こ
こで、XM′、YM′から直接、正規化量を検出する方法を
考える。以下の説明のため、XM′、YM′の対応する各bi
tが、共に0である場合を“0"、片方が1である場合を
“1"、共に1である場合を“2"と表現することにする。
正規化が生じるのは、加算結果において、符号bitであ
るMSB(最上位bit)と同じデータが、MSBから連続して3
bit以上並ぶ場合であり、第20図に示す2つの場合しか
ない。
First, when XM 'and YM' have the same sign in the mantissa data after digit alignment, the addition result is not left-shifted by normalization. That is, in the addition result, X
Only the case where M 'and YM' have different codes should be considered. Here, a method of directly detecting the normalized amount from XM 'and YM' will be considered. For the following explanation, the corresponding bi of XM 'and YM'
The case where both t are 0 is expressed as “0”, the case where one is 1 is expressed as “1”, and the case where both are 1 is expressed as “2”.
Normalization occurs because, in the addition result, the same data as the MSB (most significant bit), which is the sign bit, is continuously 3 bits from the MSB.
This is a case where more than bits are arranged, and there are only two cases shown in FIG.

つまり、の場合は、加算結果が負になる場合で、加
算結果において、正規化位置まで1が続く。これを加算
前データで見れば、最初に1が続き、これに0が1bit続
く。次に2以外が来れば、加算結果においてこれより下
位に1が続くことはない。加算前データにおいて0の次
に2が来れば、2が続く限り加算結果において1が続
く。
That is, in the case of, the addition result becomes negative, and 1 continues to the normalized position in the addition result. If this is viewed from the data before addition, 1 is first followed by 0 followed by 1 bit. Next, when a value other than 2 comes, 1 does not continue below this in the addition result. If 2 comes after 0 in the data before addition, 1 continues in the addition result as long as 2 continues.

一方の場合は、加算結果が正になる場合で、加算結
果において、正規化位置まで0が続く。これもの場合
と同様に加算前データで見れば、最初に1が続き、これ
に2が1bit続く。次に0以外が来れば、加算結果におい
てこれより下位に0が続くことはなく、加算前データに
おいて2の次に0が来れば、0が続く限り加算結果にお
いて0が続く。
In one case, the addition result is positive, and 0 continues to the normalized position in the addition result. In the same way as in this case, when looking at the data before addition, 1 is first followed by 2 followed by 1 bit. Next, when a value other than 0 comes, 0 does not continue below the addition result in the addition result. When 0 comes after 2 in the data before addition, 0 continues in the addition result as long as 0 continues.

以上から、加算前データにおいて隣接する3bitを検証
すれば、その中央のビットが正規化位置となり得るかど
うかが判るので、加算前データの各bitについて、左右1
bitを含む3bitで上記の検証を行ない、対応するbitにフ
ラグを立て、つまり加算後に正規化した場合にMSBとな
るところにフラグを立て、このbit列を正規化量検出回
路8及びプライオリティー・エンコーダ81に通すこと
で、正規化量を検出する事ができる。
From the above, by examining the adjacent 3 bits in the data before addition, it is known whether or not the center bit can be a normalized position.
The above-mentioned verification is performed with 3 bits including a bit, and a flag is set for a corresponding bit, that is, a flag is set where an MSB is obtained after normalization after addition. by passing the encoder 81, it can be detected normalization amount.

詳細に説明するため、上記、を第21図に示すのよ
うに場合分けし、正規化検出によるフラグ位置を併記す
る。
In order to explain in detail, the above is divided into cases as shown in FIG. 21, and the flag position by the normalization detection is also described.

ここで、第21図で備考欄に記したように、加算結果に
とって2通りの正規化が予想される場合がある。これ
は、下位bitからの桁上りによって生じるものである
が、その正規化量は、高々1bitしか違わない。1bitの修
正は容易なので、加算後に1bitの修正を行なうものとす
る。
Here, as described in the remarks column in FIG. 21, two normalizations may be expected for the addition result. This is caused by carry from the lower bit, but the normalized amount differs at most by 1 bit. Since 1-bit correction is easy, 1-bit correction is performed after addition.

ところで第21図において、上記1bitの修正が必要な場
合には、フラグの欄で“……011×……”のように正規
化が起こり得る2bitにフラグ(「1」で示す)が立って
いるが、加算後に1bitの修正をすることを前提とすれ
ば、この2bitのうちのいずれかにフラグを立てれば良
い。この点を考慮して、正規化量検出のための論理回路
を設計した例を示す。ここでSおよびCは加算前データ
であり、“0"の時SC=00、“1"の時SC=10、“2"の時SC
=01である。また、当該3bitに対し、上位bitからS0C
0、S1C1、S2C2とする。
By the way, in FIG. 21, when the 1-bit correction is necessary, a flag (indicated by “1”) is set in 2 bits where normalization can occur, such as “... 011 ×. However, assuming that one bit is corrected after the addition, any one of these two bits may be flagged. An example in which a logic circuit for normalization amount detection is designed in consideration of this point will be described. Here, S and C are pre-addition data, SC = 00 when “0”, SC = 10 when “1”, SC when “2”
= 01. Also, for the 3 bits, S0C
0, S1C1, and S2C2.

a) 加算後に右1bitの修正をする場合。a) When correcting the right one bit after addition.

この場合、上記1bit修正を考慮した2bitのフラグの
内、下位bitにフラグを立て、上位bitにはフラグを立て
ない。第22図にカルノー図、第23図にこのカルノー図か
ら求めた正規化量検出回路を示す。第22図において上下
または左右2欄にわたり丸枠で囲った部分は、カルノー
図から得る回路の簡単化のための手法を示し、第23図の
回路は第22図のS0,C0,S1,C1,S2,S2の計6種から得られ
る。
In this case, of the 2-bit flags in consideration of the 1-bit correction, the lower bit is flagged and the upper bit is not. FIG. 22 shows a Carnot diagram, and FIG. 23 shows a normalized amount detection circuit obtained from the Carnot diagram. In FIG. 22, a portion surrounded by a circle over two columns, upper and lower or left and right, shows a technique for simplifying a circuit obtained from the Karnaugh diagram, and the circuit in FIG. 23 corresponds to S0, C0, S1, C1 in FIG. , S2, S2.

b) 加算後に左1bitの修正をする場合。b) When correcting the left one bit after addition.

この場合、上記1bit修正を考慮した2bitのフラグの
内、上位bitにフラグを立て、下位bitのフラグは“0"、
“1"のいずれでも良い。第24図にカルノー図、第25図に
このカルノー図から求めた正規化量検出回路を示す。上
記の右1bitの修正をする場合より、小さい回路で実現で
きる。
In this case, among the 2-bit flags taking into account the 1-bit correction, a flag is set for the upper bit, and the flag for the lower bit is “0”,
Any of "1" is acceptable. FIG. 24 shows a Carnot diagram, and FIG. 25 shows a normalized amount detection circuit obtained from the Carnot diagram. It can be realized with a smaller circuit than the case of correcting the right one bit.

c) 加算後に左または右1bitの修正をする場合。c) When adding 1 bit left or right after addition.

この場合、上記1bit修正を考慮した2bitのフラグの
内、下位bitにフラグを立て、上位bitのフラグは“0"、
“1"のいずれでも良い。第26図にカルノー図、第27図は
このカルノー図から求めた正規化量検出回路を示す。上
記の左1bitの修正をする場合より、さらに小さい回路で
実現できる。
In this case, among the 2-bit flags taking into account the 1-bit correction, the lower bit is flagged, the upper bit flag is set to “0”,
Any of "1" is acceptable. FIG. 26 shows a Carnot diagram, and FIG. 27 shows a normalized amount detection circuit obtained from the Carnot diagram. It can be realized with a smaller circuit than the case of correcting the left 1 bit.

(2) 次に、本発明を適用した仮数部31bit、指数部6
bitの浮動小数点加減算回路の実施例について説明す
る。
(2) Next, the mantissa part 31bit and the exponent part 6 to which the present invention is applied
An embodiment of a floating-point addition / subtraction circuit for bits will be described.

第17図が、左右1bitの修正を考慮した本実施例のブロ
ック図である。
FIG. 17 is a block diagram of the present embodiment in which correction of 1 bit left and right is considered.

まず、減算回路4によって入力Xの指数部データXE
と、入力Yの指数部データYEとの差XE−YEを求め、その
結果に従いXシフト回路5、Yシフト回路6により、仮
数部データXMもしくはYMを右方向に|XE−YE|シフトする
ことによって桁合せを行なう。また、セレクタ11により
XE、YEの大きい方を選択し、これをZE′とする。
First, the exponent part data XE of the input X is calculated by the subtraction circuit 4.
XE−YE | is calculated by the X shift circuit 5 and the Y shift circuit 6 in accordance with the result, and the mantissa data XM or YM is shifted to the right by | XE−YE |. Perform digit alignment by Also, by the selector 11
The larger of XE and YE is selected, and this is set as ZE '.

次に、(1)で説明した正規化量検出回路を適用する
ため、減算の場合は回路51でYの仮数部の符号を反転す
る。
Next, in order to apply the normalization amount detection circuit described in (1), in the case of subtraction, the sign of the mantissa of Y is inverted by the circuit 51.

次に、仮数部データXM′とYM′の加算を行ない、同時
に(1)の正規化量検出回路により正規化量NEを検出
し、その出力をエンコードする。
Next, the mantissa data XM 'and YM' are added, and at the same time, the normalization amount NE is detected by the normalization amount detection circuit (1), and the output is encoded.

次に、減算回路52〜54によって、指数部ZE′から正規
化量NEを減算する。この時、減算回路52〜54は、指数部
の正規化において左右1bitの修正を考慮し、各々ZE′−
NE−1、ZE′−NE、ZE′−NE+1を演算する。
Next, the normalization amount NE is subtracted from the exponent part ZE 'by the subtraction circuits 52 to 54. At this time, the subtraction circuits 52 to 54 each consider the correction of one bit left and right in the normalization of the exponent part, and
Compute NE-1, ZE'-NE, and ZE'-NE + 1.

上記減算と同時に、上記正規化量にしたがって、左シ
フタ9により仮数部ZM′を正規化する。その後、検出回
路55で、左1bitシフタ56または右1bitシフタ57による左
右1bitの修正値を検出する。
Simultaneously with the subtraction, the mantissa part ZM 'is normalized by the left shifter 9 according to the normalization amount. Thereafter, the detection circuit 55 detects a left and right 1-bit correction value by the left 1-bit shifter 56 or the right 1-bit shifter 57.

最後に、上記正規化と同時に左3bitシフタ9の出力か
ら検出した修正量にしたがい、セレクタ59、58により仮
数部ZMおよび指数部ZEを選択し、これを浮動小数点加減
算回路の出力結果とする。
Finally, the mantissa part ZM and the exponent part ZE are selected by the selectors 59 and 58 in accordance with the correction amount detected from the output of the left 3 bit shifter 9 at the same time as the above-mentioned normalization, and these are set as the output results of the floating point addition / subtraction circuit.

第18図は、右1bitの修正を考慮した実施例のブロック
図である。(1)で前述した通り、正規化量検出回路は
左右1bit修正の場合に句べて複雑だが、指数部正規化の
ための減算回路と、仮数部正規化のための1bitシフタが
1つづつ少くてすみ、ZEおよびZMを選択するためのセレ
クタ58,59も小さくてすむ。
FIG. 18 is a block diagram of an embodiment in which the right one bit is corrected. As described in (1) above, the normalization amount detection circuit is complicated in the case of 1-bit correction on the left and right, but a subtraction circuit for exponent normalization and a 1-bit shifter for mantissa normalization are each one. The number of selectors 58 and 59 for selecting ZE and ZM can be small as well.

第19図は、左1bitの修正を考慮した実施例のブロック
図である。(1)で前述した通り、正規化量検出回路は
左1bit修正の場合に比べて簡単であるが、左右1bit修正
の場合に比べて複雑である。しかし、正規化のための減
算回路および1bitシフタの回路規模は、右1bit修正の場
合と同じである。
FIG. 19 is a block diagram of an embodiment in which correction of the left 1 bit is considered. As described above in (1), the normalization amount detection circuit is simpler than the case of the left 1-bit correction, but is more complicated than the case of the left and right 1-bit correction. However, the circuit scales of the subtraction circuit and the 1-bit shifter for normalization are the same as in the case of the right 1-bit correction.

従来の浮動小数点加減算回路では、正規化回路におい
て、仮数部加減算回路の出力結果から正規化量を検出し
ているため、正規化が仮数部の加減算結果が検出される
まで行なわれなかったが、本実施例では、加減算前の仮
数部データから正規化量を検出するため、正規化が仮数
部の加減算結果の出力に先立って行なわれ、高速な浮動
小数点加減算回路を設計することができる。特に、指数
部の減算は、正規化に費やす時間に対して大きな比重を
占めているので、これが仮数部加減算出力に先立って行
なわれることは、高速化に寄与する。
In the conventional floating-point addition / subtraction circuit, since the normalization circuit detects the normalization amount from the output result of the mantissa addition / subtraction circuit, normalization is not performed until the addition / subtraction result of the mantissa is detected. In this embodiment, since the normalized amount is detected from the mantissa data before addition / subtraction, normalization is performed prior to the output of the result of addition / subtraction of the mantissa, and a high-speed floating-point addition / subtraction circuit can be designed. In particular, since the subtraction of the exponent part occupies a large proportion of the time spent for normalization, performing this operation prior to the mantissa part addition / subtraction output contributes to speeding up.

第28図はこの発明の途中の過程で考えられた、FASUの
高速化が図られた浮動小数点データ加減算回路のブロッ
ク図である。即ち通常の正規化回路(例えば第31図のシ
フタ9参照)は、前段部に、加減算回路出力がオーバー
フローした場合に、1bit右シフトさせるシフタが設けて
ある。この1bit右シフタ91は、シフタ9から独立させて
もかまわないので、これらシフタ9,91を並列配置し、例
えば加減算器7の出力の上位2bitを用いて形成した制御
信号により、セレクタ16で出力選択する構成とすれば、
加減算回路7以降でのゲート段数が減り、その分高速化
が図れるものである。また、右1bitシフタの全てを独立
させず、クリティカルパスだけをシフタ9から独立させ
ることでも、同様に高速化を図ることができる。
FIG. 28 is a block diagram of a floating-point data addition / subtraction circuit designed to speed up FASU, which was considered in the course of the present invention. That is, in a normal normalizing circuit (for example, see the shifter 9 in FIG. 31), a shifter for shifting right by 1 bit is provided in the preceding stage when the output of the adding / subtracting circuit overflows. The 1bit right shifter 9 1, so may be made independent from the shifter 9, these shifter 9, 9 1 arranged in parallel, for example, by the control signal formed using the upper 2bit output of subtracter 7, a selector 16 If you select the output with
The number of gate stages after the addition / subtraction circuit 7 is reduced, and the speed can be increased accordingly. Alternatively, the speed can be increased similarly by making only the critical path independent of the shifter 9 without making the entire right 1-bit shifter independent.

なお本発明は実施例のみに限られず種々の応用が可能
である。例えば実施例では仮数部演算経路を2個とし、
これらを選択するようにしたが、それ以上としてもよ
い。
Note that the present invention is not limited to the embodiments, and various applications are possible. For example, in the embodiment, there are two mantissa operation paths,
These are selected, but may be more.

[発明の効果] 以上説明した如く本発明によれば、ゲート段数を少と
したり、演算経路を複数としてこれらを共に動作させ、
得たい出力のみを選択するようにしたり、上記演算経路
の動作中に選択用信号も並行して得られるようにしたた
め、高速化された浮動小数点データ加減算回路が提供で
きるものである。
[Effects of the Invention] As described above, according to the present invention, the number of gate stages can be reduced, and a plurality of operation paths can be operated together,
Since only the desired output is selected or the selection signal is obtained in parallel during the operation of the operation path, a high-speed floating-point data addition / subtraction circuit can be provided.

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

第1図は本発明の途中の過程で考えられた浮動小数点デ
ータ加減算回路の構成図、第2図は同構成の具体例を示
す構成図、第3図ないし第5図は同構成の作用を示す図
表、第6図,第7図は同構成の一部詳細回路図、第8図
は本発明の実施例の構成図、第9図は同構成の一部詳細
説明図、第10図は減算回路及び0判定回路部分図、第11
図,第12図は第8図の構成の効果説明に用いる従来回路
図、第13図,第14図は同従来回路の改良例を示す回路
図、第15図,第16図は第8図の構成の作用を示す図表、
第17図ないし第19図は本発明の異なる実施例の構成図、
第20図ないし第27図は同構成の一部説明図、第28図はこ
の発明の途中の過程で考えられた浮動小数点データ加減
算回路のブロック図、第29図ないし第31図は従来回路の
構成図、第32図は第31図の作用を示す図表である。 4,10,31……減算回路、5,6……右30bitシフタ、7……
加減算回路、8……正規化量検出回路、81……エンコー
ダ、9……左30bitシフタ、91……右1bitシフタ、15…
…シフト量検出回路、16……セレクタ、211……Xシフ
タ、212……Yシフタ、21,24……桁合せ回路、22,25…
…加減算回路、23,26……正規化回路、241,242……1bit
シフタ、27……セレクタ、33,35……エンコーダ、41,43
……セレクタ、45……PMスルー/−PM回路、51……スル
ー又は反転回路、55……修正量検出回路、56……左1bit
シフタ、57……右1bitシフタ、59……セレクタ。
FIG. 1 is a block diagram of a floating point data addition / subtraction circuit considered in the course of the present invention, FIG. 2 is a block diagram showing a specific example of the same configuration, and FIGS. 3 to 5 show the operation of the same configuration. 6 and 7 are partially detailed circuit diagrams of the same configuration, FIG. 8 is a configuration diagram of an embodiment of the present invention, FIG. 9 is a partially detailed explanatory diagram of the same configuration, and FIG. Partial diagram of subtraction circuit and 0 determination circuit, eleventh
FIGS. 12 and 13 are conventional circuit diagrams used to explain the effects of the configuration of FIG. 8, FIGS. 13 and 14 are circuit diagrams showing an improved example of the conventional circuit, and FIGS. 15 and 16 are FIGS. Chart showing the operation of the configuration of
17 to 19 are configuration diagrams of different embodiments of the present invention,
20 to 27 are partial explanatory diagrams of the same configuration, FIG. 28 is a block diagram of a floating-point data addition / subtraction circuit considered in the course of the present invention, and FIGS. 29 to 31 are conventional circuit diagrams. FIG. 32 is a table showing the operation of FIG. 31. 4,10,31 ... subtraction circuit, 5,6 ... right 30bit shifter, 7 ...
Addition / subtraction circuit, 8 Normalization amount detection circuit, 8 1 … Encoder, 9… Left 30-bit shifter, 9 1 … Right 1-bit shifter, 15…
... Shift amount detection circuit, 16 ... Selector, 21 1 ... X shifter, 21 2 ... Y shifter, 21,24 ... Digit matching circuit, 22,25 ...
… Addition / subtraction circuit, 23,26… Normalization circuit, 24 1 , 24 2 … 1 bit
Shifter, 27 ... Selector, 33,35 ... Encoder, 41,43
… Selector, 45… PM through / −PM circuit, 51… Through or inverting circuit, 55… Correction amount detection circuit, 56… Left 1 bit
Shifter, 57: Right 1-bit shifter, 59: Selector.

フロントページの続き (72)発明者 小泉 正幸 神奈川県川崎市幸区堀川町580番1号 株式会社東芝半導体システム技術センタ ー内 (56)参考文献 特開 昭60−204031(JP,A) 特開 昭53−133344(JP,A) 特開 昭63−310022(JP,A) 特開 昭59−226944(JP,A) 特開 昭61−33539(JP,A) 特開 平1−111229(JP,A) 特開 昭63−167930(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 7/50 Continuation of the front page (72) Inventor Masayuki Koizumi 580-1 Horikawa-cho, Saiwai-ku, Kawasaki-shi, Kanagawa Prefecture Toshiba Semiconductor System Technology Center Co., Ltd. (56) References JP-A-60-204031 (JP, A) JP-A-53-133344 (JP, A) JP-A-63-310022 (JP, A) JP-A-59-226944 (JP, A) JP-A-61-33539 (JP, A) JP-A-1-111229 (JP) , A) JP-A-63-167930 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 7/50

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】少くとも第1、第2の仮数部データ演算経
路を有し、前記第1の仮数部データ演算経路は、所定の
桁数の桁合せ機能を有し、この所定の桁数の範囲内で指
数部データの差に応じて仮数部データの桁合せを行なう
桁合せ回路と、該桁合せ回路により桁合せされた仮数部
データの加算または減算を行なう加減算回路と、該加減
算回路での演算結果から正規化量を検出する正規化量検
出回路と、前記正規化量に応じて仮数部データの正規化
を行なう正規化用シフタとを有し、前記第2の仮数部デ
ータ演算経路は、入力オペランドスルーの経路と入力オ
ペランドの符号反転回路を有し、前記第1、第2の仮数
部データ演算経路を並列に動作させ、浮動小数点データ
の加算命令時において、指数部の差が仮数部桁合せ桁数
より大きい時、指数部が大であるオペランドのスルーデ
ータを加減算結果とし、浮動小数点データの減算命令時
において、指数部の差が仮数部桁合せ桁数より大きい
時、2つのオペランド内の被減数が大である時は被減数
側のスルーデータを、減数が大である時は減数側の符号
反転データを、加減算結果とするものであり、指数部デ
ータの差に応じて前記第1、第2の仮数部データ演算経
路の出力を選択することを特徴とする浮動小数点データ
加減算回路。
1. A first mantissa data operation path having at least first and second mantissa data operation paths, wherein the first mantissa data operation path has a digit matching function of a predetermined number of digits. A digit aligning circuit for performing digit alignment of mantissa data in accordance with the difference of exponent data within the range, an addition / subtraction circuit for adding or subtracting mantissa data aligned by the digit alignment circuit, and an addition / subtraction circuit And a normalization shifter for normalizing the mantissa data according to the normalization amount. The second mantissa data operation The path has an input operand through path and an input operand sign inverting circuit, operates the first and second mantissa data operation paths in parallel, and provides a difference between exponent parts when an instruction to add floating-point data is issued. Is greater than the number of digits in the mantissa, When the through data of the operand with a large part is the result of addition and subtraction and the difference of the exponent part is larger than the number of digits of the mantissa part at the time of the subtraction instruction of the floating point data, and the manuscript in the two operands is large, The through data on the subtrahend side is used as the result of addition and subtraction when the subtrahend is large, and the sign-inverted data on the subtrahend is used as the result of addition and subtraction. The first and second mantissa data operation paths are performed according to the difference between the exponent data. A floating-point data addition / subtraction circuit, wherein an output of the floating-point data is selected.
【請求項2】指数部データの差に応じて仮数部データの
桁合せを行なう桁合せ回路と、該桁合せ回路により桁合
せされた仮数部データの加算または減算を行なう加減算
回路と、該加減算回路での演算前の仮数部データの各ビ
ットの一部とその前後の数ビットを用いて、桁上がり信
号を伴わずに論理演算し、その演算結果からフラグを立
て、それを正規化エンコード回路の入力とする正規化量
検出回路と、該正規化量検出回路の出力に応じて前記加
減算回路からの仮数部データの正規化を行なう正規化用
シフタと、該正規化用シフタの出力から該出力データを
右または左へ1ビットシフトするか否かを選択して加減
算結果の仮数部を出力する手段と、指数部データのうち
大きい方の指数部データから前記正規化量検出回路の出
力を減算し、この減算値またはこの減算値に対し上記正
規化用シフタの出力に基づいて1ビット加算または減算
した値を加減算結果の指数部として出力する手段とを具
備したことを特徴とする浮動小数点データ加減算回路。
2. An alignment circuit for performing digit alignment of mantissa data in accordance with a difference between exponent data, an addition / subtraction circuit for adding or subtracting mantissa data aligned by the alignment circuit, and an addition / subtraction circuit. Using a part of each bit of the mantissa data before the operation in the circuit and several bits before and after it, a logical operation is performed without a carry signal, a flag is set from the operation result, and it is normalized encoding circuit A normalization amount detection circuit as an input of the normalization amount detection circuit; a normalization shifter for normalizing the mantissa data from the addition / subtraction circuit in accordance with an output of the normalization amount detection circuit; Means for selecting whether to shift the output data by one bit to the right or left and outputting the mantissa part of the addition / subtraction result; and outputting the output of the normalization amount detection circuit from the larger exponent part data of the exponent part data. Subtract this Floating-point data addition and subtraction circuit next instruction and or the subtraction value to be characterized in that and means for outputting the 1-bit addition or subtraction value based on the output of the shifter for the normalization as exponent of the addition and subtraction result.
JP19284989A 1989-07-26 1989-07-26 Floating point data addition / subtraction circuit Expired - Lifetime JP3187402B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19284989A JP3187402B2 (en) 1989-07-26 1989-07-26 Floating point data addition / subtraction circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19284989A JP3187402B2 (en) 1989-07-26 1989-07-26 Floating point data addition / subtraction circuit

Publications (2)

Publication Number Publication Date
JPH0357019A JPH0357019A (en) 1991-03-12
JP3187402B2 true JP3187402B2 (en) 2001-07-11

Family

ID=16297996

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19284989A Expired - Lifetime JP3187402B2 (en) 1989-07-26 1989-07-26 Floating point data addition / subtraction circuit

Country Status (1)

Country Link
JP (1) JP3187402B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05313857A (en) * 1992-05-08 1993-11-26 Nec Corp Floating-point adding/subtracting device and its control system
US5392228A (en) * 1993-12-06 1995-02-21 Motorola, Inc. Result normalizer and method of operation

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS53133344A (en) * 1977-04-27 1978-11-21 Panafacom Ltd Floatinggpoint arithmetic processing system
JPS59226944A (en) * 1983-06-09 1984-12-20 Fujitsu Ltd Addition and subtraction system of floating point data
US4639887A (en) * 1984-02-24 1987-01-27 The United States Of America As Represented By The United States Department Of Energy Bifurcated method and apparatus for floating point addition with decreased latency time
JPS6133539A (en) * 1984-07-25 1986-02-17 Toshiba Corp Floating point arithmetic unit
JPH083788B2 (en) * 1987-06-11 1996-01-17 松下電器産業株式会社 Processor

Also Published As

Publication number Publication date
JPH0357019A (en) 1991-03-12

Similar Documents

Publication Publication Date Title
US7395304B2 (en) Method and apparatus for performing single-cycle addition or subtraction and comparison in redundant form arithmetic
US5010508A (en) Prenormalization for a floating-point adder
JP4388543B2 (en) 3-input floating-point adder / subtracter
US7720899B2 (en) Arithmetic operation unit, information processing apparatus and arithmetic operation method
KR100203468B1 (en) Arithmetic apparatus for floating point numbers
US5111421A (en) System for performing addition and subtraction of signed magnitude floating point binary numbers
US6175851B1 (en) Fast adder/subtractor for signed floating point numbers
EP0487814A2 (en) Overflow determination for three-operand alus in a scalable compound instruction set machine
US7428567B2 (en) Arithmetic unit for addition or subtraction with preliminary saturation detection
JPH09212337A (en) Floating-point arithmetic processor
US20020129075A1 (en) Apparatus and method of performing addition and rounding operation in parallel for floating-point arithmetic logical unit
JP3187402B2 (en) Floating point data addition / subtraction circuit
JP3429927B2 (en) Normalization circuit device of floating point arithmetic unit
JP4439060B2 (en) Floating point adder
EP1282034A2 (en) Elimination of rounding step in the short path of a floating point adder
JP3517162B2 (en) Division and square root arithmetic unit
US7240085B2 (en) Faster shift value calculation using modified carry-lookahead adder
JP3462054B2 (en) Parallel addition / subtraction circuit
JP2555577B2 (en) Arithmetic unit
JPS59140560A (en) Floating point multiplier
JPH0383126A (en) Floating-point multiplier
JP2931632B2 (en) Digit shifter and floating point arithmetic unit
JP3100868B2 (en) Arithmetic unit for floating point numbers
JP2003029960A (en) Elimination of rounding step in short path of floating point adder
JPH113210A (en) 3-input comparator, saturation arithmetic unit using the same and arithmetic method therefor

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090511

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090511

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100511

Year of fee payment: 9

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100511

Year of fee payment: 9