JPH05313861A - Kaihei arithmetic unit - Google Patents
Kaihei arithmetic unitInfo
- Publication number
- JPH05313861A JPH05313861A JP11330992A JP11330992A JPH05313861A JP H05313861 A JPH05313861 A JP H05313861A JP 11330992 A JP11330992 A JP 11330992A JP 11330992 A JP11330992 A JP 11330992A JP H05313861 A JPH05313861 A JP H05313861A
- Authority
- JP
- Japan
- Prior art keywords
- square root
- output
- partial
- holding means
- merged
- 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
Landscapes
- Complex Calculations (AREA)
Abstract
(57)【要約】
【目的】 乗算器のハードウェア規模を低減しながら性
能低下とならない開平演算装置を提供する。
【構成】 正規化手段7の出力する2ビット単位に正規
化されたオペランドの上位をアドレスとしてテーブル情
報格納手段8より平方根の近似逆数を索引し、0番目の
剰余を正規化オペランドとする剰余保持手段10の出力
に平方根の近似逆数を乗算手段11により掛けることで
部分平方根を求め、各反復での部分平方根を桁合わせ手
段20、加算手段21により併合し、反転手段15、被
乗数生成手段16、(R+S×T)演算手段17によ
り、反復計算の次ステップでの剰余を剰余から併合平方
根と部分平方根の積を引くことにより求める。しかも、
乗算手段11の出力は、部分平方根の最下位ビットより
1ビット小さい位で丸められたものである。
(57) [Abstract] [Purpose] To provide a square root arithmetic unit that does not reduce performance while reducing the hardware scale of the multiplier. [Structure] The approximate reciprocal of the square root is indexed from the table information storage means 8 by using the higher order of the 2-bit-normalized operand output from the normalization means 7 as an address, and the 0th remainder is used as the normalization operand. The output of the means 10 is multiplied by the approximate reciprocal of the square root by the multiplication means 11 to obtain a partial square root, and the partial square roots in each iteration are merged by the digit aligning means 20 and the adding means 21, and the inverting means 15, the multiplicand generating means 16, The (R + S × T) computing means 17 obtains the remainder in the next step of the iterative calculation by subtracting the product of the merged square root and the partial square root from the remainder. Moreover,
The output of the multiplying means 11 is rounded by one bit less than the least significant bit of the partial square root.
Description
【0001】[0001]
【産業上の利用分野】本発明はデータ処理装置における
開平演算装置に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a square root calculating device in a data processing device.
【0002】[0002]
【従来の技術】従来、開平演算装置では、ニュートン・
ラプソン法を用いて開平演算を実行している例が多い。
数値Aの平方根を求めるために、まず1/√Aを求め、
それにAを掛けて√Aを求める。ニュートン・ラプソン
法では1/√Aを収束計算によって求めるのであるが、
収束までに要する繰り返し回数は逆数の初期値が真の値
に近いほど少なく、高速な開平演算装置では、3〜4回
程度の収束計算で求められることが、特開平2ー259
24号公報,または、前記公開公報に関連した米国特許
第499801号等に示されている。2. Description of the Related Art Conventionally, in the square root arithmetic unit, Newton
In many cases, square root calculation is executed using the Rapson method.
To obtain the square root of the numerical value A, first find 1 / √A,
Multiply it by A to obtain √A. In the Newton-Raphson method, 1 / √A is calculated by the convergence calculation.
The number of iterations required for convergence is smaller as the initial value of the reciprocal is closer to the true value, and in a high-speed square root calculation device, it can be obtained by convergence calculation of about 3 to 4 times.
No. 24, or U.S. Pat. No. 4,998,801 related to the above publication.
【0003】また、ニュートン・ラプソン法とは異な
り、筆算による開平計算に類似した手法を採用した開平
演算装置もある。その手法とは、反復計算によって平方
根を上位から順に毎回、同じ桁数だけ部分的に求めてい
くものであり、被開数を初期(0番目)部分剰余とし
て、i番目の部分剰余と1番目からi番目までの部分平
方根からi+1番目の部分平方根を求め、1番目からi
番目までの部分平方根の2倍にi+1番目の部分平方根
を加えたものを被乗数とし、i+1番目の部分平方根を
乗数として積を求め、i番目の部分剰余からその積を引
いてi+1番目の部分剰余とする。この手法を使用した
開平演算装置の一例が、P.MontuschiとL.
Ciminieraによる”On the Effic
ient Implementation of Hi
gher Radix SquareRoot Alg
orithms,”Proc.9th IEEE Sy
mposium on Computer Arith
metic,pp.154−161,Septembe
r 1989 に示されている。Also, unlike the Newton-Raphson method, there is a square root calculation device that employs a method similar to square root calculation by handwriting. The method is to iteratively calculate the square root in order from the top every time by the same number of digits, and the open number is the initial (0th) partial remainder, and the i-th partial remainder and the first From the i-th partial square root to the i + 1-th partial square root
The product is calculated by adding the i + 1th partial square root to twice the partial square root up to the i th, and taking the i + 1 th partial square root as a multiplier to obtain the product, and subtracting the product from the i th partial remainder And An example of a square root computing device using this method is described in P. Montuschi and L.A.
"On the Effic" by Ciminiera
ient Implementation of Hi
gher Radix SquareRoot Alg
orithms, "Proc. 9th IEEE Sy
mposium on Computer Arith
metic, pp. 154-161, Septembe
r 1989.
【0004】[0004]
【発明が解決しようとする課題】しかしながらニュート
ン・ラプソン法による上記の開平演算装置において、乗
算器には浮動小数点数入力オペランドの仮数部が被乗
数、乗数として入力されており、IEEE規格の倍精度
浮動小数点数の平方根を求める場合、リーディングビッ
トを付加した仮数部のビット長に対応した53ビット×
53ビットの乗算器を必要とする。乗算命令と開平演算
命令を同時に実行することがなく、乗算命令を実行する
ための乗算器を開平演算命令の実行でも利用する場合は
何も問題にはならない。しかし、乗算命令と開平演算命
令の間で使用するデータについて互いに依存関係がない
とき、2つの命令を同時に実行するために、開平演算用
に53ビット×53ビットの乗算器を設けるのはハード
ウェアの物量の多大な増加となり、問題となる。However, in the above Kaihei arithmetic unit based on the Newton-Raphson method, the mantissa part of the floating-point number input operand is input to the multiplier as the multiplicand and the multiplier, and the double precision floating of the IEEE standard is used. When obtaining the square root of the decimal point number, 53 bits corresponding to the bit length of the mantissa part with leading bits added
Requires a 53-bit multiplier. There is no problem if the multiplier for executing the multiplication instruction is not used at the same time for executing the multiplication instruction and the square root operation instruction, and is also used for executing the square root operation instruction. However, when there is no dependency on the data used between the multiplication instruction and the square root operation instruction, it is hardware to provide a 53-bit × 53-bit multiplier for the square root operation in order to execute two instructions at the same time. However, this is a problem because the quantity of the product increases significantly.
【0005】また、P.MontuschiとL.Ci
minieraの例では1回の反復計算で求めることが
できる桁数は2ビットであり、IEEE規格の倍精度浮
動小数点数の平方根を求める場合、仮数部53ビットに
ガードビットとラウンドビットを加えた55ビットの平
方根を求めるには28回の反復計算が必要であり、開平
演算の高速処理には不適であるという問題がある。In addition, P. Montuschi and L.A. Ci
In the example of miniera, the number of digits that can be obtained in one iterative calculation is 2 bits. To obtain the square root of a double-precision floating point number of the IEEE standard, guard bits and round bits are added to 53 bits of the mantissa part. It requires 28 times of iterative calculation to obtain the square root of a bit, which is not suitable for high-speed square root calculation.
【0006】本発明は上記問題点に鑑み、乗数のビット
長として、固定小数点数の場合はオペランド長、浮動小
数点数の場合は仮数部のビット長よりも小さい乗算器を
使用しながらも高速に平方根を求める開平演算装置を提
供するものである。In view of the above problems, the present invention uses a multiplier having a bit length of a multiplier smaller than the operand length in the case of a fixed point number and the mantissa part in the case of a floating point number, but at a high speed. The present invention provides a square root calculation device for obtaining a square root.
【0007】[0007]
【課題を解決するための手段】上記問題点を解決するた
めに本発明の開平演算装置は、入力オペランドに対する
平方根の近似逆数を索引するためのテーブル情報格納手
段と、平方根を上位より順に一定のビット数ずつ反復し
て求める際の剰余を保持するための剰余保持手段と、該
剰余保持手段から出力される剰余とテーブル情報格納手
段から出力される平方根の近似逆数とをそれぞれ被乗
数、乗数として乗算を行なうための乗算手段と、該乗算
手段の出力する積の上位を部分平方根として各反復での
平方根を併合した併合平方根を保持するための併合平方
根保持手段と、該併合平方根保持手段から出力される併
合平方根と乗算手段の出力する平方根とをひとまとめに
したデータを被乗数として生成するための被乗数生成手
段とに加えて、次の機能有する演算手段を備えることと
したものである。すなわち、該演算手段は、剰余保持手
段の出力する剰余(R)と、被乗数生成手段の出力する
被乗数(S)と、乗算手段の出力する部分平方根(T)
とを各々入力して、(R−S×T)の演算を行なうもの
である。In order to solve the above problems, a square root arithmetic unit according to the present invention has a table information storing means for indexing an approximate reciprocal of a square root with respect to an input operand, and a square root having a constant value in order from a higher order. A remainder holding means for holding a remainder when iteratively obtaining the number of bits and a remainder output from the remainder holding means and an approximate reciprocal of a square root output from the table information storage means are multiplied as a multiplicand and a multiplier, respectively. And a merged square root holding means for holding a merged square root obtained by merging the square roots in each iteration with the upper part of the product output by the multiplying means as a partial square root, and output from the merged square root holding means. In addition to the multiplicand generating means for generating as a multiplicand the data obtained by collecting the merged square root and the square root output from the multiplying means, It is obtained by a further comprising a computing means having ability. That is, the computing means outputs the remainder (R) output by the remainder holding means, the multiplicand (S) output by the multiplicand generating means, and the partial square root (T) output by the multiplying means.
And (R−S × T) are calculated by inputting each and.
【0008】しかも、本発明では演算速度の向上を図る
ために、乗算手段または(R−S×T)演算手段の出力
する積の上位を入力して部分平方根の最下位ビットより
1ビット小さい位で丸めを行なうための部分平方根算出
用加算手段を設けている。In addition, in the present invention, in order to improve the operation speed, the upper part of the product output from the multiplication means or the (RS-T) operation means is input and the bit is smaller than the least significant bit of the partial square root by one bit. An adding means for calculating a partial square root is provided for rounding.
【0009】[0009]
【作用】上記の構成により、開平演算を実行できること
を説明する前に、本発明で使用する開平演算の方法につ
いて説明する。浮動小数点数の指数部の開平処理は容易
であり、後述する本発明の実施例で説明することとし、
ここでは浮動小数点数の仮数部、または、正の固定小数
点数の開平について説明する。被開数Aは2ビット単位
の正規化を受け、(数1)を満足するものとする。 (数1) 2-2 ≦ A < 1Before explaining that the square root calculation can be executed by the above-mentioned structure, the square root calculation method used in the present invention will be described. The square root processing of the exponent part of the floating point number is easy, and will be described in the embodiment of the present invention described later.
Here, the mantissa part of a floating-point number or square root of a positive fixed-point number will be described. The numerical value A is subjected to normalization in units of 2 bits and satisfies (Equation 1). (Equation 1) 2 -2 ≤ A <1
【0010】Aの平方根を上位より一定のビット数nず
つグループ分割して、(数2)のように表現する。この
とき、aijは0または1であり、特にa11は(数1)か
ら1である。 (数2) √A=a1 +a2 +a3 +a4 +a5 +・・・・・ (ai =2-in (ai1・2n-1 +ai2・2n-2 +・・・・・+ain・20 ))The square root of A is divided into groups by a certain number n of bits from the higher order and expressed as (Equation 2). At this time, a ij is 0 or 1, and especially a 11 is 1 from (Equation 1). (Equation 2) √A = a 1 + a 2 + a 3 + a 4 + a 5 + ... (a i = 2 -in (a i1.2n -1 + a i2 / 2n-2 + ... · + a in · 2 0) )
【0011】逆に、(数2)の辺々を2乗して(数3)
を得る。 (数3) A=(a1 +a2 +a3 +a4 +a5 +・・・・・)2 On the contrary, by squaring the sides of (Equation 2) (Equation 3)
To get (Equation 3) A = (a 1 + a 2 + a 3 + a 4 + a 5 + ...) 2
【0012】Aの平方根の近似逆数をMとし、Mの精度
が(数4)の条件を満足するものとする。 (数4) |√A・M−1| ≦ 2-(n+1) It is assumed that the approximate reciprocal of the square root of A is M, and the precision of M satisfies the condition of (Equation 4). (Equation 4) | √AM-1 | ≤ 2- (n + 1)
【0013】このとき、以下の手順で平方根を求めるこ
とができ、(数4)は部分平方根をnビットずつ求める
ための十分条件になっている。 (1)A(R0 とする)にMを掛け、結果の上位の一定
のビット数nをb1 とする。 (2)R1 =R0 −b1 ×b1 を計算した後、R1 を
(1)での一定のビット数nだけ左にシフトする。以
下、(3)、(4)を必要な回数だけ繰り返す。 (3)Ri にMを掛け、結果の上位の一定のビット数n
+1をbi+1 とする。ただし、(1)でのb1 と比較し
てbi+1 は1ビット上位からとり、また、biへの補正
として更に上位に1ビット余分にとるものとする。 (4)Ri+1 =Ri −{(b1 +・・・+bi )×2+
bi+1 }×bi+1 を計算した後、Ri+1 を(1)での
一定のビット数nだけ左にシフトする。At this time, the square root can be obtained by the following procedure, and (Equation 4) is a sufficient condition for obtaining the partial square root by n bits. (1) A ( denoted as R 0 ) is multiplied by M, and the constant number n of high-order bits of the result is taken as b 1 . (2) After calculating R 1 = R 0 −b 1 × b 1 , shift R 1 to the left by the constant number of bits n in (1). Hereinafter, (3) and (4) are repeated as many times as necessary. (3) R i is multiplied by M, and a fixed number of high-order bits of the result n
Let +1 be b i + 1 . However, as compared with b 1 in (1), b i + 1 is taken from the upper one bit, and as a correction to b i , an extra one bit is taken to the upper bit. (4) R i + 1 = R i − {(b 1 + ... + b i ) × 2 +
After calculating b i + 1 } × b i + 1 , shift R i + 1 to the left by a fixed number of bits n in (1).
【0014】以上の手順でAの平方根を求めることがで
きることを次の事柄Aが成立することを証明することに
より示す。 (事柄A)1番目からi番目までの和b1 +b2 +・・
・+bi をa1 +a2 +・・・+ai と比較すると、等
しいか、2-in だけ大きいか、2-in だけ小さい。The fact that the square root of A can be obtained by the above procedure will be shown by proving that the following matter A holds. (Matter A) Sum from the 1st to the i-th b 1 + b 2 + ...
· + A b i when compared to a 1 + a 2 + ··· + a i, equal, or only 2 -in large, only 2 -in small.
【0015】(証明)i=1のとき、(数3)より、次
の(数5)が成立する。 (数5) a1 ×√A ≦ A < (a1 +2-n)×√A(Proof) When i = 1, the following (Equation 5) is established from (Equation 3). (Equation 5) a 1 × √A ≦ A <(a 1 +2 −n ) × √A
【0016】(数5)の辺々にMを掛け、(数6)を得
る。 (数6) a1 ×(1−2-(n+1))≦A×M<(a1 +2-n)×(1+2-(n+1))## EQU1 ## M is multiplied to each side of (Equation 5) to obtain (Equation 6). (Equation 6) a 1 × (1-2 − (n + 1) ) ≦ A × M <(a 1 +2 −n ) × (1 + 2 − (n + 1) )
【0017】(数6)の左辺、右辺のそれぞれの2-1か
ら2-nの位のnビットはa1 −2-n、a1 +2-nである
からA×Mの対応する位のnビットをb1 として採ると
(事柄A)がi=1のとき成立する。Since the n bits at the positions of 2 -1 to 2 -n on the left side and the right side of (Equation 6) are a 1 -2 -n and a 1 +2 -n respectively , the corresponding bits of A × M are calculated. If n bits are taken as b 1 , (Matter A) holds when i = 1.
【0018】次にi≦kまで、(事柄A)が成立したと
仮定する。k番目の部分剰余Rk は(数7)のように表
現することができる。 (数7) Rk =Rk-1 −{(b1 +b2 +・・・+bk-1 )×2+bk }×bk =Rk-2 −{(b1 +b2 +・・・+bk-2 )×2+bk-1 }×bk-1 −{(b1 +b2 +・・・+bk-1 )×2+bk }×bk ・ ・ ・ =R0 − b1 ×b1 −{b1 ×2+b2 }×b2 ・ ・ ・ −{(b1 +b2 +・・・+bk-2 )×2+bk-1 }×bk-1 −{(b1 +b2 +・・・+bk-1 )×2+bk }×bk =R0 − (b1 +b2 +・・・+bk )2 =(a1 +a2 +a3 +・・・・・・)2 −(b1 +b2 +・・・+bk )2 ={(a1 +a2 +・・・+ak )+(b1 +b2 +・・・+bk )+ak+1 +・・・} ×{(a1 +a2 +・・・+ak )−(b1 +b2 +・・・+bk )+ak+1 +・・・}Next, it is assumed that (Matter A) is satisfied until i ≦ k. The kth partial remainder Rk can be expressed as in (Equation 7). (Equation 7) R k = R k-1 − {(b 1 + b 2 + ... + b k-1 ) × 2 + b k } × b k = R k-2 − {(b 1 + b 2 + ... + B k-2 ) × 2 + b k-1 } × b k-1 − {(b 1 + b 2 + ... + b k-1 ) × 2 + b k } × b k ··· == R 0 −b 1 × b 1 - {b 1 × 2 + b 2} × b 2 · · · - {(b 1 + b 2 + ··· + b k-2) × 2 + b k-1} × b k-1 - {(b 1 + b 2 +・ ・ ・ + B k-1 ) × 2 + b k } × b k = R 0 − (b 1 + b 2 + ... + b k ) 2 = (a 1 + a 2 + a 3 + ...) 2 − (b 1 + b 2 + ··· + b k) 2 = {(a 1 + a 2 + ··· + a k) + (b 1 + b 2 + ··· + b k) + a k + 1 + ···} × {(a 1 + a 2 + ··· + a k) - (b 1 + b 2 + ··· + b k) + a k + 1 + ···}
【0019】 (i)b1 +b2 +・・・+bk =a1 +a2 +・・・+ak の場合 (数8) (2√A−ak+1 )×ak+1 ≦Rk <2√A×(ak+1 +2-(k+1)n )(I) b 1 + b 2 + ... + b k = a 1 + a 2 + ... + a k (Equation 8) (2√A−a k + 1 ) × a k + 1 ≦ R k <2√A × (a k + 1 +2- (k + 1) n )
【0020】(数8)の左辺については(2√A−a
k+1 −X)×(ak+1 +X)をXの2次関数と考えると
変域[0、2-(k+1)n )では単調増大関数であり、X=
0で最小値をとることによる。(数8)の辺々にMを掛
け、(数9)を得る。 (数9) 2(1−2-(n+1)−ak+1 )×ak+1 ≦Rk ×M <2(1+2-(n+1))×(ak+1 +2-(k+1)n )For the left side of (Equation 8), (2√A-a
When k + 1- X) * (a k + 1 + X) is considered as a quadratic function of X, it is a monotonically increasing function in the domain [0, 2- (k + 1) n ), and X =
By taking the minimum value at 0. Multiply each side of (Equation 8) by M to obtain (Equation 9). (Equation 9) 2 (1-2 − (n + 1) −a k + 1 ) × a k + 1 ≦ R k × M <2 (1 + 2 − (n + 1) ) × (a k + 1 +2 − (k + 1) n )
【0021】(数9)の左辺、右辺のそれぞれの2-kn
から2-(k+1)n+1 の位のnビットはak+1 −
2-(k+1)n 、ak+1 +2-(k+1)n であるからRk ×Mの
対応する位のnビットをbk+1 として採ると(事柄A)
がi=k+1のときにも成立する。2- kn on each of the left and right sides of ( Equation 9)
To 2 − (k + 1) n + 1 n bits are a k + 1 −
Since 2 − (k + 1) n and a k + 1 +2 − (k + 1) n , when the corresponding n bits of R k × M are taken as b k + 1 (Matter A)
Also holds when i = k + 1.
【0022】(ii)b1 +b2 +・・・+bk =a1
+a2 +・・・+ak +2-kn の場合 (数10) (2√A+2-kn )×(−2-kn +ak+1 )<Rk <2√A×(−2-kn +ak+1 +2-(k+1)n )(Ii) b 1 + b 2 + ... + b k = a 1
+ A 2 + ... + ak +2 -kn (Equation 10) (2√A + 2 -kn ) × (−2 −kn + a k + 1 ) <R k <2√A × (−2 −kn + a k +1 + 2- (k + 1) n )
【0023】(数10)の左辺については(数7)の最
終式において、この場合、乗数が負であるので、2-kn
>ak+1 +ak+2 +・・・より、2-kn −(ak+1 +a
k+2+・・・)=0として、積の絶対値を大きめに評価
した。(数10)の辺々にMを掛け、(数11)を得
る。 (数11) 2(1−2-(n+1)+2-kn )×(−2-kn +ak+1 )<Rk ×M <2(1−2-(n+1))×(−2-kn +ak+1 +2-(k+1)n )Regarding the left side of (Equation 10), in the final expression of (Equation 7), since the multiplier is negative in this case, 2 -kn
> A k + 1 + a k + 2 + ... 2− kn − (a k + 1 + a
The absolute value of the product was evaluated to be large with k + 2 + ...) = 0. Multiply each side of (Equation 10) by M to obtain (Equation 11). ( Equation 11) 2 (1-2 − (n + 1) +2 −kn ) × (−2 −kn + a k + 1 ) <R k × M <2 (1-2 − (n + 1) ) × ( -2 -kn + a k + 1 + 2- (k + 1) n )
【0024】(数11)の左辺、右辺のそれぞれの2
-kn から2-(k+1)n+1 の位のnビットは2-kn より上位
に符号ビットを付加して考えると、 −2-kn +ak+1 −2-(k+1)n 、−2-kn +ak+1 +2-(k+1)n となり、b1 +b2 +・・・+bk+1 は、a1 +a2 +
・・・+ak+1 と比較して等しいか、2-(k+1)n だけ大
きいか、2-(k+1)n だけ小さくなるので、(事柄A)が
i=k+1のときにも成立する。2 on each of the left and right sides of (Equation 11)
Considering that n bits at the 2- (k + 1) n + 1 position from -kn are added with sign bits higher than 2- kn , -2 -kn + a k + 1 -2- (k + 1) n , -2 -kn + a k + 1 + 2- (k + 1) n , and b 1 + b 2 + ... + b k + 1 is a 1 + a 2 +
... is equal to + a k + 1, is larger by 2- (k + 1) n, or is smaller by 2- (k + 1) n, so when (Matter A) is i = k + 1 Also holds.
【0025】(iii)b1 +b2 +・・・+bk =a
1 +a2 +・・・+ak −2-kn の場合 (数12) (2√A−2・2-kn )×(2-kn +ak+1 )<Rk <(2√A−2-kn )×(2-kn +ak+1 +2-(k+1)n ) (数13) 2(1−2-(n+1)−2-kn+1 )×(2-kn +ak+1 )<Rk ×M <2(1+2-(n+1)−2-kn )×(2-kn +ak+1 +2-(k+1)n )(Iii) b 1 + b 2 + ... + b k = a
In the case of 1 + a 2 + ... + ak -2 -kn (Equation 12) (2√A-2 · 2 -kn ) × (2 -kn + a k + 1 ) <R k <(2√A-2 -kn ) x (2 -kn + a k + 1 + 2- (k + 1) n ) ( Equation 13) 2 ( 1-2- (n + 1) -2 -kn + 1 ) x (2 -kn + a k +1 ) <R k × M <2 (1 + 2 − (n + 1) −2 −kn ) × (2 −kn + a k + 1 +2 − (k + 1) n )
【0026】(数13)の左辺、右辺のそれぞれの2
-kn から2-(k+1)n+1 の位のnビットと2-kn+1 として
上位に1ビットを付加して考えると、 2-kn +ak+1 −2-(k+1)n 、2-kn +ak+1 +2-(k+1)n となり、b1 +b2 +・・・+bk+1 は、a1 +a2 +
・・・+ak+1 と比較して等しいか、2-(k+1)n だけ大
きいか、2-(k+1)n だけ小さくなるので、(事柄A)が
i=k+1のときにも成立する。2 on each of the left and right sides of (Equation 13)
Considering n bits from -kn to 2- (k + 1) n + 1 and 1 bit added to the higher order as 2 -kn + 1 , 2 -kn + a k + 1 -2- (k + 1 ) n , 2 -kn + a k + 1 + 2- (k + 1) n , and b 1 + b 2 + ... + b k + 1 is a 1 + a 2 +
... is equal to + a k + 1, is larger by 2- (k + 1) n, or is smaller by 2- (k + 1) n, so when (Matter A) is i = k + 1 Also holds.
【0027】以上、(i),(ii),(iii)よ
り、i≦kまで、(事柄A)が成立したと仮定すると、
i=k+1の場合も(事柄A)が成立することが導か
れ、i=1の場合、(事柄A)が成立することは証明済
みであるから数学的帰納法により(事柄A)は任意の自
然数iについて成立する。Assuming that (Matter A) is satisfied from (i), (ii), and (iii) up to i ≦ k,
When i = k + 1, it is derived that (Matter A) holds, and when i = 1, it has been proved that (Matter A) holds. Therefore, by mathematical induction, (Matter A) is arbitrary. Applies to natural number i.
【0028】テーブル情報格納手段には、Aの平方根の
近似逆数が格納されており、Aの上位ビットをアドレス
として索引され、剰余保持手段に0番目剰余として格納
されているR0 (=A)とAの平方根の近似逆数との積
が、乗算手段により計算され、積の上位ビットとしてb
1 が得られる。次に、被乗数生成手段では1回目の反復
計算ではb1 を出力し、R0 、b1 、b1 が(R−S×
T)演算手段に入力されて、R1 が得られる。次にb1
が併合平方根保持手段に格納され、R1 が一定のビット
数だけ左シフトされた後、剰余保持手段に格納される。
以降、併合平方根のビット長が求めるべき平方根のビッ
ト長以上になるまで、i≧1として下記の処理を繰り返
す。The table information storage means stores the approximate reciprocal of the square root of A, is indexed by using the upper bits of A as an address, and is stored as 0th remainder in the remainder holding means R 0 (= A). And the approximate reciprocal of the square root of A are calculated by the multiplication means, and b is set as the high-order bit of the product.
You get 1 . Next, the multiplicand generating means outputs b 1 in the first iterative calculation, and R 0 , b 1 and b 1 are (R−S ×
T) Inputting to the calculating means, R 1 is obtained. Then b 1
Is stored in the merged square root holding means, R 1 is left-shifted by a certain number of bits, and then stored in the remainder holding means.
After that, the following process is repeated with i ≧ 1 until the bit length of the merged square root becomes equal to or larger than the bit length of the square root to be obtained.
【0029】剰余保持手段にi番目剰余として格納され
ているRi とAの平方根の近似逆数との積が、乗算手段
により計算され、積の上位ビットとしてbi+1 が得られ
る。次に、被乗数生成手段では(b1 +・・・+bi )
を左に1ビットシフトした後、bi+1 とマージして被乗
数として出力し、Ri 、{(b1 +・・・+bi )×2
+bi+1 }、bi+1 が(R−S×T)演算手段に入力
されて、Ri+1 が得られる。次に(b1 +・・・+b
i+1 )が併合平方根保持手段に格納され、Ri+1が一定
のビット数だけ左シフトされた後、剰余保持手段に格納
される。The product of R i stored as the i-th residue in the residue holding means and the approximate reciprocal of the square root of A is calculated by the multiplying means, and b i + 1 is obtained as the upper bit of the product. Next, in the multiplicand generating means (b 1 + ... + b i ).
Is shifted to the left by 1 bit and merged with b i + 1 and output as a multiplicand, and R i , {(b 1 + ... + b i ) × 2
+ B i + 1 } and b i + 1 are input to the (R−S × T) computing means to obtain R i + 1 . Next, (b 1 + ... + b
i + 1 ) is stored in the merged square root holding means, R i + 1 is left-shifted by a fixed number of bits, and then stored in the remainder holding means.
【0030】なお、Ri+1 を一定のビット数だけ左シフ
トすることなく剰余保持手段に格納して、次の反復計算
で、 Ri −{(b1 +・・・+bi )×2+bi+1 }×bi+1 を計算する直前でRi を一定のビット数だけ左シフトし
ても結果は同じである。It should be noted that R i + 1 is stored in the remainder holding means without being left-shifted by a fixed number of bits, and in the next iterative calculation, R i − {(b 1 + ... + b i ) × 2 + b The result is the same even if R i is left-shifted by a certain number of bits immediately before the calculation of i + 1 } × b i + 1 .
【0031】[0031]
【実施例】はじめに、各実施例において共通する事項を
説明する。[Embodiments] First, items common to the embodiments will be described.
【0032】各実施例では求めた平方根がIEEE規格
の浮動小数点の仮数部の小数点の位置と同一になるよう
に被開数Aを(数1)から小数点を右に2ビット移動し
た(数14)の範囲で取り扱う。 (数14) 1 ≦ A < 22 In each of the embodiments, the aperture number A is moved from (Equation 1) to the right by 2 bits (Equation 14) so that the obtained square root becomes the same as the position of the decimal point of the mantissa part of the IEEE standard floating point. ) Range. (Number 14) 1 ≦ A <2 2
【0033】平方根の近似逆数は、(数15)に示す1
2ビット(xは0または1を表す)をアドレスとして索
引される。 (数15) 01.xxxxxxxxxx 1x.xxxxxxxxxxThe approximate reciprocal of the square root is 1 shown in (Equation 15).
Two bits (x represents 0 or 1) are indexed as an address. (Equation 15) 01. xxxxxxxxxxxx 1x. xxxxxxxxxxxx
【0034】テーブル情報格納手段に格納する数値は、
平方根の逆数として、(数4)でn=11を満足する範
囲で選択した。平方根の近似逆数の精度については、計
算機を用いて確認したが、確認方法の概要を以下に示
す。Mは、区間[1,4)を3072等分した[1+k
×2-10 ,1+(k+1)×2-10 )(k=0,1,・
・・,3071)では定数である。更により平方根の近
似逆数の精度を高くするため、被開数のテーブル情報格
納手段のアドレスとして使用される最下位ビットよりも
1ビット小さい2-11 の位が0の場合は後述する方法に
よってテーブル情報格納手段の出力する値に2-16 を加
える。このことをグラフで考えると、図15に示すよう
にy=1/√xは右下がりの曲線であるから、[1+k
×2-10 ,1+(k+1)×2-10 )の左半分において
平方根の近似逆数の値を2-16 だけ上にかさあげするこ
とを意味している。よって、区間[1,4)を6144
等分した被開数Aに対する平方根の近似逆数のグラフは
図13に示す階段関数となる。一方、A×M×Mのグラ
フは図14に示すように6144個の線分が鋸の歯の形
をしている。得られた精度は以下に示す通りである(1
6進表示)。 最大値 1.004のとき、1.001FD9048 最小値 1.000のとき、0.FFE001The numerical values stored in the table information storage means are
As the reciprocal of the square root, it was selected in the range satisfying n = 11 in (Equation 4). The accuracy of the approximate reciprocal of the square root was confirmed using a computer, but the outline of the confirmation method is shown below. M is [1 + k] obtained by dividing the interval [1,4) into 3072 equal parts.
× 2 -10 , 1 + (k + 1) × 2 -10 ) (k = 0,1, ...
.., 3071) is a constant. In order to further improve the precision of the approximate reciprocal of the square root, if the 2 -11 digit , which is one bit smaller than the least significant bit used as the address of the table information storage means of the augend , is 0, the table is obtained by the method described later. Add 2 -16 to the value output by the information storage means. Considering this graphically, y = 1 / √x is a downward-sloping curve as shown in FIG. 15, so [1 + k
In the left half of × 2 -10 , 1 + (k + 1) × 2 -10 ), this means raising the value of the approximate reciprocal of the square root by 2 -16 . Therefore, the interval [1,4) is 6144.
The graph of the approximate reciprocal of the square root with respect to the evenly divided A is the step function shown in FIG. On the other hand, in the graph of A × M × M, as shown in FIG. 14, 6144 line segments are in the shape of saw teeth. The accuracy obtained is as follows (1
Hexadecimal display). When the maximum value is 1.004, 1.001FD9048 When the minimum value is 1.000, 0. FFE001
【0035】上記の値は、(数4)でn=11として式
変形を行ない、辺々2乗して得られる(数16)を満足
している。 (数16) (1−0.001)2 =0.FFE001≦A×M×M≦(1+0.001)2 =1.002001The above values satisfy (Equation 16), which is obtained by performing equation transformation with n = 11 in (Equation 4) and squaring each side. (Equation 16) (1-0.001) 2 = 0. FFE001 ≦ A × M × M ≦ (1 + 0.001) 2 = 1.200001
【0036】テーブル情報格納手段には、平方根の逆数
の2-2から2-16 の値を格納し、常に0である符号ビッ
トと常に1である2-1ビットはテーブルには直接格納し
ないが、実施例において逐一説明を加えるのは煩わしい
ので、先頭2ビットとして01がテーブルに含まれてい
るように説明する。乗算を実行する場合には、乗数を1
ビット重複させた3ビット単位のグループに分割して表
1に示すBoothのアルゴリズムに従って被乗数の倍
数を発生させ、樹木状に構成した桁上げ保留加算器群に
よって2個の部分桁上げと部分和になるまで求め、この
2つを桁上げ伝播加算器で加算して最終的な積を求め
る。剰余と平方根の近似逆数の乗算では、テーブルから
読みだした値に対して、先頭に1を付加するとともに、
末尾に、アドレスとして使用するビットの右の隣接1ビ
ットの反転を付加する。乗算では右に付加したビットを
乗数の最下位ビットとすることによって2-17 倍ではな
く、2-16 倍の効果を持たせる。The table information storage means stores values of 2 −2 to 2 −16 , which are the reciprocal of the square root, and the sign bit which is always 0 and the 2 −1 bit which is always 1 are not directly stored in the table. Since it is troublesome to add the description one by one in the embodiment, the description will be made so that 01 is included in the table as the first 2 bits. When performing multiplication, set the multiplier to 1
Divide into groups of 3-bit units with bits overlapped to generate a multiple of the multiplicand according to the Booth algorithm shown in Table 1, and to generate two partial carry and partial sum by a carry hold adder group configured like a tree. Then, the two are added by the carry propagation adder to obtain the final product. When multiplying the remainder by the approximate reciprocal of the square root, 1 is added to the beginning of the value read from the table, and
At the end, the inversion of the adjacent 1 bit to the right of the bit used as the address is added. In multiplication, the bit added to the right is used as the least significant bit of the multiplier, so that the effect is not 2 -17 times but 2 -16 times.
【0037】[0037]
【表1】 [Table 1]
【0038】(R−S×T)の演算では、上述した乗算
器の構成に対して、Rを一種の倍数として樹木状桁上げ
保留加算器群に入力し、また、{R+S×(−T)}の
演算となるように乗数の入力の1の補数をとり、最下位
ビットとして1を付加することによって、上記の2-17
倍ではなく2-16 倍の効果を持つのと同じ効果により、
実質的に(R−S×T)の演算手段で乗数が2の補数と
なるようにしている。なお、適当に符号ビットを上位に
拡張すると負の数に対しても2の補数表示で乗算が実行
できることは、この分野の技術者にとってはよく知られ
ている。In the calculation of (R−S × T), R is input to the tree-like carry-reserving adder group as a kind of multiple with respect to the configuration of the multiplier described above, and {R + S × (-T )} Is obtained by taking the 1's complement of the input of the multiplier and adding 1 as the least significant bit to the above 2-17
With the same effect that it has a 2-16x effect instead of a double,
The multiplier is made to be a two's complement substantially by an arithmetic means of (RS). It is well known to those skilled in the art that multiplication of the sign bit can be executed in the 2's complement notation by appropriately expanding the sign bit to the higher order.
【0039】また、各請求項の中では部分平方根算出用
加算手段を有する開平演算装置では乗算手段または(R
+S×T)演算手段の出力を部分平方根算出用加算手段
の入力としているが、各実施例においては、乗算手段ま
たは(R+S×T)演算手段の内部に部分平方根算出用
加算手段を含んでいる。これは乗算において部分桁上げ
と部分和が求められた段階で積を求めるための桁上げ伝
播加算を行なうのと同時に丸めを伴う部分平方根を求め
る加算を行ない、演算速度の向上を図っていることによ
る。このような実施例における乗算手段または(R+S
×T)演算手段の内部に部分平方根算出用加算手段を含
む場合も本発明の対象である。個別に各実施例で、部分
平方根算出用加算手段を説明するのは紙面をいたずらに
費やすだけなので、第1の実施例に対応した場合のみこ
こで説明し、個別の実施例では乗算手段または(R+S
×T)演算手段の部分平方根を算出する内部動作につい
ては説明を省くこととする。なお、部分平方根を丸める
目的は、必要な桁数だけ平方根を求めたときに真の平方
根と最下位ビット(LSB)で比較したとき1だけ小さ
いことがある、例えば1の平方根が0.111・・・
(2進数表示)となることを回避するためであり、逆に
正確な部分平方根ai と比較してbi が2-inだけ大き
いときは1ビット下位は0であり、丸めることによって
更に+2-in されることはないので部分平方根bi を1
ビット下位で丸めることによる悪影響はない。Further, in each claim, in the square root arithmetic unit having the adding means for calculating the partial square root, the multiplying means or (R
The output of the + S × T) calculating means is used as the input of the adding means for calculating the partial square root, but in each embodiment, the adding means for calculating the partial square root is included inside the multiplying means or the (R + S × T) calculating means. . This is to carry out carry propagation addition to find the product at the stage where the partial carry and partial sum are found in the multiplication, and at the same time to perform the addition to find the partial square root with rounding to improve the operation speed. by. Multiplying means or (R + S in such an embodiment
× T) The case where the adding means for calculating the partial square root is included inside the calculating means is also an object of the present invention. In each of the embodiments, the explanation of the addition means for calculating the partial square root is performed by mischievous space, so that only the case corresponding to the first embodiment will be described here, and the multiplication means or ( R + S
× T) The description of the internal operation of the calculation means for calculating the partial square root will be omitted. The purpose of rounding the partial square root may be smaller by 1 when comparing the true square root with the least significant bit (LSB) when the square root is obtained by the required number of digits. For example, the square root of 1 is 0.111.・ ・
This is for avoiding (binary number display), and conversely, when b i is larger by 2 −in than the accurate partial square root a i , the lower one bit is 0, and by rounding it further +2 -Because it is not in, the partial square root b i is 1
There is no adverse effect from rounding at the lower bits.
【0040】図12は、乗算手段(本発明の第1の実施
例)の内部ブロック図である。図12において401か
ら409は倍数発生手段(ML)、410から416は
桁上げ保留加算手段(CSA)、417は桁上げ伝播加
算手段(CPA)、418と419は部分平方根算出用
加算手段(CPA1,CPA2)、420は先見桁上げ
手段(LAC)である。倍数発生手段401から409
は各々被乗数を入力し、また、乗数については隣接する
倍数発生手段と1ビット重複して3ビットの乗数を入力
し、表1に示す被乗数の倍数を発生する。倍数発生手段
401から409の出力は桁上げ保留加算手段410か
ら412にそれぞれ図12に示すように入力され、桁上
げ保留加算が実行された後、桁上げ保留加算手段413
から416により、最終的に部分桁上げと部分和の2つ
にまとめられる。桁上げ保留加算手段416の出力する
部分桁上げと部分和の272から20 までのビットと、2
71から258までのビットと、272から259までのビット
はそれぞれ、桁上げ伝播加算手段417と先見桁上げ手
段420、第1の部分平方根算出用加算手段418、第
2の部分平方根算出用加算手段419に入力される。先
見桁上げ手段420では第1の部分平方根算出用加算手
段418に対しては258への桁上げを予測して出力する
一方、第2の部分平方根算出用加算手段419に対して
は259への桁上げを予測して出力する。両部分平方根算
出用加算手段418、419ではそれぞれ258、259の
位で丸め加算を行ない、271から259、272から260の
13ビットを符号1ビット、データ12ビットの部分平
方根として出力する。FIG. 12 is an internal block diagram of multiplication means (first embodiment of the present invention). In FIG. 12, 401 to 409 are multiple generation means (ML), 410 to 416 are carry hold addition means (CSA), 417 is carry propagation addition means (CPA), 418 and 419 are addition means for partial square root calculation (CPA1). , CPA2), 420 are look-ahead carry means (LAC). Multiple generation means 401 to 409
Input a multiplicand, and input a multiplicand of 3 bits by overlapping the adjacent multiplier generating means by 1 bit, and generate a multiple of the multiplicand shown in Table 1. The outputs of the multiple generation means 401 to 409 are input to the carry hold addition means 410 to 412 as shown in FIG. 12, respectively, and after the carry hold addition is executed, the carry hold addition means 413.
From 416 to 416, they are finally grouped into two: partial carry and partial sum. And bits from 2 72 to 2 0 parts carry a partial sum output from the carry save adder means 416, 2
And bits from 71 to 2 58, respectively bits from 2 72 to 2 59, carry propagate adder means 417 and the look ahead carry means 420, the first partial square root calculation adding unit 418, calculating a second partial square It is input to the adding means 419 for use. The foreseeing carry means 420 predicts and outputs a carry to 2 58 to the first adding means 418 for calculating a partial square root, while it outputs 2 59 to the adding means 419 for calculating a second partial square root. Predict and output carry to. The addition means 418 and 419 for calculating both partial square roots perform rounding addition at the positions of 2 58 and 2 59 , respectively, and 13 bits of 2 71 to 2 59 and 2 72 to 2 60 are 1-bit sign and 12-bit partial square root of data. Output as.
【0041】以下、7つの実施例について述べる。実施
例では具体的な数値例を引用するが紙面の節約のため特
に断わらない限り、数値は16進表示とする。また、数
値例を示した図において複数の実施例で引用しているた
め、一部の実施例に対しては余分に符号ビットが拡張さ
れているようにみえる。実施例3(図5,図6)と実施
例6(図10,図11)のベクトル開平演算装置では対
応する請求項3と請求項8に比較すると、データの保持
手段が請求項よりも多く設けているが、本発明は請求項
でのデータの保持手段の個数に限定されるものではな
く、使用するハードウェア回路に応じて最適なパイプラ
インのピッチになるようにデータの保持手段の演算装置
における配置を決めればよい。また、実施例3のベクト
ル開平演算装置では対応する請求項3に比較すると、指
数定数加算手段と指数保持手段の配置が一致していない
が仮数部に比較して指数部は簡単に求められるので仮数
部の演算結果が求められるまでの任意の指数保持手段の
間に指数に対する演算手段を挿入すればよい。Seven examples will be described below. In the embodiments, specific numerical examples are cited, but the numerical values are displayed in hexadecimal unless otherwise specified in order to save space. In addition, since reference is made in a plurality of embodiments in the figures showing numerical examples, it seems that the code bits are excessively extended for some embodiments. In the vector square root computing devices of the third embodiment (FIGS. 5 and 6) and the sixth embodiment (FIGS. 10 and 11), when the corresponding claims 3 and 8 are compared, the data holding means is more than the claims. Although the present invention is provided, the present invention is not limited to the number of data holding means in the claims, and the operation of the data holding means is performed so that the pipeline pitch is optimum according to the hardware circuit used. The arrangement in the device may be determined. Further, in the vector square root computing device of the third embodiment, when compared to the corresponding claim 3, the arrangements of the exponent constant adding means and the exponent holding means do not match, but the exponent part can be easily obtained compared to the mantissa part. The arithmetic means for the exponent may be inserted between arbitrary exponent holding means until the arithmetic result of the mantissa part is obtained.
【0042】(実施例1)図1は本発明の第1の実施例
に係る浮動小数点開平演算装置のブロック図を示すもの
である。本実施例の浮動小数点開平演算装置はIEEE
規格の倍精度浮動小数点数を入力して、同じ倍精度浮動
小数点数の平方根を出力し、部分平方根のデータとして
のビット長が12で部分平方根間には1ビットの重複が
ある。図1において、1は入力レジスタ、2は例外検出
手段、3は指数定数減算手段、4はシフタ、5は指数定
数加算手段、6はリーディングビット付加回路、7は正
規化手段、8はテーブル情報格納手段、9はマルチプレ
クサ、10は剰余保持手段、11は乗算手段、12はシ
フタ、13はマルチプレクサ、14は併合平方根保持手
段、15は反転手段、16は被乗数生成手段、17は
(R+S×T)演算手段、18は定数減算手段、19は
マルチプレクサ、20は桁合わせ手段、21は加算手段
である。(Embodiment 1) FIG. 1 is a block diagram of a floating point square root arithmetic unit according to a first embodiment of the present invention. The floating point square root arithmetic unit of this embodiment is IEEE
A standard double-precision floating-point number is input, the square root of the same double-precision floating-point number is output, the bit length as the data of the partial square root is 12, and there is an overlap of 1 bit between the partial square roots. In FIG. 1, 1 is an input register, 2 is exception detecting means, 3 is exponential constant subtracting means, 4 is shifter, 5 is exponential constant adding means, 6 is a leading bit adding circuit, 7 is normalizing means, and 8 is table information. Storing means, 9 is a multiplexer, 10 is a remainder holding means, 11 is a multiplying means, 12 is a shifter, 13 is a multiplexer, 14 is a merged square root holding means, 15 is an inverting means, 16 is a multiplicand generating means, and 17 is (R + S × T). ) Computation means, 18 is constant subtraction means, 19 is a multiplexer, 20 is digit alignment means, and 21 is addition means.
【0043】以下、具体的な数値例を用いて図1に示す
浮動小数点開平演算装置の動作を説明する。図2,図3
はオペランドが入力されてから、各々の手段で処理され
ていく過程を示している。はじめにオペランドとして7
C88B89EAF092E9Fが入力され、入力レジ
スタ1にセットされる。例外検出手段2では入力オペラ
ンドが負の場合、データ例外として検出し、浮動小数点
開平演算装置の外部の命令実行制御部に対して例外が発
生していることを通知する。本数値例では(以下では、
この前提を省略する)オペランドは正であるので例外は
検出されない。入力レジスタ1の出力の262から252の
指数に対して、指数定数減算手段3により3FFが引か
れた後、シフタ4により右に1ビットシフトされ、指数
定数加算手段5により再び3FFが加算され、結果の指
数が求められる。リーディングビット付加回路6では入
力レジスタ1の出力の251から20 の仮数部に対して先
頭にリーディングビットの1が付加される。正規化手段
7では、入力レジスタ1の出力の252のビットが1の場
合入力を左に1ビットシフトして、また、入力レジスタ
1の出力の252のビットが0の場合入力を左に2ビット
シフトして出力する。テーブル情報格納手段8には正規
化手段7の254から243の12ビットが入力され、09
1A0が出力される。さらにこの出力の最下位ビットと
して正規化手段7の242のビットを反転したものが付加
されるのであるが、本例では1が付加され、乗算手段1
1での実質的な乗数は091A1となる。マルチプレク
サ9では正規化手段7の出力を選択し、この出力が剰余
保持手段10にセットされる。このとき、併合平方根保
持手段14はゼロにリセットされる。乗算手段11で6
2E27ABC24BA7Cと091A1の乗算が行な
われ、0384077F3C120B983FCの積が
求められると同時に1回目の反復では258の位で、2回
目以降の反復では259の位で積を丸めた結果がマルチプ
レクサ13に対して出力される。マルチプレクサ13で
は乗算手段11の271から259の13ビットを符号1ビ
ット、データ12ビットの1番目の部分平方根として選
択する。反転手段15では部分平方根を入力してビット
反転するとともに最下位ビットに1を付加して出力す
る。また、被乗数生成手段16では、1回目の反復では
256から244までにマルチプレクサ13の出力を埋め込
み、他のビットをゼロとして出力する。(R+S×T)
演算手段17ではシフタ12の出力する剰余保持手段1
0の出力を左に11ビットシフトしたものをR、被乗数
生成手段16の出力をS,反転手段15の出力をTとし
て入力し、(R+S×T)の演算を実行する。(R+S
×T)演算手段17の出力0FD5E125D3E00
0はマルチプレクサ9により選択され、剰余保持手段1
0にセットされる。一方、定数減算手段18ではマルチ
プレクサ13の出力のLSBから1を引く。マルチプレ
クサ19は、(R+S×T)演算手段17の出力が負の
場合、定数減算手段18の出力を選択し、それ以外の場
合はマルチプレクサ13の出力を選択する。1回目の反
復では上記の条件を判断してマルチプレクサ13の出力
を選択する。桁合わせ手段20では各反復での部分平方
根を併合するための桁合わせを実行する。具体的には、
部分平方根が負の場合には、マルチプレクサ19の出力
の13ビットの先頭2ビットをゼロに抑止し、また、部
分平方根が正の場合には、マルチプレクサ19の出力の
13ビットを、上位の併合平方根とのビットの重みがつ
り合うようにシフトを行ない、出力する。1番目の部分
平方根に対しては、256から244に入力データを整列さ
せ、出力する。加算手段21では併合平方根保持手段1
4の出力と、桁合わせ手段20の出力を入力して加算を
行ない、結果を併合平方根保持手段14にセットする。The operation of the floating point square root arithmetic unit shown in FIG. 1 will be described below by using specific numerical examples. 2 and 3
Shows the process of processing by each means after the operand is input. First as an operand 7
C88B89EAF092E9F is input and set in the input register 1. When the input operand is negative, the exception detection unit 2 detects it as a data exception and notifies the instruction execution control unit outside the floating point square root arithmetic unit that an exception has occurred. In this numerical example (in the following,
(This assumption is omitted.) The operand is positive, so no exception is detected. The exponents from 2 62 to 2 52 of the output of the input register 1 are subtracted by 3FF by the exponent constant subtracting means 3, then shifted right by 1 bit by the shifter 4, and added by 3FF again by the exponential constant adding means 5. And the resulting index is determined. The leading bit adding circuit 6 adds a leading bit 1 to the head of the mantissa part of 2 51 to 2 0 of the output of the input register 1. In the normalizing means 7, when the 2 52 bits of the output of the input register 1 is 1, the input is shifted left by 1 bit, and when the 2 52 bits of the output of the input register 1 is 0, the input is moved to the left. 2 bits are shifted and output. 12 bits from 2 54 to 2 43 of the normalization means 7 are input to the table information storage means 8, and 09
1A0 is output. Further, as the least significant bit of this output, a bit obtained by inverting the 2 42 bit of the normalizing means 7 is added, but in this example, 1 is added and the multiplying means 1 is added.
The actual multiplier at 1 is 091A1. The multiplexer 9 selects the output of the normalizing means 7, and this output is set in the surplus holding means 10. At this time, the merged square root holding means 14 is reset to zero. 6 by multiplication means 11
The product of 2E27ABC24BA7C and 091A1 is multiplied, and the product of 0384077F3C120B983FC is obtained, and at the same time, the result of rounding the product at 2 58 in the first iteration and at 2 59 in the second and subsequent iterations is the result for multiplexer 13. Is output. Code 1 bit 13 bits 2 71 2 59 multiplexers 13, multiplying unit 11, selects as the first partial square root of the data 12 bits. The inverting means 15 inputs the partial square root, inverts the bits, adds 1 to the least significant bit, and outputs it. Also, in the multiplicand generating means 16, in the first iteration, the output of the multiplexer 13 is embedded from 2 56 to 2 44 and the other bits are output as zero. (R + S × T)
In the calculation means 17, the surplus holding means 1 output from the shifter 12
The value obtained by shifting the output of 0 to the left by 11 bits is input as R, the output of the multiplicand generating means 16 is input as S, and the output of the inverting means 15 is input as T, and the operation of (R + S × T) is executed. (R + S
XT) Output 0FD5E125D3E00 of the calculation means 17
0 is selected by the multiplexer 9, and the surplus holding means 1
It is set to 0. On the other hand, the constant subtracting means 18 subtracts 1 from the LSB of the output of the multiplexer 13. The multiplexer 19 selects the output of the constant subtracting means 18 when the output of the (R + S × T) computing means 17 is negative, and selects the output of the multiplexer 13 otherwise. In the first iteration, the above condition is judged and the output of the multiplexer 13 is selected. The digit alignment means 20 performs digit alignment for merging the partial square roots in each iteration. In particular,
When the partial square root is negative, the first 2 bits of the 13 bits of the output of the multiplexer 19 are suppressed to zero, and when the partial square root is positive, the 13 bits of the output of the multiplexer 19 are set to the upper merged square root. Shift and output so that the bit weights of and are balanced. For the first partial square root, align the input data from 2 56 to 2 44 and output. In the adding means 21, the merged square root holding means 1
The output of 4 and the output of the digit aligning means 20 are input to perform addition, and the result is set in the merged square root holding means 14.
【0044】次に2回目の反復計算に入る。テーブル情
報格納手段8の出力は2回目以降も1回目と変わらな
い。剰余保持手段10にセットされた1番目の剰余R1
の0FD5E125D3E000に091A1が乗算手
段11により掛けられ、積009021A0905CC
1FE000が出力される。272から260の0090が
符号1ビット、データ12ビットの2番目の部分平方根
としてマルチプレクサ13により選択される。反転手段
15では0090が反転され、1F6Fとなり、最下位
ビットとして1が付加されて出力され、(R+S×T)
演算手段17では実質的に乗数として1F70で演算が
行なわれる。一方、被乗数生成手段16では、併合平方
根保持手段14の出力を左に1ビットシフトするととも
に、マルチプレクサ13の出力する13ビットの先頭ビ
ットを除く12ビットを244から233へ埋め込み、0E
1012000000000を出力する。(R+S×
T)演算手段17ではシフタ12の出力する剰余保持手
段10の出力を左に11ビットシフトしたものをR、被
乗数生成手段16の出力をS,反転手段15の出力をT
として入力し、(R+S×T)の演算を実行する。(R
+S×T)演算手段17の出力1E672E9F000
000はマルチプレクサ9により選択され、剰余保持手
段10にセットされる。マルチプレクサ19は、マルチ
プレクサ13の出力を選択して出力し、桁合わせ手段2
0では13ビットの入力を245から233に整列させる。
加算手段21では併合平方根保持手段14の出力と、桁
合わせ手段20の出力を入力して加算を行ない、070
812000000000を出力する。併合平方根保持
手段14では加算手段21の出力をセットする。Next, the second iterative calculation is started. The output of the table information storage means 8 is the same as that of the first time after the second time. The first surplus R 1 set in the surplus holding means 10.
0FD5E125D3E000 is multiplied by 091A1 by the multiplication means 11 to obtain the product 009021A0905CC.
1FE000 is output. Numerals 2 72 to 2 60 0090 are selected by the multiplexer 13 as the second partial square root of the code 1 bit and the data 12 bits. The inverting means 15 inverts 0090 into 1F6F, adds 1 as the least significant bit, and outputs (R + S × T).
In the calculation means 17, the calculation is performed at 1F70 as a multiplier. On the other hand, in the multiplicand generating means 16, the output of the merged square root holding means 14 is shifted to the left by 1 bit, and the 12 bits excluding the head bit of the 13 bits output from the multiplexer 13 are embedded from 2 44 to 2 33 to 0E.
Outputs 1012000000. (R + S ×
T) In the computing means 17, the output of the remainder holding means 10 output from the shifter 12 is shifted to the left by 11 bits to R, the output of the multiplicand generating means 16 is S, and the output of the inverting means 15 is T.
Is input and the calculation of (R + S × T) is executed. (R
+ S × T) Output of computing means 17 1E672E9F000
000 is selected by the multiplexer 9 and set in the surplus holding means 10. The multiplexer 19 selects and outputs the output of the multiplexer 13, and the digit alignment means 2
At 0, the 13-bit input is aligned from 2 45 to 2 33 .
The addition means 21 inputs the output of the merged square root holding means 14 and the output of the digit alignment means 20 to perform addition, and 070
Outputs 812,000000000. The merged square root holding means 14 sets the output of the adding means 21.
【0045】次に3回目の反復計算に入る。テーブル情
報格納手段8の出力は1回目と変わらない。剰余保持手
段10にセットされた2番目の剰余R2 の1E672E
9F000000に091A1が乗算手段11により掛
けられ、積0114B904C60FF000000が
出力される。259の位で丸め後の272から260の011
5が符号1ビット、データ12ビットの3番目の部分平
方根としてマルチプレクサ13により選択される。反転
手段15では0115が反転され、1EEAとなり、最
下位ビットとして1が付加されて出力され、(R+S×
T)演算手段17では実質的に乗数として1EEBで演
算が行なわれる。一方、被乗数生成手段16では、併合
平方根保持手段14の出力を左に1ビットシフトすると
ともに、マルチプレクサ13の出力する13ビットの先
頭ビットを除く12ビットを233から222へ埋め込み、
0E1024045400000を出力する。(R+S
×T)演算手段17ではシフタ12の出力する剰余保持
手段10の出力を左に11ビットシフトしたものをR、
被乗数生成手段16の出力をS,反転手段15の出力を
Tとして入力し、(R+S×T)の演算を実行する。
(R+S×T)演算手段17の出力C2056D11C
00000はマルチプレクサ9により選択され、剰余保
持手段10にセットされる。マルチプレクサ19は、定
数減算手段18の出力を選択して出力し、桁合わせ手段
20では13ビットの入力を234から222に整列させ
る。加算手段21では併合平方根保持手段14の出力
と、桁合わせ手段20の出力を入力して加算を行ない、
070812045000000を出力する。併合平方
根保持手段14では加算手段21の出力をセットする。Next, the third iterative calculation is started. The output of the table information storage means 8 is the same as that of the first time. 1E672E of the second surplus R 2 set in the surplus holding means 10.
9F000000 is multiplied by 091A1 by the multiplication means 11, and the product 0114B904C60FF000000 is output. 2 72 to 2 60 after rounding at 2 59 place 011
5 is selected by the multiplexer 13 as the third partial square root of the code 1 bit and the data 12 bits. In the inverting means 15, 0115 is inverted to become 1EEA, 1 is added as the least significant bit, and output (R + S ×
T) In the calculation means 17, the calculation is substantially performed with 1EEB as a multiplier. On the other hand, in the multiplicand generating means 16, the output of the merged square root holding means 14 is shifted to the left by 1 bit, and 12 bits excluding the head bit of the 13 bits output from the multiplexer 13 are embedded from 2 33 to 2 22 .
0E1024045400000 is output. (R + S
XT) In the calculating means 17, the output of the remainder holding means 10 output from the shifter 12 is shifted to the left by 11 bits, and the result is R,
The output of the multiplicand generating means 16 is input as S and the output of the inverting means 15 is input as T, and the operation of (R + S × T) is executed.
(R + S × T) Output of computing means 17 C2056D11C
00000 is selected by the multiplexer 9 and set in the surplus holding means 10. The multiplexer 19 selects and outputs the output of the constant subtracting means 18, and the digit aligning means 20 aligns the 13-bit input from 2 34 to 2 22 . The addition means 21 inputs the output of the merged square root holding means 14 and the output of the digit alignment means 20 to perform addition,
The output is 070812045000000. The merged square root holding means 14 sets the output of the adding means 21.
【0046】次に4回目の反復計算に入る。テーブル情
報格納手段8の出力は1回目と変わらない。剰余保持手
段10にセットされた3番目の剰余R3 のC2056D
11C00000に091A1が乗算手段11により掛
けられ、積1DCBE1830A5E9C00000が
出力される。259の位で丸め後の272から260の1DC
Cが符号1ビット、データ12ビットの4番目の部分平
方根としてマルチプレクサ13により選択される。反転
手段15では1DCCが反転され、0233となり、最
下位ビットとして1が付加されて出力され、(R+S×
T)演算手段17では実質的に乗数として0234で演
算が行なわれる。一方、被乗数生成手段16では、併合
平方根保持手段14の出力を左に1ビットシフトすると
ともに、マルチプレクサ13の出力する13ビットの先
頭ビットを除く12ビットを222から211へ埋め込み、
0E102408A6E6000を出力する。(R+S
×T)演算手段17ではシフタ12の出力する剰余保持
手段10の出力を左に11ビットシフトしたものをR、
被乗数生成手段16の出力をS,反転手段15の出力を
Tとして入力し、(R+S×T)の演算を実行する。
(R+S×T)演算手段17の出力E45EBEFB2
B8000はマルチプレクサ9により選択され、剰余保
持手段10にセットされる。マルチプレクサ19は、定
数減算手段18の出力を選択して出力し、桁合わせ手段
20では13ビットの入力のうち、先頭2ビットをゼロ
に抑止して11ビットを221から211に整列させる。加
算手段21では併合平方根保持手段14の出力と、桁合
わせ手段20の出力を入力して加算を行ない、0708
120452E5000を出力する。併合平方根保持手
段14では加算手段21の出力をセットする。Next, the fourth iterative calculation is started. The output of the table information storage means 8 is the same as that of the first time. C2056D of the third residue R 3 set in the residue holding means 10.
11C00000 is multiplied by 091A1 by the multiplication means 11, and the product 1DCBE1830A5E9C00000 is output. 1 DC from 2 72 to 2 60 after rounding at 2 59
The multiplexer 13 selects C as the fourth partial square root of the code 1 bit and the data 12 bits. In the inverting means 15, 1DCC is inverted to become 0233, 1 is added as the least significant bit and the result is output (R + S ×
T) In the calculating means 17, the calculation is practically performed at 0234 as a multiplier. On the other hand, the multiplicand generating means 16 shifts the output of the merged square root holding means 14 to the left by 1 bit, and embeds 12 bits excluding the head bit of 13 bits output from the multiplexer 13 from 2 22 to 2 11 ,
0E102408A6E6000 is output. (R + S
XT) In the calculating means 17, the output of the remainder holding means 10 output from the shifter 12 is shifted to the left by 11 bits, and the result is R,
The output of the multiplicand generating means 16 is input as S and the output of the inverting means 15 is input as T, and the operation of (R + S × T) is executed.
(R + S × T) Output of computing means 17 E45EBEFB2
B8000 is selected by the multiplexer 9 and set in the surplus holding means 10. The multiplexer 19 selects and outputs the output of the constant subtraction means 18, and the digit alignment means 20 suppresses the leading 2 bits of the 13-bit input to zero and aligns 11 bits from 2 21 to 2 11 . The addition means 21 inputs the output of the merged square root holding means 14 and the output of the digit alignment means 20 to perform addition, and 0708
120452E5000 is output. The merged square root holding means 14 sets the output of the adding means 21.
【0047】次に5回目の反復計算に入る。テーブル情
報格納手段8の出力は1回目と変わらない。剰余保持手
段10にセットされた4番目の剰余R4 のE45EBE
FB2B8000に091A1が乗算手段11により掛
けられ、積1F04849C25F99DB8000が
出力される。259の位で丸め後の272から260の1F0
5が符号1ビット、データ12ビットの5番目の部分平
方根としてマルチプレクサ13により選択される。反転
手段15では1F05が反転され、00FAとなり、最
下位ビットとして1が付加されて出力され、(R+S×
T)演算手段17では実質的に乗数として00FBで演
算が行なわれる。一方、被乗数生成手段16では、併合
平方根保持手段14の出力を左に1ビットシフトすると
ともに、マルチプレクサ13の出力する13ビットの先
頭ビットを除く12ビットを211から20 へ埋め込み、
0E102408A5CBF05を出力する。(R+S
×T)演算手段17ではシフタ12の出力する剰余保持
手段10の出力を左に11ビットシフトしたものをR、
被乗数生成手段16の出力をS,反転手段15の出力を
Tとして入力し、(R+S×T)の演算を実行する。
(R+S×T)演算手段17は932D2104EF4
9E7を出力する。マルチプレクサ19は、定数減算手
段18の出力を選択して出力し、桁合わせ手段20では
13ビットの入力のうち、先頭2ビットをゼロに抑止し
て11ビットを210から20 に整列させる。加算手段2
1では併合平方根保持手段14の出力と、桁合わせ手段
20の出力を入力して加算を行ない、07081204
52E5F04を出力する。Next, the fifth iterative calculation is started. The output of the table information storage means 8 is the same as that of the first time. E45EBE of the fourth residue R 4 set in the residue holding means 10.
The FB2B8000 is multiplied by 091A1 by the multiplication means 11, and the product 1F04849C25F99DB8000 is output. After rounding at 2 59 , 2 72 to 2 60 1F0
5 is selected by the multiplexer 13 as the fifth partial square root of the code 1 bit and the data 12 bits. The inverting means 15 inverts 1F05 to become 00FA, adds 1 as the least significant bit, and outputs (R + S ×
T) The calculation means 17 performs calculation with 00FB as a multiplier. On the other hand, the multiplicand generating means 16 shifts the output of the merged square root holding means 14 to the left by 1 bit, and embeds 12 bits excluding the head bit of 13 bits output from the multiplexer 13 from 2 11 to 2 0 ,
Outputs 0E102408A5CBF05. (R + S
XT) In the calculating means 17, the output of the remainder holding means 10 output from the shifter 12 is shifted to the left by 11 bits, and the result is R,
The output of the multiplicand generating means 16 is input as S and the output of the inverting means 15 is input as T, and the operation of (R + S × T) is executed.
The (R + S × T) calculating means 17 is 932D2104EF4.
9E7 is output. The multiplexer 19 selects and outputs the output of the constant subtracting means 18, and the digit aligning means 20 suppresses the leading 2 bits of the 13-bit input to zero and aligns 11 bits from 2 10 to 2 0 . Adder 2
In the case of 1, the output of the merged square root holding means 14 and the output of the digit alignment means 20 are input and addition is performed.
52E5F04 is output.
【0048】最終的な結果として、263の符号ビットと
して0、262から252の指数部として指数定数加算手段
5の出力する11ビット、251から20 の仮数部として
加算手段21の253から22 がそれぞれ選択され、5E
3C2048114B97C1として図1に示す開平演
算装置から出力される。As a final result, the sign bit of 2 63 is 0, the exponent part of 2 62 to 2 52 is 11 bits output from the exponent constant adding means 5, and the mantissa part of 2 51 to 2 0 is the addition part 21. 2 53 to 2 2 are selected and 5E
3C2048114B97C1 is output from the square root arithmetic unit shown in FIG.
【0049】(実施例2)図4は本発明の第2の実施例
に係る浮動小数点開平演算装置のブロック図を示すもの
である。本実施例の浮動小数点開平演算装置はIEEE
規格の倍精度浮動小数点数を入力して、同じ倍精度浮動
小数点数の平方根を出力し、部分平方根のデータとして
のビット長が12で部分平方根間には1ビットの重複が
ある。図4において、31は入力レジスタ、32は例外
検出手段、33は指数定数減算手段、34はシフタ、3
5は指数定数加算手段、36はリーディングビット付加
回路、37は正規化手段、38はテーブル情報格納手
段、39はマルチプレクサ、40は剰余保持手段、41
は併合平方根保持手段、42は部分平方根保持手段(b
i)、43はシフタ、44は反転手段、45は被乗数生
成手段、46、47、48はマルチプレクサ、49は
(R+S×T)演算手段、50はマルチプレクサ、51
は定数減算手段、52はマルチプレクサ、53は桁合わ
せ手段、54は加算手段である。(Embodiment 2) FIG. 4 is a block diagram of a floating point square root arithmetic unit according to a second embodiment of the present invention. The floating point square root arithmetic unit of this embodiment is IEEE
A standard double-precision floating-point number is input, the square root of the same double-precision floating-point number is output, the bit length as the data of the partial square root is 12, and there is an overlap of 1 bit between the partial square roots. In FIG. 4, 31 is an input register, 32 is an exception detecting means, 33 is an exponential constant subtracting means, 34 is a shifter, 3
5 is exponential constant adding means, 36 is a leading bit adding circuit, 37 is normalizing means, 38 is table information storing means, 39 is a multiplexer, 40 is a surplus holding means, 41
Is a merged square root holding means, 42 is a partial square root holding means (b
i), 43 is a shifter, 44 is an inverting means, 45 is a multiplicand generating means, 46, 47 and 48 are multiplexers, 49 is an (R + S × T) arithmetic means, 50 is a multiplexer, 51
Is a constant subtracting means, 52 is a multiplexer, 53 is a digit aligning means, and 54 is an adding means.
【0050】以下、具体的な数値例を用いて図4に示す
浮動小数点開平演算装置の動作を説明する。オペランド
が入力されてから、各々の手段で処理されていく過程は
第1の実施例で使用した図2,図3と同様である。はじ
めにオペランドとして7C88B89EAF092E9
Fが入力され、入力レジスタ31にセットされる。例外
検出手段32では入力オペランドが負の場合、データ例
外として検出し、浮動小数点開平演算装置の外部の命令
実行制御部に対して例外が発生していることを通知す
る。本数値例では(以下では、この前提を省略する)オ
ペランドは正であるので例外は検出されない。入力レジ
スタ31の出力の262から252の指数に対して、指数定
数減算手段33により3FFが引かれた後、シフタ34
により右に1ビットシフトされ、指数定数加算手段35
により再び3FFが加算され、結果の指数が求められ
る。リーディングビット付加回路36では入力レジスタ
31の出力の251から20 の仮数部に対して先頭にリー
ディングビットの1が付加される。正規化手段37で
は、入力レジスタ31の出力の252のビットが1の場合
入力を左に1ビットシフトして、また、入力レジスタ3
1の出力の252のビットが0の場合入力を左に2ビット
シフトして出力する。テーブル情報格納手段38には正
規化手段37の254から243の12ビットが入力され、
091A0が出力される。さらにこの出力の最下位ビッ
トとして正規化手段37の242のビットを反転したもの
が付加されるのであるが、本例では1が付加され、(R
+S×T)演算手段49での実質的な乗数は091A1
となる。マルチプレクサ39では正規化手段37の出力
を選択し、この出力が剰余保持手段40にセットされ
る。このとき、併合平方根保持手段41はゼロにリセッ
トされる。マルチプレクサ46、47、48はそれぞ
れ、‘0’、剰余保持手段40の出力、テーブル情報格
納手段38の出力を選択し、(R+S×T)演算手段4
9で62E27ABC24BA7Cと091A1の乗算
が行なわれ、0384077F3C120B983FC
の積が求められると同時に1回目の反復では258の位
で、2回目以降の反復では259の位で積を丸めた結果が
マルチプレクサ50に対して出力される。マルチプレク
サ50では(R+S×T)演算手段49の271から259
の13ビットを符号1ビット、データ12ビットの1番
目の部分平方根として選択し、部分平方根保持手段42
にこの部分平方根がセットされる。シフタ43では剰余
保持手段40の出力が左に11ビットシフトされる。反
転手段44では部分平方根を入力してビット反転すると
ともに上位に4ビット符号を拡張し、最下位ビットに1
を付加して出力する。また、被乗数生成手段45では、
1回目の反復では256から244までに部分平方根保持手
段42の出力を埋め込み、他のビットをゼロとして出力
する。マルチプレクサ46、47、48はそれぞれ、シ
フタ43の出力、被乗数生成手段45の出力、反転手段
44の出力を選択する。(R+S×T)演算手段49で
はマルチプレクサ46の出力をR、マルチプレクサ47
の出力をS,マルチプレクサ48の出力をTとして入力
し、(R+S×T)の演算を実行する。(R+S×T)
演算手段49の出力0FD5E125D3E000はマ
ルチプレクサ39により選択され、剰余保持手段40に
セットされる。一方、定数減算手段51では部分平方根
保持手段42の出力のLSBから1を引く。マルチプレ
クサ52は、(R+S×T)演算手段49の出力が負の
場合、定数減算手段51の出力を選択し、それ以外の場
合は部分平方根保持手段42の出力を選択する。1回目
の反復では上記の条件を判断して部分平方根保持手段4
2の出力を選択する。桁合わせ手段53では各反復での
部分平方根を併合するための桁合わせを実行する。具体
的には、部分平方根が負の場合には、マルチプレクサ5
2の出力の13ビットの先頭2ビットをゼロに抑止し、
また、部分平方根が正の場合には、マルチプレクサ52
の出力の13ビットを、上位の併合平方根とのビットの
重みがつり合うようにシフトを行ない、出力する。1番
目の部分平方根に対しては、256から244に入力データ
を整列させ、出力する。加算手段54では併合平方根保
持手段41の出力と、桁合わせ手段53の出力を入力し
て加算を行ない、結果を併合平方根保持手段41にセッ
トする。The operation of the floating point square root extraction arithmetic unit shown in FIG. 4 will be described below by using specific numerical examples. The process in which the operands are input and then processed by each means is the same as in FIGS. 2 and 3 used in the first embodiment. First, 7C88B89EAF092E9 as an operand
F is input and set in the input register 31. When the input operand is negative, the exception detection means 32 detects it as a data exception and notifies the instruction execution control unit outside the floating point square root arithmetic unit that an exception has occurred. In this numerical example (hereinbelow, this assumption is omitted), since the operand is positive, no exception is detected. The exponent constant subtraction means 33 subtracts 3FF from the exponents of 2 62 to 2 52 of the output of the input register 31, and then the shifter 34.
By 1 bit to the right by means of the exponential constant adding means 35
Then, 3FF is added again and the resulting exponent is obtained. The leading bit adding circuit 36 adds a leading bit of 1 to the head of the mantissa part of 2 51 to 2 0 of the output of the input register 31. The normalizing means 37 shifts the input to the left by 1 bit when the 2 52 bits of the output of the input register 31 are 1, and the input register 3
When 2 52 bits of the output of 1 are 0, the input is shifted 2 bits to the left and output. 12 bits from 2 54 to 2 43 of the normalization means 37 are input to the table information storage means 38,
091A0 is output. Further, as the least significant bit of this output, a bit obtained by inverting the 2 42 bit of the normalizing means 37 is added, but in this example, 1 is added and (R
+ S × T) The actual multiplier in the calculation means 49 is 091A1.
Becomes The multiplexer 39 selects the output of the normalizing means 37, and this output is set in the surplus holding means 40. At this time, the merged square root holding means 41 is reset to zero. The multiplexers 46, 47 and 48 respectively select '0', the output of the residue holding means 40 and the output of the table information storage means 38, and the (R + S × T) operation means 4
In 62, 62E27ABC24BA7C and 091A1 are multiplied, and 084077F3C120B983FC
At the same time that the product is obtained, the result of rounding the product at the 2 58 's place in the first iteration and at the 2 59 's place in the second and subsequent iterations is output to the multiplexer 50. In the multiplexer 50, 2 71 to 2 59 of the (R + S × T) computing means 49.
13 bits are selected as the first partial square root of the code 1 bit and the data 12 bits, and the partial square root holding means 42 is selected.
This partial square root is set to. In the shifter 43, the output of the surplus holding means 40 is shifted to the left by 11 bits. The inverting means 44 inputs the partial square root, inverts the bits, extends the 4-bit code to the upper bit, and outputs 1 to the least significant bit.
Is added and output. Further, in the multiplicand generating means 45,
In the first iteration, the output of the partial square root holding means 42 is embedded from 2 56 to 2 44 , and the other bits are output as zero. The multiplexers 46, 47, 48 select the output of the shifter 43, the output of the multiplicand generating means 45, and the output of the inverting means 44, respectively. In the (R + S × T) computing means 49, the output of the multiplexer 46 is R, and the multiplexer 47 is
Is output as S and the output of the multiplexer 48 is input as T, and the operation of (R + S × T) is executed. (R + S × T)
The output 0FD5E125D3E000 of the calculation means 49 is selected by the multiplexer 39 and set in the remainder holding means 40. On the other hand, the constant subtraction means 51 subtracts 1 from the LSB of the output of the partial square root holding means 42. The multiplexer 52 selects the output of the constant subtracting means 51 when the output of the (R + S × T) computing means 49 is negative, and selects the output of the partial square root holding means 42 otherwise. In the first iteration, the above conditions are judged and the partial square root holding means 4
Select 2 outputs. The digit alignment means 53 executes digit alignment for merging the partial square roots in each iteration. Specifically, when the partial square root is negative, the multiplexer 5
Suppress the first 2 bits of 13 bits of the output of 2 to zero,
If the partial square root is positive, the multiplexer 52
13 bits of the output of the above are shifted and output so that the weights of the bits of the upper merged square root are balanced. For the first partial square root, align the input data from 2 56 to 2 44 and output. The adding means 54 inputs the output of the merged square root holding means 41 and the output of the digit aligning means 53 to perform addition, and sets the result in the merged square root holding means 41.
【0051】次に2回目の反復計算に入る。テーブル情
報格納手段38の出力は2回目以降も1回目と変わらな
い。マルチプレクサ46、47、48はそれぞれ、
‘0’、剰余保持手段40にセットされた1番目の剰余
R1 の0FD5E125D3E000、テーブル情報格
納手段38の出力091A1を選択し、(R+S×T)
演算手段49は(S×T)を実行し、積009021A
0905CC1FE000を出力する。272から260の
0090を符号1ビット、データ12ビットの2番目の
部分平方根としてマルチプレクサ50により選択し、部
分平方根保持手段42にこの部分平方根がセットされ
る。シフタ43では剰余保持手段40の出力が左に11
ビットシフトされる。反転手段44では0090が反
転、上位に4ビット符号を拡張され、1FF6Fとな
り、最下位ビットとして1が付加されて出力され、(R
+S×T)演算手段49では実質的に乗数として1FF
70で演算が行なわれる。一方、被乗数生成手段45で
は、併合平方根保持手段41の出力を左に1ビットシフ
トするとともに、部分平方根保持手段42の出力する1
3ビットの先頭ビットを除く12ビットを244から233
へ埋め込み、0E1012000000000を出力す
る。マルチプレクサ46、47、48はそれぞれ、シフ
タ43の出力、被乗数生成手段45の出力、反転手段4
4の出力を選択する。(R+S×T)演算手段49では
マルチプレクサ46の出力をR、マルチプレクサ47の
出力をS,マルチプレクサ48の出力をTとして入力
し、(R+S×T)の演算を実行する。(R+S×T)
演算手段49の出力1E672E9F000000はマ
ルチプレクサ39により選択され、剰余保持手段40に
セットされる。マルチプレクサ52は、部分平方根保持
手段42の出力を選択して出力し、桁合わせ手段53で
は13ビットの入力を245から233に整列させる。加算
手段54では併合平方根保持手段41の出力と、桁合わ
せ手段53の出力を入力して加算を行ない、07081
2000000000を出力する。併合平方根保持手段
41では加算手段54の出力をセットする。Next, the second iterative calculation is started. The output of the table information storage means 38 is the same as that of the first time even after the second time. The multiplexers 46, 47 and 48 are respectively
'0', 0FD5E125D3E000 of the first surplus R 1 set in the surplus holding means 40, the output 091A1 of the table information storage means 38 are selected, and (R + S × T)
The calculation means 49 executes (S × T) and calculates the product 009021A.
Outputs 0905CC1FE000. The multiplexer 50 selects 2 0090 from 2 72 to 2 60 as the second partial square root of code 1 bit and data 12 bits, and this partial square root is set in the partial square root holding means 42. In the shifter 43, the output of the surplus holding means 40 is 11 to the left.
Bit-shifted. The inverting means 44 inverts 0090, expands the 4-bit code to the higher order and outputs 1FF6F, and adds 1 as the least significant bit and outputs (R
+ S × T) The calculation means 49 is substantially 1FF as a multiplier.
The operation is performed at 70. On the other hand, in the multiplicand generating means 45, the output of the merged square root holding means 41 is shifted to the left by 1 bit and the output of the partial square root holding means 42 is set to 1
12 bits excluding the first 3 bits from 2 44 to 2 33
Embedded in, and outputs 0E1012000000. The multiplexers 46, 47 and 48 respectively output the shifter 43, the multiplicand generating means 45 and the inverting means 4.
4 output is selected. The (R + S × T) operation means 49 inputs the output of the multiplexer 46 as R, the output of the multiplexer 47 as S, and the output of the multiplexer 48 as T, and executes the operation of (R + S × T). (R + S × T)
The output 1E672E9F000000 of the computing means 49 is selected by the multiplexer 39 and set in the surplus holding means 40. The multiplexer 52 selects and outputs the output of the partial square root holding means 42, and the digit aligning means 53 aligns the 13-bit input from 2 45 to 2 33 . In the adding means 54, the output of the merged square root holding means 41 and the output of the digit adjusting means 53 are input and addition is performed.
It outputs 2000000000. The merged square root holding means 41 sets the output of the adding means 54.
【0052】次に3回目の反復計算に入る。テーブル情
報格納手段38の出力は1回目と変わらない。マルチプ
レクサ46、47、48はそれぞれ、‘0’、剰余保持
手段40にセットされた2番目の剰余R2 の1E672
E9F000000、テーブル情報格納手段38の出力
091A1を選択し、(R+S×T)演算手段49は
(S×T)を実行し、積0114B904C60FF0
00000を出力する。259の位で丸め後の272から2
60の0115を符号1ビット、データ12ビットの3番
目の部分平方根としてマルチプレクサ50により選択
し、部分平方根保持手段42にこの部分平方根がセット
される。シフタ43では剰余保持手段40の出力が左に
11ビットシフトされる。反転手段44では0115が
反転、上位に4ビット符号が拡張され、1FEEAとな
り、最下位ビットとして1が付加されて出力され、(R
+S×T)演算手段49では実質的に乗数として1FE
EBで演算が行なわれる。一方、被乗数生成手段45で
は、併合平方根保持手段41の出力を左に1ビットシフ
トするとともに、部分平方根保持手段42の出力する1
3ビットの先頭ビットを除く12ビットを233から222
へ埋め込み、0E1024045400000を出力す
る。マルチプレクサ46、47、48はそれぞれ、シフ
タ43の出力、被乗数生成手段45の出力、反転手段4
4の出力を選択する。(R+S×T)演算手段49では
マルチプレクサ46の出力をR、マルチプレクサ47の
出力をS,マルチプレクサ48の出力をTとして入力
し、(R+S×T)の演算を実行する。(R+S×T)
演算手段49の出力C2056D11C00000はマ
ルチプレクサ39により選択され、剰余保持手段40に
セットされる。マルチプレクサ52は、定数減算手段5
1の出力を選択して出力し、桁合わせ手段53では13
ビットの入力を234から222に整列させる。加算手段5
4では併合平方根保持手段41の出力と、桁合わせ手段
53の出力を入力して加算を行ない、07081204
5000000を出力する。併合平方根保持手段41で
は加算手段54の出力をセットする。Next, the third iterative calculation is started. The output of the table information storage means 38 is the same as that of the first time. The multiplexers 46, 47 and 48 are respectively “0” and 1E672 of the second remainder R 2 set in the remainder holding means 40.
E9F000000, the output 091A1 of the table information storage means 38 is selected, the (R + S × T) operation means 49 executes (S × T), and the product 0114B904C60FF0.
000000 is output. 2 72 from 2 after rounding at 2 59
The multiplexer 50 selects 0115 of 60 as the third partial square root of the code 1 bit and the data 12 bits, and this partial square root is set in the partial square root holding means 42. In the shifter 43, the output of the surplus holding means 40 is shifted to the left by 11 bits. In the inverting means 44, 0115 is inverted, the 4-bit code is extended to the upper bit and becomes 1FEEA, and 1 is added as the least significant bit and output (R
+ S × T) The calculation means 49 is substantially 1FE as a multiplier.
Calculation is performed in EB. On the other hand, in the multiplicand generating means 45, the output of the merged square root holding means 41 is shifted to the left by 1 bit and the output of the partial square root holding means 42 is set to 1
12 bits except the first 3 bits are 2 33 to 2 22
, And outputs 0E1024045400000. The multiplexers 46, 47 and 48 respectively output the shifter 43, the multiplicand generating means 45 and the inverting means 4.
4 output is selected. The (R + S × T) operation means 49 inputs the output of the multiplexer 46 as R, the output of the multiplexer 47 as S, and the output of the multiplexer 48 as T, and executes the operation of (R + S × T). (R + S × T)
The output C2056D11C00000 of the computing means 49 is selected by the multiplexer 39 and set in the residue holding means 40. The multiplexer 52 uses the constant subtraction means 5
1 output is selected and output, and the digit alignment means 53 outputs 13
Align bit inputs from 2 34 to 2 22 . Adder 5
In 4, the output of the merged square root holding means 41 and the output of the digit alignment means 53 are input and addition is performed.
Outputs 5000000. The merged square root holding means 41 sets the output of the adding means 54.
【0053】次に4回目の反復計算に入る。テーブル情
報格納手段38の出力は1回目と変わらない。マルチプ
レクサ46、47、48はそれぞれ、‘0’、剰余保持
手段40にセットされた3番目の剰余R3 のC2056
D11C00000、テーブル情報格納手段38の出力
091A1を選択し、(R+S×T)演算手段49は
(S×T)を実行し、積1DCBE1830A5E9C
00000を出力する。259の位で丸め後の272から2
60の1DCCを符号1ビット、データ12ビットの4番
目の部分平方根としてマルチプレクサ50により選択
し、部分平方根保持手段42にこの部分平方根がセット
される。シフタ43では剰余保持手段40の出力が左に
11ビットシフトされる。反転手段44では1DCCが
反転、上位に4ビット符号が拡張され、00233とな
り、最下位ビットとして1が付加されて出力され、(R
+S×T)演算手段49では実質的に乗数として002
34で演算が行なわれる。一方、被乗数生成手段45で
は、併合平方根保持手段41の出力を左に1ビットシフ
トするとともに、部分平方根保持手段42の出力する1
3ビットの先頭ビットを除く12ビットを222から211
へ埋め込み、0E102408A6E6000を出力す
る。マルチプレクサ46、47、48はそれぞれ、シフ
タ43の出力、被乗数生成手段45の出力、反転手段4
4の出力を選択する。(R+S×T)演算手段49では
マルチプレクサ46の出力をR、マルチプレクサ47の
出力をS,マルチプレクサ48の出力をTとして入力
し、(R+S×T)の演算を実行する。(R+S×T)
演算手段49の出力E45EBEFB2B8000はマ
ルチプレクサ39により選択され、剰余保持手段40に
セットされる。マルチプレクサ52は、定数減算手段5
1の出力を選択して出力し、桁合わせ手段53では13
ビットの入力のうち、先頭2ビットをゼロに抑止して1
1ビットを221から211に整列させる。加算手段54で
は併合平方根保持手段41の出力と、桁合わせ手段53
の出力を入力して加算を行ない、0708120452
E5000を出力する。併合平方根保持手段41では加
算手段54の出力をセットする。Next, the fourth iterative calculation is started. The output of the table information storage means 38 is the same as that of the first time. The multiplexers 46, 47 and 48 are respectively “0”, C2056 of the third residue R 3 set in the residue holding means 40.
D11C00000, the output 091A1 of the table information storage means 38 is selected, the (R + S × T) operation means 49 executes (S × T), and the product 1DCBE1830A5E9C
000000 is output. 2 72 from 2 after rounding at 2 59
The 1 DCC of 60 is selected by the multiplexer 50 as the fourth partial square root of the code 1 bit and the data 12 bits, and this partial square root is set in the partial square root holding means 42. In the shifter 43, the output of the surplus holding means 40 is shifted to the left by 11 bits. In the inverting means 44, 1DCC is inverted, and the 4-bit code is extended to the high-order to become 00233, and 1 is added as the lowest-order bit and output (R
+ S × T) In the calculation means 49, a multiplier is 002.
Calculation is performed at 34. On the other hand, in the multiplicand generating means 45, the output of the merged square root holding means 41 is shifted to the left by 1 bit and the output of the partial square root holding means 42 is set to 1
12 bits except the first 3 bits are 2 22 to 2 11
Embedded, and outputs 0E102408A6E6000. The multiplexers 46, 47 and 48 respectively output the shifter 43, the multiplicand generating means 45 and the inverting means 4.
4 output is selected. The (R + S × T) operation means 49 inputs the output of the multiplexer 46 as R, the output of the multiplexer 47 as S, and the output of the multiplexer 48 as T, and executes the operation of (R + S × T). (R + S × T)
The output E45EBEFB2B8000 of the computing means 49 is selected by the multiplexer 39 and set in the surplus holding means 40. The multiplexer 52 uses the constant subtraction means 5
1 output is selected and output, and the digit alignment means 53 outputs 13
Of the input bits, the first 2 bits are suppressed to 0 and set to 1
Align one bit from 2 21 to 2 11 . In the adding means 54, the output of the merged square root holding means 41 and the digit aligning means 53
The output of is input and addition is performed.
Outputs E5000. The merged square root holding means 41 sets the output of the adding means 54.
【0054】次に5回目の反復計算に入る。テーブル情
報格納手段38の出力は1回目と変わらない。マルチプ
レクサ46、47、48はそれぞれ、‘0’、剰余保持
手段40にセットされた4番目の剰余R4 のE45EB
EFB2B8000、テーブル情報格納手段38の出力
091A1を選択し、(R+S×T)演算手段49は
(S×T)を実行し、積1F04849C25F99D
B8000を出力する。259の位で丸め後の272から2
60の1F05を符号1ビット、データ12ビットの5番
目の部分平方根としてマルチプレクサ50により選択
し、部分平方根保持手段42にこの部分平方根がセット
される。シフタ43では剰余保持手段40の出力が左に
11ビットシフトされる。反転手段44では1F05が
反転、上位に4ビット符号が拡張され、000FAとな
り、最下位ビットとして1が付加されて出力され、(R
+S×T)演算手段49では実質的に乗数として00F
Bで演算が行なわれる。一方、被乗数生成手段45で
は、併合平方根保持手段41の出力を左に1ビットシフ
トするとともに、部分平方根保持手段42の出力する1
3ビットの先頭ビットを除く12ビットを211から20
へ埋め込み、0E102408A5CBF05を出力す
る。マルチプレクサ46、47、48はそれぞれ、シフ
タ43の出力、被乗数生成手段45の出力、反転手段4
4の出力を選択する。(R+S×T)演算手段49では
マルチプレクサ46の出力をR、マルチプレクサ47の
出力をS,マルチプレクサ48の出力をTとして入力
し、(R+S×T)の演算を実行する。(R+S×T)
演算手段49は932D2104EF49E7を出力す
る。マルチプレクサ52は、定数減算手段51の出力を
選択して出力し、桁合わせ手段53では13ビットの入
力のうち、先頭2ビットをゼロに抑止して11ビットを
210から20 に整列させる。加算手段54では併合平方
根保持手段41の出力と、桁合わせ手段54の出力を入
力して加算を行ない、0708120452E5F04
を出力する。Next, the fifth iterative calculation is started. The output of the table information storage means 38 is the same as that of the first time. The multiplexers 46, 47 and 48 are respectively "0" and E45EB of the fourth residue R 4 set in the residue holding means 40.
EFB2B8000, the output 091A1 of the table information storage means 38 is selected, the (R + S × T) calculation means 49 executes (S × T), and the product 1F04849C25F99D
Outputs B8000. 2 72 from 2 after rounding at 2 59
1F05 of 60 is selected by the multiplexer 50 as the fifth partial square root of code 1 bit and data 12 bits, and this partial square root is set in the partial square root holding means 42. In the shifter 43, the output of the surplus holding means 40 is shifted to the left by 11 bits. In the inverting means 44, 1F05 is inverted, the 4-bit code is extended to the higher order and becomes 000FA, and 1 is added as the least significant bit and output (R
+ S × T) In the calculation means 49, a multiplier is practically 00F
The operation is performed at B. On the other hand, in the multiplicand generating means 45, the output of the merged square root holding means 41 is shifted to the left by 1 bit and the output of the partial square root holding means 42 is set to 1
12 bits excluding the first 3 bits from 2 11 to 2 0
Embedded, and outputs 0E102408A5CBF05. The multiplexers 46, 47 and 48 respectively output the shifter 43, the multiplicand generating means 45 and the inverting means 4.
4 output is selected. The (R + S × T) operation means 49 inputs the output of the multiplexer 46 as R, the output of the multiplexer 47 as S, and the output of the multiplexer 48 as T, and executes the operation of (R + S × T). (R + S × T)
The calculation means 49 outputs 932D2104EF49E7. The multiplexer 52 selects and outputs the output of the constant subtracting means 51, and the digit aligning means 53 suppresses the leading 2 bits of the 13-bit input to zero and aligns 11 bits from 2 10 to 2 0 . In the adding means 54, the output of the merged square root holding means 41 and the output of the digit adjusting means 54 are input and addition is performed.
Is output.
【0055】最終的な結果として、263の符号ビットと
して0、262から252の指数部として指数定数加算手段
35の出力する11ビット、251から20 の仮数部とし
て加算手段54の253から22 がそれぞれ選択され、5
E3C2048114B97C1として図4に示す開平
演算装置から出力される。As a final result, the sign bit of 2 63 is 0, the exponent part of 2 62 to 2 52 is 11 bits output from the exponent constant adding means 35, and the mantissa part of 2 51 to 2 0 is the addition part 54. 2 53 to 2 2 are selected and 5
E3C2048114B97C1 is output from the square root arithmetic unit shown in FIG.
【0056】(実施例3)図5,図6は本発明の第3の
実施例に係る浮動小数点ベクトル開平演算装置のブロッ
ク図を示すものである。本実施例の浮動小数点ベクトル
開平演算装置はIEEE規格の倍精度浮動小数点数ベク
トルを要素順に入力して、同じ倍精度浮動小数点数の平
方根ベクトルを要素順に出力し、部分平方根のデータと
してのビット長が12で部分平方根間には1ビットの重
複がある。図5,図6において、61は入力レジスタ、
62_1から62_12は例外検出情報保持手段、63
は指数定数減算手段、64はシフタ、65は指数定数加
算手段、66_1から66_12は指数保持手段、67
はリーディングビット付加回路、68は正規化手段、6
9は正規化オペランドレジスタ、70はテーブル情報格
納手段、71_2から71_10はテーブル出力情報保
持手段、72_2から72_12は剰余保持手段、73
_1から73_5は乗算手段、74_1から74_5は
部分平方根保持手段、75_1から75_5はシフタ、
76_1から76_5は反転手段、77_1から77_
5は被乗数生成手段、78_1から78_5は(R+S
×T)演算手段、79_1から79_5は定数減算手
段、80_1から80_5はマルチプレクサ、81_2
から81_5は加算手段、82_4から82_12は併
合平方根保持手段、83は例外検出手段である。(Embodiment 3) FIGS. 5 and 6 are block diagrams of a floating point vector square root arithmetic unit according to a third embodiment of the present invention. The floating-point vector square root arithmetic unit of the present embodiment inputs a double-precision floating-point vector of the IEEE standard in element order, outputs a square root vector of the same double-precision floating-point number in element order, and outputs a bit length as partial square root data. Is 12 and there is a 1-bit overlap between the partial square roots. 5 and 6, 61 is an input register,
62_1 to 62_12 are exception detection information holding means, 63
Is exponential constant subtracting means, 64 is a shifter, 65 is exponential constant adding means, 66_1 to 66_12 are exponent holding means, 67
Is a leading bit addition circuit, 68 is a normalizing means, 6
Reference numeral 9 is a normalized operand register, 70 is table information storage means, 71_2 to 71_10 are table output information holding means, 72_2 to 72_12 are surplus holding means, and 73.
_1 to 73_5 are multiplication means, 74_1 to 74_5 are partial square root holding means, 75_1 to 75_5 are shifters,
76_1 to 76_5 are inverting means, and 77_1 to 77_
5 is the multiplicand generating means, and 78_1 to 78_5 are (R + S
× T) arithmetic means, 79_1 to 79_5 are constant subtraction means, 80_1 to 80_5 are multiplexers, 81_2
To 81_5 are addition means, 82_4 to 82_12 are merged square root holding means, and 83 is exception detection means.
【0057】以下、具体的な数値例を用いて図5,図6
に示す浮動小数点ベクトル開平演算装置の動作を説明す
る。ベクトルの1つの要素のオペランドが入力されてか
ら、各々の手段で処理されていく過程は第1の実施例で
使用した図2,図3と同様である。以下では1つの要素
がステージ毎にどのように処理されていくかについて説
明する。Hereinafter, FIGS. 5 and 6 will be described using specific numerical examples.
The operation of the floating point vector square root calculating unit shown in FIG. The process in which the operand of one element of the vector is input and then processed by each means is the same as in FIGS. 2 and 3 used in the first embodiment. The following describes how one element is processed for each stage.
【0058】ステージ 0:はじめにオペランドとして
7C88B89EAF092E9Fが入力され、入力レ
ジスタ61にセットされる。入力レジスタ61の出力の
262から252の指数に対して、指数定数減算手段63に
より3FFを引く。一方、リーディングビット付加回路
67では入力レジスタ61の出力の251から20 の仮数
部に対して先頭にリーディングビットの1を付加する。
正規化手段68では、入力レジスタ61の出力の252の
ビットが1の場合入力を左に1ビットシフトして、ま
た、入力レジスタ61の出力の252のビットが0の場合
入力を左に2ビットシフトして出力する。Stage 0: 7C88B89EAF092E9F is first input as an operand and set in the input register 61. The exponent constant subtracting means 63 subtracts 3FF from the exponents of 2 62 to 2 52 of the output of the input register 61. On the other hand, the leading bit adding circuit 67 adds the leading bit 1 to the head of the mantissa part of 2 51 to 2 0 of the output of the input register 61.
The normalizing means 68 shifts the input to the left by 1 bit when the 2 52 bits of the output of the input register 61 is 1, and moves the input to the left when the 2 52 bits of the output of the input register 61 is 0. 2 bits are shifted and output.
【0059】ステージ 1:はじめに入力レジスタ61
の出力の先頭1ビットが例外検出情報保持手段62_1
に、指数定数減算手段63の出力が指数保持手段66_
1に、正規化手段68の出力が正規化オペランドレジス
タ69に、それぞれセットされる。指数保持手段66_
1の出力がシフタ64により右に1ビットシフトされ、
テーブル情報格納手段70には正規化オペランドレジス
タ69の出力する254から243の12ビットが入力さ
れ、091A0が出力される。さらにこの出力の最下位
ビットとして正規化オペランドレジスタ69の出力の2
42のビットを反転したものが付加されるのであるが、本
例では1が付加され、乗算手段73_1から73_5で
の実質的な乗数は091A1となる。Stage 1: Introduction Input Register 61
1 bit at the head of the output of the exception detection information holding means 62_1
In addition, the output of the exponent constant subtraction means 63 is the exponent holding means 66_
The output of the normalizing means 68 is set to 1 in the normalizing operand register 69. Index holding means 66_
The output of 1 is shifted 1 bit to the right by the shifter 64,
12 bits of 2 54 to 2 43 output from the normalized operand register 69 are input to the table information storage means 70, and 091A0 is output. Further, as the least significant bit of this output, 2 of the output of the normalized operand register 69
Although the inverted 42 bits are added, 1 is added in this example, and the substantial multiplier in the multiplication units 73_1 to 73_5 is 091A1.
【0060】ステージ 2:はじめに例外検出情報保持
手段62_1の出力が62_2に、シフタ64の出力が
指数保持手段66_2に、正規化オペランドレジスタ6
9の出力が剰余保持手段72_2に、テーブル情報格納
手段70の出力がテーブル出力情報保持手段71_2
に、それぞれセットされる。指数保持手段66_2の出
力に対して指数定数加算手段65により3FFが加算さ
れ、結果の指数が求められる。乗算手段73_1で62
E27ABC24BA7Cと091A1の乗算が行なわ
れ、0384077F3C120B983FCの積が求
められる。Stage 2: First, the output of the exception detection information holding means 62_1 is 62_2, the output of the shifter 64 is the exponent holding means 66_2, and the normalized operand register 6
9 is output to the surplus holding means 72_2, and output of the table information storage means 70 is table output information holding means 71_2.
Are set respectively. 3FF is added to the output of the exponent holding unit 66_2 by the exponent constant adding unit 65, and the resulting exponent is obtained. 62 by multiplication means 73_1
The multiplication of E27ABC24BA7C and 091A1 is performed to obtain the product of 0384077F3C120B983FC.
【0061】ステージ 3:はじめに指数定数加算手段
65の出力が指数保持手段66_3に、乗算手段73_
1の271から259の13ビットが符号1ビット、データ
12ビットの1番目の部分平方根として部分平方根保持
手段74_1に、例外検出情報保持手段62_2の出力
が62_3に、剰余保持手段72_2の出力が72_3
に、テーブル出力情報保持手段71_2の出力が71_
3に、それぞれセットされる。シフタ75_1では剰余
保持手段72_3の出力を左に11ビットシフトする。
反転手段76_1では部分平方根保持手段74_1の出
力を入力してビット反転するとともに、最下位ビットに
1を付加して出力する。また、被乗数生成手段77_1
では、1回目の反復では256から244までに部分平方根
保持手段74_1の出力を埋め込み、他のビットをゼロ
として出力する。(R+S×T)演算手段78_1では
シフタ75_1の出力をR、被乗数生成手段77_1の
出力をS,反転手段76_1の出力をTとして入力し、
(R+S×T)の演算を実行する。(R+S×T)演算
手段78_1は0FD5E125D3E000を出力す
る。一方、定数減算手段79_1では部分平方根保持手
段74_1の出力のLSBから1を引く。マルチプレク
サ80_1は、(R+S×T)演算手段78_1の出力
が負の場合、定数減算手段79_1の出力を選択し、そ
れ以外の場合は部分平方根保持手段74_1の出力を選
択する。本例では上記の条件を判断して部分平方根保持
手段74_1の出力を選択する。Stage 3: First, the output of the exponent constant adding means 65 is sent to the exponent holding means 66_3 and the multiplying means 73_
13-bit sign bit of 1 of 2 71 to 2 59, the partial square root holding means 74_1 as the first partial square root of the data 12 bits, the output of the exception detection information holding unit 62_2 is 62_3, the output of the remainder holding means 72_2 Is 72_3
The output of the table output information holding means 71_2 is 71_
3 are set respectively. The shifter 75_1 shifts the output of the surplus holding means 72_3 to the left by 11 bits.
The inverting means 76_1 inputs the output of the partial square root holding means 74_1, inverts the bits, adds 1 to the least significant bit, and outputs it. Also, the multiplicand generating means 77_1
Then, in the first iteration, the output of the partial square root holding means 74_1 is embedded from 2 56 to 2 44 and the other bits are output as zero. In the (R + S × T) computing means 78_1, the output of the shifter 75_1 is input as R, the output of the multiplicand generating means 77_1 is input as S, and the output of the inverting means 76_1 is input as T,
The calculation of (R + S × T) is executed. The (R + S × T) computing means 78_1 outputs 0FD5E125D3E000. On the other hand, the constant subtraction means 79_1 subtracts 1 from the LSB of the output of the partial square root holding means 74_1. The multiplexer 80_1 selects the output of the constant subtracting means 79_1 when the output of the (R + S × T) computing means 78_1 is negative, and selects the output of the partial square root holding means 74_1 otherwise. In this example, the output of the partial square root holding means 74_1 is selected by judging the above conditions.
【0062】ステージ 4:はじめに(R+S×T)演
算手段78_1の出力が剰余保持手段72_4に、マル
チプレクサ80_1の出力の13ビットを256から244
に整列させ、他のビットをゼロとするデータが併合平方
根保持手段82_4に、例外検出情報保持手段62_3
の出力が62_4に、指数保持手段66_3の出力が6
6_4に、テーブル出力情報保持手段71_3の出力が
71_4に、それぞれセットされる。剰余保持手段72
_4にセットされた1番目の剰余R1 の0FD5E12
5D3E000にテーブル出力情報保持手段71_4の
出力する091A1が乗算手段73_2により掛けら
れ、積009021A0905CC1FE000が出力
される。Stage 4: First, the output of the (R + S × T) computing means 78_1 is supplied to the remainder holding means 72_4, and the 13 bits of the output of the multiplexer 80_1 are transferred from 2 56 to 2 44.
And the data in which the other bits are set to zero are merged square root holding means 82_4 and exception detection information holding means 62_3.
Output of 62_4 and output of exponent holding means 66_3 is 6
6_4, the output of the table output information holding means 71_3 is set to 71_4. Surplus holding means 72
0FD5E12 of the first remainder R 1 set to _4
5D3E000 is multiplied by 091A1 output from the table output information holding means 71_4 by the multiplication means 73_2, and the product 009021A0905CC1FE000 is output.
【0063】ステージ 5:はじめに乗算手段73_2
の出力の272から260の0090が符号1ビット、デー
タ12ビットの2番目の部分平方根として部分平方根保
持手段74_2に、例外検出情報保持手段62_4の出
力が62_5に、指数保持手段66_4の出力が66_
5に、剰余保持手段72_4の出力が72_5に、併合
平方根保持手段82_4の出力が82_5に、テーブル
出力情報保持手段71_4の出力が71_5に、それぞ
れセットされる。シフタ75_2では剰余保持手段72
_5の出力を左に11ビットシフトする。反転手段76
_2では0090が反転され、1F6Fとなり、最下位
ビットとして1が付加されて出力され、(R+S×T)
演算手段78_2では実質的に乗数として1F70で演
算が行なわれる。一方、被乗数生成手段77_2では、
併合平方根保持手段82_5の出力を左に1ビットシフ
トするとともに、部分平方根保持手段74_2の出力す
る13ビットの先頭ビットを除く12ビットを244から
233へ埋め込み、0E1012000000000を出
力する。(R+S×T)演算手段78_2ではシフタ7
5_2の出力をR、被乗数生成手段77_2の出力を
S,反転手段76_2の出力をTとして入力し、(R+
S×T)の演算を実行する。(R+S×T)演算手段7
8_2は1E672E9F000000を出力する。マ
ルチプレクサ80_2は、部分平方根保持手段74_2
の出力を選択して出力する。加算手段81_2では併合
平方根保持手段82_5の出力と、マルチプレクサ80
_2の出力については13ビットを245から233に整列
させて入力して加算を行ない、07081200000
000を出力する。Stage 5: Introduction Multiplication Means 73_2
The output of 2 72 to 2 60 of 0090 is the second partial square root of the code 1 bit and the data 12 bits to the partial square root holding means 74_2, the output of the exception detection information holding means 62_4 to 62_5 and the output of the exponent holding means 66_4. Is 66_
5, the output of the remainder holding means 72_4 is set to 72_5, the output of the merged square root holding means 82_4 is set to 82_5, and the output of the table output information holding means 71_4 is set to 71_5. In the shifter 75_2, the surplus holding means 72
Shift the output of _5 to the left by 11 bits. Inverting means 76
In _2, 0090 is inverted and becomes 1F6F, 1 is added as the least significant bit and output (R + S × T)
In the calculating means 78_2, 1F70 is calculated as a multiplier. On the other hand, in the multiplicand generating means 77_2,
With the output of the merging square holding means 82_5 shifted 1 bit to the left, embedded 12 bits except the first bit of the output 13-bit partial square root holding means 74_2 from 2 44 to 2 33, and outputs the 0E1012000000000. In the (R + S × T) computing means 78_2, the shifter 7
The output of 5_2 is input as R, the output of the multiplicand generating means 77_2 is input as S, the output of the inverting means 76_2 is input as T, and (R +
S * T) is executed. (R + S × T) computing means 7
8_2 outputs 1E672E9F000000. The multiplexer 80_2 has a partial square root holding unit 74_2.
Select the output of and output. In the adding means 81_2, the output of the merged square root holding means 82_5 and the multiplexer 80
For the output of _2, the 13 bits are aligned from 2 45 to 2 33 and input, and the addition is performed.
Output 000.
【0064】ステージ 6:はじめに(R+S×T)演
算手段78_2の出力が剰余保持手段72_6に、加算
手段81_2の出力が併合平方根保持手段82_6に、
例外検出情報保持手段62_5の出力が62_6に、指
数保持手段66_5の出力が66_6に、テーブル出力
情報保持手段71_5の出力が71_6に、それぞれセ
ットされる。剰余保持手段72_6にセットされた2番
目の剰余R2 の1E672E9F000000にテーブ
ル出力情報保持手段71_6の出力する091A1が乗
算手段73_3により掛けられ、積0114B904C
60FF000000が出力される。Stage 6: First, the output of (R + S × T) computing means 78_2 is to the remainder holding means 72_6, the output of the adding means 81_2 is to the merged square root holding means 82_6,
The output of the exception detection information holding means 62_5 is set to 62_6, the output of the exponent holding means 66_5 is set to 66_6, and the output of the table output information holding means 71_5 is set to 71_6. The 1E672E9F000000 of the second remainder R 2 set in the remainder holding means 72_6 is multiplied by 091A1 output from the table output information holding means 71_6 by the multiplication means 73_3, and the product 0114B904C is obtained.
60FF000000 is output.
【0065】ステージ 7:はじめに乗算手段73_3
の259で丸め後の出力の272から260の0115が符号
1ビット、データ12ビットの3番目の部分平方根とし
て部分平方根保持手段74_3に、例外検出情報保持手
段62_6の出力が62_7に、指数保持手段66_6
の出力が66_7に、剰余保持手段72_6の出力が7
2_7に、併合平方根保持手段82_6の出力が82_
7に、テーブル出力情報保持手段71_6の出力が71
_7に、それぞれセットされる。シフタ75_3では剰
余保持手段72_7の出力を左に11ビットシフトす
る。反転手段76_3では0115が反転され、1EE
Aとなり、最下位ビットとして1が付加されて出力さ
れ、(R+S×T)演算手段78_3では実質的に乗数
として1EEBで演算が行なわれる。一方、被乗数生成
手段77_3では、併合平方根保持手段82_7の出力
を左に1ビットシフトするとともに、部分平方根保持手
段74_3の出力する13ビットの先頭ビットを除く1
2ビットを233から222へ埋め込み、0E102404
5400000を出力する。(R+S×T)演算手段7
8_3ではシフタ75_3の出力をR、被乗数生成手段
77_3の出力をS,反転手段76_3の出力をTとし
て入力し、(R+S×T)の演算を実行する。(R+S
×T)演算手段78_3はC2056D11C0000
0を出力する。マルチプレクサ80_3は、定数減算手
段79_3の出力を選択して出力する。加算手段81_
3では併合平方根保持手段82_7の出力と、マルチプ
レクサ80_3の出力については13ビットを234から
222に整列させて入力して加算を行ない、070812
045000000を出力する。Stage 7: Introduction Multiplying Means 73_3
2 72 2 60 0115 sign bit of the output of the rounded at 2 59, the partial square root holder 74_3 as the third partial square root of the data 12 bits, the output of the exception detection information holding unit 62_6 is to 62_7, Index holding means 66_6
Is output to 66_7, and the output of the surplus holding means 72_6 is 7
2_7, the output of the merged square root holding means 82_6 is 82_.
7, the output of the table output information holding means 71_6 is 71.
_7, respectively. The shifter 75_3 shifts the output of the surplus holding means 72_7 to the left by 11 bits. 0115 is inverted by the inverting means 76_3, and 1EE
The value becomes A, 1 is added as the least significant bit, and the value is output. In the (R + S × T) operation means 78_3, the operation is substantially performed by 1EEB as a multiplier. On the other hand, in the multiplicand generating means 77_3, the output of the merged square root holding means 82_7 is shifted to the left by 1 bit, and the leading 13 bits of the 13 bits output by the partial square root holding means 74_3 are excluded.
2 bits are embedded from 2 33 to 2 22 and 0E102404
5400000 is output. (R + S × T) computing means 7
In 8_3, the output of the shifter 75_3 is input as R, the output of the multiplicand generating means 77_3 is input as S, and the output of the inverting means 76_3 is input as T, and the operation of (R + S × T) is executed. (R + S
× T) The calculating means 78_3 is C2056D11C0000.
Outputs 0. The multiplexer 80_3 selects and outputs the output of the constant subtraction unit 79_3. Adder 81_
In 3, the output of the merged square root holding means 82_7 and the output of the multiplexer 80_3 are aligned by inputting 13 bits from 2 34 to 2 22 and input to perform addition.
Outputs 045000000.
【0066】ステージ 8:はじめに(R+S×T)演
算手段78_3の出力が剰余保持手段72_8に、加算
手段81_3の出力が併合平方根保持手段82_8に、
例外検出情報保持手段62_7の出力が62_8に、指
数保持手段66_7の出力が66_8に、テーブル出力
情報保持手段71_7の出力が71_8に、それぞれセ
ットされる。剰余保持手段72_8にセットされた3番
目の剰余R3 のC2056D11C00000にテーブ
ル出力情報保持手段71_8の出力する091A1が乗
算手段73_4により掛けられ、積1DCBE1830
A5E9C00000が出力される。Stage 8: First, the output of the (R + S × T) computing means 78_3 is to the remainder holding means 72_8, the output of the adding means 81_3 is to the merged square root holding means 82_8,
The output of the exception detection information holding means 62_7 is set to 62_8, the output of the exponent holding means 66_7 is set to 66_8, and the output of the table output information holding means 71_7 is set to 71_8. The multiplication unit 73_4 multiplies C2056D11C00000 of the third residue R 3 set in the residue holding unit 72_8 by 091A1 output from the table output information holding unit 71_8, and the product 1DCBE1830
A5E9C00000 is output.
【0067】ステージ 9:はじめに乗算手段73_4
の259で丸め後の出力の272から260の1DCCが符号
1ビット、データ12ビットの4番目の部分平方根とし
て部分平方根保持手段74_4に、例外検出情報保持手
段62_8の出力が62_9に、指数保持手段66_8
の出力が66_9に、剰余保持手段72_8の出力が7
2_9に、併合平方根保持手段82_8の出力が82_
9に、テーブル出力情報保持手段71_8の出力が71
_9に、それぞれセットされる。シフタ75_4では剰
余保持手段72_9の出力を左に11ビットシフトす
る。反転手段76_4では1DCCが反転され、023
3となり、最下位ビットとして1が付加されて出力さ
れ、(R+S×T)演算手段78_4では実質的に乗数
として0234で演算が行なわれる。一方、被乗数生成
手段77_4では、併合平方根保持手段82_9の出力
を左に1ビットシフトするとともに、部分平方根保持手
段74_4の出力する13ビットの先頭ビットを除く1
2ビットを222から211へ埋め込み、0E102408
A6E6000を出力する。(R+S×T)演算手段7
8_4ではシフタ75_4の出力をR、被乗数生成手段
77_4の出力をS,反転手段76_4の出力をTとし
て入力し、(R+S×T)の演算を実行する。(R+S
×T)演算手段78_4はE45EBEFB2B800
0を出力する。マルチプレクサ80_4は、定数減算手
段79_4の出力を選択して出力する。加算手段81_
4では併合平方根保持手段82_9の出力と、マルチプ
レクサ80_4の出力については13ビットのうち、先
頭2ビットをゼロに抑止して11ビットを221から211
に整列させて入力して加算を行ない、07081204
52E5000を出力する。Stage 9: Introduction Multiplier 73_4
The output of 2 72 to 2 60 of 1DCC after rounding at 2 59 is the partial square root holding means 74_4 as the fourth partial square root of the code 1 bit and data 12 bits, and the output of the exception detection information holding means 62_8 is 62_9. Index holding means 66_8
Is output to 66_9, and the output of the surplus holding means 72_8 is 7
2_9, the output of the merged square root holding means 82_8 is 82_.
9, the output of the table output information holding means 71_8 is 71.
_9, respectively. The shifter 75_4 shifts the output of the remainder holding means 72_9 to the left by 11 bits. 1DCC is inverted by the inverting means 76_4, and 023
3, the value is added with 1 as the least significant bit and output, and the (R + S × T) operation means 78_4 performs the operation at 0234 as a practical multiplier. On the other hand, in the multiplicand generating means 77_4, the output of the merged square root holding means 82_9 is shifted to the left by 1 bit, and the leading 13 bits of the 13 bits output by the partial square root holding means 74_4 are excluded.
2 bits are embedded from 2 22 to 2 11 and 0E102408
Outputs A6E6000. (R + S × T) computing means 7
In 8_4, the output of the shifter 75_4 is input as R, the output of the multiplicand generating means 77_4 is input as S, and the output of the inverting means 76_4 is input as T, and the operation of (R + S × T) is executed. (R + S
× T) The calculating means 78_4 is E45EBEFB2B800.
Outputs 0. The multiplexer 80_4 selects and outputs the output of the constant subtraction unit 79_4. Adder 81_
4, the output of the merged square root holding means 82_9 and the output of the multiplexer 80_4 among the 13 bits are suppressed to 0 for the first 2 bits and 2 21 to 2 11 for 11 bits.
Aligned with, input and add, 07081204
52E5000 is output.
【0068】ステージ 10:はじめに(R+S×T)
演算手段78_4の出力が剰余保持手段72_10に、
加算手段81_4の出力が併合平方根保持手段82_1
0に、例外検出情報保持手段62_9の出力が62_1
0に、指数保持手段66_9の出力が66_10に、テ
ーブル出力情報保持手段71_9の出力が71_10
に、それぞれセットされる。剰余保持手段72_8にセ
ットされた4番目の剰余R4 のE45EBEFB2B8
000にテーブル出力情報保持手段71_10の出力す
る091A1が乗算手段73_5により掛けられ、積1
F04849C25F99DB8000が出力される。Stage 10: Introduction (R + S × T)
The output of the computing means 78_4 is supplied to the remainder holding means 72_10,
The output of the adding means 81_4 is the merged square root holding means 82_1.
0, the output of the exception detection information holding means 62_9 is 62_1.
0, the output of the index holding means 66_9 is 66_10, and the output of the table output information holding means 71_9 is 71_10.
Are set respectively. E45EBEFB2B8 of the fourth residue R 4 set in the residue holding means 72_8
000 is multiplied by 091A1 output from the table output information holding means 71_10 by the multiplication means 73_5, and the product 1
F04849C25F99DB8000 is output.
【0069】ステージ 11:はじめに乗算手段73_
5の259で丸め後の出力の272から260の1F05が符
号1ビット、データ12ビットの5番目の部分平方根と
して部分平方根保持手段74_5に、例外検出情報保持
手段62_10の出力が62_11に、指数保持手段6
6_10の出力が66_11に、剰余保持手段72_1
0の出力が72_11に、併合平方根保持手段82_1
0の出力が82_11に、テーブル出力情報保持手段7
1_10の出力が71_11に、それぞれセットされ
る。シフタ75_5では剰余保持手段72_11出力を
左に11ビットシフトする。反転手段76_5では1F
05が反転され、00FAとなり、最下位ビットとして
1が付加されて出力され、(R+S×T)演算手段78
_5では実質的に乗数として00FBで演算が行なわれ
る。一方、被乗数生成手段77_5では、併合平方根保
持手段82_11の出力を左に1ビットシフトするとと
もに、部分平方根保持手段74_5の出力する13ビッ
トの先頭ビットを除く12ビットを211から20 へ埋め
込み、0E102408A5CBF05を出力する。
(R+S×T)演算手段78_5ではシフタ75_5の
出力をR、被乗数生成手段77_5の出力をS,反転手
段76_5の出力をTとして入力し、(R+S×T)の
演算を実行する。(R+S×T)演算手段78_5は9
32D2104EF49E7を出力する。マルチプレク
サ80_5は、定数減算手段79_5の出力を選択して
出力する。加算手段81_5では併合平方根保持手段8
2_11の出力と、マルチプレクサ80_5の出力につ
いては13ビットを212から20 に整列させて入力して
加算を行ない、0708120452E5F04を出力
する。Stage 11: Introduction Multiplier 73_
The output from 2 72 to 2 60 after being rounded at 2 59 of 5 is the partial square root holding means 74_5 as the fifth partial square root of the code 1 bit and the data 12 bits, and the output of the exception detection information holding means 62_10 is 62_11. , Index holding means 6
The output of 6_10 is 66_11, and the surplus holding means 72_1
The output of 0 is 72_11 and the merged square root holding means 82_1
The output of 0 is 82_11, and the table output information holding means 7
The output of 1_10 is set to 71_11. The shifter 75_5 shifts the output of the remainder holding means 72_11 to the left by 11 bits. 1F in the inverting means 76_5
05 is inverted to become 00FA, 1 is added as the least significant bit, and the result is output, and the (R + S × T) computing means 78
In _5, the calculation is substantially performed with 00FB as a multiplier. On the other hand, the multiplicand generator 77_5, with one bit shifts the output of the merging square holding means 82_11 left, embedded 12 bits except the first bit of the 13 bit output of the partial square root holding means 74_5 from 2 11 to 2 0, Outputs 0E102408A5CBF05.
The (R + S × T) calculating means 78_5 inputs the output of the shifter 75_5 as R, the output of the multiplicand generating means 77_5 as S, and the output of the inverting means 76_5 as T, and executes the calculation of (R + S × T). The (R + S × T) computing means 78_5 is 9
32D2104EF49E7 is output. The multiplexer 80_5 selects and outputs the output of the constant subtraction unit 79_5. The adding means 81_5 uses the merged square root holding means 8
Regarding the output of 2_11 and the output of the multiplexer 80_5, 13 bits are aligned from 2 12 to 2 0 and input to perform addition, and 0708120452E5F04 is output.
【0070】ステージ 12:はじめに(R+S×T)
演算手段78_5の出力が剰余保持手段72_12に、
加算手段81_5の出力が併合平方根保持手段82_1
2に、例外検出情報保持手段62_11の出力が62_
12に、指数保持手段66_11の出力が66_12
に、それぞれセットされる。例外検出手段83では例外
検出情報保持手段62_12の出力より入力オペランド
が負の場合、データ例外として検出し、浮動小数点ベク
トル開平演算装置の外部の命令実行制御部に対して例外
が発生していることを通知する。本数値例ではオペラン
ドは正であるので例外は検出されない。Stage 12: Introduction (R + S × T)
The output of the calculation means 78_5 is supplied to the remainder holding means 72_12,
The output of the adding means 81_5 is the merged square root holding means 82_1.
2, the output of the exception detection information holding means 62_11 is 62_.
12, the output of the exponent holding means 66_11 is 66_12.
Are set respectively. In the exception detection means 83, if the input operand is negative from the output of the exception detection information holding means 62_12, it is detected as a data exception, and an exception has occurred to the instruction execution control unit outside the floating point vector square root operation unit. To notify. In this numerical example, the operand is positive, so no exception is detected.
【0071】最終的な結果として、263の符号ビットと
して0、262から252の指数部として指数保持手段66
_12の出力する11ビット、251から20 の仮数部と
して併合平方根保持手段82_12の出力の253から2
2 がそれぞれ選択され、5E3C2048114B97
C1として図5,図6に示すベクトル開平演算装置から
出力される。As a final result, the exponent holding means 66 is 0 as the sign bit of 2 63 and the exponent part of 2 62 to 2 52.
Output to 11 bits _12, from merging square holding means 2 53 outputs the 82_12 as mantissa from 2 51 2 0 2
2 is selected and 5E3C2048114B97
It is output as C1 from the vector square root calculating device shown in FIGS.
【0072】(実施例4)図7は本発明の第4の実施例
に係る固定小数点開平演算装置のブロック図を示すもの
である。本実施例の固定小数点開平演算装置は2の補数
表示の64ビットの固定小数点数を入力して、2の補数
表示の32ビットの平方根を出力し、部分平方根のデー
タとしてのビット長が12で部分平方根間には1ビット
の重複がある。図7において、101は入力レジスタ、
102は例外検出手段、103は正規化シフト数検出手
段、104は正規化手段、105はテーブル情報格納手
段、106はシフタ、107はマルチプレクサ、108
は剰余保持手段、109は乗算手段、110はマルチプ
レクサ、111は併合平方根保持手段、112は反転手
段、113は被乗数生成手段、114は(R+S×T)
演算手段、115は定数減算手段、116はマルチプレ
クサ、117は桁合わせ手段、118は加算手段、11
9は桁調整シフト数算出手段、120は桁調整手段であ
る。(Fourth Embodiment) FIG. 7 is a block diagram of a fixed point square root arithmetic unit according to a fourth embodiment of the present invention. The fixed-point square root arithmetic unit of the present embodiment inputs a 64-bit fixed-point number in 2's complement notation, outputs a square root of 32 bits in 2's complement notation, and has a bit length of 12 as data of partial square root. There is a 1-bit overlap between the partial square roots. In FIG. 7, 101 is an input register,
102 is an exception detecting means, 103 is a normalized shift number detecting means, 104 is a normalizing means, 105 is a table information storing means, 106 is a shifter, 107 is a multiplexer, 108
Is a remainder holding means, 109 is a multiplication means, 110 is a multiplexer, 111 is a merged square root holding means, 112 is an inverting means, 113 is a multiplicand generating means, and 114 is (R + S × T).
Arithmetic means, 115 constant subtraction means, 116 multiplexer, 117 digit alignment means, 118 addition means, 11
9 is a digit adjustment shift number calculating means, and 120 is a digit adjusting means.
【0073】以下、具体的な数値例を用いて図7に示す
固定小数点開平演算装置の動作を説明する。図8はオペ
ランドが入力されてから、各々の手段で処理されていく
過程を示している。はじめにオペランドとして0006
14CB57ED84ADが入力され、入力レジスタ1
01にセットされる。例外検出手段102では入力オペ
ランドの先頭2ビットが10または11の場合はデータ
例外として、また01の場合はオーバーフロー例外とし
て検出し、固定小数点開平演算装置の外部の命令実行制
御部に対して例外が発生していることを通知する。本数
値例では(以下では、この前提を省略する)例外は検出
されない。正規化シフト数検出手段103では、2ビッ
ト単位のビット正規化を行なうためのシフト数を検出し
ており、12が出力される。正規化手段104では、正
規化シフト数検出手段103より、シフト数12の指示
を受け、入力データを12ビット左にシフトして出力す
る。テーブル情報格納手段105には正規化手段104
の263から252の12ビットが入力され、0CFA4が
出力される。さらにこの出力の最下位ビットとして正規
化手段4の251のビットを反転したものが付加されるの
であるが、本例では0が付加され、乗算手段109での
実質的な乗数は0CFA4となる。マルチプレクサ10
7では先頭に4ビットのゼロを付加した正規化手段10
4の出力を選択し、この出力が剰余保持手段108にセ
ットされる。このとき、併合平方根保持手段111はゼ
ロにリセットされる。乗算手段109で0614CB5
7ED84AD000と0CFA4の乗算が行なわれ、
04EEB5BE5D6270E1D4000の積が求
められると同時に1回目の反復では267の位で、2回目
以降では268の位で積を丸めた結果が、マルチプレクサ
110に対して出力される。マルチプレクサ110では
乗算手段109の280から268の13ビットを符号1ビ
ット、データ12ビットの1番目の部分平方根として選
択する。反転手段112では部分平方根を入力してビッ
ト反転するとともに最下位ビットに1を付加して出力す
る。1番目の部分平方根の符号は正であり、符号ビット
は0である。被乗数生成手段113では、1回目の反復
では254から242までにマルチプレクサ110の出力を
埋め込み、他のビットをゼロとして出力する。(R+S
×T)演算手段114では剰余保持手段108の出力を
R、被乗数生成手段113の出力をS,反転手段112
の出力をTとして入力し、(R+S×T)の演算を実行
する。(R+S×T)演算手段114の出力FFFF0
317ED84AD000はシフタ106によって左に
11ビットシフトされてマルチプレクサ107により選
択され、剰余保持手段108にセットされる。一方、定
数減算手段115ではマルチプレクサ110の出力のL
SBから1を引く。マルチプレクサ116は、(R+S
×T)演算手段114の出力が負の場合、定数減算手段
115の出力を選択し、それ以外の場合はマルチプレク
サ110の出力を選択する。1回目の反復では上記の条
件を判断して定数減算手段115の出力を選択する。桁
合わせ手段117では各反復での部分平方根を併合する
ための桁合わせをを実行する。具体的には、部分平方根
が負の場合には、マルチプレクサ116の出力の13ビ
ットの先頭2ビットをゼロに抑止し、また、部分平方根
が正の場合には、マルチプレクサ116の出力の13ビ
ットを、上位の併合平方根とのビットの重みがつり合う
ようにシフトを行ない、出力する。1番目の部分平方根
に対しては、254から242に入力データを整列させ、出
力する。加算手段118では併合平方根保持手段111
の出力と、桁合わせ手段117の出力を入力して加算を
行ない、結果を併合平方根保持手段111にセットす
る。The operation of the fixed-point square root extraction arithmetic unit shown in FIG. 7 will be described below by using specific numerical examples. FIG. 8 shows a process in which an operand is input and then processed by each means. First, 0006 as an operand
Input 14CB57ED84AD and input register 1
It is set to 01. The exception detecting means 102 detects a data exception when the first two bits of the input operand are 10 or 11, and detects an overflow exception when the first two bits are 01, and the exception is sent to the instruction execution control unit outside the fixed point square root arithmetic unit. Notify that it is happening. In this numerical example (this assumption is omitted below), no exception is detected. The normalization shift number detecting means 103 detects the shift number for performing bit normalization in units of 2 bits, and 12 is output. The normalizing means 104 receives an instruction of the shift number 12 from the normalizing shift number detecting means 103, shifts the input data to the left by 12 bits, and outputs it. The table information storage means 105 has a normalization means 104.
12 63 bits from 2 63 to 2 52 are input, and 0CFA4 is output. Further, as the least significant bit of this output, an inversion of the 2 51 bits of the normalizing means 4 is added, but in this example, 0 is added, and the substantial multiplier in the multiplying means 109 becomes 0 CFA4. .. Multiplexer 10
In the case of 7, the normalizing means 10 in which 4-bit zero is added to the head 10
4 is selected, and this output is set in the surplus holding means 108. At this time, the merged square root holding means 111 is reset to zero. 0614CB5 by multiplying means 109
7ED84AD000 and 0CFA4 are multiplied,
The product of 04EEB5BE5D6270E1D4000 is obtained, and at the same time, the result of rounding the product at the 2 67 's place in the first iteration and at the 2 68 's place in the second and subsequent iterations is output to the multiplexer 110. Code 1 bit 13 bits 2 80 2 68 multiplexers 110 in the multiplication means 109, selects as the first partial square root of the data 12 bits. The inverting means 112 inputs the partial square root, inverts the bits, adds 1 to the least significant bit, and outputs it. The sign of the first partial square root is positive and the sign bit is 0. In the first iteration, the multiplicand generating means 113 embeds the output of the multiplexer 110 from 2 54 to 2 42 and outputs the other bits as zero. (R + S
XT) In the calculating means 114, the output of the remainder holding means 108 is R, the output of the multiplicand generating means 113 is S, and the inverting means 112.
The output of is input as T, and the operation of (R + S × T) is executed. (R + S × T) Output FFFF0 of the calculation means 114
317ED84AD000 is shifted to the left by 11 bits by the shifter 106, selected by the multiplexer 107, and set in the residue holding means 108. On the other hand, in the constant subtraction means 115, the output of the multiplexer 110 is L
Subtract 1 from SB. The multiplexer 116 is (R + S
× T) When the output of the calculation means 114 is negative, the output of the constant subtraction means 115 is selected, and in other cases, the output of the multiplexer 110 is selected. In the first iteration, the above condition is judged and the output of the constant subtracting means 115 is selected. The digit alignment means 117 performs digit alignment for merging the partial square roots in each iteration. Specifically, when the partial square root is negative, the first 2 bits of 13 bits of the output of the multiplexer 116 are suppressed to zero, and when the partial square root is positive, the 13 bits of the output of the multiplexer 116 are suppressed. , And outputs so as to shift so that the bit weights of the upper merged square roots are balanced. For the first partial square root, the input data is aligned from 2 54 to 2 42 and output. In the adding means 118, the merged square root holding means 111
And the output of the digit alignment means 117 are input to perform addition, and the result is set in the merged square root holding means 111.
【0074】次に2回目の反復計算に入る。テーブル情
報格納手段105の出力は2回目以降も1回目と変わら
ない。剰余保持手段108にセットされた1番目の剰余
R1のF818BF6C256800000に0CFA
4が乗算手段109により掛けられ、積F996F2A
313870EA000000が出力される。281から
269の1CCBが符号1ビット、データ12ビットの2
番目の部分平方根としてマルチプレクサ110により選
択される。反転手段112では1CCBが反転され、0
334となり、最下位ビットとして1が付加されて出力
され、(R+S×T)演算手段114では実質的に乗数
として0335で演算が行なわれる。一方、被乗数生成
手段113では、併合平方根保持手段111の出力を左
に1ビットシフトするとともに、マルチプレクサ110
の出力する13ビットの先頭ビットを除く12ビットを
242から231へ埋め込み、0277665800000
00を出力する。(R+S×T)演算手段114では剰
余保持手段108の出力をR、被乗数生成手段113の
出力をS,反転手段112の出力をTとして入力し、
(R+S×T)の演算を実行する。(R+S×T)演算
手段114の出力0001AAA45D6800000
はシフタ106によって左に11ビットシフトされてマ
ルチプレクサ107により選択され、剰余保持手段10
8にセットされる。マルチプレクサ116は、マルチプ
レクサ110の出力を選択して出力し、桁合わせ手段1
17では13ビットの入力のうち、先頭2ビットをゼロ
に抑止して11ビットを241から231に整列させる。加
算手段118では併合平方根保持手段111の出力と、
桁合わせ手段117の出力を入力して加算を行ない、1
3BA65800000000を出力する。併合平方根
保持手段111では加算手段118の出力をセットす
る。Next, the second iterative calculation is started. The output of the table information storage means 105 is the same as that of the first time after the second time. 0CFA in F818BF6C2568000000 of the first residue R 1 set in the residue holding means 108.
4 is multiplied by the multiplication means 109 to obtain the product F996F2A.
313870EA000000 is output. 1CCB sign bit from 2 81 2 69, data 12-bit 2
Selected by multiplexer 110 as the th partial square root. The inverting means 112 inverts 1 CCB, and
334, which is output with 1 added as the least significant bit, and the (R + S × T) computing means 114 substantially performs the computation at 0335 as the multiplier. On the other hand, in the multiplicand generating means 113, the output of the merged square root holding means 111 is shifted to the left by 1 bit, and the multiplexer 110
12 bits excluding the first bit of the 13 bits output from are embedded from 2 42 to 2 31
00 is output. In the (R + S × T) computing means 114, the output of the remainder holding means 108 is input as R, the output of the multiplicand generating means 113 is input as S, and the output of the inverting means 112 is input as T,
The calculation of (R + S × T) is executed. (R + S × T) Output of computing means 114 0001AAA45D6800000
Is shifted to the left by 11 bits by the shifter 106 and selected by the multiplexer 107.
Set to 8. The multiplexer 116 selects and outputs the output of the multiplexer 110, and the digit alignment means 1
At 17, the leading 2 bits of the 13-bit input are suppressed to zero and the 11 bits are aligned from 2 41 to 2 31 . In the adding means 118, the output of the merged square root holding means 111,
The output of the digit alignment means 117 is input to perform addition, and 1
Outputs 3BA65800000000. The merged square root holding means 111 sets the output of the adding means 118.
【0075】次に3回目の反復計算に入る。テーブル情
報格納手段105の出力は1回目と変わらない。剰余保
持手段108にセットされた2番目の剰余R2 の0D5
522EB400000000に0CFA4が乗算手段
109により掛けられ、積0AD061C697750
00000000が出力される。281から269の056
8が符号1ビット、データ12ビットの3番目の部分平
方根としてマルチプレクサ110により選択される。反
転手段112では0568が反転され、1A97とな
り、最下位ビットとして1が付加されて出力され、(R
+S×T)演算手段114では実質的に乗数として1A
98で演算が行なわれる。一方、被乗数生成手段113
では、併合平方根保持手段111の出力を左に1ビット
シフトするとともに、マルチプレクサ110の出力する
13ビットの先頭ビットを除く12ビットを231から2
20へ埋め込み、02774CB56800000を出力
する。(R+S×T)演算手段114では剰余保持手段
108の出力をR、被乗数生成手段113の出力をS,
反転手段112の出力をTとして入力し、(R+S×
T)の演算を実行する。(R+S×T)演算手段114
の出力00002C3685C000000を出力す
る。マルチプレクサ116は、マルチプレクサ110の
出力を選択して出力し、桁合わせ手段117では13ビ
ットの入力を232から220に整列させる。加算手段11
8では併合平方根保持手段111の出力と、桁合わせ手
段117の出力を入力して加算を行ない、13BA65
D68000000を出力する。桁調整シフト数算出手
段119では、正規化シフト数検出手段103からの1
2を右1ビットシフトして6とした後、定数25を加
え、31を出力し、桁調整手段120では加算手段11
8の出力を桁調整シフト数算出手段119からの指示で
ある31だけ右にシフトして最終結果である02774
CBAを出力する。Next, the third iterative calculation is started. The output of the table information storage means 105 is the same as the first output. 0D5 of the second residue R 2 set in the residue holding means 108
522EB400000000 is multiplied by 0CFA4 by multiplying means 109 and the product 0AD061C697750 is obtained.
00000000 is output. 2 81 to 2 69 of 056
8 is selected by the multiplexer 110 as the third partial square root of the code 1 bit and the data 12 bits. The inverting means 112 inverts 0568 to become 1A97, adds 1 as the least significant bit, and outputs (R
+ S × T) In the calculation means 114, substantially 1A as a multiplier
The operation is performed at 98. On the other hand, the multiplicand generating means 113
Then, the output of the merged square root holding unit 111 is shifted to the left by 1 bit, and the 12 bits except the leading bit of the 13 bits output from the multiplexer 110 are changed from 2 31 to 2 2.
Embed in 20 and output 02774CB56800000. In the (R + S × T) computing means 114, the output of the remainder holding means 108 is R, the output of the multiplicand generating means 113 is S,
The output of the inverting means 112 is input as T, and (R + S ×
The calculation of T) is executed. (R + S × T) computing means 114
The output of 00002C3685C000000 is output. The multiplexer 116 selects and outputs the output of the multiplexer 110, and the digit aligning means 117 aligns the 13-bit input from 2 32 to 2 20 . Adding means 11
In 8, the output of the merged square root holding means 111 and the output of the digit alignment means 117 are input and addition is performed. 13BA65
Outputs D68000000. The digit adjustment shift number calculation means 119 outputs 1 from the normalized shift number detection means 103.
After shifting 2 from the right by 1 bit to 6, add a constant 25 and output 31, and the digit adjusting means 120 adds the means 11
The output of 8 is shifted to the right by 31 which is the instruction from the digit adjustment shift number calculation means 119, and the final result is 02774.
Output CBA.
【0076】(実施例5)図9は本発明の第5の実施例
に係る固定小数点開平演算装置のブロック図を示すもの
である。本実施例の固定小数点開平演算装置は2の補数
表示の64ビットの固定小数点数を入力して、2の補数
表示の32ビットの平方根を出力し、部分平方根のデー
タとしてのビット長が12で部分平方根間には1ビット
の重複がある。図9において、201は入力レジスタ、
202は例外検出手段、203は正規化シフト数検出手
段、204は正規化手段、205はテーブル情報格納手
段、206はシフタ、207はマルチプレクサ、208
は剰余保持手段、209は併合平方根保持手段、210
は部分平方根保持手段、211は反転手段、212は被
乗数生成手段、213から215はマルチプレクサ、2
16は(R+S×T)演算手段、217はマルチプレク
サ、218は定数減算手段、219はマルチプレクサ、
220は桁合わせ手段、221は加算手段、222は桁
調整シフト数算出手段、223は桁調整手段である。(Embodiment 5) FIG. 9 is a block diagram of a fixed point square root arithmetic unit according to a fifth embodiment of the present invention. The fixed-point square root arithmetic unit of the present embodiment inputs a 64-bit fixed-point number in 2's complement notation, outputs a square root of 32 bits in 2's complement notation, and has a bit length of 12 as data of partial square root. There is a 1-bit overlap between the partial square roots. In FIG. 9, 201 is an input register,
Reference numeral 202 is an exception detection means, 203 is a normalized shift number detection means, 204 is a normalization means, 205 is a table information storage means, 206 is a shifter, 207 is a multiplexer, 208
Is a surplus holding means, 209 is a merged square root holding means, 210
Is a partial square root holding means, 211 is an inverting means, 212 is a multiplicand generating means, 213 to 215 are multiplexers, 2
16 is an (R + S × T) operation means, 217 is a multiplexer, 218 is a constant subtraction means, 219 is a multiplexer,
220 is a digit adjusting means, 221 is an adding means, 222 is a digit adjusting shift number calculating means, and 223 is a digit adjusting means.
【0077】以下、具体的な数値例を用いて図9に示す
固定小数点開平演算装置の動作を説明する。オペランド
が入力されてから、各々の手段で処理されていく過程
は、第4の実施例で使用した図8と同様である。はじめ
にオペランドとして000614CB57ED84AD
が入力され、入力レジスタ201にセットされる。例外
検出手段202では入力オペランドの先頭2ビットが1
0または11の場合はデータ例外として、また01の場
合はオーバーフロー例外として検出し、固定小数点開平
演算装置の外部の命令実行制御部に対して例外が発生し
ていることを通知する。本数値例では(以下では、この
前提を省略する)例外は検出されない。正規化シフト数
検出手段203では、2ビット単位のビット正規化を行
なうためのシフト数を検出しており、12が出力され
る。正規化手段204では、正規化シフト数検出手段2
03より、シフト数12の指示を受け、入力データを1
2ビット左にシフトして出力する。テーブル情報格納手
段205には正規化手段204の263から252の12ビ
ットが入力され、0CFA4が出力される。さらにこの
出力の最下位ビットとして正規化手段204の251のビ
ットを反転したものが付加されるのであるが、本例では
0が付加され、(R+S×T)演算手段216での実質
的な乗数は0CFA4となる。マルチプレクサ207で
は先頭に4ビットのゼロを付加した正規化手段204の
出力を選択し、この出力が剰余保持手段208にセット
される。このとき、併合平方根保持手段209はゼロに
リセットされる。マルチプレクサ213、214、21
5はそれぞれ、‘0’、剰余保持手段208の出力、テ
ーブル情報格納手段205の出力を選択し、(R+S×
T)演算手段216で0614CB57ED84AD0
00と0CFA4の乗算が行なわれ、04EEB5BE
5D6270E1D4000の積が求められると同時に
1回目の反復では267の位で、2回目以降では268の位
で積を丸めた結果が、マルチプレクサ217に対して出
力される。マルチプレクサ217では(R+S×T)演
算手段216の280から268の13ビットを符号1ビッ
ト、データ12ビットの1番目の部分平方根として選択
し、部分平方根保持手段210にこの部分平方根がセッ
トされる。反転手段211では部分平方根保持手段21
0の出力を入力してビット反転するとともに上位に4ビ
ット符号を拡張し、最下位ビットに1を付加して出力す
る。被乗数生成手段212では、1回目の反復では254
から242までに部分平方根保持手段210の出力を埋め
込み、他のビットをゼロとして出力する。マルチプレク
サ213、214、215はそれぞれ、剰余保持手段2
08の出力、被乗数生成手段212の出力、反転手段2
11の出力を選択し、(R+S×T)演算手段216で
はマルチプレクサ213の出力をR、マルチプレクサ2
14の出力をS,マルチプレクサ215の出力をTとし
て入力し、(R+S×T)の演算を実行する。(R+S
×T)演算手段216の出力FFFF0317ED84
AD000はシフタ206によって左に11ビットシフ
トされてマルチプレクサ207により選択され、剰余保
持手段208にセットされる。一方、定数減算手段21
8では部分平方根保持手段210の出力のLSBから1
を引く。マルチプレクサ219は、(R+S×T)演算
手段216の出力が負の場合、定数減算手段218の出
力を選択し、それ以外の場合は部分平方根保持手段21
0の出力を選択する。1回目の反復では上記の条件を判
断して定数減算手段218の出力を選択する。桁合わせ
手段220では各反復での部分平方根を併合するための
桁合わせを実行する。具体的には、部分平方根が負の場
合には、マルチプレクサ219の出力の13ビットの先
頭2ビットをゼロに抑止し、また、部分平方根が正の場
合には、マルチプレクサ219の出力の13ビットを、
上位の併合平方根とのビットの重みがつり合うようにシ
フトを行ない、出力する。1番目の部分平方根に対して
は、254から242に入力データを整列させ、出力する。
加算手段221では併合平方根保持手段209の出力
と、桁合わせ手段220の出力を入力して加算を行な
い、結果を併合平方根保持手段209にセットする。The operation of the fixed-point square root extraction arithmetic unit shown in FIG. 9 will be described below by using specific numerical examples. The process from the input of the operand to the processing by each means is the same as that of FIG. 8 used in the fourth embodiment. First, 000614CB57ED84AD as an operand
Is input and set in the input register 201. In the exception detecting means 202, the first 2 bits of the input operand are 1
When it is 0 or 11, it is detected as a data exception, and when it is 01, it is detected as an overflow exception and notifies the instruction execution control unit outside the fixed-point square root arithmetic unit that an exception has occurred. In this numerical example (this assumption is omitted below), no exception is detected. The normalization shift number detecting means 203 detects the shift number for performing bit normalization in units of 2 bits, and 12 is output. In the normalizing means 204, the normalizing shift number detecting means 2
From 03, input the input data 1 in response to the instruction of shift number 12
Shift left by 2 bits and output. 12 bits from 2 63 to 2 52 of the normalization means 204 are input to the table information storage means 205, and 0CFA4 is output. Further, as the least significant bit of this output, a bit obtained by inverting the 2 51 bits of the normalizing means 204 is added, but in this example, 0 is added, and the (R + S × T) computing means 216 substantially outputs. The multiplier is 0CFA4. The multiplexer 207 selects the output of the normalizing means 204 having a 4-bit zero added to the head, and this output is set in the remainder holding means 208. At this time, the merged square root holding unit 209 is reset to zero. Multiplexers 213, 214, 21
5 selects “0”, the output of the remainder holding means 208, and the output of the table information storage means 205, respectively, and (R + S ×
T) 0614CB57ED84AD0 by the arithmetic means 216
The multiplication of 00 and 0CFA4 is performed and 04EEB5BE
At the same time that the product of 5D6270E1D4000 is obtained, the result of rounding the product at the 2 67 's place in the first iteration and at the 2 68 's place in the second and subsequent iterations is output to the multiplexer 217. The multiplexer 217 (R + S × T) code 1 bit 13 bits 2 80 2 68 arithmetic means 216 selects as the first partial square root of the data 12 bits, the partial square root is set to the partial square root holder 210 It The inversion means 211 has a partial square root holding means 21.
The output of 0 is input, bit-inverted, the 4-bit code is extended to the upper bit, 1 is added to the least significant bit, and output. The multiplicand generating means 212 has 2 54 in the first iteration.
From 2 to 2 42 , the output of the partial square root holding means 210 is embedded, and the other bits are output as zero. The multiplexers 213, 214, and 215 are the surplus holding means 2 respectively.
08 output, multiplicand generating means 212 output, inverting means 2
11 output is selected, and in the (R + S × T) computing means 216, the output of the multiplexer 213 is R, and the multiplexer 2
The output of 14 is input as S and the output of the multiplexer 215 is input as T, and the operation of (R + S × T) is executed. (R + S
XT) Output of operation means 216 FFFF0317ED84
AD000 is shifted to the left by 11 bits by the shifter 206, selected by the multiplexer 207, and set in the residue holding means 208. On the other hand, the constant subtraction means 21
8 is 1 from the LSB of the output of the partial square root holding means 210.
pull. The multiplexer 219 selects the output of the constant subtracting means 218 when the output of the (R + S × T) computing means 216 is negative, and the partial square root holding means 21 otherwise.
Select 0 output. In the first iteration, the above condition is judged and the output of the constant subtracting means 218 is selected. The digit alignment means 220 performs digit alignment for merging the partial square roots at each iteration. Specifically, when the partial square root is negative, the first 2 bits of the 13 bits of the output of the multiplexer 219 are suppressed to zero, and when the partial square root is positive, the 13 bits of the output of the multiplexer 219 are suppressed. ,
The shift is performed so that the weights of the bits of the upper merged square roots are balanced, and the result is output. For the first partial square root, the input data is aligned from 2 54 to 2 42 and output.
The adding means 221 inputs the output of the merged square root holding means 209 and the output of the digit aligning means 220 to perform addition, and sets the result in the merged square root holding means 209.
【0078】次に2回目の反復計算に入る。テーブル情
報格納手段205の出力は2回目以降も1回目と変わら
ない。マルチプレクサ213、214、215はそれぞ
れ、‘0’、剰余保持手段208にセットされた1番目
の剰余R1 のF818BF6C256800000、テ
ーブル情報格納手段205の出力0CFA4を選択し、
(R+S×T)演算手段216は(S×T)を実行し、
積F996F2A313870EA000000を出力
する。281から269の1CCBを符号1ビット、データ
12ビットの2番目の部分平方根としてマルチプレクサ
217により選択し、部分平方根保持手段210にこの
部分平方根がセットされる。反転手段211では1CC
Bが反転、上位に4ビット符号が拡張され、00334
となり、最下位ビットとして1が付加されて出力され、
(R+S×T)演算手段216では実質的に乗数として
00335で演算が行なわれる。一方、被乗数生成手段
212では、併合平方根保持手段209の出力を左に1
ビットシフトするとともに、部分平方根保持手段210
の出力する13ビットの先頭ビットを除く12ビットを
242から231へ埋め込み、0277665800000
00を出力する。マルチプレクサ213、214、21
5はそれぞれ、剰余保持手段208の出力、被乗数生成
手段212の出力、反転手段211の出力を選択する。
(R+S×T)演算手段216ではマルチプレクサ21
3の出力をR、マルチプレクサ214の出力をS,マル
チプレクサ215の出力をTとして入力し、(R+S×
T)の演算を実行する。(R+S×T)演算手段216
の出力0001AAA45D6800000はシフタ2
06によって左に11ビットシフトされてマルチプレク
サ207により選択され、剰余保持手段208にセット
される。マルチプレクサ219は、部分平方根保持手段
210の出力を選択して出力し、桁合わせ手段220で
は13ビットの入力のうち、先頭2ビットをゼロに抑止
して11ビットを241から231に整列させる。加算手段
220では併合平方根保持手段209の出力と、桁合わ
せ手段220の出力を入力して加算を行ない、13BA
65800000000を出力する。併合平方根保持手
段209では加算手段221の出力をセットする。Next, the second iterative calculation is started. The output of the table information storage unit 205 is the same as that of the first time even after the second time. The multiplexers 213, 214, 215 respectively select '0', F818BF6C2568000000 of the first remainder R 1 set in the remainder holding means 208, and the output 0CFA4 of the table information storage means 205,
The (R + S × T) computing means 216 executes (S × T),
The product F996F2A313870EA000000 is output. Code 1 bit 1CCB from 2 81 2 69, selected by multiplexer 217 as the second partial square root of the data 12 bits, the partial square root is set to the partial square root holding means 210. 1 CC in the reversing means 211
B is inverted, and the 4-bit code is extended to the higher order.
And 1 is added as the least significant bit and output,
In the (R + S × T) calculating means 216, the calculation is practically carried out at 00335 as a multiplier. On the other hand, in the multiplicand generating means 212, the output of the merged square root holding means 209 is set to the left by 1.
Bit-shifting and partial square root holding means 210
12 bits excluding the first bit of the 13 bits output from are embedded from 2 42 to 2 31
00 is output. Multiplexers 213, 214, 21
5 selects the output of the remainder holding means 208, the output of the multiplicand generating means 212, and the output of the inverting means 211, respectively.
In the (R + S × T) computing means 216, the multiplexer 21
3 is R, the output of the multiplexer 214 is S and the output of the multiplexer 215 is T, and (R + S ×
The calculation of T) is executed. (R + S × T) computing means 216
Output 0001AAA45D6800000 is shifter 2
It is shifted 11 bits to the left by 06, selected by the multiplexer 207, and set in the residue holding means 208. The multiplexer 219 selects and outputs the output of the partial square root holding unit 210, and the digit aligning unit 220 suppresses the leading 2 bits of the 13-bit input to zero and aligns 11 bits from 2 41 to 2 31 . . The addition unit 220 inputs the output of the merged square root holding unit 209 and the output of the digit alignment unit 220 to perform addition, and 13BA
Output 658000000. The merged square root holding means 209 sets the output of the adding means 221.
【0079】次に、3回目の反復計算に入る。テーブル
情報格納手段205の出力は1回目と変わらない。マル
チプレクサ213、214、215はそれぞれ、
‘0’、剰余保持手段208にセットされた2番目の剰
余R2 の0D5522EB400000000、テーブ
ル情報格納手段205の出力0CFA4を選択し、(R
+S×T)演算手段216は(S×T)を実行し、積0
AD061C69775000000000を出力す
る。281から269の0568が符号1ビット、データ1
2ビットの3番目の部分平方根としてマルチプレクサ2
17により選択され、部分平方根保持手段210にこの
部分平方根がセットされる。反転手段211では056
8が反転、上位に4ビット符号が拡張され、1FA97
となり、最下位ビットとして1が付加されて出力され、
(R+S×T)演算手段216では実質的に乗数として
1FA98で演算が行なわれる。一方、被乗数生成手段
212では、併合平方根保持手段209の出力を左に1
ビットシフトするとともに、部分平方根保持手段210
の出力する13ビットの先頭ビットを除く12ビットを
231から220へ埋め込み、02774CB568000
00を出力する。マルチプレクサ213、214、21
5はそれぞれ、剰余保持手段208の出力、被乗数生成
手段212の出力、反転手段211の出力を選択する。
(R+S×T)演算手段216ではマルチプレクサ21
3の出力をR、マルチプレクサ214の出力をS,マル
チプレクサ215の出力をTとして入力し、(R+S×
T)の演算を実行する。(R+S×T)演算手段216
は00002C3685C000000を出力する。マ
ルチプレクサ219は、部分平方根保持手段210の出
力を選択して出力し、桁合わせ手段220では13ビッ
トの入力を232から220に整列させる。加算手段221
では併合平方根保持手段209の出力と、桁合わせ手段
220の出力を入力して加算を行ない、13BA65D
68000000を出力する。桁調整シフト数算出手段
222では、正規化シフト数検出手段203からの12
を右1ビットシフトして6とした後、定数25を加え、
31を出力し、桁調整手段223では加算手段221の
出力を桁調整シフト数算出手段222からの指示である
31だけ右にシフトして最終結果である02774CB
Aを出力する。Next, the third iterative calculation is started. The output of the table information storage unit 205 is the same as the first output. The multiplexers 213, 214 and 215 are respectively
'0', 0D5522EB400000000 of the second remainder R 2 set in the remainder holding means 208, and the output 0CFA4 of the table information storage means 205 are selected, and (R
+ S × T) calculation means 216 executes (S × T), and the product 0
Outputs AD061C69775000000000. 0568 of 2 81 to 2 69 is a code 1 bit, data 1
Multiplexer 2 as the 3rd partial square root of 2 bits
This partial square root is selected in 17 and set in the partial square root holding means 210. 056 in the inverting means 211
8 is inverted, 4-bit code is extended to the upper, and 1FA97
And 1 is added as the least significant bit and output,
In the (R + S × T) calculating means 216, 1FA98 is used as a multiplier. On the other hand, in the multiplicand generating means 212, the output of the merged square root holding means 209 is set to the left by 1.
Bit-shifting and partial square root holding means 210
12 bits excluding the first bit of the 13 bits output by are embedded from 2 31 to 2 20 and 0274CB568000
00 is output. Multiplexers 213, 214, 21
5 selects the output of the remainder holding means 208, the output of the multiplicand generating means 212, and the output of the inverting means 211, respectively.
In the (R + S × T) computing means 216, the multiplexer 21
3 is R, the output of the multiplexer 214 is S and the output of the multiplexer 215 is T, and (R + S ×
The calculation of T) is executed. (R + S × T) computing means 216
Outputs 00002C3685C000000. The multiplexer 219 selects and outputs the output of the partial square root holding means 210, and the digit aligning means 220 aligns the 13-bit input from 2 32 to 2 20 . Adder 221
13BA65D
Outputs 68000000. In the digit adjustment shift number calculation means 222, 12 from the normalized shift number detection means 203
After shifting 1 bit to the right by 6 and adding constant 25,
31 is output, and the digit adjusting means 223 shifts the output of the adding means 221 to the right by 31 which is the instruction from the digit adjusting shift number calculating means 222, and the final result is 02774CB.
Output A.
【0080】(実施例6)図10,図11は本発明の第
6の実施例に係る固定小数点ベクトル開平演算装置のブ
ロック図を示すものである。本実施例の固定小数点ベク
トル開平演算装置は2の補数表示の64ビットの固定小
数点数ベクトルを要素順に入力して、2の補数表示の3
2ビットの平方根ベクトルを要素順に出力し、部分平方
根のデータとしてのビット長が12で部分平方根間には
1ビットの重複がある。図10,図11において、30
1は入力レジスタ、302_1から302_8は例外検
出情報保持手段、303は正規化シフト数検出手段、3
04_1から304_8は正規化シフト数保持手段、3
05は正規化手段、306は正規化オペランドレジス
タ、307はテーブル情報格納手段、308_2から3
08_6はテーブル出力情報保持手段、309_2から
309_8は剰余保持手段、310_1から310_3
は乗算手段、311_1から311_3は部分平方根保
持手段、312_1から312_3は反転手段、313
_1から313_3は被乗数生成手段、314_1から
314_3は(R+S×T)演算手段、316_1から
316_3は定数減算手段、317_1から317_3
はマルチプレクサ、318_1から318_2は加算手
段、319_4から319_8は併合平方根保持手段、
320_1から320_3はシフタ、321は例外検出
手段、322は桁調整シフト数算出手段、323は桁調
整手段である。(Sixth Embodiment) FIGS. 10 and 11 are block diagrams of a fixed-point vector square root arithmetic unit according to a sixth embodiment of the present invention. The fixed-point vector square root computing unit of this embodiment inputs a 64-bit fixed-point number vector in 2's complement representation in element order and inputs 3 in 2's complement representation.
A 2-bit square root vector is output in element order, the bit length as the data of the partial square root is 12, and there is an overlap of 1 bit between the partial square roots. In FIGS. 10 and 11, 30
1 is an input register, 302_1 to 302_8 are exception detection information holding means, 303 is a normalized shift number detection means, 3
04_1 to 304_8 are normalized shift number holding means, 3
Reference numeral 05 is a normalization means, 306 is a normalization operand register, 307 is a table information storage means, and 308_2 to 3
08_6 is table output information holding means, 309_2 to 309_8 are remainder holding means, and 310_1 to 310_3
Are multiplication means, 311_1 to 311_3 are partial square root holding means, 312_1 to 312_3 are inverting means, 313
_1 to 313_3 are multiplicand generating means, 314_1 to 314_3 are (R + S × T) calculating means, 316_1 to 316_3 are constant subtracting means, and 317_1 to 317_3.
Are multiplexers, 318_1 to 318_2 are addition means, 319_4 to 319_8 are merged square root holding means,
320_1 to 320_3 are shifters, 321 is an exception detection means, 322 is a digit adjustment shift number calculation means, and 323 is a digit adjustment means.
【0081】以下、具体的な数値例を用いて図10,図
11に示す固定小数点ベクトル開平演算装置の動作を説
明する。ベクトルの1つの要素のオペランドが入力され
てから、各々の手段で処理されていく過程は、第4の実
施例で使用した図8と同様である。以下では1つの要素
がステージ毎にどのように処理されていくかについて説
明する。The operation of the fixed-point vector square root arithmetic unit shown in FIGS. 10 and 11 will be described below by using specific numerical examples. The process in which the operand of one element of the vector is input and then processed by each means is the same as in FIG. 8 used in the fourth embodiment. The following describes how one element is processed for each stage.
【0082】ステージ 0:はじめにオペランドとして
000614CB57ED84ADが入力され、入力レ
ジスタ301にセットされる。正規化シフト数検出手段
303では、2ビット単位のビット正規化を行なうため
のシフト数を検出しており、12が出力される。正規化
手段305では、正規化シフト数検出手段303より、
シフト数12の指示を受け、入力データを12ビット左
にシフトして出力する。Stage 0: First, 000614CB57ED84AD is input as an operand and set in the input register 301. The normalization shift number detecting means 303 detects the shift number for performing bit normalization in units of 2 bits, and 12 is output. In the normalizing means 305, the normalizing shift number detecting means 303
In response to the shift number 12 instruction, the input data is shifted left 12 bits and output.
【0083】ステージ 1:はじめに入力レジスタ30
1の出力の先頭2ビットが例外検出情報保持手段302
_1に、正規化手段305の出力が正規化オペランドレ
ジスタ306に、正規化シフト数検出手段303の出力
が正規化シフト数保持手段304_1に、それぞれセッ
トされる。テーブル情報格納手段307には正規化オペ
ランドレジスタ306の263から252の12ビットが入
力され、0CFA4が出力される。さらにこの出力の最
下位ビットとして正規化オペランドレジスタ306の2
51の1ビットを反転したものが付加されるのであるが、
本例では0が付加され、乗算手段310_1から310
_3での実質的な乗数は0CFA4となる。Stage 1: Introduction Input Register 30
The first 2 bits of the output of 1 are exception detection information holding means 302
_1, the output of the normalization means 305 is set in the normalization operand register 306, and the output of the normalization shift number detection means 303 is set in the normalization shift number holding means 304_1. 12 bits from 2 63 to 2 52 of the normalized operand register 306 are input to the table information storage means 307, and 0CFA4 is output. Further, 2 of the normalized operand register 306 is set as the least significant bit of this output.
Although the one bit of 51 is inverted, it is added.
In this example, 0 is added to the multiplication means 310_1 to 310-3.
The actual multiplier at _3 is 0CFA4.
【0084】ステージ 2:はじめに例外検出情報保持
手段302_1の出力が302_2に、正規化オペラン
ドレジスタ306の出力が先頭に4ビットのゼロを付加
されて剰余保持手段309_2に、テーブル情報格納手
段307の出力がテーブル出力情報保持手段308_2
に、正規化シフト数保持手段304_1の出力が304
_2に、それぞれセットされる。乗算手段310_1で
0614CB57ED84AD000と0CFA4の乗
算が行なわれ、04EEB5BE5D6270E1D4
000の積が求められる。Stage 2: First, the output of the exception detection information holding means 302_1 is input to 302_2, the output of the normalized operand register 306 is prefixed with 4-bit zero, and the remainder holding means 309_2 is output to the table information storage means 307. Is table output information holding means 308_2
And the output of the normalized shift number holding means 304_1 is 304
It is set to _2. The multiplication means 310_1 multiplies 0614CB57ED84AD000 and 0CFA4 to obtain 04EEB5BE5D6270E1D4.
The product of 000 is required.
【0085】ステージ 3:はじめに乗算手段310_
1の280から268の13ビットが符号1ビット、データ
12ビットの1番目の部分平方根として部分平方根保持
手段311_1に、例外検出情報保持手段302_2の
出力が302_3に、剰余保持手段309_2の出力が
309_3に、テーブル出力情報保持手段308_2の
出力が308_3に、正規化シフト数保持手段304_
2の出力が304_3に、それぞれセットされる。反転
手段312_1では部分平方根保持手段311_1の出
力を入力してビット反転するとともに最下位ビットに1
を付加して出力する。また、被乗数生成手段313_1
では、254から242までに部分平方根保持手段311_
1の出力を埋め込み、他のビットをゼロとして出力す
る。(R+S×T)演算手段314_1では剰余保持手
段309_3の出力をR、被乗数生成手段313_1の
出力をS,反転手段312_1の出力をTとして入力
し、(R+S×T)の演算を実行する。(R+S×T)
演算手段314_1の出力FFFF0317ED84A
D000はシフタ320_1によって左に11ビットシ
フトされる。一方、定数減算手段316_1では部分平
方根保持手段311_1の出力のLSBから1を引く。
マルチプレクサ317_1は、(R+S×T)演算手段
314_1の出力が負の場合、定数減算手段316_1
の出力を選択し、それ以外の場合は部分平方根保持手段
311_1の出力を選択する。本例では上記の条件を判
断して定数減算手段316_1の出力を選択する。Stage 3: Introduction Multiplier 310_
13-bit sign bit of 1 of 2 80 to 2 68, the partial square root holding means 311_1 as the first partial square root of the data 12 bits, the output of the exception detection information holding unit 302_2 is 302_3, the output of the remainder holding means 309_2 Is 309_3, the output of the table output information holding means 308_2 is 308_3, and the normalized shift number holding means 304_
The two outputs are set to 304_3, respectively. The inverting means 312_1 inputs the output of the partial square root holding means 311_1, inverts the bits, and sets 1 to the least significant bit.
Is added and output. Also, the multiplicand generating means 313_1
Then, from 2 54 to 2 42 , partial square root holding means 311_
The output of 1 is embedded and the other bits are output as zero. The (R + S × T) calculation means 314_1 inputs the output of the remainder holding means 309_3 as R, the output of the multiplicand generation means 313_1 as S, and the output of the inversion means 312_1 as T, and executes the calculation of (R + S × T). (R + S × T)
Output of calculation means 314_1 FFFF0317ED84A
D000 is shifted to the left by 11 bits by the shifter 320_1. On the other hand, the constant subtraction means 316_1 subtracts 1 from the LSB of the output of the partial square root holding means 311_1.
The multiplexer 317_1 has a constant subtracting means 316_1 when the output of the (R + S × T) computing means 314_1 is negative.
Of the partial square root holding means 311_1. In other cases, the output of the partial square root holding means 311_1 is selected. In this example, the output of the constant subtracting means 316_1 is selected by judging the above conditions.
【0086】ステージ 4:はじめにシフタ320_1
の出力が剰余保持手段309_4に、マルチプレクサ3
17_1の出力する13ビットを254から242に整列さ
せ、他のビットをゼロとするデータが併合平方根保持手
段319_4に、例外検出情報保持手段302_3の出
力が302_4に、テーブル出力情報保持手段308_
3の出力が308_4に、正規化シフト数保持手段30
4_3の出力が304_4に、それぞれセットされる。
剰余保持手段309_4にセットされた1番目の剰余R
1 のF818BF6C256800000にテーブル出
力情報保持手段308_4の出力する0CFA4が乗算
手段310_2により掛けられ、積F996F2A31
3870EA000000が出力される。Stage 4: Introduction Shifter 320_1
Of the output of the multiplexer 3 to the residue holding means 309_4.
Data for which 13 bits output from 17_1 are aligned from 2 54 to 2 42 and the other bits are set to zero are merged square root holding means 319_4, the output of exception detection information holding means 302_3 is 302_4, and table output information holding means 308_.
The output of 3 is 308_4, and the normalized shift number holding means 30
The outputs of 4_3 are set to 304_4, respectively.
The first residue R set in the residue holding means 309_4
The F818BF6C2568000000 of 1 is multiplied by 0CFA4 output from the table output information holding means 308_4 by the multiplication means 310_2, and the product F996F2A31 is obtained.
3870EA000000 is output.
【0087】ステージ 5:はじめに乗算手段310_
2の出力の281から269の1CCBが符号1ビット、デ
ータ12ビットの2番目の部分平方根として部分平方根
保持手段311_2に、例外検出情報保持手段302_
4の出力が302_5に、剰余保持手段309_4の出
力が309_5に、併合平方根保持手段319_4の出
力が319_5に、テーブル出力情報保持手段308_
4の出力が308_5に、正規化シフト数保持手段30
4_4の出力が304_5に、それぞれセットされる。
反転手段312_2では1CCBが反転され、0334
となり、最下位ビットとして1が付加されて出力され、
(R+S×T)演算手段314_2では実質的に乗数と
して0335で演算が行なわれる。一方、被乗数生成手
段313_2では、併合平方根保持手段319_5の出
力を左に1ビットシフトするとともに、部分平方根保持
手段311_2の出力する13ビットの先頭ビットを除
く12ビットを242から231へ埋め込み、027766
580000000を出力する。(R+S×T)演算手
段314_2では剰余保持手段309_5の出力をR、
被乗数生成手段313_2の出力をS,反転手段312
_2の出力をTとして入力し、(R+S×T)の演算を
実行する。(R+S×T)演算手段314_2の出力0
001AAA45D6800000はシフタ320_2
によって左に11ビットシフトされる。マルチプレクサ
317_2は、部分平方根保持手段311_2の出力を
選択して先頭2ビットをゼロに抑止して11ビットを出
力し、加算手段318_1では併合平方根保持手段31
9_5の出力と、マルチプレクサ317_2の出力につ
いては241から231に整列させ、入力して加算を行な
い、13BA65800000000を出力する。Stage 5: Introduction Multiplier 310_
1CCB sign bit from 2 81 2 69 output of 2, the partial square root holding means 311_2 as the second partial square root of the data 12 bits, exception detection information holding means 302_
4 to 302_5, the residue holding means 309_4 to 309_5, the merged square root holding means 319_4 to 319_5, and the table output information holding means 308_.
The output of 4 is 308_5, and the normalized shift number holding means 30
The outputs of 4_4 are set to 304_5, respectively.
1CCB is inverted by the inverting means 312_2, and
And 1 is added as the least significant bit and output,
In the (R + S × T) calculating means 314_2, the calculation is substantially carried out at 0335 as a multiplier. On the other hand, in the multiplicand generating means 313_2, the output of the merged square root holding means 319_5 is shifted to the left by 1 bit, and the 12 bits except for the leading bit of the 13 bits output by the partial square root holding means 311_2 are embedded from 2 42 to 2 31 . 027766
Outputs 580000000. In the (R + S × T) computing means 314_2, the output of the remainder holding means 309_5 is R,
The output of the multiplicand generating means 313_2 is S, and the inverting means 312 is
The output of _2 is input as T, and the operation of (R + S × T) is executed. (R + S × T) Output 0 of calculation means 314_2
001AAA45D6800000 is a shifter 320_2
Is shifted to the left by 11 bits. The multiplexer 317_2 selects the output of the partial square root holding means 311_2, suppresses the leading 2 bits to zero, and outputs 11 bits, and the adding means 318_1 outputs the merged square root holding means 31.
The output of 9_5 and the output of the multiplexer 317_2 are aligned from 2 41 to 2 31 , input to perform addition, and 13BA65800000000 is output.
【0088】ステージ 6:はじめにシフタ320_2
の出力が剰余保持手段309_6に、加算手段318_
1の出力が併合平方根保持手段319_6に、例外検出
情報保持手段302_5の出力が302_6に、テーブ
ル出力情報保持手段308_5の出力が308_6に、
正規化シフト数保持手段304_5の出力が304_6
に、それぞれセットされる。剰余保持手段309_6に
セットされた2番目の剰余R2 の0D5522EB40
0000000にテーブル出力情報保持手段308_4
の出力する0CFA4が乗算手段310_3により掛け
られ、積0AD061C69775000000000
が出力される。Stage 6: Introduction Shifter 320_2
Output to the remainder holding means 309_6 and addition means 318_
The output of 1 is to the merged square root holding unit 319_6, the output of the exception detection information holding unit 302_5 is 302_6, the output of the table output information holding unit 308_5 is 308_6,
The output of the normalized shift number holding means 304_5 is 304_6.
Are set respectively. 0D5522EB40 of the second remainder R 2 set in the remainder holding means 309_6
Table output information holding means 308_4 at 0000000
0CFA4 output by the above is multiplied by the multiplication means 310_3, and the product 0AD061C69775000000000000 is multiplied.
Is output.
【0089】ステージ 7:はじめに乗算手段310_
2の出力の281から269の0568が符号1ビット、デ
ータ12ビットの3番目の部分平方根として部分平方根
保持手段311_3に、例外検出情報保持手段302_
6の出力が302_7に、剰余保持手段309_6の出
力が309_7に、併合平方根保持手段319_6の出
力が319_7に、正規化シフト数保持手段304_6
の出力が304_7に、それぞれセットされる。反転手
段312_3では0568が反転され、1A97とな
り、最下位ビットとして1が付加されて出力され、(R
+S×T)演算手段314_3では実質的に乗数として
1A98で演算が行なわれる。一方、被乗数生成手段3
13_3では、併合平方根保持手段319_7の出力を
左に1ビットシフトするとともに、部分平方根保持手段
311_3の出力する13ビットの先頭ビットを除く1
2ビットを231から220へ埋め込み,02774CB5
6800000を出力する。(R+S×T)演算手段3
14_3では剰余保持手段309_7の出力をR、被乗
数生成手段313_3の出力をS,反転手段312_3
の出力をTとして入力し、(R+S×T)の演算を実行
する。(R+S×T)演算手段314_3の出力000
02C3685C000000はシフタ320_3によ
って左に11ビットシフトされる。マルチプレクサ31
7_3は、部分平方根保持手段311_3の出力を選択
して13ビットを出力し、加算手段318_3では併合
平方根保持手段319_7の出力と、マルチプレクサ3
17_3の出力については232から220に整列させ、入
力して加算を行ない、13BA65D68000000
を出力する。Stage 7: Introduction Multiplier 310_
0568 the sign bit from the second output of the 2 81 2 69, the partial square root holder 311_3 as the third partial square root of the data 12 bits, exception detection information holding means 302_
The output of 6 is 302_7, the output of the remainder holding means 309_6 is 309_7, the output of the merged square root holding means 319_6 is 319_7, and the normalized shift number holding means 304_6.
Are set to 304_7, respectively. The inverting means 312_3 inverts 0568 to become 1A97, adds 1 as the least significant bit, and outputs (R
+ S × T) The calculating means 314_3 substantially calculates 1A98 as a multiplier. On the other hand, the multiplicand generating means 3
In 13_3, the output of the merged square root holding means 319_7 is shifted to the left by 1 bit, and the first bit of the 13 bits output by the partial square root holding means 311_3 is excluded.
2 bits are embedded from 2 31 to 2 20 and 02774CB5
6800000 is output. (R + S × T) computing means 3
In 14_3, the output of the remainder holding means 309_7 is R, the output of the multiplicand generating means 313_3 is S, and the inverting means 312_3.
The output of is input as T, and the operation of (R + S × T) is executed. (R + S × T) Output 000 of the calculating means 314_3
02C3685C000000 is shifted to the left by 11 bits by the shifter 320_3. Multiplexer 31
7_3 selects the output of the partial square root holding means 311_3 and outputs 13 bits, and the adder 318_3 outputs the output of the merged square root holding means 319_7 and the multiplexer 3
For the output of 17_3, it is aligned from 2 32 to 2 20 and is input and added, 13BA65D68000000
Is output.
【0090】ステージ 8:はじめにシフタ320_3
の出力が剰余保持手段309_8に、加算手段318_
2の出力が併合平方根保持手段319_8に、例外検出
情報保持手段302_7の出力が302_8に、正規化
シフト数保持手段304_7の出力が304_8に、そ
れぞれセットされる。例外検出手段321では例外検出
情報保持手段302_8の出力する2ビットが10また
は11の場合はデータ例外として、また01の場合はオ
ーバーフロー例外として検出し、固定小数点ベクトル開
平演算装置の外部の命令実行制御部に対して例外が発生
していることを通知する。本数値例では例外は検出され
ない。桁調整シフト数算出手段322では、正規化シフ
ト数保持手段304_8からの12を右1ビットシフト
して6とした後、定数25を加え、31を出力し、桁調
整手段323では併合平方根保持手段319_8の出力
を桁調整シフト数算出手段322からの指示である31
だけ右にシフトして最終結果である02774CBAを
出力する。Stage 8: Introduction Shifter 320_3
Output to the remainder holding means 309_8 and addition means 318_
The output of 2 is set to the merged square root holding unit 319_8, the output of the exception detection information holding unit 302_7 is set to 302_8, and the output of the normalized shift number holding unit 304_7 is set to 304_8. The exception detection unit 321 detects that the two bits output from the exception detection information holding unit 302_8 are 10 or 11 as a data exception, and detects 01 as an overflow exception, and controls the instruction execution outside the fixed-point vector square root operation unit. Notify the department that an exception has occurred. No exception is detected in this numerical example. The digit adjustment shift number calculating means 322 shifts 12 from the normalization shift number holding means 304_8 right by 1 bit to 6 and then adds a constant 25 and outputs 31, and the digit adjusting means 323 holds the merged square root holding means. The output of 319_8 is an instruction 31 from the digit adjustment shift number calculation means 322.
Only rightward and output the final result 02774CBA.
【0091】(実施例7)図16は本発明の第7の実施
例に係る浮動小数点開平演算装置のブロック図を示すも
のである。本実施例の浮動小数点開平演算装置はIEE
E規格の倍精度浮動小数点数を入力して、同じ倍精度浮
動小数点数の平方根を出力し、部分平方根のデータとし
てのビット長が12で部分平方根間には1ビットの重複
がある。図16において、501は入力レジスタ、50
2は例外検出手段、503は指数定数減算手段、504
はシフタ、505は指数定数加算手段、506はリーデ
ィングビット付加回路、507は正規化手段、508は
テーブル情報格納手段、509はシフタ、510はマル
チプレクサ、511は剰余保持手段、512は乗算手
段、513はマルチプレクサ、514は併合平方根保持
手段、515は反転手段、516は被乗数生成手段、5
17は(R+S×T)演算手段、518は定数減算手
段、519はマルチプレクサ、520は桁合わせ手段、
521は加算手段である。(Embodiment 7) FIG. 16 is a block diagram of a floating point square root arithmetic unit according to a seventh embodiment of the present invention. The floating point square root arithmetic unit of this embodiment is IEEE
The double precision floating point number of the E standard is input, the square root of the same double precision floating point number is output, the bit length as the data of the partial square root is 12, and there is an overlap of 1 bit between the partial square roots. In FIG. 16, 501 is an input register, 50
2 is exception detection means, 503 is exponential constant subtraction means, 504
Is a shifter, 505 is an exponent constant adding means, 506 is a leading bit adding circuit, 507 is a normalizing means, 508 is table information storing means, 509 is a shifter, 510 is a multiplexer, 511 is a surplus holding means, 512 is multiplying means, 513 Is a multiplexer, 514 is a merged square root holding means, 515 is an inverting means, 516 is a multiplicand generating means, 5
Reference numeral 17 is an (R + S × T) operation means, 518 is a constant subtraction means, 519 is a multiplexer, 520 is a digit alignment means,
Reference numeral 521 is an addition unit.
【0092】以下、具体的な数値例を用いて図16に示
す浮動小数点開平演算装置の動作を説明する。図17,
図18はオペランドが入力されてから、各々の手段で処
理されていく過程を示している。はじめにオペランドと
して7C88B89EAF092E9Fが入力され、入
力レジスタ501にセットされる。例外検出手段502
では入力オペランドが負の場合、データ例外として検出
し、浮動小数点開平演算装置の外部の命令実行制御部に
対して例外が発生していることを通知する。本数値例で
は(以下では、この前提を省略する)オペランドは正で
あるので例外は検出されない。入力レジスタ501の出
力の262から252の指数に対して、指数定数減算手段5
03により3FFが引かれた後、シフタ504により右
に1ビットシフトされ、指数定数加算手段505により
再び3FFが加算され、結果の指数が求められる。リー
ディングビット付加回路506では入力レジスタ501
の出力の251から20 の仮数部に対して先頭にリーディ
ングビットの1が付加される。正規化手段507では、
入力レジスタ501の出力の252のビットが1の場合入
力を左に12ビットシフトして、また、入力レジスタ5
01の出力の252のビットが0の場合入力を左に13ビ
ットシフトして出力する。テーブル情報格納手段508
には正規化手段507の265から254の12ビットが入
力され、091A0が出力される。さらにこの出力の最
下位ビットとして正規化手段507の253のビットを反
転したものが付加されるのであるが、本例では1が付加
され、乗算手段512での実質的な乗数は091A1と
なる。マルチプレクサ510では正規化手段507の出
力を選択し、この出力が剰余保持手段511にセットさ
れる。このとき、併合平方根保持手段514はゼロにリ
セットされる。乗算手段512で31713D5E12
5D3E000と091A1の乗算が行なわれ、1C2
03BF9E0905CC1FE000の積が求められ
ると同時に1回目の反復では269の位で、2回目以降の
反復では270の位で積を丸めた結果がマルチプレクサ5
13に対して出力される。マルチプレクサ513では乗
算手段512の282から270の13ビットを符号1ビッ
ト、データ12ビットの1番目の部分平方根として選択
する。反転手段515では部分平方根を入力してビット
反転するとともに最下位ビットに1を付加して出力す
る。また、被乗数生成手段516では、1回目の反復で
は256から244までにマルチプレクサ513の出力を埋
め込み、他のビットをゼロとして出力する。(R+S×
T)演算手段517では剰余保持手段511の出力を
R、被乗数生成手段516の出力をS,反転手段515
の出力をTとして入力し、(R+S×T)の演算を実行
する。(R+S×T)演算手段517の出力0000F
D5E125D3E000はシフタ509によって左に
11ビットシフトされてマルチプレクサ510により選
択され、剰余保持手段511にセットされる。一方、定
数減算手段518ではマルチプレクサ513の出力のL
SBから1を引く。マルチプレクサ519は、(R+S
×T)演算手段517の出力が負の場合、定数減算手段
518の出力を選択し、それ以外の場合はマルチプレク
サ513の出力を選択する。1回目の反復では上記の条
件を判断してマルチプレクサ513の出力を選択する。
桁合わせ手段520では各反復での部分平方根を併合す
るための桁合わせを実行する。具体的には、部分平方根
が負の場合には、マルチプレクサ519の出力の13ビ
ットの先頭2ビットをゼロに抑止し、また、部分平方根
が正の場合には、マルチプレクサ519の出力の13ビ
ットを、上位の併合平方根とのビットの重みがつり合う
ようにシフトを行ない、出力する。1番目の部分平方根
に対しては、256から244に入力データを整列させ、出
力する。加算手段521では併合平方根保持手段514
の出力と、桁合わせ手段520の出力を入力して加算を
行ない、結果を併合平方根保持手段514にセットす
る。The operation of the floating point square root extraction arithmetic unit shown in FIG. 16 will be described below by using specific numerical examples. 17,
FIG. 18 shows a process in which an operand is input and then processed by each means. First, 7C88B89EAF092E9F is input as an operand and set in the input register 501. Exception detection means 502
Then, when the input operand is negative, it is detected as a data exception and the instruction execution control unit outside the floating point square root operation unit is notified that an exception has occurred. In this numerical example (hereinbelow, this assumption is omitted), since the operand is positive, no exception is detected. Exponent constant subtraction means 5 is applied to the exponents from 2 62 to 2 52 of the output of the input register 501.
After 3FF is subtracted by 03, the shifter 504 shifts it to the right by 1 bit, and the exponent constant adding means 505 adds 3FF again to obtain the resulting exponent. In the leading bit adding circuit 506, the input register 501
The leading bit 1 is added to the head of the mantissa part of 2 51 to 2 0 of the output of 1. In the normalizing means 507,
If the 2 52 bits of the output of the input register 501 are 1, the input is shifted 12 bits to the left, and the input register 5
When 2 52 bits of the output of 01 are 0, the input is shifted left 13 bits and output. Table information storage means 508
The 12 bits from 2 65 to 2 54 of the normalizing means 507 are input to and the output is 091A0. Further, as the least significant bit of this output, the inverted bit of 2 53 of the normalization means 507 is added, but in this example, 1 is added, and the substantial multiplier in the multiplication means 512 becomes 091A1. .. The multiplexer 510 selects the output of the normalizing means 507, and this output is set in the residue holding means 511. At this time, the merged square root holding unit 514 is reset to zero. 31713D5E12 by multiplying means 512
5D3E000 and 091A1 are multiplied, and 1C2
The product of 03BF9E0905CC1FE000 is obtained, and at the same time, the result of rounding the product at the 2 69th place in the first iteration and at the 2 70th place in the second and subsequent iterations is the multiplexer 5
It is output to 13. The multiplexer 513 selects 13 bits from 2 82 to 2 70 of the multiplication means 512 as the first partial square root of the code 1 bit and the data 12 bits. The inverting means 515 inputs the partial square root, inverts the bits, adds 1 to the least significant bit, and outputs it. Further, in the multiplicand generating means 516, in the first iteration, the output of the multiplexer 513 is embedded from 2 56 to 2 44 and the other bits are output as zero. (R + S ×
T) In the calculating means 517, the output of the remainder holding means 511 is R, the output of the multiplicand generating means 516 is S, and the inverting means 515.
The output of is input as T, and the operation of (R + S × T) is executed. (R + S × T) Output 0000F of calculating means 517
D5E125D3E000 is shifted to the left by 11 bits by the shifter 509, selected by the multiplexer 510, and set in the surplus holding means 511. On the other hand, in the constant subtracting means 518, the output of the multiplexer 513 is L
Subtract 1 from SB. The multiplexer 519 uses (R + S
× T) When the output of the calculation means 517 is negative, the output of the constant subtraction means 518 is selected, and in other cases, the output of the multiplexer 513 is selected. In the first iteration, the above condition is judged and the output of the multiplexer 513 is selected.
The digit alignment means 520 performs digit alignment for merging the partial square roots at each iteration. Specifically, when the partial square root is negative, the leading 2 bits of the 13 bits of the output of the multiplexer 519 are suppressed to zero, and when the partial square root is positive, the 13 bits of the output of the multiplexer 519 are suppressed. , And outputs so as to shift so that the bit weights of the upper merged square roots are balanced. For the first partial square root, align the input data from 2 56 to 2 44 and output. In the adding means 521, the merged square root holding means 514
And the output of the digit alignment means 520 are input to perform addition, and the result is set in the merged square root holding means 514.
【0093】次に2回目の反復計算に入る。テーブル情
報格納手段508の出力は2回目以降も1回目と変わら
ない。剰余保持手段511にセットされた1番目の剰余
R1の07EAF092E9F000000に091A
1が乗算手段512により掛けられ、積04810D0
482E60FF000000が出力される。283から
271の0090が符号1ビット、データ12ビットの2
番目の部分平方根としてマルチプレクサ513により選
択される。反転手段515では0090が反転され、1
F6Fとなり、最下位ビットとして1が付加されて出力
され、(R+S×T)演算手段517では実質的に乗数
として1F70で演算が行なわれる。一方、被乗数生成
手段516では、併合平方根保持手段514の出力を左
に1ビットシフトするとともに、マルチプレクサ510
の出力する13ビットの先頭ビットを除く12ビットを
244から233へ埋め込み、0E10120000000
00を出力する。(R+S×T)演算手段517では剰
余保持手段511の出力をR、被乗数生成手段516の
出力をS,反転手段515の出力をTとして入力し、
(R+S×T)の演算を実行する。(R+S×T)演算
手段517の出力0001E672E9F000000
はシフタ509によって左に11ビットシフトされてマ
ルチプレクサ510により選択され、剰余保持手段51
1にセットされる。マルチプレクサ519は、マルチプ
レクサ513の出力を選択して出力し、桁合わせ手段5
20では13ビットの入力を245から233に整列させ
る。加算手段521では併合平方根保持手段514の出
力と、桁合わせ手段520の出力を入力して加算を行な
い、070812000000000を出力する。併合
平方根保持手段514では加算手段521の出力をセッ
トする。Next, the second iterative calculation is started. The output of the table information storage means 508 is the same as that of the first time even after the second time. 091A to 07EAF092E9F000000 of the first residue R 1 set in the residue holding means 511.
1 is multiplied by the multiplication means 512, and the product 04810D0 is obtained.
482E60FF000000 is output. 2 83 to 2 71 0090 is a code 1 bit, data 12 bits 2
Selected by multiplexer 513 as the th partial square root. The inversion means 515 inverts 0090 and
The result is F6F, 1 is added as the least significant bit, and the result is output, and the (R + S × T) operation means 517 substantially performs the operation at 1F70 as a multiplier. On the other hand, the multiplicand generating means 516 shifts the output of the merged square root holding means 514 to the left by 1 bit, and the multiplexer 510.
12 bits excluding the first bit of 13 bits output by are embedded from 2 44 to 2 33 , and 0E10120000000
00 is output. In the (R + S × T) computing means 517, the output of the remainder holding means 511 is input as R, the output of the multiplicand generating means 516 is input as S, and the output of the inverting means 515 is input as T,
The calculation of (R + S × T) is executed. (R + S × T) Output of computing means 517 0001E672E9F000000
Is shifted to the left by 11 bits by the shifter 509 and selected by the multiplexer 510.
Set to 1. The multiplexer 519 selects and outputs the output of the multiplexer 513, and the digit alignment means 5
At 20, the 13-bit input is aligned from 2 45 to 2 33 . The adding means 521 inputs the output of the merged square root holding means 514 and the output of the digit adjusting means 520, performs addition, and outputs 070812000000. The merged square root holding means 514 sets the output of the adding means 521.
【0094】次に3回目の反復計算に入る。テーブル情
報格納手段508の出力は1回目と変わらない。剰余保
持手段511にセットされた2番目の剰余R2 の0F3
3974F800000000に091A1が乗算手段
512により掛けられ、積08A5C826307F8
00000000が出力される。270の位で丸め後の2
83から271の0115が符号1ビット、データ12ビッ
トの3番目の部分平方根としてマルチプレクサ513に
より選択される。反転手段515では0115が反転さ
れ、1EEAとなり、最下位ビットとして1が付加され
て出力され、(R+S×T)演算手段517では実質的
に乗数として1EEBで演算が行なわれる。一方、被乗
数生成手段516では、併合平方根保持手段514の出
力を左に1ビットシフトするとともに、マルチプレクサ
513の出力する13ビットの先頭ビットを除く12ビ
ットを233から222へ埋め込み、0E10240454
00000を出力する。(R+S×T)演算手段517
では剰余保持手段511の出力をR、被乗数生成手段5
16の出力をS,反転手段515の出力をTとして入力
し、(R+S×T)の演算を実行する。(R+S×T)
演算手段517の出力FFFC2056D11C000
00はシフタ509によって左に11ビットシフトされ
てマルチプレクサ510により選択され、剰余保持手段
511にセットされる。マルチプレクサ519は、定数
減算手段518の出力を選択して出力し、桁合わせ手段
520では13ビットの入力を234から222に整列させ
る。加算手段521では併合平方根保持手段514の出
力と、桁合わせ手段520の出力を入力して加算を行な
い、070812045000000を出力する。併合
平方根保持手段514では加算手段521の出力をセッ
トする。Next, the third iterative calculation is started. The output of the table information storage means 508 is the same as that of the first time. 0F3 of the second residue R 2 set in the residue holding means 511
3974F800000000 is multiplied by 091A1 by multiplication means 512 and the product 08A5C826307F8 is obtained.
00000000 is output. 2 after rounding at 70s
The multiplexer 513 selects 0115 from 83 to 2 71 as the third partial square root of the code 1 bit and the data 12 bits. The inversion means 515 inverts 0115 to 1EEA, adds 1 as the least significant bit and outputs it, and the (R + S × T) operation means 517 substantially performs an operation with 1EEB as a multiplier. On the other hand, in the multiplicand generating means 516, the output of the merged square root holding means 514 is shifted to the left by 1 bit, and the 12 bits excluding the head bit of the 13 bits output from the multiplexer 513 are embedded from 2 33 to 2 22 to 0E10240454.
000000 is output. (R + S × T) computing means 517
Then, the output of the remainder holding means 511 is R, and the multiplicand generating means 5
The output of 16 is input as S and the output of the inverting means 515 is input as T, and the calculation of (R + S × T) is executed. (R + S × T)
Output of arithmetic means 517 FFFC2056D11C000
00 is shifted to the left by 11 bits by the shifter 509, selected by the multiplexer 510, and set in the residue holding means 511. The multiplexer 519 selects and outputs the output of the constant subtraction means 518, and the digit alignment means 520 aligns the 13-bit input from 2 34 to 2 22 . The adding means 521 inputs the output of the merged square root holding means 514 and the output of the digit adjusting means 520, performs addition, and outputs 070812045000000. The merged square root holding means 514 sets the output of the adding means 521.
【0095】次に4回目の反復計算に入る。テーブル情
報格納手段508の出力は1回目と変わらない。剰余保
持手段511にセットされた3番目の剰余R3 のE10
2B688E00000000に091A1が乗算手段
512により掛けられ、積EE5F0C1852F4E
00000000が出力される。270の位で丸め後の2
83から271の1DCCが符号1ビット、データ12ビッ
トの4番目の部分平方根としてマルチプレクサ513に
より選択される。反転手段515では1DCCが反転さ
れ、0233となり、最下位ビットとして1が付加され
て出力され、(R+S×T)演算手段517では実質的
に乗数として0234で演算が行なわれる。一方、被乗
数生成手段516では、併合平方根保持手段514の出
力を左に1ビットシフトするとともに、マルチプレクサ
513の出力する13ビットの先頭ビットを除く12ビ
ットを222から211へ埋め込み、0E102408A6
E6000を出力する。(R+S×T)演算手段517
では剰余保持手段511の出力をR、被乗数生成手段5
16の出力をS,反転手段515の出力をTとして入力
し、(R+S×T)の演算を実行する。(R+S×T)
演算手段517の出力FFFE45EBEFB2B80
00はシフタ509によって左に11ビットシフトされ
てマルチプレクサ510により選択され、剰余保持手段
511にセットされる。マルチプレクサ519は、定数
減算手段518の出力を選択して出力し、桁合わせ手段
520では13ビットの入力のうち、先頭2ビットをゼ
ロに抑止して11ビットを221から211に整列させる。
加算手段521では併合平方根保持手段514の出力
と、桁合わせ手段520の出力を入力して加算を行な
い、0708120452E5000を出力する。併合
平方根保持手段514では加算手段521の出力をセッ
トする。Next, the fourth iterative calculation is started. The output of the table information storage means 508 is the same as that of the first time. E10 of the third residue R 3 set in the residue holding means 511
2B688E00000000 is multiplied by 091A1 by multiplication means 512 and the product EE5F0C1852F4E
00000000 is output. 2 after rounding at 70s
The multiplexer 513 selects 1DCC from 83 to 2 71 as the fourth partial square root of the code 1 bit and the data 12 bits. The inverting means 515 inverts 1DCC to become 0233, adds 1 as the least significant bit and outputs it, and the (R + S × T) operation means 517 substantially performs the operation at 0234 as a multiplier. On the other hand, in the multiplicand generating means 516, the output of the merged square root holding means 514 is shifted to the left by 1 bit, and the 12 bits excluding the head bit of the 13 bits output from the multiplexer 513 are embedded from 2 22 to 2 11 to 0E102408A6.
Outputs E6000. (R + S × T) computing means 517
Then, the output of the remainder holding means 511 is R, and the multiplicand generating means 5
The output of 16 is input as S and the output of the inverting means 515 is input as T, and the calculation of (R + S × T) is executed. (R + S × T)
Output FFFE45EBEFB2B80 of computing means 517
00 is shifted to the left by 11 bits by the shifter 509, selected by the multiplexer 510, and set in the residue holding means 511. The multiplexer 519 selects and outputs the output of the constant subtracting means 518, and the digit aligning means 520 suppresses the leading 2 bits of the 13-bit input to zero and aligns 11 bits from 2 21 to 2 11 .
The adding means 521 inputs the output of the merged square root holding means 514 and the output of the digit adjusting means 520, performs addition, and outputs 0708120452E5000. The merged square root holding means 514 sets the output of the adding means 521.
【0096】次に5回目の反復計算に入る。テーブル情
報格納手段508の出力は1回目と変わらない。剰余保
持手段511にセットされた4番目の剰余R4 のF22
F5F7D95C000000に091A1が乗算手段
512により掛けられ、積F82424E12FCCE
DC000000が出力される。270の位で丸め後の2
83から271の1F05が符号1ビット、データ12ビッ
トの5番目の部分平方根としてマルチプレクサ513に
より選択される。反転手段515では1F05が反転さ
れ、00FAとなり、最下位ビットとして1が付加され
て出力され、(R+S×T)演算手段517では実質的
に乗数として00FBで演算が行なわれる。一方、被乗
数生成手段516では、併合平方根保持手段514の出
力を左に1ビットシフトするとともに、マルチプレクサ
513の出力する13ビットの先頭ビットを除く12ビ
ットを211から20 へ埋め込み、0E102408A5
CBF05を出力する。(R+S×T)演算手段517
では剰余保持手段511の出力をR、被乗数生成手段5
16の出力をS,反転手段515の出力をTとして入力
し、(R+S×T)の演算を実行する。(R+S×T)
演算手段517はFFF932D2104EF49E7
を出力する。マルチプレクサ519は、定数減算手段5
18の出力を選択して出力し、桁合わせ手段520では
13ビットの入力のうち、先頭2ビットをゼロに抑止し
て11ビットを210から20 に整列させる。加算手段5
21では併合平方根保持手段514の出力と、桁合わせ
手段520の出力を入力して加算を行ない、07081
20452E5F04を出力する。Next, the fifth iterative calculation is started. The output of the table information storage means 508 is the same as that of the first time. F22 of the fourth residue R 4 set in the residue holding means 511
F5F7D95C000000 is multiplied by 091A1 by multiplication means 512 to obtain product F82424E12FCCE
DC000000 is output. 2 after rounding at 70s
1F05 of 83 to 2 71 is selected by the multiplexer 513 as the fifth partial square root of the code 1 bit and the data 12 bits. The inverting means 515 inverts 1F05 to become 00FA, adds 1 as the least significant bit and outputs it, and the (R + S × T) operation means 517 substantially performs the operation at 00FB as a multiplier. On the other hand, in the multiplicand generating means 516, the output of the merged square root holding means 514 is shifted to the left by 1 bit, and the 12 bits excluding the head bit of the 13 bits output from the multiplexer 513 are embedded from 2 11 to 2 0 to 0E102408A5.
Outputs CBF05. (R + S × T) computing means 517
Then, the output of the remainder holding means 511 is R, and the multiplicand generating means 5
The output of 16 is input as S and the output of the inverting means 515 is input as T, and the calculation of (R + S × T) is executed. (R + S × T)
The calculation means 517 is FFF932D2104EF49E7.
Is output. The multiplexer 519 is a constant subtraction unit 5
The output of 18 is selected and output, and the digit alignment means 520 suppresses the leading 2 bits of the 13-bit input to zero and aligns 11 bits from 2 10 to 2 0 . Adder 5
In No. 21, the output of the merged square root holding unit 514 and the output of the digit alignment unit 520 are input and addition is performed.
It outputs 20452E5F04.
【0097】最終的な結果として、263の符号ビットと
して0、262から252の指数部として指数定数加算手段
505の出力する11ビット、251から20 の仮数部と
して加算手段521の253から22 がそれぞれ選択さ
れ、5E3C2048114B97C1として図16に
示す開平演算装置から出力される。[0097] As a final result, the output to 11-bit exponent constant addition means 505 as the 0,2 62 as a sign bit of the 2 63 2 52 exponent, addition means 521 as mantissa from 2 51 2 0 2 53 to 2 2 are selected and output as 5E3C2048114B97C1 from the square root arithmetic unit shown in FIG.
【0098】[0098]
【発明の効果】以上のように本発明は、剰余保持手段
と、平方根の近似逆数を格納するテーブル情報格納手段
と、部分平方根を求める乗算手段と、剰余から反復計算
で上位から揃った併合平方根と部分平方根の積を求める
(R−S×T)演算手段を設けることにより、乗数のビ
ット長として、固定小数点数の場合はオペランド長、浮
動小数点数の場合は仮数部のビット長よりも小さい乗算
器を使用して、開平演算を実行することができるのでハ
ードウェアの物量の多大な増大を招くことなく、乗算命
令と開平演算命令が同時実行可能なデータ処理装置を提
供することができる。また、性能についてもニュートン
・ラプソン法による開平演算装置と比較して遜色がな
い。しかも、乗算手段または(R−S×T)演算手段の
出力する積の上位を入力して部分平方根の最下位ビット
より1ビット小さい位で丸めを行なうための部分平方根
算出用加算手段を設けているので、演算速度が向上す
る。As described above, according to the present invention, the remainder holding means, the table information storage means for storing the approximate reciprocal of the square root, the multiplication means for obtaining the partial square root, and the merged square roots obtained from the higher order by the iterative calculation from the remainder. By providing an (R−S × T) calculation means for obtaining the product of the partial square root and the partial square root, the bit length of the multiplier is smaller than the operand length for fixed-point numbers and the mantissa part for floating-point numbers. Since the square root calculation can be executed by using the multiplier, it is possible to provide a data processing device capable of simultaneously executing the multiplication instruction and the square root calculation instruction without causing a large increase in the amount of hardware. Also, the performance is comparable to that of the Kaihei arithmetic unit based on the Newton-Raphson method. Moreover, there is provided a partial square root calculating addition means for inputting the high order of the product output from the multiplying means or the (R−S × T) computing means and rounding it by one bit smaller than the least significant bit of the partial square root. Therefore, the calculation speed is improved.
【0099】また、結果の平方根を丸めるためにガード
ビット、ラウンドビット、スティキービットを使用する
場合にはLSB以下、1ビットずつ、ガードビット、ラ
ウンドビットとした後、残ったビットと剰余の各ビット
の論理和をとると、スティキービットとなるので、ニュ
ートン・ラプソン法などと比較して検算の必要がないこ
とも本発明の第2の効果である。When a guard bit, a round bit, and a sticky bit are used to round the square root of the result, LSB or less, one bit at a time, a guard bit and a round bit, and then the remaining bit and the remainder respectively. Since the bitwise OR is a sticky bit, it is a second effect of the present invention that it is not necessary to perform a check as compared with the Newton-Raphson method.
【図1】本発明の第1の実施例に係る浮動小数点開平演
算装置のブロック図である。FIG. 1 is a block diagram of a floating point square root arithmetic unit according to a first embodiment of the present invention.
【図2】前図中の各構成手段の出力を具体的な数値例で
示した図である。FIG. 2 is a diagram showing the output of each component in the previous figure by a specific numerical example.
【図3】前図の数値例に続く各構成手段の出力を示した
図である。FIG. 3 is a diagram showing an output of each component following the numerical example of the previous figure.
【図4】本発明の第2の実施例に係る浮動小数点開平演
算装置のブロック図である。FIG. 4 is a block diagram of a floating point square root arithmetic unit according to a second embodiment of the present invention.
【図5】本発明の第3の実施例に係る浮動小数点ベクト
ル開平演算装置の一半部を示すブロック図である。FIG. 5 is a block diagram showing a half of a floating point vector square root calculating unit according to a third embodiment of the present invention.
【図6】前図の浮動小数点ベクトル開平演算装置の他半
部を示すブロック図である。FIG. 6 is a block diagram showing the other half of the floating point vector square root calculation device of the previous figure.
【図7】本発明の第4の実施例に係る固定小数点開平演
算装置のブロック図である。FIG. 7 is a block diagram of a fixed point square root arithmetic unit according to a fourth embodiment of the present invention.
【図8】前図中の各構成手段の出力を具体的な数値例で
示した図である。FIG. 8 is a diagram showing the output of each component in the previous figure by a specific numerical example.
【図9】本発明の第5の実施例に係る固定小数点開平演
算装置のブロック図である。FIG. 9 is a block diagram of a fixed point square root arithmetic unit according to a fifth embodiment of the present invention.
【図10】本発明の第6の実施例に係る固定小数点ベク
トル開平演算装置の一半部を示すブロック図である。FIG. 10 is a block diagram showing a half part of a fixed-point vector square root calculation device according to a sixth embodiment of the present invention.
【図11】前図の固定小数点ベクトル開平演算装置の他
半部を示すブロック図である。FIG. 11 is a block diagram showing the other half of the fixed-point vector square root computing device of the previous figure.
【図12】本発明の第1の実施例に係る浮動小数点開平
演算装置の乗算手段の内部ブロック図である。FIG. 12 is an internal block diagram of multiplication means of the floating point square root arithmetic unit according to the first embodiment of the present invention.
【図13】被開数Aと平方根の近似逆数Mの関係を示す
図である。FIG. 13 is a diagram showing a relationship between a numerical aperture A and an approximate inverse M of a square root.
【図14】被開数Aに平方根の近似逆数Mを2回掛けた
ときのAとA×M×Mの関係を示す図である。FIG. 14 is a diagram showing a relationship between A and A × M × M when the numerical aperture A is multiplied twice by the approximate inverse M of the square root.
【図15】平方根の近似逆数Mの精度の向上を説明する
ための図である。FIG. 15 is a diagram for explaining improvement in accuracy of an approximate reciprocal M of a square root.
【図16】本発明の第7の実施例に係る浮動小数点開平
演算装置のブロック図である。FIG. 16 is a block diagram of a floating point square root arithmetic unit according to a seventh embodiment of the present invention.
【図17】前図中の各構成手段の出力を具体的な数値例
で示した図である。FIG. 17 is a diagram showing the output of each component in the previous figure by a specific numerical example.
【図18】前図の数値例に続く各構成手段の出力を示し
た図である。FIG. 18 is a diagram showing the output of each component following the numerical example of the previous figure.
7 正規化手段 8 テーブル情報格納手段 10 剰余保持手段 11 乗算手段 14 併合平方根保持手段 15 反転手段 16 被乗数生成手段 17 (R+S×T)演算手段 7 Normalization Means 8 Table Information Storage Means 10 Residue Holding Means 11 Multiplying Means 14 Merged Square Root Holding Means 15 Inversion Means 16 Multiplicand Generating Means 17 (R + S × T) Arithmetic Means
Claims (15)
オペランドに対して平方根を求めるための開平演算装置
であって、 前記入力オペランドの指数のバイアスを除くための指数
定数減算手段と、 前記指数定数減算手段の出力を1ビット右にシフトする
ための指数シフト手段と、 前記指数シフト手段の出力に指数のバイアスを付加する
ための指数定数加算手段と、 指数のバイアスを除いた値が偶数となるように奇数の場
合は前記入力オペランドの仮数を1ビット左にシフトす
るための正規化手段と、 前記正規化手段の出力の上位ビットをアドレスとして平
方根の近似逆数を索引するためのテーブル情報格納手段
と、 平方根を上位より順に一定のビット数ずつ反復して求め
る際の剰余を保持するための剰余保持手段と、 前記剰余保持手段から出力される剰余と前記テーブル情
報格納手段から出力される平方根の近似逆数とをそれぞ
れ被乗数、乗数として入力して乗算を行なうための乗算
手段と、 前記乗算手段の出力する積の上位を入力して部分平方根
の最下位ビットより1ビット小さい位で丸めを行なうた
めの部分平方根算出用加算手段と、 各反復での部分平方根を併合した併合平方根を保持する
ための併合平方根保持手段と、 前記部分平方根算出用加算手段の出力する部分平方根を
ビット毎に反転するための反転手段と、 前記併合平方根保持手段の出力を左に1ビットシフトし
て、前記部分平方根算出用加算手段の出力する部分平方
根とで被乗数を生成するための被乗数生成手段と、 前記剰余保持手段の出力する剰余を部分平方根のビット
長から隣接する部分平方根間で重複するビット長を引い
た数だけ左にシフトするための剰余シフト手段と、 前記剰余シフト手段の出力するシフト後の剰余(R)
と、前記被乗数生成手段の出力する被乗数(S)と、前
記反転手段の出力する乗数(T)とを各々入力して、
(R+S×T)の演算を行なうための(R+S×T)演
算手段と、 前記剰余保持手段の入力として前記正規化手段の出力と
前記(R+S×T)演算手段の出力とのうちのいずれか
を選択するための保持データ切換用マルチプレクサと、 前記部分平方根算出用加算手段の出力する部分平方根の
最下位ビットから1を引くための定数減算手段と、 前記部分平方根算出用加算手段の出力する部分平方根と
前記定数減算手段の出力とのうちのいずれかを選択して
補正部分平方根として出力するための補正用マルチプレ
クサと、 前記併合平方根保持手段から出力される併合平方根に対
して、前記補正用マルチプレクサの出力する補正部分平
方根を併合できるように桁合わせを行なうための桁合わ
せ手段と、 前記併合平方根保持手段から出力される併合平方根と前
記桁合わせ手段の出力とを加算して更新された併合平方
根を出力するための併合平方根算出用加算手段とを有す
ることを特徴とする開平演算装置。1. A square root arithmetic unit for obtaining a square root of a floating point number input operand having 2 as an exponent base, and exponent constant subtraction means for removing exponent bias of the input operand, An exponent shift means for shifting the output of the exponent constant subtraction means to the right by one bit, an exponential constant addition means for adding an exponent bias to the output of the exponent shift means, and a value excluding the exponent bias is an even number. If it is an odd number, the normalizing means for shifting the mantissa of the input operand to the left by one bit, and the table information for indexing the approximate reciprocal of the square root using the upper bits of the output of the normalizing means as an address. A storage means, a surplus holding means for holding a surplus when iteratively obtains a square root by a constant number of bits from the upper order, and the surplus holding means. Multiply means for inputting the remainder to be output and the approximate reciprocal of the square root output from the table information storage means as a multiplicand and a multiplier, respectively, and a high order of the product output from the multiplying means are input. Adder means for calculating a partial square root for rounding by one bit smaller than the least significant bit of the partial square root; merged square root holding means for holding a merged square root obtained by merging the partial square roots in each iteration; Inversion means for inverting the partial square root output by the calculation addition means bit by bit, and a partial square root output by the partial square root calculation addition means by shifting the output of the merged square root holding means by 1 bit to the left. And a multiplicand generating means for generating a multiplicand, and the remainder output from the remainder holding means is overlapped between adjacent partial square roots from the bit length of the partial square root. And remainder shift means for shifting to the left by the number obtained by subtracting the appropriate bit length, the remainder after shifting to output of the remainder shift means (R)
And a multiplicand (S) output from the multiplicand generating means and a multiplier (T) output from the inverting means, respectively,
Any one of (R + S × T) arithmetic means for performing (R + S × T) arithmetic operation, an output of the normalization means and an output of the (R + S × T) arithmetic means as an input of the remainder holding means. A holding data switching multiplexer for selecting, a constant subtracting means for subtracting 1 from the least significant bit of the partial square root output by the partial square root calculating adder, and a portion output by the partial square root calculating adder A correction multiplexer for selecting any one of the square root and the output of the constant subtraction means and outputting it as a corrected partial square root, and the correction multiplexer for the merged square root output from the merged square root holding means. A digit aligning unit for performing digit alignment so that the corrected partial square roots output by the merge unit can be merged, and the merge output from the merge square root holding unit. No. arithmetic apparatus characterized by having a merging root calculation adding means for outputting the square root of the merged square root, which is updated by adding the output of the digit adjustment means.
オペランドに対して平方根を求めるための開平演算装置
であって、 前記入力オペランドの指数のバイアスを除くための指数
定数減算手段と、 前記指数定数減算手段の出力を1ビット右にシフトする
ための指数シフト手段と、 前記指数シフト手段の出力に指数のバイアスを付加する
ための指数定数加算手段と、 指数のバイアスを除いた値が偶数となるように奇数の場
合は前記入力オペランドの仮数を1ビット左にシフトす
るための正規化手段と、 前記正規化手段の出力の上位ビットをアドレスとして平
方根の近似逆数を索引するためのテーブル情報格納手段
と、 平方根を上位より順に一定のビット数ずつ反復して求め
る際の剰余を保持するための剰余保持手段、各反復での
部分平方根を保持するための部分平方根保持手段、及
び、各反復での部分平方根を併合した併合平方根を保持
するための併合平方根保持手段と、 前記剰余保持手段の出力する剰余を部分平方根のビット
長から隣接する部分平方根間で重複するビット長を引い
た数だけ左にシフトするための剰余シフト手段と、 前記部分平方根保持手段の出力する部分平方根をビット
毎に反転するための反転手段と、 前記併合平方根保持手段の出力を左に1ビットシフトし
て、前記部分平方根保持手段の出力する部分平方根とで
被乗数を生成するための被乗数生成手段と、 定数ゼロと前記剰余シフト手段から出力されるシフト後
の剰余とのうちのいずれかを選択するための剰余用マル
チプレクサと、 前記剰余保持手段から出力される剰余と前記被乗数生成
手段の出力とのうちのいずれかを選択するための被乗数
用マルチプレクサと、 前記テーブル情報格納手段から出力される平方根の近似
逆数と前記反転手段の出力とのうちのいずれかを選択す
るための乗数用マルチプレクサと、 前記剰余用マルチプレクサの出力(R)と、前記被乗数
用マルチプレクサの出力(S)と、前記乗数用マルチプ
レクサの出力(T)とを各々入力して、(R+S×T)
の演算を行なうための(R+S×T)演算手段と、 前記剰余保持手段の入力として前記正規化手段の出力と
前記(R+S×T)演算手段の出力とのうちのいずれか
を選択するための保持データ切換用マルチプレクサと、 前記(R+S×T)演算手段の出力する積の上位を入力
して部分平方根の最下位ビットより1ビット小さい位で
丸めを行ない、該丸めの結果を前記部分平方根保持手段
に与えるための部分平方根算出用加算手段と、 前記部分平方根保持手段の出力する部分平方根の最下位
ビットから1を引くための定数減算手段と、 前記部分平方根保持手段の出力する部分平方根と前記定
数減算手段の出力とのうちのいずれかを選択して補正部
分平方根として出力するための補正用マルチプレクサ
と、 前記併合平方根保持手段から出力される併合平方根に対
して、前記補正用マルチプレクサの出力する補正部分平
方根を併合できるように桁合わせを行なうための桁合わ
せ手段と、 前記併合平方根保持手段から出力される併合平方根と前
記桁合わせ手段の出力とを加算して更新された併合平方
根を出力するための併合平方根算出用加算手段とを有す
ることを特徴とする開平演算装置。2. A square root arithmetic unit for obtaining a square root of a floating-point number input operand having 2 as an exponent base, and exponent constant subtracting means for removing exponent bias of the input operand, An exponent shift means for shifting the output of the exponent constant subtraction means to the right by one bit, an exponential constant addition means for adding an exponent bias to the output of the exponent shift means, and a value excluding the exponent bias is an even number. If it is an odd number, the normalizing means for shifting the mantissa of the input operand to the left by one bit, and the table information for indexing the approximate reciprocal of the square root using the upper bits of the output of the normalizing means as an address. Storing means, remainder holding means for holding the remainder when the square root is iteratively determined by a certain number of bits in order from the higher order, the partial square root at each iteration Partial square root holding means for holding, and merged square root holding means for holding a merged square root obtained by merging the partial square roots in each iteration, and the residue output by the residue holding means is adjacent from the bit length of the partial square root. Remainder shift means for shifting to the left by a number obtained by subtracting the overlapping bit length between the partial square roots, inverting means for inverting the partial square root output by the partial square root holding means for each bit, and the merged square root holding A multiplicand generating means for generating a multiplicand by shifting the output of the means to the left by 1 bit and the partial square root output by the partial square root holding means; a constant zero and the residue after the shift output from the residue shift means. A remainder multiplexer for selecting any of the above, and a remainder output from the remainder holding means and an output of the multiplicand generating means. A multiplicand multiplexer for selecting any of the following, a multiplier multiplexer for selecting one of the approximate reciprocal of the square root output from the table information storage means and the output of the inverting means, and the remainder The output (R) of the multiplexer for the multiplicand, the output (S) of the multiplexer for the multiplicand, and the output (T) of the multiplexer for the multiplier are input to obtain (R + S × T).
And (R + S × T) computing means for performing the computation, and for selecting either the output of the normalizing means or the output of the (R + S × T) computing means as the input of the residue holding means. A holding data switching multiplexer and the upper part of the product output from the (R + S × T) computing means are input to perform rounding at a bit smaller than the least significant bit of the partial square root, and the rounded result is held in the partial square root. Adding means for calculating a partial square root, a constant subtracting means for subtracting 1 from the least significant bit of the partial square root output by the partial square root holding means, a partial square root output by the partial square root holding means, and A correction multiplexer for selecting any one of the outputs of the constant subtraction means and outputting it as a corrected partial square root, and an output from the merged square root holding means. Digit aligning means for performing digit alignment with respect to the merged square root so that the corrected partial square roots output by the correction multiplexer can be merged, and the merged square root output from the merged square root holding means and the output of the digit aligning means. And a merged square root calculation addition means for adding and to output an updated merged square root.
なるベクトルの要素順の入力オペランドに対して平方根
ベクトルを要素順に求めるための開平演算装置であっ
て、 前記入力オペランドに対して前処理を施すための前処理
部と、 部分平方根を併合した併合平方根のビット長が求めるべ
き結果の平方根のビット長以上になるまで部分平方根を
求める処理を繰り返す際の、その繰り返し回数に等しい
個数の1段目から最終段までの主要回路を有する主要部
と、 該主要部の出力に対して後処理を施すための後処理部と
を備え、 前記前処理部は、 前記入力オペランドを保持するための入力レジスタと、 前記入力レジスタの出力のうちの指数部から指数のバイ
アスを除くための指数定数減算手段と、 前記指数定数減算手段の出力を保持するための指数保持
手段と、 指数のバイアスを除いた値が偶数となるように奇数の場
合は前記入力レジスタの出力のうちの仮数部を1ビット
左にシフトするための正規化手段と、 前記正規化手段の出力を保持するための正規化オペラン
ドレジスタと、 前記指数保持手段の出力を1ビット右にシフトするため
の指数シフト手段と、 前記指数シフト手段の出力に指数のバイアスを付加する
ための指数定数加算手段と、 前記正規化オペランドレジスタの出力の上位ビットをア
ドレスとして平方根の近似逆数を索引するためのテーブ
ル情報格納手段とを有し、 前記主要部中の1段目の主要回路は、 パイプライン動作の同期をとるために前記前処理部の指
数定数加算手段、正規化オペランドレジスタ及びテーブ
ル情報格納手段に各々接続された指数保持手段、剰余保
持手段及びテーブル出力情報保持手段と、 前記剰余保持手段の出力を被乗数、前記テーブル出力情
報保持手段の出力を乗数として入力して乗算を行なうた
めの乗算手段と、 前記乗算手段の出力する積の上位を入力して部分平方根
の最下位ビットより1ビット小さい位で丸めを行なうた
めの部分平方根算出用加算手段と、 前記部分平方根算出用加算手段の出力する部分平方根を
保持するための部分平方根保持手段と、 前記剰余保持手段の出力する剰余を部分平方根のビット
長から隣接する部分平方根間で重複するビット長を引い
た数だけ左にシフトするための剰余シフト手段と、 前記部分平方根保持手段の出力する部分平方根をビット
毎に反転するための反転手段と、 前記部分平方根保持手段の出力する部分平方根から被乗
数を生成するための被乗数生成手段と、 前記剰余シフト手段の出力するシフト後の剰余(R)
と、前記被乗数生成手段の出力する被乗数(S)と、前
記反転手段の出力する乗数(T)とを各々入力して、
(R+S×T)の演算を行なうための(R+S×T)演
算手段と、 前記部分平方根保持手段の出力する部分平方根の最下位
ビットから1を引くための定数減算手段と、 前記部分平方根保持手段の出力する部分平方根と前記定
数減算手段の出力とのうちのいずれかを選択して補正部
分平方根として出力するための補正用マルチプレクサと
を有し、 前記主要部中の2段目以降の主要回路は、それぞれ、 パイプライン動作の同期をとるための指数保持手段、剰
余保持手段、併合平方根保持手段及びテーブル出力情報
保持手段と、 前記剰余保持手段の出力を被乗数、前記テーブル出力情
報保持手段の出力を乗数として入力して乗算を行なうた
めの乗算手段と、 前記乗算手段の出力する積の上位を入力して部分平方根
の最下位ビットより1ビット小さい位で丸めを行なうた
めの部分平方根算出用加算手段と、 前記部分平方根算出用加算手段の出力する部分平方根を
保持するための部分平方根保持手段と、 前記剰余保持手段の出力する剰余を部分平方根のビット
長から隣接する部分平方根間で重複するビット長を引い
た数だけ左にシフトするための剰余シフト手段と、 前記部分平方根保持手段の出力する部分平方根をビット
毎に反転するための反転手段と、 前記併合平方根保持手段の出力を左に1ビットシフトし
て、前記部分平方根保持手段の出力する部分平方根とで
被乗数を生成するための被乗数生成手段と、 前記剰余シフト手段の出力するシフト後の剰余(R)
と、前記被乗数生成手段の出力する被乗数(S)と、前
記反転手段の出力する乗数(T)とを各々入力して、
(R+S×T)の演算を行なうための(R+S×T)演
算手段と、 前記部分平方根保持手段の出力する部分平方根の最下位
ビットから1を引くための定数減算手段と、 前記部分平方根保持手段の出力する部分平方根と前記定
数減算手段の出力とのうちのいずれかを選択して補正部
分平方根として出力するための補正用マルチプレクサ
と、 前記併合平方根保持手段から出力される併合平方根に対
して、前記補正用マルチプレクサの出力する補正部分平
方根を併合できるように桁合わせを行なうための桁合わ
せ手段と、 前記併合平方根保持手段から出力される併合平方根と前
記桁合わせ手段の出力とを加算して更新された併合平方
根を出力するための併合平方根算出用加算手段とを有
し、 該2段目以降の主要回路では、前記指数保持手段は前段
の指数保持手段に、前記剰余保持手段は前段の(R+S
×T)演算手段に、前記併合平方根保持手段は2段目で
は1段目の補正用マルチプレクサに、また3段目以降で
は前段の併合平方根算出用加算手段に、前記テーブル出
力情報保持手段は前段のテーブル出力情報保持手段に各
々接続され、 前記後処理部は、 パイプライン動作の同期をとるために前記主要部中の最
終段の主要回路の指数保持手段及び併合平方根算出用加
算手段に各々接続された指数保持手段及び併合平方根保
持手段を有することを特徴とする開平演算装置。3. A square root arithmetic unit for obtaining a square root vector in an element order of an element order input operand of a vector consisting of a floating point number having a base of 2 as an exponent, the preprocessing being performed on the input operand. And the pre-processing unit for applying the partial square root, and the number of 1s equal to the number of repetitions when repeating the process of obtaining the partial square root until the bit length of the merged square root obtained by merging A main part having a main circuit from a second stage to a final stage; and a post-processing part for performing post-processing on the output of the main part, wherein the pre-processing part holds the input operand. An input register, exponential constant subtraction means for removing the exponent bias from the exponent part of the output of the input register, and holding the output of the exponential constant subtraction means Exponent holding means; normalizing means for shifting the mantissa part of the output of the input register to the left by 1 bit when the exponent bias is odd so that the value is even, and the normalizing means , A normalization operand register for holding the output of the exponent, an exponent shift means for shifting the output of the exponent holding means to the right by one bit, and an exponent constant for adding an exponent bias to the output of the exponent shift means. And a table information storage unit for indexing an approximate reciprocal of a square root with an upper bit of the output of the normalization operand register as an address. Exponent holding means respectively connected to the exponent constant adding means, the normalization operand register and the table information storing means of the preprocessing unit for synchronizing the operation. A remainder holding means and a table output information holding means, a multiplication means for inputting an output of the remainder holding means as a multiplicand and an output of the table output information holding means as a multiplier, and a multiplication, and a product output by the multiplication means. Of the partial square root, and rounding it by one bit smaller than the least significant bit of the partial square root, and a partial square root for holding the partial square root output by the partial square root calculating adder. Holding means, a remainder shift means for shifting the remainder output by the remainder holding means to the left by a number obtained by subtracting the bit length overlapping between adjacent partial square roots from the bit length of the partial square root, the partial square root holding means Inverting means for inverting the partial square root output by each bit, and generating a multiplicand from the partial square root output by the partial square root holding means. For generating a multiplicand, and a remainder (R) after the shift output from the remainder shift means.
And a multiplicand (S) output from the multiplicand generating means and a multiplier (T) output from the inverting means, respectively,
(R + S × T) calculation means for performing calculation of (R + S × T), constant subtraction means for subtracting 1 from the least significant bit of the partial square root output from the partial square root holding means, and the partial square root holding means And a correction multiplexer for selecting and outputting any one of the partial square root output by the above and the output of the constant subtracting means as a corrected partial square root, and the main circuits of the second and subsequent stages in the main part. Respectively, an exponent holding means, a remainder holding means, a merged square root holding means, and a table output information holding means for synchronizing pipeline operations, an output of the remainder holding means, a multiplicand, and an output of the table output information holding means. Is inputted as a multiplier to perform multiplication, and the higher order of the product output from the multiplying means is inputted and 1 bit smaller than the least significant bit of the partial square root. Adding means for calculating a partial square root for rounding at a certain place, a partial square root holding means for holding a partial square root output by the adding means for calculating a partial square root, and a partial square root for a remainder output by the remainder holding means. Remainder shift means for shifting to the left by a number obtained by subtracting the overlapping bit lengths between adjacent partial square roots of the partial square root, and inverting means for inverting the partial square root output by the partial square root holding means for each bit. And a multiplicand generating means for generating a multiplicand by shifting the output of the merged square root holding means to the left by 1 bit and the partial square root output by the partial square root holding means, and after the shift output by the remainder shift means. Remainder (R)
And a multiplicand (S) output from the multiplicand generating means and a multiplier (T) output from the inverting means, respectively,
(R + S × T) calculation means for performing calculation of (R + S × T), constant subtraction means for subtracting 1 from the least significant bit of the partial square root output from the partial square root holding means, and the partial square root holding means Of the partial square root to be output and the output of the constant subtracting means to select and output as a corrected partial square root, and for the merged square root output from the merged square root holding means, Digit aligning means for performing digit alignment so that the corrected partial square roots output by the compensation multiplexer can be merged, and the merged square root output from the merged square root holding means and the output of the digit aligning means are added to update. And a merged square root calculating addition means for outputting the merged square root, and in the second and subsequent main circuits, the exponent holding means is the preceding stage. The index holding means, said residue retaining means preceding (R + S
XT) the calculating means, the merged square root holding means is the first-stage correction multiplexer in the second stage, the merged square root calculation adding means of the previous stage in the third and subsequent stages, and the table output information holding means is the previous stage. Of the table output information holding means, and the post-processing section is connected to the exponent holding means and the merged square root calculating addition means of the main circuit at the final stage in the main part in order to synchronize the pipeline operation. And a square root holding means for storing a square root.
方根を求めるための開平演算装置であって、 前記入力オペランドを2ビット単位にビット正規化する
際のシフト数を求めるためのシフト数検出手段と、 前記シフト数検出手段の出力するシフト数により前記入
力オペランドを左にシフトするための正規化手段と、 前記正規化手段の出力の上位ビットをアドレスとして平
方根の近似逆数を索引するためのテーブル情報格納手段
と、 平方根を上位より順に一定のビット数ずつ反復して求め
る際の剰余を保持するための剰余保持手段と、 前記剰余保持手段から出力される剰余と前記テーブル情
報格納手段から出力される平方根の近似逆数とをそれぞ
れ被乗数、乗数として入力して乗算を行なうための乗算
手段と、 前記乗算手段の出力する積の上位を入力して部分平方根
の最下位ビットより1ビット小さい位で丸めを行なうた
めの部分平方根算出用加算手段と、 各反復での部分平方根を併合した併合平方根を保持する
ための併合平方根保持手段と、 前記部分平方根算出用加算手段の出力する部分平方根を
ビット毎に反転するための反転手段と、 前記併合平方根保持手段の出力を左に1ビットシフトし
て、前記部分平方根算出用加算手段の出力する部分平方
根とで被乗数を生成するための被乗数生成手段と、 前記剰余保持手段の出力する剰余(R)と、前記被乗数
生成手段の出力する被乗数(S)と、前記反転手段の出
力する乗数(T)とを各々入力して、(R+S×T)の
演算を行なうための(R+S×T)演算手段と、 前記(R+S×T)演算手段の出力を部分平方根のビッ
ト長から隣接する部分平方根間で重複するビット長を引
いた数だけ左にシフトするためのシフト手段と、 前記剰余保持手段の入力として前記正規化手段の出力と
前記シフト手段の出力とのうちのいずれかを選択するた
めの保持データ切換用マルチプレクサと、 前記部分平方根算出用加算手段の出力する部分平方根の
最下位ビットから1を引くための定数減算手段と、 前記部分平方根算出用加算手段の出力する部分平方根と
前記定数減算手段の出力とのうちのいずれかを選択して
補正部分平方根として出力するための補正用マルチプレ
クサと、 前記併合平方根保持手段から出力される併合平方根に対
して、前記補正用マルチプレクサの出力する補正部分平
方根を併合できるように桁合わせを行なうための桁合わ
せ手段と、 前記併合平方根保持手段から出力される併合平方根と前
記桁合わせ手段の出力とを加算して更新された併合平方
根を出力するための併合平方根算出用加算手段と、 最終結果の平方根を求めるために前記併合平方根算出用
加算手段の出力する併合平方根に施すべき右シフトのシ
フト数を前記シフト数検出手段の出力より算出するため
の桁調整シフト数算出手段と、 前記併合平方根算出用加算手段の出力する併合平方根を
前記桁調整シフト数算出手段の出力するシフト数により
右シフトを行ない、最終結果の平方根を出力するための
桁調整手段とを有することを特徴とする開平演算装置。4. A square root arithmetic unit for obtaining a square root of a fixed-point number input operand, comprising shift number detecting means for obtaining a shift number when bit-normalizing the input operand in units of 2 bits. Normalizing means for shifting the input operand to the left by the shift number output by the shift number detecting means, and table information for indexing an approximate reciprocal of a square root with the upper bits of the output of the normalizing means as an address. A storage means, a surplus holding means for holding a surplus when iteratively obtains a square root by a certain number of bits from the upper order, a surplus output from the surplus holding means, and a surplus output from the table information storage means. Multiplying means for inputting the approximate reciprocal of the square root as a multiplicand and a multiplier, respectively, and a product output from the multiplying means. Partial square root calculating and adding means for inputting the high order and rounding it by one bit smaller than the least significant bit of the partial square root, and merged square root holding means for holding the merged square root obtained by merging the partial square roots at each iteration An inversion means for inverting the partial square root output from the partial square root calculation adding means bit by bit; and an output of the merged square root holding means left shifted by 1 bit to obtain the partial square root calculation addition means. Multiplicand generating means for generating a multiplicand by the output partial square root, a remainder (R) output by the remainder holding means, a multiplicand (S) output by the multiplicand generating means, and a multiplier output by the inverting means. (R + S × T) calculating means for inputting (T) and (R + S × T), and the output of the (R + S × T) calculating means is the bit length of the partial square root. Shift means for shifting to the left by a number obtained by subtracting the bit length overlapping between adjacent partial square roots, and any one of the output of the normalizing means and the output of the shift means as an input of the residue holding means. A holding data switching multiplexer for selecting whether or not, a constant subtracting means for subtracting 1 from the least significant bit of the partial square root output by the partial square root calculating adder, and an output by the partial square root calculating adder A correction multiplexer for selecting and outputting one of the partial square root and the output of the constant subtracting means as a corrected partial square root, and the correction square for the merged square root output from the merged square root holding means. Digit aligning means for performing digit alignment so that the corrected partial square roots output from the multiplexer can be merged, and the merged square root holding means. And a merged square root calculation addition for outputting the merged square root updated by adding the merged square root output from the digit alignment means and the output of the digit alignment means, and the merged square root calculation addition for obtaining the square root of the final result. A digit adjustment shift number calculation means for calculating the shift number of the right shift to be applied to the merged square root output from the means from the output of the shift number detection means, and the merged square root output from the merged square root calculation addition means. A square root arithmetic unit comprising: a digit adjusting unit for performing a right shift according to the number of shifts output by the adjusting shift number calculating unit and outputting a square root of a final result.
としたことを特徴とする開平演算装置。5. The square root computing device according to claim 4, wherein an output of the merged square root holding means is an input of the digit adjusting means.
方根を求めるための開平演算装置であって、 前記入力オペランドを2ビット単位にビット正規化する
際のシフト数を求めるための正規化シフト数検出手段
と、 前記正規化シフト数検出手段の出力するシフト数により
前記入力オペランドを左にシフトするための正規化手段
と、 前記正規化手段の出力の上位ビットをアドレスとして平
方根の近似逆数を索引するためのテーブル情報格納手段
と、 平方根を上位より順に一定のビット数ずつ反復して求め
る際の剰余を保持するための剰余保持手段、各反復での
部分平方根を保持するための部分平方根保持手段、及
び、各反復での部分平方根を併合した併合平方根を保持
するための併合平方根保持手段と、 前記部分平方根保持手段の出力する部分平方根をビット
毎に反転するための反転手段と、 前記併合平方根保持手段の出力を左に1ビットシフトし
て、前記部分平方根保持手段の出力する部分平方根とで
被乗数を生成するための被乗数生成手段と、 定数ゼロと前記剰余保持手段から出力される剰余とのう
ちのいずれかを選択するための剰余用マルチプレクサ
と、 前記剰余保持手段から出力される剰余と前記被乗数生成
手段の出力とのうちのいずれかを選択するための被乗数
用マルチプレクサと、 前記テーブル情報格納手段から出力される平方根の近似
逆数と前記反転手段の出力とのうちのいずれかを選択す
るための乗数用マルチプレクサと、 前記剰余用マルチプレクサの出力(R)と、前記被乗数
用マルチプレクサの出力(S)と、前記乗数用マルチプ
レクサの出力(T)とを各々入力して、(R+S×T)
の演算を行なうための(R+S×T)演算手段と、 前記(R+S×T)演算手段の出力を部分平方根のビッ
ト長から隣接する部分平方根間で重複するビット長を引
いた数だけ左にシフトするためのシフト手段と、 前記剰余保持手段の入力として前記正規化手段の出力と
前記シフト手段の出力とのうちのいずれかを選択するた
めの保持データ切換用マルチプレクサと、 前記(R+S×T)演算手段の出力する積の上位を入力
して部分平方根の最下位ビットより1ビット小さい位で
丸めを行ない、該丸めの結果を前記部分平方根保持手段
に与えるための部分平方根算出用加算手段と、 前記部分平方根保持手段の出力する部分平方根の最下位
ビットから1を引くための定数減算手段と、 前記部分平方根保持手段の出力する部分平方根と前記定
数減算手段の出力とのうちのいずれかを選択して補正部
分平方根として出力するための補正用マルチプレクサ
と、 前記併合平方根保持手段から出力される併合平方根に対
して、前記補正用マルチプレクサの出力する補正部分平
方根を併合できるように桁合わせを行なうための桁合わ
せ手段と、 前記併合平方根保持手段から出力される併合平方根と前
記桁合わせ手段の出力とを加算して更新された併合平方
根を出力するための併合平方根算出用加算手段と、 最終結果の平方根を求めるために前記併合平方根算出用
加算手段の出力する併合平方根に施すべき右シフトのシ
フト数を前記正規化シフト数検出手段の出力より算出す
るための桁調整シフト数算出手段と、 前記併合平方根算出用加算手段の出力する併合平方根を
前記桁調整シフト数算出手段の出力するシフト数により
右シフトを行ない、最終結果の平方根を出力するための
桁調整手段とを有することを特徴とする開平演算装置。6. A square root arithmetic unit for obtaining a square root of a fixed-point number input operand, wherein a normalized shift number detection for obtaining a shift number when bit-normalizing the input operand in units of 2 bits. Means, a normalization means for shifting the input operand to the left by the shift number output by the normalization shift number detection means, and an approximate reciprocal of square root with the upper bit of the output of the normalization means as an address. Table information storage means, a square root holding means for holding a remainder when iteratively obtaining a square root by a certain number of bits from a higher order, a partial square root holding means for holding a partial square root at each iteration, And a merged square root holding means for holding a merged square root obtained by merging the partial square roots in each iteration, and a unit for outputting the partial square root holding means Multiplicand generating means for generating a multiplicand by inverting means for inverting the square root for each bit, and shifting the output of the merged square root holding means by 1 bit to the left, and the partial square root output by the partial square root holding means. A remainder multiplexer for selecting one of a constant zero and a remainder output from the remainder holding means, and a remainder output from the remainder holding means and an output of the multiplicand generating means. A multiplicand multiplexer for selecting any one, a multiplier multiplexer for selecting one of the approximate reciprocal of the square root output from the table information storage means and the output of the inverting means, and the remainder The output (R) of the multiplexer, the output (S) of the multiplexer for the multiplicand, and the output (T) of the multiplexer for the multiplier are respectively Input each, (R + S × T)
And (R + S × T) operation means for performing the above operation, and the output of the (R + S × T) operation means is shifted to the left by a number obtained by subtracting the bit length overlapping between adjacent partial square roots from the bit length of the partial square root. A shift means for switching, a held data switching multiplexer for selecting one of the output of the normalizing means and the output of the shift means as an input of the remainder holding means, and (R + S × T) Partial square root calculation addition means for inputting the upper product of the output of the arithmetic means, rounding it by one bit smaller than the least significant bit of the partial square root, and giving the rounding result to the partial square root holding means, Constant subtraction means for subtracting 1 from the least significant bit of the partial square root output by the partial square root holding means; partial square root output by the partial square root holding means and the constant subtraction means A correction multiplexer for selecting any one of the outputs of the means and outputting it as a correction portion square root; and a correction portion output by the correction multiplexer for the merged square root output from the merged square root holding means. A digit aligning means for performing digit alignment so that the square roots can be merged, and a merged square root output from the merged square root holding means and an output of the digit aligning means are added to output an updated merged square root. To calculate the shift number of the right shift to be applied to the merged square root output from the merged square root calculation addition means and the merged square root calculation addition means to obtain the square root of the final result from the output of the normalized shift number detection means. Digit adjustment shift number calculation means, and the merged square root output from the merged square root calculation addition means is the digit adjustment shift number calculation means. Perform a right shift by the shift number outputted, square root operation apparatus characterized by having a digit adjusting means for outputting the square root of the final result.
としたことを特徴とする開平演算装置。7. The square root computing device according to claim 6, wherein an output of the merged square root holding means is an input of the digit adjusting means.
の入力オペランドに対して平方根ベクトルを要素順に求
めるための開平演算装置であって、 前記入力オペランドに対して前処理を施すための前処理
部と、 部分平方根を併合した併合平方根のビット長が求めるべ
き結果の平方根のビット長以上になるまで部分平方根を
求める処理を繰り返す際の、その繰り返し回数に等しい
個数の1段目から最終段までの主要回路を有する主要部
と、 該主要部の出力に対して後処理を施すための後処理部と
を備え、 前記前処理部は、 前記入力オペランドを保持するための入力レジスタと、 前記入力レジスタの出力を2ビット単位にビット正規化
する際のシフト数を求めるための正規化シフト数検出手
段と、 前記正規化シフト数検出手段の出力するシフト数により
前記入力レジスタの出力を左にシフトするための正規化
手段と、 前記正規化手段の出力を保持するための正規化オペラン
ドレジスタと、 前記正規化シフト数検出手段の出力を保持するための正
規化シフト数保持手段と、 前記正規化オペランドレジスタの出力の上位ビットをア
ドレスとして平方根の近似逆数を索引するためのテーブ
ル情報格納手段とを有し、 前記主要部中の1段目の主要回路は、 パイプライン動作の同期をとるために前記前処理部の正
規化オペランドレジスタ、テーブル情報格納手段及び正
規化シフト数保持手段に各々接続された剰余保持手段、
テーブル出力情報保持手段及び正規化シフト数保持手段
と、 前記剰余保持手段の出力を被乗数、前記テーブル出力情
報保持手段の出力を乗数として入力して乗算を行なうた
めの乗算手段と、 前記乗算手段の出力する積の上位を入力して部分平方根
の最下位ビットより1ビット小さい位で丸めを行なうた
めの部分平方根算出用加算手段と、 前記部分平方根算出用加算手段の出力する部分平方根を
保持するための部分平方根保持手段と、 前記部分平方根保持手段の出力する部分平方根をビット
毎に反転するための反転手段と、 前記部分平方根保持手段の出力する部分平方根から被乗
数を生成するための被乗数生成手段と、 前記剰余保持手段の出力する剰余(R)と、前記被乗数
生成手段の出力する被乗数(S)と、前記反転手段の出
力する乗数(T)とを各々入力して、(R+S×T)の
演算を行なうための(R+S×T)演算手段と、 前記(R+S×T)演算手段の出力を部分平方根のビッ
ト長から隣接する部分平方根間で重複するビット長を引
いた数だけ左にシフトするためのシフト手段と、 前記部分平方根保持手段の出力する部分平方根の最下位
ビットから1を引くための定数減算手段と、 前記部分平方根保持手段の出力する部分平方根と前記定
数減算手段の出力とのうちのいずれかを選択して補正部
分平方根として出力するための補正用マルチプレクサと
を有し、 前記主要部中の2段目以降の主要回路は、それぞれ、 パイプライン動作の同期をとるための剰余保持手段、併
合平方根保持手段、テーブル出力情報保持手段、正規化
シフト数保持手段と、 前記剰余保持手段の出力を被乗数、前記テーブル出力情
報保持手段の出力を乗数として入力して乗算を行なうた
めの乗算手段と、 前記乗算手段の出力する積の上位を入力して部分平方根
の最下位ビットより1ビット小さい位で丸めを行なうた
めの部分平方根算出用加算手段と、 前記部分平方根算出用加算手段の出力する部分平方根を
保持するための部分平方根保持手段と、 前記部分平方根保持手段の出力する部分平方根をビット
毎に反転するための反転手段と、 前記併合平方根保持手段の出力を左に1ビットシフトし
て、前記部分平方根保持手段の出力する部分平方根とで
被乗数を生成するための被乗数生成手段と、 前記剰余保持手段の出力する剰余(R)と、前記被乗数
生成手段の出力する被乗数(S)と、前記反転手段の出
力する乗数(T)とを各々入力して、(R+S×T)の
演算を行なうための(R+S×T)演算手段と、 前記(R+S×T)演算手段の出力を部分平方根のビッ
ト長から隣接する部分平方根間で重複するビット長を引
いた数だけ左にシフトするためのシフト手段と、 前記部分平方根保持手段の出力する部分平方根の最下位
ビットから1を引くための定数減算手段と、 前記部分平方根保持手段の出力する部分平方根と前記定
数減算手段の出力とのうちのいずれかを選択して補正部
分平方根として出力するための補正用マルチプレクサ
と、 前記併合平方根保持手段から出力される併合平方根に対
して、前記補正用マルチプレクサの出力する補正部分平
方根を併合できるように桁合わせを行なうための桁合わ
せ手段と、 前記併合平方根保持手段から出力される併合平方根と前
記桁合わせ手段の出力とを加算して更新された併合平方
根を出力するための併合平方根算出用加算手段とを有
し、 該2段目以降の主要回路では、前記剰余保持手段は前段
のシフト手段に、前記併合平方根保持手段は2段目では
1段目の補正用マルチプレクサに、また3段目以降では
前段の併合平方根算出用加算手段に、前記テーブル出力
情報保持手段は前段のテーブル出力情報保持手段に、前
記正規化シフト数保持手段は前段の正規化シフト数保持
手段に各々接続され、 前記後処理部は、 パイプライン動作の同期をとるために前記主要部中の最
終段の主要回路の併合平方根算出用加算手段及び正規化
シフト数保持手段に各々接続された併合平方根保持手段
及び正規化シフト数保持手段と、 最終結果の平方根を求めるために前記併合平方根算出用
加算手段の出力する併合平方根に施すべき右シフトのシ
フト数を前記正規化シフト数検出手段の出力より算出す
るための桁調整シフト数算出手段と、 前記併合平方根算出用加算手段の出力する併合平方根を
前記桁調整シフト数算出手段の出力するシフト数により
右シフトを行ない、最終結果の平方根を出力するための
桁調整手段とを有することを特徴とする開平演算装置。8. A square root arithmetic unit for obtaining a square root vector in an element order of input operands of a vector consisting of fixed point numbers, the preprocessing unit for preprocessing the input operands. And when the process of obtaining the partial square root is repeated until the bit length of the merged square root obtained by merging the partial square roots is equal to or larger than the bit length of the square root of the result to be obtained, the number of iterations from the first stage to the last stage A main section having a main circuit; and a post-processing section for performing post-processing on the output of the main section, wherein the pre-processing section includes an input register for holding the input operand, and the input register. Shift number detecting means for obtaining a shift number when bit-normalizing the output of 2 to 2 bits, and a shift output by the normalizing shift number detecting means. A normalizing means for shifting the output of the input register to the left by a number; a normalizing operand register for holding the output of the normalizing means; and a holding means for holding the output of the normalized shift number detecting means. And a table information storage unit for indexing the approximate reciprocal of the square root using the higher order bits of the output of the normalized operand register as an address, and the main circuit of the first stage in the main section. Is a residue holding means connected to the normalized operand register of the preprocessing section, the table information storage means, and the normalized shift number holding means for synchronizing the pipeline operation,
Table output information holding means and normalized shift number holding means, multiplication means for inputting the output of the remainder holding means as a multiplicand and the output of the table output information holding means as a multiplier, and performing multiplication, and In order to hold the partial square root output unit of the partial square root calculation addition unit for inputting the high-order product to be output and rounding it by one bit smaller than the least significant bit of the partial square root Partial square root holding means, inversion means for inverting the partial square root output by the partial square root holding means for each bit, and multiplicand generating means for generating a multiplicand from the partial square root output by the partial square root holding means, , The remainder (R) output by the remainder holding means, the multiplicand (S) output by the multiplicand generating means, and the multiplier output by the inverting means. (R + S × T) calculating means for inputting (T) and (R + S × T), and the output of the (R + S × T) calculating means is adjacent to the bit length of the partial square root. Shift means for shifting to the left by a number obtained by subtracting the overlapping bit length between the square roots, constant subtraction means for subtracting 1 from the least significant bit of the partial square root output by the partial square root holding means, and the partial square root A correction multiplexer for selecting either the partial square root output by the holding means or the output of the constant subtraction means and outputting it as the corrected partial square root is provided. The main circuits respectively include a residue holding unit, a merged square root holding unit, a table output information holding unit, a normalized shift number holding unit, and a residue holding unit for synchronizing pipeline operations. 1 is smaller than the least significant bit of the partial square root by inputting the force as a multiplicand and the output of the table output information holding means as a multiplier and performing multiplication, and inputting the high order of the product output by the multiplying means. Adder for calculating a partial square root for rounding at a place, a partial square root holding means for holding a partial square root output by the adder for calculating a partial square root, and a partial square root output by the partial square root holding means Inverting means for inverting each, and a multiplicand generating means for generating a multiplicand by shifting the output of the merged square root holding means to the left by 1 bit and the partial square root output by the partial square root holding means, The remainder (R) output from the remainder holding means, the multiplicand (S) output from the multiplicand generating means, and the multiplier (T) output from the inverting means are respectively input. And (R + S × T) computing means for performing (R + S × T) computation, and the output of the (R + S × T) computing means from the bit length of the partial square root to the overlapping bit length between adjacent partial square roots. Shift means for shifting to the left by the subtracted number, constant subtraction means for subtracting 1 from the least significant bit of the partial square root output by the partial square root holding means, and partial square root output by the partial square root holding means A correction multiplexer for selecting any one of the outputs of the constant subtraction means and outputting it as a corrected partial square root; and an output of the correction multiplexer for the merged square root output from the merged square root holding means. A digit aligning means for performing digit alignment so that the corrected partial square roots can be merged, and the merged square root and the digit output from the merged square root holding means. And a merged square root calculation addition means for adding the output of the matching means to output an updated merged square root, and in the main circuit of the second and subsequent stages, the surplus holding means is the shift means of the preceding stage. The merged square root holding means is the correction multiplexer of the first stage in the second stage, the merged square root calculation addition means of the preceding stage in the third and subsequent stages, and the table output information holding means is the table output information holding means of the preceding stage. Further, the normalized shift number holding means is connected to the normalized shift number holding means of the preceding stage, and the post-processing unit merges the main circuit of the final stage in the main unit in order to synchronize the pipeline operation. Combined square root holding means and normalized shift number holding means respectively connected to the adding means for square root calculation and the normalized shift number holding means, and for calculating the merged square root in order to obtain the square root of the final result. Digit adjustment shift number calculation means for calculating the shift number of the right shift to be applied to the merged square root output from the addition means from the output of the normalized shift number detection means, and the merged square root output from the merged square root calculation addition means And a digit adjusting means for performing a right shift according to the shift number output by the digit adjusting shift number calculating means and outputting the square root of the final result.
オペランドに対して平方根を求めるための開平演算装置
であって、 前記入力オペランドの指数のバイアスを除くための指数
定数減算手段と、 前記指数定数減算手段の出力を1ビット右にシフトする
ための指数シフト手段と、 前記指数シフト手段の出力に指数のバイアスを付加する
ための指数定数加算手段と、 指数のバイアスを除いた値が偶数となるように奇数の場
合は前記入力オペランドの仮数を1ビット左にシフトす
るための正規化手段と、 前記正規化手段の出力の上位ビットをアドレスとして平
方根の近似逆数を索引するためのテーブル情報格納手段
と、 平方根を上位より順に一定のビット数ずつ反復して求め
る際の剰余を保持するための剰余保持手段と、 前記剰余保持手段から出力される剰余と前記テーブル情
報格納手段から出力される平方根の近似逆数とをそれぞ
れ被乗数、乗数として入力して乗算を行なうための乗算
手段と、 前記乗算手段の出力する積の上位を入力して部分平方根
の最下位ビットより1ビット小さい位で丸めを行なうた
めの部分平方根算出用加算手段と、 各反復での部分平方根を併合した併合平方根を保持する
ための併合平方根保持手段と、 前記部分平方根算出用加算手段の出力する部分平方根を
ビット毎に反転するための反転手段と、 前記併合平方根保持手段の出力を左に1ビットシフトし
て、前記部分平方根算出用加算手段の出力する部分平方
根とで被乗数を生成するための被乗数生成手段と、 前記剰余保持手段の出力する剰余(R)と、前記被乗数
生成手段の出力する被乗数(S)と、前記反転手段の出
力する乗数(T)とを各々入力して、(R+S×T)の
演算を行なうための(R+S×T)演算手段と、 前記(R+S×T)演算手段の出力を部分平方根のビッ
ト長から隣接する部分平方根間で重複するビット長を引
いた数だけ左にシフトするための演算結果シフト手段
と、 前記剰余保持手段の入力として前記正規化手段の出力と
前記演算結果シフト手段の出力とのうちのいずれかを選
択するための保持データ切換用マルチプレクサと、 前記部分平方根算出用加算手段の出力する部分平方根の
最下位ビットから1を引くための定数減算手段と、 前記部分平方根算出用加算手段の出力する部分平方根と
前記定数減算手段の出力とのうちのいずれかを選択して
補正部分平方根として出力するための補正用マルチプレ
クサと、 前記併合平方根保持手段から出力される併合平方根に対
して、前記補正用マルチプレクサの出力する補正部分平
方根を併合できるように桁合わせを行なうための桁合わ
せ手段と、 前記併合平方根保持手段から出力される併合平方根と前
記桁合わせ手段の出力とを加算して更新された併合平方
根を出力するための併合平方根算出用加算手段とを有す
ることを特徴とする開平演算装置。9. A square root arithmetic unit for calculating a square root of a floating-point number input operand having 2 as an exponent base, and exponential constant subtraction means for eliminating exponent bias of the input operand. An exponent shift means for shifting the output of the exponent constant subtraction means to the right by one bit, an exponential constant addition means for adding an exponent bias to the output of the exponent shift means, and a value excluding the exponent bias is an even number. If it is an odd number, the normalizing means for shifting the mantissa of the input operand to the left by one bit, and the table information for indexing the approximate reciprocal of the square root using the upper bits of the output of the normalizing means as an address. A storage means, a surplus holding means for holding a surplus when iteratively obtains a square root by a constant number of bits from the upper order, and the surplus holding means. Multiply means for inputting the remainder to be output and the approximate reciprocal of the square root output from the table information storage means as a multiplicand and a multiplier, respectively, and a high order of the product output from the multiplying means are input. Adder means for calculating a partial square root for rounding by one bit smaller than the least significant bit of the partial square root; merged square root holding means for holding a merged square root obtained by merging the partial square roots in each iteration; Inversion means for inverting the partial square root output by the calculation addition means bit by bit, and a partial square root output by the partial square root calculation addition means by shifting the output of the merged square root holding means by 1 bit to the left. A multiplicand generating means for generating a multiplicand, a remainder (R) output by the remainder holding means, and a multiplicand (S) output by the multiplicand generating means. The multiplier (T) output from the inverting means is respectively input, and the (R + S × T) operation means for performing the operation of (R + S × T), and the output of the (R + S × T) operation means are partial square roots. Calculation result shifting means for shifting to the left by a number obtained by subtracting the bit length overlapping between adjacent partial square roots from the output of the normalizing means and the calculation result shifting means as inputs to the residue holding means. A holding data switching multiplexer for selecting any one of the outputs of the above, a constant subtracting means for subtracting 1 from the least significant bit of the partial square root output by the partial square root calculating adding means, and the partial square root A correction multiplexer for selecting either the partial square root output by the calculation addition means or the output of the constant subtraction means and outputting it as a corrected partial square root, A digit aligning unit for performing digit alignment to merge the corrected partial square root output from the correction multiplexer with respect to the merged square root output from the merged square root holding unit, and the merged square root holding unit output. A square root calculation device for adding a merged square root and an output of the digit aligning means to output an updated merged square root.
力オペランドに対して平方根を求めるための開平演算装
置であって、 前記入力オペランドの指数のバイアスを除くための指数
定数減算手段と、 前記指数定数減算手段の出力を1ビット右にシフトする
ための指数シフト手段と、 前記指数シフト手段の出力に指数のバイアスを付加する
ための指数定数加算手段と、 指数のバイアスを除いた値が偶数となるように奇数の場
合は前記入力オペランドの仮数を1ビット左にシフトす
るための正規化手段と、 前記正規化手段の出力の上位ビットをアドレスとして平
方根の近似逆数を索引するためのテーブル情報格納手段
と、 平方根を上位より順に一定のビット数ずつ反復して求め
る際の剰余を保持するための剰余保持手段、各反復での
部分平方根を保持するための部分平方根保持手段、及
び、各反復での部分平方根を併合した併合平方根を保持
するための併合平方根保持手段と、 前記部分平方根保持手段の出力する部分平方根をビット
毎に反転するための反転手段と、 前記併合平方根保持手段の出力を左に1ビットシフトし
て、前記部分平方根保持手段の出力する部分平方根とで
被乗数を生成するための被乗数生成手段と、 定数ゼロと前記剰余保持手段から出力される剰余とのう
ちのいずれかを選択するための剰余用マルチプレクサ
と、 前記剰余保持手段から出力される剰余と前記被乗数生成
手段の出力とのうちのいずれかを選択するための被乗数
用マルチプレクサと、 前記テーブル情報格納手段から出力される平方根の近似
逆数と前記反転手段の出力とのうちのいずれかを選択す
るための乗数用マルチプレクサと、 前記剰余用マルチプレクサの出力(R)と、前記被乗数
用マルチプレクサの出力(S)と、前記乗数用マルチプ
レクサの出力(T)とを各々入力して、(R+S×T)
の演算を行なうための(R+S×T)演算手段と、 前記(R+S×T)演算手段の出力を部分平方根のビッ
ト長から隣接する部分平方根間で重複するビット長を引
いた数だけ左にシフトするための演算結果シフト手段
と、 前記剰余保持手段の入力として前記正規化手段の出力と
前記演算結果シフト手段の出力とのうちのいずれかを選
択するための保持データ切換用マルチプレクサと、 前記(R+S×T)演算手段の出力する積の上位を入力
して部分平方根の最下位ビットより1ビット小さい位で
丸めを行ない、該丸めの結果を前記部分平方根保持手段
に与えるための部分平方根算出用加算手段と、 前記部分平方根保持手段の出力する部分平方根の最下位
ビットから1を引くための定数減算手段と、 前記部分平方根保持手段の出力する部分平方根と前記定
数減算手段の出力とのうちのいずれかを選択して補正部
分平方根として出力するための補正用マルチプレクサ
と、 前記併合平方根保持手段から出力される併合平方根に対
して、前記補正用マルチプレクサの出力する補正部分平
方根を併合できるように桁合わせを行なうための桁合わ
せ手段と、 前記併合平方根保持手段から出力される併合平方根と前
記桁合わせ手段の出力とを加算して更新された併合平方
根を出力するための併合平方根算出用加算手段とを有す
ることを特徴とする開平演算装置。10. A square root arithmetic unit for calculating a square root of a floating-point number input operand having 2 as an exponent base, and exponent constant subtraction means for removing exponent bias of the input operand, An exponent shift means for shifting the output of the exponent constant subtraction means to the right by one bit, an exponential constant addition means for adding an exponent bias to the output of the exponent shift means, and a value excluding the exponent bias is an even number. If it is an odd number, the normalizing means for shifting the mantissa of the input operand to the left by one bit, and the table information for indexing the approximate reciprocal of the square root using the upper bits of the output of the normalizing means as an address. Storing means, remainder holding means for holding the remainder when the square root is iteratively obtained by iterating by a certain number of bits from the top, partial square root at each iteration And a merged square root holding means for holding a merged square root obtained by merging the partial square roots in each iteration, and a partial square root output by the partial square root holding means is inverted bit by bit. And a multiplicand generating means for generating a multiplicand by shifting the output of the merged square root holding means to the left by 1 bit and the partial square root output by the partial square root holding means, and a constant zero and the remainder. A remainder multiplexer for selecting one of the remainder output from the holding means, and a remainder output from the remainder holding means and an output of the multiplicand generating means Selects one of the multiplicand multiplexer, the approximate reciprocal of the square root output from the table information storage means, and the output of the inversion means. And the multiplier multiplexer for, the output of the remainder multiplexer (R), the output of the multiplicand multiplexer (S), and each input and output of the multiplier multiplexer (T), (R + S × T)
And (R + S × T) operation means for performing the above operation, and the output of the (R + S × T) operation means is shifted to the left by a number obtained by subtracting the bit length overlapping between adjacent partial square roots from the bit length of the partial square root. An operation result shift means for performing the operation, and a held data switching multiplexer for selecting one of the output of the normalization means and the output of the operation result shift means as an input of the remainder holding means; R + S × T) For calculating the partial square root for inputting the upper product of the output from the calculating means, rounding the result by one bit smaller than the least significant bit of the partial square root, and giving the rounding result to the partial square root holding means. Adder means, a constant subtraction means for subtracting 1 from the least significant bit of the partial square root output by the partial square root holding means, and a partial square root output by the partial square root holding means A correction multiplexer for selecting either the root or the output of the constant subtraction means and outputting it as a corrected partial square root; and the correction multiplexer for the merged square root output from the merged square root holding means. A digit aligning means for performing digit alignment so as to merge the corrected partial square roots, and a merged square root updated by adding the merged square root output from the merged square root holding means and the digit aligning means output. And a square root calculation adding means for outputting.
らなるベクトルの要素順の入力オペランドに対して平方
根ベクトルを要素順に求めるための開平演算装置であっ
て、 前記入力オペランドに対して前処理を施すための前処理
部と、 部分平方根を併合した併合平方根のビット長が求めるべ
き結果の平方根のビット長以上になるまで部分平方根を
求める処理を繰り返す際の、その繰り返し回数に等しい
個数の1段目から最終段までの主要回路を有する主要部
と、 該主要部の出力に対して後処理を施すための後処理部と
を備え、 前記前処理部は、 前記入力オペランドを保持するための入力レジスタと、 前記入力レジスタの出力のうちの指数部から指数のバイ
アスを除くための指数定数減算手段と、 前記指数定数減算手段の出力を保持するための指数保持
手段と、 指数のバイアスを除いた値が偶数となるように奇数の場
合は前記入力レジスタの出力のうちの仮数部を1ビット
左にシフトするための正規化手段と、 前記正規化手段の出力を保持するための正規化オペラン
ドレジスタと、 前記指数保持手段の出力を1ビット右にシフトするため
の指数シフト手段と、 前記指数シフト手段の出力に指数のバイアスを付加する
ための指数定数加算手段と、 前記正規化オペランドレジスタの出力の上位ビットをア
ドレスとして平方根の近似逆数を索引するためのテーブ
ル情報格納手段とを有し、 前記主要部中の1段目の主要回路は、 パイプライン動作の同期をとるために前記前処理部の指
数定数加算手段、正規化オペランドレジスタ及びテーブ
ル情報格納手段に各々接続された指数保持手段、剰余保
持手段及びテーブル出力情報保持手段と、 前記剰余保持手段の出力を被乗数、前記テーブル出力情
報保持手段の出力を乗数として入力して乗算を行なうた
めの乗算手段と、 前記乗算手段の出力する積の上位を入力して部分平方根
の最下位ビットより1ビット小さい位で丸めを行なうた
めの部分平方根算出用加算手段と、 前記部分平方根算出用加算手段の出力する部分平方根を
保持するための部分平方根保持手段と、 前記部分平方根保持手段の出力する部分平方根をビット
毎に反転するための反転手段と、 前記部分平方根保持手段の出力する部分平方根から被乗
数を生成するための被乗数生成手段と、 前記剰余保持手段の出力する剰余(R)と、前記被乗数
生成手段の出力する被乗数(S)と、前記反転手段の出
力する乗数(T)とを各々入力して、(R+S×T)の
演算を行なうための(R+S×T)演算手段と、 前記(R+S×T)演算手段の出力を部分平方根のビッ
ト長から隣接する部分平方根間で重複するビット長を引
いた数だけ左にシフトするための演算結果シフト手段
と、 前記部分平方根保持手段の出力する部分平方根の最下位
ビットから1を引くための定数減算手段と、 前記部分平方根保持手段の出力する部分平方根と前記定
数減算手段の出力とのうちのいずれかを選択して補正部
分平方根として出力するための補正用マルチプレクサと
を有し、 前記主要部中の2段目以降の主要回路は、それぞれ、 パイプライン動作の同期をとるための指数保持手段、剰
余保持手段、併合平方根保持手段及びテーブル出力情報
保持手段と、 前記剰余保持手段の出力を被乗数、前記テーブル出力情
報保持手段の出力を乗数として入力して乗算を行なうた
めの乗算手段と、 前記乗算手段の出力する積の上位を入力して部分平方根
の最下位ビットより1ビット小さい位で丸めを行なうた
めの部分平方根算出用加算手段と、 前記部分平方根算出用加算手段の出力する部分平方根を
保持するための部分平方根保持手段と、 前記部分平方根保持手段の出力する部分平方根をビット
毎に反転するための反転手段と、 前記併合平方根保持手段の出力を左に1ビットシフトし
て、前記部分平方根保持手段の出力する部分平方根とで
被乗数を生成するための被乗数生成手段と、 前記剰余保持手段の出力する剰余(R)と、前記被乗数
生成手段の出力する被乗数(S)と、前記反転手段の出
力する乗数(T)とを各々入力して、(R+S×T)の
演算を行なうための(R+S×T)演算手段と、 前記(R+S×T)演算手段の出力を部分平方根のビッ
ト長から隣接する部分平方根間で重複するビット長を引
いた数だけ左にシフトするための演算結果シフト手段
と、 前記部分平方根保持手段の出力する部分平方根の最下位
ビットから1を引くための定数減算手段と、 前記部分平方根保持手段の出力する部分平方根と前記定
数減算手段の出力とのうちのいずれかを選択して補正部
分平方根として出力するための補正用マルチプレクサ
と、 前記併合平方根保持手段から出力される併合平方根に対
して、前記補正用マルチプレクサの出力する補正部分平
方根を併合できるように桁合わせを行なうための桁合わ
せ手段と、 前記併合平方根保持手段から出力される併合平方根と前
記桁合わせ手段の出力とを加算して更新された併合平方
根を出力するための併合平方根算出用加算手段とを有
し、 該2段目以降の主要回路では、前記指数保持手段は前段
の指数保持手段に、前記剰余保持手段は前段の演算結果
シフト手段に、前記併合平方根保持手段は2段目では1
段目の補正用マルチプレクサに、また3段目以降では前
段の併合平方根算出用加算手段に、前記テーブル出力情
報保持手段は前段のテーブル出力情報保持手段に各々接
続され、 前記後処理部は、 パイプライン動作の同期をとるために前記主要部中の最
終段の主要回路の指数保持手段及び併合平方根算出用加
算手段に各々接続された指数保持手段及び併合平方根保
持手段を有することを特徴とする開平演算装置。11. A square root arithmetic unit for obtaining a square root vector in element order for an element-order input operand of a vector consisting of floating-point numbers with 2 as an exponent base, the pre-processing being performed on the input operand. And the pre-processing unit for applying the partial square root, and the number of 1s equal to the number of repetitions when repeating the process of obtaining the partial square root until the bit length of the merged square root obtained by merging A main part having a main circuit from the second stage to the final stage; and a post-processing part for performing post-processing on the output of the main part, wherein the pre-processing part holds the input operand. An input register, exponential constant subtraction means for removing the exponent bias from the exponent part of the output of the input register, and an output for the exponential constant subtraction means. Exponent holding means, and normalizing means for shifting the mantissa part of the output of the input register to the left by one bit when the exponent bias is odd so that the value becomes even. A normalization operand register for holding the output of the exponent, an exponent shift means for shifting the output of the exponent holding means to the right by one bit, and an exponent for adding an exponent bias to the output of the exponent shift means. And a table information storage unit for indexing the approximate reciprocal of the square root using the upper bits of the output of the normalized operand register as an address. The main circuit of the first stage in the main unit is a pipe In order to synchronize the line operation, the exponent holding means respectively connected to the exponent constant adding means, the normalized operand register and the table information storing means of the preprocessing section. A remainder holding means and a table output information holding means, a multiplication means for inputting the output of the remainder holding means as a multiplicand and an output of the table output information holding means as a multiplier, and a multiplication means, and an output of the multiplication means. Partial square root calculating and adding means for inputting the upper part of the product and rounding it by one bit smaller than the least significant bit of the partial square root; and a part for holding the partial square root output from the partial square root calculating and adding means. Square root holding means, inverting means for inverting the partial square root output by the partial square root holding means for each bit, multiplicand generating means for generating a multiplicand from the partial square root output by the partial square root holding means, and The remainder (R) output by the remainder holding means, the multiplicand (S) output by the multiplicand generating means, and the multiplier (T) output by the inverting means. And (R + S × T) calculating means for calculating (R + S × T) and the output of the (R + S × T) calculating means from the bit length of the partial square root to the adjacent partial square roots. Operation result shifting means for shifting to the left by the number obtained by subtracting the overlapping bit length, constant subtraction means for subtracting 1 from the least significant bit of the partial square root output by the partial square root holding means, and the partial square root holding A correction multiplexer for selecting one of the partial square root output by the means and the output of the constant subtraction means and outputting it as a corrected partial square root. The circuits respectively store exponent holding means, remainder holding means, merged square root holding means, table output information holding means, and output of the remainder holding means for synchronizing pipeline operations. Number, the multiplication means for inputting the output of the table output information holding means as a multiplier, and the multiplication of the product output by the multiplication means, and inputting the higher order one bit less than the least significant bit of the partial square root. Partial square root calculation adding means for rounding, partial square root holding means for holding the partial square root output by the partial square root calculation adding means, and partial square root output by the partial square root holding means for each bit Inversion means for inverting, an output of the merged square root holding means is shifted to the left by 1 bit, and a multiplicand generating means for generating a multiplicand with the partial square root output by the partial square root holding means; and the remainder holding The remainder (R) output from the means, the multiplicand (S) output from the multiplicand generating means, and the multiplier (T) output from the inverting means are respectively input, and ( (R + S × T) operation means for performing an operation of (R + S × T), and a number obtained by subtracting the bit length of the partial square root from the output of the (R + S × T) operation means Shift means for shifting only to the left, constant subtraction means for subtracting 1 from the least significant bit of the partial square root output by the partial square root holding means, partial square root output by the partial square root holding means, and A correction multiplexer for selecting one of the outputs of the constant subtraction means and outputting it as a corrected partial square root, and an output of the correction multiplexer for the merged square root output from the merged square root holding means. Digit aligning means for performing digit alignment so that the corrected partial square roots can be merged; the merged square root output from the merged square root holding means; Merged square root calculation addition means for adding the output of the matching means and outputting the updated merged square root, and in the main circuit of the second and subsequent stages, the exponent holding means is the exponent holding means of the preceding stage. In addition, the remainder holding means is the operation result shift means of the previous stage, and the merged square root holding means is 1 in the second stage.
The table output information holding unit is connected to the correction multiplexer of the first stage, and the merged square root calculation adding unit of the previous stage in the third and subsequent stages, and the table output information holding unit of the previous stage is connected to the post-processing unit. In order to synchronize the line operation, there is provided an exponent holding means and a merged square root holding means respectively connected to the exponent holding means and the merged square root calculating addition means of the final stage main circuit in the main part. Arithmetic unit.
ランドに対して平方根を求めるための開平演算装置であ
って、 前記入力オペランドの上位ビットをアドレスとして平方
根の近似逆数を索引するためのテーブル情報格納手段
と、 平方根を上位より順に一定のビット数ずつ反復して求め
る際の剰余を保持するための剰余保持手段と、 前記剰余保持手段から出力される剰余と前記テーブル情
報格納手段から出力される平方根の近似逆数とをそれぞ
れ被乗数、乗数として入力して乗算を行なうための乗算
手段と、 前記乗算手段の出力する積の上位を入力して部分平方根
の最下位ビットより1ビット小さい位で丸めを行なうた
めの部分平方根算出用加算手段と、 各反復での部分平方根を併合した併合平方根を保持する
ための併合平方根保持手段と、 前記部分平方根算出用加算手段の出力する部分平方根を
ビット毎に反転するための反転手段と、 前記併合平方根保持手段の出力を左に1ビットシフトし
て、前記部分平方根算出用加算手段の出力する部分平方
根とで被乗数を生成するための被乗数生成手段と、 前記剰余保持手段の出力する剰余を部分平方根のビット
長から隣接する部分平方根間で重複するビット長を引い
た数だけ左にシフトするためのシフト手段と、 前記シフト手段の出力するシフト後の剰余(R)と、前
記被乗数生成手段の出力する被乗数(S)と、前記反転
手段の出力する乗数(T)とを各々入力して、(R+S
×T)の演算を行なうための(R+S×T)演算手段
と、 前記剰余保持手段の入力として前記入力オペランドと前
記(R+S×T)演算手段の出力とのうちのいずれかを
選択するための保持データ切換用マルチプレクサと、 前記部分平方根算出用加算手段の出力する部分平方根の
最下位ビットから1を引くための定数減算手段と、 前記部分平方根算出用加算手段の出力する部分平方根と
前記定数減算手段の出力とのうちのいずれかを選択して
補正部分平方根として出力するための補正用マルチプレ
クサと、 前記併合平方根保持手段から出力される併合平方根に対
して、前記補正用マルチプレクサの出力する補正部分平
方根を併合できるように桁合わせを行なうための桁合わ
せ手段と、 前記併合平方根保持手段から出力される併合平方根と前
記桁合わせ手段の出力とを加算して更新された併合平方
根を出力するための併合平方根算出用加算手段とを有す
ることを特徴とする開平演算装置。12. A square root arithmetic unit for obtaining a square root for an input operand normalized to a unit of 2 bits, wherein table information for indexing an approximate reciprocal of a square root with an upper bit of the input operand as an address. A storage means, a surplus holding means for holding a surplus when iteratively obtains a square root by a certain number of bits from the upper order, a surplus output from the surplus holding means, and a surplus output from the table information storage means. Approximate reciprocal of square root is input as a multiplicand and a multiplier, respectively, and a multiplying unit for performing multiplication, and an upper part of a product output from the multiplying unit is input to round one bit less than the least significant bit of the partial square root. Adder means for calculating a partial square root for performing, and a merged square root holding means for holding a merged square root obtained by merging the partial square roots in each iteration. An inversion means for inverting the partial square root output from the partial square root calculation adding means for each bit; and an output of the partial square root calculation adding means by shifting the output of the merged square root holding means by 1 bit to the left. And a multiplicand generating means for generating a multiplicand with the partial square root, and the remainder output from the remainder holding means is shifted to the left by a number obtained by subtracting the bit length overlapping between adjacent partial square roots from the bit length of the partial square root. For inputting the post-shifting remainder (R) output from the shift means, the multiplicand (S) output from the multiplicand generating means, and the multiplier (T) output from the inverting means. , (R + S
(R + S × T) operation means for performing the operation of (× T), and for selecting either of the input operand and the output of the (R + S × T) operation means as an input of the remainder holding means. A held data switching multiplexer, a constant subtraction unit for subtracting 1 from the least significant bit of the partial square root output by the partial square root calculation addition unit, a partial square root output by the partial square root calculation addition unit, and the constant subtraction A correction multiplexer for selecting any one of the outputs of the means and outputting it as a correction portion square root; and a correction portion output by the correction multiplexer for the merged square root output from the merged square root holding means. Digit aligning means for performing digit alignment so that the square roots can be merged, and the merged square root output from the merged square root holding means No. arithmetic apparatus characterized by having a merging root calculation adding means for outputting the merged square root, which is updated by adding the output of the digit adjustment means.
ランドに対して平方根を求めるための開平演算装置であ
って、 前記入力オペランドの上位ビットをアドレスとして平方
根の近似逆数を索引するためのテーブル情報格納手段
と、 平方根を上位より順に一定のビット数ずつ反復して求め
る際の剰余を保持するための剰余保持手段、各反復での
部分平方根を保持するための部分平方根保持手段、及
び、各反復での部分平方根を併合した併合平方根を保持
するための併合平方根保持手段と、 前記剰余保持手段の出力する剰余を部分平方根のビット
長から隣接する部分平方根間で重複するビット長を引い
た数だけ左にシフトするためのシフト手段と、 前記部分平方根保持手段の出力する部分平方根をビット
毎に反転するための反転手段と、 前記併合平方根保持手段の出力を左に1ビットシフトし
て、前記部分平方根保持手段の出力する部分平方根とで
被乗数を生成するための被乗数生成手段と、 定数ゼロと前記シフト手段から出力されるシフト後の剰
余とのうちのいずれかを選択するための剰余用マルチプ
レクサと、 前記剰余保持手段から出力される剰余と前記被乗数生成
手段の出力とのうちのいずれかを選択するための被乗数
用マルチプレクサと、 前記テーブル情報格納手段から出力される平方根の近似
逆数と前記反転手段の出力とのうちのいずれかを選択す
るための乗数用マルチプレクサと、 前記剰余用マルチプレクサの出力(R)と、前記被乗数
用マルチプレクサの出力(S)と、前記乗数用マルチプ
レクサの出力(T)とを各々入力して、(R+S×T)
の演算を行なうための(R+S×T)演算手段と、 前記剰余保持手段の入力として前記入力オペランドと前
記(R+S×T)演算手段の出力とのうちのいずれかを
選択するための保持データ切換用マルチプレクサと、 前記(R+S×T)演算手段の出力する積の上位を入力
して部分平方根の最下位ビットより1ビット小さい位で
丸めを行ない、該丸めの結果を前記部分平方根保持手段
に与えるための部分平方根算出用加算手段と、 前記部分平方根保持手段の出力する部分平方根の最下位
ビットから1を引くための定数減算手段と、 前記部分平方根保持手段の出力する部分平方根と前記定
数減算手段の出力とのうちのいずれかを選択して補正部
分平方根として出力するための補正用マルチプレクサ
と、 前記併合平方根保持手段から出力される併合平方根に対
して、前記補正用マルチプレクサの出力する補正部分平
方根を併合できるように桁合わせを行なうための桁合わ
せ手段と、 前記併合平方根保持手段から出力される併合平方根と前
記桁合わせ手段の出力とを加算して更新された併合平方
根を出力するための併合平方根算出用加算手段とを有す
ることを特徴とする開平演算装置。13. A square root arithmetic unit for obtaining a square root for an input operand normalized to a unit of 2 bits, wherein table information for indexing an approximate reciprocal of a square root by using an upper bit of the input operand as an address. Storing means, remainder holding means for holding the remainder when the square root is iteratively determined by a certain number of bits from the top, partial square root holding means for holding the partial square root at each iteration, and each iteration In the merged square root holding means for holding the merged square root obtained by merging the partial square roots in, and the remainder output by the remainder holding means is subtracted from the bit length of the partial square root minus the bit length overlapping between adjacent partial square roots. Shift means for shifting to the left, inverting means for inverting the partial square root output by the partial square root holding means for each bit, A multiplicand generating means for generating a multiplicand by shifting the output of the combined square root holding means to the left by 1 bit and the partial square root output by the partial square root holding means, and a constant zero and after the shift output from the shifting means. A remainder multiplexer for selecting one of the remainders, and a multiplicand multiplexer for selecting one of the remainder output from the remainder holding means and the output of the multiplicand generating means, A multiplier multiplexer for selecting one of the approximate reciprocal of the square root output from the table information storage means and the output of the inverting means, the output of the remainder multiplexer (R), and the multiplicand multiplexer (S + T) and the output (T) of the multiplier multiplexer are input to obtain (R + S × T)
(R + S × T) arithmetic means for performing the arithmetic operation, and holding data switching for selecting either of the input operand as the input of the remainder holding means and the output of the (R + S × T) arithmetic means. Multiplexer and the (R + S × T) computing means output the higher order of the product, rounds the result by one bit smaller than the least significant bit of the partial square root, and gives the rounding result to the partial square root holding means. Partial square root calculation adding means, constant subtraction means for subtracting 1 from the least significant bit of the partial square root output by the partial square root holding means, partial square root output by the partial square root holding means and the constant subtraction means Output from the merged square root holding means and a correction multiplexer for selecting and outputting any one of Digit aligning means for performing digit alignment so that the corrected partial square roots output from the correction multiplexer can be merged with respect to the merged square root, and the merged square root output from the merged square root holding means and the output from the digit aligning means. And a square root calculation addition means for adding and to output an updated merged square root.
ランドに対して平方根を求めるための開平演算装置であ
って、 前記入力オペランドの上位ビットをアドレスとして平方
根の近似逆数を索引するためのテーブル情報格納手段
と、 平方根を上位より順に一定のビット数ずつ反復して求め
る際の剰余を保持するための剰余保持手段と、 前記剰余保持手段から出力される剰余と前記テーブル情
報格納手段から出力される平方根の近似逆数とをそれぞ
れ被乗数、乗数として入力して乗算を行なうための乗算
手段と、 前記乗算手段の出力する積の上位を入力して部分平方根
の最下位ビットより1ビット小さい位で丸めを行なうた
めの部分平方根算出用加算手段と、 各反復での部分平方根を併合した併合平方根を保持する
ための併合平方根保持手段と、 前記部分平方根算出用加算手段の出力する部分平方根を
ビット毎に反転するための反転手段と、 前記併合平方根保持手段の出力を左に1ビットシフトし
て、前記部分平方根算出用加算手段の出力する部分平方
根とで被乗数を生成するための被乗数生成手段と、 前記剰余保持手段の出力する剰余(R)と、前記被乗数
生成手段の出力する被乗数(S)と、前記反転手段の出
力する乗数(T)とを各々入力して、(R+S×T)の
演算を行なうための(R+S×T)演算手段と、 前記(R+S×T)演算手段の出力を部分平方根のビッ
ト長から隣接する部分平方根間で重複するビット長を引
いた数だけ左にシフトするためのシフト手段と、 前記剰余保持手段の入力として前記入力オペランドと前
記シフト手段の出力とのうちのいずれかを選択するため
の保持データ切換用マルチプレクサと、 前記部分平方根算出用加算手段の出力する部分平方根の
最下位ビットから1を引くための定数減算手段と、 前記部分平方根算出用加算手段の出力する部分平方根と
前記定数減算手段の出力とのうちのいずれかを選択して
補正部分平方根として出力するための補正用マルチプレ
クサと、 前記併合平方根保持手段から出力される併合平方根に対
して、前記補正用マルチプレクサの出力する補正部分平
方根を併合できるように桁合わせを行なうための桁合わ
せ手段と、 前記併合平方根保持手段から出力される併合平方根と前
記桁合わせ手段の出力とを加算して更新された併合平方
根を出力するための併合平方根算出用加算手段とを有す
ることを特徴とする開平演算装置。14. A square root arithmetic unit for obtaining a square root for an input operand normalized to a unit of 2 bits, wherein table information for indexing an approximate reciprocal of a square root with an upper bit of the input operand as an address. A storage means, a surplus holding means for holding a surplus when iteratively obtains a square root by a certain number of bits from the upper order, a surplus output from the surplus holding means, and a surplus output from the table information storage means. Approximate reciprocal of square root is input as a multiplicand and a multiplier, respectively, and a multiplying unit for performing multiplication, and an upper part of a product output from the multiplying unit is input to round one bit less than the least significant bit of the partial square root. Adder means for calculating a partial square root for performing, and a merged square root holding means for holding a merged square root obtained by merging the partial square roots in each iteration. An inversion means for inverting the partial square root output from the partial square root calculation adding means for each bit; and an output of the partial square root calculation adding means by shifting the output of the merged square root holding means by 1 bit to the left. Multiplicand generating means for generating a multiplicand with the partial square root, a remainder (R) output by the remainder holding means, a multiplicand (S) output by the multiplicand generating means, and a multiplier output by the inverting means ( T) and (R + S × T) calculating means for calculating (R + S × T), and (R + S × T) calculating means outputs the adjacent partial square root from the bit length of the partial square root. Shift means for shifting to the left by a number obtained by subtracting the overlapping bit lengths, and selecting one of the input operand and the output of the shift means as an input of the remainder holding means A holding data switching multiplexer, a constant subtracting means for subtracting 1 from the least significant bit of the partial square root output by the partial square root calculating adder, and a partial square root output by the partial square root calculating adder. A correction multiplexer for selecting any one of the outputs of the constant subtraction means and outputting it as a corrected partial square root; and an output of the correction multiplexer for the merged square root output from the merged square root holding means. A digit alignment means for performing digit alignment so that the corrected partial square roots can be merged, and the merged square root output from the merged square root holding means and the output of the digit alignment means are added to output an updated merged square root. And a square root calculation adding unit for calculating the square root.
ランドに対して平方根を求めるための開平演算装置であ
って、 前記入力オペランドの上位ビットをアドレスとして平方
根の近似逆数を索引するためのテーブル情報格納手段
と、 平方根を上位より順に一定のビット数ずつ反復して求め
る際の剰余を保持するための剰余保持手段、各反復での
部分平方根を保持するための部分平方根保持手段、及
び、各反復での部分平方根を併合した併合平方根を保持
するための併合平方根保持手段と、 前記部分平方根保持手段の出力する部分平方根をビット
毎に反転するための反転手段と、 前記併合平方根保持手段の出力を左に1ビットシフトし
て、前記部分平方根保持手段の出力する部分平方根とで
被乗数を生成するための被乗数生成手段と、 定数ゼロと前記剰余保持手段から出力される剰余とのう
ちのいずれかを選択するための剰余用マルチプレクサ
と、 前記剰余保持手段から出力される剰余と前記被乗数生成
手段の出力とのうちのいずれかを選択するための被乗数
用マルチプレクサと、 前記テーブル情報格納手段から出力される平方根の近似
逆数と前記反転手段の出力とのうちのいずれかを選択す
るための乗数用マルチプレクサと、 前記剰余用マルチプレクサの出力(R)と、前記被乗数
用マルチプレクサの出力(S)と、前記乗数用マルチプ
レクサの出力(T)とを各々入力して、(R+S×T)
の演算を行なうための(R+S×T)演算手段と、 前記(R+S×T)演算手段の出力を部分平方根のビッ
ト長から隣接する部分平方根間で重複するビット長を引
いた数だけ左にシフトするためのシフト手段と、 前記剰余保持手段の入力として前記入力オペランドと前
記シフト手段の出力とのうちのいずれかを選択するため
の保持データ切換用マルチプレクサと、 前記(R+S×T)演算手段の出力する積の上位を入力
して部分平方根の最下位ビットより1ビット小さい位で
丸めを行ない、該丸めの結果を前記部分平方根保持手段
に与えるための部分平方根算出用加算手段と、 前記部分平方根保持手段の出力する部分平方根の最下位
ビットから1を引くための定数減算手段と、 前記部分平方根保持手段の出力する部分平方根と前記定
数減算手段の出力とのうちのいずれかを選択して補正部
分平方根として出力するための補正用マルチプレクサ
と、 前記併合平方根保持手段から出力される併合平方根に対
して、前記補正用マルチプレクサの出力する補正部分平
方根を併合できるように桁合わせを行なうための桁合わ
せ手段と、 前記併合平方根保持手段から出力される併合平方根と前
記桁合わせ手段の出力とを加算して更新された併合平方
根を出力するための併合平方根算出用加算手段とを有す
ることを特徴とする開平演算装置。15. A square root arithmetic unit for obtaining a square root for an input operand normalized to a unit of 2 bits, wherein table information for indexing an approximate reciprocal of a square root by using an upper bit of the input operand as an address. Storing means, remainder holding means for holding the remainder when the square root is iteratively determined by a certain number of bits from the top, partial square root holding means for holding the partial square root at each iteration, and each iteration The merged square root holding means for holding the merged square root obtained by merging the partial square roots at, the inverting means for inverting the partial square root output by the partial square root holding means for each bit, and the output of the merged square root holding means A multiplicand generating means for generating a multiplicand with the partial square root output from the partial square root holding means after shifting by 1 bit to the left; And a remainder multiplexer for selecting one of the remainder output from the remainder holding means, and one of the remainder output from the remainder holding means and the output of the multiplicand generating means. A multiplicand multiplexer for selecting, a multiplier multiplexer for selecting one of the approximate reciprocal of the square root output from the table information storage means and the output of the inverting means, and the output of the remainder multiplexer ( R), the output (S) of the multiplicand multiplexer, and the output (T) of the multiplier multiplexer, respectively, to obtain (R + S × T).
And (R + S × T) operation means for performing the above operation, and the output of the (R + S × T) operation means is shifted to the left by a number obtained by subtracting the bit length overlapping between adjacent partial square roots from the bit length of the partial square root. A shift means for storing the data, a hold data switching multiplexer for selecting one of the input operand and the output of the shift means as an input of the remainder holding means, and the (R + S × T) operation means. The upper part of the product to be output is input, rounding is performed by a bit smaller than the least significant bit of the partial square root, and the rounding result is added to the partial square root holding means. Constant subtraction means for subtracting 1 from the least significant bit of the partial square root output by the holding means; partial square root output by the partial square root holding means and the constant subtraction A correction multiplexer for selecting any one of the outputs of the stages and outputting it as a correction portion square root; and a correction portion output by the correction multiplexer for the merged square root output from the merged square root holding means. A digit aligning unit for performing digit alignment so that the square roots can be merged, and a merged square root output from the merged square root holding unit and an output of the digit aligning unit are added to output an updated merged square root. A square root calculation device comprising: a merged square root calculation addition means.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP11330992A JP2761145B2 (en) | 1992-05-06 | 1992-05-06 | Square root arithmetic unit |
US07/893,089 US5278782A (en) | 1991-06-03 | 1992-06-03 | Square root operation device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP11330992A JP2761145B2 (en) | 1992-05-06 | 1992-05-06 | Square root arithmetic unit |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH05313861A true JPH05313861A (en) | 1993-11-26 |
JP2761145B2 JP2761145B2 (en) | 1998-06-04 |
Family
ID=14608975
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP11330992A Expired - Lifetime JP2761145B2 (en) | 1991-06-03 | 1992-05-06 | Square root arithmetic unit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2761145B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5537345A (en) * | 1993-10-14 | 1996-07-16 | Matsushita Electrical Industrial Co. Ltd. | Mathematical function processor utilizing table information |
-
1992
- 1992-05-06 JP JP11330992A patent/JP2761145B2/en not_active Expired - Lifetime
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5537345A (en) * | 1993-10-14 | 1996-07-16 | Matsushita Electrical Industrial Co. Ltd. | Mathematical function processor utilizing table information |
Also Published As
Publication number | Publication date |
---|---|
JP2761145B2 (en) | 1998-06-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2622896B2 (en) | Division device | |
US6360241B1 (en) | Computer method and apparatus for division and square root operations using signed digit | |
US6240433B1 (en) | High accuracy estimates of elementary functions | |
EP0149248A2 (en) | Method and apparatus for division using interpolation approximation | |
JP3418460B2 (en) | Double precision division circuit and method | |
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 | |
US8060551B2 (en) | Method and apparatus for integer division | |
JP4273071B2 (en) | Divide and square root calculator | |
US5278782A (en) | Square root operation device | |
JP2722858B2 (en) | Square root arithmetic unit | |
JP2822399B2 (en) | Logarithmic function arithmetic unit | |
US7016930B2 (en) | Apparatus and method for performing operations implemented by iterative execution of a recurrence equation | |
US6598065B1 (en) | Method for achieving correctly rounded quotients in algorithms based on fused multiply-accumulate without requiring the intermediate calculation of a correctly rounded reciprocal | |
GB2549153A (en) | Apparatus and method for supporting a conversion instruction | |
JP2761145B2 (en) | Square root arithmetic unit | |
JPH0687219B2 (en) | Control method | |
Bruguera | Radix-64 floating-point division and square root: Iterative and pipelined units | |
US6055553A (en) | Apparatus for computing exponential and trigonometric functions | |
US5377134A (en) | Leading constant eliminator for extended precision in pipelined division | |
US7266578B2 (en) | Method and hardware for computing reciprocal square root and program for the same | |
JPH06187132A (en) | Square root calculating device | |
JP7619153B2 (en) | Processing device and calculation method | |
JP3195609B2 (en) | Reciprocal calculator and computer equipped with reciprocal calculator | |
JP3100868B2 (en) | Arithmetic unit for floating point numbers |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 19980303 |