JPH0469734A - Underflow exception generation predicting circuit for floating point addition/subtraction - Google Patents

Underflow exception generation predicting circuit for floating point addition/subtraction

Info

Publication number
JPH0469734A
JPH0469734A JP2181590A JP18159090A JPH0469734A JP H0469734 A JPH0469734 A JP H0469734A JP 2181590 A JP2181590 A JP 2181590A JP 18159090 A JP18159090 A JP 18159090A JP H0469734 A JPH0469734 A JP H0469734A
Authority
JP
Japan
Prior art keywords
circuit
subtraction
constant
exception
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2181590A
Other languages
Japanese (ja)
Inventor
Katsuhisa Kondo
近藤 勝久
Yukihiro Ide
井出 進博
Takashi Yoshida
尊 吉田
Masato Nagamatsu
永松 正人
Junji Mori
順治 森
Itaru Yamazaki
到 山崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2181590A priority Critical patent/JPH0469734A/en
Publication of JPH0469734A publication Critical patent/JPH0469734A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To suppress the decrease of the processing speed of a processor to the minimum by comparing a constant value generated by a constant generating means with the value of the maximum exponential part selected on the way of calculation of the addition/subtraction of a floating point of a first and a second operands, and outputting a signal for predicting the underflow exception generation in accordance with the result of this comparison. CONSTITUTION:This circuit is constituted of a constant circuit 101 for generating a constant by inputting a prescribed signal, a code extending circuit 102 for inputting an exponential part intermediate result 210, and a comparator 103. In such a state, a constant value generated by the constant circuit 101 and the value of the maximum exponential part selected on the way of calculation of the floating point addition/ subtraction of the first and the second operands are compared by this comparing circuit 103, and in accordance with the result of this comparison, a signal for predicting the underflow exception generation is outputted. Accordingly, as for most of cases in the case a floating point operation which does not generate an outflow exception is executed, it is judged that an exception is not generated in an early stage of the operation. In such a manner, the instruction execution control can be executed with high efficiency.

Description

【発明の詳細な説明】 し発明の1I r+′J] (産業上の利用分野) 本発明は、浮動小数点加減算を行う情報処理装置に関し
、さらに特定すると浮動小数点加減算時のアンダーフロ
ー例外発生を、演算の初期に予測することか可能なアン
ダーフロー例外発生予測回路に関する。
[Detailed Description of the Invention] [1I r+'J] (Industrial Application Field) The present invention relates to an information processing device that performs floating point addition and subtraction, and more specifically, the present invention relates to an information processing device that performs floating point addition and subtraction. The present invention relates to an underflow exception occurrence prediction circuit that can predict the occurrence of an underflow exception at the beginning of an operation.

(従来の技術) 情報処理を行うために製品化されるマイクロプロセツサ
では、処理を高速に行うために、命令実行をパイプライ
ンで処理するものか多い。すなわち、各命令の実行をい
くつかのステージに分ケ、各ステージを数ザイクルで実
fiする。そして、先fi命令の実行か終rする前に、
次命令の実行を開始する。このようにすることにより、
動作ザイクルの短縮化をはかり、命令実行のスルーブツ
トを上げ−Cいる。
(Prior Art) Many microprocessors commercialized for information processing execute instructions in a pipeline in order to perform processing at high speed. That is, the execution of each instruction is divided into several stages, and each stage is executed in several cycles. Then, before executing or terminating the first fi instruction,
Start execution of next instruction. By doing this,
It aims to shorten the operating cycle and increase the throughput of instruction execution.

各命令の実行内容は、命令の種類により異なるので、命
令の実行サイクル数は命令の種類により異なる。例えば
、浮動小数点演算命令の実j1は、他の命令に比べ、必
要な実行サイクル数か多いのが普通である。
Since the execution content of each instruction differs depending on the type of instruction, the number of execution cycles of an instruction varies depending on the type of instruction. For example, the floating point arithmetic instruction j1 usually requires a larger number of execution cycles than other instructions.

近年、L S Iの集積度向」−にけって、17動小数
点演算命令を備えたプロセッサが多数製品化されつつあ
る。?′i+動小数点演算の実行では、オペランドの種
類及び旧讐結東により発1(−する例外を処理する必要
が11し7る事かある。これらの例久は、数種類あり、
その処理をハードウェアで行うには、動作速度および回
路規模の点から、負荷の大きいものもある。したかって
、実装上のトレードオフから、ある種の例外は、ソフト
ウェアで処理するプロセッサが多い。
In recent years, with the increase in the degree of integration of LSIs, a large number of processors equipped with 17 dynamic point arithmetic instructions are being commercialized. ? When executing a ``i+ floating-point operation, it may be necessary to handle exceptions that occur 1 (-) depending on the type of operand and the type of operand. There are several types of these examples.
Performing this processing in hardware may require a heavy load in terms of operating speed and circuit scale. Therefore, due to implementation trade-offs, many processors handle certain types of exceptions using software.

ずなわぢ、バー1〜ウエアでは、ある種の例外が発生し
たときにはl・ラップを発11する回路のみ実装してお
き、演算途中でその例夕Iが発イ11.たときはトラッ
プか発11シ、トラップルーチンのhか実行されること
になる。このトラップルーチンは、例外を発生したlイ
動小数点演算命令をソノトウエアで実行する。例外の処
理もそのトラップルーチンで行い、演算結果を算出する
In Zunawa's software, only the circuit that issues an l-wrap when a certain type of exception occurs is implemented, and the example I is issued in the middle of an operation. When the trap is issued, the trap routine h is executed. This trap routine causes software to execute the floating point arithmetic instruction that caused the exception. The trap routine also handles exceptions and calculates the result of the operation.

命令のバイブライン実行を行うプロセッサでは、いくつ
かの命令が並列に実行されている。あるl′P動小動点
数点演算命令ラップルーチンで処理する必要のある例夕
Iか発」−シた場合、プロセッサで実行中の命令のうち
、前記浮動小数点演算命令よりも前に実行すべき命令は
ずバーC終了さぜ、前記lf動小数点演′L全命令より
後に実行すべき命令は無効にして、トラップルーチンに
処理を移す。トラップルーチン内で前記lf動小数点演
算命令の実行が終rするとトラップルーチンから処理が
復帰する。
In a processor that performs bi-line execution of instructions, several instructions are executed in parallel. Example of a floating-point operation instruction that needs to be processed by a wrap routine When the instruction to be executed is completed, the instructions to be executed after all the lf floating point operation 'L instructions are invalidated, and the processing is shifted to the trap routine. When execution of the lf floating point arithmetic instruction is completed within the trap routine, processing returns from the trap routine.

復N’r後に実行する命令は、前記ン乎動小数点演p命
令の次の命令である。
The instruction to be executed after the return N'r is the instruction following the floating point operation p instruction.

このようなプロセッサを設51する場合に重要なことは
、トラップを発生した命令より後の命令は、まったく実
行されなかった場合と同し状態でトラップルーチンに処
理を移す制御を行わせることである。
When setting up such a processor, it is important to have the trap routine control the processing so that the instructions after the one that generated the trap are in the same state as if they had not been executed at all. .

例えば、第7図(a)の命令列を考える。図において、
FADDはメゾ動小数点加所を行う命令である。F M
 OVはレジスタ間の転送命令である。
For example, consider the instruction sequence shown in FIG. 7(a). In the figure,
FADD is an instruction to perform mezzo dynamic point addition. F M
OV is a transfer instruction between registers.

F A D D命令は、レジスタr〕の値とレジスタ1
の値の浮動小数点加算を実行し、その結果をレジスタ2
に格納する。最初のFMOV命令は、レジスタ3の値を
レジスタ()に転送する。2番1−1のFMOV命令は
、1ノジスタ0の値をレジスタ1に転送する。
The F A D D instruction sets the value of register r] and register 1.
Performs floating point addition of the values of and stores the result in register 2.
Store in. The first FMOV instruction transfers the value of register 3 to register (). The FMOV instruction No. 2 1-1 transfers the value of 1 register 0 to register 1.

命令実行バイシラインを、命令フェッチ(F)、デコー
ドおよびレジスタ読み出しくD)、演算(E)、レジス
タ書き込=7>(W)というように構成したとする。ま
た、レジスタの読み出しハードウェア、演豹結果をバイ
パス出来るように構成し、lデ動小数点加減仲器は1ザ
イクル毎に演算結果を出力することがi+J能なパイプ
ライン構成であるものとする。
Assume that the instruction execution bi-line is configured as follows: instruction fetch (F), decode and register read (D), operation (E), and register write = 7>(W). Further, it is assumed that the register reading hardware and the calculation result are configured so as to be bypassed, and the l-digital dynamic point adder/subtractor has a pipeline configuration capable of outputting the calculation result every cycle.

この場合、トラップを引き起こす例外か11シないとす
ると、第7図(1))に示すような命令実fi制御か可
能である。すなわち1サイクル11て命令をフェッチ(
F)し、2ザイクル]−1てこれをデ:11−シ、34
56サイクルて演pを実装(E )する。さらにその結
果を7ザイクルll’ffレジスタに書き込む(W)。
In this case, assuming that there are no exceptions that cause traps, instruction actual fi control as shown in FIG. 7(1)) is possible. In other words, an instruction is fetched in one cycle (11).
F) and 2 cycles] -1 and this D: 11-C, 34
Implement operation p (E) in 56 cycles. Furthermore, the result is written to the 7 cycle ll'ff register (W).

しかし、トラップをづき起こす例外か生しる場合、この
ような制御では不都合か生じる場合かある。たとえば、
6ザイクル[1にF A I) Dかトラップを発4(
シた場合、システム的なエラーが生12る。すなわち、
トラップルチンを開始したときにはすてに、最初のFM
OV命令の実行()2)か終γした状態になっており、
トラップルーチンで、FADD命令を?−iうときに用
いるレジスタ〔)の値は、本来用いるべき値とは異なっ
ている。
However, if an exception occurs that causes a trap, such control may be inconvenient. for example,
6 cycles [FA I on 1] D or send a trap 4 (
If you do so, a system error will occur. That is,
Whenever starting Traplutin, the first FM
The execution of the OV instruction ()2) is in a state where it has finished.
FADD instruction in trap routine? The value of the register [) used when executing -i is different from the value that should originally be used.

したがって、FADD命令かトラップを発11する可能
性がある場合は、第7図(C)のような制御を行う必要
かある。ずなわぢ、最初のFMOV命令は、F A I
) D命令かトラップを発生しないことが判明するま−
C1具体的には6→ノイクル1−1までレジスタ0への
書き込み動作を待たせる必要かある。また、その結果、
2番「1のFMOV命令も、図示するように待たされる
ことになる。
Therefore, if there is a possibility that the FADD command may issue a trap, it is necessary to perform control as shown in FIG. 7(C). Zunawaji, the first FMOV command is F A I
) Until it is determined that the D command does not generate a trap.
C1 Specifically, is it necessary to make the write operation to register 0 wait from 6 to Noicle 1-1? Also, as a result,
The FMOV command No. 2 and 1 is also made to wait as shown in the figure.

このように、例外の処理をトラップルーチンで行う場合
、ブロセッ→ノ゛の性能を低ドさせることになる。
In this way, when exception handling is performed using a trap routine, the performance of the process from block to node will be degraded.

if動小数点の加減算において、発ノ1する例外は数種
類ある。演算実行の最初のステージで発生ずる例外もあ
るし、演算実行の終了間際に発生ずる例外もある。前述
の説明から明らかなように、前者の例外処理をトラップ
ルーチンでjjう場合、性能に及はず影響は少ない。し
かし、後右の例外をトラップルーチンで行う場合は、著
しく性能を低1・させる。
There are several types of exceptions that can occur during addition and subtraction of if dynamic point numbers. Some exceptions occur during the first stage of execution, while others occur near the end of execution. As is clear from the above explanation, when the former exception handling is performed by a trap routine, the performance is not affected and the impact is small. However, if the latter exception is handled by a trap routine, the performance will be significantly lowered by 1.

後者の種類に属する例外に、アンダーフロー例外がある
。この例外は、演算結果の指数部が、そのフ)−マット
の表現範囲よりも小さい値になったときに発生ずる。
An example of the latter type of exception is the underflow exception. This exception occurs when the exponent part of the calculation result becomes a value smaller than the expression range of the format.

IEEE754規格を例にとり、このアンダーロー例外
について、説明する。この規格では、演算結果を原則と
して11−現化して出力することを定めている。演算結
果の指数部か市規化数での表現範囲より小さい場合の処
理は、ユーザーの指定する動作モートにより異なってい
る。デフォルト処理を行った結果を用いて旧算処理を続
ける動作モードと、旧算処理を中断させる動作モードと
である。
This underlow exception will be explained using the IEEE754 standard as an example. This standard stipulates that the calculation results are, in principle, converted into 11-values and output. The processing when the exponent part of the calculation result is smaller than the expression range of the city-standardized number differs depending on the operation mode specified by the user. There is an operation mode in which the old calculation process is continued using the result of the default process, and an operation mode in which the old calculation process is interrupted.

後者の動作モードの場合、計算処理を中断するときにア
ンダーフロー例外フラグをセットシて、ユーザーに通知
する。
In the latter mode of operation, an underflow exception flag is set and the user is notified when the calculation process is interrupted.

前者の動作モードを選択した場合、非正規化数で演算結
果を表す。先ず、指数部を表現範囲の最小値で表すため
、必要なたけ仮数部を右シフトする。そして、この中間
結果を指定された丸めモトに従い丸める。この丸め処理
で精度落ちが発生したとき、アンダーフロー例外フラグ
をセットする。
When the former operation mode is selected, the calculation result is expressed as a denormalized number. First, in order to represent the exponent part with the minimum value of the expression range, the mantissa part is shifted to the right by the necessary amount. Then, this intermediate result is rounded according to the specified rounding factor. When a loss of precision occurs during this rounding process, an underflow exception flag is set.

なおこの説明から明らかなように、I EEE745現
格のアンダーフロー例外と「演算結果の指数部か、その
フォーマットの表現範囲よりも小さい値になる場合」と
は、厳密にいうと異なる。本明細書でいうアンダーフロ
ー例外は後者のことを指すということを注意のために(
=1記しておく。
As is clear from this explanation, strictly speaking, the underflow exception in the current IEEE745 is different from "the case where the exponent part of the operation result becomes a value smaller than the expression range of the format". Please note that the underflow exception in this specification refers to the latter (
Write down =1.

この」二連したデフォルト処理をハードウェアで行うた
めには、仮数部のシフト数を判断するためのプライオリ
ティエンコーダと、仮数部をシフI・させるためのバレ
ンシフタが必要となる。そしてこれらの回路のために、
回路規模の増大、動作速度の低下といった負荷が生じる
。そのため、この例外は、トラップルーチンで処理する
ように実装されることか多い。
In order to perform this double default processing in hardware, a priority encoder for determining the number of shifts of the mantissa and a valen shifter for shifting the mantissa are required. And for these circuits,
Loads such as an increase in circuit scale and a decrease in operating speed occur. Therefore, this exception is often implemented to be handled by a trap routine.

前述した後続命令の待ち合わせ制御は、実際に例外が発
生ずる時には必要であるが、発生しなかったときは全く
無駄な制御をしたことになる。したかって、演算実行の
早期にこの例外が発生しないことが判断出来れば、例外
の発生をP測した制御を行うことが可能である。
The above-mentioned waiting control for subsequent instructions is necessary when an exception actually occurs, but when an exception does not occur, the control is completely useless. Therefore, if it can be determined early in the execution of an operation that this exception will not occur, it is possible to perform control that predicts the occurrence of an exception.

すなわち、例外か発生しないと判断された場合は、第7
図(b)に示す制御を行い、それ以外の時は、例外か発
生ずると予測し、第7図(c)に示す制御を行う。この
ようにすることにより、プロセッサの性能低下を抑える
のに大きく貢献する。
In other words, if it is determined that an exception will not occur, the seventh
The control shown in FIG. 7(b) is performed, and in other cases, it is predicted that an exception will occur and the control shown in FIG. 7(c) is performed. This greatly contributes to suppressing the performance degradation of the processor.

このように、浮動小数点加減算のアンダーフロー例外を
トラップルーチンで行うプロセッサでは、性能低下を抑
えるために、演算実行の早期にアンダーフロー例外の発
生を検査し、アンダーフロ例外発生か判断出来ないとき
のろ例外発生子4I]信号を出力するアンダーフロー例
外発生子δI11回路か求められている。
In this way, in a processor that uses a trap routine to handle underflow exceptions in floating-point additions and subtractions, in order to prevent performance degradation, the processor checks for the occurrence of an underflow exception early in the execution of an operation, and detects the occurrence of an underflow exception when it cannot be determined whether an underflow exception has occurred. An underflow exception generator δI11 circuit that outputs an underflow exception generator 4I] signal is required.

(発明が解決しようとする課題) 以上に説明したように、浮動小数点加減算のアンダーフ
ローをトラップルーチンで処理する従来のプロセッサで
は、後続命令の待ち合わせ制御のためにプロセッサの処
理スピード、ずなわぢプロセッサの性能が大幅に低下す
るという欠点を有している。
(Problems to be Solved by the Invention) As explained above, in conventional processors that handle underflows in floating-point addition and subtraction using trap routines, the processing speed of the processor is reduced to control the waiting of subsequent instructions. The disadvantage is that the performance of

本発明は、従来装置のこのような欠点に関して成された
もので、その目的は、前記性能の低下を最小限に抑える
ために、浮動小数点加減算実行の早期にアンダーフロー
例外の発生を検査し、アンダーフロー例外発生か判断て
きないときのみ例外発生予測信号を出力するアンダーフ
ロー例外発生予測回路を提供することである。
The present invention has been made to address these shortcomings of conventional devices, and its purpose is to check for the occurrence of an underflow exception early in the execution of a floating-point addition/subtraction, in order to minimize the deterioration in performance; To provide an underflow exception occurrence prediction circuit that outputs an exception occurrence prediction signal only when it cannot be determined whether an underflow exception has occurred.

[発明の構成コ (課題を解決するだめの手段) 本発明の特徴は、前記の課題を解決するために、第1 
第2オペランドの浮動小数点加減算を実行するにあたっ
て選択された最大オペランド指数部に対して行われる正
規化処理で、該指数部から減算される可能性のある最大
数を、真の加算を行うか否かを示す信号と単精度演算で
あるか倍精度演算であるかを示す信号と前記第1.第2
オペランドの指数部の差が2以上であるか否かを示す信
号とに応じて定数として発生ずる定数発生手段と、 該
定数発生手段により生成された定数値と前記第1.第2
オペランドの浮動小数点加減算の算出途中で選択される
最大指数部の値とを比較する比較手段、とを備え、前記
比較結果に応じてアンダーフロー例外発生を子i’TI
IIする信号を出力する浮動小数点加減算のアンダーフ
ロー例外発生予測回路にある。
[Configuration of the Invention (Means for Solving the Problems) The features of the present invention are as follows.
In the normalization process performed on the maximum operand exponent part selected when executing floating-point addition/subtraction of the second operand, the maximum number that may be subtracted from the exponent part is determined whether to perform true addition or not. a signal indicating whether the arithmetic operation is single-precision arithmetic or double-precision arithmetic; Second
a constant generating means that generates a constant in response to a signal indicating whether the difference between the exponent parts of the operands is 2 or more; and a constant value generated by the constant generating means and the first. Second
Comparison means for comparing the value of the maximum exponent part selected during calculation of floating point addition/subtraction of the operand, and detecting the occurrence of an underflow exception according to the comparison result.
This circuit is located in an underflow exception prediction circuit for floating-point addition/subtraction that outputs a signal for II.

(作用) この回路では、まず定数発生1段において、浮動小数点
の加減算時における選択された最大指数部の値に対して
行イつれる正規化処理で減算される可能性のある最大値
を定数として発生ずる。この定数値は、浮動小数点加減
算の状態、すなわち単精度演算であるか、倍精度演算で
あるか、真の加算であるか、真の減算であるかおよび演
算すべき両オペランドの指数部の差が2以」−であるか
否かに対応じて、それぞれ設定されている。次にこれら
の定数値は、比較手段において、浮動小数点加減算の算
出途中の選択された最大指数部の値と比較される。この
比較結果は、演算結果の指数部が正規化数の指数部表現
範囲に入るか否かを表示するものであるため、比較結果
がこの表現範囲を越えると判定された場合、前記浮動小
数点加減3?においてアンダーフロー例外の発生を予測
することかできる。したかってこの回路では、比較手段
の出力によりアンダーフロー例外の発生を予測すること
ができる。
(Operation) In this circuit, first, in the first stage of constant generation, the maximum value that may be subtracted in the normalization process that is performed on the value of the maximum exponent part selected during addition and subtraction of floating point numbers is set as a constant. It occurs as follows. This constant value determines the state of the floating-point addition/subtraction, i.e., whether it is a single-precision operation, a double-precision operation, a true addition, a true subtraction, and the difference between the exponents of both operands to be operated on. The values are set depending on whether or not the value is 2 or more. These constant values are then compared in the comparison means with the value of the maximum exponent part selected during the floating point addition/subtraction calculation. This comparison result indicates whether or not the exponent part of the calculation result falls within the exponent part expression range of the normalized number, so if it is determined that the comparison result exceeds this expression range, the floating point addition/subtraction 3? It is possible to predict the occurrence of an underflow exception. Therefore, in this circuit, it is possible to predict the occurrence of an underflow exception based on the output of the comparison means.

(実施例) ] 2 第1図は本発明の一実施例にかかるアンダフロー例外発
生予測回路を示すブロック図、第2図は第1図に示すア
ンダーフロー例外発生T−測回路を接続した浮動小数点
加減算装置を示すブロック図である。
(Embodiment)] 2. Fig. 1 is a block diagram showing an underflow exception occurrence prediction circuit according to an embodiment of the present invention, and Fig. 2 is a block diagram showing an underflow exception occurrence prediction circuit according to an embodiment of the present invention. FIG. 2 is a block diagram showing a decimal point addition/subtraction device.

第1図に示すアンダーフロー例外発生子−〇1回路の説
明に先立って、一般的な浮動小数点加減算装置の構成と
、〆f動小数点加減算の動作1順を第2図を参照しなが
ら説明し、本発明の実施例の理解を容易にする。
Prior to explaining the underflow exception generator-1 circuit shown in Figure 1, the configuration of a general floating-point addition/subtraction device and the order of operation of floating-point addition/subtraction will be explained with reference to Figure 2. , to facilitate understanding of embodiments of the present invention.

第2図の点線で囲った部分200は、一般的な浮動小数
点加減算装置の構成を示すものである。
A portion 200 surrounded by a dotted line in FIG. 2 shows the configuration of a general floating point addition/subtraction device.

図示のように、この装置は、指数部計算回路216、ス
ワップ回路217、桁合わせ回路218、仮数部加減算
回路219、正規化/丸め回路220、および指数部調
整回路221からなっている。
As shown, this device includes an exponent calculation circuit 216, a swap circuit 217, a digit adjustment circuit 218, a mantissa addition/subtraction circuit 219, a normalization/rounding circuit 220, and an exponent adjustment circuit 221.

なおこの装置において、当然符号部を51算する回路か
(niえられているか、本発明のアンダーフロ例外発生
の説明には関係ないので、第2図では省略している。ま
た、本発明の一実施例であるアンダーフロー例外発生予
測回路222は、図示するように指数部計算回路216
における出力を人力とするように浮動小数点加減算装置
に接続されている。
It should be noted that in this device, the circuit that calculates the sign part by 51 is not relevant to the explanation of the occurrence of the underflow exception of the present invention, so it is omitted in Fig. 2. The underflow exception occurrence prediction circuit 222, which is one embodiment, includes an exponent calculation circuit 216 as shown in the figure.
It is connected to a floating point adder/subtracter so that the output at

この装置において、指数部81算回路216には、第1
オペランドの指数部信号202と第2オペランドの指数
部信号205が入力され、スワップ回路2]7には第1
オペランドの仮数部信号203と第2オペランドの仮数
部信号206が人力される。また演算結果として、指数
部調整回路22]から、指数部信号208が、正規化/
丸め回路220から仮数部信号209か出力される。な
お71号部は、仮数部の演算結果により決定されるか、
これは合本発明の内容とは関係ないので、説明は省略す
る。
In this device, the exponent part 81 arithmetic circuit 216 includes a first
The exponent signal 202 of the operand and the exponent signal 205 of the second operand are input to the swap circuit 2]7.
The operand mantissa signal 203 and the second operand mantissa signal 206 are input manually. Further, as a calculation result, the exponent part signal 208 is sent from the exponent part adjustment circuit 22] to the normalized/
A mantissa signal 209 is output from the rounding circuit 220. The number 71 part is determined by the calculation result of the mantissa part, or
Since this is not related to the content of the present invention, its explanation will be omitted.

浮動小数点加減算における指数部と仮数部の算出は、大
きく分けて次のような4つの処理ステジに分けられる。
Calculation of the exponent and mantissa parts in floating-point addition and subtraction can be roughly divided into the following four processing stages.

処理1: (指数部中間結果算出および仮数部桁合わせ
) 第1.第2のオペランド指数部202. 2 f’、1
5を指数部加算結果216で比較]〜、大きい方を指数
部中間結果210として出力する。また仮数部は、指数
部の演算結果を用いて桁合わせをする。
Processing 1: (Exponent part intermediate result calculation and mantissa part digit alignment) 1st. Second operand exponent part 202. 2 f', 1
5 with the exponent part addition result 216], the larger one is output as the exponent part intermediate result 210. Furthermore, the mantissa part is digit-aligned using the calculation result of the exponent part.

すなわち指数部の小さい方のオペランド仮数部213を
桁合わせ回路2]8において2つのオペランド指数部の
差215たけ右シフトし、桁合わせされた仮数部の値2
14を生成する。他方のオペランド仮数部は、信号2]
2としてそのまま出力する。
In other words, the operand mantissa part 213 with the smaller exponent part is shifted to the right by the difference 215 between the two operand exponent parts in the digit alignment circuit 2]8, and the digit-aligned mantissa part 213 is shifted to the right by the difference 215 between the two operand exponent parts.
14 is generated. The other operand mantissa is signal 2]
2 and output as is.

処理2: (仮数部中間結果算出) 仮数部の中間結果を算出する。桁合わせした仮数部の値
214と他方のオペランド仮数部の値212との固定小
数点加減算を加減算回路219において実行し、仮数部
中間結果211を算出する。
Process 2: (Calculation of mantissa intermediate result) Calculate the intermediate result of the mantissa. Fixed-point addition and subtraction between the digit-aligned mantissa value 214 and the other operand mantissa value 212 is performed in an addition/subtraction circuit 219 to calculate a mantissa intermediate result 211.

加算を行うか減算を行うかは、命令の種類とオペランド
の符号部を用いて決定する。なお、ここでの加減算を命
令の加減算と区別するため、この明細書では、真の加算
、真の減算とよぶ。
Whether addition or subtraction is to be performed is determined using the type of instruction and the sign part of the operand. Note that in order to distinguish the addition and subtraction here from the addition and subtraction of instructions, this specification calls them true addition and true subtraction.

処理3: (正規化) 仮数部の正規化を行い、それに伴い、指数部の調節をす
る。iE規化とは、仮数部中間結果211の最」二値に
ある1”を所定の桁位置に合わせることである。したか
って、仮数部中間結果211をシフトすることにより行
う。結果211を右にシフトした場合、シフトした数を
指数部中間結果210に加算する必要がある。また、結
果211を左にシフトシた場合、ンフl−した数を指数
部1間結果210から減算する必要かある。
Process 3: (Normalization) The mantissa is normalized and the exponent is adjusted accordingly. iE normalization is to adjust the binary 1'' of the mantissa intermediate result 211 to a predetermined digit position.Therefore, it is performed by shifting the mantissa intermediate result 211.The result 211 is shifted to the right. If the result 211 is shifted to the left, it is necessary to add the shifted number to the intermediate result 210 of the exponent part.If the result 211 is shifted to the left, it is necessary to subtract the shifted number from the intermediate result 210 of the exponent part 1. .

処理4: (丸め/再1F規化) 正規化された仮数部中間結果の下位数ビットを参照し、
丸めモードに従い、必要ならば前記中間結果をインクリ
メントする。インクリメンI・した場合、1F規化され
ている仮数部中間結果の最」二値ビットから桁上かりが
生じることかある。この場合、仮数部の再正規化を行う
必要かある。すなわち、仮数部を右に1桁シフトし、指
数部の値を1インクリメントする。以」二のようにして
l?動小数点の加減算か実行される。
Process 4: (Rounding/re-1F normalization) Refer to the lower few bits of the normalized mantissa intermediate result,
Increment the intermediate result if necessary according to the rounding mode. When incrementing I, an overflow may occur from the most binary bit of the 1F normalized mantissa intermediate result. In this case, it may be necessary to renormalize the mantissa. That is, the mantissa is shifted one digit to the right, and the value of the exponent is incremented by one. Is it like ``2''? Addition or subtraction of floating point numbers is performed.

本発明のアンダーフロー例外発生予測回路では、前記処
理フローのうち処理1で行なわれる最大指数部選択の結
果を入力とし、この人力値を所定の定数と比較すること
によってアンダーフローの発生を予測することを基本と
している。上述した処理フローから分かるように、この
人力信号は演算開始直後に生成される。したがってこの
信号を用いてたたちにアンダーフロー例外の発生予測を
行って、アンダーフロー例外がほぼ発生しないと判断で
きれば、第7図(b)に示した命令実行制御を行い、そ
れ以外の場合はアンダーフロー例夕Iか発生しうるちの
と判断して第7図(C)に示した後続命令の待ち合わせ
制御を行う。このようにすることによって、アンダーフ
ロー例外が発生しない場合も常に待ち合わせ制御を行っ
ていたずらにブロセッザの処理スピードを落とすことな
く、迅速に処理を実行することか可能となる。
The underflow exception occurrence prediction circuit of the present invention receives as input the result of selecting the maximum exponent part performed in process 1 of the processing flow, and predicts the occurrence of an underflow by comparing this manual value with a predetermined constant. It is based on that. As can be seen from the processing flow described above, this human input signal is generated immediately after the start of calculation. Therefore, by using this signal to predict the occurrence of an underflow exception, if it is determined that an underflow exception will almost never occur, the instruction execution control shown in FIG. 7(b) is performed; otherwise, It is determined that an underflow example has occurred, and control for waiting for subsequent instructions as shown in FIG. 7(C) is performed. By doing so, even if an underflow exception does not occur, it is possible to perform processing quickly without unnecessarily slowing down the processing speed of the processor by always performing waiting control.

さらに第2図から明らかなように、この人力値210か
ら減算されるri工能性のある最大値は、処理3におけ
る仮数部止規化に伴う前記減算値、ずなわぢ左シフト数
である。したかって、指数部加算結果からこの値を引い
た値が、指数部の表現範囲を下回った場合に、アンダー
フロー例外の発生の可能性かあると予測することができ
る。それ以外の場合は、アンダーフロー例外を発生しな
いと決定できる。本発明では、基本的にこの煮え方に基
づいてアンダーフロー例外の発生を予測する回路を構成
している。また、指数部表現範囲に比べて、正規化によ
り指数部中間結果の値が変動する範囲は、非常に小さい
。さらに、正規化による返答範囲を、単精度演痺である
か、倍精度演算であるかという情報と真の加算であるか
真の減算であるかという情報と両オペランド指数の差が
2以上であるか白かという情報とて判定する。このよう
にすることによって、アンダーフロー例外か発41゛し
ない大2Fのケースは、例外か発生しないと早期に判断
できる。
Furthermore, as is clear from FIG. 2, the maximum value that can be subtracted from this human power value 210 is the subtracted value due to the mantissa normalization in process 3, which is the left shift number. . Therefore, if the value obtained by subtracting this value from the result of addition of the exponent part falls below the expression range of the exponent part, it can be predicted that there is a possibility that an underflow exception will occur. In other cases, it can be determined not to generate an underflow exception. The present invention basically configures a circuit that predicts the occurrence of an underflow exception based on this boiling method. Furthermore, compared to the exponent expression range, the range in which the value of the intermediate exponent result varies due to normalization is very small. Furthermore, the range of responses due to normalization is determined by the information on whether it is single-precision arithmetic or double-precision arithmetic, the information on whether it is true addition or true subtraction, and the difference between the exponents of both operands of 2 or more. It is determined based on the information whether it is white or white. By doing this, in the large 2F case where an underflow exception does not occur, it can be determined at an early stage that an exception will not occur.

次に、」二連した基本概念に基づく本発明の実施例を、
以ドに説明する。なおこの実施例は、IEEE754規
格に準拠する浮動小数点加減算装置を対象にして構成さ
れたものである。この装置は、単精度および倍精度演算
の両者を実行することができる。また、正規化数しかオ
ペランドとして扱えない。非正規化数のオペランドが人
力された場合、トラップルーチンによりソフトウェアで
処理される。このトラップの発生は、演算開始直後にオ
ペランド値を参照することにより判断できるため、この
仕様が性能に及はず影響は少ない。
Next, embodiments of the present invention based on two basic concepts will be described.
This will be explained below. Note that this embodiment is configured for a floating-point addition/subtraction device conforming to the IEEE754 standard. This device is capable of performing both single precision and double precision operations. Also, only normalized numbers can be used as operands. If a denormalized number operand is entered manually, it is handled in software by a trap routine. Since the occurrence of this trap can be determined by referring to the operand value immediately after the start of the operation, this specification does not affect performance and has little effect.

IEEE754規格における、tit精度データのフォ
ーマットを第3図(a)に、倍精度データのフォーマッ
トを第3図(b)に示す。両図において、Sは符号部、
eは指数部、さらにfは仮数部を示し、記載された数字
は各部のビット数を表す。
The format of tit precision data in the IEEE754 standard is shown in FIG. 3(a), and the format of double precision data is shown in FIG. 3(b). In both figures, S is the sign part,
e indicates an exponent part, f indicates a mantissa part, and the numbers shown indicate the number of bits in each part.

なお指数部は、ケタばき表現を取っている。また、仮数
部は、絶対値と符号により表現されている。
Note that the exponent part is expressed in digits. Further, the mantissa part is expressed by an absolute value and a sign.

データフォーマットと表現された数との対応を、第4図
に示す。第4図(a)は、i、11−精度の対応表であ
り、図(b)は、倍精度の対応表である。
FIG. 4 shows the correspondence between data formats and expressed numbers. FIG. 4(a) is an i, 11-precision correspondence table, and FIG. 4(b) is a double-precision correspondence table.

この様なフォーマットによって、指数部の値はり1精度
ては、0〜255、倍精度では、0〜2゜47になる。
With this format, the exponent value ranges from 0 to 255 in single precision and from 0 to 2°47 in double precision.

単精度正規化数の指数部表現範囲は、1〜254てあり
、倍精度の場合1〜2046である。
The exponent expression range for single precision normalized numbers is 1 to 254, and for double precision it is 1 to 2046.

(7たがって、第2図の加減p装置では、計算結果の指
数部がOより小さくなった時にアンダーフロー例外とな
り、トラップを発生する。
(7) Therefore, in the addition/subtraction p device of FIG. 2, when the exponent part of the calculation result becomes smaller than O, an underflow exception occurs and a trap is generated.

なお、旧算途中において、指数部の値がTI7現化数の
指数部表現範囲を逸脱してもその正確な値がわかるよう
に、演算器内の指数部の表現は、ビット値を拡張した2
の補数データを用いることが多い。
In addition, during the old arithmetic, even if the value of the exponent part deviates from the exponent part expression range of the TI7 present number, the exact value can be found, so that the representation of the exponent part in the arithmetic unit expands the bit value. 2
Complement data is often used.

第1図に、本発明の一実施例にかかる例外発生予測回路
を示す。図示のようにこの回路222は、後述する所定
の信号の入力によって定数を発生する定数回路101、
第2図に示した指数部中間し一果210を入力とする符
号拡張回路102、および定数回路101と符号拡張回
路102の出力を比較する比較回路10 ’lとから構
成されている。
FIG. 1 shows an exception occurrence prediction circuit according to an embodiment of the present invention. As shown in the figure, this circuit 222 includes a constant circuit 101 that generates a constant by inputting a predetermined signal, which will be described later;
It is comprised of a sign extension circuit 102 which receives the exponent intermediate result 210 shown in FIG.

この比較回路103は、アンダーフロー例外発生”I’
−fllり信号223を発生する。
This comparison circuit 103 detects the occurrence of an underflow exception “I”.
-Fll signal 223 is generated.

この予測回路222は、単精度および倍精度演 Q 算の双方に対応する必要があるので、回路内で指数部中
間結果210を同一ビット幅のデータ109に変換して
扱う必要がある。そのために、単精度の場合入力値21
0を符号拡張l−倍精度演呻時と同一のビット幅データ
に変換する必要がある。
Since this prediction circuit 222 needs to be compatible with both single-precision and double-precision arithmetic operations, it is necessary to convert the exponent part intermediate result 210 into data 109 of the same bit width and handle it within the circuit. For this purpose, for single precision the input value 21
It is necessary to convert 0 into data with the same bit width as in sign-extended l-double precision operation.

符号拡張回路102はこのためのビット幅拡張を行う回
路である。実行中の演算か、)11精度演呻であるか、
倍精度演算であるかは、信号105によって指定される
The sign extension circuit 102 is a circuit that performs bit width extension for this purpose. Is it an operation being executed?) Is it an 11-precision operation?
A signal 105 specifies whether the operation is a double-precision operation.

比較回路103は、信号]09と信号108を比較し、
信号109の値か信号108の値以下である時、アンダ
ーフロー例外発生を予測することを示す信号値を、信号
223として出力する。
Comparison circuit 103 compares signal]09 and signal 108,
When the value of signal 109 is less than or equal to the value of signal 108, a signal value indicating that an underflow exception is predicted to occur is output as signal 223.

定数回路101は、前記信号108を発生ずる回路であ
る。この回路1.01には、倍精度が111.精度かを
指定する信号、ずなわぢ1の時用精度演算を示し、0の
時f1″S精度演算を示す信号1()5と、真の加算か
減算かを指定する信号、すなわち1の防具の加算を示し
、0の防具の減算を示す信号106と、さらに両オペラ
ンド指数の差が2以りがあるいは1以ドであることを指
定する信号、ずなわぢ1の詩画オペランドの指数の差が
2以」二である事を示し、0の詩画オペランドの指数の
差が1以下であることを示す信号]07がそれぞれ人力
される。
Constant circuit 101 is a circuit that generates the signal 108. This circuit 1.01 has a double precision of 111. A signal that specifies whether it is accurate, a signal that indicates the time precision operation of Zunawaji1, and a signal that indicates f1''S precision operation when it is 0 (1()5), and a signal that specifies whether it is true addition or subtraction, that is, the signal of 1. A signal 106 indicating addition of armor and subtraction of armor of 0, and a signal specifying that the difference between both operand exponents is 2 or more or 1 or more, an exponent of the poetry operand of Zunawaji 1. A signal indicating that the difference between the indices is 2 or more, and a signal indicating that the difference between the exponents of the 0 poetic operands is 1 or less]07 are manually input.

第5図は、両オペランドの状態を示す前記各信号1−0
5. 106、および107によって定数回路101が
との様な定数を発生ずるかを示す表である。すなわち定
数回路1.01は、jll、精度、倍精度にかかわらず
、信号106によって真の加算が実行されるものと判断
された場合は定数0を発生し、単精度、倍精度にかかわ
らず信号106によって真の減算か実行され、さらに両
オペランドの指数の差が2以上である場合には定数1を
発生し、単精度演算であって信号106により真の減算
でありまた信号107によって両オペラン!・の指数の
差が1以下である場合には定数24を発生し、さらに倍
精度演算であって信号106によって真の減呻てありま
た信号107によって両オペランドの指数の差か1以下
であると判断される場合は定数53を発!1する。これ
らの各定数は、−1一連(またように比較回路103に
おい′C信号1 (,19、ずなわち初号拡張された最
大オペランド指数部の値を示す信号と比較され、信号1
09かこれらの定数よりも小さい場合はアシ・ダーツロ
ー例夕Iの発11を′f−4illするものと判断され
る。
FIG. 5 shows the respective signals 1-0 indicating the states of both operands.
5. This is a table showing how the constant circuit 101 generates constants such as 106 and 107. In other words, the constant circuit 1.01 generates a constant 0 when it is determined that true addition is to be executed based on the signal 106, regardless of jll, precision, or double precision, and generates a constant 0 regardless of whether the signal is jll, precision, or double precision. True subtraction is performed by signal 106, and a constant 1 is generated if the difference between the exponents of both operands is greater than or equal to 2. !・If the difference between the exponents of the operands is less than or equal to 1, a constant 24 is generated. Furthermore, it is a double-precision operation, and signal 106 indicates the true subtraction, and signal 107 indicates that the difference between the exponents of both operands is less than or equal to 1. If it is determined that this is the case, emit constant 53! Do 1. Each of these constants is compared with a signal representing the value of the initial expanded maximum operand exponent in the comparator circuit 103 as a series of −1 (as in C signal 1 (, 19), i.e., the signal 1
09 or smaller than these constants, it is determined that the start 11 of the reed dart row example I will be 'f-4ill'.

次に、前記第5図に示した各定数の根拠を説明し、本発
明の理解をより明らかにする。
Next, the basis of each constant shown in FIG. 5 will be explained to further clarify the understanding of the present invention.

第2図および前記処理3,4の説明の項で述べたように
、指数部の宿所結果は、指数部中間1t’i果を)l規
化およびiff+1.’、 IJJ、化する時点て、仮
数部のジット i”’T 、i.IE規化における、1iJ能な仮数部
の最大シフト桁数は、第6図に示すようになる。アンダ
ーフロ例夕Iの発イトは、ノIシフト桁数1.:O関係
[7ており、また当然J′!の減算+1.’jのみ問題
となるものである。したかー・て第6図に示す最大左シ
フト桁数から、第5図に示す各状態にλ・1応(−、た
定数を得ることができる,。
As described in FIG. 2 and the description of Processes 3 and 4 above, the lodging result of the exponent part is obtained by normalizing the index part intermediate 1t'i result and iff+1. ', IJJ, the mantissa digit i'''T, i. In IE normalization, the maximum number of digits that can be shifted in the mantissa that can be 1iJ is shown in Figure 6. The origin of I is the number of I shift digits 1.:O relationship [7, and of course only the subtraction of J'!+1.'j is a problem. From the number of left-shift digits, it is possible to obtain constants corresponding to λ·1 for each state shown in FIG.

前述したJうに、前記各定数と信号1 0 (Jとを比
較回路103で比較することによって、アンダーフロー
例外の発生を予測する。次にこのアンダフロー例外の発
生な測を具体例を」二げて説明する。
As mentioned above, the occurrence of an underflow exception is predicted by comparing each of the constants and the signal 10 (J) in the comparison circuit 103.Next, we will give a concrete example of how to predict the occurrence of this underflow exception. and explain.

単精度浮動小数点加減算においてアンダーフロ例外か発
生しない場合、指数部の中間結果は、ゲタばき表現で−
1から254の範囲の値を取る。
If an underflow exception does not occur during single-precision floating-point addition/subtraction, the intermediate result of the exponent part is expressed as −
Takes values in the range 1 to 254.

本発明による例外発生予測回路は、この値から前記定数
24を引いた値か1以上である時、すなわち指数部の中
間結果が25から254の範囲の時、アンダーフロー例
外か発生しないと判断する。また両オペランド指数部の
差か2以」二である場合は、定数か1であるため指数部
の中間結果が2から254の範囲の値の時、アンダーフ
ロー例外が発生しないと判断する。さらに、真の加算を
行っているときは、指数部の中間結果が1〜254の範
囲のとき、アンダーフロー例外が発生l−ないと判断す
る。
The exception occurrence prediction circuit according to the present invention determines that an underflow exception will not occur when the value obtained by subtracting the constant 24 from this value is greater than or equal to 1, that is, when the intermediate result of the exponent part is in the range of 25 to 254. . Further, if the difference between the exponent parts of both operands is 2 or more, it is determined that an underflow exception will not occur when the intermediate result of the exponent part is a value in the range of 2 to 254 because it is a constant or 1. Furthermore, when performing true addition, if the intermediate result of the exponent part is in the range of 1 to 254, it is determined that no underflow exception has occurred.

また、倍精度浮動小数点加減算においてアンダフロー例
外か発生1,ない場合、指数部の中間結2′−3 宋14、ゲタばき表現で− 1から2046の範囲の値
をとる。し、たかっ°C本発明の例外発生予測回路では
、定数が53であるので指数部の中間結果か54から2
 f’l 4 6の範囲の値のとき、アンターフロー例
外か発生し7ないと判断する。また両オペランド指数部
の差が2以十゛Cある場合は、定数か1であるので指数
部の中間結果か2から2 0 4 6の範囲の値のとき
アンターフロー例外か発生しないと判断する。さらに真
の加算を行っているときは、指数部の中間結果か1から
2 0 4 6の範囲の値のとき、アンダーフロー例外
が発生しないと判断する。
Also, in double-precision floating-point addition and subtraction, an underflow exception occurs (1), and if not, the intermediate result of the exponent part is 2'-3. However, in the exception occurrence prediction circuit of the present invention, since the constant is 53, the intermediate result of the exponent part is 54 to 2.
When the value is in the range of f'l 4 6, it is determined that an underflow exception has occurred and 7 has not occurred. Also, if the difference between the exponent parts of both operands is 2 or more, it is a constant or 1, so if the intermediate result of the exponent part is a value in the range of 2 to 2 0 4 6, it is determined that an underflow exception will not occur. . Furthermore, when performing true addition, it is determined that an underflow exception will not occur if the intermediate result of the exponent part is a value in the range of 1 to 2 0 4 6.

このようにして、前記アンダーフロー例外発生予測回路
を用いれば、アンダーフロー例外を発生し,ない浮動小
数点演算を行った場合のその大部分のケースについて、
演算の早期に例夕1が発/1しないと判断てきる。その
ためこの場合には第7図( b )に示す命令実行制御
を行っ一C1処理スビドを上げることか可能である。一
方この回路でアンダーフロー例夕1の発生が予測された
場合のみ、第7図(C)に示すような待ち合わせ制御に
よる命令の実行を行う。このようにすることによって、
全体とl〜でブロセッザの命令実行制御の効率を大幅に
改善することかできる。
In this way, by using the underflow exception occurrence prediction circuit, in most cases when floating point operations are performed that do not generate an underflow exception,
It is determined early in the calculation that example 1 does not occur/1. Therefore, in this case, it is possible to perform the instruction execution control shown in FIG. 7(b) to increase the processing speed per C1. On the other hand, only when the occurrence of underflow example No. 1 is predicted in this circuit, an instruction is executed by waiting control as shown in FIG. 7(C). By doing this,
Overall, the efficiency of instruction execution control of the processor can be greatly improved.

[発明の効果] 以−に、実施例を挙げて詳細に説明したように、本発明
によるアンダーフロー例外発生′r−測回路では、アン
ダーフロー例外の発生しない浮動小数点加減算を行った
場合、その大部分のケースにり・1して、早期に例外か
発生しないと判断てきる。そのため、この回路を使用し
たブロセッザでは、効率の良い命令実行制御が11能と
なる。
[Effects of the Invention] As described in detail below with reference to embodiments, the underflow exception occurrence 'r-detection circuit according to the present invention can perform floating-point addition/subtraction without causing an underflow exception. In most cases, it is determined early on that an exception will not occur. Therefore, a processor using this circuit can perform efficient instruction execution control.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例にかかるアンダーフロー例外
発生予測回路のブロック図、 第2図は第1図に示す回路と一般のt7動小数点加減算
装置との接続関係を示す図、 第3図および第4図はIEEE規格におけるンデ動小数
点データのフォーマツ!・を示す図、第5図は第1図の
回路において発生される定数を示す図、 第6図は正規化および再正規化における仮数部の最大シ
フト桁数を示す図、 第7図はトラップルーチンで例外処理を行う11!iの
命令実行制御を説明する為の図である。 101・・・定数発生回路 102・・・符号拡張回路
103・・比較回路
1 is a block diagram of an underflow exception occurrence prediction circuit according to an embodiment of the present invention; FIG. 2 is a diagram showing the connection relationship between the circuit shown in FIG. 1 and a general t7 dynamic point addition/subtraction device; The figure and Figure 4 are the format of dynamic point data according to the IEEE standard! Figure 5 is a diagram showing the constants generated in the circuit of Figure 1, Figure 6 is a diagram showing the maximum number of shift digits of the mantissa during normalization and renormalization, and Figure 7 is a diagram showing the trap. Handling exceptions in routines 11! FIG. 3 is a diagram for explaining instruction execution control of i. 101...Constant generation circuit 102...Sign extension circuit 103...Comparison circuit

Claims (1)

【特許請求の範囲】 第1、第2オペランドの浮動小数点加減算を実行するに
あたって選択された最大オペランド指数部に対して行わ
れる正規化処理で、該指数部から減算される可能性のあ
る最大数を、真の加算を行うか否かを示す信号と単精度
演算であるか倍精度演算であるかを示す信号と前記第1
、第2オペランドの指数部の差が2以上であるか否かを
示す信号とに応じて定数として発生する定数発生手段と
、該定数発生手段により生成された定数値と前記第1、
第2オペランドの浮動小数点加減算の算出途中で選択さ
れる最大指数部の値とを比較する比較手段、 とを備え、前記比較結果に応じてアンダーフロー例外発
生を予測する信号を出力することを特徴とする浮動小数
点加減算のアンダーフロー例外発生予測回路。
[Claims] The maximum number that may be subtracted from the exponent part in the normalization process performed on the maximum operand exponent part selected when executing floating point addition/subtraction of the first and second operands. , a signal indicating whether true addition is to be performed, a signal indicating whether it is a single-precision operation or a double-precision operation, and the first
, a constant generating means that generates a constant in response to a signal indicating whether the difference between the exponent parts of the second operand is 2 or more, and a constant value generated by the constant generating means and the first;
Comparing means for comparing the value of the maximum exponent part selected during the calculation of floating point addition/subtraction of the second operand, and outputting a signal predicting the occurrence of an underflow exception according to the comparison result. Underflow exception prediction circuit for floating-point addition and subtraction.
JP2181590A 1990-07-11 1990-07-11 Underflow exception generation predicting circuit for floating point addition/subtraction Pending JPH0469734A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2181590A JPH0469734A (en) 1990-07-11 1990-07-11 Underflow exception generation predicting circuit for floating point addition/subtraction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2181590A JPH0469734A (en) 1990-07-11 1990-07-11 Underflow exception generation predicting circuit for floating point addition/subtraction

Publications (1)

Publication Number Publication Date
JPH0469734A true JPH0469734A (en) 1992-03-04

Family

ID=16103472

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2181590A Pending JPH0469734A (en) 1990-07-11 1990-07-11 Underflow exception generation predicting circuit for floating point addition/subtraction

Country Status (1)

Country Link
JP (1) JPH0469734A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07105025A (en) * 1993-09-20 1995-04-21 Internatl Business Mach Corp <Ibm> Method and system for selective save
JP2012043479A (en) * 2006-09-22 2012-03-01 Intel Corp Execution of rounding operations corresponding to instruction

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07105025A (en) * 1993-09-20 1995-04-21 Internatl Business Mach Corp <Ibm> Method and system for selective save
JP2012043479A (en) * 2006-09-22 2012-03-01 Intel Corp Execution of rounding operations corresponding to instruction

Similar Documents

Publication Publication Date Title
JP4938844B2 (en) Mode-based multiply-add processor for denormalized operands
US5886915A (en) Method and apparatus for trading performance for precision when processing denormal numbers in a computer system
KR100239029B1 (en) Result normalizer and method of operation
JP4953644B2 (en) System and method for a floating point unit providing feedback prior to normalization and rounding
US6108772A (en) Method and apparatus for supporting multiple floating point processing models
JPH10207693A (en) Floating point arithmetic unit
US8166092B2 (en) Arithmetic device for performing division or square root operation of floating point number and arithmetic method therefor
Schwarz et al. FPU implementations with denormalized numbers
US5943249A (en) Method and apparatus to perform pipelined denormalization of floating-point results
US5247471A (en) Radix aligner for floating point addition and subtraction
Boersma et al. The POWER7 binary floating-point unit
JPH09212337A (en) Floating-point arithmetic processor
US20050223055A1 (en) Method and apparatus to correct leading one prediction
US5768169A (en) Method and apparatus for improved processing of numeric applications in the presence of subnormal numbers in a computer system
US8620983B2 (en) Leading sign digit predictor for floating point near subtractor
GB2549153B (en) Apparatus and method for supporting a conversion instruction
US6154760A (en) Instruction to normalize redundantly encoded floating point numbers
US8041927B2 (en) Processor apparatus and method of processing multiple data by single instructions
JPH0469734A (en) Underflow exception generation predicting circuit for floating point addition/subtraction
US6615228B1 (en) Selection based rounding system and method for floating point operations
US20020178199A1 (en) Floating point status information testing circuit
EP0837390A1 (en) Improvements in or relating to microprocessor integrated circuits
JPH03278124A (en) Exceptive generation predicting circuit for floating point calculation
JP3229057B2 (en) Exception handling device
GB2617436A (en) Chained multiply accumulate using an unrounded product