JPH03282926A - Floating-point numerical arithmetic unit - Google Patents
Floating-point numerical arithmetic unitInfo
- Publication number
- JPH03282926A JPH03282926A JP2084721A JP8472190A JPH03282926A JP H03282926 A JPH03282926 A JP H03282926A JP 2084721 A JP2084721 A JP 2084721A JP 8472190 A JP8472190 A JP 8472190A JP H03282926 A JPH03282926 A JP H03282926A
- Authority
- JP
- Japan
- Prior art keywords
- mantissa
- precision
- exponent
- numerical data
- double
- 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.)
- Granted
Links
Abstract
Description
【発明の詳細な説明】
[発明の目的]
(産業上の利用分野)
この発明は、浮動小数点数値データを処理する加減算装
置、すなわち浮動小数点数演算装置に関する。DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Industrial Application Field) The present invention relates to an addition/subtraction device that processes floating point numerical data, that is, a floating point arithmetic device.
(従来の技術)
符号付絶対値表現に於いて浮動小数点数値は、指数部、
仮数部、仮数部の符号によつ、て表わされる。例えばI
EEE754規格の倍精度数D(64bit)及び、単
精度数S (32b i t)は、次の様に表現される
。(Prior art) In signed absolute value representation, a floating point value has an exponent part,
It is expressed by the mantissa and the sign of the mantissa. For example I
The double-precision number D (64 bits) and single-precision number S (32 bits) of the EEE754 standard are expressed as follows.
D= (−1)”Xi、fx2°−1023sho
or 1 (lbit)f:ooo・・・0
0〜111・・・11(52bit)
e−0〜2047 (11b i t)S−(
−1) Sxi、fx2°−127s:Oor 1
(lbit)f : 000・・・00〜11
1・・・11(23b i t)
e−C1〜255 (8b i t)ここで
、Sは仮数部の符号であり、D(またはS)が正の時0
1負の時1である。fは、仮数部の小数部であり、隠れ
ビットとなる整数部が1となるように正規化されている
。eは、指数部で、バイアス値として倍精度数で102
3.単精度数で127を本来の指数に加えたオフセット
表現で表わされる。第12図(+1)、(b)にそのフ
ォーマットを示す。D= (-1)"Xi, fx2°-1023sho
or 1 (lbit)f:ooo...0
0~111...11 (52bit) e-0~2047 (11bit)S-(
-1) Sxi, fx2°-127s: Oor 1
(lbit)f: 000...00~11
1...11 (23bit) e-C1~255 (8bit) Here, S is the sign of the mantissa, and when D (or S) is positive, it is 0.
When 1 is negative, it is 1. f is the decimal part of the mantissa, and is normalized so that the integer part, which is a hidden bit, is 1. e is the exponent and the bias value is a double precision number of 102
3. It is expressed as a single-precision number with an offset of 127 added to the original exponent. The format is shown in FIG. 12 (+1) and (b).
浮動小数点数値演算は、整数値演算に比べ処理がはるか
に複雑であるため実行するには多くの時間を必要とする
。ハードウェア実装に於いては、演算の実行速度、精度
とコストとの間でトレード・オフが存在する。演算の高
速化、高精度化を図ると演算器は大規模なものになる。Floating-point numerical operations are much more complex to process than integer numerical operations, and therefore require more time to execute. In hardware implementation, there is a trade-off between execution speed, accuracy, and cost. Increasing the speed and precision of calculations requires a large-scale calculation unit.
特に仮数部の精度を上げるとビット幅が広くなり、演算
処理も複雑なため、仮数部演算器が演算器全体の大半を
占め比較的高価になる。一方、゛指数部演算器、符号部
演算器は、精度を上げてもビット数はそれほど増えない
。また演算が単純なため、これらが演算器全体に占める
割合もわずかである。In particular, increasing the precision of the mantissa part increases the bit width and complicates the arithmetic processing, so the mantissa arithmetic unit occupies most of the entire arithmetic unit and is relatively expensive. On the other hand, in the exponent part arithmetic unit and the sign part arithmetic unit, the number of bits does not increase much even if the precision is increased. Furthermore, since the calculations are simple, they occupy a small proportion of the entire calculation unit.
第16図は、従来の倍精度/単精度浮動小数点数演算装
置の一例を示す。図において、この演算装置は、符号演
算手段100.指数部演算手段101、仮数部演算手段
102を有しており、これらはいずれも倍精度数値デー
タを直接扱えるだけのビット幅を持つ演算器を実装して
いる。したかって、倍精度数値データ、単精度数値デー
タにかかわらず、最高速の場合で1クロツク毎に1組の
データを入力することができるので、1クロツク毎に1
つの演算結果を得ることができる。FIG. 16 shows an example of a conventional double precision/single precision floating point arithmetic device. In the figure, this arithmetic device includes sign arithmetic means 100. It has an exponent part calculation means 101 and a mantissa part calculation means 102, both of which are implemented with arithmetic units having a bit width sufficient to directly handle double-precision numerical data. Therefore, regardless of double-precision numerical data or single-precision numerical data, one set of data can be input every clock at the highest speed, so one set of data can be input every clock.
It is possible to obtain two calculation results.
この演算装置において、指数部演算手段101は例えば
指数部比較器103.指数部セレクタ104、加減算器
105およびインフレメンタ106から構成されており
、第12図(a)、(b)に示すビット幅eの信号Eの
入力により、指数部の演算を行う。仮数部演算装置10
2は、例えば仮数部交換器1071桁合わせシフタ10
8.反転回路109.加算器110.補数化回路111
゜正規化シフタ112.プライオリティ・エンコーダ1
13.丸め回路114および再正規化回路115からな
る。仮数部交換器107には第12図(a)、(b)に
しめすビット幅fの信号Fが人力され、仮数部の演算が
行われる。In this arithmetic device, the exponent part calculation means 101 is, for example, an exponent part comparator 103. It is composed of an exponent part selector 104, an adder/subtractor 105, and an inflator 106, and calculates the exponent part by inputting a signal E having a bit width e shown in FIGS. 12(a) and 12(b). Mantissa calculation device 10
2 is, for example, the mantissa exchanger 1071, the digit shifter 10
8. Inverting circuit 109. Adder 110. Complementization circuit 111
゜Normalization shifter 112. Priority encoder 1
13. It consists of a rounding circuit 114 and a renormalization circuit 115. A signal F having a bit width f shown in FIGS. 12(a) and 12(b) is input to the mantissa exchanger 107, and the mantissa is calculated.
このように従来の倍精度/単精度浮動小数点数演算装置
では、指数部演算手段101および仮数部演算手段10
2とも倍精度データを直接扱えるだけのビット幅を持つ
演算器を実装しているので、第12図(a)に示す倍精
度データS、E、Fが入力されると、各回路は所定の演
算を行って浮動小数点数を算出する。一方、単精度デー
タS、E。In this way, in the conventional double precision/single precision floating point number arithmetic device, the exponent part calculation means 101 and the mantissa part calculation means 10
Both circuits are equipped with arithmetic units with a bit width large enough to directly handle double-precision data, so when double-precision data S, E, and F shown in Figure 12(a) are input, each circuit performs a predetermined process. Calculate floating point numbers by performing operations. On the other hand, single precision data S, E.
Fが入力されると、倍精度用の演算器の一部分を用いて
浮動小数点数の演算が行われる。したがって、この単精
度用のデータ演算の場合、比較的高価な仮数部演算器の
ビット幅の半分しか用いておらず、ハードウェア資源を
有効に利用していないという問題点があった。When F is input, a floating point number operation is performed using a part of the double precision arithmetic unit. Therefore, in the case of this single-precision data calculation, only half the bit width of the relatively expensive mantissa calculator is used, and hardware resources are not used effectively.
なお、この装置の各回路部分の詳細については、後述す
る本発明の詳細な説明部分で後述するものと類似である
ので、特にここでは説明しない。Note that the details of each circuit portion of this device are similar to those described later in the detailed description of the present invention, and therefore will not be particularly described here.
(発明が解決しようとする課題)
この様に従来の倍精度数値データを直接扱える倍精度/
単精度浮動小数点数演算装置では、単精度数値データの
演算時に於いて仮数部演算器のビット幅を約半分しか用
いておらず、ハードウェア資源を十分に利用していない
、という問題点があった。(Problem to be solved by the invention) In this way, double precision/
Single-precision floating-point arithmetic units have the problem that only about half the bit width of the mantissa arithmetic unit is used when calculating single-precision numerical data, and hardware resources are not fully utilized. Ta.
本発明は、上記のような従来技術の欠点を解決するため
のもので、倍精度数値データを直接処理することができ
る演算器に比較的少ないハードウェアを付加することに
より、単精度数値データの演算を従来の2倍の速度で実
行可能な浮動小数点数演算装置を提供することを目的と
する。The present invention is intended to solve the above-mentioned shortcomings of the prior art, and it is possible to process single-precision numerical data by adding relatively little hardware to an arithmetic unit that can directly process double-precision numerical data. It is an object of the present invention to provide a floating point arithmetic device that can execute operations at twice the speed of conventional ones.
[発明の構成]
(課題を解決するための手段)
この発明では、上記目的を達成するために、倍精度数値
データを扱えるビット幅を有し、倍精度数値データの演
算を行う第1の演算モードと、単精度数値データの演算
を行う第2の演算モードと、フィールドを分割して用い
、各フィールドで異なる単精度数値データの演算を行う
第3の演算モードとで作動する仮数部演算手段を有する
ことを特徴とする浮動小数点数演算装置、を提供するこ
とを要旨とする。[Structure of the Invention] (Means for Solving the Problem) In order to achieve the above object, the present invention provides a first operation that has a bit width that can handle double-precision numerical data and that performs an operation on double-precision numerical data. a second operation mode that operates on single-precision numerical data; and a third operation mode that uses divided fields and operates on different single-precision numerical data in each field. An object of the present invention is to provide a floating point arithmetic device characterized by having the following features.
(作用)
倍精度数値データの演算を行う第1の演算モードでは、
第1の符号演算手段、第1の指数部演算手段、および仮
数部演算手段を用いて浮動少数点数の演算が行われ、単
精度数値データの演算を行う第2の演算モードでは、第
1.第2の符号演算手段のいずれかと、第1.第2の指
数部演算手段のいずれかと、さらに仮数部演算手段1を
用いて浮動小数点数の演算が行われる。さらに、1度に
2組の異なる単精度数値データの演算を行う第3の演算
モードでは、第1.第2の符号演算手段の両者と、第1
.第2の指数部演算手段の両者、および仮数部演算手段
とで2組の浮動小数点数の演算が行われる。(Operation) In the first calculation mode for calculating double-precision numerical data,
In the second operation mode, in which a floating point number is operated using the first sign operation means, the first exponent operation means, and the mantissa operation means, and single-precision numerical data is operated. Either one of the second sign calculation means and the first one. Floating point calculations are performed using one of the second exponent calculation means and the mantissa calculation means 1. Furthermore, in a third calculation mode in which two different sets of single-precision numerical data are calculated at once, the first... both the second sign calculation means and the first
.. Two sets of floating point number operations are performed by both the second exponent part calculation means and the mantissa part calculation means.
(実施例)
第1図は、この発明の第1の実施例を示すブロック図で
ある。図示のようにこの装置は、仮数部演算手段1と、
倍精度/単精度兼用の第1の指数部演算手段2と、単精
度数値データ専用の第2の指数部演算手段31倍精度/
単精度兼用の第1の符号部演算手段59.および単精度
数値データ専用の第2の符号部演算手段60とで構成さ
れている。(Embodiment) FIG. 1 is a block diagram showing a first embodiment of the present invention. As shown in the figure, this device includes a mantissa calculation means 1,
A first exponent part calculation means 2 for double precision/single precision, and a second exponent part calculation means 31 for single precision numerical data only.
Single-precision first sign part calculation means 59. and a second sign section calculation means 60 dedicated to single-precision numerical data.
仮数部演算手段1は、仮数部比較器(大小比較器)4.
仮数部交換器51桁合わせ回路(ノクレルシフタ)6.
ビット反転器7.加算器8.プライオリティ・エンコー
ダ9.および正規化回路10から構成されている。これ
ら各回路はいずれも第1、第2のフィールドに分割され
ているが、第1゜第2のフィールドを連結したモードで
も作動可能なようにされている。なお各回路の第1.第
2のフィールドへの分割は、少量の7X−ドウエアで簡
単に行うことができる。The mantissa calculation means 1 includes a mantissa comparator (a magnitude comparator) 4.
Mantissa exchanger 51 digit matching circuit (Nokrel shifter) 6.
Bit inverter7. Adder 8. Priority encoder9. and a normalization circuit 10. Each of these circuits is divided into a first field and a second field, but can also operate in a mode in which the first and second fields are connected. Note that the first part of each circuit. The division into the second field can be easily done with a small amount of 7X-ware.
第1の指数部演算手段2は、第1指数部比較器11、第
1指数部演算器12.第1指数部選択器(セレクタ)1
3からなり、これらはいずれも倍精度数値データを扱え
るビット数を実装している。The first exponent part calculation means 2 includes a first exponent part comparator 11, a first exponent part calculation unit 12 . First exponent selector (selector) 1
3, all of which implement the number of bits that can handle double-precision numerical data.
第2の指数部演算手段3は、第2指数部比較器14、第
2指数部演算器15.第2指数部セレクタ16からなり
、これらは少なくとも単精度数値データを扱えるビット
数を実装している。The second exponent part calculation means 3 includes a second exponent part comparator 14, a second exponent part calculation unit 15. It consists of a second exponent part selector 16, which is equipped with at least the number of bits that can handle single-precision numerical data.
第1の符号部演算手段59は倍精度数値データを扱える
ビット数を実装した第1符号部演算器62からなり、ま
た第2の符号部演算手段60は少なくとも単精度数値デ
ータを扱えるビ・ソト数を実装した第2指数部演算器6
3からなる。The first sign section calculation means 59 includes a first sign section calculation unit 62 which is equipped with a number of bits that can handle double-precision numerical data, and the second sign section calculation means 60 includes a bit number that can handle at least single-precision numerical data. Second exponent part calculator 6 that implements the number
Consists of 3.
次に上記装置の動作について説明する。Next, the operation of the above device will be explained.
まず、倍精度数値データの演算を行う第1の演算モード
について説明する。第1図に示す装置には、第12図(
a)に示す倍精度の数値データが入力されている。仮数
部は、第1のフィールドと第2のフィールドを連結した
仮数部演算手段1に入力され、演算される。指数部は、
倍精度/単精度兼用の第1の指数部演算手段2で演算さ
れる。First, a first calculation mode for calculating double-precision numerical data will be described. The apparatus shown in FIG.
The double-precision numerical data shown in a) is input. The mantissa is input to the mantissa calculation means 1, which connects the first field and the second field, and is calculated. The exponent part is
The first exponent calculation means 2 is used for both double precision and single precision.
また、符号部は、倍精度/単精度兼用の第1の符号部演
算手段59で演算される。Further, the code part is calculated by a first code part calculation means 59 which can be used for double precision/single precision.
次に単精度数値データの演算を行う第2の演算モードに
ついて説明する。第1図に示す演算装置には、第12図
(b)に示す単精度の数値データが入力されている。仮
数部は、第1のフィールドと第2のフィールドに分割し
た仮数部演算手段1に入力され、第1.第2のいずれか
のフィールドにおいて演算される。指数部は、倍精度/
単精度兼用の第1の指数部演算手段2.または単精度専
用の第2の指数部演算手段3のいずれかで演算される。Next, a second calculation mode for calculating single-precision numerical data will be explained. Single-precision numerical data shown in FIG. 12(b) is input to the arithmetic unit shown in FIG. The mantissa part is input to the mantissa calculation means 1 which is divided into a first field and a second field. Calculated in any second field. The exponent part is double precision/
Single-precision first exponent calculation means 2. Alternatively, it is calculated by either the second exponent calculation means 3 dedicated to single precision.
また、符号部は、倍精度/単精度兼用の第1の符号部演
算手段59.または単精度専用の第2の符号部演算手段
60のいずれかで演算される。Further, the code part is formed by a double-precision/single-precision first code part calculation means 59. Alternatively, it is calculated by either the second code part calculation means 60 dedicated to single precision.
最後に2組の異なる単精度数値データの演算を行う第3
の演算モードの場合について説明する。Finally, the third step is to perform calculations on two different sets of single-precision numerical data.
The case of calculation mode will be explained.
第1図に示す演算装置には、第12図(c)に示すよう
な第1.第2の異なる2組の単精度数値データが入力さ
れている。仮数部は、第1のフィールドと第2のフィー
ルドに分割した仮数部演算手段1に入力され、各々独立
に第1のフィールドにおいて第1組の単精度数値データ
の演算を行い、第2のフィードにおいて第2の組の単精
度数値データの演算を行う。指数部は、倍精度/単精度
兼用の第1の指数部演算手段2.および単精度専用の第
2の指数部演算手段3で各々演算される。また、符号部
は、倍精度/単精度兼用の第1の符号演算手段59.お
よび単精度専用の第2の符号部演算手段60で各々演算
される。The arithmetic device shown in FIG. 1 includes a first . Two second different sets of single-precision numerical data are input. The mantissa is input to the mantissa calculation means 1 which is divided into a first field and a second field, each independently calculates the first set of single-precision numerical data in the first field, and calculates the first set of single-precision numerical data in the first field. In this step, the second set of single-precision numerical data is operated. The exponent part is calculated by a double precision/single precision first exponent part calculating means 2. and a second exponent calculation means 3 dedicated to single precision. The code section includes a double-precision/single-precision first code calculation means 59. and the second sign section calculation means 60 dedicated to single precision.
このように第3の演算モードでは、異なる2組の単精度
数値データを並列に演算する事ができるので、従来の装
置に比べ、単精度数値データの演算速度が実質的に2倍
となる。なお、そのためのハードウェアの追加は、実装
ビット数が少ない単精度数値データ用の第2の符号部演
算手段60゜第2の指数部演算手段3と、仮数部演算手
段1を第1.第2のフィールドに分割する少量のハード
ウェアのみでよい。In this way, in the third calculation mode, two different sets of single-precision numerical data can be calculated in parallel, so the calculation speed for single-precision numerical data is substantially doubled compared to conventional devices. Note that the addition of hardware for this purpose includes a second sign part calculation means 60° for single-precision numerical data with a small number of implemented bits, a second exponent part calculation means 3, and a mantissa part calculation means 1 to the first. Only a small amount of hardware is required to split into the second field.
なお、仮数部演算手段1では、一般に、1)仮数部の桁
合わせ処理、2)仮数部の真の加算/減算処理、3)丸
め処理、4)正規化処理、等が行われるが、各々の処理
手段の構成および処理順序により、仮数部演算手段は様
々な構成が考えられる。The mantissa calculation means 1 generally performs 1) digit alignment processing of the mantissa, 2) true addition/subtraction processing of the mantissa, 3) rounding, 4) normalization processing, etc. Depending on the configuration and processing order of the processing means, various configurations of the mantissa calculation means can be considered.
次に、第1図の各部の構成を詳細に示す第2図以下の図
面を用いて、この発明の1実施例装置をより詳細に説明
する。Next, an apparatus according to an embodiment of the present invention will be described in more detail with reference to FIG. 2 and subsequent drawings showing the configuration of each part in FIG. 1 in detail.
第2図の装置において、浮動小数点数の演算では、指数
部、仮数部、および仮数部の符号は、それぞれ異なる回
路で計算する事ができる。第2図は、仮数部演算手段1
.指数部演算手段2,3、および符号部演算手段59.
60を示したものである。この実施例は、IEEE75
4規格に準拠している。In the apparatus shown in FIG. 2, in floating-point number operations, the exponent part, the mantissa part, and the sign of the mantissa part can be calculated by different circuits. Figure 2 shows the mantissa calculation means 1
.. Exponent part calculation means 2, 3, and sign part calculation means 59.
60. This example uses IEEE75
Complies with 4 standards.
この実施例の仮数部演算手段1は、真の加/減算処理を
行う前に丸め処理によるインクリメントの有無を判定し
、丸め処理と真の加/減算処理を同時に行うように構成
されている。The mantissa calculation means 1 of this embodiment is configured to determine the presence or absence of increment due to rounding before performing true addition/subtraction processing, and to simultaneously perform rounding processing and true addition/subtraction processing.
装置には、符号付絶対値表現で表わされた第1オペラン
ド(仮数部Fl、指数部El、仮数部の符号S1)、第
2オペランド(仮数部F2.指数部E2.仮数部の符号
S2)、真の加/減算の何れを行なうかを示す加減制御
信号68.丸めモードを示す丸めモード信号69.演算
モードを示す信号61が入力されている。The device has a first operand (mantissa part Fl, exponent part El, sign S1 of the mantissa part) and a second operand (mantissa part F2. exponent part E2. sign S2 of the mantissa part) expressed in signed absolute value representation. ), an addition/subtraction control signal 68 .indicating whether true addition/subtraction is to be performed. Rounding mode signal 69 indicating rounding mode. A signal 61 indicating the calculation mode is input.
仮数部のフォーマットを第13図に示す。仮数部は、桁
あふれビットv、整数部の隠れビットN。The format of the mantissa part is shown in FIG. The mantissa part has an overflow bit v, and the hidden bit N of the integer part.
最小有意桁の1ビツト下の値を表わすガードピッ)G、
Gのさらに1ビツト下の値を表わす丸めビットR,Rよ
り下の全ビットの論理和であるステイッキビットStが
拡張されている。Guard pit representing the value one bit below the least significant digit)G,
A rounding bit R representing a value one bit below G, and a sticky bit St, which is the logical sum of all bits below R, are expanded.
加減算制御信号68は、真の加算を行うのか真の減算を
行うのかを示す信号であり、2つの仮数部の符号(+:
0.−:1)と演算モード(加算0、減算:1)との排
他的論理和である。丸めモード信号69とは、丸め処理
の種類を示す信号である。なお第14図に丸めモードの
1例を示す。The addition/subtraction control signal 68 is a signal indicating whether true addition or true subtraction is to be performed, and the sign (+:
0. -:1) and the operation mode (addition: 0, subtraction: 1). The rounding mode signal 69 is a signal indicating the type of rounding process. Note that FIG. 14 shows an example of the rounding mode.
また、演算モード信号61は、倍精度演算、単精度演算
、単精度倍速演算の各モードを表わす信号である°(単
精度、単精度倍速演算の場合:11倍精度演算の場合二
〇)。Further, the calculation mode signal 61 is a signal representing each mode of double-precision calculation, single-precision calculation, and single-precision double-speed calculation (for single-precision, single-precision double-speed calculation: 11 for double-precision calculation).
まず、第2図を用いて装置の各ブロックを説明する。指
数部比較回路11.14は、第1オペランドの指数部E
HI、ELIがら第2オペランドの指数部EH2,EL
2を減じて指数部大小比較信号33.35と指数部の差
信号32.34を求める。指数部比較回路11は単精度
/倍精度兼用であり、倍精度数の演算の場合は、指数部
は指数部比較回路11に於て比較される。指数部比較回
路14は、単精度専用の比較器であり、単精度倍速演算
を行う場合は、比較器11.14に於て各々独立に処理
を行う。また、指数部選択器13では、指数部大小比較
信号33によって大きい方の指数部27が選択される。First, each block of the apparatus will be explained using FIG. The exponent part comparison circuit 11.14 compares the exponent part E of the first operand.
Exponent part EH2, EL of the second operand from HI, ELI
2 is subtracted to obtain the exponent part magnitude comparison signal 33.35 and the exponent part difference signal 32.34. The exponent part comparison circuit 11 is used for single precision/double precision, and in the case of double precision number arithmetic, the exponent parts are compared in the exponent part comparison circuit 11. The exponent comparison circuit 14 is a single-precision comparator, and when performing single-precision double-speed arithmetic, the comparators 11 and 14 perform processing independently. Further, in the exponent part selector 13, the larger exponent part 27 is selected based on the exponent part size comparison signal 33.
指数選択器16では、指数部大小比較信号35によって
大きい方の指数部31が選択される。The exponent selector 16 selects the larger exponent part 31 based on the exponent part size comparison signal 35.
仮数部比較回路4は、第1オペランドの仮数部F1と第
2オペランドの仮数部F2の比較を行い、仮数部大小比
較信号36.36 .37を求める。The mantissa comparison circuit 4 compares the mantissa part F1 of the first operand and the mantissa part F2 of the second operand, and generates the mantissa part magnitude comparison signals 36, 36 . Find 37.
第5図(a)は、仮数部比較器4の詳細図、第5図(b
)は、データの入力フォーマットである。FIG. 5(a) is a detailed diagram of the mantissa comparator 4, and FIG. 5(b) is a detailed diagram of the mantissa comparator 4.
) is the data input format.
この回路は、2段の木構造を成している。第一段目は、
6つの8ビツト・コンパレータ7oと1つの5ビツト・
コンパレータ71より構成される。This circuit has a two-stage tree structure. The first stage is
Six 8-bit comparators 7o and one 5-bit comparator 7o
It is composed of a comparator 71.
各々のコンパレータは、8ビツト或は5ビット単位で各
フィールドの大小比較結果(例えば入力A。Each comparator compares the magnitude of each field in 8-bit or 5-bit units (for example, input A).
Bに対しA>B、BAA)を示す2ビツトの信号を出力
する。第2段目は、2つの3ビツト・コンパレータ72
と1つの7ビツト・コンパレータ73より構成される。A 2-bit signal indicating A>B, BAA) is output. The second stage consists of two 3-bit comparators 72.
and one 7-bit comparator 73.
7ビツト・コンパレータ73は、第1段目の全出力を入
力として倍精度数値の仮数部の大小比較を行い、比較信
号36′を出力スル。2つの3ビツト・コンパレータは
、各々第1フイールド、第2フイールドに入力された単
精度数値の仮数部FHIとFH2、及びFLIとFL2
の大小比較を行い、比較信号36.37を出力する。The 7-bit comparator 73 receives all outputs from the first stage, compares the mantissa parts of the double-precision numerical values, and outputs a comparison signal 36'. The two 3-bit comparators calculate the mantissa parts FHI and FH2, and FLI and FL2 of the single-precision numbers input in the first and second fields, respectively.
A comparison signal 36.37 is output.
仮数部交換回路5は、指数部大小比較信号33゜35と
仮数部大小比較信号36−.36.37により、第1オ
ペランド、第2オペランドの大小比較を行い、絶対値の
大きい方のオペランドの仮数部を仮数部19H,19L
、小さい方を仮数部20H,2OLとして出力する。大
小比較の論理は、以下の通りである。The mantissa exchanging circuit 5 receives an exponent magnitude comparison signal 33.35 and a mantissa magnitude comparison signal 36-. 36.37, the first and second operands are compared in size, and the mantissa part of the operand with the larger absolute value is used as the mantissa part 19H, 19L.
, the smaller one is output as the mantissa parts 20H and 2OL. The logic of the size comparison is as follows.
(1)指数部の大きさが異なる場合は、指数部の大きい
方のオペランドをオランド1
9H,19Lとする
(2)指数部の大きさが等しい場合は、仮数部の大きい
方のオペランドをオペランド
19H,19Lとする
第6図は、仮数部交換回路5の詳細図である。(1) If the sizes of the exponent parts are different, the operand with the larger exponent part is set to Holland 19H, 19L. (2) If the sizes of the exponent parts are the same, the operand with the larger mantissa part is used as the operand. 6 is a detailed diagram of the mantissa exchanging circuit 5. In FIG.
仮数部交換回路5は、セレクタ74とセレクタυ制御回
路75より成る。セレクタ【よ、第1フィールド、第2
フイールドに分割されており、第1フイールド同士、或
は第2フイールド同士を交換する。The mantissa exchanging circuit 5 includes a selector 74 and a selector υ control circuit 75. selector [yo, 1st field, 2nd field
It is divided into fields, and the first fields or the second fields are exchanged.
制御回路75は、演算モード信号61.指数部大小比較
信号33,35、仮数部比較信号36.36 37によ
り交換制御信号55.56を出力する。倍精度演算の場
合は、第1フィールド、第2フイールドは一緒に交換し
、単精度、或(A単精度倍速演算の場合は独立に交換す
る。The control circuit 75 receives the operation mode signal 61. An exchange control signal 55.56 is output using the exponent part magnitude comparison signals 33, 35 and the mantissa part comparison signals 36, 36, 37. In the case of double-precision arithmetic, the first field and the second field are exchanged together, and in the case of single-precision or (A single-precision double-speed arithmetic), they are exchanged independently.
桁合わせ回路6は、仮数部20H,2OLを指数部の差
信号32或は信号34の数だけ右シフトシテ、仮数部1
9H,19Lに桁合わせし、仮数部21H,21Lとす
る。また、並行してステ・ツキ・ビットを生成する。第
7図は、桁合わせ回路6の詳細図である。桁合わせ回路
6番よ、第1フイールド、第2フイールドに分割可能な
右)くレル・シフタ76と2つのステッキ・ビ・ソト生
成器77より構成される。倍精度演算を行う場合は、第
1フイールドと第2フイールドは連結され、第2フイー
ルドのMSBには第1フイールドよりシフトアウトした
ビット列がシフトインされる。第1フイールドのMSB
には、0がシフトインされる。The digit alignment circuit 6 shifts the mantissa parts 20H and 2OL to the right by the number of the difference signal 32 or signal 34 of the exponent part, and shifts the mantissa part 1
The digits are aligned to 9H and 19L, and the mantissa parts are 21H and 21L. Also, it generates a steady bit in parallel. FIG. 7 is a detailed diagram of the digit alignment circuit 6. Digit alignment circuit No. 6 is composed of a right-angle shifter 76 that can be divided into a first field and a second field, and two stick-by-soto generators 77. When performing double-precision arithmetic, the first field and the second field are concatenated, and the bit string shifted out from the first field is shifted into the MSB of the second field. MSB of 1st field
0 is shifted in.
ステッキ・ビットは、第2フイールドのシフタよリシフ
トアウトしたビット列の論理和として求められる。単精
度、単精度倍速演算を行う場合は、。The sticky bit is obtained as the logical sum of the bit strings reshifted out from the shifter of the second field. When performing single-precision or single-precision double-speed operations.
演算モード信号61によりシフタを第1フイールド、第
2フイールドに分割して用いる。第1フイールド、第2
フイールドともMSBには0がシフトインされる。また
、ステッキ・ビットは、第1フイールド、第2フイール
ド各々よりシフトアウトしたビット列の論理和として求
める。The shifter is used by dividing it into a first field and a second field according to an operation mode signal 61. 1st field, 2nd field
0 is shifted into the MSB of both fields. Further, the sticky bit is obtained as the logical sum of the bit strings shifted out from each of the first field and the second field.
反転回路7は、真の減算を行う場合に仮数部21H,2
1Lのビット反転を取る回路である。第1フイールド、
第2フイールドを独立に反転制御するため2つに分割さ
れた排他的論理和アレイとして構成される。The inversion circuit 7 inputs the mantissa parts 21H and 2 when performing true subtraction.
This is a circuit that performs bit inversion of 1L. 1st field,
In order to independently control the inversion of the second field, it is configured as an exclusive OR array divided into two.
丸め先見回路40は、仮数部の特定の部分と加減算制御
信号68.丸めモード信号69.第1オペランドの符号
、交換制御信号55.56の値により、演算後正規化が
不要であると仮定した場合に丸めによるインクリメント
が必要か否かを示す第1の丸め判定と正規化が必要であ
ると仮定した場合に丸めによるインクリメントが必要か
否かを示す第2の丸め判定を行なう(必要な場合に1)
。The rounding look-ahead circuit 40 receives a specific portion of the mantissa and the addition/subtraction control signal 68 . Rounding mode signal 69. Depending on the sign of the first operand and the value of the exchange control signal 55.56, the first rounding judgment and normalization are necessary, which indicates whether or not incrementing by rounding is necessary, assuming that normalization is not required after the operation. If it is assumed that there is, perform a second rounding judgment indicating whether increment by rounding is necessary (1 if necessary)
.
丸めによるインクリメントを行なうか否かは、正規化さ
れた仮数部の最小有意桁、その1つ下のビット、さらに
下の全ビットの論理和の3ビツトで決定できる。第15
図は、丸めモード別によるインクリメントの判定論理で
ある。また、丸めを行なう位置は演算後でないと決定で
きないが、その位置は真の加/減算とも各々第8図(c
)に示す2通りしかない。よって、両方の場合を仮定し
て各々の場合の解を求め、後で選択すればよい。Whether or not to increment by rounding can be determined using three bits: the least significant digit of the normalized mantissa, the bit immediately below it, and the logical sum of all bits below it. 15th
The figure shows the increment decision logic for each rounding mode. Also, although the position at which rounding is to be performed cannot be determined until after the calculation, the position is determined for both true addition and subtraction in Figure 8 (c
) There are only two options. Therefore, it is sufficient to assume both cases, find a solution for each case, and select it later.
丸め先見回路40は、第8図(a)に示した前記第1.
及び第2の丸め判定を行う回路より成る。The rounding look-ahead circuit 40 has the first rounding look-ahead circuit 40 shown in FIG. 8(a).
and a circuit that performs a second rounding determination.
倍精度演算時には、仮数部の下位5ビツトの和によって
第1.第2の丸め判定を行う。また、単精度演算、単精
度倍速演算の場合は、第1フイールドの下位5ビツトの
和より第1フイールドに対する第1.第2の丸め判定を
行い、第2フイールドの下位5ビツトの和から第2フイ
ールドに対する第1.第2の丸め判定を行う。During double-precision arithmetic, the first . Perform a second rounding determination. In the case of single-precision arithmetic or single-precision double-speed arithmetic, the first . A second rounding judgment is performed, and the first . Perform a second rounding determination.
メイン加算器41は、第1オペランドの仮数部Fl、第
2オペランドの仮数部F2.第1の丸め判定値の加/減
算を行い、丸め後に正規化が生じないと仮定した場合の
解46H,46Lを求める。The main adder 41 receives the mantissa part Fl of the first operand, the mantissa part F2 of the second operand, and so on. Addition/subtraction is performed on the first rounding determination value, and solutions 46H and 46L are obtained assuming that no normalization occurs after rounding.
メイン加算器42は、第1オペランドの仮数部F1、第
2オペランドの仮数部F2.第2の丸め判定値の加/減
算を行い、丸め後に正規化が必要であると仮定した場合
の解47H,47Lを求める。The main adder 42 receives the mantissa part F1 of the first operand, the mantissa part F2 of the second operand, and so on. Addition/subtraction is performed on the second rounding determination value, and solutions 47H and 47L are obtained assuming that normalization is necessary after rounding.
第9図は、メイン加算器41の詳細図である。メイン加
算器42とメイン加算器41は、丸め判定信号の加算位
置が異なるだけで構成は同じである。FIG. 9 is a detailed diagram of the main adder 41. The main adder 42 and the main adder 41 have the same configuration except that the addition position of the rounding determination signal is different.
メイン加算器41.42は、3人力加算器であり、初段
の全/半加算器アレイ78でC3A(carry 5
aved adder)を構成し、3つの入力値の加
算を行っている。第2段目79は、4ビツト毎にCLA
(carrylookahead adder)、さ
らに12゜或は16ビツト毎にC5A(carryse
lect adder)を構成し、最終加算を高速に
行っている。メイン加算器41.42は、演算モード信
号61により第1フイールドと第2フイールドに分割可
能である。倍精度演算時には、両フィールドを連結して
用いる。また、単精度。The main adders 41 and 42 are three-man power adders, and the first stage full/half adder array 78 performs C3A (carry 5
aved adder) to add three input values. The second stage 79 is a CLA every 4 bits.
(carrylookahead adder), and C5A (carrylookahead adder) every 12° or 16 bits.
lect adder) to perform the final addition at high speed. The main adders 41 and 42 can be divided into a first field and a second field according to the calculation mode signal 61. During double precision arithmetic, both fields are concatenated and used. Also, single precision.
単精度倍速演算時には、分割して用いる。When performing single-precision double-speed calculations, it is divided and used.
解選択回路43は、2つのメイン加算器で求めた2つの
解の内、正しい方の解を選択するセレクタである。選択
回路は、第1フイールド、第2フイールド独立に制御可
能である。倍精度演算の場合は、第1フイールド、第2
フイールドを一緒に選択する。選択の論理は、次の通り
である。The solution selection circuit 43 is a selector that selects the correct solution among the two solutions obtained by the two main adders. The selection circuit can control the first field and the second field independently. In the case of double precision arithmetic, the first field, the second
Select fields together. The logic of selection is as follows.
(1)加算を行った場合は、第1の加算器の解のあふれ
ビットVが1であれば第2の
加算器の解、0であれば第1の加算器
の解を選択する。(1) When addition is performed, if the overflow bit V of the solution of the first adder is 1, the solution of the second adder is selected, and if it is 0, the solution of the first adder is selected.
(2)減算を行った場合は、第1の加算器の解の隠れピ
ッ)Nが1であれば第1の加
算器の解、0であれば第2の加算器の
解を選択する。(2) If subtraction is performed, the hidden value of the first adder's solution) If N is 1, the first adder's solution is selected; if N is 0, the second adder's solution is selected.
プライオリティ・エンコーダ9は、正規化処理に於てシ
フトするステップ数38.39を出力する。第10図(
a)は、プライオリティ・エンコーダ9の詳細図である
。プライオリティ・エンコーダは、2段の木構造を成し
ている。第1段目80は、8つの8ビツトプライオリテ
イ・エンコーダ81から成り、8ビツト毎にエンコード
結果3ビツトを出力する。第2段目82は、2つの4ビ
ツトプライオリテイ・エンコーダ83から成り、4ビツ
ト毎にエンコード結果2ビツトを出力する。The priority encoder 9 outputs the number of steps to be shifted in the normalization process, 38.39. Figure 10 (
a) is a detailed diagram of the priority encoder 9; The priority encoder has a two-stage tree structure. The first stage 80 consists of eight 8-bit priority encoders 81 and outputs 3 bits of encoded results for every 8 bits. The second stage 82 consists of two 4-bit priority encoders 83 and outputs 2 bits of the encoded result every 4 bits.
プライオリティ・エンコーダ9は、演算モード信号61
により分割可能である。倍速度演算の場合は、第10図
(b)に示すように仮数部23(V。The priority encoder 9 receives the calculation mode signal 61
It can be divided by In the case of double speed calculation, as shown in FIG. 10(b), the mantissa part 23 (V.
Stビットを除いた55ビツト)が入力され、6ビツト
のエンコード結果38を出力する。単精度。55 bits (excluding the St bit) are input, and a 6-bit encoded result 38 is output. Single precision.
単精度倍速演算の場合には分割して用い、第10図(b
)に示すように2つ単精度数の仮数部23H,23L
(V、S t ビットを除いた26ビツト)が入力され
る。ここで第2のフィールドには、第10図(a)に示
すように23Lが3ビツトシフトして入力され、5ビツ
トのエンコード結果38゜39が出力される。In the case of single-precision double-speed arithmetic, it is divided and used, as shown in Figure 10 (b).
), the mantissa parts 23H and 23L of two single-precision numbers
(V, 26 bits excluding the S t bit) are input. Here, 23L is shifted by 3 bits and input into the second field as shown in FIG. 10(a), and a 5-bit encoded result of 38°39 is output.
正規化回路10は、隠れビットNが1になるように演算
結果23H,23Lを正規化するための回路である。第
11図は、正規化回路10の詳細図である。正規化回路
10は、1ビツト右シフタ84と左バレル・シフタ85
から構成される。正規化回路10は、演算モード信号6
1によって分割可能である。倍精度演算の場合は連結し
て用い、Vビットが1の時は1ビツト右シフト、Vビッ
トが0の時はシフト信号38の値だけ左にシフトされる
。単精度、単精度倍速演算の場合には、第1フイールド
、第2フイールドに分割して用い、各フィールドのVの
値によって1ビツト右シフト或は、シフト信号38.及
び39の値だけ左にシフトされる。何れの場合も0がL
SBにシフトインされる。The normalization circuit 10 is a circuit for normalizing the calculation results 23H and 23L so that the hidden bit N becomes 1. FIG. 11 is a detailed diagram of the normalization circuit 10. The normalization circuit 10 includes a 1-bit right shifter 84 and a left barrel shifter 85.
It consists of The normalization circuit 10 receives the calculation mode signal 6
It is divisible by 1. In the case of double precision arithmetic, they are used in conjunction; when the V bit is 1, they are shifted to the right by 1 bit, and when the V bit is 0, they are shifted to the left by the value of the shift signal 38. In the case of single-precision or single-precision double-speed arithmetic, the field is divided into a first field and a second field, and depending on the value of V in each field, a 1-bit right shift or a shift signal 38. and shifted to the left by a value of 39. In either case, 0 is L
Shifted into SB.
指数演算器12.15は正規化によってシフトした分だ
け指数を調整する回路である。指数部演算器12は、単
精度/倍精度兼用であり、倍精度演算の場合は指数部演
算器12により指数57が計算される。すなわち正規化
により1ビツト右シフトした場合にはインクリメント、
nビット左シフトした場合にはnを指数27より減する
。単精度、単精度倍速演算部の場合には、指数演算器1
2.15で各々第1フイールド、第2フイールドの指数
57.58を同様にして計算する。The exponent calculators 12 and 15 are circuits that adjust the exponent by the amount shifted by normalization. The exponent part calculator 12 is dual-purpose for single precision/double precision, and in the case of double precision arithmetic, the exponent part calculator 12 calculates an exponent 57. In other words, if it is shifted to the right by 1 bit due to normalization, it is incremented,
When shifted to the left by n bits, n is subtracted from the exponent 27. In the case of single-precision and single-precision double-speed arithmetic units, exponent operator 1
2.15, the exponents 57.58 for the first field and the second field are calculated in the same way.
符号部演算器62.63は、第1オペランドの符号部S
1より解の符号64.65を求める回路である。解の符
号64.65は、次のような論理で求める。The sign part calculators 62 and 63 calculate the sign part S of the first operand.
This is a circuit that calculates the sign 64.65 of the solution from 1. The solution code 64.65 is obtained using the following logic.
(1)真の加算を行った場合:解の符号は、Slに等し
い
(2)真の減算を行った場合:
解が0でなく、仮数部の交換が起こら
なかった場合: 81に等しい。(1) When true addition is performed: The sign of the solution is equal to Sl. (2) When true subtraction is performed: When the solution is not 0 and no exchange of mantissas occurs: It is equal to 81.
解が0でなく、仮数部の交換が起こっ
た場合: 81の反転
解が0で、丸めモードが負方向丸めで
ある場合: 負
解が0で、負方向丸め以外の丸めモー
ドの場合: 正
次に、上記第2図に示す実施例の動作について説明する
。まず、倍精度数値データの演算を行う第1の演算モー
ドについて説明する。If the solution is not 0 and the mantissa exchange occurs: If the inverted solution of 81 is 0 and the rounding mode is negative rounding: If the negative answer is 0 and the rounding mode is other than negative rounding: Positive Next, the operation of the embodiment shown in FIG. 2 will be explained. First, a first calculation mode for calculating double-precision numerical data will be described.
倍精度数値データの計算では、仮数部演算手段1は連結
して動作する。指数部は、指数部演算手段2によって処
理される。また、符号部は、符号部演算手段59によっ
て処理される。第2図に示す演算装置には、第12図(
a)に示す倍精度の数値データが入力されている。仮数
部Fl、F2は、第13図(a)示すようなフォーマッ
トで入力される。まず指数部EHI、EH2は指数部比
較器11で比較され、指数の差信号32が求められる。In calculating double-precision numerical data, the mantissa calculation means 1 operate in conjunction. The exponent part is processed by the exponent part calculation means 2. Further, the code part is processed by the code part calculation means 59. The arithmetic device shown in FIG.
The double-precision numerical data shown in a) is input. The mantissa parts Fl and F2 are input in the format shown in FIG. 13(a). First, the exponent parts EHI and EH2 are compared by the exponent part comparator 11, and an exponent difference signal 32 is obtained.
また、比較結果により大きい方の指数部27が選択され
る。仮数部Fl、F2は、仮数部比較器4に於て比較さ
れる。各々の比較結果により絶対値の大きい方のオペラ
ンドの仮数部が仮数部19として仮数部交換器5より出
力される。桁合わせ回路6では、小さい方のオペランド
の仮数部20が指数の差信号32の値に従い、右シフト
される。このとき並行してステッキ・ビットが生成され
る。真の減算を行う場合には、仮数部反転器7に於いて
、仮数部20の反転が取られる。仮数部の下位5ビツト
は丸め先見回路40に入力され、その和によって前記第
1.第2の丸め判定を行う。Further, the larger exponent part 27 is selected according to the comparison result. The mantissa parts Fl and F2 are compared in a mantissa comparator 4. Based on the results of each comparison, the mantissa part of the operand with the larger absolute value is outputted from the mantissa exchanger 5 as the mantissa part 19. In the digit alignment circuit 6, the mantissa part 20 of the smaller operand is shifted to the right according to the value of the exponent difference signal 32. At this time, sticky bits are generated in parallel. When performing true subtraction, the mantissa inverter 7 inverts the mantissa 20. The lower 5 bits of the mantissa are input to the rounding look-ahead circuit 40, and the sum is used to calculate the first . Perform a second rounding determination.
コレら仮数部19.22および丸め判定の値45は、メ
イン加算器41.42に入力され、正規化が不必要であ
ると仮定した場合の第1の演算結果46と正規化が必要
であると仮定した場合の第2の演算結果47が計算され
る。解選択回路20は、第1の演算結果46のV、Nビ
ットの値により正しい解23を選択する。選択された解
23は、プライオリティ・エンコーダ9に入力され正規
化に必要なシフト数38が求められる。選択された解は
、正規化回路10に於いてシフト数38だけシフトされ
て、正規化される。また、シフト数38は、指数部演算
器12に入力され、解の指数57が計算される。符号部
は、符号部演算器62に於て、第1オペランドの符号部
S1より求められる。The mantissa part 19.22 and the rounding judgment value 45 are input to the main adder 41.42, and normalization is necessary with the first operation result 46 assuming that normalization is unnecessary. A second calculation result 47 is calculated assuming that. The solution selection circuit 20 selects the correct solution 23 based on the values of the V and N bits of the first calculation result 46. The selected solution 23 is input to the priority encoder 9, and the number of shifts 38 required for normalization is determined. The selected solution is shifted by the number of shifts 38 in the normalization circuit 10 and normalized. Further, the shift number 38 is input to the exponent part calculator 12, and the exponent 57 of the solution is calculated. The sign part is obtained from the sign part S1 of the first operand in the sign part arithmetic unit 62.
次に単精度倍速演算である、第3の演算モードの場合に
ついて説明する。Next, the case of the third calculation mode, which is single-precision double-speed calculation, will be explained.
なお、単精度演算を行なう第2の演算モードの場合は、
単精度倍速演算の場合と同時に処理するデータの数が異
なるだけで本質的に同じであるので、説明は省略する。In addition, in the case of the second calculation mode that performs single-precision calculation,
Since this is essentially the same as in the case of single-precision double-speed calculation, the only difference being the number of data to be processed simultaneously, the explanation will be omitted.
単精度倍速演算、単精度演算の場合は、仮数部演算手段
1を分割して用いる。In the case of single-precision double-speed arithmetic or single-precision arithmetic, the mantissa calculation means 1 is divided and used.
指数部は、指数部演算手段2.指数部演算手段3により
各々処理される。また、符号部は、符号部演算手段59
.符号部演算手段60により各々処理される。The exponent part is calculated by exponent part calculation means 2. Each is processed by the exponent calculation means 3. Further, the code part is a code part calculation means 59
.. Each is processed by the sign part calculation means 60.
第2図に示す演算装置には、第12図(c)に示す単精
度の数値データが入力されている。仮数部は、第13図
(C)に示すようなフォーマットで第1の組、第2の組
のデータが仮数部演算手段の第1のフィールドと第2の
フィールドに各々入力される。まず第1の組の指数部E
HI、EH2は指数部比較器11で比較され、指数の差
信号32が求められる。また比較結果により大きい方の
指数部27が選択される。仮数部FHI、FH2は、仮
数部比較器4に於て比較される。指数部大小比較信号3
3.仮数部比較信号36により絶対値の大きい方のオペ
ランドの仮数部が仮数部19Hとして仮数部交換器5よ
り出力される。同様に第2の組の指数部ELI、EL2
が指数部比較器14で比較され、指数の差信号34が求
められる。Single-precision numerical data shown in FIG. 12(c) is input to the arithmetic unit shown in FIG. 2. As for the mantissa part, the first set and the second set of data are input into the first field and the second field of the mantissa calculation means, respectively, in the format shown in FIG. 13(C). First, the exponent part E of the first set
HI and EH2 are compared by an exponent part comparator 11, and an exponent difference signal 32 is obtained. Furthermore, the larger exponent part 27 is selected based on the comparison result. The mantissa parts FHI and FH2 are compared in the mantissa comparator 4. Exponent part size comparison signal 3
3. In response to the mantissa comparison signal 36, the mantissa of the operand having the larger absolute value is outputted from the mantissa exchanger 5 as the mantissa 19H. Similarly, the second set of exponent parts ELI, EL2
are compared by the exponent part comparator 14, and an exponent difference signal 34 is obtained.
また比較結果により大きい方の指数部31が選択される
。仮数部FLI、FL2は、仮数部比較器4に於て比較
される。指数部大小比較信号35゜仮数部比較信号37
により絶対値の大きい方のオペランドの仮数部が仮数部
19Lとして仮数部交換器5より出力される。桁合わせ
回路6では、仮数部20H,2OLが指数の差信号32
.34の値に従い、右シフトされる。このとき並行して
各フィールドのステッキ・ビットが生成される。真の減
算を行う場合には、仮数部21H,21Lの反転が取ら
れる。仮数部は丸め先見回路40に入力され、仮数部1
9H,22Hの下位5ビツトの和によって第1の組のオ
ペランドに対する第1゜第2の丸め判定信号44を求め
る。また同様に仮数部19L、22Lの下位5ビツトの
和によって第2の組のオペランドに対する第1.第2の
丸め判定信号45を求める。これら仮数部19H,22
H,19L、22Lの値及び丸め判定の値44゜45は
、メイン加算器41.42に入力され第1フイールド、
第2フイールドについて正規化が不必要であると仮定し
た場合の第1の演算結果46H,46Lと正規化が必要
であると仮定した場合の第2の演算結果47H,47L
が計算される。Furthermore, the larger exponent part 31 is selected based on the comparison result. The mantissa parts FLI and FL2 are compared in the mantissa part comparator 4. Exponent part magnitude comparison signal 35° Mantissa part comparison signal 37
Accordingly, the mantissa part of the operand having the larger absolute value is outputted from the mantissa exchanger 5 as the mantissa part 19L. In the digit alignment circuit 6, the mantissa parts 20H and 2OL are the exponent difference signals 32.
.. It is shifted to the right according to the value of 34. At this time, stick bits for each field are generated in parallel. When performing true subtraction, the mantissa parts 21H and 21L are inverted. The mantissa part is input to the rounding look-ahead circuit 40, and the mantissa part 1
A first to second rounding determination signal 44 for the first set of operands is determined by the sum of the lower five bits of 9H and 22H. Similarly, the first . A second rounding determination signal 45 is obtained. These mantissa parts 19H, 22
The values of H, 19L, 22L and the rounding judgment value 44°45 are input to the main adder 41.42, and the first field,
First calculation results 46H, 46L assuming that normalization is unnecessary for the second field, and second calculation results 47H, 47L assuming normalization is necessary for the second field.
is calculated.
解選択回路43は、演算結果46HのV、Nビットの値
により第1のフィールドの正しい解を選択する。同様に
演算結果46LのV、Nビットの値により第2のフィー
ルドの正しい解を選択する。The solution selection circuit 43 selects the correct solution of the first field based on the values of the V and N bits of the calculation result 46H. Similarly, the correct solution for the second field is selected based on the values of the V and N bits of the calculation result 46L.
選択された解23H,23Lは、プライオリティ・エン
コーダ9に入力され正規化に必要なシフト数39.38
が求められる。選択された解23H123Lは、正規化
回路10に於いてシフト数39゜38だけシフトされ正
規化される。また、シフト数39.38は、指数部演算
器12.15に入力され、解の指数が計算される。符号
部は、符号部演算662.63に於て、第1のオペラン
ドの符号部SHI、SH2より各々求められる。The selected solutions 23H and 23L are input to the priority encoder 9 and the number of shifts required for normalization is 39.38.
is required. The selected solution 23H123L is shifted and normalized by the number of shifts 39°38 in the normalization circuit 10. Further, the shift number 39.38 is input to an exponent part calculator 12.15, and the exponent of the solution is calculated. The sign part is obtained from the sign parts SHI and SH2 of the first operand in sign part operations 662 and 63, respectively.
この様に、仮数部演算手段1を第1.第2のフィールド
に分割して、独立に動作させることにより、2組の異な
る単精度数値データを同時に処理することが出来る。In this way, the mantissa calculation means 1 is set to the first . By dividing it into a second field and operating it independently, two different sets of single-precision numerical data can be processed simultaneously.
第3図は、この発明の他の実施例を示すブロック図であ
る。仮数部演算手段1゛の構成は前記実施例と異なり、
丸め処理と補数化処理が同時に生じないことを利用して
演算後の丸め処理と補数化処理を同一の回路で行なうこ
とを特徴とする。この実施例では、次のように浮動小数
点数の演算が行われる。FIG. 3 is a block diagram showing another embodiment of the invention. The structure of the mantissa calculation means 1' is different from that of the above embodiment,
The present invention is characterized in that the rounding process and the complementing process do not occur at the same time, so that the rounding process and the complementing process after the calculation are performed in the same circuit. In this embodiment, floating point operations are performed as follows.
まず、指数部El、E2の比較結果により仮数部Fl、
F2を交換する。仮数部2oは桁合わせ回路によって桁
合わせが行われる。また真の減算を行なう場合には仮数
部21の反転が取られる。First, based on the comparison result of the exponent parts El and E2, the mantissa part Fl,
Replace F2. The mantissa part 2o is digit-aligned by a digit-alignment circuit. Further, when performing true subtraction, the mantissa part 21 is inverted.
メイン加算器48により仮数部19.22は加算される
。49は反転器、50はインクリメンタであり、減算の
結果が負の数になった場合には補数化処理を行う。また
、演算の結果、丸めによるインクリメントが必要な場合
はインクリメンタ50によってインクリメントを行う。The mantissa parts 19.22 are added by the main adder 48. 49 is an inverter, and 50 is an incrementer, which performs complement processing when the result of subtraction is a negative number. Further, if the result of the calculation requires incrementing by rounding, the increment is performed by the incrementer 50.
この演算結果23は正規化回路10で正規化される。This calculation result 23 is normalized by the normalization circuit 10.
第4図は、この発明の更に他の実施例を示すブロック図
である。仮数部演算手段1′は古典的な構成であり、前
記実施例とは異なっている。この実施例では、次のよう
に浮動小数点数の演算が行われる。FIG. 4 is a block diagram showing still another embodiment of the invention. The mantissa calculation means 1' has a classical configuration, which is different from the embodiment described above. In this embodiment, floating point operations are performed as follows.
まず、指数部El、E2の比較結果により仮数部Fl、
F2を交換する。仮数部20は桁合わせ回路6によって
桁合わせが行われる。また真の減算を行う場合には仮数
部21の反転が取られる。First, based on the comparison result of the exponent parts El and E2, the mantissa part Fl,
Replace F2. The mantissa part 20 is subjected to digit alignment by a digit alignment circuit 6. Further, when performing true subtraction, the mantissa part 21 is inverted.
メイン加算器48により仮数部19.22は加算される
。51は補数化回路であり、反転回路とインクリメンタ
より構成されている。補数化回路51は、真の減算の結
果が負の数になった場合に補数比処理を行う。この結果
23は、正規化回路10で正規化され、必要ならば丸め
回路50に於いてインクリメントが行われる。52は再
正規化回路であり、丸め処理により桁上がりが生じた場
合、右に1ビツトシフトして再度正規化を行う。The mantissa parts 19.22 are added by the main adder 48. 51 is a complement circuit, which is composed of an inversion circuit and an incrementer. The complement circuit 51 performs complement ratio processing when the result of true subtraction is a negative number. This result 23 is normalized in a normalization circuit 10 and incremented in a rounding circuit 50 if necessary. Reference numeral 52 denotes a renormalization circuit, which shifts one bit to the right and performs normalization again when a carry occurs due to rounding.
仮数部演算手段1が、第3図、第4図に示すような構成
であっても各構成要素は第2図に示した実施例と同様に
仮数部演算手段1の各構成部材を第1のフィールド、第
2のフィールドに分割し、各々独立に動作させることが
可能であり、2組の異なる単精度数値データを同時に処
理することが出来る。Even if the mantissa calculation means 1 has a configuration as shown in FIGS. 3 and 4, each component of the mantissa calculation means 1 is This field can be divided into a second field and a second field, each of which can be operated independently, and two different sets of single-precision numerical data can be processed simultaneously.
以上に述べたように、仮数部演算手段を第1゜第2のフ
ィールドに分割可能にするためのわずかな回路を付加す
ることにより、単精度数値データの演算実行速度を2倍
にすることが出来る。指数部演算手段の構成は、本実施
例で挙げた構成以外にも様々なものが考えられる。しか
し指数部演算手段は演算装置全体に占めるハードウェア
の割合が低いので、どの様な構成のものであっても、本
発明の目的を達成することが可能である。As mentioned above, by adding a small amount of circuitry to enable the mantissa calculation means to be divided into the first and second fields, it is possible to double the calculation execution speed for single-precision numerical data. I can do it. Various configurations of the exponent calculation means may be considered in addition to the configuration mentioned in this embodiment. However, since the exponent calculation means occupies a small proportion of hardware in the entire calculation device, the object of the present invention can be achieved regardless of the configuration.
[発明の効果]
以上述べたように、本発明によれば、わずかなハードウ
ェアの追加により、比較的高価な仮数部演算手段を十分
に活用し、単精度演算を従来の2倍の速度で実行するこ
とが可能な高速浮動小数点数演算装置を得ることができ
る。[Effects of the Invention] As described above, according to the present invention, by adding a small amount of hardware, relatively expensive mantissa calculation means can be fully utilized, and single-precision calculations can be performed at twice the speed of conventional methods. It is possible to obtain a high-speed floating point arithmetic unit capable of executing.
第1図は本発明に従う浮動小数点数演算装置の概略を示
すブロック図、
第2図〜第4図は本発明装置の各実施例を示すブロック
図、
第5図〜第11図は第2図に示した実施例装置の一部構
成要素の詳細を示す構成図、
第12図はI EEE754規格に基づく倍精度浮動小
数点数値、単精度浮動小数点数値のフォーマットを示す
図、
第13図は仮数部のフォーマットを示す図、寵
第14.第15図は第2図に示す実施例装置のた
説明に供する図、および
第16図は従来の浮動小数点数演算装置の構成を示すブ
ロック図である。
1・・・仮数部演算手段
2・・・第1の指数部演算手段
3・・・第2の指数部演算手段
59・・・第1の符号部演算手段
60・・・第2の符号部演算手段FIG. 1 is a block diagram schematically showing a floating point arithmetic device according to the present invention, FIGS. 2 to 4 are block diagrams showing each embodiment of the device of the present invention, and FIGS. 12 is a diagram showing the format of double-precision floating-point numbers and single-precision floating-point numbers based on the IEEE754 standard. FIG. 13 is a diagram showing the mantissa part. A diagram showing the format of No. 14. FIG. 15 is a diagram for explaining the embodiment device shown in FIG. 2, and FIG. 16 is a block diagram showing the configuration of a conventional floating point arithmetic device. 1... Mantissa part calculation means 2... First exponent part calculation means 3... Second exponent part calculation means 59... First sign part calculation means 60... Second sign part calculation means
Claims (1)
度数値データの演算を行う第1の演算モードと、単精度
数値データの演算を行う第2の演算モードと、フィール
ドを分割して用い、各フィールドで異なる単精度数値デ
ータの演算を行う第3の演算モードとで作動する仮数部
演算手段を有することを特徴とする浮動小数点数演算装
置。(1) Has a bit width that can handle double-precision numerical data, and divides the field into a first calculation mode that operates on double-precision numerical data and a second calculation mode that operates on single-precision numerical data. 1. A floating-point number arithmetic device, characterized in that it has a mantissa arithmetic means that operates in a third arithmetic mode in which different single-precision numerical data are arithmetic in each field.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2084721A JP2902041B2 (en) | 1990-03-30 | 1990-03-30 | Floating point arithmetic unit |
| US08/408,125 US5590365A (en) | 1990-03-30 | 1995-03-21 | Pipeline information processing circuit for floating point operations |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2084721A JP2902041B2 (en) | 1990-03-30 | 1990-03-30 | Floating point arithmetic unit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH03282926A true JPH03282926A (en) | 1991-12-13 |
| JP2902041B2 JP2902041B2 (en) | 1999-06-07 |
Family
ID=13838549
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2084721A Expired - Fee Related JP2902041B2 (en) | 1990-03-30 | 1990-03-30 | Floating point arithmetic unit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2902041B2 (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0484219A (en) * | 1990-07-26 | 1992-03-17 | Fujitsu Ltd | Arithmetic processor and arithmetic processing method |
| US6304958B1 (en) | 1997-12-17 | 2001-10-16 | Hitachi, Ltd. | Microcomputer having data execution units mounted thereon |
| WO2018207926A1 (en) * | 2017-05-12 | 2018-11-15 | 株式会社Preferred Networks | Computation device and computation system |
| CN116933840A (en) * | 2023-08-03 | 2023-10-24 | 南京大学 | Multi-precision Posit encoding and decoding operation device and method supporting variable index bit width |
-
1990
- 1990-03-30 JP JP2084721A patent/JP2902041B2/en not_active Expired - Fee Related
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0484219A (en) * | 1990-07-26 | 1992-03-17 | Fujitsu Ltd | Arithmetic processor and arithmetic processing method |
| US6304958B1 (en) | 1997-12-17 | 2001-10-16 | Hitachi, Ltd. | Microcomputer having data execution units mounted thereon |
| WO2018207926A1 (en) * | 2017-05-12 | 2018-11-15 | 株式会社Preferred Networks | Computation device and computation system |
| US11188305B2 (en) | 2017-05-12 | 2021-11-30 | Preferred Networks, Inc. | Computation device having a multiplexer and several multipliers and computation system |
| CN116933840A (en) * | 2023-08-03 | 2023-10-24 | 南京大学 | Multi-precision Posit encoding and decoding operation device and method supporting variable index bit width |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2902041B2 (en) | 1999-06-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6820107B1 (en) | Square root extraction circuit and floating-point square root extraction device | |
| EP0472139B1 (en) | A floating-point processor | |
| US5148386A (en) | Adder-subtracter for signed absolute values | |
| JPH02196328A (en) | Floating point computing apparatus | |
| KR100203468B1 (en) | Arithmetic apparatus for floating point numbers | |
| US20200183650A1 (en) | Radix-1000 decimal floating-point numbers and arithmetic units using a skewed representation of the fraction | |
| JPH09212337A (en) | Floating point processor | |
| JP7285966B2 (en) | Multi-input floating point adder | |
| CN112783471A (en) | Device and method for calculating sine, cosine and arc tangent functions based on CORDIC algorithm | |
| US5260889A (en) | Computation of sticky-bit in parallel with partial products in a floating point multiplier unit | |
| JP3436994B2 (en) | Shift device | |
| JP4388543B2 (en) | 3-input floating-point adder / subtracter | |
| KR920003493B1 (en) | Arithmetic circuit based on floating point notation | |
| JPH03282926A (en) | Floating-point numerical arithmetic unit | |
| US20050144214A1 (en) | Shift-and-negate unit within a fused multiply-adder circuit | |
| CN112783470A (en) | Device and method for executing floating point logarithm operation | |
| JP4439060B2 (en) | Floating point adder | |
| JP2856792B2 (en) | Floating point arithmetic unit | |
| JP3124286B2 (en) | Floating point arithmetic unit | |
| JP2555577B2 (en) | Arithmetic unit | |
| JP2555135B2 (en) | Arithmetic circuit | |
| JP3100868B2 (en) | Arithmetic unit for floating point numbers | |
| JPS63158626A (en) | Arithmetic processing unit | |
| JPH0778724B2 (en) | Divider | |
| JPH07200259A (en) | Arithmetic processing method and arithmetic processing device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |