JPH0814790B2 - Processor - Google Patents
ProcessorInfo
- Publication number
- JPH0814790B2 JPH0814790B2 JP61215776A JP21577686A JPH0814790B2 JP H0814790 B2 JPH0814790 B2 JP H0814790B2 JP 61215776 A JP61215776 A JP 61215776A JP 21577686 A JP21577686 A JP 21577686A JP H0814790 B2 JPH0814790 B2 JP H0814790B2
- Authority
- JP
- Japan
- Prior art keywords
- mantissa
- data
- bit
- circuit
- path
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Description
【発明の詳細な説明】 [産業上の利用分野] この発明はデジタル演算処理技術さらには浮動小数点
演算方式に適用して特に有効な技術に関し、例えば浮動
小数点演算可能なデジタル信号処理器に利用して有効な
技術に関する。Description: TECHNICAL FIELD The present invention relates to a digital arithmetic processing technique and a technique particularly effective when applied to a floating point arithmetic system. For example, the present invention is applied to a digital signal processor capable of floating point arithmetic. And effective technology.
[従来の技術] 従来、[株]日立製作所製DSP(デジタル・シグナル
・プロセッサ)HD 61810のような演算プロセッサでは、
第3図に示すような演算部を有し、浮動小数点加減算が
行なえるようにされている。すなわち、演算されるべき
2つの浮動小数点データA1,A2は、入力データレジスタ
1a,1bに入力され、大小判定回路2によっていずれのデ
ータの指数部が大きいか判定される。そして、その大小
判定結果に応じてセレクタ3が切り換えられて、指数部
の小さな方のデータの仮数部が桁合せ回路4に供給され
るように制御される。それから、指数部の大きい方のデ
ータの仮数部と、桁合せ回路4で桁合せのためのシフト
が行なわれ指数部の小さい方のデータの仮数部とが、固
定小数点加減算器5に供給されて演算が行なわれる。そ
して、演算結果は正規化回路6へ供給され、ここで小数
点以下最上位桁(MSB)が正数ならば“1"、負数ならば
“0"となるようなシフト(仮数部の移動)が行なわれる
と共に、そのシフト量に応じて指数部の変更が行なわれ
てから、アキュームレータ7へ転送されるようになって
いる。[Prior Art] Conventionally, in a processor such as DSP (Digital Signal Processor) HD 61810 manufactured by Hitachi, Ltd.,
It has an arithmetic unit as shown in FIG. 3 so that floating point addition and subtraction can be performed. That is, the two floating point data A 1 and A 2 to be operated are input data registers.
The data is input to 1a and 1b, and the magnitude determination circuit 2 determines which data has a larger exponent part. Then, the selector 3 is switched according to the magnitude determination result, and the mantissa part of the data with the smaller exponent part is controlled to be supplied to the digit alignment circuit 4. Then, the mantissa part of the data having the larger exponent part and the mantissa part of the data having the smaller exponent part which are shifted for digit matching in the digit matching circuit 4 are supplied to the fixed-point adder / subtractor 5. Calculation is performed. Then, the calculation result is supplied to the normalization circuit 6, and if the most significant digit (MSB) below the decimal point is a positive number, a shift (movement of the mantissa part) becomes "1" and a negative number causes "0". The exponent is changed according to the shift amount and then transferred to the accumulator 7.
なお、上記演算器で演算される浮動小数点データA1,
A2は、A1=m1×2e1,A2=m2×2e2のように表され
る。ここで、m1,m2は仮数部、e1,e2は指数部であり、
m1,m2は−1と1との間の数である。In addition, the floating point data A 1 calculated by the above arithmetic unit,
A 2 is represented as A 1 = m 1 × 2 e1 and A 2 = m 2 × 2 e2 . Here, m 1 and m 2 are mantissa parts, e 1 and e 2 are exponent parts,
m 1 and m 2 are numbers between -1 and 1.
[発明が解決しようとする問題点] 上記演算プロセッサでは、演算される2つのデータA
1とA2の指数部の大きさが異なる場合、仮数部同士をそ
のまま加減算するわけにはいかないので、桁合せが行な
われる。しかもその場合、仮数部のオーバフローを防止
するため、小さい方の指数部を大きい方の指数部に合せ
るようにしている。そこで、仮数部を、第4図に示すよ
うにe1−e2ビットだけ右へシフトさせる。そして、シ
フト後に仮数部のLSB(最小桁)未満のビットは切り捨
てられるようにされていた。[Problems to be Solved by the Invention] In the above arithmetic processor, two data A to be arithmetically operated.
If the magnitudes of the exponents of 1 and A 2 are different, mantissas cannot be added or subtracted as they are, so digit alignment is performed. Moreover, in this case, in order to prevent overflow of the mantissa part, the smaller exponent part is aligned with the larger exponent part. Therefore, the mantissa part is shifted to the right by e 1 -e 2 bits as shown in FIG. Then, after the shift, bits less than the LSB (minimum digit) of the mantissa part are truncated.
そのため、切り捨てられたビットの分だけの誤差(最
大1LSB)が生じる。これとともに、減算においては減数
(減ずる数)A2の2の補数と被減数A1との和をとるこ
とによって減算が実行されるが、減数A2の2の補数A2
は、A2を反転した数の最下位ビットに1を加えること
によって得られる。Therefore, an error (maximum 1 LSB) corresponding to the truncated bits occurs. At the same time, in the subtraction, the subtraction is executed by taking the sum of the 2's complement of the subtraction (decrementing number) A 2 and the minuend A 1 , but the 2's complement of the subtraction A 2 A 2
Is obtained by adding 1 to the least significant bit of the inverted number of A 2 .
しかるに、減数A2の指数部が、被減数A1の指数部よ
り小さい場合、桁合せによりA2がシフトされいるため
A2の2の補数を計算する過程においてA2の最下位ビッ
トに1を加える操作が不可能となりこれによっても誤差
が生じる。However, the exponent of the subtrahend A 2 is smaller than the exponent part of the minuend A 1, 1 to the least significant bit of A 2 in the process of calculating the two's complement of A 2 for A 2 is shifted by the digit combined The addition operation becomes impossible, and this also causes an error.
そこで、A1とA2の仮数部を各々P,Xとし、をXの
反転数、また()をを桁合せのためシフトして切り
捨てを行なった後の数(最下位ビットに1を加えていな
い数)とすると、P−XはP−()で近似させること
によって演算結果を行なえるようにされていた。しかし
ながらそのような近似を行なうと、例えば仮数部がとも
に0で指数部の大きさが異なる2つの数の減算を行なっ
たときに、本来なら0になるべき演算結果が0にならな
いという問題点があった。Therefore, let the mantissa parts of A 1 and A 2 be P and X, respectively, be the inversion number of X, and () be the number after shifting and truncating for digit alignment (add 1 to the least significant bit). ), The calculation result can be obtained by approximating P−X with P− (). However, if such an approximation is performed, for example, when two numbers whose mantissas are both 0 and exponents have different sizes are subtracted, the operation result which should be 0 should not be 0. there were.
特に、上記のような誤差は、繰返し演算を行なうよう
な場合に累積されて非常に大きな誤差となってしまう。In particular, the above-mentioned errors are accumulated when a repetitive operation is performed and become a very large error.
この発明の目的は、浮動小数点演算において、桁合せ
に伴う切り捨てにより生じる誤差を低減させることがで
きるような演算処理方式を提供することにある。An object of the present invention is to provide an arithmetic processing system capable of reducing an error caused by truncation due to digit alignment in floating point arithmetic.
この発明の前記ならびにそのほかの目的と新規な特徴
については、本明細書の記述および添附図面から明らか
になるであろう。The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.
[問題点を解決するための手段] 本願において開示される発明のうち代表的なものの概
要を説明すれば、下記のとおりである。[Means for Solving Problems] An outline of typical ones of inventions disclosed in the present application will be described below.
すなわち、桁合せ回路の最下位ビット側に1ビットを
付加して、桁合せ回路のビット数を仮数部のビット数よ
りも1つ多くし、この付加ビットに対しても桁合せのた
めのシフトを行なわせると共に、付加ビットの内容をキ
ャリー情報として加減算器に供給可能にし、かつこの加
減算器の前段には、特に減算動作の場合に被減数はその
まま出力し、かつ指数部の数の大きな方に対応する仮数
部データが減数ならばそのデータに1を加算して出力
し、また指数部の数の小さな方に対応する仮数部データ
が減数ならばそのまま出力する全加算器を設けて構成す
るものである。That is, one bit is added to the least significant bit side of the digit matching circuit to increase the number of bits of the digit matching circuit by one more than the number of bits of the mantissa part, and this additional bit is also shifted for digit matching. And the content of the additional bits can be supplied to the adder / subtractor as carry information, and the minuend is output as it is in the preceding stage of this adder / subtractor, especially in the case of the subtraction operation, and the number of exponents is larger. If the corresponding mantissa data is a divisor, add 1 to the data and output it, and if the mantissa data corresponding to the smaller number of exponents is a divisor, provide a full adder to output the data as it is Is.
[作用] 上記した手段によれば、桁合せのためのシフトによっ
て仮数部のデータがはみ出した場合には、付加ビットの
内容をキャリー情報として加減算器に供給することによ
り、シフトによって切り捨てられたビットを四捨五入す
るような形で演算データの最下位ビットに“1"を足した
り足さなかったりするようにして、浮動小数点演算の誤
差を減少させるという上記目的を達成することができ
る。[Operation] According to the means described above, when the data of the mantissa part overflows due to the shift for digit alignment, the contents of the additional bits are supplied as carry information to the adder / subtractor, so that the bits truncated by the shift are supplied. By adding or not adding "1" to the least significant bit of the operation data in a form of rounding off, the above object of reducing the error of the floating point operation can be achieved.
また、減算動作においては、特に被減数はそのまま出
力し、かつ指数部の数の小さな方に対応する仮数部デー
タが減数ならばこの減数もそのまま出力することによ
り、演算精度を保ちながら構成を簡単にして、集積度を
向上させるとともに演算速度の向上を可能とすることが
できる。In addition, in the subtraction operation, in particular, the minuend is output as it is, and if the mantissa data corresponding to the smaller number of the exponent part is the divisor, this divisor is also output as it is, thereby simplifying the configuration while maintaining the calculation accuracy. As a result, the degree of integration can be improved and the calculation speed can be improved.
[実施例] 第1図には、本発明にかかる浮動小数点論理演算回路
の一実施例が示されている。[Embodiment] FIG. 1 shows an embodiment of a floating point logical operation circuit according to the present invention.
この実施例の浮動小数点論理演算回路は、前述した浮
動小数点論理演算回路(第3図)とほぼ同一の構成にさ
れている。The floating point logical operation circuit of this embodiment has almost the same configuration as the floating point logical operation circuit (FIG. 3) described above.
異なる点は、桁合せ回路(右シフタ)4がそのLSB側
に1ビットの付加ビット4aを有し、例えば16ビット幅の
仮数部よりも1ビット大きな17ビットの構成にされ、こ
の付加ビット4aの出力がキャリー信号Cとして固定小数
点加減算器5に供給されている点と、固定小数点加減算
器5の前段に全加算器8が設けられている点である。The difference is that the digit matching circuit (right shifter) 4 has a 1-bit additional bit 4a on its LSB side, and is configured to have a 17-bit structure that is 1 bit larger than the 16-bit width mantissa part. Is output to the fixed-point adder / subtractor 5 as the carry signal C, and the full adder 8 is provided in front of the fixed-point adder / subtractor 5.
この実施例では、演算されるべき2つの浮動小数点デ
ータA1,A2は、入力データレジスタ1a,1bに入力され、
大小判定回路2によっていずれのデータの指数部が大き
いか判定される。そして、その大小判定結果に応じてセ
レクタ3が切り換えられて、減数の仮数部はビット反転
され指数部の小さな方のデータの仮数部が桁合せ回路4
に供給される。ここで、桁合せ回路4に供給されたデー
タが被減数A1である場合、すなわち被減数A1の指数部
e1の方が減数A2の指数部e2よりも小さい場合(e1<
e2)には、被減数A1の仮数部a1が桁合せ回路4に供
給されて右シフトが行なわれる。また、減数A2の仮数
部(セレクタ3でビット反転された値)a2は全加算器
8に供給されて、かつ大小判定回路2からの信号に基づ
いて最下位ビットに1が加えられる。つまり、仮数部a
2の2の補数が演算される。それから、この仮数部a2の
2の補数と、上記桁合せ回路4で桁合せされた被減数A
1の仮数部a1とが、固定小数点演算器5に供給されて、
両者の和がとられる。そして、その演算結果が大小判定
回路2に取り込まれ指数部e1,e2と共に正規化回路6に
供給されて正規化され、アキュームレータ7に保持され
る。In this embodiment, the two floating point data A 1 and A 2 to be calculated are input to the input data registers 1a and 1b,
The size determination circuit 2 determines which data has a larger exponent part. Then, the selector 3 is switched according to the magnitude judgment result, the mantissa part of the subtraction part is bit-inverted, and the mantissa part of the smaller data of the exponent part is the digit matching circuit 4.
Is supplied to. Here, when the data supplied to the digit matching circuit 4 is the minuend A 1, that is, when the exponent part e 1 of the minuend A 1 is smaller than the exponent part e 2 of the subtraction A 2 (e 1 <
In e 2 ), the mantissa part a 1 of the minuend A 1 is supplied to the digit matching circuit 4 and right shift is performed. Furthermore, (bits inverted value selector 3) a 2 mantissa subtrahend A 2 is supplied to the full adder 8, and 1 is added to the least significant bit on the basis of a signal from the magnitude determination circuit 2. That is, the mantissa part a
The 2 's two's complement is calculated. Then, the two's complement of the mantissa part a 2 and the mandable A which are digit-matched by the digit-matching circuit 4 are used.
1 of the mantissa a 1, is supplied to the fixed point unit 5,
The sum of the two is taken. Then, the calculation result is taken into the magnitude determination circuit 2, supplied to the normalization circuit 6 together with the exponents e 1 and e 2 , and normalized, and is stored in the accumulator 7.
一方、大小判定回路2からの制御信号に基づいて桁合
せ回路4に供給されたデータが減数A2(セレクタ3で
ビット反転された値)である場合、すなわち、減数A2
の指数部e2の方が被減数A1の指数部e1よりも小さい
場合(e1>e2)には、減数A2の仮数部a2が桁合せ回
路4に供給されて右シフトが行なわれる。このとき桁合
せ回路4の16ビットのシフタからはみ出したビットのう
ち、付加ビットに入った最上位のビットを除くビットは
切り捨てられる。例えば第2の図に示すごとく、減数A
2の仮数部のビットb15〜b0が右へ3ビットだけシフト
された場合を考えると、16ビットのシフタからはみ出し
たビットb2,b1,b0のうちb2を除くb1,b0が切り捨てら
れ、b2は桁合せ回路4の付加ビット4aに保持される。
そして、この付加ビット4a内のビット(b2)が上述し
たようにキャリー信号として固定小数点加減算器5に供
給される。On the other hand, when the data supplied to the digit alignment circuit 4 based on the control signal from the magnitude determination circuit 2 is the subtraction A 2 (value bit-inverted by the selector 3), that is, the subtraction A 2
In the case towards the exponent e 2 is smaller than the exponent e 1 of the minuend A 1 (e 1> e 2 ), the right-shift mantissa a 2 meiotic A 2 is supplied to the digit combined circuit 4 Done. At this time, of the bits protruding from the 16-bit shifter of the digit alignment circuit 4, the bits except the most significant bit included in the additional bits are truncated. For example, as shown in FIG.
Considering the case where the bits b 15 to b 0 of the mantissa part of 2 are shifted to the right by 3 bits, b 1 , excluding b 2 out of the bits b 2 , b 1 , b 0 protruding from the 16-bit shifter b 1 , b 0 is truncated and b 2 is held in the additional bit 4a of the digit alignment circuit 4.
The bit (b 2 ) in the additional bit 4a is supplied to the fixed point adder / subtractor 5 as a carry signal as described above.
また桁合せ回路4で右シフトされた上位16ビットのデ
ータは、全加算器8を経由し(最下位ビットへの1の加
算は行なわずに)、被減数A1の仮数部a1とともに固定
小数点加減算器5に供給される。Further, the upper 16-bit data right-shifted by the digit matching circuit 4 passes through the full adder 8 (without adding 1 to the least significant bit), and the fixed point together with the mantissa part a 1 of the minuend A 1. It is supplied to the adder / subtractor 5.
そして、固定小数点加減算器5で両者の和がとられて
から、上記桁合せ回路4の付加ビット4aからのキャリー
信号Cに応じてそれが“0"ならば演算結果をそのままア
キュームレータ7に送る。一方、付加ビット4aからのキ
ャリー信号Cが“1"ならば演算データの最下位ビットに
1を加えてからアキュームレータ7へ送るようになって
いる。The fixed point adder / subtractor 5 sums the two, and if it is "0" in accordance with the carry signal C from the additional bit 4a of the digit matching circuit 4, the calculation result is sent to the accumulator 7 as it is. On the other hand, if the carry signal C from the additional bit 4a is "1", 1 is added to the least significant bit of the operation data and then the operation data is sent to the accumulator 7.
このように上記実施例では、桁合せの際に切り捨てる
ビットの最上位ビット(b2)はキャリーとして仮数部
のLSBに加えているので、演算誤差の最大値|er|max及び
期待値|er|exは、 |er|max=1/2LSB |er|ex=1/4LSB で表わされる。一方、従来の演算回路(第3図)におけ
る切り捨て方法による誤差|et|masxと|et|ex)は、右シ
フト量をM(≧1)とおくと、 |et|ex=1/2|et|maxLSB となり、常に、|er|max≦|et|max,|er|ex≦|et|exなる
関係が成立する。つまり、従来に比べて演算誤差が大幅
に減少される。As described above, in the above embodiment, since the most significant bit (b 2 ) of the bits to be rounded down at the time of digit alignment is added to the LSB of the mantissa as a carry, the maximum value | er | max and the expected value | er of the operation error | er. | ex is represented by | er | max = 1 / 2LSB | er | ex = 1 / 4LSB. On the other hand, regarding the errors | et | masx and | et | ex due to the truncation method in the conventional arithmetic circuit (FIG. 3), if the right shift amount is set to M (≧ 1), | et | ex = 1/2 | et | maxLSB, and the relationship | er | max≤ | et | max, | er | ex≤ | et | ex always holds. That is, the calculation error is significantly reduced as compared with the conventional case.
例えば、M=7では、|er|=1/2LSB,|et|max=0.9922
=1LSBとなる。For example, when M = 7, | er | = 1 / 2LSB, | et | max = 0.9922
= 1LSB.
また、上記実施例に従うと、仮数部がともに「0」で
指数部の大きさが異なる2つの数の減算を行なったと
き、従来方式では演算結果が≠0となっていたものが正
しい結果、0が得られるようになる。Further, according to the above-described embodiment, when two numbers whose mantissas are both “0” and the exponents are different in size are subtracted from each other, the calculation result of the conventional method is ≠ 0. You will get 0.
従って、本実施例の演算回路は、例えばデジタルフィ
ルタのように、高速な積和演算を繰返し実行するような
信号処理器に適用すると最も効果的である。Therefore, the arithmetic circuit of the present embodiment is most effective when applied to a signal processor such as a digital filter that repeatedly executes high-speed product-sum calculation.
なお、上記のごとき浮動小数点演算回路を備えた演算
用プロセッサでは、例えば、マイクロプログラムが格納
されたインストラクションROM(リード・オンリ・メモ
リ)が設けられ、このインストラクションROMから読み
出されたマイクロ命令をデコードすることによって形成
された制御信号により上記各回路が所定のアルゴリズム
に従って制御されて所望の浮動小数点演算が実行され
る。An arithmetic processor having a floating-point arithmetic circuit as described above is provided with, for example, an instruction ROM (read-only memory) in which a microprogram is stored, and the microinstruction read from this instruction ROM is decoded. The respective circuits are controlled according to a predetermined algorithm by the control signal formed by the above operation, and a desired floating point operation is executed.
以上説明したように上記実施例は、桁合せ回路の最下
位ビット側に1ビット付加して、桁合せ回路のビット数
を仮数部のビット幅よりも1つ大きくし、この付加ビッ
トに対しても桁合せのためのシフトを行なわせると共
に、付加ビットの内容をキャリー情報として加減算器に
供給させるように構成したので、桁合せのためのシフト
によって仮数部のデータがはみ出した場合には付加ビッ
トの内容をキャリー情報として加減算器に供給すること
により、シフトより切り捨てられたビットを四捨五入す
るような形で演算データの最下位ビットに“1"が足され
たり足されなかったりするという作用により、浮動小数
点演算において桁合せに伴う切り捨てにより生じる誤差
が低減されるようになるという効果がある。As described above, in the above embodiment, one bit is added to the least significant bit side of the digit matching circuit to increase the number of bits of the digit matching circuit by one larger than the bit width of the mantissa part. Since the shift is also performed for digit alignment and the contents of the additional bits are supplied as carry information to the adder / subtractor, if the data in the mantissa part overflows due to the shift for digit alignment, the additional bits By supplying the contents of to the adder / subtractor as carry information, by the action that "1" is added or not added to the least significant bit of the operation data in a form of rounding off the bits truncated from the shift, There is an effect that an error caused by truncation due to digit alignment is reduced in the floating point arithmetic.
また、減算動作においては、被減数A1の指数部e1と
減数A2の指数部e2とを比較し、特にe2がe1よりも小
さい場合には右シフトしたA2の仮数部a2には何もしな
いことにより、演算精度を保ちながら構成を簡単にし
て、集積度を向上させるとともに演算速度も向上でき
る。In the subtraction operation, the minuend exponent e 1 of A 1 and compares the exponent e 2 of the subtrahend A 2, particularly e 2 is mantissa a of A 2 by right shifting is smaller than e 1 By not doing anything in 2, it is possible to simplify the configuration while maintaining the calculation accuracy, improve the degree of integration, and improve the calculation speed.
以上本発明者によってなされた発明を実施例に基づき
具体的に説明したが、本発明は上記実施例に限定される
ものではなく、その要旨を逸脱しない範囲で種々変更可
能であることはいうまでもない。例えば上記実施例で
は、桁合せ回路に設けられた付加ビットの出力をキャリ
ー信号として固定小数点加減算器に供給するようにして
いるが、キャリー信号を形成する代わりに、シフト後の
桁合せ回路内のデータの最下位ビットに付加ビットの内
容に応じてそれが1のときは1を足し、0のときは1を
足さないようにすることで切り捨てによる誤差を減少さ
せるようにしてもよい。Although the invention made by the present inventor has been specifically described based on the embodiments, the present invention is not limited to the above embodiments and various modifications can be made without departing from the scope of the invention. Nor. For example, in the above embodiment, the output of the additional bit provided in the digit alignment circuit is supplied as a carry signal to the fixed-point adder / subtractor. However, instead of forming the carry signal, the shift digit alignment circuit The error due to the truncation may be reduced by adding 1 to the least significant bit of the data according to the content of the additional bit when the value is 1 and not adding 1 when the value is 0.
以上の説明では主として本発明者によってなされた発
明をその背景となった利用分野であるDSPのような演算
プロセッサに適用したものについて説明したが、この発
明はそれに限定されず浮動小数点演算回路を有するデー
タ処理装置一般に利用することができる。In the above description, the invention mainly made by the present inventor is described as being applied to an arithmetic processor such as DSP which is a field of application which is the background of the invention, but the present invention is not limited thereto and has a floating point arithmetic circuit. It can be used for data processing devices in general.
[発明の効果] 本願において開示される発明のうち代表的なものによ
って得られる効果を簡単に説明すれば下記のとおりであ
る。[Effects of the Invention] The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.
すなわち、浮動小数点演算において、桁合せに伴う切
り捨てにより生じる誤差を低減させることができる。That is, in floating-point arithmetic, it is possible to reduce an error caused by truncation due to digit alignment.
また、減算動作においては、特に被減数はそのまま出
力し、かつ指数部の数の小さな方に対応する仮数部デー
タが減数ならばこの減数もそのまま出力することで、演
算精度を保ちながら構成を簡単にして、集積度の向上と
ともに演算速度の向上が可能となる。In addition, in the subtraction operation, in particular, the minuend is output as it is, and if the mantissa part data corresponding to the smaller number of the exponent part is the divisor, this divisor is also output as it is, thereby simplifying the configuration while maintaining the calculation accuracy. As a result, the integration speed can be improved and the calculation speed can be improved.
第1図は、本発明に係る浮動小数点演算回路の一実施例
を示すブロック図、 第2図は、本発明に係る浮動小数点演算回路の桁合せ回
路における仮数部のビットの取扱いを示す説明図、 第3図は、従来の浮動小数点演算回路の構成例を示すブ
ロック図、 第4図は、従来の浮動小数点演算回路の桁合せ回路にお
ける仮数部のビットの取扱いを示す説明図である。 1a,1b……入力データレジスタ、2……大小判定回路、
3……セレクタ及び減数のビット反転回路、4……桁合
せ回路、4a……付加ビット、5……演算器(固定小数点
加減算器)、6……正規化回路、7……アキュームレー
タ、8……全加算器。FIG. 1 is a block diagram showing an embodiment of a floating point arithmetic circuit according to the present invention, and FIG. 2 is an explanatory diagram showing handling of bits of a mantissa part in a digit alignment circuit of the floating point arithmetic circuit according to the present invention. FIG. 3 is a block diagram showing a configuration example of a conventional floating point arithmetic circuit, and FIG. 4 is an explanatory diagram showing how to handle bits of a mantissa part in a digit matching circuit of the conventional floating point arithmetic circuit. 1a, 1b …… Input data register, 2 …… Size judgment circuit,
3 ... Selector and bit-reversal circuit for subtraction, 4 ... Digit matching circuit, 4a ... Additional bits, 5 ... Operation unit (fixed point adder / subtractor), 6 ... Normalization circuit, 7 ... Accumulator, 8 ... … Full adder.
Claims (1)
を有する第1の2進化浮動小数点データと、nビット幅
の第2の仮数部と第2の指数部を有する第2の2進化浮
動小数点データとを加減算処理する演算処理装置であっ
て、 前記第1と第2の指数部の大小を判定し、前記第1と第
2の指数部の差を求める大小判定回路と、 前記大小判定回路の結果により前記第1と第2の指数部
のうち数の大きな方に対応する仮数部データは第1の経
路に、前記第1と第2の指数部のうち数の小さな方に対
応する仮数部データは第2の経路に振り分けるセレクタ
回路と、 前記セレクタ回路の出力を受け、加算の場合にはそのま
ま仮数部データを出力し、減算の場合には減数となる仮
数部データはビット反転して出力し、かつ被減数となる
仮数部データはそのまま出力するビット反転回路と、 前記ビット反転回路の出力する第2の経路の仮数部デー
タを、nビットの最下位ビットに1ビットの付加ビット
を加えた幅で前記第1と第2の指数部の差の数だけ右シ
フトを行なう桁合せ回路と、 前記ビット反転回路の出力する第1の経路の仮数部デー
タおよび前記桁合せ回路の出力する第2の経路の仮数部
データとを受け、加算の場合には各々の仮数部データを
そのまま出力し、減算の場合には被減数はそのまま出力
し、かつ第1の経路の仮数部データが減数ならばその仮
数部データに1を加算して出力し、また第2の経路の仮
数部データが減数ならばそのまま出力する全加算器と、 前記全加算器の出力する第1の経路の仮数部データと、
第2の経路の仮数部データと、前記桁合せ回路で形成さ
れた1ビットの付加ビットを加算する固定小数点加減算
器と、 を有することを特徴とする演算処理装置。1. A first binary coded floating-point data having an n-bit width first mantissa part and a first exponent part, and a second n-bit width mantissa part and a second exponent part. An arithmetic processing device for performing addition / subtraction processing of binary-coded floating-point data of No. 2 and a magnitude determination circuit for determining the magnitude of the first and second exponent parts and obtaining the difference between the first and second exponent parts. According to the result of the magnitude determination circuit, the mantissa data corresponding to the larger one of the first and second exponents is stored in the first path in the number of the first and second exponents. The mantissa data corresponding to the smaller one is distributed to the second path, and the output of the selector circuit is received. The mantissa data is output as it is in the case of addition, and the mantissa part is the mantissa in the case of subtraction. The data is output after bit-inversion, and the mantissa data that is The bit inversion circuit that outputs the bit inversion circuit and the mantissa part data of the second path that is output from the bit inversion circuit with the width obtained by adding an additional bit of 1 bit to the least significant bit of n bits. A digit matching circuit that shifts to the right by the number of differences in the exponent part, a mantissa data of the first path output from the bit inverting circuit, and a mantissa data of the second path output from the digit matching circuit are received. , In the case of addition, each mantissa data is output as it is, in the case of subtraction, the mantissa is output as it is, and if the mantissa data of the first path is a subtraction, 1 is added to the mantissa data. A full adder that outputs the mantissa data of the second path and outputs the mantissa data of the second path as it is, and a mantissa data of the first path output by the full adder;
An arithmetic processing unit comprising: a mantissa data of the second path; and a fixed point adder / subtractor for adding one additional bit formed by the digit matching circuit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61215776A JPH0814790B2 (en) | 1986-09-16 | 1986-09-16 | Processor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61215776A JPH0814790B2 (en) | 1986-09-16 | 1986-09-16 | Processor |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6371725A JPS6371725A (en) | 1988-04-01 |
| JPH0814790B2 true JPH0814790B2 (en) | 1996-02-14 |
Family
ID=16678039
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP61215776A Expired - Fee Related JPH0814790B2 (en) | 1986-09-16 | 1986-09-16 | Processor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0814790B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4768876B1 (en) * | 2010-08-18 | 2011-09-07 | 一雄 伊藤 | Umbrella storage container and method of use thereof |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS60129832A (en) * | 1983-12-19 | 1985-07-11 | Matsushita Electric Ind Co Ltd | arithmetic device |
| JPS61131123A (en) * | 1984-11-30 | 1986-06-18 | Toshiba Corp | Floating point arithmetic unit |
-
1986
- 1986-09-16 JP JP61215776A patent/JPH0814790B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6371725A (en) | 1988-04-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20080215660A1 (en) | Three-Term Input Floating-Point Adder-Subtractor | |
| JP3313560B2 (en) | Floating point processor | |
| KR100465371B1 (en) | apparatus and method for design of the floating point ALU performing addition and round operations in parallel | |
| JP2511527B2 (en) | Floating point arithmetic unit | |
| KR19980082906A (en) | How to Convert Floating-Point Numbers to Integer Types | |
| JPH0511980A (en) | Overflow detecting method and circuit | |
| JPH0814790B2 (en) | Processor | |
| US7051062B2 (en) | Apparatus and method for adding multiple-bit binary-strings | |
| JP2645422B2 (en) | Floating point processor | |
| JP2856792B2 (en) | Floating point arithmetic unit | |
| JPH0283728A (en) | floating point multiplier | |
| JP2555135B2 (en) | Arithmetic circuit | |
| JP2555577B2 (en) | Arithmetic unit | |
| JP3187402B2 (en) | Floating point data addition / subtraction circuit | |
| JP3174974B2 (en) | Floating point arithmetic device and method | |
| JPH03282926A (en) | Floating-point numerical arithmetic unit | |
| JPS63158626A (en) | Arithmetic processing unit | |
| JP3124286B2 (en) | Floating point arithmetic unit | |
| JPH0778724B2 (en) | Divider | |
| JP3100868B2 (en) | Arithmetic unit for floating point numbers | |
| JP4428778B2 (en) | Arithmetic device, arithmetic method, and computing device | |
| JPH07200259A (en) | Arithmetic processing method and arithmetic processing device | |
| JPH07120265B2 (en) | Rounding method in binary floating point multiplication | |
| JPH0361224B2 (en) | ||
| JPH0659862A (en) | Multiplier |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |