JPH0580973A - Normalized rounding device - Google Patents
Normalized rounding deviceInfo
- Publication number
- JPH0580973A JPH0580973A JP3240998A JP24099891A JPH0580973A JP H0580973 A JPH0580973 A JP H0580973A JP 3240998 A JP3240998 A JP 3240998A JP 24099891 A JP24099891 A JP 24099891A JP H0580973 A JPH0580973 A JP H0580973A
- Authority
- JP
- Japan
- Prior art keywords
- partial
- rounding
- quotient
- output
- quotients
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
(57)【要約】 (修正有)
【目的】 演算結果の丸めと正規化を高速に行う。
【構成】 商の算出時、最後に求まる部分商を除いた複
数の部分商を重複しない第1の中間値と第2の中間値に
分割し、部分和1と第1の中間値を選択する第1の選択
手段13、部分桁上げと第2の中間値を選択する第2の
選択手段14、最後に求まる部分商を除いた複数の部分
商により丸め位置を決める丸め位置判定手段15、丸め
位置を変えて丸めを行うと共に2数の加算を行う丸め位
置が異なる第1,第2の加算手段16,17、最後に求
まる部分商の最上位ビットの値を求める第3の加算手段
18、第1,第2の加算手段16,17の出力と第3の
加算手段18の出力と最後に求まる部分商を除いた複数
の部分商12を入力として、第1,第2の加算手段の出
力16,17のうちどちらの丸め結果を選択するか及び
正規化するかを決める正規化丸め判定手段19、並びに
加算手段16,17の出力の選択及び正規化する正規化
丸め手段20を備える。
(57) [Summary] (Corrected) [Purpose] Rounding and normalization of operation results are performed at high speed. [Structure] When calculating a quotient, a plurality of partial quotients excluding the finally obtained partial quotient are divided into non-overlapping first intermediate values and second intermediate values, and a partial sum 1 and a first intermediate value are selected. A first selection means 13, a second carry means 14 for selecting a partial carry and a second intermediate value, a rounding position determination means 15 for determining a rounding position by a plurality of partial quotients excluding the partial quotient finally obtained, rounding First and second adding means 16 and 17 with different rounding positions for changing positions and performing addition of two numbers, and third adding means 18 for obtaining the value of the most significant bit of the finally obtained partial quotient, The outputs of the first and second adding means are input with the outputs of the first and second adding means 16 and 17, the output of the third adding means 18 and the plurality of partial quotients 12 excluding the finally obtained partial quotient. Decide which rounding result to select, 16 or 17, and normalize And a normalization rounding means 20 for selecting and normalizing the outputs of the adding means 16 and 17.
Description
【0001】[0001]
【産業上の利用分野】本発明は、演算結果の丸めと正規
化を高速に行う正規化丸め装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a normalization rounding device for rounding and normalizing operation results at high speed.
【0002】[0002]
【従来の技術】近年、乗算アレイにより求めた部分和と
部分桁上げを加算することにより積を算出し、乗算の反
復計算によりn個の部分商を順次求め、最後にこれらの
n個の部分商を加算することにより商を算出する演算器
が存在する。この種の演算器として、特願平1−210
021号の除算装置がある。図3にn個の部分商の位置
関係を示す。図3において、51,52,53,54は
それぞれmビットの部分商1,部分商2,部分商3,部
分商nであり、乗算の反復計算により部分商1から部分
商nまで順次求められる。図3に示すように、部分商i
は最上位ビットが部分商i−1の最下位ビットに重複し
ている。2. Description of the Related Art Recently, a product is calculated by adding a partial sum and a partial carry obtained by a multiplication array, and n partial quotients are sequentially obtained by iterative calculation of multiplication, and finally, these n partial quotients are obtained. There is an arithmetic unit that calculates a quotient by adding quotients. As an arithmetic unit of this kind, Japanese Patent Application No. 1-210
There is a 021 division device. FIG. 3 shows the positional relationship of n partial quotients. In FIG. 3, 51, 52, 53, and 54 are m-bit partial quotients 1, partial quotients 2, partial quotients 3, and partial quotients n, respectively, which are sequentially obtained from partial quotients 1 to n by iterative calculation of multiplication. .. As shown in FIG. 3, the partial quotient i
Has the most significant bit overlapping the least significant bit of the partial quotient i-1.
【0003】この種の演算器における従来の技術による
正規化丸め装置の構成図を図2に示す。FIG. 2 is a block diagram showing a conventional normalization rounding device in this type of arithmetic unit.
【0004】以下、図面にしたがって従来の技術による
正規化丸め装置の動作を説明する。図2において、3
1,32はそれぞれ乗算アレイにより求められた部分
和,部分桁上げ、42はn個の部分商を格納する部分商
格納用レジスタ、43,44,48は2つの入力のうち
1つを選択する選択回路、45,46は丸め位置に初期
桁上げとして1を入力することにより丸めを行うと共に
2数の加算を行う丸め位置が異なる加算器、47は異な
る丸めを行った丸め結果のいずれを選択するか及び正規
化するかどうかを決める正規化丸め判定回路、49は正
規化を行う正規化回路、33は演算結果である。The operation of the conventional rounding device will be described below with reference to the drawings. In FIG. 2, 3
Reference numerals 1 and 32 denote partial sums and carrys respectively obtained by the multiplication array, 42 denotes a partial quotient storage register for storing n partial quotients, and 43, 44 and 48 select one of two inputs. Selector circuits, 45 and 46 perform rounding by inputting 1 as an initial carry to the rounding position and adder with two different rounding positions for adding two numbers. 47 selects one of the rounded results obtained by different rounding. A normalization rounding determination circuit that determines whether to perform normalization and normalization, 49 is a normalization circuit that performs normalization, and 33 is a calculation result.
【0005】選択回路43,44は積を算出する時及び
乗算の反復計算によりn個の部分商を求める時は、それ
ぞれ部分和31、部分桁上げ32を出力し、n個の部分
商を求めた後に商を算出する時は、n個の部分商を重複
しない第1の中間値と第2の中間値に分割し、それぞれ
第1の中間値と第2の中間値を出力する。加算器45,
46は選択回路43,44の出力を入力として、積を算
出する時は、桁上がりが生じた場合と桁上がりが生じな
かった場合の2通りの丸めを行うと共に2数の加算を行
う。また、商を算出する時は、桁落ちが生じなかった場
合と桁落ちが生じた場合の2通りの丸めを行うと共に2
数の加算を行う。乗算の反復計算によりn個の部分商を
求める時は、加算器46は部分和31、部分桁上げ32
を入力として丸めを行わずに2数の加算を行うことによ
り部分商を求め、部分商格納用レジスタに順次格納して
いく。正規化丸め判定回路47は加算器45,46の出
力の上位ビットを入力として、積を算出する時の桁上が
りが生じるかどうか、商を算出する時の桁落ちが生じる
かどうか、及び、正規化するかどうかを判定する。選択
回路48は加算器45,46の出力を入力として、正規
化丸め判定回路47の出力により2通りの丸め結果のい
ずれかを選択する。正規化回路は選択回路の出力を入力
として正規化丸め判定回路47の出力により正規化を行
い演算結果33を出力する。The selection circuits 43 and 44 output a partial sum 31 and a partial carry 32, respectively, when calculating a product and when calculating n partial quotients by iterative calculation of multiplication, and calculate n partial quotients. Then, when calculating the quotient, the n partial quotients are divided into a first intermediate value and a second intermediate value that do not overlap, and the first intermediate value and the second intermediate value are output, respectively. Adder 45,
46 receives the outputs of the selection circuits 43 and 44 as input, and when calculating a product, performs rounding in two ways when carry occurs and when carry does not occur, and adds two numbers. Also, when calculating the quotient, rounding is performed in two ways when there is no digit loss and when there is a digit loss.
Add numbers. When calculating n partial quotients by iterative calculation of multiplication, the adder 46 uses the partial sum 31 and the partial carry 32.
Is input, the partial quotient is obtained by adding two numbers without rounding, and the partial quotients are sequentially stored in the partial quotient storage register. The normalization rounding determination circuit 47 receives the upper bits of the outputs of the adders 45 and 46 as an input, whether a carry occurs when calculating a product, whether a carry occurs when calculating a quotient, and Determine whether or not. The selection circuit 48 receives the outputs of the adders 45 and 46 as input, and selects one of the two rounding results by the output of the normalized rounding determination circuit 47. The normalization circuit receives the output of the selection circuit as an input, performs normalization by the output of the normalization rounding determination circuit 47, and outputs a calculation result 33.
【0006】[0006]
【発明が解決しようとする課題】しかしながら上記のよ
うな構成の正規化丸め装置では、商を算出する時、n個
の部分商を全て求めた後に丸めと正規化を行うため、商
の算出に時間がかかるという問題があった。However, in the normalization rounding device having the above-described structure, when calculating the quotient, rounding and normalization are performed after all n partial quotients have been obtained. There was a problem that it took time.
【0007】本発明はかかる点に鑑み、演算結果の丸め
と正規化を高速に行う正規化丸め装置を提供することを
目的とする。In view of the above point, the present invention has an object to provide a normalization rounding device for rounding and normalizing an operation result at high speed.
【0008】[0008]
【課題を解決するための手段】本発明の正規化丸め装置
は、最後に求まる部分商を除いた複数の部分商を重複し
ない第1の中間値と第2の中間値に分割し、部分和と第
1の中間値を選択する第1の選択手段と、部分桁上げと
第2の中間値を選択する第2の選択手段と、最後に求ま
る部分商を除いた複数の部分商により丸め位置を決める
丸め位置判定手段と、第1の選択手段の出力と第2の選
択手段の出力を入力とし、丸め位置を変えて丸めを行う
と共に2数の加算を行う丸め位置が異なる第1,第2の
加算手段と、部分和と部分桁上げを入力として最後に求
まる部分商の最上位ビットの値を求める第3の加算手段
と、第1の加算手段の出力と第2の加算手段の出力と第
3の加算手段の出力と最後に求まる部分商を除いた複数
の部分商を入力として、第1の加算手段の出力と第2の
加算手段の出力のうちどちらの丸め結果を選択するか及
び正規化するかを決める正規化丸め判定手段と、正規化
丸め判定手段の出力により第1の加算手段の出力と第2
の加算手段の出力を選択及び正規化する正規化丸め手段
を備えたものである。The normalization rounding device of the present invention divides a plurality of partial quotients excluding the finally obtained partial quotient into a first intermediate value and a second intermediate value which do not overlap each other and partially sums them. And a first selecting means for selecting a first intermediate value, a second selecting means for selecting a partial carry and a second intermediate value, and a rounding position by a plurality of partial quotients excluding the finally obtained partial quotient. The rounding position determining means for determining, and the output of the first selecting means and the output of the second selecting means are used as inputs, rounding is performed by changing the rounding position, and addition of two numbers is performed at different rounding positions. 2 adding means, 3rd adding means for obtaining the value of the most significant bit of the partial quotient finally obtained by inputting the partial sum and the partial carry, the output of the 1st adding means and the output of the 2nd adding means And an output of the third adding means and a plurality of partial quotients excluding the finally obtained partial quotient The output of the first adding means and the output of the second adding means determines which rounding result is to be selected and which is to be normalized. The output of the adding means of 1 and the second
Is provided with a normalization rounding means for selecting and normalizing the output of the adding means.
【0009】[0009]
【作用】本発明は前記した構成により、商を算出する
時、最後に求まる部分商を除いた複数の部分商により丸
め位置を決める丸め位置判定手段を設けたことにより、
最後に求まる部分商を求めると同時に丸めと正規化を行
うことができるので、演算結果の丸めと正規化を高速に
行うことができる。According to the present invention, when the quotient is calculated, the rounding position determining means for determining the rounding position by a plurality of partial quotients excluding the finally obtained partial quotient is provided.
Since the rounding and normalization can be performed at the same time when the partial quotient finally obtained is obtained, the rounding and normalization of the operation result can be performed at high speed.
【0010】[0010]
【実施例】図1は本発明の一実施例における正規化丸め
装置の構成図を示すものである。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT FIG. 1 is a block diagram of a normalization rounding device according to an embodiment of the present invention.
【0011】以下図面にしたがって、本発明の実施例に
おける正規化丸め装置の動作について説明する。図1に
おいて、1,2はそれぞれ乗算アレイにより求められた
部分和,部分桁上げ、12は最後に求まる部分商を除い
たn−1個の部分商を格納する部分商格納用レジスタ、
13,14,20は2つの入力のうち1つを選択する選
択回路、15は丸め位置を決める丸め位置判定回路、1
6,17は丸め位置を変えて丸めを行うと共に2数の加
算を行う丸め位置が異なる加算器、18は2数の加算を
行う加算器、19は異なる丸めを行った丸め結果のいず
れを選択するか及び正規化するかどうかを決める正規化
丸め判定回路、21は正規化を行う正規化回路である。The operation of the normalization rounding device according to the embodiment of the present invention will be described below with reference to the drawings. In FIG. 1, reference numerals 1 and 2 denote partial sums and carrys respectively obtained by the multiplication array, 12 denotes a partial quotient storage register for storing n-1 partial quotients excluding the finally obtained partial quotient,
Reference numerals 13, 14, 20 designate a selection circuit for selecting one of the two inputs, 15 a rounding position determination circuit for determining a rounding position, 1
6 and 17 are adders with different rounding positions that perform rounding while changing the rounding position and add two numbers, 18 are adders that perform two number addition, and 19 is a rounded result that is different. A normalization rounding determination circuit for determining whether or not to perform normalization and a normalization circuit 21 for performing normalization.
【0012】本実施例における正規化丸め装置を用いた
演算器で扱うデータのフォーマットを図4に示す。図4
において、61は符号、62は指数、63は仮数であ
る。図4に示すように、1ビットの符号61と11ビッ
トの指数62と53ビットの仮数63からなる浮動小数
点数である。積及び商を算出する時、符号は乗数と被乗
数及び除数と被除数の符号ビットより求まり、指数は積
を算出する時、乗数と被乗数の指数を加算し、桁上がり
が生じたならばさらに1を加算することにより求まり、
商を算出する時、被除数の指数から除数の指数を減算
し、桁落ちが生じたならばさらに1を減算することによ
り求まる。よって本実施例では説明の簡略化のため仮数
の処理について説明する。また、丸めについては最下位
ビットより1つ下のビットを丸める方法を用いる。FIG. 4 shows a data format handled by an arithmetic unit using the normalized rounding device in this embodiment. Figure 4
In, 61 is a sign, 62 is an exponent, and 63 is a mantissa. As shown in FIG. 4, it is a floating point number consisting of a 1-bit code 61, an 11-bit exponent 62 and a 53-bit mantissa 63. When calculating the product and quotient, the sign is obtained from the multiplier and the multiplicand and the sign bit of the divisor and the dividend, and the exponent is the sum of the exponent of the multiplier and the multiplicand when calculating the product. It is obtained by adding,
When the quotient is calculated, it can be obtained by subtracting the exponent of the divisor from the exponent of the dividend and further subtracting 1 if a precision loss occurs. Therefore, in the present embodiment, the mantissa processing will be described for simplification of description. For rounding, a method of rounding the bit one bit below the least significant bit is used.
【0013】部分商格納用レジスタ12にはmビットの
部分商がn−1個格納される。図5に格納される部分商
を示す。図5において、71,72,73,74,75
はそれぞれ部分商1,部分商2,部分商3,部分商4,
部分商5である。図5に示すように、ここではn=6、
m=12であり、乗算の反復計算により部分商1から部
分商5までの5つの部分商が格納される。5個の部分商
は重複しない2つの中間値に分割することができる。分
割の方法はいくつかあるが、図6にその一例を示す。The partial quotient storage register 12 stores n-1 m-bit partial quotients. The partial quotient stored in FIG. 5 is shown. In FIG. 5, 71, 72, 73, 74, 75
Are partial quotient 1, partial quotient 2, partial quotient 3, partial quotient 4, respectively
Partial quotient 5. As shown in FIG. 5, here, n = 6,
Since m = 12, five partial quotients from partial quotient 1 to partial quotient 5 are stored by iterative calculation of multiplication. The five partial quotients can be divided into two non-overlapping intermediate values. There are several methods of division, an example of which is shown in FIG.
【0014】図6において、81,82は中間値であ
る。図6に示すように、中間値81は部分商1と部分商
3と部分商5と0のビット列からなり、中間値82は部
分商2と部分商4と0のビット列からなる。選択回路1
3,14はそれぞれ、積を算出する時及び乗算の反復計
算により5個の部分商を算出する時は、乗算アレイによ
り求めた部分和,部分桁上げを出力し、5個の部分商を
求めた後に最後に求まる部分商を求めると共に商を算出
する時は、図6に示す中間値81,中間値82を出力す
る。丸め位置判定回路19は部分商5により丸め位置を
決め、この出力により加算器16,17は選択回路1
3,14の出力を入力として、それぞれ丸め位置を変え
て丸めを行うと共に2数の加算を行う。また、乗算の反
復計算により5個の部分商を求める時は、加算器17は
部分和1,部分桁上げ2を入力として丸めを行わずに2
数の加算を行うことにより部分商を求め、順次部分商格
納用レジスタ12に格納していく。In FIG. 6, 81 and 82 are intermediate values. As shown in FIG. 6, the intermediate value 81 consists of a bit string of partial quotient 1, partial quotient 3, partial quotient 5 and 0, and the intermediate value 82 consists of a bit string of partial quotient 2 and partial quotient 4 and 0. Selection circuit 1
Reference numerals 3 and 14 respectively output the partial sum and the partial carry obtained by the multiplication array when calculating the product and when calculating the five partial quotients by the iterative calculation of the multiplication, and obtaining the five partial quotients. When the final partial quotient is obtained and the quotient is calculated, the intermediate value 81 and the intermediate value 82 shown in FIG. 6 are output. The rounding position determination circuit 19 determines the rounding position based on the partial quotient 5, and the adders 16 and 17 output the selection circuit 1 based on this output.
With the outputs of 3 and 14 as input, the rounding position is changed and rounding is performed, and addition of two numbers is performed. When five partial quotients are to be obtained by iterative calculation of multiplication, the adder 17 receives the partial sum 1 and the partial carry 2 as input and rounds them to 2 without rounding.
The partial quotient is obtained by adding the numbers and sequentially stored in the partial quotient storage register 12.
【0015】ここで、丸め位置判定回路15により決め
られる加算器16,17の丸め位置のパターンを図7に
示す。積を算出する時、加算器16は桁上がりが生じた
場合の丸めを行うため図7に示すように2-52のビット
を丸め、加算器17は桁上がりが生じなかった場合の丸
めを行うため2-53のビットを丸める。また、商を算出
する時も同様に桁落ちが生じなかった場合と桁落ちが生
じた場合の2通りの丸めを行えばよいが、部分商5の最
下位ビットは最後に求まる部分商の最上位ビットに重複
するため、最後に求まる部分商の最上位ビットが”1”
の場合の丸めも同時に行わなければならず、4通りの丸
めが必要になる。FIG. 7 shows a pattern of rounding positions of the adders 16 and 17 determined by the rounding position judging circuit 15. When calculating the product, the adder 16 rounds 2 -52 bits as shown in FIG. 7 because the adder 16 performs rounding when a carry occurs, and the adder 17 performs rounding when no carry occurs. So round 2 -53 bits. Similarly, when calculating a quotient, rounding can be performed in two ways, one with no loss of digits and one with loss of digits. The least significant bit of partial quotient 5 is the maximum of the partial quotient obtained last. Since it overlaps with the upper bits, the most significant bit of the final partial quotient is "1"
In the case of, rounding must be performed at the same time, and four types of rounding are required.
【0016】しかし、部分商5の下位ビットのパターン
により丸め位置を変えることにより、4通りの丸めを2
通りの丸めで行うことができる。部分商5の最下位ビッ
トは2-55のビットに対応し、このビットが”0”の時
は、最後に求まる部分商の最上位ビットの影響を無視す
ることができ、これにより加算器16は桁落ちが生じな
かった場合を行うため図7に示すように2-53のビット
を丸め、加算器17は桁落ちが生じた場合の丸めを行う
ため2-54のビットを丸める。部分商5の下位2ビット
は2-54,2-55に対応し、これらのビットが”01”で
あり、最後に求まる部分商の最上位ビットが”1”の時
は、部分商の最上位ビットの影響により部分商5の最下
位ビットが”0”の時と丸め位置が変わることはない。
部分商5の下位2ビットが”11”であり、最後に求ま
る部分商の最上位ビットが”1”の時は、桁落ちが生じ
た場合は、部分商5の最下位ビットが”0”の時と丸め
位置が変わることはないが、桁落ちが生じなかった場合
は、最後に求まる部分商の最上位ビットの影響により加
算器16は桁落ちが生じた場合の丸めを行うため図7に
示すように2-52のビットを丸める。However, by changing the rounding position according to the pattern of the lower bits of the partial quotient 5, four types of rounding can be performed.
It can be done by rounding the street. The least significant bit of the partial quotient 5 corresponds to bits 2 -55 , and when this bit is "0", the influence of the most significant bit of the partial quotient obtained last can be ignored, whereby the adder 16 7 rounds the bit of 2 -53 as shown in FIG. 7 in order to carry out the case where no digit loss occurs, and the adder 17 rounds the bit of 2 -54 as rounding when the digit loss occurs. The lower 2 bits of the partial quotient 5 correspond to 2 -54 , 2 -55 , these bits are "01", and when the most significant bit of the partial quotient finally obtained is "1", the partial quotient is the highest. Due to the influence of the upper bits, the rounding position does not change from when the least significant bit of the partial quotient 5 is "0".
When the lower 2 bits of the partial quotient 5 is "11" and the most significant bit of the partial quotient obtained last is "1", if the digit is lost, the least significant bit of the partial quotient 5 is "0". 7 does not change the rounding position, but when no digit loss occurs, the adder 16 performs rounding when a digit loss occurs due to the influence of the most significant bit of the final partial quotient. Round 2 -52 bits as shown in.
【0017】また、商を算出する時、5個の部分商の加
算を行うと同時に、加算器17は部分和1,部分桁上げ
2を入力として最後に求まる部分商の最上位ビットを求
める。正規化丸め判定回路19は加算器16,17の出
力の上位ビットと加算器18の出力と部分商5を入力と
して、2通りの丸め結果のいずれを選択するか、及び、
正規化するかどうかを判定し、これにより、選択回路は
2通りの丸め結果のいずれかを選択し、正規化回路は積
を算出する時の桁上がりが生じた場合と商を算出する時
の桁落ちが生じた場合に正規化を行い演算結果3を出力
する。Further, when calculating the quotient, the five partial quotients are added, and at the same time, the adder 17 receives the partial sum 1 and the partial carry 2 as inputs and determines the most significant bit of the final partial quotient. The normalized rounding determination circuit 19 receives the high-order bits of the outputs of the adders 16 and 17, the output of the adder 18 and the partial quotient 5 as input, and selects which of the two rounding results, and
Whether or not to normalize is determined, and accordingly, the selection circuit selects one of two rounding results, and the normalization circuit determines whether a carry occurs when calculating a product and when a quotient is calculated. When digit loss occurs, normalization is performed and the operation result 3 is output.
【0018】正規化丸め判定回路の2通りの丸め結果選
択パターンを図8,図9に示す。図8は積を算出する時
の丸め結果選択パターンであり、図9は商を算出する時
の丸め結果選択パターンである。Two types of rounding result selection patterns of the normalized rounding determination circuit are shown in FIGS. FIG. 8 shows a rounding result selection pattern when calculating a product, and FIG. 9 shows a rounding result selection pattern when calculating a quotient.
【0019】積を算出する時、桁上がりが生じた場合と
桁上がりが生じなかった場合の2つの丸め結果の21の
ビットが共に”1”の場合は、桁上がりが生じたと判定
し加算器16の丸め結果を選択し、共に”0”の場合
は、桁上がりが生じなかったと判定し加算器17の丸め
結果を選択し、それぞれが”1”,”0”の場合は、丸
めにより桁上がりが生じたとして桁上がりが生じなかっ
たと判定し加算器17の丸め結果を選択する。商を算出
する時も同様に、桁落ちが生じなかった場合と桁落ちが
生じた場合の2つの丸め結果の20のビットで桁落ちが
生じるかどうかを判定し加算器16,17の丸め結果を
選択するが、部分商5の下位2ビットが、”01”であ
り、最後に求まる部分商の最上位ビットが”1”の時
は、加算器16,17の丸め結果のいずれを選択しても
よく、部分商5の下位2ビットが”11”であり、最後
に求まる部分商の最上位ビットが”0”の時は、桁落ち
が生じたかどうかにかかわらず加算器17の丸め結果を
選択する。[0019] When calculating the product, in the case of two rounding results in 2 1 bit are "1" when a carry-up and a carry did not occur when produced, adding determines that carry has occurred When the rounding result of the adder 16 is "0", it is determined that no carry has occurred, and the rounding result of the adder 17 is selected. When the rounding results are "1" and "0", respectively, the rounding is performed. If a carry has occurred, it is determined that no carry has occurred, and the rounding result of the adder 17 is selected. Similarly, when calculating the quotient, to determine whether cancellation at 2 0 bit of the two rounding results when occurred cancellation and if that did not occur cancellation occurs rounding adder 16, 17 The result is selected, but when the lower 2 bits of the partial quotient 5 is “01” and the most significant bit of the partial quotient finally obtained is “1”, one of the rounding results of the adders 16 and 17 is selected. Alternatively, when the lower 2 bits of the partial quotient 5 is “11” and the most significant bit of the partial quotient obtained last is “0”, rounding of the adder 17 is performed regardless of whether or not a digit cancellation has occurred. Select a result.
【0020】このように本発明の一実施例の正規化丸め
装置によれば、加算器18により最後に求まる部分商を
求めると同時に丸め位置判定回路15により丸め位置を
変えて丸めを行っているので、演算結果の丸めと正規化
を高速に行うことができる。また、加算器18は最後に
求まる部分商の最上位ビットだけを求めればよいので、
加算器18を先見桁上げ回路で構成した場合、1ビット
の加算器と桁上げ回路だけで構成できるため、回路規模
は大きくならない。As described above, according to the normalized rounding device of the embodiment of the present invention, the adder 18 obtains the final partial quotient and the rounding position determining circuit 15 changes the rounding position to perform rounding. Therefore, rounding and normalization of the operation result can be performed at high speed. Further, since the adder 18 only needs to find the most significant bit of the final partial quotient,
When the adder 18 is configured by the look-ahead carry circuit, the circuit scale does not increase because it can be configured by only the 1-bit adder and the carry circuit.
【0021】以上、本発明の一実施例を説明してきた
が、本発明の一実施例では丸めの方法として浮動小数点
数の仮数の最下位ビットより1つ下のビットを丸める方
法をとっており、ANSI/IEEE Std 754
−1985規格の仕様に合った浮動小数点数乗算及び浮
動小数点除算を行うには、仮数の最下位ビット以下を順
にガードビット,ラウンドビットとし、それ以下のビッ
トの論理和をスティッキービットとし、RN(最も近い
値に丸める)、RP(+∞に向かって丸める)、RM
(−∞に向かって丸める)、RZ(0に向かって丸め
る)の4つの丸めモードを持たせて丸めを行えばよい。Although one embodiment of the present invention has been described above, one embodiment of the present invention employs a method of rounding the bit one place below the least significant bit of the mantissa of a floating point number as the rounding method. , ANSI / IEEE Std 754
In order to perform floating-point number multiplication and floating-point division that conform to the specifications of the −1985 standard, the least significant bit of the mantissa is set as the guard bit and the round bit in order, and the logical sum of the bits below it is set as the sticky bit, and RN ( Round to nearest value), RP (round toward + ∞), RM
Rounding may be performed with four rounding modes (rounding toward −∞) and RZ (rounding toward 0).
【0022】[0022]
【発明の効果】以上説明したように本発明によれば、商
を算出する時、最後に求まる部分商を求めると同時に丸
めと正規化を行うことができるので、演算結果の丸めと
正規化を高速に行う正規化丸め装置を提供することがで
き、その実用的効果は大きい。As described above, according to the present invention, when a quotient is calculated, the final partial quotient can be obtained and rounding and normalization can be performed at the same time. It is possible to provide a high-speed normalized rounding device, and its practical effect is great.
【図1】本発明における実施例の正規化丸め装置の構成
図FIG. 1 is a configuration diagram of a normalization rounding device according to an embodiment of the present invention.
【図2】従来の技術による正規化丸め装置の構成図FIG. 2 is a block diagram of a conventional normalization rounding device.
【図3】n個の部分商の位置関係を示す図FIG. 3 is a diagram showing a positional relationship of n partial quotients.
【図4】データのフォーマットを示す図FIG. 4 is a diagram showing a data format.
【図5】5個の部分商を示す図FIG. 5 is a diagram showing five partial quotients.
【図6】5個の部分商を2つの中間値に分割する方法を
示す図FIG. 6 is a diagram showing a method of dividing five partial quotients into two intermediate values.
【図7】丸め位置のパターンを示す図FIG. 7 is a diagram showing a rounding position pattern.
【図8】積を算出する時の丸め結果選択パターンを示す
図FIG. 8 is a diagram showing a rounding result selection pattern when calculating a product.
【図9】商を算出する時の丸め結果選択パターンを示す
図FIG. 9 is a diagram showing a rounding result selection pattern when calculating a quotient.
1,31 部分和 2,32 部分桁上げ 3,33 演算結果 12,42 部分商格納用レジスタ 13,14,20,43,44,48 選択回路 15 丸め位置判定回路 16,17,45,46 丸めを行うと共に2数の加算
を行う加算器 18 2数の加算を行う加算器 19,47 正規化丸め判定回路 21,49 正規化回路1,31 Partial sum 2,32 Partial carry 3,33 Operation result 12,42 Partial quotient storage register 13,14,20,43,44,48 Selection circuit 15 Rounding position determination circuit 16,17,45,46 Rounding And adder for adding two numbers 18 Adder for adding two numbers 19,47 Normalization rounding determination circuit 21,49 Normalization circuit
Claims (1)
上げ2を加算することにより積を算出し、乗算の反復計
算により複数の部分商を求め、該複数の部分商を加算す
ることにより商を算出する演算器において、最後に求ま
る部分商を除いた複数の部分商を重複しない第1の中間
値と第2の中間値に分割し、前記部分和1と前記第1の
中間値を選択する第1の選択手段13と、前記部分桁上
げ2と前記第2の中間値を選択する第2の選択手段14
と、最後に求まる部分商を除いた複数の部分商により丸
め位置を決める丸め位置判定手段15と、前記第1の選
択手段の出力と前記第2の選択手段の出力を入力とし、
丸め位置を変えて丸めを行うと共に前記入力2数の加算
を行う丸め位置が異なる第1,第2の加算手段16,1
7と、前記部分和1と前記部分桁上げ2を入力として最
後に求まる部分商の最上位ビットの値を求める第3の加
算手段18と、前記第1の加算手段の出力と前記第2の
加算手段の出力と前記3の加算手段の出力と最後に求ま
る部分商を除いた複数の部分商を入力として、前記第1
の加算手段の出力と前記第2の加算手段の出力のうちど
ちらの丸め結果を選択するか及び正規化するかを決める
正規化丸め判定手段19と、前記正規化丸め判定手段の
出力により前記第1の加算手段の出力と前記第2の加算
手段の出力を選択及び正規化する正規化丸め手段20,
21より構成されることを特徴とする正規化丸め装置。1. A product is calculated by adding a partial sum 1 and a partial carry 2 obtained by a multiplication array, a plurality of partial quotients is obtained by iterative calculation of multiplication, and the plurality of partial quotients are added. In a computing unit for calculating a quotient, a plurality of partial quotients excluding the finally obtained partial quotient are divided into a first intermediate value and a second intermediate value which do not overlap, and the partial sum 1 and the first intermediate value are divided. First selecting means 13 for selecting, and second selecting means 14 for selecting the partial carry 2 and the second intermediate value.
A rounding position determining means 15 for determining a rounding position based on a plurality of partial quotients excluding the finally obtained partial quotient, an output of the first selecting means and an output of the second selecting means,
The first and second adding means 16 and 1 having different rounding positions for changing the rounding position to perform rounding and adding the two input numbers
7, a third adder 18 for obtaining the value of the most significant bit of the partial quotient finally obtained by inputting the partial sum 1 and the partial carry 2; the output of the first adder and the second The output of the adder, the output of the adder 3 and a plurality of partial quotients excluding the final partial quotient are input, and the first
Of the output of the adding means and the output of the second adding means, the normalization rounding determination means 19 for determining which rounding result to select and normalize, and the output of the normalization rounding determination means. A normalization rounding means 20 for selecting and normalizing the output of the first adding means and the output of the second adding means,
21. A normalization rounding device comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3240998A JPH0580973A (en) | 1991-09-20 | 1991-09-20 | Normalized rounding device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3240998A JPH0580973A (en) | 1991-09-20 | 1991-09-20 | Normalized rounding device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0580973A true JPH0580973A (en) | 1993-04-02 |
Family
ID=17067809
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP3240998A Pending JPH0580973A (en) | 1991-09-20 | 1991-09-20 | Normalized rounding device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0580973A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5901803A (en) * | 1995-08-21 | 1999-05-11 | Kanzaki Kokyukoki Mfg. Co., Ltd. | Lock structure for a bonnet |
-
1991
- 1991-09-20 JP JP3240998A patent/JPH0580973A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5901803A (en) * | 1995-08-21 | 1999-05-11 | Kanzaki Kokyukoki Mfg. Co., Ltd. | Lock structure for a bonnet |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3541066B2 (en) | Method and apparatus for performing division and square root calculations in a computer | |
| US4941120A (en) | Floating point normalization and rounding prediction circuit | |
| JP2523962B2 (en) | Floating point arithmetic unit | |
| KR100232962B1 (en) | Fused floating point multiply and accumulate unit with carry correction | |
| KR20080055985A (en) | Selectable semi-precision floating-point processor | |
| JPH09269891A (en) | Partial product addition method and device, floating point multiplication method and device, floating point product sum operation method and device | |
| US5659495A (en) | Numeric processor including a multiply-add circuit for computing a succession of product sums using redundant values without conversion to nonredundant format | |
| US5132925A (en) | Radix-16 divider using overlapped quotient bit selection and concurrent quotient rounding and correction | |
| EP0356153B1 (en) | Radix-2**n divider method and apparatus using overlapped quotient bit selection and concurrent quotient rounding and correction | |
| KR100203468B1 (en) | Arithmetic apparatus for floating point numbers | |
| US7493357B2 (en) | Random carry-in for floating-point operations | |
| EP0416308A2 (en) | Rectangular array signed digit multiplier | |
| JP7285966B2 (en) | Multi-input floating point adder | |
| US20070156803A1 (en) | Overflow detection and clamping with parallel operand processing for fixed-point multipliers | |
| USH1222H (en) | Apparatus for determining sticky bit value in arithmetic operations | |
| US5278782A (en) | Square root operation device | |
| US5867413A (en) | Fast method of floating-point multiplication and accumulation | |
| US5307302A (en) | Square root operation device | |
| AU630617B2 (en) | Improved floating point unit computation techniques | |
| CN112783470A (en) | Device and method for executing floating point logarithm operation | |
| US7051062B2 (en) | Apparatus and method for adding multiple-bit binary-strings | |
| JPH04172526A (en) | Floating point divider | |
| JP3950920B2 (en) | Multiply-accumulator and data processing device | |
| Takagi | Multiple-valued-digit number representations in arithmetic circuit algorithms | |
| EP0137525A2 (en) | Arithmetic unit in data processing system with bit-extension circuitry |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20041105 |
|
| RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20041105 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060509 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060523 |
|
| A131 | Notification of reasons for refusal |
Effective date: 20060718 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060728 |
|
| A02 | Decision of refusal |
Effective date: 20061031 Free format text: JAPANESE INTERMEDIATE CODE: A02 |