JPS6298425A - Arithmetic shifter circuit - Google Patents

Arithmetic shifter circuit

Info

Publication number
JPS6298425A
JPS6298425A JP60238267A JP23826785A JPS6298425A JP S6298425 A JPS6298425 A JP S6298425A JP 60238267 A JP60238267 A JP 60238267A JP 23826785 A JP23826785 A JP 23826785A JP S6298425 A JPS6298425 A JP S6298425A
Authority
JP
Japan
Prior art keywords
circuit
shift
arithmetic
overflow
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
JP60238267A
Other languages
Japanese (ja)
Inventor
Giichi Mori
森 義一
Toshio Jiyufuku
寿福 利夫
Masao Iida
飯田 政雄
Akira Nomura
野村 彰
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP60238267A priority Critical patent/JPS6298425A/en
Publication of JPS6298425A publication Critical patent/JPS6298425A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To decrease remarkably the number of circuit constituting elements, and to detect an overflow by detecting an overflow which is generated at the time of an arithmetic shift of a fixed point data, by a normalized shift quantity detecting circuit which is prepared for a floating point arithmetic, and a comparing circuit which is added newly. CONSTITUTION:A point in which an arithmetic shifter circuit is different from a conventional one is to have provided a comparing circuit 20 instead of a shift overflow detecting circuit. That is to say, the comparing circuit 20 is a circuit for comparing an arithmetic shift quantity designating signal S1 and a normalized shift quantity signal S2, and outputting an overflow output signal 012 corresponding to its comparison, its input terminal is connected to an input terminal 2 and an output terminal of a normalized shift detecting circuit 6, and its output terminal is connected to an overflow use output terminal 21. In such a way, the normalized shift quantity detecting circuit and the comparing circuit are operated so as to detect directly an overflow which is generated at the time of an arithmetic shift of a fixed point data.

Description

【発明の詳細な説明】 (産業−1−の利用分野) 本発明は、浮動小数点演算回路において固定小数点形式
で表現されたデータの算術シフトを行う算術シフタ回路
に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (Field of Application in Industry-1-) The present invention relates to an arithmetic shifter circuit that performs arithmetic shifting of data expressed in a fixed-point format in a floating-point arithmetic circuit.

(従来の技術) 浮動小数点演算回路とは、符号、指数部及び仮数部から
なる浮動小数点形式で表現されたデータ(以下、単に浮
動小数点データという)の小数点位置を任意に指定して
そのデータの演算を行なう回路である。
(Prior Art) A floating-point arithmetic circuit is a circuit that arbitrarily specifies the decimal point position of data expressed in a floating-point format consisting of a sign, an exponent part, and a mantissa part (hereinafter simply referred to as floating-point data). This is a circuit that performs calculations.

この浮動小数点演算回路は、通常、仮数部データの桁合
せや、正規化のために、一度にNビ・ント以−1z(N
22)の正規化シフト(移動)を行うバレルシフタ回路
を備えている。そのため、このバレルシフタ回路を用い
て固定小数点形式で表現されたデータ(以下、単に固定
小数点データという)の2ピント(桁)以−1−の算術
シフトを−・度に行うことができる。このとき、2の補
数表現をとる固定小数点データを左方向(最上位ビット
方向)へ算術シフトを行った場合、シフト中に符号ビッ
トが変化してオーバフロー(桁あふれ)を発生し、無意
味な結果を出力する場合があるので、オーバフローが発
生17たことを検出する手段が必要となる。
This floating point arithmetic circuit normally processes N bits or more at a time for digit alignment and normalization of mantissa data.
22) is provided with a barrel shifter circuit that performs the normalization shift (movement). Therefore, by using this barrel shifter circuit, it is possible to perform an arithmetic shift of 2 pints (digits) or more of -1- degrees of data expressed in fixed-point format (hereinafter simply referred to as fixed-point data). At this time, if fixed-point data in two's complement representation is arithmetic shifted to the left (towards the most significant bit), the sign bit changes during the shift, causing an overflow (overflow) and meaningless Since the result may be output, a means for detecting the occurrence of an overflow is required.

ところが、一般に加減算を行なう浮動小数点演算回路の
パl/ルシフタ回路では、正規化のため左力向へのバレ
ルシフトを行なってもオーバフローが発生する場合はな
く、そのため通常はオーバフロー検出回路が設けられて
いない。この結果、浮動小数点演算回路中のバレルシフ
タ回路を用いて固定少数点データの算術シフトを行なわ
せようとすると1新たにオーバフロー検出回路を用意す
る必要がでてくる。
However, in the pulse shifter circuit of a floating point arithmetic circuit that generally performs addition and subtraction, an overflow does not occur even if barrel shift is performed in the left force direction for normalization, so an overflow detection circuit is usually provided. Not yet. As a result, if it is attempted to perform arithmetic shift of fixed point data using the barrel shifter circuit in the floating point arithmetic circuit, it becomes necessary to provide a new overflow detection circuit.

従来、このような浮動小数点演算回路中のバレルシフタ
回路を用いた固定小数点データの算術シフタ回路として
、例えば第2図のような構成のものがあった。以ド、そ
の構成を説明する。
Conventionally, as an arithmetic shifter circuit for fixed point data using a barrel shifter circuit in such a floating point arithmetic circuit, there has been a structure as shown in FIG. 2, for example. The configuration will be explained below.

この12術シフタ回路は、浮動小数点データ旧または固
定小数点データD2を入力する入力端子l、固定小数点
データD2のq術シフト量指定信号Stを入力する入力
端子2、シフタ出力信号01を送出する出力端r3、及
びオーバフロー出力値り02を出力する出力端子4を留
1えている。
This 12-point shifter circuit has an input terminal 1 for inputting old floating-point data or fixed-point data D2, an input terminal 2 for inputting a q-shift amount designation signal St of fixed-point data D2, and an output for sending out a shifter output signal 01. An output terminal 4 for outputting a terminal r3 and an overflow output value 02 is retained.

入力端子1には、バし・ルシフタ回路5及びiI現化、
シフ) tt1検出回路6が接続されている。バレルシ
フタ回路5は、iγ動小数点データ旧の11:現化シフ
ト、または固定小数点データ02の1′−術シフトを行
ってシフタ出力(1j!301を送出する回路で、その
シフタ出力値を)01が出力端f3に送出される。止規
化シフト品検出回路6は、浮動小数点データD1の正規
化のためのIF規化シフ]・州を検出l、てその正規化
シフトfll信−392を出力する回路である。
The input terminal 1 has a bar shifter circuit 5 and an iI representation,
shift) tt1 detection circuit 6 is connected. The barrel shifter circuit 5 is a circuit that performs a 11: actualization shift on the iγ dynamic point data, or a 1' shift on the fixed point data 02, and sends out a shifter output (1j!301, and the shifter output value) 01 is sent to the output terminal f3. The normalized shift product detection circuit 6 is a circuit that detects the IF normalized shift state for normalizing the floating point data D1 and outputs the normalized shift signal -392.

正規化シフト)11検出回路6のltl力端子及び入力
端子2には、セレクタ7が接続されている。セレクタ7
は、正規化シフトIA信I S 2と算術シフ) IJ
j指定信号S1とのvj換えを行う回路で、その信号S
2またSlをバレルシフタ回路5にりえる。バレルシフ
タ回路5にはシフトオーバフロー検出回路8が接続され
ている。シフトオーバフロー検出回路8は、バレルシフ
タ回路5における豹術シフ]・時に発生するオー7人フ
ローを検I11シ、そのオー八ツロー出力値1302を
出力端子4に送出する回路である。
A selector 7 is connected to the ltl power terminal and the input terminal 2 of the normalization shift) 11 detection circuit 6. Selector 7
is the normalized shift IA signal IS 2 and the arithmetic shift) IJ
This is a circuit that performs vj exchange with the j specified signal S1, and the signal S
2. Also, SL can be connected to the barrel shifter circuit 5. A shift overflow detection circuit 8 is connected to the barrel shifter circuit 5 . The shift overflow detection circuit 8 is a circuit that detects an overflow that occurs when the barrel shifter circuit 5 undergoes an overflow shift, and sends the overflow output value 1302 to the output terminal 4.

第3図はシフトオーバフロー検出回路8の回路図である
。このシフトオーバフロー検出回路8は、バレルシフタ
回路5の出力端子に接続される複数個のデータ入力端子
10を有し、そのデータ入力端子−10には複数個の排
他的論理和回路(以ド、EXOR回路という)11及び
論理和回路(以−ド、OR回路という)12が接続され
ている。OR回路12の最締段からはオーバフロー出力
m号02が出力され、それが出力端子4へ送出される。
FIG. 3 is a circuit diagram of the shift overflow detection circuit 8. This shift overflow detection circuit 8 has a plurality of data input terminals 10 connected to the output terminal of the barrel shifter circuit 5, and the data input terminal -10 has a plurality of exclusive OR circuits (hereinafter referred to as EXOR circuits). A logical sum circuit (hereinafter referred to as an OR circuit) 11 and an OR circuit (hereinafter referred to as an OR circuit) 12 are connected. An overflow output m number 02 is output from the final stage of the OR circuit 12, and is sent to the output terminal 4.

次に動作について説明する。Next, the operation will be explained.

第2図において、浮動小数点演算が行なわれる場合、セ
1/クタ7は止規化シフト星側を選択する。このとき、
入力端f1から入力した浮動小数点データDに対し、1
丁規化シフト量検出回路6で11−焼化のためのシフ)
・量が決定され、その正規化シフトti1信号S 2が
セレクト7を通してバレルシフタ回路5へ供給される。
In FIG. 2, when floating point arithmetic is performed, the selector 7 selects the normalized shift star side. At this time,
1 for floating point data D input from input terminal f1
11-shift for firing in the normalization shift amount detection circuit 6)
- The quantity is determined and its normalized shifted ti1 signal S2 is supplied to the barrel shifter circuit 5 through the select 7.

すると、バレルシフタ回路5は1γ動小数点データDI
に対して正規化シフトを行う。
Then, the barrel shifter circuit 5 receives the 1γ dynamic point data DI.
Perform normalization shift on .

一方、固定小数点データD2の17術シフトを行う場合
、セL/クト7はシフトlit入力端r−側を選択する
。すると、算術シフトfit指定信りSlがセレクタ7
を通してバレルシフタ回路5へIjえられる。バレルシ
フタ回路5は、入力端子1から入力した固定小数点デー
タr]2に対し、前記信号S1による算術シフトに分、
算術シフトを行う。この算術シフ)・時に発生するオー
バフローは、シフトオーへ−検出回路8で検出され、そ
のオーバフロー出力信号02が出力端r4を通して外部
へ出力される。
On the other hand, when performing a 17-bit shift of the fixed-point data D2, the select L/cut 7 selects the r- side of the shift lit input terminal. Then, the arithmetic shift fit specification signal Sl is set to selector 7.
Ij is sent to the barrel shifter circuit 5 through the Ij. The barrel shifter circuit 5 performs an arithmetic shift using the signal S1 on the fixed point data r]2 input from the input terminal 1.
Perform an arithmetic shift. The overflow that occurs during this arithmetic shift is detected by the shift-off detection circuit 8, and its overflow output signal 02 is output to the outside through the output terminal r4.

ここで、第3図のシフトオーバフロー検出回路8は、次
のように動作する。/ヘール9フ2回路5にて算術シフ
ト動作が行なわれた結果、n ’′fビットからあふれ
たデータは、シフトオーバフロー検出回路8へ入力され
る。このあふれたデータが全て回−内容をとるとき、オ
ーバフローは発生せず、逆にデータが全て回−内容でな
いときオーバフローとなる。このことから、オーバフロ
ー検出回路8に入力されたデータに対し、EXOR回路
11でとなりあうビットが同一であるか否かを検出し、
そのEXOR回路llの出力をOR回路12で論理和を
とることにより、オーバフローを検出したとき出力端子
4から論理” i ”のオバーフロー出力信す02を出
力する。これにより、外部から十−バフローを検出する
ことが可能となる。
Here, the shift overflow detection circuit 8 of FIG. 3 operates as follows. As a result of the arithmetic shift operation performed in the /Hail9F2 circuit 5, data overflowing from the n''f bit is input to the shift overflow detection circuit 8. When all of this overflowing data is content, overflow does not occur; on the other hand, when all of the data is not content, overflow occurs. From this, the EXOR circuit 11 detects whether adjacent bits are the same for the data input to the overflow detection circuit 8,
By ORing the outputs of the EXOR circuit 11 with the OR circuit 12, an overflow output signal 02 of logic "i" is output from the output terminal 4 when an overflow is detected. This makes it possible to detect the bar flow from the outside.

(発明が解決しようとする問題点) しかしながら、1−記構成の算術シフタ回路では、シフ
]・オーバフロー検出回路8を必要とするため、次のよ
うな問題点があった。
(Problems to be Solved by the Invention) However, since the arithmetic shifter circuit having the one-note configuration requires the shift overflow detection circuit 8, there are the following problems.

第3図のようなオーバフロー検出回路8を用いた場合、
ハードウェア量の増大、特に803回路でこの回路8を
構成する場合、トランジスタ数の多いEXOR回路11
を多用するので、トランジスタ数の増加を招くことにな
る。さらに、このシフトオーバフロー検出回路8では、
バレルシフタ回路5の最終段の出力をデータ入力とする
ので、シフト動作遅延の増加を招くことになるという問
題点があった。
When using the overflow detection circuit 8 as shown in FIG.
When the amount of hardware increases, especially when configuring this circuit 8 with 803 circuits, the EXOR circuit 11 with a large number of transistors
, which results in an increase in the number of transistors. Furthermore, in this shift overflow detection circuit 8,
Since the output of the final stage of the barrel shifter circuit 5 is used as the data input, there is a problem in that the shift operation delay increases.

本発明は、前記従来技術が持っていた問題点として、回
路構成素r数の増大と、シフI・動作遅延の増加の点に
ついて解決した算術シフタ回路を提供するものである。
The present invention provides an arithmetic shifter circuit that solves the problems of the prior art, such as an increase in the number of circuit elements r and an increase in shift I and operation delay.

(問題点を解決するための手段) 本発明は、前記問題点を解決するために、浮動小数点デ
ータの正規化のための正規化シフト量を検出する重視化
シフト1正検出回路と、前記正規化シフl、−%に基づ
き前記浮動小数点データの正規化シフトを行なうバレル
シフタ回路とを備えた浮動小数点演算回路を用いて、固
定小数点データの算術シフト量に基づきその固定小数点
データの算術シフトを行なう算術シフタ回路において、
前記正規化シフl−iil、と前記1′l術シフトj、
tとを比較して前記算術シフI・時に発生するオーバフ
ローを検出する比較回路を設けたものである。
(Means for Solving the Problem) In order to solve the problem, the present invention provides an emphasis shift 1 positive detection circuit that detects a normalization shift amount for normalizing floating point data, and a Arithmetic shifting of the fixed point data is performed based on the arithmetic shift amount of the fixed point data using a floating point arithmetic circuit equipped with a barrel shifter circuit that performs normalized shift of the floating point data based on the conversion shift l, -%. In the arithmetic shifter circuit,
the normalization shift l-iil, and the 1'l technique shift j,
A comparison circuit is provided for detecting an overflow occurring during the arithmetic shift I by comparing the arithmetic shift I and t.

(作 用) 本発明によれば、以トのように算術シフタ回路を構成し
たので、it規化シフI・]、1検出回路及び比較回路
は固定小数点データの算術シフト時に発生するオーバフ
ローを直接検出するように1動く。しかも、比較回路は
簡r1tな回路構成で実現可能である。従って、前記問
題点を除去できるのである。
(Function) According to the present invention, since the arithmetic shifter circuit is configured as described below, the it normalized shift I, 1 detection circuit, and comparison circuit can directly handle overflow that occurs during arithmetic shift of fixed-point data. Move 1 to detect. Furthermore, the comparison circuit can be realized with a simple circuit configuration. Therefore, the above-mentioned problem can be eliminated.

(実施例) 第1図は本発明の実施例を示す算術シフタ回路の構成ブ
ロンク図である。なお、図面中、従来の第2図中の要素
と同一の要素には同一の0壮が伺されている。
(Embodiment) FIG. 1 is a block diagram of an arithmetic shifter circuit showing an embodiment of the present invention. In addition, in the drawing, the same elements as those in the conventional FIG.

この算術シフタ回路が従来のものと異なる点は、第2図
のシフトオーバフロー検出回路8の代りに、比較回路2
0を設けたことである。すなわち、比較回路20は、算
術シフト措指定信号S+と11−焼化シフト鼠信号S2
とを比較してそれに応じたオーバフロー出力信号012
を出力する回路であり、その入力端−rが入力端子2及
び正規化シフト検出回路6の111力端子に接続され、
その出力端fがオーバフロー用出力端イ21にそれぞれ
接続されている。
The difference between this arithmetic shifter circuit and the conventional one is that a comparison circuit 2 is used instead of the shift overflow detection circuit 8 shown in FIG.
The reason is that 0 is set. That is, the comparator circuit 20 outputs the arithmetic shift designation signal S+ and the 11-selective shift signal S2.
and an overflow output signal 012 corresponding to the comparison.
The input terminal -r is connected to the input terminal 2 and the 111 output terminal of the normalization shift detection circuit 6,
The output terminals f are respectively connected to the overflow output terminals i21.

第4図は比較回路20の一構成例を示す回路図である。FIG. 4 is a circuit diagram showing an example of the configuration of the comparison circuit 20.

この比較回路20は、4ビット用コンパレータ(比較器
)で構成され、4ビット分の算術シフト縫指定信号5l
(Sl−0〜5l−3)及び正規化シフ+−!i!信号
52(S2−0〜S2−3)を入力するデータ入力端f
−22(22−01,22−02〜22−31.22−
32)を有し、ている。
This comparison circuit 20 is composed of a 4-bit comparator (comparator), and has a 4-bit arithmetic shift sewing designation signal 5l.
(Sl-0 to 5l-3) and normalized Schiff+-! i! Data input terminal f for inputting the signal 52 (S2-0 to S2-3)
-22 (22-01, 22-02 ~ 22-31.22-
32).

1〜3ピントの名データ入力端子22−[)1.22−
02〜22−21.22−22には、それぞれ排他的否
定論理和回路(以下、EXNOR回路という) 23−
0〜23−2、否定回路(以下、 807回路という)
 24−0〜24−2、及び否定論理積回路(以下、N
ANn回路という) 25−0〜25−2が接続されて
いる。また、4ビツトのデータ入力端子22−31.2
2−32には、NOT回路24−3及びNAND回路2
5−3が接続ぎれている。さらに、NANr1回路25
−0〜25−3には、論理積回路(以ド、 AND回路
という)26が接続され、AND回路26の出力側がI
H力端子21に接続されている。
1 to 3 pin data input terminal 22-[)1.22-
23-
0 to 23-2, negative circuit (hereinafter referred to as 807 circuit)
24-0 to 24-2, and a NAND circuit (hereinafter, N
(referred to as ANn circuit) 25-0 to 25-2 are connected. In addition, a 4-bit data input terminal 22-31.2
2-32 includes a NOT circuit 24-3 and a NAND circuit 2.
5-3 is disconnected. Furthermore, the NANr1 circuit 25
An AND circuit (hereinafter referred to as an AND circuit) 26 is connected to -0 to 25-3, and the output side of the AND circuit 26 is an I
It is connected to the H power terminal 21.

この比較回路20は4ビツト構成であるため、0〜15
ビツトの算術シフトに適用yれる。4ビ・ント分の算術
シフトに指定信号5l(Sl−0〜5l−3)及び正規
化シフトli%信号52(S2−0〜S2−3)が人力
されると、これらの各ビットの信号5l−0,52−0
〜5l−3,52−3がそれぞれEXNOR回路23−
0〜23−2及びNOT 回路24−0〜24−3を介
し−c NANO回路25−0〜25−3で大小が比較
された後、最終段のAND回路26により信号S1とS
2の総合比較が行なわれる。
Since this comparison circuit 20 has a 4-bit configuration, 0 to 15
Applies to arithmetic shifts of bits. When the designation signal 5l (Sl-0 to 5l-3) and the normalized shift li% signal 52 (S2-0 to S2-3) are manually applied to the arithmetic shift for 4 bits, the signals of each of these bits are 5l-0, 52-0
~5l-3, 52-3 are each EXNOR circuit 23-
0 to 23-2 and NOT circuits 24-0 to 24-3. After the magnitudes are compared in NANO circuits 25-0 to 25-3, signals S1 and S are
A comprehensive comparison of 2 is made.

Sl>S2ならば論理゛1′”のオーバフロー出力信号
012が、Sl≦S2ならば論理゛O°″のオーバフロ
ー出力信す012がそれぞれ出力端子21から送出され
る。
If Sl>S2, an overflow output signal 012 of logic "1'" is sent out from the output terminal 21, and if Sl≦S2, an overflow output signal 012 of logic "O°" is sent out from the output terminal 21.

次に、以にのように構成される算術シフト回路を用いて
固定小数点データD2の算術シフトを行う場合の動作に
ついて説明する。
Next, a description will be given of the operation when performing arithmetic shift of the fixed-point data D2 using the arithmetic shift circuit configured as described above.

先ず、入力端子lから固定小数点データD2が入力され
ると、該データD2はバレルシフタ回路5へ供給される
と共番乙iE規化シフ) 量検出回路6へも供給される
。すると、正規化シフト量検出回路6は、固定小数点デ
ータD2の符号ビットが最下位ピッl−(LSB)側方
向へどれだけ連続して続いているかを検出し、その検出
結果である正規化シフト11H−信号S2を比較回路2
0へ4える。この際、入力端r−2から入力された算術
シフト量指定信号Slは、比較回路20へqえられると
共に、セレクタ7で選択されてバレルシフタ回路5へも
供給される。
First, when fixed point data D2 is input from the input terminal 1, the data D2 is supplied to the barrel shifter circuit 5, and then also supplied to the common number detection circuit 6. Then, the normalized shift amount detection circuit 6 detects how many sign bits of the fixed-point data D2 continue in the direction of the least significant bit (LSB), and detects the normalized shift amount that is the detection result. 11H-signal S2 to comparison circuit 2
Increase by 4 to 0. At this time, the arithmetic shift amount designation signal Sl input from the input terminal r-2 is applied to the comparator circuit 20, and is also selected by the selector 7 and supplied to the barrel shifter circuit 5.

そのため、バレルシフタ回路5は、算術シフト呈指定信
号S1のシフト聞分(例えば、0〜15ビツト)だけ、
固定小数点データD2の算術シフ]・を行ない、そのシ
フタ出力信壮01を出力端r3から送出する。
Therefore, the barrel shifter circuit 5 only shifts the shift amount (for example, 0 to 15 bits) of the arithmetic shift presentation designation signal S1.
Arithmetic shift of the fixed-point data D2] is performed, and the shifter output signal 01 is sent from the output terminal r3.

−・方、比較回路20では、算術シフ1. i、i指定
信13Slと正規化シフトjj信号S2との大小比較を
行う。
- On the other hand, in the comparison circuit 20, the arithmetic shift 1. A comparison is made between the i, i designation signal 13Sl and the normalized shift jj signal S2.

ここで、正規化シフトt1!信号S2は、固定小数点デ
ータD2の符号ビットが最下位ビ、]・側へ何ピント連
続して同一内容を有しているかを示すものであるから、
算術シフト早指定イ1)すStがこの1[規化シフトf
1.=信りS2よりも小であるならば、算術シフトによ
りオーバフローを発生することはない。そのため、比較
回路20から111力されるオーバフロー出力信号01
2は論理II O11となる。逆に、算術シフト量指定
信号S1が止規化シフトJi!信号S2よりも大である
ならば、必ずオーバフローを発生することになるため、
オー八ツロー由由信1号O12が論理” 1 ”となる
Here, normalized shift t1! The signal S2 indicates how many consecutive points the sign bit of the fixed-point data D2 has the same content toward the lowest bit, ].
Arithmetic shift early specification a1) St is this 1 [normalized shift f
1. = less than S2, an arithmetic shift will not cause an overflow. Therefore, the overflow output signal 01 outputted from the comparator circuit 20 is
2 becomes logic II O11. Conversely, the arithmetic shift amount designation signal S1 is the normalized shift Ji! If it is larger than signal S2, an overflow will definitely occur, so
Oyatsuro Yuyu signal No. 1 O12 becomes logic "1".

このように、比較回路20において算術シフl−lとI
に焼化シフトh)との大小関係を比較することにより、
算術シフトで発生するオーバフローを検出することがで
き、従って出力端子21を通して外部ヘオーバフローが
発生したことを知らせることができる。
In this way, in the comparator circuit 20, the arithmetic shift l-l and I
By comparing the magnitude relationship with the sintering shift h),
An overflow occurring in an arithmetic shift can be detected, and therefore the occurrence of an overflow can be signaled to the outside through the output terminal 21.

また、第4図の比較回路20において、それを相補型M
O9I−ランジスタ(0MO8)で構成した場合、70
個のトランジスタ数が必要になる。一方、第3図のシフ
トオーバフロー検出回路8においてO〜15ビットの算
術シフト時のオーバフローに対応させるには、約200
個のトランジスタ数を必要とする。従って、比較回路2
0を用いれば、ハードウェア規模を大幅に減少させるこ
とができる。
In addition, in the comparator circuit 20 of FIG.
When configured with O9I-transistor (0MO8), 70
The number of transistors required is On the other hand, in order to cope with overflow during arithmetic shift of O to 15 bits in the shift overflow detection circuit 8 of FIG.
The number of transistors required is Therefore, comparison circuit 2
If 0 is used, the hardware scale can be significantly reduced.

本実施例の利点をまとめれば、次のようになる。The advantages of this embodiment can be summarized as follows.

(1)オーツ<フロー判定に浮動小数点演算用に用意し
た正規化シフ)・量検出回路6を用いることで、新たに
設ける回路として比較回路20だけとすることができ、
ハード1dの削減を51ることかできる。
(1) By using the amount detection circuit 6 (normalization shift prepared for floating point calculations for flow determination), only the comparison circuit 20 can be newly provided.
The hardware 1d can be reduced by 51 points.

しかも、固定小数点データD2の語長が大きくなると、
従来のEXOR回路を用いたオーバフロー検出回路8で
はハード規模がデータ語長に比例して大きくなるが、本
実施例によれば比較するビット数NはLog2Nで済む
ので、ビット数が大きくなるほどハードウェア規模削減
の効果が大きくなる。
Moreover, when the word length of fixed-point data D2 becomes large,
In the conventional overflow detection circuit 8 using an EXOR circuit, the hardware size increases in proportion to the data word length, but according to this embodiment, the number of bits N to be compared can be Log2N, so the larger the number of bits, the more difficult the hardware is. The effect of scale reduction will be greater.

(2)本実施例によれば、シフトオーバフローの判定を
、シフ) Fttと符号ビットの最下位ビット方向へ連
続するビット数との比較という形で行うので、実際のシ
フト動作と無関係に並行に実行することができ、そのた
めシフト動作遅延の増加を招くことを防ぐことができる
(2) According to this embodiment, the shift overflow is determined by comparing the shift (shift) Ftt with the number of consecutive bits in the direction of the least significant bit of the sign bit. Therefore, an increase in shift operation delay can be prevented.

なお、−1−記実施例では、比較回路20として第4図
のようなコンパレータを用いたが、これ以外に減算回路
等の種々の大小比較手段を用いることも可能である。
In the embodiment described in -1- above, a comparator as shown in FIG. 4 was used as the comparison circuit 20, but it is also possible to use various magnitude comparison means such as a subtraction circuit.

(発明の効果) 以」−詳細に説明したように、本発明によれば、浮動小
数点演算用に用意した正規化シフト品検出! 4 回路と、新たに伺加した比較回路とで、固定小数点デー
タの算術シフト時に発生するオーバフローを検出するよ
うにしたので、回路構成素子数を大幅に減少でき、しか
も算術シフト動作と無関係でかつそれと並行にオーバフ
ロー検出を行えるため、シフト動作のR延を防止できる
(Effects of the Invention) - As explained in detail, according to the present invention, normalized shift product detection prepared for floating point arithmetic is possible! 4 circuit and a newly added comparator circuit to detect overflows that occur during arithmetic shifts of fixed-point data, so the number of circuit components can be significantly reduced, and it is independent of arithmetic shift operations. Since overflow detection can be performed in parallel with this, it is possible to prevent the R delay of the shift operation.

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

第1図は本発明の実施例を示す算術シフタ回路の構成ブ
ロンク図、第2図は従来の算術シフタ回路の構成ブロッ
ク図、第3図は第2図中のシフトオーバフロー検出回路
の回路図、第4図は第1図中の比較回路の回路図である
。 5・・・・・・バレルシフタ回路、6・・・・・・正規
化シフトに検出回路、7・・・・・・セレクタ、20・
・・・・・比較回路、Dl・・・・・・浮動小数点デー
タ、D2・・・・・・固定小数点データ、01・・・・
・・シフト出力信号、012・・・・・・オーバフロー
出力信号、Sl・・・・・・算術シフト量指定信号、S
2・・・・・・正規化シフト縫信号。 7;セしフグ Dl:浮動小数点データ D?、固定ノj4丈由5テニタ 01、シフト出力信ろ 本発明の算イボテシフタ回路、 隼1図
FIG. 1 is a block diagram of the configuration of an arithmetic shifter circuit showing an embodiment of the present invention, FIG. 2 is a block diagram of the configuration of a conventional arithmetic shifter circuit, and FIG. 3 is a circuit diagram of the shift overflow detection circuit in FIG. FIG. 4 is a circuit diagram of the comparison circuit in FIG. 1. 5... Barrel shifter circuit, 6... Normalization shift detection circuit, 7... Selector, 20...
...Comparison circuit, Dl...Floating point data, D2...Fixed point data, 01...
...Shift output signal, 012... Overflow output signal, Sl... Arithmetic shift amount designation signal, S
2...Normalized shift sewing signal. 7; Set puffer fish Dl: Floating point data D? , Fixed node J4 length Yu5 Tenitor 01, Shift output signal Calculating wart shifter circuit of the present invention, Hayabusa 1 diagram

Claims (1)

【特許請求の範囲】[Claims] 浮動小数点形式で表現されたデータの正規化のための正
規化シフト量を検出する正規化シフト量検出回路と、前
記正規化シフト量に基づき前記浮動小数点形式のデータ
の正規化シフトを行なうバレルシフタ回路とを備えた浮
動小数点演算回路を用いて、固定小数点形式で表現され
たデータの算術シフト量に基づきその固定小数点形式の
データの算術シフトを行なう算術シフタ回路において、
前記正規化シフト量と前記算術シフト量とを比較して前
記算術シフト時に発生するオーバフローを検出する比較
回路を設けたことを特徴とする算術シフタ回路。
a normalization shift amount detection circuit that detects a normalization shift amount for normalizing data expressed in floating point format; and a barrel shifter circuit that performs normalization shift of the floating point format data based on the normalization shift amount. In an arithmetic shifter circuit that performs arithmetic shifting of data in fixed-point format based on the amount of arithmetic shift of data expressed in fixed-point format using a floating-point arithmetic circuit comprising:
An arithmetic shifter circuit comprising a comparison circuit that compares the normalized shift amount and the arithmetic shift amount to detect an overflow that occurs during the arithmetic shift.
JP60238267A 1985-10-24 1985-10-24 Arithmetic shifter circuit Pending JPS6298425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60238267A JPS6298425A (en) 1985-10-24 1985-10-24 Arithmetic shifter circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60238267A JPS6298425A (en) 1985-10-24 1985-10-24 Arithmetic shifter circuit

Publications (1)

Publication Number Publication Date
JPS6298425A true JPS6298425A (en) 1987-05-07

Family

ID=17027638

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60238267A Pending JPS6298425A (en) 1985-10-24 1985-10-24 Arithmetic shifter circuit

Country Status (1)

Country Link
JP (1) JPS6298425A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01180629A (en) * 1988-01-12 1989-07-18 Mitsubishi Electric Corp Overflow detecting circuit
JPH027124A (en) * 1988-06-27 1990-01-11 Oki Electric Ind Co Ltd Digital signal processing circuit
JPH02148134A (en) * 1988-11-29 1990-06-07 Oki Electric Ind Co Ltd Arithmetic logic circuit
JPH02304622A (en) * 1989-05-19 1990-12-18 Oki Electric Ind Co Ltd Shift overflow control circuit

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5487030A (en) * 1977-12-22 1979-07-11 Fujitsu Ltd Digit-down interruption circuit
JPS6255727A (en) * 1985-09-03 1987-03-11 Nec Corp Signal processing multiplier

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5487030A (en) * 1977-12-22 1979-07-11 Fujitsu Ltd Digit-down interruption circuit
JPS6255727A (en) * 1985-09-03 1987-03-11 Nec Corp Signal processing multiplier

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01180629A (en) * 1988-01-12 1989-07-18 Mitsubishi Electric Corp Overflow detecting circuit
JPH027124A (en) * 1988-06-27 1990-01-11 Oki Electric Ind Co Ltd Digital signal processing circuit
JPH02148134A (en) * 1988-11-29 1990-06-07 Oki Electric Ind Co Ltd Arithmetic logic circuit
JPH02304622A (en) * 1989-05-19 1990-12-18 Oki Electric Ind Co Ltd Shift overflow control circuit

Similar Documents

Publication Publication Date Title
JP3076046B2 (en) Exception detection circuit
US4758972A (en) Precision rounding in a floating point arithmetic unit
US5469377A (en) Floating point computing device for simplifying procedures accompanying addition or subtraction by detecting whether all of the bits of the digits of the mantissa are 0 or 1
JP2618374B2 (en) Finding the position of the most significant digit
JP2000155671A (en) Floating point arithmetic unit
US5303175A (en) Floating point arithmetic unit
EP0540285A2 (en) Method and apparatus for floating point normalisation
US4941119A (en) Method and apparatus for predicting an overflow in an integer multiply
GB1579100A (en) Digital arithmetic method and means
JPS6298425A (en) Arithmetic shifter circuit
US8732226B2 (en) Integer rounding operation
JPH02294731A (en) Floating point arithmetic processor
JPH0568725B2 (en)
US20030212720A1 (en) Method/apparatus for conversion of higher order bits of 64-bit integer to floating point using 53-bit adder hardware
KR100331846B1 (en) floating addition
CA2215719C (en) Sticky bit determination in floating point arithmetic system
CN111290790B (en) Conversion device for converting fixed point into floating point
CN111313890B (en) High-performance approximate full adder gate-level unit
JPH09114641A (en) Apparatus and method for decision of most significant digit
JPH0366693B2 (en)
US5153847A (en) Arithmetic processor using signed digit representation of internal operands
US6044391A (en) Method of generating the sticky-bit from the input operands
JPH01232423A (en) Arithmetic circuit
JP3137131B2 (en) Floating point multiplier and multiplication method
US5944773A (en) Floating-point multiplier circuit for generating the sticky-bit from the input operands