JPH0368020A - Digit matching circuit for division operand - Google Patents
Digit matching circuit for division operandInfo
- Publication number
- JPH0368020A JPH0368020A JP1204056A JP20405689A JPH0368020A JP H0368020 A JPH0368020 A JP H0368020A JP 1204056 A JP1204056 A JP 1204056A JP 20405689 A JP20405689 A JP 20405689A JP H0368020 A JPH0368020 A JP H0368020A
- Authority
- JP
- Japan
- Prior art keywords
- register
- operand
- output
- mantissa
- digit
- 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
- 238000010586 diagram Methods 0.000 description 5
- 230000000295 complement effect Effects 0.000 description 4
- 230000010365 information processing Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000000034 method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
Abstract
Description
【発明の詳細な説明】
技術分野
本発明は除算オペランドの桁合せ回路に関し、特に浮動
小数点データの除算に先立ち被除数の仮数部を除数の仮
数部よりも絶対値が小さくなるよう桁合せする浮動小数
点除算器で用いられる除算オペランドの桁合せ回路に関
する。[Detailed Description of the Invention] Technical Field The present invention relates to a division operand digit alignment circuit, and in particular to a floating-point operand digit alignment circuit that aligns the digits of the mantissa of the dividend so that its absolute value is smaller than the mantissa of the divisor prior to division of floating-point data. This invention relates to a division operand digit alignment circuit used in a divider.
従来技術
従来、浮動小数点データの除算を被除数と除数の積にお
きかえて実行するようなある種の情報処理装置(例えば
、特開昭57−041737 「除算装置」)において
は、演算に先立ち、被除数と除数の間に以下の関係が成
立していることを必要としている。BACKGROUND TECHNOLOGY Conventionally, in some types of information processing devices (e.g., Japanese Patent Application Laid-Open No. 57-041737 "Dividing Device") that executes division of floating point data by replacing it with the product of a dividend and a divisor, the dividend is calculated before the operation. It is necessary that the following relationship holds between and the divisor.
1被除数の仮数1く1除数の仮数I・・・(1)このよ
うな情報処理装置では、例えば第2図に示すよな固定小
数点データ用の加算器およびシフタを用いて、除数と被
除数が(1)式の関係を満たずように桁合せ処理を実行
している。1 Dividend mantissa 1 + 1 Divisor mantissa I... (1) In such an information processing device, for example, an adder and a shifter for fixed-point data as shown in FIG. 2 are used to calculate the divisor and dividend. Digit alignment processing is performed so that the relationship in equation (1) is not satisfied.
第2図において、オペランドレジスタA22及びB25
は、夫々被除数及び除数の1反数を格納するレジスタで
ある。符号比較回路27は両オペランドの符号を比較し
て、反転指示回路28へこの比較結果を供給する。In FIG. 2, operand registers A22 and B25
are registers that store the one inverse of the dividend and divisor, respectively. The sign comparison circuit 27 compares the signs of both operands and supplies the comparison result to the inversion instruction circuit 28.
この反転指示回路28は当該比較結果と加減算タイプレ
ジスタ23内に設定されている加減算モードとに応じて
反転回路29に対して反転指示を兄事するものである。The inversion instruction circuit 28 instructs the inversion circuit 29 to invert according to the comparison result and the addition/subtraction mode set in the addition/subtraction type register 23.
この反転回路29は当該反転指示に応じてオペランドレ
ジスタB25のオペランドデータを反転するものである
。This inversion circuit 29 inverts the operand data in the operand register B25 in response to the inversion instruction.
加算器′3コはオペランドレジスタA22の出力と反転
回路2つの出力とを加算するものである。Adder '3' adds the output of operand register A22 and the outputs of the two inverting circuits.
この加算結果はりゲルトレジスタ33ヘセレクタ32を
介し7て人力されると共に、絶交・1値比較回路34へ
の1人力となっている。The result of this addition is manually input to the Gerd register 33 via the selector 32, and is also input manually to the disconnection/single value comparison circuit 34.
この絶対値比較回路34はオペランドレジスタA22の
オペランドデータの符号と加算器31の加算出力とから
、被除数と除数との絶対値の大小を比較する回路であり
、その結果がインジケータレジスタ35へ格納される。This absolute value comparison circuit 34 is a circuit that compares the magnitude of the absolute value of the dividend and the divisor based on the sign of the operand data of the operand register A22 and the addition output of the adder 31, and the result is stored in the indicator register 35. Ru.
シフタ30はセレクタ36を介して入力されるオペラン
ドデータの仮数部を桁合せすべく右シフトするものであ
り、シフトカウントレジスタ26の内容に応じて右シフ
トを行う。The shifter 30 shifts the mantissa part of the operand data input via the selector 36 to the right to align the digits, and performs the right shift according to the contents of the shift count register 26.
このシフトカウントは、リーディングサインカウント生
成回路37と、リーディングサインレジスタA38及び
B39と、シフトカウント生成回路とからなるシフトカ
ウント生成部により生成され、セレクタ41を介してシ
フトカウントレジスタ26へ供給される構成である。This shift count is generated by a shift count generation section consisting of a leading sign count generation circuit 37, leading sign registers A38 and B39, and a shift count generation circuit, and is supplied to the shift count register 26 via a selector 41. It is.
以下、第2図を用いて被除数と除数の桁合せ処理動作に
ついて説明する。なお、与えられる被除数と除数は2の
補数型式であると仮定する。The digit alignment processing operation for the dividend and divisor will be described below with reference to FIG. It is assumed that the given dividend and divisor are in two's complement format.
(1)オペランドレジスタA22に被除数の仮数、オペ
ランドレジスタB25に除数の仮数を夫々格納し、加減
算タイプレジスタ23を絶対値比較タイプにセットする
。(1) Store the mantissa of the dividend in the operand register A22 and the mantissa of the divisor in the operand register B25, and set the addition/subtraction type register 23 to the absolute value comparison type.
(2)符号比較回路27において、オペランドレジスタ
A22とオペランドレジスタB25との出力の符号を比
較し、符号比較回路27出力と加減算タイプレジスタ2
3出力とから、反転指示生成回路28においてオペラン
ドレジスタB25出力を反転するか否かを判定する。(2) The sign comparison circuit 27 compares the signs of the outputs of the operand register A 22 and the operand register B 25, and compares the sign of the output of the sign comparison circuit 27 with the addition/subtraction type register 2.
3 output, the inversion instruction generating circuit 28 determines whether or not the output of the operand register B25 is to be inverted.
(3)反転指示生成回路28によってオペランドレジス
タB25出力を反転する指示が出力された場合には、オ
ペランドレジスタB25出力のビットパターンを反転回
路27において反転し、1の補数におきかえるとともに
、加算器31の最下位への桁上げを“1“とじ、反転指
示がでなかった場合には、オペランドレジスタB25出
力をそのまま反転回路27より出力するとともに、加算
器31の最下位への桁上げを“0”とし、加算器31に
おいてオペランドレジスタA22出力と反転器29出力
とを加算する。(3) When the inversion instruction generation circuit 28 outputs an instruction to invert the output of the operand register B25, the bit pattern of the output of the operand register B25 is inverted in the inversion circuit 27, replaced with a one's complement number, and the adder 31 The carry to the lowest order of the adder 31 is set to "1", and if no inversion instruction is issued, the output of the operand register B25 is output as is from the inversion circuit 27, and the carry to the lowest order of the adder 31 is set to "0". ”, and the adder 31 adds the output of the operand register A22 and the output of the inverter 29.
(4)加算器31出力とオペランドレジスタA22出力
の符号とから絶対値比較回路34において、
オペランドレジスタA1
く1オペランドレジスタB
が成立するか否かを判定し、結果をインデイケータレジ
スタ35に格納する。(4) Based on the sign of the output of the adder 31 and the output of the operand register A22, the absolute value comparison circuit 34 determines whether or not operand register A1-operand register B holds true, and stores the result in the indicator register 35. .
(5)インデイケータレジスタ35出力より、オペラン
ドレジスタA
く1オペランドレジスタB
なる関係が成立したと判定された場合には、オペランド
レジスタA22.B25に与えた被除数と除数の仮数部
をそのまま除算のオペランドの仮数部として用いる。ま
た、
オペランドレジスタA
a1オペランドレジスタB
なる関係であると判定された場合には、次の(6)以下
の桁合せ処理を続行する。(5) If it is determined from the output of the indicator register 35 that the following relationship has been established: operand register A x 1 operand register B, operand register A22. The mantissa parts of the dividend and divisor given to B25 are used as they are as the mantissa parts of the operand of division. Further, if it is determined that the relationship is as follows: operand register A a1 operand register B, the digit alignment process in (6) and subsequent steps is continued.
(6)シフタ人力セレクタ36においてオペランドレジ
スタB25出力を選択し、リーディングサインカウント
生成回路37においてオペランドレジスタB25出力の
リーディングサインカウント(連続するサインビットの
数)を求め、リーディングサインレジスタA38に格納
する。次に、シック入力セレクタ36においてオペラン
ドレジスタA22出力を選択し、リーディングサインカ
ウント生成回路37においてオペランドレジスタ八出力
のリーディングサインカウントを求め、リーディングサ
インレジスタA38に格納する。(6) The shifter manual selector 36 selects the output of the operand register B25, the leading sign count generation circuit 37 calculates the leading sign count (number of consecutive sign bits) of the output of the operand register B25, and stores it in the leading sign register A38. Next, the thick input selector 36 selects the output of the operand register A22, and the leading sign count generation circuit 37 calculates the leading sign count of the operand register 8 output and stores it in the leading sign register A38.
(7)シックカウント生成回路40においてリーディン
グサインレジスタA38出力からリーディングサインレ
ジスタA39出力を減じることによりシフトカウントを
生威し、結果をシフトカウントレジスタ26に格納する
。(7) In the thick count generation circuit 40, a shift count is generated by subtracting the output of the leading sign register A39 from the output of the leading sign register A38, and the result is stored in the shift count register 26.
(8)シック30においてシック人力セレクタ36より
出力されるオペランドレジスタA22出力をシフトカウ
ントレジスタ26出力に応じて右シフトし、結果をオペ
ランドレジスタA22およびリザルトレジスタ33に格
納する。(8) In the sick 30, the output of the operand register A22 output from the sick human selector 36 is shifted to the right according to the output of the shift count register 26, and the result is stored in the operand register A22 and the result register 33.
(9)前記(2)、(3)、(4)と同様のオペランド
レジスタA22出力とオペランドレジスタB出力25の
絶対値比較を行い絶対値比較回路34出力をインデイケ
ータレジスタ35に格納する。(9) Similar to (2), (3), and (4) above, the absolute values of the operand register A 22 output and the operand register B output 25 are compared, and the absolute value comparison circuit 34 output is stored in the indicator register 35.
(lO)インデイケータレジスタ35出力により、オペ
ランドレジスタA
くlオペランドレジスタB
なる関係が成立したと判定された場合には、オペランド
レジスタB25に予め与えた除数の仮数部およびリザル
トレジスタ33に格納した被除数の右シフト結果を除算
のオペランドの仮数部として用いる。また、
オペランドレジスタA
≧1オペランドレジスタB
と判定された場合には次の(1■)以下の桁合せ処理を
実行する。(lO) If it is determined by the output of the indicator register 35 that the following relationship has been established, the mantissa part of the divisor given in advance to the operand register B25 and the dividend stored in the result register 33 The result of the right shift is used as the mantissa of the division operand. Further, if it is determined that operand register A≧1 operand register B, the following digit alignment process (1■) is executed.
(11)シフトカウントレジスタ26に、指数の基数よ
り規定される1桁分のシフト力ウニ・トを格納し、(8
)と同様の右シフトを実行し、シフタ30の出力を再び
オペランドレジスタA22およびリザルトレジスタ33
に格納する。(11) Store the shift force unit for one digit defined by the base number of the exponent in the shift count register 26, and (8
), and the output of the shifter 30 is transferred to the operand register A22 and the result register 33 again.
Store in.
(12)前記(2)、(3)、(4)と同様の絶対値比
較を行い、結果をインデイケータレジスタ35に格納す
る。(12) Perform the same absolute value comparison as in (2), (3), and (4) above, and store the result in the indicator register 35.
(13)インデイケータ出力35により、1オペランド
A1く1オペランドB1なる関係が成立したと判定され
た場合には、オペランドレジスタB25に予め与えた除
数の仮数部とりゲルトレジスタ33に格納した被除数の
右シフト結果を除数のオペランドの仮数部として用いる
。そうでない場合には前記(11) 、 (12)
、 (13)をくり返す。(13) If it is determined by the indicator output 35 that the relationship of 1 operand A1 x 1 operand B1 has been established, the mantissa part of the divisor given in advance to the operand register B25 is taken and the dividend stored in the Gerd register 33 is shifted to the right. Use the result as the mantissa of the divisor operand. If not, see (11) and (12) above.
, Repeat (13).
なお、第2図においては指数部の処理について説明を省
略したが、被除数の仮数を右シフトする度に、シフト数
に応じて被除数の指数値を増加させる必要があることは
言うまでもない。Although a description of the processing of the exponent part is omitted in FIG. 2, it goes without saying that each time the mantissa of the dividend is shifted to the right, the exponent value of the dividend must be increased in accordance with the number of shifts.
ここで具体的な例を示してみる。なお、指数の基数は2
とする(指数値n−5−2”)。Let's look at a specific example here. Note that the base of the exponent is 2
(index value n-5-2'').
■被除数の仮数部をAとする。除数の仮数部をBとする
。■Let A be the mantissa part of the dividend. Let B be the mantissa part of the divisor.
A −0,001010・・・0
B −0,0010・・・・・・O
→ A ≧ B
■A、BのリーディングサインカウントLSALSBを
求める。→LSA讃3.LSB−3シフトカウント−L
SA−LSB
3−3
一〇
■前記■のシフトカウント(−0)を用いAを右シフト
しA1とする
A 1− A −0,001010・・・0−4 A1
ミ B
■シフトカウントを指数の基数より“1“とし、AIを
さらに右シフトしてA2とする。A -0,001010...0 B -0,0010...O → A ≧ B ■ Find the leading sign count LSALSB of A and B. →LSA Sanction 3. LSB-3 shift count-L
SA-LSB 3-3 10 ■ Shift A to the right using the shift count (-0) from ■ above to become A1 A 1- A -0,001010...0-4 A1
Mi B ■ Set the shift count to "1" from the base of the exponent, and further shift AI to the right to set it to A2.
A 2−0.00010LO・・・O
B −0,0010・・・・・・・・・・・・0→lA
2 <IBI
■1A21<IBIよりA2.Bを各々被除数及び除数
の仮数部とする(被除数の指数部は右シフト数に応じO
+1−1だけ増加して用いる)。A 2-0.00010LO...O B -0,0010......0→lA
2 <IBI ■1A21<A2 from IBI. Let B be the mantissa part of the dividend and the divisor, respectively (the exponent part of the dividend is O according to the number of right shifts).
(used with an increase of +1-1).
上述の従来の固定小数点データの加算器とシフタを用い
た除算オペランドの桁合せ回路では、シフト及び絶対値
比較をくり返し実行しているため、制御が複雑で桁合せ
の実行時間が長くなるという欠点がある。The above-mentioned conventional digit alignment circuit for division operands using adders and shifters for fixed-point data repeatedly executes shifts and absolute value comparisons, which has the disadvantage that control is complicated and execution time for digit alignment is long. There is.
ところが、浮動小数点データの演算を実行するような情
報処理装置においては、第2図に示した固定小数点デー
タ用の加算器及びシックとは独立に第3図に示すような
浮動小数点データ用の加算器を備えているものが多い。However, in an information processing device that executes operations on floating-point data, an adder for floating-point data as shown in FIG. 3 is added independently of the adder and thick for fixed-point data shown in FIG. Many are equipped with equipment.
第3図における浮動小数点データ用の加算器は以下のよ
うに動作する。The adder for floating point data in FIG. 3 operates as follows.
すなわち、演算に用いるオペランドAとオペランドBの
指数を各々指数レジスタA42,843に格納し、仮数
を各々仮数レジスタA46.B47に格納する。That is, the exponents of operand A and operand B used in the calculation are stored in exponent registers A42, 843, respectively, and the mantissas are stored in mantissa registers A46. Store in B47.
しかるのちに、指数減算器A44において指数レジスタ
843出力より指数レジスタA42出力を減算し、指数
減算器B45において指数レジスタA42出力より指数
レジスタB43出力を減算する。指数減算器A、 44
出力と指数減算器B45出力の符号から、オペランドA
の仮数部のイコライズシフトカウントをイコライズカウ
ントセレクタA50より出力し、同様にイコライズカウ
ントセレクタB51よりオペランドBの仮数部のイコラ
イズシフトカウントを出力する。Thereafter, an exponent subtracter A44 subtracts the output of the exponent register A42 from the output of the exponent register 843, and an exponent subtracter B45 subtracts the output of the exponent register B43 from the output of the exponent register A42. Exponent subtractor A, 44
From the output and the sign of the exponent subtractor B45 output, operand A
The equalize shift count of the mantissa part of the operand B is output from the equalize count selector A50, and similarly, the equalize shift count of the mantissa part of the operand B is output from the equalize count selector B51.
ここで、指数レジスタA≧指数しジスタBの場合、イコ
ライズカウントセレクタA50出力は“0”となり、イ
コライズカウントセレクタB51からは、1指数レジス
タA−指数レジスタBの値、すなわち指数減算器B45
出力が出力される。Here, when exponent register A≧exponent register B, the output of equalize count selector A50 becomes “0”, and from equalize count selector B51, the value of 1 exponent register A−exponent register B, that is, the value of exponent register B45
Output is printed.
逆に、指数レジスタく指数レジスタBの場合、イコライ
ズカウントセレクタA50からはI指数レジスタA−指
数レジスタB1の値、すなわち指数減算器A44の出力
が出力され、イコライズカウントセレクタB51からは
“0”が出力される。Conversely, in the case of exponent register - exponent register B, equalize count selector A50 outputs the value of I index register A - exponent register B1, that is, the output of exponent subtractor A44, and "0" is output from equalize count selector B51. Output.
イコライズシフタB53においては、仮数レジスタ46
出力がイコライズカウントセレクタA50出力により右
シフトされ、イコライズシフタB53においては仮数レ
ジスタB47出力がイコライズウントセレクタB51出
力により右シフトされる。In the equalize shifter B53, the mantissa register 46
The output is shifted to the right by the output of the equalize count selector A50, and in the equalize shifter B53, the output of the mantissa register B47 is shifted to the right by the output of the equalize count selector B51.
反転器54においては、必要に応じてイコライズシフタ
B53出力が1の補数に反転され、この場合加算器55
の最下位に桁上げを生ずる。In the inverter 54, the output of the equalize shifter B53 is inverted to one's complement as necessary, and in this case, the adder 55
A carry is generated at the lowest position.
加算器55においては、イコライズシフタム52出力と
反転器54出力の加算が行われ、結果はりゲルトレジス
タ56に格納される。In the adder 55, the output of the equalization shifter 52 and the output of the inverter 54 are added, and the result is stored in the gel register 56.
ここで、第3図の浮動小数点加算器の構造に着繁すると
、第2図の固定小数点データ用加算器にイコライズシフ
タという右シックを付加したような構造になっており、
イコライズシフタのシフトカウントを指数の差以外から
(例えば、被除数と除数のリーディングサインカウント
の差から)も′j6えられれば、第2図を用いて説明し
た従来例における被除数の右シフトと絶対値比較をこの
浮動小数点加算回路によって実行できることができるこ
とになる。Here, if we follow the structure of the floating-point adder in Figure 3, it has a structure that is similar to the fixed-point data adder in Figure 2 with a right-thick called an equalize shifter added.
If the shift count of the equalize shifter can be calculated from a source other than the difference in exponents (for example, from the difference between the leading sign counts of the dividend and the divisor), then the right shift of the dividend and the absolute value in the conventional example explained using FIG. It follows that comparisons can be performed by this floating point adder circuit.
発明の目的
本発明は上述の点に着目してなされたものであって、そ
の目的とするところは、浮動小数点データの除算に使用
されるオペランドの桁合せを浮動小数点加算回路に若干
の金物量を追加するだけで効率的に行えるようにした除
算オペランドの桁合せ回路を提供することにある。Purpose of the Invention The present invention has been made with attention to the above-mentioned points, and its purpose is to add a small amount of hardware to a floating point addition circuit to perform digit alignment of operands used in division of floating point data. The object of the present invention is to provide a digit alignment circuit for division operands that can be efficiently performed by simply adding .
発明の構成
本発明によれば、浮動小数点データの除算実行に先立ち
被除数の仮数部を除数の仮数部より絶対値が小となるよ
うに桁合せをなす浮動小数点除算器における除算オペラ
ンドの桁合せ回路であって、演算処理対象となる2つの
オペランドデータの指数部の差に応じて前記オペランド
データの仮数部の桁合せをなすべく前記オペランドデー
タを右シフトするシフト手段及びこの桁合せ後の2つの
オペランドデータを加減算する加減算手段を含む浮動小
数点加減算装置と、前記被除数の桁合せに必要なシフト
カウントを生成する桁合せシフトカウント生成手段と、
前記被除数の仮数部の符号と前記加減算手段の出力とか
ら前記桁合せ後の出力の絶対値が前記除数の絶対値より
小が否かを判定する絶対値比較手段と、前記浮動小数点
加減算装置を除算オペランドの桁合せに用いる外部指令
に応答して、前記桁合せシフトカウント生成手段にょり
生成されたシフトカウントを前記シフト手段へ供給する
よう制御する制御手段とを含むことを特徴とする除算オ
ペランドの桁合せ回路が得られる。According to the present invention, there is provided a digit alignment circuit for a division operand in a floating-point divider that aligns the mantissa part of the dividend so that its absolute value is smaller than the mantissa part of the divisor before executing division of floating-point data. Shifting means for shifting the operand data to the right to align the mantissa parts of the operand data according to the difference in the exponent parts of the two operand data to be subjected to arithmetic processing; a floating point addition/subtraction device including addition/subtraction means for adding and subtracting operand data; digit alignment shift count generation means for generating a shift count necessary for digit alignment of the dividend;
Absolute value comparison means for determining whether the absolute value of the output after digit alignment is smaller than the absolute value of the divisor from the sign of the mantissa part of the dividend and the output of the addition/subtraction means; and the floating point addition/subtraction device. A division operand comprising: control means for controlling the shift count generated by the digit alignment shift count generation means to be supplied to the shift means in response to an external command used for digit alignment of the division operand. The digit alignment circuit is obtained.
実施例 以下、図面を参照しつつ本発明の詳細な説明する。Example Hereinafter, the present invention will be described in detail with reference to the drawings.
第1図は本発明の実施例を示す回路ブロック図であり、
第3図の浮動小数点加減算回路に第2図に示した除算オ
ペランドの桁合せ機能を付加したものである。第1図に
おいて、第2.3図と同等部分は同一符号により示して
いる。FIG. 1 is a circuit block diagram showing an embodiment of the present invention,
The floating point addition/subtraction circuit shown in FIG. 3 has been added with the division operand digit alignment function shown in FIG. In FIG. 1, parts equivalent to those in FIG. 2.3 are indicated by the same reference numerals.
第1図は第3図とほぼ同様に指数レジスタA42、指数
レジスタB43、仮数レジスタA46、仮数レジスタB
47、指数減算器A44、指数減算器B45、イコライ
ズシフタA52、イコライズシフタB53、符号比較回
路48、加減算タイプレジスタ57、反転指示生成回路
49、反転回路54、加算器55、リザルトレジスタ5
6を備えており、第3図の通常の浮動小数点加算器とし
ての機能をすべて備えている。Figure 1 is almost the same as Figure 3; exponent register A42, exponent register B43, mantissa register A46, mantissa register B.
47, exponent subtractor A44, exponent subtractor B45, equalize shifter A52, equalize shifter B53, sign comparison circuit 48, addition/subtraction type register 57, inversion instruction generation circuit 49, inversion circuit 54, adder 55, result register 5
6, and has all the functions of the normal floating point adder shown in FIG.
また、第1図では桁合せモードレジスタ16なるモード
レジスタを有し、浮動小数点データ用の加算器55を通
常の浮動小数点データの加算に用いるか、除算オペラン
ドの桁合せに用いるかを区別するモードが設定されてい
る。In addition, in FIG. 1, there is a mode register called a digit alignment mode register 16, which is a mode that distinguishes whether the adder 55 for floating point data is used for normal addition of floating point data or for digit alignment of a division operand. is set.
すなわち、桁合せモードレジスタ16が通フ;(の浮動
小数点データの加算モードを示す場合には、リザルトセ
レクタ14は常に加算器55の出力を選択する。シフト
カウントセレクタ穴50、シフトカウントセレクタB5
1は第3図におけるイコライズカウントセレクタA50
.B51と全く同様の働きをする。That is, when the digit alignment mode register 16 indicates the addition mode of floating point data, the result selector 14 always selects the output of the adder 55.The shift count selector hole 50, the shift count selector B5
1 is the equalize count selector A50 in FIG.
.. It works exactly the same as B51.
つまり、指数減算器B45出力の符号が負の時すなわち
(指数レジスタA42〈指数レジスタB43)の時には
、シフトカウントセレクタ穴50は指数減算器A44出
力を、シフトカウントセレクタB51は“0“を夫々出
力し、そうでない場合には、シフトカウントセレクタB
51は指数減算器B45出力を、シフトカウントセレク
タ穴50は0”を夫々出力する。In other words, when the sign of the output of the exponent subtractor B45 is negative, that is, (exponent register A42 <exponent register B43), the shift count selector hole 50 outputs the output of the exponent subtractor A44, and the shift count selector B51 outputs "0". If not, shift count selector B
51 outputs the output of the exponent subtracter B45, and the shift count selector hole 50 outputs 0''.
これに対し、桁合せモードレジスタ16が除算オペラン
ドの桁合せモードを示す場合には、リザルトセレクタ1
4は常にイコライズシフタム5・2出力を、シフトカウ
ントセレクタ穴50は桁合せシフトカウントレジスタ1
7出力を、シフトカウントセレクタB51は“0”を夫
々出力する。On the other hand, when the digit alignment mode register 16 indicates the digit alignment mode of the division operand, the result selector 1
4 always outputs equalize shift tom 5/2, and shift count selector hole 50 is digit alignment shift count register 1.
7 outputs, and the shift count selector B51 outputs "0".
なお、第1図では、第2図で示したシフトカウント生成
回路等は省略しである。Note that in FIG. 1, the shift count generation circuit and the like shown in FIG. 2 are omitted.
以下に第1図を用いた除算オペランドの桁合せについて
説明する。The digit alignment of the division operand will be explained below using FIG.
(1)桁合せモードレジスタ16を除算オペランドの桁
合せモードにし、桁合せシフトカウントレジスタ17を
“O”にセットする。また加減算タイプレジスタ57を
絶対値比較のタイプにセットし、被除数および除数の仮
数部を各々仮数レジスタA46、仮数レジスタB47に
格納する。(1) Set the digit alignment mode register 16 to the digit alignment mode for the division operand, and set the digit alignment shift count register 17 to "O". Further, the addition/subtraction type register 57 is set to the absolute value comparison type, and the mantissa parts of the dividend and the divisor are stored in the mantissa register A46 and the mantissa register B47, respectively.
(2)符号比較回路48において仮数レジスタA46、
B47の出力の符号を比較し、符号比較回路48出力と
加減算タイプレジスタ57出力とから反転指示生成回路
49においてイコライズシフタ853出力を反転するか
否かを判定する。(2) In the sign comparison circuit 48, the mantissa register A46,
The signs of the outputs of the B47 are compared, and it is determined whether or not the output of the equalize shifter 853 is to be inverted in the inversion instruction generation circuit 49 based on the output of the sign comparison circuit 48 and the output of the addition/subtraction type register 57.
(3)イコライズシフタA52.B53において、仮数
レジスタA46.B47の出力を各々シフトカウントセ
レクタ穴50.851出力に応じて右シフトする。実際
には、仮数レジスタA46出力は、桁合せシフトカウン
トレジスタ17出力により右シフトされ、仮数レジスタ
B47出力は右シフトされない。(3) Equalize shifter A52. At B53, mantissa register A46. The outputs of B47 are shifted to the right according to the outputs of shift count selector holes 50 and 851, respectively. In reality, the mantissa register A 46 output is right-shifted by the digit alignment shift count register 17 output, and the mantissa register B 47 output is not right-shifted.
(4)反転指示生成回路49よりイコライズシフタ85
3出力を反転する指示が出た場合には、反転器54にお
いてイコライズシフタB53出力を反転して1の補数に
するとともに、加算器55の最下位への桁上げを“1”
とし、反転指示がてなかった場合には、イコライズシフ
タ853出力ををのまま反転器54より出力するととも
に、加算器55の最下位への桁上げを“Ooとし、加算
器55においてイコライズシフタA52と反転器54出
力を加算する。(4) Equalize shifter 85 from inversion instruction generation circuit 49
When an instruction to invert the 3 output is issued, the inverter 54 inverts the output of the equalize shifter B53 to make it a 1's complement, and the carry to the lowest order of the adder 55 is set to "1".
If there is no inversion instruction, the output of the equalize shifter 853 is output as is from the inverter 54, the carry to the bottom of the adder 55 is set to "Oo," and the adder 55 outputs the output of the equalize shifter A52. and the output of the inverter 54 are added.
(5)加算器55出力と仮数レジスタA46出力の符号
から、絶対値比較回路34においてlVi数レジスタA
1く1仮数レジスタB1が成立するか否かを判定し結果
をインデイケータレジスタ35に格納する。(5) From the sign of the output of the adder 55 and the output of the mantissa register A46, the lVi number register A is used in the absolute value comparison circuit 34.
It is determined whether 1 minus 1 mantissa register B1 holds true or not, and the result is stored in indicator register 35.
(6)インデイケータレジスタ35出力から仮数レジス
タA1く1仮数レジスタBlなる関係が成立したと判定
された場合には、仮数レジスタA46、仮数レジスタB
47に与えられた被除数と除数の仮数部をそのまま除算
のオペランドの仮数部として用い、そうでない場合には
次の(7)以下の処理を続行する。(6) If it is determined that the relationship of mantissa register A1 x 1 mantissa register Bl is established from the output of the indicator register 35, mantissa register A46 and mantissa register B
The mantissa parts of the dividend and divisor given in step 47 are used as they are as the mantissa parts of the operand of the division, and if not, the processing from (7) onwards is continued.
(7)第2図に示したシフトカウント生成回路40出力
、すなわち被除数と除数のリーディングサインカウント
の差から求めた被除数の右シフトカウントを桁合せシフ
トカウントレジスタ17に格納する。(7) Store the right shift count of the dividend obtained from the difference between the leading sign counts of the dividend and the divisor, which is the output of the shift count generation circuit 40 shown in FIG.
(8)前記(2)、(3)、(4)、(5)と同様の被
除数右シフト及び絶対値比較を同時にい実行し、絶対値
比較の結果である絶対値比較回路34出力をインデイケ
ータレジスタ35に格納し、被除数の右シフト結果をリ
ザルトレジスタ56に格納する。(8) Simultaneously execute the same dividend right shift and absolute value comparison as in (2), (3), (4), and (5) above, and input the output of the absolute value comparison circuit 34, which is the result of the absolute value comparison. The right shift result of the dividend is stored in the result register 56.
(9)インデイケータレジスタ35出力より仮数レジス
タA出力の右シフト結果1く1仮数レジスタB1なる関
係が成立したと判定された場合には、仮数レジスタB4
7に予め与えた除数の仮数部と、リザルトレジスタ56
に格納した被除数の右シフト結果とを除算のオペランド
の仮数部として用い、そうでない場合には、次の(10
)以下の処理を続行する。(9) If it is determined from the output of the indicator register 35 that the right shift result of the mantissa register A output is 1 times 1 mantissa register B1, then the mantissa register B4
The mantissa part of the divisor given in advance to 7 and the result register 56
The right shift result of the dividend stored in is used as the mantissa of the division operand, and if not, the following (10
) Continue the following processing.
(10)桁合せシフトカウントレジスタ17に指数の基
数により規定される1桁分のシフトカウントを格納し、
前記(2)、(3)、(4)、(5)と同様の被除数右
シフト及び絶対値比較を同時に実行し、絶対値比較の結
果をインデイケータレジスタ35、被除数の右シフト結
果をリザルトレジスタ56に格納する。(10) Store a shift count for one digit defined by the base of the exponent in the digit alignment shift count register 17,
The dividend right shift and absolute value comparison similar to those in (2), (3), (4), and (5) are executed simultaneously, and the result of the absolute value comparison is stored in the indicator register 35, and the result of the right shift of the dividend is stored in the result register. 56.
(l()インデイケータレジスタ35出力より仮数レジ
スタA出力の右シフト結果+<1仮数レジスタBlなる
関係が成立したと判定された場合には、仮数レジスタB
47に予め与えた除数の仮数部とりゲルトレジスタ56
に格納した被除数の右シフト結果とを、除数のオペラン
ドの仮数部として用いる。そして、そうでない場合は(
10)”。(l()) If it is determined from the output of the indicator register 35 that the right shift result of the mantissa register A output +<1 mantissa register Bl is established, then the mantissa register B
Gelt register 56 that takes the mantissa part of the divisor given in advance to 47
The right shift result of the dividend stored in is used as the mantissa of the divisor operand. And if not (
10)”.
(1()をくり返す。(Repeat step 1().
尚、ここでは、指数の処理についての説明は省略したが
、被除数の仮数を右シフトする度にシフト数に応じて被
除数の指数値を増加させる必要があることは明白である
。Although a description of exponent processing has been omitted here, it is clear that each time the mantissa of the dividend is shifted to the right, the exponent value of the dividend must be increased in accordance with the number of shifts.
発明の効果
叙上の如く本発明によれば、−殻内な浮動小数点加算回
路に若干の金物量を追加するのみで浮動小数点データの
除算に用いるオペランドの桁合せ処理が効率良く行える
という効果がある。Effects of the Invention As described above, the present invention has the effect that digit alignment of operands used in division of floating point data can be efficiently performed by simply adding a small amount of hardware to the floating point addition circuit in the shell. be.
第1図は本発明の実施例の回路ブロック図、第2図は従
来の除算オペランドの桁合せ回路の回路ブロック図、第
3図は一般的に広く用いられている浮動小数点加算回路
の回路ブロック図である。
主要部分の符号の説明
16・・・・・・桁合せモードレジスタ17・・・・・
・桁合せシフトカウントレジスタ20・・・・・・絶対
値比較回路
42.43・・・・・・指数レジスタ
46.47・・・・・・仮数レジスタ
48・・・・・・符号比較回路
49・・・・・・反転指示回路
50.51・・・・・・シフトカウントセレクタ52.
53・・・・・・シック
54・・・・・・反転回路
55・・・・・・加算器Fig. 1 is a circuit block diagram of an embodiment of the present invention, Fig. 2 is a circuit block diagram of a conventional division operand digit alignment circuit, and Fig. 3 is a circuit block diagram of a generally widely used floating-point addition circuit. It is a diagram. Explanation of symbols of main parts 16... Digit alignment mode register 17...
・Digit alignment shift count register 20...Absolute value comparison circuit 42.43...Exponent register 46.47...Mantissa register 48...Sign comparison circuit 49 ...Reversal instruction circuit 50.51...Shift count selector 52.
53...Sick 54...Inverting circuit 55...Adder
Claims (1)
数部を除数の仮数部より絶対値が小となるように桁合せ
をなす浮動小数点除算器における除算オペランドの桁合
せ回路であって、演算処理対象となる2つのオペランド
データの指数部の差に応じて前記オペランドデータの仮
数部の桁合せをなすべく前記オペランドデータを右シフ
トするシフト手段及びこの桁合せ後の2つのオペランド
データを加減算する加減算手段を含む浮動小数点加減算
装置と、前記被除数の桁合せに必要なシフトカウントを
生成する桁合せシフトカウント生成手段と、前記被除数
の仮数部の符号と前記加減算手段の出力とから前記桁合
せ後の出力の絶対値が前記除数の絶対値より小か否かを
判定する絶対値比較手段と、前記浮動小数点加減算装置
を除算オペランドの桁合せに用いる外部指令に応答して
、前記桁合せシフトカウント生成手段により生成された
シフトカウントを前記シフト手段へ供給するよう制御す
る制御手段とを含むことを特徴とする除算オペランドの
桁合せ回路。(1) A division operand digit alignment circuit in a floating-point divider that aligns the mantissa of the dividend so that the absolute value is smaller than the mantissa of the divisor before executing division of floating-point data, and performs arithmetic processing. Shifting means for shifting the operand data to the right to align the mantissa parts of the operand data according to the difference in the exponent parts of the two target operand data; and addition/subtraction for adding and subtracting the two operand data after the digit alignment. a floating-point addition/subtraction device including means, a digit-alignment shift count generation means for generating a shift count necessary for digit alignment of the dividend, and a digit-alignment shift count generation means for generating a shift count necessary for digit alignment of the dividend; absolute value comparison means for determining whether the absolute value of the output is smaller than the absolute value of the divisor; and generating the digit alignment shift count in response to an external command for using the floating point addition/subtraction device to align the digits of the division operand. and control means for controlling supply of the shift count generated by the means to the shifting means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1204056A JPH0831026B2 (en) | 1989-08-07 | 1989-08-07 | Digit alignment circuit for division operands |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1204056A JPH0831026B2 (en) | 1989-08-07 | 1989-08-07 | Digit alignment circuit for division operands |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0368020A true JPH0368020A (en) | 1991-03-25 |
| JPH0831026B2 JPH0831026B2 (en) | 1996-03-27 |
Family
ID=16484020
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1204056A Expired - Lifetime JPH0831026B2 (en) | 1989-08-07 | 1989-08-07 | Digit alignment circuit for division operands |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0831026B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116820388B (en) * | 2023-08-24 | 2023-11-14 | 深圳比特微电子科技有限公司 | Divider, processor and computing device |
-
1989
- 1989-08-07 JP JP1204056A patent/JPH0831026B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0831026B2 (en) | 1996-03-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5844830A (en) | Executing computer instrucrions by circuits having different latencies | |
| EP0472139A2 (en) | A floating-point processor | |
| US5426600A (en) | Double precision division circuit and method for digital signal processor | |
| JPH02289006A (en) | Circuit for adding and subtracting mantissa of operand in floating point adder | |
| JPH0776911B2 (en) | Floating point arithmetic unit | |
| US7395297B2 (en) | Floating point system that represents status flag information within a floating point operand | |
| CN111752526B (en) | Floating-point addition | |
| US6178435B1 (en) | Method and system for performing a power of two estimation within a data processing system | |
| US3814925A (en) | Dual output adder and method of addition for concurrently forming the differences a{31 b and b{31 a | |
| JPH0454633A (en) | High radix divider | |
| JP2511527B2 (en) | Floating point arithmetic unit | |
| JPH02294731A (en) | Floating point arithmetic processor | |
| US7054898B1 (en) | Elimination of end-around-carry critical path in floating point add/subtract execution unit | |
| JPH0368020A (en) | Digit matching circuit for division operand | |
| US6202078B1 (en) | Arithmetic circuit using a booth algorithm | |
| US5661674A (en) | Divide to integer | |
| US4914579A (en) | Apparatus for branch prediction for computer instructions | |
| JP2507183B2 (en) | Floating point addition / subtraction unit | |
| US20020178202A1 (en) | Floating point multiplier for delimited operands | |
| JPH04172526A (en) | Floating point divider | |
| JPH01282633A (en) | Non-normalized number processing system | |
| JP3100868B2 (en) | Arithmetic unit for floating point numbers | |
| JP2512801B2 (en) | Multiplier | |
| JPH04213110A (en) | Method and apparatus for floating-point arithmetic operation | |
| WO1998006029A1 (en) | Apparatus and methods for execution of computer instructions |