JPH01232422A - Arithmetic circuit - Google Patents

Arithmetic circuit

Info

Publication number
JPH01232422A
JPH01232422A JP63058825A JP5882588A JPH01232422A JP H01232422 A JPH01232422 A JP H01232422A JP 63058825 A JP63058825 A JP 63058825A JP 5882588 A JP5882588 A JP 5882588A JP H01232422 A JPH01232422 A JP H01232422A
Authority
JP
Japan
Prior art keywords
mantissa
rounding
normalization
bits
mantissa part
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
Application number
JP63058825A
Other languages
Japanese (ja)
Other versions
JP2555135B2 (en
Inventor
Akira Katsuno
昭 勝野
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP63058825A priority Critical patent/JP2555135B2/en
Publication of JPH01232422A publication Critical patent/JPH01232422A/en
Application granted granted Critical
Publication of JP2555135B2 publication Critical patent/JP2555135B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To reduce delay and to shorten an arithmetic time and to speed up processing by carrying out normalization and rounding processing in parallel in consideration of added bits. CONSTITUTION:When the quantity of shifting of normalization based upon the arithmetic result of a mantissa part part exceeds the number of added bits, a 1st execution means 19 consisting of a shifter 13, a primary encoder 15, and a LSB circuit 17 shifts the mantissa part and rounds the least significant digit bit of the mantissa part in parallel, and puts them together in one. When the quantity of shifting of normalization is less than the number of the added bits, a 2nd execution part 58 consisting of a LSB adding circuit 31, a rounding circuit 32, and a selector 33 sets the digit movement of the mantissa part caused by the rounding processing previously as the processing result of the rounding and selects one of them. In this case, the rounding process and mantissa part shifting are carried out in parallel. Thus, the normalization and rounding are processed in parallel, so the arithmetic speed is improved.

Description

【発明の詳細な説明】 〔目 次〕 概要 産業上の利用分野 従来の技術        (第5.6図)発明が解決
しようとする課題 課題を解決するための手段 作用 実施例 本発明の一実施例    (第1〜4図)発明の効果 〔(既  要〕 浮動小数表記法の数値について演算を行う演算回路に関
し、 演算処理を高速化できる演算回路を提供することを目的
とし、 指数部と仮数部により表される浮動小数点表記法により
2つの数の演算を行うとともに、仮数部の下桁に所定数
の付加ビットを有し、仮数部の演算結果に応じて正規化
および丸めの処理を行う演算回路において、仮数部の演
算結果に基づく正規化のシフト量が前記付加ビット数を
超えるとき、仮数部のシフト化を行うとともに、仮数部
の最下位ビア)についての丸めを並行して処理し、両者
を合成する第1の実行手段と、仮数部の演算結果に基づ
き前記付加物ビット数の範囲内で正規化のために仮数部
をシフトするシフト手段と、仮数部の演算結果に基づく
正規化のシフト量が前記付加ビット以下であるとき、丸
めの処理によって生じる仮数部の桁移動を各態様毎に、
丸めの処理結果として予め設定し、そのうちから1つを
選択する第2の実行手段と、仮数部の演算結果に基づく
正規化のシフト量が前記付加ピントを超えるか否かによ
り、第1の実行手段又は第2の実行手段の出力を択一的
に選択する選択手段とにより構成する。
[Detailed Description of the Invention] [Table of Contents] Overview Industrial Application Fields Prior Art (Figure 5.6) Problems to be Solved by the Invention Examples of Means and Actions for Solving the Problems One Embodiment of the Present Invention (Figures 1 to 4) Effects of the invention [(already required)] The purpose of this invention is to provide an arithmetic circuit that can speed up arithmetic processing with respect to an arithmetic circuit that performs arithmetic operations on numerical values in floating point notation. An operation that performs operations on two numbers using the floating-point notation represented by In the circuit, when the shift amount of normalization based on the operation result of the mantissa part exceeds the number of additional bits, the mantissa part is shifted, and rounding for the lowest via of the mantissa part is processed in parallel, a first execution means for synthesizing both; a shifting means for shifting the mantissa for normalization within the range of the number of appendage bits based on the result of the operation of the mantissa; and normalization based on the result of the operation of the mantissa. When the shift amount is less than or equal to the additional bits, the digit shift of the mantissa caused by rounding is calculated for each aspect as follows:
a second execution means that selects one of the results set in advance as a result of rounding processing; and a first execution means that determines whether or not the shift amount of normalization based on the calculation result of the mantissa exceeds the additional focus. and a selection means for alternatively selecting the output of the first execution means or the second execution means.

〔産業上の利用分野〕[Industrial application field]

本発明は、演算回′路に係り、詳しくは浮動小数点表記
法の数値について演算を行う演算回路に関する。
The present invention relates to an arithmetic circuit, and more particularly to an arithmetic circuit that performs arithmetic operations on numerical values in floating point notation.

固定小数点表現では、表現できる数の範囲が狭いため非
常に大きな数を表すことができない。また、固定小数点
表現は通常整数のみを扱うことが多く、したがって科学
技術計算などに必要な実数を表すための表記法が別に必
要となる。このようなことから、仮数と指数と呼ばれる
2つの数を組み合わせた浮動小数点表記法(float
ing point representation)
が考察された。
Fixed-point representation cannot represent very large numbers because the range of numbers that can be represented is narrow. Furthermore, fixed-point representation usually handles only integers, and therefore a separate notation is required to represent real numbers necessary for scientific and technical calculations. For this reason, floating point notation (float) is a combination of two numbers called mantissa and exponent.
ing point representation)
was considered.

−殻内な浮動小数点数は、基数(radix)がRのと
き、次のように示される。
- A floating point number in a shell, when the radix is R, is shown as follows.

(−1)’  ・m−R′′ ここに、Sは符号(sign)で、正のとき5=O1負
のときs=1である。また、mとeはそれぞれ仮数(m
antissa)、指数(exponen t)であり
、これらを固定小数点で表したものを組み合わせたもの
がコンピュータ内の浮動小数点表現である。なお、浮動
小数点表現では、仮数mの長さが有効けたの長さを決め
るので、精度の良い数値を必要とする場合は、仮数部の
長さを大きくした表現が用いられる。
(-1)'·m-R'' Here, S is a sign; when positive, 5=O1; when negative, s=1. Also, m and e are the mantissas (m
The floating point representation in a computer is a combination of fixed point representations. Note that in floating point representation, the length of the mantissa m determines the length of the effective digit, so if a highly accurate numerical value is required, a representation with a larger mantissa length is used.

このような浮動小数点演算は、整数演算と比べ、グイナ
ミソクレンジが広く精度も高い、特に、近時は各種の高
度な演算要求に沿うように高速のものが求められる傾向
にある。
Such floating-point operations have a wider range and higher precision than integer operations, and in recent years, there has been a trend in which high-speed operations are required to meet various advanced calculation requirements.

(従来の技術〕 現在、最も広く使われている2進の浮動小数点規格は、
TEEE、DEC,IBM、MIL−3t d  17
50Aの四である。いずれも単精度の浮動小数点を32
ビツトの語長で表している。いずれの規格も倍精度デー
タをサポートしており、なかには拡張形式の単精度や拡
張形式の倍精度など他のデータの形式をサポートしてい
るものもある。このうち、I EEEの作業グループは
、ANSI/IEEE  Std  754−1985
(規格書)(最終規格として1985年規格化された。
(Prior art) Currently, the most widely used binary floating point standard is
TEEE, DEC, IBM, MIL-3t d 17
It is 4 of 50A. Both are single-precision floating point numbers of 32
It is expressed in terms of word length in bits. All standards support double-precision data, and some also support other data formats, such as extended single-precision and extended double-precision. Among these, the IEEE working group is responsible for the ANSI/IEEE Std 754-1985
(Standards) (Standardized as the final standard in 1985.

)に示す仕様を、移植性の高い浮動小数点ソフト用の強
力な規格として提案している。この規格提案は広い支持
を受けており、全後作られるハードウェアの大部分の基
本になっていくと考えられる。
) is proposed as a powerful standard for highly portable floating-point software. This proposed standard has received wide support and is likely to become the basis for much of the hardware subsequently created.

従来のこの種のI EEEの浮動小数点フォーマットに
よる演算回路としては、例えば第5図に示すようなもの
がある。本例は、2を基数とする2つの人力数(入力デ
ータ)について正規化数同士あるいは正規化数でも非正
規化数同士のでも可の加算を行う例であり、特に第5図
は加算処理のうちアダーによる仮数部の加算が終了し、
仮数部パイプラインレジスタIに格納された後のブロッ
ク図を示している。なお、2は指数部のレジスタである
。また、同図中符号ピントの演算は省略している。第5
図に基づきボストノーマライズ(正規化)およびラウン
ド(丸め)の動作を述べる。
An example of a conventional arithmetic circuit according to this type of IEEE floating point format is shown in FIG. This example is an example of adding normalized numbers to each other or normalized numbers or non-normalized numbers for two manual numbers (input data) with base 2. In particular, Figure 5 shows the addition process. The addition of the mantissa part by the adder is completed,
A block diagram after the mantissa is stored in the pipeline register I is shown. Note that 2 is a register for the exponent part. In addition, the calculation of the code focus in the figure is omitted. Fifth
The operations of bost normalization (normalization) and rounding (rounding) will be described based on the figure.

なお、正規化とは仮数部の最上位桁が”0”にならない
ようにすることであり、また丸めとは演算結果が所定の
桁数を超えて格納できない場合に、下位のあふれた部分
を切り捨て等の方法によって処理、すなわち丸めること
である。丸めの方法により累積誤差が大きく影口を受け
る可能性があるので、近傍の値に向って丸める、Oに向
って丸める等の方法がある。パイプラインレジスタ1に
格納されるデータの形式は第6図のように示され、主な
記号の意味は次の通りである。
Note that normalization means to prevent the most significant digit of the mantissa from becoming "0", and rounding means to prevent the most significant digit of the mantissa from becoming "0", and rounding means to round off the overflowing lower part when the calculation result exceeds a predetermined number of digits and cannot be stored. Processing, ie, rounding, by methods such as truncation. Depending on the rounding method, there is a possibility that the cumulative error will be significantly affected, so there are methods such as rounding toward a neighboring value or toward O. The format of the data stored in the pipeline register 1 is shown in FIG. 6, and the meanings of the main symbols are as follows.

V:仮数部のオーバフロービット G:ガードビット R:ラウンドビ、7ト S;ステイアキビ、ト いま、ボストノーマライズではV=φかつN−1になる
ように仮数部をシフトする操作が必要である。まず、プ
ライオリティエンコーダ(P E)3で■ビットから連
続する“φ”の数をカウントし、その値をシフタ(sh
ifter)  4に送るとともに、指数部の加算器(
adder)  5にも入力する。そして、シフタ4で
必要なビットだけシフトすることによってボストノーマ
ライズは終了する。
V: overflow bit of mantissa part G: guard bit R: round bit, 7 to S: stay-open bit, to Now, in boss normalization, it is necessary to shift the mantissa part so that V=φ and N-1. First, the priority encoder (PE) 3 counts the number of consecutive "φ" from the ■ bit, and the value is sent to the shifter (sh
ifter) 4 and sends it to the exponent part adder (
adder) 5 as well. Then, the shifter 4 shifts only the necessary bits, thereby completing the boss normalization.

次に、ラウンドを行う。ラウンドはラウンド回路6によ
りRビットを必要に応じて切り捨て、あるいは切り上げ
することによって実行される。このとき、仮数部のデー
タが例えば〔1・11〜110〕でR=1であるとする
と、オーバーフローが生じるため再びlビットだけ右に
シフトし、かつ加算器5で“1”をプラスする必要があ
る。ラウンドが終了した後の仮数部のデータは出力側の
レジスタ7に格納され、同様に指数部のデータはレジス
タ8に格納される。
Next, do a round. The round is executed by the round circuit 6 by rounding down or rounding up the R bits as necessary. At this time, if the data in the mantissa is, for example, [1.11 to 110] and R = 1, an overflow will occur, so it is necessary to shift it to the right again by l bits and add "1" in adder 5. There is. After the round ends, the mantissa data is stored in the register 7 on the output side, and similarly the exponent data is stored in the register 8.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

しかしながら、このような従来の演算回路にあっては、
正規化の後にラウンドを行う構成となっていたため、全
体の演算処理時間が長く、近時の高速化要求に沿い難い
という問題点があった。
However, in such conventional arithmetic circuits,
Since the round is performed after normalization, the overall calculation processing time is long, making it difficult to meet the recent demands for higher speeds.

そこで本発明は、演算処理を高速化できる演算回路を提
供することを目的としている。
Therefore, an object of the present invention is to provide an arithmetic circuit that can speed up arithmetic processing.

〔課題を解決するための手段〕[Means to solve the problem]

本発明による演算回路は上記目的達成のため、指数部と
仮数部により表される浮動小数点表記法により2つの数
の演算を行うとともに、仮数部の下桁に所定数の付加ビ
ットを有し、仮数部の演算結果に応じて正規化および丸
めの処理を行う演算回路において、仮数部の演算結果に
基づく正規化のシフト量が前記付加ビット数を超えると
き、仮数部のシフト化を行うとともに、仮数部の最下位
ビットについての丸めを並行して処理し、両者を合成す
る第1の実行手段と、仮数部の演算結果に基づき前記付
加物ビット数の範囲内で正規化のために仮数部をシフト
するシフト手段と、仮数部の演算結果に基づく正規化の
シフト量が前記付加ビット以下であるとき、丸めの処理
によって生しる仮数部の桁移動を各態様毎に、丸めの処
理結果として予め設定し、そのうちから1つを選択する
第2の実行手段と、仮数部の演算結果に基づく正規化の
シフト量が前記付加ビットを超えるが否かにより、第1
の実行手段又は第2の実行手段の出力を択一的に選択す
る選択手段とを設けている。
In order to achieve the above object, the arithmetic circuit according to the present invention operates on two numbers using floating point notation represented by an exponent part and a mantissa part, and has a predetermined number of additional bits in the lower digits of the mantissa part. In an arithmetic circuit that performs normalization and rounding processing according to a calculation result of a mantissa part, when a shift amount of normalization based on a calculation result of a mantissa part exceeds the number of additional bits, the mantissa part is shifted and, a first execution means for processing the least significant bit of the mantissa part in parallel and composing the two; and a shift means for shifting the mantissa, and when the shift amount of normalization based on the operation result of the mantissa is equal to or less than the additional bits, the digit shift of the mantissa caused by the rounding process is calculated by the rounding process result. and a second execution means that selects one of them in advance, and a second execution means that selects one of them;
and a selection means for selectively selecting the output of the execution means or the output of the second execution means.

〔作 用〕[For production]

本発明では、仮数部の演算結果に基づく正規化のシフ1
ffiが付加ビット数を超えるときは、正規化のための
仮数部のシフトおよび最下位ビットについて、丸め処理
が平行して行われる。一方、上記正規化のシフト量が付
加ビット以下のときは丸めの処理によって生じる仮数部
の桁移動が各態様毎に予め設定され、そのうちから該当
する1つが選択される。この場合も丸めと仮数部シフト
は並行して実行される。
In the present invention, the normalization shift 1 based on the calculation result of the mantissa
When ffi exceeds the number of additional bits, shifting of the mantissa for normalization and rounding of the least significant bit are performed in parallel. On the other hand, when the normalization shift amount is less than or equal to the additional bits, the digit shift of the mantissa caused by the rounding process is set in advance for each aspect, and one of them is selected. In this case as well, rounding and mantissa shifting are performed in parallel.

したがって、逐次処理と異なり、正規化と丸めを並列処
理するため、演算スピードが格段と向上する。
Therefore, unlike sequential processing, normalization and rounding are processed in parallel, so calculation speed is significantly improved.

〔実施例〕〔Example〕

以下、本発明を図面に基づいて説明する。 Hereinafter, the present invention will be explained based on the drawings.

第1〜4図は本発明に係る演算回路の一実施例を示す図
である。第1図は仮数部の加算が終了し、その後のラウ
ンド処理等を行う演算ブロックを示す図である。まず、
構成を説明する。第1図において、11はレジスタであ
り、例えばパイプラインレジスタからなり、図中に示す
配列の28ビツトのデータを格納し、そのうちLSBの
さらに下位側にはGSR,Sの3つのビット(付加ビッ
ト)を有しており、これは従来と同様である。12は符
号レジスタであり、符号レジスタ12はデータの正、負
を表す。1ビツトの符号のデータ(SGN)を格納・す
る。例えば“0”が正を、“1”が負を表す。
1 to 4 are diagrams showing one embodiment of an arithmetic circuit according to the present invention. FIG. 1 is a diagram showing a calculation block that performs subsequent round processing after the addition of the mantissa part is completed. first,
Explain the configuration. In Fig. 1, numeral 11 is a register, for example, a pipeline register, which stores 28 bits of data in the arrangement shown in the figure, of which 3 bits GSR and S (additional bits) are placed on the lower side of the LSB. ), which is the same as before. 12 is a sign register, and the sign register 12 represents positive and negative data. Stores 1-bit code data (SGN). For example, "0" represents positive, and "1" represents negative.

レジスタ11の出力は28ビツトで取り出され、シフタ
13.14、プライオリティエンコーダPE154ビツ
トプライオリテイエンコーダ(4bPE)16およびL
SB回路17に入力される。プライオリティエンコーダ
PE15はVビットがら連続する“0”の数をカウント
し、その値をシフタ13に送るとともに、図示していな
い指数部加算器(EXPで表す)へ送る。シフタ13は
28ビツトの仮数部のうちSを除<27ビツト分につき
プライオリティエンコーダPE15からの出力に基づい
てシフト操作を行い、シフト後の23ビツトのデータを
セレクタ18に送る。LSB回路17はレジスタ11の
28ビツトデータのうちV、NI 、NZ 、N3およ
びSビットの5つのデータからモード(mode)要求
RP、RMに基づいてLSBを決定するもので、詳細な
回路は第2図のように示される。
The output of register 11 is taken out in 28 bits and is passed through shifter 13,14, priority encoder PE15, 4-bit priority encoder (4bPE) 16 and L
The signal is input to the SB circuit 17. The priority encoder PE15 counts the number of consecutive "0"s from the V bits and sends the value to the shifter 13 as well as to an exponent adder (not shown) (represented by EXP). The shifter 13 performs a shift operation based on the output from the priority encoder PE15 for S<27 bits of the 28-bit mantissa, and sends the shifted 23-bit data to the selector 18. The LSB circuit 17 determines the LSB based on the mode requests RP and RM from the 5 data of the V, NI, NZ, N3, and S bits out of the 28-bit data in the register 11. It is shown in Figure 2.

すなわち、第2図に示すようにLSB回路17はV、N
I、N2、N3の各ビットの入力されるノアゲート21
と、モードRM、SビットおよびSGNの入力されるオ
アゲート22aと、Sビットを反転させるインバータ2
2bと、モードRP、SビットおよびSGNの反転信号
の入力されるオアゲート22Cと、オアゲート22aと
オアゲート22cとのナンドを求めるナントゲート23
aと、ナントゲート23aとナントゲート21とのアン
ドを求めるアンドゲート23bとにより構成され、LS
Bの決定は具体的には別表のように示され、決定後のL
S、Bを示す1ビツトデータはセレクタ18に入力され
る。
That is, as shown in FIG. 2, the LSB circuit 17 has V, N
NOR gate 21 to which each bit of I, N2, and N3 is input
, an OR gate 22a to which the mode RM, S bit and SGN are input, and an inverter 2 for inverting the S bit.
2b, an OR gate 22C to which the inverted signals of mode RP, S bit, and SGN are input, and a Nante gate 23 for calculating the NAND of the OR gate 22a and the OR gate 22c.
LS
The decision of B is specifically shown in the attached table, and L after the decision is made.
1-bit data indicating S and B is input to the selector 18.

上記シフタ13、プライオリティエンコーダ15および
LSB回路17は全体として第1の実行手段19を構成
する。
The shifter 13, priority encoder 15 and LSB circuit 17 collectively constitute a first execution means 19.

4ビツトプライオリテイエンコーダ16はレジスタrl
ノ28ヒソトテータノう?)V、Nr 、Nz 、Ns
の4ビツトについて■ビットから連続する“0”の数を
カウントし、その値をシフタ14に送るもので、具体的
回路は第3図のように示される。すなわち、第3図に示
すように4ピントプライオリテイエンコーダ16は少な
くとも一つ以上のローアクティブ端子を有するゲート2
4〜26からなり、■ビットから連続する“0”の値に
応じて、R1:右1ビツトシフト R2:シフトなし り、:左1ビツトシフト L2 :左2ビツトシフト の4つの状態を決定してシフト要求をシフタ14に送る
とともに、このシフト要求を指数部加算器へ送る。シフ
タ14は4ビツトプライオリテイエンコーダ16からの
シフト要求に従ってレジスタ11からの28ビツトデー
クを所定量だけシフトさせ、シフト後のデータをLSB
加算回路31、ラウンド回路32およびセレクタ33に
送る。上記シフタ14および4ビツトプライオリテイエ
ンコーダ16はシフト手段27を構成する。
4-bit priority encoder 16 is in register rl
ノ28Hisototetano? )V, Nr, Nz, Ns
The system counts the number of consecutive "0"s starting from the (2) bit for the four bits, and sends that value to the shifter 14.A specific circuit is shown in FIG. That is, as shown in FIG. 3, the 4-pin priority encoder 16 has a gate 2 having at least one low active terminal.
4 to 26, and depending on the value of "0" consecutive from the ■ bit, the following four states are determined and a shift request is made: R1: 1-bit shift to the right, R2: No shift, L2: 1-bit shift to the left, L2: 2-bit shift to the left. is sent to the shifter 14, and this shift request is sent to the exponent adder. The shifter 14 shifts the 28-bit data from the register 11 by a predetermined amount in accordance with a shift request from the 4-bit priority encoder 16, and converts the shifted data into the LSB.
It is sent to an adder circuit 31, a round circuit 32 and a selector 33. The shifter 14 and the 4-bit priority encoder 16 constitute a shift means 27.

LSB加算回路31はシフタ14により送られたシフト
後のデータに対して予め“1”をインクリメントしてお
くもので、インクリメント後のデータは24ビツトでセ
レクタ33に送られるとともに、そのオーバーフロー信
号OVFは指数部分加算器に送られる。また、ラウンド
回路32はレジスタ11からの4ビツトデータ、すなわ
ちLSB、G’、R’S’(ダッシュはシフト後のデー
タを表す)および符号レジスタ12からの符号ビットS
GNからモード要求RN、RP、RM、RZに基づいて
ラウンド処理を行うもので具体的な回路は第4図のよう
に示される。すなわち、第4図において、ラウンド回路
32は少なくとも1つ以上のローアクティブ端子を有す
るゲート41〜46と、オアゲート47〜50と、イン
バータ51と、アンドゲート52〜56とにより構成さ
れ、ラウンド処理は別表のように示され、切り捨てかL
SBに+1を加算の何れかが実行され、ラウンド回路3
2からの出力2ビツトは、セレクタ33の制御信号であ
り、G、Rビットには何ら関係はないセレクタ33に送
られる。
The LSB adder circuit 31 increments the shifted data sent by the shifter 14 by "1" in advance, and the incremented data is sent to the selector 33 in 24 bits, and its overflow signal OVF is Sent to exponent part adder. The round circuit 32 also receives 4-bit data from the register 11, namely LSB, G', R'S' (dashes represent shifted data) and the sign bit S from the sign register 12.
A specific circuit for performing round processing based on mode requests RN, RP, RM, and RZ from GN is shown in FIG. That is, in FIG. 4, the round circuit 32 includes gates 41 to 46 having at least one low active terminal, OR gates 47 to 50, an inverter 51, and AND gates 52 to 56. It is shown as in the attached table, and is rounded down to L.
Either adding +1 to SB is executed, and round circuit 3
The 2 bits output from 2 are a control signal for the selector 33, and are sent to the selector 33, which has no relation to the G and R bits.

セレクタ18にはシフタ14からの上位24ビツトデー
タおよびLSB加算回路31からの24ビツトデータが
入力されており、セレクタ33はラウンド回路32から
の2ビツトデータに基づきLSB加算回路31又はシフ
タ14からのデータを選択してセレクタ18に出力する
。セレクタ18はボストノーマライズラウンドに関する
制御要求に従いシフタ13およびLSB回路17からの
24ビツトデータとを、セレクタ33からの24ビツト
データと択一的に選択し、選択後のデータを出力しレジ
スタ57に送る。出力レジスタ57は第1図に示すよう
に、(1,mz:+、゛・。
The selector 18 receives the upper 24-bit data from the shifter 14 and the 24-bit data from the LSB adder 31, and the selector 33 selects the upper 24-bit data from the LSB adder 31 or the shifter 14 based on the 2-bit data from the round circuit 32. Data is selected and output to the selector 18. The selector 18 selectively selects the 24-bit data from the shifter 13 and the LSB circuit 17 and the 24-bit data from the selector 33 in accordance with the control request regarding the boss normalization round, and outputs the selected data and sends it to the register 57. . As shown in FIG. 1, the output register 57 is (1, mz:+, ゛・.

・・・・・・・・・mz 、m+ )で表わされる正規
化やラウンド処理の終了した24ビツトのデータを格納
するものである。
. . . mz, m+) 24-bit data that has undergone normalization and round processing is stored.

上記LSB加算回路31、ラウンド回路32、セレクタ
33は全体として第2の実行手段58を構成し、セレク
タ18は選択手段を構成する。
The LSB addition circuit 31, round circuit 32, and selector 33 collectively constitute the second execution means 58, and the selector 18 constitutes the selection means.

次に、作用を説明する。Next, the effect will be explained.

本実施例のようにLSBの下位桁に3ビツトを付加して
いるデータでは、この3ビツトのラウンド処理如何によ
ってLSBを含む下位ビットのデータ内容は正規化後で
も左右される。ところが、付加ビットの3ビツトである
から、最大限でも3ビツトはシフトしか行われない。例
えば、ボストノーマライズにおいて、3ビツトを左シフ
ト操作を行う場合、左シフト操作を行った後であれば、
ラウンドを如何なる選択で行っても該ラウンド実行時に
桁上げは生じない。したがって、シフト操作のみでよい
In data in which 3 bits are added to the lower digits of the LSB as in this embodiment, the data content of the lower bits including the LSB is influenced by the round processing of these 3 bits even after normalization. However, since there are 3 additional bits, at most 3 bits can only be shifted. For example, when performing a left shift operation on 3 bits during boss normalization, after performing the left shift operation,
No matter what round is selected, no carry occurs when the round is executed. Therefore, only a shift operation is required.

そこで本実施例では、上記の事実に着目し、3ビツトを
超えるシフトと、3ビツト以内のシフトであってかつラ
ウンド処理を行ったもの(本実施例の全てのラウンド処
理を含む)とを、並列処理で予め演算しておき、その後
、単にセレクタ18によって該当する処理済データを選
択することで、演算処理の時間を短縮している。
Therefore, in this embodiment, focusing on the above fact, shifts of more than 3 bits and shifts of less than 3 bits and subjected to round processing (including all round processing of this embodiment) are as follows: By performing calculations in advance using parallel processing and then simply selecting the corresponding processed data using the selector 18, the time required for calculation processing is shortened.

3ビツトを。えるノーマライズの111合シフト量はプ
ライオリティエンコーダ15によって検出され、シフタ
13によってシフトが行われるとともに、このとき同時
にラウンド処理の要求に基づきLSB回路17によって
LSBの値が決定され、両者が合成されて24ビツトの
データとしてセレクタ18に送られる。そして、セレク
タ18によって上記24ビツトデータがそのまま選択さ
れ、出力レジスタ57に格納される。なお、出力レジス
タ57の格納レジスタにはVビットを含んでおらず、常
にV=Oとなって隠れている。したがって、このように
3ビツトを超えるノーマライズの場合には、ノーマライ
ズとラウンド処理が並列に実行され、その後編成される
のみでよいから、従来と比べ全体の演算処理時間が短く
なり、高速化を図ることができる。
3 bits. The 111 shift amount of normalization is detected by the priority encoder 15, and shifted by the shifter 13. At the same time, the LSB value is determined by the LSB circuit 17 based on the round processing request, and both are combined and The data is sent to the selector 18 as bit data. Then, the 24-bit data is selected as is by the selector 18 and stored in the output register 57. Note that the storage register of the output register 57 does not include the V bit, and is always hidden as V=O. Therefore, in the case of normalization of more than 3 bits, normalization and round processing are executed in parallel, and then it is only necessary to compile them, which shortens the overall processing time compared to the conventional method, resulting in faster processing. be able to.

3ビツトp のノーマライズの1”合 3ビット以内のシフlであるから、まず、レジスタ11
に格納された28ビツトのうちV、 、N、、N2 、
N3について■ビットから連続する“0”の数が4ビツ
トプライオリテイエンコーダ16によってカウントされ
、その値に応じてシフタ14によりレジスタ11からの
Sビットをのぞ<27ビソトデータが予め4ビツト以内
で所定量だけシフトされる。その後、ラウンド処理につ
いて全ての状況を想定した値が予め作成される。具体的
には次の4つのケースが考えられる。
Since the normalization of 3 bits p is 1", the shift l is within 3 bits, so first, register 11
Of the 28 bits stored in , V, , N, , N2 ,
About N3 ■ The number of consecutive "0"s from the bit is counted by the 4-bit priority encoder 16, and according to that value, the shifter 14 selects the S bit from the register 11. Shifted by a fixed amount. Thereafter, values assuming all situations regarding the round process are created in advance. Specifically, the following four cases are possible.

([)V、NI N2 N3 =IXXXのとき但し、
Xはl又はO このときは■=0とするため、1ビット右シフト操作が
必要となる。
([)V, NI N2 N3 = IXXX However,
X is l or O. In this case, ■=0, so a 1-bit right shift operation is required.

(If) VN+ NZ N3 = 01 XXのとき
正規化されているから、シフトなし くIII) V N+ NZ N3 = 001 X1
ビツト左シフトが必要 (TV) VN、 N2 Nff −00012ビツト
左シフトが必要 これらのラウンド処理はモード要求RN、RP、RM、
RZにより別表で示すようにラウンド回路32によって
予め行われ、その後ラウンド回路32の出力に基づいて
セレクタ33によりり、 S Bに+1を加算又は切り
捨ての何れかが選択され、24ビツトのデータがセレク
タ18に出力される。そして、制御要求に従いセレクタ
18によってセレクタ33からの出力データが選択され
て、出力レジスタ57に格納される。
(If) VN+NZ N3 = 01 Since it is normalized when XX, there is no shift III) V N+ NZ N3 = 001 X1
Bit left shift required (TV) VN, N2 Nff -00012 bit left shift required These round processes are mode requests RN, RP, RM,
As shown in the attached table, RZ is performed in advance by the round circuit 32, and then based on the output of the round circuit 32, the selector 33 selects either adding +1 to S B or rounding down, and the 24-bit data is sent to the selector. 18. Then, output data from the selector 33 is selected by the selector 18 in accordance with the control request and stored in the output register 57.

このようなケースでは3ビツト以内のノーマライズであ
るから、シフト量は最大限4ビツト以下に制限されるた
め、その処理は4ピントのロジック回路で済み、かつシ
フト時間も短い。また、ラウンド処理についても予め想
定されるケースを全て設定しておき、その中の1つを選
択するのみでよく、かつ、このラウンド処理を並列配置
したロジック回路で行っている。したがって、従来と異
なり全体の演算処理時間が短くなり、高速化を図ること
ができる。
In such a case, since the normalization is within 3 bits, the shift amount is limited to 4 bits or less at most, so the processing can be performed using a 4-pin logic circuit, and the shift time is short. Further, regarding round processing, all possible cases are set in advance, and only one of them is selected, and this round processing is performed by logic circuits arranged in parallel. Therefore, unlike the conventional method, the overall calculation processing time is shortened, and the processing speed can be increased.

なお、本実施例ではLSBの下桁に付加ビットとしてG
R3の3ビツトを付加した例であるが、付加ビットの数
は3ビツトに限らず、他の数であってもよい。また、ラ
ウンドのモード要求も上記実施例の態様に限らず、他の
例でもよい。また、I EEE規格の単精度の浮動少数
点のデータフォーマットを用いて説明したが、倍精度等
の他の例でもよい。さらに、IBMやDEC形弐等のデ
ータフォーマットでもよい。
Note that in this embodiment, G is added as an additional bit to the lower digit of the LSB.
Although this is an example in which 3 bits of R3 are added, the number of additional bits is not limited to 3 bits, and may be any other number. Furthermore, the round mode request is not limited to the embodiment described above, and may be other examples. Furthermore, although the explanation has been made using a single-precision floating point data format according to the IEEE standard, other examples such as double-precision may also be used. Furthermore, data formats such as IBM and DEC type 2 may also be used.

〔効 果〕〔effect〕

本発明によれば、付加ビットを考慮しつつ正規化と丸め
の処理を並列して実行するようにしているので、遅延を
少なくして演算時間を短縮し、処理の高速化を図ること
ができる。
According to the present invention, since the normalization and rounding processes are executed in parallel while taking additional bits into consideration, it is possible to reduce delay, shorten calculation time, and speed up processing. .

【図面の簡単な説明】 第1〜4図は本発明に係る演算回路の一実施例を示す図
であり、 第1図はその全体ブロック図、 第2図はそのLSB回路の回路図、 第3図はその4ビツトプライオリテイエンコーダの回路
図、 第4図はそのラウンド回路の回路図、 第5.6図は従来の演算回路を示す図であり、第5図は
そのブロック図、 第6図はそのレジスタのデータ形成を示す図である。 11・・・・・・レジスタ、 12・・・・・・符号レジスタ、 13.14・・・・・・シフタ、 I5・・・・・・プライオリティエンコーダ、16・・
・・・・4ビツトプライオリテイエンコーダ、17・・
・・・・LSB回路、 18・・・・・・セレクタ、 19・・・・・・第1の実行手段、 27・・・・・・シフト手段、 57・・・・・・出力レジスタ、 58・・・・・・第2の実行手段。 特許出願人 富士通株式会社1′テ・:別  表 (1
58回路の動作、ラウンド処理)・ ×:“l’or’
φ” ・ 切り捨て:G、R,Sビットを切り捨てる。 ・ LSB  :  ’φ゛→’l’、Ls[lを“φ
”から1″ に変えて、G、R,Sビットを切り捨てる
。 Sビットはノーマライズのソフトとは関係せず、そのま
まの位置を保つ。 第2図 一寅が巳4列の4ピッドブライオ1ノティエンコータあ
口呂蚤昏4第3図 −突施イ列のラウンド匡■各の回路図 第4図 第5図 小数点
[Brief Description of the Drawings] Figures 1 to 4 are diagrams showing one embodiment of the arithmetic circuit according to the present invention. Figure 1 is an overall block diagram thereof, Figure 2 is a circuit diagram of its LSB circuit, Figure 3 is a circuit diagram of the 4-bit priority encoder, Figure 4 is a circuit diagram of its round circuit, Figure 5.6 is a diagram showing a conventional arithmetic circuit, and Figure 5 is its block diagram. The figure shows the data formation of the register. 11...Register, 12...Sign register, 13.14...Shifter, I5...Priority encoder, 16...
...4-bit priority encoder, 17...
... LSB circuit, 18 ... Selector, 19 ... First execution means, 27 ... Shift means, 57 ... Output register, 58 ...Second execution means. Patent applicant Fujitsu Ltd.: Attached table (1)
58 circuit operation, round processing) ×: “l'or”
φ” - Truncation: G, R, S bits are discarded. LSB: 'φ゛→'l', Ls[l is changed to “φ
Change "from 1" and truncate the G, R, and S bits. The S bit is not related to normalization software and maintains its position. Fig. 2 Ichitora ga Sn 4 rows of 4-pit Bryo 1 Noti Encoater Aguro Boku 4 Fig. 3 - Round box of protruding A row ■Each circuit diagram Fig. 4 Fig. 5 Decimal point

Claims (1)

【特許請求の範囲】 指数部と仮数部により表される浮動小数点表記法により
2つの数の演算を行うとともに、仮数部の下桁に所定数
の付加ビットを有し、仮数部の演算結果に応じて正規化
および丸めの処理を行う演算回路において、 仮数部の演算結果に基づく正規化のシフト量が前記付加
ビット数を超えるとき、仮数部のシフト化を行うととも
に、仮数部の最下位ビットについての丸めを並行して処
理し、両者を合成する第1の実行手段と、 仮数部の演算結果に基づき前記付加物ビット数の範囲内
で正規化のために仮数部をシフトするシフト手段と、 仮数部の演算結果に基づく正規化のシフト量が前記付加
ビット以下であるとき、丸めの処理によって生じる仮数
部の桁移動を各態様毎に、丸めの処理結果として予め設
定し、そのうちから1つを選択する第2の実行手段と、 仮数部の演算結果に基づく正規化のシフト量が前記付加
ビットを超えるか否かにより、第1の実行手段又は第2
の実行手段の出力を択一的に選択する選択手段と、 を設けたことを特徴とする演算回路。
[Claims] In addition to performing operations on two numbers using floating point notation represented by an exponent part and a mantissa part, a predetermined number of additional bits are added to the lower digits of the mantissa part, and the result of the operation of the mantissa part is In the arithmetic circuit that performs normalization and rounding processing accordingly, when the shift amount of normalization based on the operation result of the mantissa part exceeds the number of additional bits, the mantissa part is shifted and the least significant bit of the mantissa part is a first execution means for processing the rounding for , in parallel, and composing the two; and a shifting means for shifting the mantissa for normalization within the range of the number of appendage bits based on the operation result of the mantissa. , When the shift amount of normalization based on the operation result of the mantissa part is less than or equal to the additional bit, the digit shift of the mantissa part caused by the rounding process is set in advance as the result of the rounding process for each aspect, and one of them is set as the result of the rounding process. a second execution means that selects the first execution means or the second execution means, depending on whether the shift amount of normalization based on the operation result of the mantissa exceeds the additional bits;
An arithmetic circuit comprising: a selection means for selectively selecting the output of the execution means;
JP63058825A 1988-03-11 1988-03-11 Arithmetic circuit Expired - Lifetime JP2555135B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63058825A JP2555135B2 (en) 1988-03-11 1988-03-11 Arithmetic circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63058825A JP2555135B2 (en) 1988-03-11 1988-03-11 Arithmetic circuit

Publications (2)

Publication Number Publication Date
JPH01232422A true JPH01232422A (en) 1989-09-18
JP2555135B2 JP2555135B2 (en) 1996-11-20

Family

ID=13095418

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63058825A Expired - Lifetime JP2555135B2 (en) 1988-03-11 1988-03-11 Arithmetic circuit

Country Status (1)

Country Link
JP (1) JP2555135B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02294820A (en) * 1989-04-17 1990-12-05 Internatl Business Mach Corp <Ibm> Floating point arithmetic processor and arithmetic processing
US5408426A (en) * 1992-03-17 1995-04-18 Hitachi, Ltd. Arithmetic unit capable of performing concurrent operations for high speed operation

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01223532A (en) * 1988-03-03 1989-09-06 Pfu Ltd Overflow/underflow processing circuit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01223532A (en) * 1988-03-03 1989-09-06 Pfu Ltd Overflow/underflow processing circuit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02294820A (en) * 1989-04-17 1990-12-05 Internatl Business Mach Corp <Ibm> Floating point arithmetic processor and arithmetic processing
US5408426A (en) * 1992-03-17 1995-04-18 Hitachi, Ltd. Arithmetic unit capable of performing concurrent operations for high speed operation
US5623435A (en) * 1992-03-17 1997-04-22 Hitachi, Ltd. Arithmetic unit capable of performing concurrent operations for high speed operation

Also Published As

Publication number Publication date
JP2555135B2 (en) 1996-11-20

Similar Documents

Publication Publication Date Title
US6099158A (en) Apparatus and methods for execution of computer instructions
JP3076046B2 (en) Exception detection circuit
US6820107B1 (en) Square root extraction circuit and floating-point square root extraction device
US6138135A (en) Propagating NaNs during high precision calculations using lesser precision hardware
US8549054B2 (en) Arithmetic processing apparatus and arithmetic processing method
JPH09269891A (en) Method and device for adding partial product, method and device for multiplying floating point, and method and device for floating point product-sum operation
JPH02294820A (en) Floating point arithmetic processor and arithmetic processing
US6175851B1 (en) Fast adder/subtractor for signed floating point numbers
US5247471A (en) Radix aligner for floating point addition and subtraction
US4110831A (en) Method and means for tracking digit significance in arithmetic operations executed on decimal computers
JPH0343645B2 (en)
US5831884A (en) Apparatus for performing arithmetic operation of floating point numbers capable of improving speed of operation by performing canceling prediction operation in parallel
US10310809B2 (en) Apparatus and method for supporting a conversion instruction
JP2511527B2 (en) Floating point arithmetic unit
KR19980082906A (en) How to Convert Floating-Point Numbers to Integer Types
JPH01232422A (en) Arithmetic circuit
CN115268832A (en) Floating point number rounding method and device and electronic equipment
JPH09222991A (en) Adding method and adder
US7003540B2 (en) Floating point multiplier for delimited operands
US6615228B1 (en) Selection based rounding system and method for floating point operations
JP3132436B2 (en) Floating-point multiply-accumulate unit
US6044391A (en) Method of generating the sticky-bit from the input operands
JP2856792B2 (en) Floating point arithmetic unit
US5944773A (en) Floating-point multiplier circuit for generating the sticky-bit from the input operands
US7444366B2 (en) Faster shift value calculation using modified carry-lookahead adder