JPH0887400A - Multiplier, adder and subtracter - Google Patents

Multiplier, adder and subtracter

Info

Publication number
JPH0887400A
JPH0887400A JP6246989A JP24698994A JPH0887400A JP H0887400 A JPH0887400 A JP H0887400A JP 6246989 A JP6246989 A JP 6246989A JP 24698994 A JP24698994 A JP 24698994A JP H0887400 A JPH0887400 A JP H0887400A
Authority
JP
Japan
Prior art keywords
bit
multiplication
adder
shift
input
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
JP6246989A
Other languages
Japanese (ja)
Other versions
JP3493064B2 (en
Inventor
Yukihiro Ide
出 進 博 井
Harumune Matsubara
原 玄 宗 松
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 JP24698994A priority Critical patent/JP3493064B2/en
Publication of JPH0887400A publication Critical patent/JPH0887400A/en
Application granted granted Critical
Publication of JP3493064B2 publication Critical patent/JP3493064B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

PURPOSE: To constitute the multiplier, adder and subtracter in a compact device and speed up the operation of multiplication, addition, and subtraction by performing addition of a 3rd operand C simultaneously with partial multiplication of 1st and 2nd operands A and B. CONSTITUTION: The 1st and 2nd operands A and B are inputted to a multiplication array 301 and multiplied. When a secondary Booth's algorithm is used as multiplication algorithm, 12 partial products are added by a Wallace tree which is composed of full-adders and obtains the sum of partial products of the same weight (same digit). The 3rd operand C is also inputted to the multiplication array 301 and the values of the respective digits of the operand C are added directly to the partial products of the same weight by the adders of a Wallace tree corresponding to the respective digits of the operand C. Consequently, the multiplication array 301 calculates an arithmetic operation result A×B+C of multiplication, addition, and subtraction in carry save form. A final adder converts the arithmetic operation result A×B+C of multiplication, addition, and subtraction, found in the carry save form into a binary number.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、A×B+Cの演算を行
う乗加減算器の改良に関する。また、他の発明は、演算
装置等においてデータを指定された量だけ桁シフトする
バレルシフタの改良に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an improvement of a multiplier / subtractor for performing A * B + C calculation. Another invention relates to an improvement in a barrel shifter that shifts data by a specified amount in an arithmetic unit or the like.

【0002】[0002]

【従来の技術】[Prior art]

(乗加減算器)科学技術計算、コンピュータ・グラフィ
ックス、信号処理等では、膨大な量の演算を高速に処理
する必要がある。このような応用では行列計算が頻繁に
実行される。演算の多くは、A×B+Cを行う乗加減算
に帰着させることができる。そのため高速な乗加減算演
算器が要求されている。特に、高速な演算性能が要求さ
れるデジタル信号処理プロセッサ(DSP)は、ハード
ウェアで構成された乗加減算演算器を実装している。
(Multiplier / Adder / Subtractor) In scientific and technological calculations, computer graphics, signal processing, etc., it is necessary to process enormous amounts of operations at high speed. Matrix calculations are frequently performed in such applications. Many of the operations can be reduced to multiplicative addition / subtraction that performs A × B + C. Therefore, a high-speed multiplying / subtracting arithmetic unit is required. In particular, a digital signal processor (DSP), which requires high-speed arithmetic performance, is equipped with a multiplication / subtraction arithmetic unit composed of hardware.

【0003】図8は、従来の乗加減算演算器の一例を示
すブロック図である。同図において、2進数の被乗数A
と乗数Bとの積を求める乗算器は、例えば、公知のブー
ス(Booth )のアルゴリズムによる、乗算を実行する乗
算アレイ101と、乗算アレイ101の和出力群Fss
及び桁上げ出力群Fcc(乗算中間値)を2進数の形に
整える最終加算器102と、によって構成される。最終
加算器102の出力に得られる乗算器の出力P(=(A
×B))と、加算(あるいは減算)すべき2進数の加算
値(あるいは減算値)Cとを加算器103によって加算
(あるいは減算)して、(A×B)+Cを得る構成とな
っている。
FIG. 8 is a block diagram showing an example of a conventional multiplication / subtraction arithmetic unit. In the figure, the binary multiplicand A
The multiplier that finds the product of the multiplier B and the multiplier B is, for example, a multiplication array 101 that executes multiplication by a known Booth algorithm, and a sum output group Fss of the multiplication array 101.
And a final adder 102 for arranging the carry output group Fcc (multiplication intermediate value) in the form of a binary number. The output P (= (A
× B)) and the binary addition value (or subtraction value) C to be added (or subtracted) are added (or subtracted) by the adder 103 to obtain (A × B) + C. There is.

【0004】図9は、ブース(Booth )のアルゴリズム
による乗算を行う乗算アレイ101の構成を示してお
り、被乗数Aのリコード(再符号化)を行うブースのリ
コーダ101a、被乗数Aと乗数Bとの部分積を生成す
る部分積生成回路101b、重み付された部分積を累積
的に加算する部分積加算用桁上げ保存加算器群(例え
ば、ワラス(Wallace )・ツリー)101c、によって
構成される。
FIG. 9 shows the configuration of a multiplication array 101 for performing multiplication by Booth's algorithm. It consists of a booth recorder 101a for recoding (re-encoding) a multiplicand A, a multiplicand A and a multiplier B. A partial product generation circuit 101b that generates a partial product and a carry save adder group for partial product addition (for example, Wallace tree) 101c that cumulatively adds the weighted partial products are configured.

【0005】部分積生成回路101bは、例えば、一次
のブースのアルゴリズムを実行する場合には、次式に従
う部分積を生成する。
The partial product generation circuit 101b generates a partial product according to the following equation, for example, when executing the primary Booth algorithm.

【0006】 ここで、被乗数Aはnビットの2進数(=an
n-1 ,…,a1 ,a0 )、乗数Bはnビットの2進数
(=bn ,bn-1 ,…,b1 ,b0 )である。iはi番
目の乗算ステップを意味する。
[0006] Here, the multiplicand A is an n-bit binary number (= a n ,
a n-1, ..., a 1, a 0), the multiplier B is an n-bit binary number (= b n, b n- 1, ..., a b 1, b 0). i means the i-th multiplication step.

【0007】また、二次のブースのアルゴリズムの場合
は、次式で示されるような部分積を生成する。
Further, in the case of the secondary Booth's algorithm, a partial product represented by the following equation is generated.

【0008】 P=A・B 二次のブースのアルゴリズムでは、nがn/2に減少
し、部分積の加算量が減る。また、部分積の加算回数を
n/3にした、三次のブースのアルゴリズムも知られて
いる。なお、ブースのアルゴリズムは良く知られてお
り、部分積を生成する乗算のアルゴリズムとして他のア
ルゴリズムを使用することもできる、等の理由により、
ブースのアルゴリズムについては詳述しない。
[0008] P = A / B In the secondary Booth's algorithm, n is reduced to n / 2 and the addition amount of partial products is reduced. A cubic Booth algorithm is also known in which the number of partial product additions is n / 3. Note that Booth's algorithm is well known, and other algorithms can be used as an algorithm for multiplication to generate a partial product.
The Booth algorithm is not detailed.

【0009】図10は、部分積生成回路101b及び部
分積加算用桁上げ保存加算器群101cを説明するもの
である。部分積生成回路101bが出力する、例えば、
12ビットの被乗数A及び乗数Bについての、部分積を
数値としての重み付をして配列した例を示している。同
図において、黒丸はある部分積を示している。部分積の
配列は、12ビットの被乗数A、12ビットの乗数B、
により、行方向に24ビット、列方向に12ビットであ
り、同一列は同一桁を示す。なお、同図に示される部分
積b0 a0 ,b0 a1 ,…,b11a11は、説明の便宜上
付されたものであり、上述した式の値に付される添字に
関連したものではない点に注意されたい。
FIG. 10 illustrates the partial product generation circuit 101b and the partial product addition carry save adder group 101c. The partial product generation circuit 101b outputs, for example,
An example is shown in which partial products of the 12-bit multiplicand A and multiplier B are weighted and arranged as numerical values. In the figure, a black circle indicates a partial product. The array of partial products is a 12-bit multiplicand A, a 12-bit multiplier B,
According to the above, there are 24 bits in the row direction and 12 bits in the column direction, and the same column indicates the same digit. Note that the partial products b0 a0, b0 a1, ..., B11 a11 shown in the figure are added for convenience of explanation, and are not related to the subscripts added to the values of the above expressions. I want to.

【0010】桁上げ保存加算器群101cは、生じた桁
上げを次段に繰上げるようにして桁上げを保存しなが
ら、各列の部分積を累積的に加算する。この累積加算に
はいわゆる木(ツリー)構造に配置された桁上げ保存加
算器(CPA:carry-save adder)、例えば、2進木やワラ
ス(Wallace )ツリーを用いる。
The carry save adder group 101c cumulatively adds the partial products of the respective columns while carrying the carried carry to the next stage and saving the carry. A carry save adder (CPA) arranged in a so-called tree structure, for example, a binary tree or a wallace tree is used for this cumulative addition.

【0011】図11は、部分積加算用桁上げ保存加算器
群101cにおいて、図10に点線で示す一列分(b0
a11,b1 a10,…,b11a0 )についての加算を担
う、ワラス・ツリー構造の加算器群を示している。ツリ
ーを構成する、桁上げ保存加算器4wは、4つの入力
と、1つの桁上げ入力との、5つの入力に対応して、1
つの和出力、2つの桁上げ出力を備える。第1段の、3
つの桁上げ保存加算器4wの各入力には、同一桁(同じ
重み)の部分積b0 a11,b1 a11,…,b11a0が入
力される。各部分積の和は、ツリー構造の第2段、第3
段の複数の加算器4wを伝搬し、図示しない桁上げ伝搬
加算器(CPA:carry-propagate adder )に出力される。
同図中、各加算器4wへの1つ下位の桁の図示しないワ
ラス・ツリーからの桁上げ入力及び1つ上の桁の図示し
ないワラス・ツリーへの桁上げ出力は、夫々三角の矢印
によって示されている。他の桁(列)のワラス・ツリー
も部分積の入力数に応じた加算器を備えて同様に、配列
分だけ構成される。
FIG. 11 shows the carry-save adder group 101c for partial product addition, which corresponds to one column (b0) indicated by the dotted line in FIG.
a11, b1 a10, ..., B11a0) is shown, which is a group of adders having a Wallace tree structure and which is responsible for addition. The carry save adder 4w forming the tree corresponds to four inputs and one carry input, and five 1
It has one sum output and two carry outputs. 1st stage, 3
Partial products b0 a11, b1 a11, ..., B11 a0 of the same digit (same weight) are input to the respective inputs of the carry save adder 4w. The sum of each partial product is the second and third stages of the tree structure.
The signal propagates through a plurality of adders 4w of stages and is output to a carry propagation adder (CPA: carry-propagate adder) not shown.
In the figure, the carry input from the Wallace tree (not shown) of the one lower digit to each adder 4w and the carry output to the Wallace tree (not shown) of the digit one above are shown by triangular arrows. It is shown. The Wallace trees of other digits (columns) also include adders according to the number of inputs of partial products, and are similarly configured by the array.

【0012】図12は、桁上げ保存加算器4wの構成例
を示している。加算器4wは、4つの入力d0 〜d3 か
ら桁上げ出力Cout を得る第1の論理回路グループと、
4つの入力d0 〜d3 の和と、下位桁からの桁上げ入力
とから和Sを得る第2の論理回路グループと、4つの入
力d0 〜d3 から生じる桁上げと、4つの入力d0 〜d
3 の和と、下位桁からの桁上げ入力Cinとから桁上げ出
力CCを得る第3の論理回路グループと、によって構成
される。
FIG. 12 shows a configuration example of the carry save adder 4w. The adder 4w includes a first logic circuit group for obtaining a carry output Cout from four inputs d0 to d3,
A second logic circuit group which obtains the sum S from the sum of the four inputs d0 to d3 and the carry input from the lower digit, the carry resulting from the four inputs d0 to d3 and the four inputs d0 to d.
And a third logic circuit group for obtaining a carry output CC from the carry input Cin from the lower digit.

【0013】このようにして、部分積生成回路101b
によって生成された被乗数A及び乗数Bについての複数
の部分積は、部分積加算用桁上げ保存加算器群(例え
ば、ワラス・ツリー)101cによって桁上がりが上位
の桁に伝搬するように加算処理される。各桁の和出力、
桁上がり出力が乗算アレイ101から桁上げ伝搬加算器
によって構成される最終加算器102に与えられ、桁上
がりが上位桁に伝搬する最終の加算が行われ、2進数の
形の積Pに整えられる。そして、この積Pと加算数Cと
の加算が加算器103によって行われ、A×B+Cの演
算結果が得られる。
In this way, the partial product generation circuit 101b
The plurality of partial products for the multiplicand A and the multiplier B generated by are subjected to addition processing by the carry save adder group for partial product addition (for example, Wallace tree) 101c so that the carry propagates to the upper digit. It Sum output of each digit,
The carry output is given from the multiplication array 101 to the final adder 102 constituted by the carry propagation adder, and the final addition is carried out so that the carry propagates to the upper digit, and the product P is arranged in the form of a binary number. . Then, the product P and the number of additions C are added by the adder 103, and the calculation result of A × B + C is obtained.

【0014】図13は、他の乗算器の構成例を示してお
り、同図において、図8と対応する部分には同一符号を
付し、かかる部分の説明は省略する。この例では、図8
に示される乗加減算器が乗算器と加算器とを連結して構
成されるのに対し、乗算器、加算器をバスやバイパス線
を介して接続することによって、独立した乗算器、加算
器を用いて乗加減算の演算を行う構成としている。この
構成では、乗加減算以外に、加算、乗算を独立に実行で
きるので演算の自由度が大きい利点がある。このため、
多くの汎用DSPをはじめ、汎用マイクロプロセッサの
殆どが、このような構成の演算器を実装している。
FIG. 13 shows an example of the configuration of another multiplier. In FIG. 13, parts corresponding to those in FIG. 8 are designated by the same reference numerals, and the description of those parts will be omitted. In this example, FIG.
The multiplier / adder shown in (1) is configured by connecting the multiplier and the adder, while the multiplier and the adder are connected via the bus or the bypass line, so that the independent multiplier and the adder can be connected. The configuration is used to perform multiplication, addition, and subtraction operations. With this configuration, addition and multiplication can be performed independently in addition to multiplication, addition and subtraction, so that there is an advantage that the degree of freedom in calculation is large. For this reason,
Most general-purpose microprocessors including many general-purpose DSPs are equipped with an arithmetic unit having such a configuration.

【0015】上述した乗算器と加算器とを直列に接続し
た形式の乗加減算器において不具合な点は、乗算終了後
に加算を行うため、独立した乗算器、加算器で夫々演算
を行った場合と、演算の実行時間に大差がないことであ
る。
A problem with the above-described multiplier adder / subtractor of the type in which the multiplier and the adder are connected in series is that the addition is performed after the end of the multiplication, so that the operation is performed by an independent multiplier and the adder respectively. , There is no big difference in the execution time of the calculation.

【0016】図14は、かかる不具合を改善した乗加減
算器(浮動小数点型)の一例を示している。この構成に
よれば、乗加減算の演算を乗算あるいは加算を行うのに
必要な実行時間と同等な時間で実行することができるも
のであり、以下に説明する。
FIG. 14 shows an example of a multiplier / adder / subtractor (floating point type) in which such a problem is improved. According to this configuration, the multiplication, addition, and subtraction operations can be executed in a time equivalent to the execution time required for multiplication or addition, which will be described below.

【0017】図14において、乗算アレイ201は、供
給される第1のオペランドAの仮数部Faと、第2のオ
ペランドBの仮数部Fbとの乗算を行う。乗算アレイ2
01は、前述したように、木状に接続された桁上げ保存
加算器(CSA)群によって構成されており、部分積が
キャリー・セーブ・フォーム(和成分Fss,キャリー
成分Fcc)で得られる。この例を図15に示す。桁合
わせシフタ202は、加算すべき第3のオペランドCの
仮数部Fcの桁合わせを行うためのバレルシフタであ
る。最終加算器903は、複数ビットの和成分Fss、
キャリー成分Fcc、オペランドCの仮数部Fcの3つ
の入力を桁上げ伝搬加算する、桁上げ伝搬加算器であ
る。キャリー・セーブ・フォーム(和成分Fss,キャ
リー成分Fcc)で求められた第1、第2のオペランド
の仮数部の積Fa×Fbを2進数に変換すると共に、第
3のオペランドの仮数部Fcの加算を行う。先行1検出
回路204は、正規化の為に必要なシフト数を求める。
正規化シフタ205は、演算結果Fbbの正規化用のバ
レルシフタ、丸め回路906は演算結果Fbbに丸め処
理を行う。
In FIG. 14, the multiplication array 201 multiplies the supplied mantissa part Fa of the first operand A and the supplied mantissa part Fb of the second operand B. Multiplication array 2
As described above, 01 is composed of a group of carry save adders (CSA) connected in a tree shape, and a partial product is obtained in a carry save form (sum component Fss, carry component Fcc). This example is shown in FIG. The digit alignment shifter 202 is a barrel shifter for performing digit alignment of the mantissa part Fc of the third operand C to be added. The final adder 903 has a multi-bit sum component Fss,
A carry propagation adder for carrying carry addition of three inputs of carry component Fcc and mantissa Fc of operand C. The product Fa × Fb of the mantissa parts of the first and second operands obtained by the carry save form (sum component Fss, carry component Fcc) is converted into a binary number, and the mantissa part Fc of the third operand is converted. Add. The leading 1 detection circuit 204 determines the number of shifts required for normalization.
The normalization shifter 205 is a barrel shifter for normalizing the calculation result Fbb, and the rounding circuit 906 rounds the calculation result Fbb.

【0018】次に、この乗加減算器における演算処理動
作について説明する。まず、第1、第2のオペランド
A,Bの仮数部Fa,Fbが、乗算アレイ201に入力
され乗算が行われる。積はキャリー・セーブ・フォーム
(和成分Fss,キャリー成分Fcc)で求められる。
オペランドCの仮数部Fcは桁合わせシフタに入力さ
れ、乗算処理に並行して桁合わせが行われる。桁合わせ
は、| Ea+Eb−Ec| だけ、シフトすることに
よって行われる。ここで、Ea,Eb,Ecは、オペラ
ンドA,B,Cの指数部である。積(和成分Fss,キ
ャリー成分Fcc)とオペランドFcは、3入力加算器
で加算され、2進数の乗加減算結果Fbbが求められ
る。乗加減算結果Fbbは、正規化され、さらに丸め処
理が行われる。
Next, the operation processing operation in this multiplier / subtractor will be described. First, the mantissa parts Fa and Fb of the first and second operands A and B are input to the multiplication array 201 and multiplication is performed. The product is obtained by the carry save form (sum component Fss, carry component Fcc).
The mantissa part Fc of the operand C is input to the digit alignment shifter, and digit alignment is performed in parallel with the multiplication process. Digit alignment is performed by shifting by | Ea + Eb-Ec |. Here, Ea, Eb, Ec are the exponent parts of the operands A, B, C. The product (sum component Fss, carry component Fcc) and operand Fc are added by a 3-input adder to obtain a binary addition / subtraction result Fbb. The multiplication / subtraction result Fbb is normalized and further rounded.

【0019】このように乗算アレイ201における乗算
と桁合わせシフタ202における桁合わせシフトとを並
行して実行し、積を求める最終加算(Fss+Fcc)
とオペランドFcとの加算を3入力加算器203を用い
て一度に実行することによって、乗加減算の演算を加
算、乗算と同じ実行時間内に実行することができる。
In this way, the final addition (Fss + Fcc) for performing multiplication in the multiplication array 201 and digit shift in the digit shifter 202 in parallel to obtain a product.
By executing the addition of the and the operand Fc at once using the 3-input adder 203, the multiplication / subtraction operation can be executed within the same execution time as the addition and the multiplication.

【0020】しかしながら、上記構成の乗加減算の演算
器においても別の不具合がある。すなわち、桁合わせを
行う桁合わせシフタ202、積の和成分Fss,キャリ
ー成分Fcc、及びオペランドFcを加算する3入力加
算器203、正規化シフトの為のシフト数を算出する先
行1検出回路204に、約160ビット(IEEE75
4規格浮動小数点倍精度の場合)のビット幅を必要とす
る。このため、ハードウェア量が増大し、実行速度の高
速化も妨げられている。(バレルシフタ)ところで、こ
のような演算装置においては、データを必要な量(桁
数)だけシフトするためにバレルシフタが用いられる。
バレルシフタにおいては、一般に、シフト量は2のべき
乗の数にて指定される。また、配線面積を最小とするた
めに、図27に示すような構成となっている。
However, there is another problem in the multiplier / adder / subtractor having the above configuration. That is, the digit shifter 202 that performs digit alignment, the three-input adder 203 that adds the product sum component Fss, the carry component Fcc, and the operand Fc, and the preceding 1 detection circuit 204 that calculates the shift number for the normalization shift. , About 160 bits (IEEE75
4 standard floating point double precision) is required. For this reason, the amount of hardware is increased, and the increase in execution speed is also hindered. (Barrel shifter) By the way, in such an arithmetic unit, a barrel shifter is used to shift data by a necessary amount (digit number).
In the barrel shifter, the shift amount is generally designated by a power of two. Further, in order to minimize the wiring area, the structure is as shown in FIG.

【0021】すなわち、データ入力におけるビット数を
n とした場合、図25に示すような2入力1出力のセ
レクタをn段使用して、バレルシフタを実現している。
このシフタが動作すると、信号の通過経路にあたるトラ
ンジスタ対がONとなることから、n×2n 対のトラン
ジスタにおいて電力が消費されることになる。また、バ
レルシフタの動作速度は信号が通過する経路上にあるト
ランジスタ対の数によって大きく支配されることから、
従来の構成においてはn段分のトランジスタ対による遅
延時間によって動作速度が決定づけられている。
That is, when the number of bits in the data input is 2 n , the barrel shifter is realized by using n stages of 2-input 1-output selectors as shown in FIG.
When this shifter operates, the transistor pair corresponding to the signal passing path is turned on, so that power is consumed in n × 2 n pairs of transistors. Also, since the operating speed of the barrel shifter is largely controlled by the number of transistor pairs on the path through which the signal passes,
In the conventional configuration, the operation speed is determined by the delay time due to the n-stage transistor pair.

【0022】一般に、計算機システムでは、いわゆるデ
ータのビットシフト演算のために右方向シフトと左方向
シフトの両方向のシフト機能を具備している必要があ
る。そこで、図28に示すような、左方向へのバレルシ
フタ及び右方向へのバレルシフタを別々に備え、データ
の左右へのシフト方向をセレクタによって選択してい
る。
Generally, a computer system is required to have a rightward shift function and a leftward shift function for a so-called data bit shift operation. Therefore, as shown in FIG. 28, a barrel shifter to the left and a barrel shifter to the right are separately provided, and the left and right shift directions of data are selected by the selector.

【0023】しかしながら、この構成においては配線量
の増加が顕著である。このため、図29に示すような、
左あるいは右への単一方向にのみシフトを行うバレルシ
フタの前後に、ビット順を逆転するビット順逆転回路を
付加することによって、ハード量の増加を抑えながら左
右両方向へのビットシフトを実現するものが提案されて
いる。この場合には、ビット順逆転回路による動作速度
の低下が大きな問題となる。
However, in this structure, the amount of wiring is remarkably increased. Therefore, as shown in FIG.
By adding a bit order inversion circuit that reverses the bit order before and after the barrel shifter that only shifts to the left or right in a single direction, bit shifting in both left and right directions is realized while suppressing an increase in the amount of hardware. Is proposed. In this case, the decrease of the operation speed due to the bit order inversion circuit becomes a big problem.

【0024】従って、高速、低消費電力、省面積といっ
た、大規模集積回路におけるニーズを全て満たすことは
困難であり、使用個所に応じた回路の使い分けがなされ
ている。
Therefore, it is difficult to meet all the needs of a large-scale integrated circuit such as high speed, low power consumption, and area saving, and the circuit is properly used according to the place of use.

【0025】[0025]

【発明が解決しようとする課題】[Problems to be Solved by the Invention]

(乗加減算器)このように、従来の乗加減算方式では演
算の実行に長時間を要する。また、乗加減算演算を高速
に実行するには非常にビット幅の大きい加算器、先行1
検出器等多くのハードウェアを必要とし、また、この点
が高速化の妨げとなっていた。
(Multiplication / subtraction device) As described above, in the conventional multiplication / subtraction system, it takes a long time to execute an operation. Also, in order to execute the multiplication / subtraction operation at high speed, an adder with a very large bit width
A lot of hardware such as a detector is required, and this point hinders the speedup.

【0026】よって、本発明は、比較的に少ないハード
ウェア構成で乗加減算の演算速度の高速化を実現し得る
乗加減算演算器を提供することを目的とする。 (バレルシフタ)上述したバレルシフタの従来技術にお
いては、高速、低消費電力、省面積、という、一般的に
相矛盾するような要求については、ある程度の妥協を余
儀なくされてている。すなわち、従来の構成におけるバ
レルシフタでは、他の加算器のような回路とは異なり、
シフタを構成しているセレクタ回路のほとんど全てが動
作することから消費電力が大きくなる傾向がある。動作
速度についても、高速であることが要求される。更に、
バレルシフタでは配線領域の占める面積が大きく、マイ
クロプロセッサ等における演算回路の回路面積について
決定的な要因となり得る。また、上述した乗加減算器の
コンパクト化、動作の高速化の実現のために、そこで用
いられるバレルシフタについてもコンパクトな構成、動
作の高速化の実現が求められている。
Therefore, it is an object of the present invention to provide a multiplication / addition / subtraction arithmetic unit which can realize a high-speed multiplication / subtraction arithmetic operation with a relatively small hardware configuration. (Barrel Shifter) In the above-described conventional barrel shifter technology, the requirements that are generally contradictory to each other, such as high speed, low power consumption, and area saving, have to be compromised to some extent. That is, in the barrel shifter in the conventional configuration, unlike the circuit like other adders,
Since almost all of the selector circuits constituting the shifter operate, power consumption tends to increase. The operating speed is also required to be high. Furthermore,
In the barrel shifter, the wiring area occupies a large area, which can be a decisive factor for the circuit area of the arithmetic circuit in a microprocessor or the like. In addition, in order to make the above-mentioned multiplier / subtractor compact and realize high-speed operation, it is required that the barrel shifter used therein also has a compact structure and high-speed operation.

【0027】よって、他の発明は、このバレルシフタに
対する相矛盾する省面積、高速、低消費電力という3つ
の要求を、高い次元で両立させることを目的とする。
Therefore, another object of the present invention is to satisfy the three requirements of the barrel shifter, which are contradictory area saving, high speed, and low power consumption, at a high level.

【0028】[0028]

【課題を解決するための手段】[Means for Solving the Problems]

(乗加減算器)上記目的を達成するために本発明の固定
小数点の乗加減算器は、入力される第1及び第2のオペ
ランドを乗算した乗算値と、入力される第3のオペラン
ドとの、加算あるいは減算を行う固定小数点演算の乗加
減算器において、所定乗算アルゴリズムに従って、上記
第1及び第2のオペランドに対応する複数の部分積を生
成する部分積生成回路と、上記複数の部分積の加算と、
上記第3のオペランドの加算若しくは減算とを、木構造
に配列された複数の加算器群によって行って減算して重
み付された複数の乗算中間値を出力する乗算アレイと、
上記複数の乗算中間値を加算して乗加減算値を求める桁
上げ伝搬型加算器と、を備えることを特徴とする。
(Multiply-adder / subtractor) In order to achieve the above object, the fixed-point multiplier-adder / subtractor of the present invention comprises a multiplication value obtained by multiplying input first and second operands, and an input third operand. A fixed-point multiplication-adder / subtractor that performs addition or subtraction, and a partial product generation circuit that generates a plurality of partial products corresponding to the first and second operands according to a predetermined multiplication algorithm, and addition of the plurality of partial products When,
A multiplication array that performs addition or subtraction of the third operand by a plurality of adder groups arranged in a tree structure, subtracts the output, and outputs a plurality of weighted multiplication intermediate values;
A carry propagation type adder for adding the plurality of intermediate values for multiplication to obtain a multiplication / subtraction value.

【0029】また、上記目的を達成するため本発明の浮
動小数点の乗加減算器は、入力される第1及び第2のオ
ペランドを乗算した乗算値と、入力される第3のオペラ
ンドとの、加算あるいは減算を行う浮動小数点演算の乗
加減算器において、所定乗算アルゴリズムに従って、上
記第1及び第2のオペランド各々の仮数部の各値に対応
する複数の部分積を生成する部分積生成回路と、上記第
3のオペランドの指数部の値が上記第1及び第2のオペ
ランドの積の指数部の値と等しくなるように、上記第3
のオペランドの仮数部の値の桁合わせを行うシフト回路
と、上記複数の部分積の加算と、桁合わせされた上記第
3のオペランドの仮数部の値のうち、上記第1及び第2
のオペランドの仮数部の積の演算に割当てられた桁数に
よって表される値内の、下位桁の各ディジットの値の加
算若しくは減算とを、木構造に配列された複数の加算器
群によって行って重み付された複数の乗算中間値を出力
する乗算アレイと、上記複数の乗算中間値を加算して下
位桁の乗加減算値を求める桁上げ伝搬型加算器と、桁合
わせされた上記第3のオペランドの仮数部の値のうち、
上記第1及び第2のオペランドの仮数部の積の演算に割
当てられた桁数によって表される値を超える、上位桁の
値と、上記桁上げ伝搬型加算器の桁上げ出力とを、加算
して上位桁出力値を得る増分加算器と、上記上位桁出力
値及び上記下位桁の乗加減算値をビット結合して最終乗
加減算値を得る手段と、を備えることを特徴とする。
Further, in order to achieve the above object, the floating-point multiplying / subtracting device of the present invention adds the multiplication value obtained by multiplying the input first and second operands with the input third operand. Alternatively, in a multiplicative adder / subtractor of a floating-point operation that performs subtraction, a partial product generation circuit that generates a plurality of partial products corresponding to respective values of the mantissa part of each of the first and second operands according to a predetermined multiplication algorithm; The value of the exponent part of the third operand is equal to the value of the exponent part of the product of the first and second operands.
A shift circuit that performs digit alignment of the mantissa value of the operand, an addition of the plurality of partial products, and digit alignment of the first and second digit values of the mantissa value of the third operand.
The addition or subtraction of the value of each digit of the lower digit in the value represented by the number of digits assigned to the product of the mantissa part of the operand of is performed by a group of adders arranged in a tree structure. A multiplying array for outputting a plurality of weighted intermediate intermediate values, a carry propagation adder for adding the plurality of intermediate intermediate values to obtain a multiplying / subtracting value of a lower digit, and the third digit aligned Of the mantissa value of the operand of
Add the value of the upper digit exceeding the value represented by the number of digits assigned to the operation of the mantissa product of the first and second operands and the carry output of the carry propagation adder. And an increment adder for obtaining an upper digit output value, and means for bit-combining the upper digit output value and the lower digit multiplication, addition, and subtraction values to obtain a final multiplication, addition, and subtraction value.

【0030】上記乗算アレイを構成する加算器群とし
て、和を和成分、桁上げ成分に分けて求める桁上げ保存
型加算器、冗長数を用いて加算するSD加算器、PD加
算器、全加算器等を用いることが可能である。 (バレルシフタ)上記目的を達成するために本発明のバ
レルシフタは、少なくともデータ入力、データ出力、制
御入力を持ち、入力されるデータを制御入力によって指
定されたビット数だけシフトして出力するバレルシフタ
において、供給されるl(整数)ビットからなる入力デ
ータから、4つのビット信号を出力するl個の信号シフ
ト手段と、各信号シフト手段が出力する4つのビット信
号の中から1つを選択するl個のセレクト手段と、供給
される制御入力をデコードして、各セレクト手段に選択
すべきビット信号を指令する制御信号を与える制御信号
生成手段と、を備え、上記l個の信号シフト手段のうち
i番目の信号シフト手段は、入力データのi番目のビッ
ト信号に対し、0ビット、n(整数)ビット、m(整
数)ビット、m+nビット、ビット位置をシフトした位
置にある4つのビット信号を出力するようになされる、
ことを特徴とする。上記信号シフト手段及びセレクト手
段は、入力データのビット数、取扱うシフトビット数の
範囲に応じて所要段数だけ縦列接続される。なお、通常
はn及びmは、2のべき乗の数を用いる。
As a group of adders constituting the above-mentioned multiplication array, a carry-save adder for dividing a sum into a sum component and a carry component to obtain it, an SD adder for adding using a redundant number, a PD adder, and a full addition It is possible to use a container or the like. (Barrel shifter) To achieve the above object, the barrel shifter of the present invention has at least a data input, a data output, and a control input, and a barrel shifter that shifts the input data by the number of bits designated by the control input and outputs the shifted data, From the supplied input data consisting of 1 (integer) bits, 1 signal shift means for outputting 4 bit signals and 1 for selecting 1 from the 4 bit signals output by each signal shift means. Selecting means and decoding means for decoding the supplied control input to give a control signal for instructing each selecting means a bit signal to be selected. The th signal shift means is 0 bit, n (integer) bit, m (integer) bit, m + n for the i th bit signal of the input data. Tsu DOO is adapted to output four-bit signal at a position obtained by shifting the bit position,
It is characterized by the following. The signal shift means and the select means are cascade-connected by a required number of stages according to the number of bits of input data and the range of the number of shift bits to be handled. It should be noted that normally n and m use powers of two.

【0031】また、本発明の両方向シフトのバレルシフ
タは、少なくともデータ入力、データ出力、制御入力を
持ち、入力されるデータを制御入力によって指定された
ビット数だけシフトして出力するバレルシフタにおい
て、供給されるl(整数)ビットからなる入力データか
ら、4つのビット信号を出力するl個の第1の信号シフ
ト/ビット順逆転手段と、上記第1の信号シフト/ビッ
ト順逆転手段各々が出力する4つのビット信号の中から
1つを選択するl個の第1のセレクト手段と、上記l個
の第1のセレクト手段から入力されるl個の出力から、
4つのビット信号を出力するl個の信号シフト手段と、
各信号シフト手段が出力する4つのビット信号の中から
1つを選択するl個の第2のセレクト手段と、上記l個
の第2のセレクト手段から入力されるl個の出力から、
4つのビット信号を出力するl個の第2の信号シフト/
ビット順逆転手段と、前記第2の信号シフト/ビット順
逆転手段各々が出力する4つのビット信号の中から1つ
を選択するl個の第3のセレクト手段と、供給される制
御入力をデコードして、各セレクト手段に選択すべきビ
ット信号を指令する制御信号を与える制御信号生成手段
と、を備え、上記l個の第1の信号シフト/ビット順逆
転手段のうちi番目の第1の信号シフト/ビット順逆転
手段は、入力データのi番目のビット信号に対し、変化
なし、ビット順逆転、o(整数)ビットシフト、ビット
順逆転及びo(整数)ビットシフト、となる関係にある
4つのビット信号を出力し、上記l個の信号シフト手段
のうちi番目の信号シフト手段は、入力されるi番目の
ビット信号に対し、シフトなし、p(整数)+q(整
数)ビット、p(整数)ビット、q(整数)ビット、ビ
ット位置をシフトした位置にある4つのビット信号を出
力し、上記l個の第2の信号シフト/ビット順逆転手段
のうちi番目の第2の信号シフト/ビット順逆転手段
は、入力データのi番目のビット信号に対し、変化な
し、ビット順逆転、r(整数)ビットシフト、r(整
数)ビットシフト及びビット順逆転、となる関係にある
4つのビット信号を出力する、ことを特徴とする。信号
シフト手段及びセレクト手段は所要段数だけ縦続接続す
ることができる。
Further, the bidirectional shift barrel shifter of the present invention is provided in a barrel shifter which has at least a data input, a data output, and a control input, and shifts and outputs the input data by the number of bits designated by the control input. From the input data consisting of 1 (integer) bits, 1 first signal shift / bit order inversion means for outputting four bit signals and 4 output by each of the first signal shift / bit order inversion means. From the l first selecting means for selecting one from one bit signal and the l outputs inputted from the l first selecting means,
L signal shift means for outputting four bit signals,
From the l second select means for selecting one out of the four bit signals output by each signal shift means and the l output input from the l second select means,
L second signal shifts / outputting 4 bit signals /
Bit order inversion means, l third select means for selecting one from the four bit signals output by each of the second signal shift / bit order inversion means, and decoding of the supplied control input And a control signal generation means for giving a control signal for instructing a bit signal to be selected to each selection means, and the i-th first signal shift / bit order inversion means of the above l first signal shift / bit order inversion means. The signal shift / bit order inversion means has a relationship of no change, bit order inversion, o (integer) bit shift, bit order inversion and o (integer) bit shift with respect to the i-th bit signal of the input data. Four bit signals are output, and the i-th signal shift means among the l signal shift means does not shift the input i-th bit signal, p (integer) + q (integer) bits, p (Form ) Bits, q (integer) bits, and four bit signals at the bit position shifted positions are output, and the i-th second signal shift / of the l second signal shift / bit sequence inversion means is output. The bit order inversion means has four bits in a relationship of no change, bit order inversion, r (integer) bit shift, r (integer) bit shift and bit order inversion with respect to the i-th bit signal of the input data. It is characterized by outputting a signal. The signal shift means and the select means can be connected in cascade for the required number of stages.

【0032】[0032]

【作用】[Action]

(乗加減算器)上記構成において、この発明では、まず
オペランドA、及びBの仮数部Fa,Fbが、乗算アレ
イに入力され乗算が行われる。乗算アレイは木状に接続
されたキャリー・セーブ・アダーで構成されており、積
はキャリー・セーブ・フォームで求められる。オペラン
ドCの仮数部Fcは桁合わせシフタに入力され、Fa,
Fbの乗算処理に並行して桁合わせが行われる。桁合わ
せは、|Ea+Eb−Ec| だけ、シフトすることに
よって行われる。ここで、Ea,Eb,Ecは、オペラ
ンドA,B,Cの指数部である。桁合わせシフト結果F
c shift は、(Fa×Fb)の各デジットと同じ桁にな
る部分Fc low とそれより上位の部分Fchighとに分割
される。Fc low は乗算アレイに入力され、部分積とと
もに加算され、積がキャリー・セーブ・フォーム(和成
分Fss,キャリー成分Fcc)で求められる。和成分
Fss,キャリー成分Fccは、最終加算器で加算さ
れ、乗加減算演算結果の下位側Fbb lowが求まる。ま
た、Fc highは、最終加算のキャリーの値によってイン
クリメントされ、乗加減算演算結果の上位側Fbb high
が求まる。また、インクリメント結果は、先行1検出回
路に入力され、正規化シフトに必要なシフト・ステップ
数を算出する。この結果をもとに、乗加減算演算結果F
bb(Fbb high とFbb lowのビット結合)は正規化さ
れ、丸め処理が施される。 (バレルシフタ)入力データのビット長がLであると
き、本発明のバレルシフタにおける第1の構成において
は信号シフト手段ならびにセレクト手段を所要段数だけ
縦続接続したものを入力データの各ビットに対応する数
Lだけ並列に設けておき、与えられたシフトビット数か
らセレクト手段を動作させるための制御信号生成手段か
らの制御信号を、並列に並んでいる各ビット位置のセレ
クト手段に供給する。このとき、並列に並んでいるセレ
クト手段については、それぞれ同一の制御信号によって
動作することから、制御信号生成手段は垂直方向の各セ
レクト手段毎に一つあれば足りることになる。これらの
手段により、入力されたデータは各々の信号シフト手段
+セレクト手段においてビット位置を順次変更されてい
き、最後に所望のビット数だけシフトした結果が得られ
る。ここで、L=2n (nは整数)である場合について
考えると、従来の2入力1出力のセレクト手段を用いた
構成では、信号が入力されてから出力に現われるまで
に、合計n段のセレクト手段を通過することになるが、
本発明による構成ではn/2段(nが奇数である場合は
n/2+1段)のセレクト手段を通過するだけで済むこ
とになり、高速化ならびに消費電力の低減を図ることが
できる。さらには、通常信号シフト手段とセレクト手段
とは入力データのビット列に対して垂直方向に段組みさ
れていることから、これらの手段を結合する配線におい
て、従来の2入力1出力セレクタを用いた方式では2組
必要となるのに対し、本発明による構成では1組で済
む。しかも、トランジスタのスイッチング確立を平均で
25%低減できることから、更に消費電力を低減でき
る。また、セレクト手段に使用される素子の数は、2入
力1出力のセレクト手段を用いた場合に対して、8入力
1出力等の、4入力1出力以外の構成とした場合には増
加してしまうのに対し、4入力1出力のセレクト手段を
用いた場合には全く同じとなることから、ハードウエア
の増加量は最小限に抑えられることになる。
(Multiply Adder / Subtractor) In the present invention, in the present invention, first, the mantissa parts Fa and Fb of the operands A and B are input to the multiplication array and multiplication is performed. The multiplication array is composed of carry save adders connected in a tree shape, and the product is obtained by the carry save form. The mantissa part Fc of the operand C is input to the digit adjustment shifter, and Fa,
Digit alignment is performed in parallel with the multiplication process of Fb. Digit alignment is performed by shifting by | Ea + Eb-Ec |. Here, Ea, Eb, Ec are the exponent parts of the operands A, B, C. Digit alignment shift result F
The c shift is divided into a portion Fc low having the same digit as each digit of (Fa × Fb) and a higher portion Fc high. Fc low is input to the multiplication array and added together with the partial product, and the product is obtained in the carry save form (sum component Fss, carry component Fcc). The sum component Fss and the carry component Fcc are added by the final adder to obtain the lower side Fbb low of the multiplication / subtraction operation result. Further, Fc high is incremented by the carry value of the final addition, and the higher-order side Fbb high of the multiplication / subtraction calculation result is obtained.
Is required. Further, the increment result is input to the leading 1 detection circuit, and the number of shift steps required for the normalization shift is calculated. Based on this result, the multiplication / subtraction operation result F
bb (bit combination of Fbb high and Fbb low) is normalized and rounded. (Barrel shifter) When the bit length of the input data is L, in the first configuration of the barrel shifter of the present invention, a number L corresponding to each bit of the input data is obtained by cascade-connecting the required number of signal shift means and select means. However, the control signal from the control signal generating means for operating the selecting means from the given number of shift bits is supplied to the selecting means at each bit position arranged in parallel. At this time, since the selecting means arranged in parallel are operated by the same control signal, only one control signal generating means is required for each selecting means in the vertical direction. By these means, the bit position of the input data is sequentially changed in each signal shift means + select means, and finally the result obtained by shifting the desired number of bits is obtained. Here, considering the case where L = 2 n (n is an integer), in the configuration using the conventional 2-input 1-output select means, there are n stages in total from the input of a signal to the output. It will pass the selection means,
With the configuration according to the present invention, it suffices to pass through n / 2 stages (n / 2 + 1 stages when n is an odd number) of the selection means, so that speeding up and reduction in power consumption can be achieved. Furthermore, since the normal signal shift means and the select means are vertically stacked with respect to the bit string of the input data, the conventional 2-input 1-output selector is used in the wiring connecting these means. In contrast, two sets are required, whereas the configuration according to the present invention requires only one set. Moreover, since the switching probability of the transistor can be reduced by 25% on average, the power consumption can be further reduced. Further, the number of elements used in the selecting means is increased when the configuration other than 4 inputs and 1 output such as 8 inputs and 1 output is used as compared with the case where the selecting means having 2 inputs and 1 output is used. On the other hand, when the 4-input 1-output select means is used, the same result is obtained, and the increase in hardware can be minimized.

【0033】また、本発明のバレルシフタにおける第2
の構成においては、データ入力に近い側に、ビット順逆
転を行った後にシフトビット数の大きなシフトを行える
ような信号シフト/ビット順逆転手段ならびにセレクト
手段を縦続接続したものを入力データのビット長Lだけ
並列に設けておき、これに引き続いて、第1の構成にお
ける信号シフト手段+セレクト手段を所要段数だけ縦続
接続してあり、最後にシフトビット数の大きなシフトを
行った後にビット順逆転を行えるような信号シフト/ビ
ット順逆転手段を接続する。このとき、制御信号生成手
段においては、異なる2つの量のシフトビット数に応じ
て制御信号を生成するものに加えて、あるシフトビット
量のシフト及び、ビット順逆転の有無に応じて制御信号
を生成するものを、この構成におけるシフトの最初と最
後のセレクタ段に対して用いる。まず、ビット順逆転を
行わない場合には、この最初と最後のセレクタ段におい
ては、ビット位置のシフトのみが行われ、ある方向への
ビットシフトが全体として行われることになる。そし
て、最初と最後の段において、ビット順逆転を行うと、
入力されたデータはまずビット順を逆転されたのちに所
定の量だけのビットシフト操作を受け、最後にもう一度
ビット順を逆転されることによって、逆方向へのシフト
動作が実現される。このとき、第1の構成におけると同
様の理由によって、従来の2入力1出力セレクタを用い
たシフタの前後にビット逆転機構を設けた構成に対し
て、信号が通過するセレクタの段数が大幅に減少する。
よって、シフト動作の高速化ならびに低消費電力化が達
成できる。さらには、入力データのビット数を2n (n
は整数)とした時には、通常ビット順逆転を行うために
は2n 本の配線が入力データのビット列に対して並行に
配置され、配線領域の増加によるシフタ回路面積の増大
が問題となるが、本発明による構成では、この2n 本分
の配線を、2n-1 及び2n-2 ビットシフトを行うための
配線として共用することができるため、配線領域の面積
を2n-1 及び2n-2 本分低減することができる。また、
このとき入力データビット列に平行して敷設される配線
の最大長は、入力データビット列の横方向の長さに一致
するが、従来の構成ではビット順逆転を行ってから最大
ビット長のシフトを行うという最悪のケースでは、信号
が通過しなければならない配線長は、入力データビット
列の横方向の長さに、シフトによってビット位置が移動
する長さを加えたものとなることから、本発明により配
線による負荷容量を低減できる。なお、ビット順を逆転
させるための配線を具備していることから、ビット順の
変更をシフトの前後にて行う、あるいは単純にビット順
を逆転するような演算も可能である。
The second aspect of the barrel shifter of the present invention
In the above configuration, a signal shift / bit order inversion means and a select means that are connected in cascade so that a large shift bit number can be shifted after performing bit order inversion on the side closer to the data input is the bit length of the input data. Only L are provided in parallel, and subsequently, the signal shift means + select means in the first configuration are cascade-connected by a required number of stages, and finally, a bit order inversion is performed after a large shift bit number shift. Connect signal shift / bit order inversion means as possible. At this time, the control signal generation means generates a control signal in accordance with two different amounts of shift bits, and also generates a control signal in accordance with the shift of a certain shift bit amount and the presence / absence of bit order inversion. What is produced is used for the first and last selector stages of the shift in this configuration. First, when bit order inversion is not performed, only the bit positions are shifted in the first and last selector stages, and the bit shift in a certain direction is performed as a whole. Then, when bit order inversion is performed in the first and last stages,
The input data is first bit-reversed and then subjected to a bit shift operation by a predetermined amount, and finally the bit order is re-inverted once again, whereby a shift operation in the reverse direction is realized. At this time, for the same reason as in the first configuration, the number of selector stages through which the signal passes is significantly reduced compared to the configuration in which the bit inversion mechanism is provided before and after the shifter using the conventional 2-input 1-output selector. To do.
Therefore, speeding up of the shift operation and low power consumption can be achieved. Furthermore, the number of bits of input data is 2 n (n
Is an integer), 2 n wirings are normally arranged in parallel to the bit string of the input data in order to perform bit order inversion, and an increase in the wiring area causes an increase in the shifter circuit area. in the arrangement according to the present invention, the wiring of the 2 n duty, 2 n-1 and 2 it is possible to share as a wiring for performing the n-2 bit shifting, the area of the wiring region 2 n-1 and 2 It can be reduced by n-2 lines. Also,
At this time, the maximum length of the wiring laid parallel to the input data bit string matches the horizontal length of the input data bit string, but in the conventional configuration, the bit order is reversed before the maximum bit length is shifted. In the worst case, the wiring length through which the signal must pass is the horizontal length of the input data bit string plus the length by which the bit position moves due to the shift. Can reduce the load capacity. Since the wiring for reversing the bit order is provided, it is possible to perform the operation of changing the bit order before and after the shift or simply reversing the bit order.

【0034】[0034]

【実施例】以下、本発明の乗加減算器の実施例について
図面を参照して説明する。図1は、本発明の第1の実施
例である固定小数点乗加減算器を示すブロック図であ
り、同図において、図8と対応する部分には同一符号を
付している。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the multiplier / subtractor of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a fixed-point multiplication / addition device according to a first embodiment of the present invention. In FIG. 1, parts corresponding to those in FIG.

【0035】この実施例の固定小数点乗加減算器は、乗
算アレイ301において、オペランドA及びBの重み付
された部分積を累積的に加算する木(ツリー)構造の加
算器群を利用してオペランドCを加算若しくは減算し、
加算結果を桁上げ伝搬加算器である最終加算器102に
よって2進数の形に整える。
The fixed point multiplication adder / subtractor of this embodiment uses an adder group of a tree structure for cumulatively adding the weighted partial products of the operands A and B in the multiplication array 301. Add or subtract C,
The addition result is arranged in the form of a binary number by the final adder 102 which is a carry propagation adder.

【0036】図2は、乗算アレイ301の構成例を示し
ており、まず、図9に示す従来例とと同様に、供給され
る2つのオペランドA及びBの乗算を行う。乗算アレイ
301は、例えば、2次のブースのアルゴリズムを用い
ており、2次のブースのリコーダ301a、部分積生成
回路301b、部分積加算用桁上げ保存加算器群(例え
ば、ワラス・ツリー)301c、により構成される。2
4ビット固定小数点の演算を行う場合には、2次のブー
スのアルゴリズムにより、12個の部分積が生成され、
ツリー構造の桁上げ保存加算器群で加算される。積は、
キャリー・セーブ・フォーム(和成分Fssとキャリー
成分Fcc)で算出される。
FIG. 2 shows an example of the structure of the multiplication array 301. First, as in the conventional example shown in FIG. 9, two supplied operands A and B are multiplied. The multiplication array 301 uses, for example, a quadratic Booth algorithm, and has a quadratic Booth recorder 301a, a partial product generation circuit 301b, and a carry save adder group for partial product addition (for example, Wallace tree) 301c. ,,. Two
When performing 4-bit fixed point arithmetic, 12 partial products are generated by the second order Booth's algorithm,
It is added by a carry save adder group having a tree structure. The product is
It is calculated by the carry save form (sum component Fss and carry component Fcc).

【0037】図3は、部分積生成回路301b及び部分
積加算用桁上げ保存加算器群301cを説明するもので
あり、同図において図10と対応する部分には同一符号
を付している。この図は、部分積生成回路101bが出
力する、例えば、12ビットの被乗数A及び乗数Bにつ
いての、部分積を数値としての重み付をして配列した例
を概念的に示している。同図において、黒丸はある部分
積を示している。部分積の配列は、12ビットの被乗数
A、12ビットの乗数B、により、行方向に24ビッ
ト、列方向に12ビットであり、同一列は同一桁を示
す。なお、同図に示される部分積b0 a0 ,b0 a1 ,
…,b11a11は、説明の便宜上付されたものである。こ
の部分積の配列の中に、オペランドC(=c11,c10,
…,c1 ,c0 )が桁合せして配置される。減算の場合
はオペランドCの補数の加算となる(以下、同様であ
る)。
FIG. 3 illustrates the partial product generation circuit 301b and the carry save adder group 301c for partial product addition. In FIG. 3, parts corresponding to those in FIG. 10 are designated by the same reference numerals. This drawing conceptually shows an example in which partial products of, for example, a 12-bit multiplicand A and a multiplier B output from the partial product generation circuit 101b are weighted as numerical values and arranged. In the figure, a black circle indicates a partial product. The array of the partial products is 24 bits in the row direction and 12 bits in the column direction according to the multiplicand A of 12 bits and the multiplier B of 12 bits, and the same column indicates the same digit. The partial products b0 a0, b0 a1,
..., b11a11 are added for convenience of explanation. In the array of this partial product, the operand C (= c11, c10,
,, c1, c0) are aligned and arranged. In the case of subtraction, the complement of operand C is added (the same applies hereinafter).

【0038】桁上げ保存加算器群301cは、生じた桁
上げを次段に繰上げるようにして桁上げを保存しなが
ら、各列の部分積を累積的に加算する。この累積加算に
はいわゆる木構造に配置された桁上げ保存加算器(CPA
)、例えば、2進木やワラス・ツリーを用いる。
The carry save adder group 301c cumulatively adds the partial products of the respective columns while carrying the carried carry to the next stage and saving the carry. For this cumulative addition, a carry save adder (CPA) arranged in a so-called tree structure is used.
), For example, a binary tree or a Wallace tree is used.

【0039】図4は、部分積加算用桁上げ保存加算器群
301cにおいて、図3に点線で示す一列分(b0 a1
1,b1 a10,…,b11a0 )についての加算を担う、
ワラス・ツリー構造の加算器群を示している。ツリーを
構成する、桁上げ保存加算器4wは、図12に示される
ものと同じであり、4つの入力と、1つの桁上げ入力と
の、5つの入力に対応して、1つの和出力、2つの桁上
げ出力を備える。また、桁上げ保存加算器3wは、3つ
の入力に対応して、1つの和出力、1つの桁上げ出力を
備える全加算器である。第1段の、3つの桁上げ保存加
算器4wの各入力には、同一桁(同じ重み)の部分積b
0 a11,b1 a11,…,b11a0 が加えられる。第2段
の加算器3wには、オペランドCのc11あるいはその補
数が入力される。各部分積の和は、ツリー構造の第2
段、第3段の複数の加算器4wを伝搬し、オペランドC
の1ビット分c11が加算されて、図示しない桁上げ伝搬
加算器(CPA )である最終加算器102に出力される。
同図中、各加算器4w,3wへの1つ下位の桁の図示し
ないワラス・ツリーからの桁上げ入力及び1つ上の桁の
図示しないワラス・ツリーへの桁上げ出力は、夫々三角
の矢印によって示されている。他の桁(列)のワラス・
ツリーも部分積の入力数に応じた数の加算器、オペラン
ドCを部分積に加え合わせる加算器を備えて同様に、配
列分(桁数分)だけ構成される。
FIG. 4 shows the carry-save adder group 301c for partial product addition, which corresponds to one column (b0 a1) indicated by the dotted line in FIG.
, B1 a10, ..., b11 a0)
The adder group of a Wallace tree structure is shown. The carry save adder 4w forming the tree is the same as that shown in FIG. 12, and one sum output corresponding to five inputs of four inputs and one carry input, It has two carry outputs. The carry save adder 3w is a full adder having one sum output and one carry output corresponding to the three inputs. For each input of the three carry save adders 4w in the first stage, partial products b of the same digit (same weight)
0 a11, b1 a11, ..., B11 a0 are added. The c11 of the operand C or its complement is input to the adder 3w in the second stage. The sum of each partial product is the second of the tree structure.
Stage and third stage multiple adders 4w propagate to operand C
Is added to the final adder 102, which is a carry propagation adder (CPA) (not shown).
In the figure, the carry input to the adders 4w and 3w from the Wallace tree (not shown) of the next lower digit and the carry output to the Wallace tree (not shown) of the next upper digit are triangular. It is indicated by an arrow. Wallas of other digits
The tree is also provided with an adder of a number corresponding to the number of inputs of the partial product and an adder for adding the operand C to the partial product, and is similarly configured by the array portion (number of digits).

【0040】このように、本乗算アレイ301で最も重
要かつ特徴的な点は、図4に示すように外部より他の値
Ci を入力することができ、この値Ci を部分積と同様
にワラス・アレイの中で部分積の加算と同時に加算(あ
るいはcの補数の加算による減算)をすることができる
ことである。図4では全加算器をツリー構造の加算器群
(ワラス・ツリー)に挿入して外部からの入力を実現し
た。全加算器を挿入することが、本乗算アレイのクリテ
ィカル・パスに全く影響を与えない利点に着目すべきで
ある。
As described above, the most important and characteristic point of the multiplication array 301 is that it is possible to input another value Ci from the outside as shown in FIG. It is possible to perform addition (or subtraction by addition of complement of c) at the same time as addition of partial products in the array. In FIG. 4, the full adder is inserted into a tree-structured adder group (Walrus tree) to realize external input. It should be noted that inserting the full adder has no effect on the critical path of the present multiplying array.

【0041】最終加算器102は、キャリー・セーブ・
フォーム(桁上げ成分Fcc、和成分Fss)で出力さ
れたアレイ出力を2進数に変換する、例えば、24ビッ
トのオペランドA及びBの入力に対応して48ビットを
出力する桁上げ伝搬加算器である。なお、乗算アレイを
構成する加算器群として、上述した和を和成分、桁上げ
成分に分けて求める桁上げ保存型加算器の他、冗長数を
用いて加算するSD加算器、PD加算器、全加算器等を
用いることが可能である。
The final adder 102 is a carry save
A carry propagation adder that converts the array output output in the form (carry component Fcc, sum component Fss) into a binary number, for example, outputs 48 bits corresponding to the inputs of 24-bit operands A and B is there. As a group of adders constituting the multiplication array, in addition to the carry-save adder that finds the above sum by dividing it into a sum component and a carry component, an SD adder, a PD adder that adds using a redundant number, It is possible to use a full adder or the like.

【0042】次に、本乗加減算器の動作を説明する。ま
ず、第1及び第2のオペランドA,Bは、乗算アレイ3
01に入力され乗算が行われる。乗算アルゴリズムとし
て2次のブースのアルゴリズムを用いた場合、12個の
部分積が、全加算器4wにより構成される、同じ重み
(同じ桁)の部分積の和を得るワラス・ツリーで加算さ
れる。ワラス・ツリーは、各桁毎に設けられ、ある桁の
ツリーにおける桁上げ分が次段のツリーで加算されるよ
うにして逐次的に加算される。一方、第3のオペランド
Cも乗算アレイ301に入力され、オペランドCの各桁
に対応するワラス・ツリーの加算器によってオペランド
Cの各桁の値が同じ重みの部分積と直接加算される。こ
の結果、乗算アレイからは、キャリー・セーブ・フォー
ムで乗加減算の演算結果A×B+Cが算出される。最終
加算器では、キャリー・セーブ・フォームで求められた
乗加減算の演算結果A×B+Cが2進数に変換される。
Next, the operation of the main adder / subtractor will be described. First, the first and second operands A and B are the multiplication array 3
01 is input and multiplication is performed. When the secondary Booth's algorithm is used as the multiplication algorithm, 12 partial products are added by the Wallace tree configured by the full adder 4w to obtain the sum of partial products of the same weight (same digit). . The Wallace tree is provided for each digit, and the carry portion in the tree of a certain digit is added sequentially in the tree of the next stage. On the other hand, the third operand C is also input to the multiplication array 301, and the value of each digit of the operand C is directly added to the partial product of the same weight by the adder of the Wallace tree corresponding to each digit of the operand C. As a result, the multiplication / subtraction operation result A × B + C is calculated in the carry save form from the multiplication array. The final adder converts the multiplication / subtraction operation result A × B + C obtained by the carry save form into a binary number.

【0043】このように第3のオペランドCの加算を乗
算アレイ301で(A×B)を求める部分積の加算と同
時に行うことによって、第1、第2のオペランドの積
(A×B)と第3のオペランドCを加算する加算器10
3、203を省略することができる。これによって、高
速化かつ省ハードウェアである乗加減算の演算器を実現
することが可能となる。
Thus, the addition of the third operand C is performed at the same time as the addition of the partial products for obtaining (A × B) in the multiplication array 301, so that the product (A × B) of the first and second operands is obtained. Adder 10 for adding the third operand C
3, 203 can be omitted. As a result, it is possible to realize a multiplier / adder / subtractor arithmetic unit that is faster and saves hardware.

【0044】次に、第2の実施例について説明する。上
述した固定小数点乗加減算器を浮動小数点乗加減算器の
仮数部演算器に用いることによって、同様に高速化、省
ハードウェア化を図った浮動小数点乗加減算器を得るこ
とが可能となる。図5は、このような例を示す浮動小数
点乗加減算器の仮数部演算器を示したブロック図であ
る。
Next, the second embodiment will be described. By using the above-mentioned fixed-point multiplication / subtraction device as the mantissa arithmetic unit of the floating-point multiplication / subtraction device, it is possible to obtain a floating-point multiplication / subtraction device that also has high speed and reduced hardware. FIG. 5 is a block diagram showing the mantissa arithmetic unit of the floating point adder / subtractor showing such an example.

【0045】同図において、乗加減算器は、乗算アレイ
401、最終加算器402、桁合せシフタ403、イン
クリメンタ(増分加算器)404、先行1検出回路40
5、正規化シフタ406、丸め回路407によって構成
される。A×B+Cの演算を行う浮動小数点乗加減算器
の場合、積(A×B)の値よりも、Cの値が大きい場合
がある。そこで、この構成では、オペランドA,Bの仮
数部の積(Fa×Fb)を表す2進値とオペランドCの
仮数部Fcを表わす2進値とが共通する桁幅(下位ビッ
トFc low )の部分について、乗算アレイ401を用い
て加算処理(Fa×Fb+Fc low )を行う。Fcが
(Fa×Fb)を表す2進値の桁幅を超える桁幅の部分
(上位ビットFc high)については、そのままFc high
を出力する。ただし、加算処理(Fa×Fb+Fc low
)において桁上げが生じた場合、インクリメンタ40
4によってFc highに「1」を付加える。そして、正規
化シフタに、(Fa×Fb+Fc low )と、Fc highあ
るいは桁上げによってインクリメントされたFc high+
1とを、入力して、桁を揃えたFa×Fb+Fcの2進
値表示を得、Fc highにおいて「1」となる先頭のビッ
ト位置(桁)を判別する先行1の検出結果に対応して正
規化する。そして、丸め回路407によって規定の丸め
処理を行う。
In the figure, the multiplier / adder is a multiplication array 401, a final adder 402, a digit alignment shifter 403, an incrementer (incremental adder) 404, a leading 1 detection circuit 40.
5, a normalization shifter 406, and a rounding circuit 407. In the case of a floating-point multiplication adder / subtractor that performs the operation of A × B + C, the value of C may be larger than the value of the product (A × B). Therefore, in this configuration, the binary value representing the product (Fa × Fb) of the mantissa parts of the operands A and B and the binary value representing the mantissa part Fc of the operand C have a common digit width (lower bit Fc low). For the portion, addition processing (Fa × Fb + Fc low) is performed using the multiplication array 401. For the part of the digit width (higher-order bit Fc high) where Fc exceeds the digit width of the binary value representing (Fa × Fb), it is Fc high as it is.
Is output. However, addition processing (Fa x Fb + Fc low
), The incrementer 40
Add "1" to Fc high by 4. Then, in the normalization shifter, (Fa × Fb + Fc low) and Fc high or Fc high + incremented by carry
By inputting 1 and, the binary value display of Fa × Fb + Fc with aligned digits is obtained, and corresponding to the detection result of the preceding 1 which determines the leading bit position (digit) which becomes “1” in Fc high. Normalize. Then, the rounding circuit 407 performs a prescribed rounding process.

【0046】次に、各部について説明する。乗算アレイ
401は、入力される正規化された2つのオペランドA
及びBの仮数部Fa及びFbの乗算を行う。乗算アレイ
401は、図1に示される乗算アレイ301と同様の構
成である。例えば、2次のブースのアルゴリズムを用い
ており、図2に示したような、2次のブースのリコー
ダ、部分積生成回路、部分積加算用桁上げ保存加算器群
(例えば、ワラス・ツリー)、によって構成される。倍
精度の演算を行う場合には、27個の部分積が生成さ
れ、これらの各部分積はワラス・ツリーで加算され、キ
ャリー・セーブ・フォーム(桁上げ成分Fcc,和成分
Fss)で積が算出される。
Next, each part will be described. The multiplication array 401 receives two normalized operands A
And the mantissa parts Fa and Fb of B are multiplied. The multiplication array 401 has the same configuration as the multiplication array 301 shown in FIG. For example, a secondary booth algorithm is used, and a secondary booth recorder, a partial product generation circuit, and a carry save adder group for partial product addition (for example, Wallace Tree) as shown in FIG. , Composed by. When performing a double-precision operation, 27 partial products are generated, each of these partial products is added by the Wallace tree, and the product is carried by the carry save form (carry component Fcc, sum component Fss). It is calculated.

【0047】図6は、第2の実施例における桁上げ保存
加算器4wを用いたワラス・ツリーの構成図である。4
段に配列された桁上げ保存加算器4wと、その間に挿入
された桁上げ保存加算器3wにより構成されている。前
述したように、桁上げ保存加算器4wは、4つの入力
と、1つの桁上げ入力との、5つの入力に対応して、1
つの和出力、2つの桁上げ出力を備える。また、桁上げ
保存加算器3wは、3つの入力に対応して、1つの和出
力、1つの桁上げ出力を備える。
FIG. 6 is a block diagram of a Wallace tree using the carry save adder 4w in the second embodiment. Four
It is composed of a carry save adder 4w arranged in stages and a carry save adder 3w inserted therebetween. As described above, the carry save adder 4w corresponds to four inputs, one carry input, and five inputs.
It has one sum output and two carry outputs. The carry save adder 3w has one sum output and one carry output corresponding to the three inputs.

【0048】この乗算アレイ401で最も重要かつ特徴
的な点は、図4に示されるワラス・ツリーと同様に、外
部より他の値を入力することができ、部分積と同様にツ
リー構造(例えば、ワラス・ツリー)に配列された加算
器群のアレイの中で部分積の加算と同時に加算すること
ができることである。図6では、ワラス・ツリーに、3
つの入力に対応して、1つの和出力、1つの桁上げ出力
を備える全加算器3wを挿入して外部からの入力を可能
とした。ワラス・ツリーに全加算器3wを挿入しても、
乗算アレイ301の演算時間に関するクリティカル・パ
スに全く影響を与えていない。
The most important and characteristic point of this multiplication array 401 is that other values can be input from the outside like the Wallace tree shown in FIG. , Wallace Tree) can be added at the same time as the addition of partial products in an array of adders. In Figure 6, the Wallace tree has 3
Corresponding to one input, a full adder 3w having one sum output and one carry output was inserted to enable input from the outside. Even if the full adder 3w is inserted in the Wallace tree,
It has no effect on the critical path for the computation time of the multiplication array 301.

【0049】桁合わせシフタ403は、正規化された第
3のオペランドCの仮数部Fcと、乗算アレイ401内
に得られる積(Fa×Fb)との、桁合わせを行う、例
えば、106ビットのバレル・シフタである。桁合わせ
シフタ403には、シフト・ステップ数として3つのオ
ペランドの指数部より求められた値| Ea+Eb−E
c| が入力され、その分だけオペランドCの仮数部F
cがシフトされる。前述したように、Ea,Eb,Ec
は、夫々オペランドA,B,Cの指数部である。
The digit alignment shifter 403 performs digit alignment between the normalized mantissa part Fc of the third operand C and the product (Fa × Fb) obtained in the multiplication array 401, for example, of 106 bits. It is a barrel shifter. In the digit alignment shifter 403, the value obtained from the exponent part of the three operands as the number of shift steps | Ea + Eb−E
c | is input, and the mantissa part F of the operand C is input correspondingly.
c is shifted. As mentioned above, Ea, Eb, Ec
Are the exponents of operands A, B, and C, respectively.

【0050】仮数部Fcの桁合わせシフト結果Fc shif
t は、積(Fa×Fb)の各デジットと同じ桁になる部
分Fc low と、それより上位の部分Fc highとに分割さ
れる。Fc low は乗算アレイ401に入力され、Fc hi
ghはインクリメンタ404に入力される。
Digit adjustment shift result of mantissa Fc Fc shif
t is divided into a portion Fc low having the same digit as each digit of the product (Fa × Fb) and a higher portion Fc high. Fc low is input to the multiplication array 401, and Fc hi
gh is input to the incrementer 404.

【0051】最終加算器402は、キャリー・セーブ・
フォームで出力されたアレイ出力(和成分Fss,桁上
げ成分Fcc)を2進数Fbb lowに変換する106ビッ
トの桁上げ伝搬加算器である。Fbb lowは、正規化シフ
タ106に入力される。また、キャリーccは、インク
リメンタ404に入力される。
The final adder 402 is a carry save
It is a 106-bit carry propagation adder that converts the array output (sum component Fss, carry component Fcc) output in the form into a binary number Fbb low. Fbb low is input to the normalization shifter 106. The carry cc is also input to the incrementer 404.

【0052】インクリメンタ404は、乗加減算の演算
結果の上位部分Fbb high を計算する53bビットのイ
ンクリメンタである。インクリメンタ404では、Fc
high+1を求め、最終加算器402のキャリーCCの値
によって、Fc high+1,Fc highのいずれかを選択、
Fbb high として出力する。先行1検出回路405に、
Fbb high が入力され先行「1」の位置が検出される。
出力値Snormは、正規化シフトのステップ数として、正
規化シフタ406に入力される。
The incrementer 404 is a 53b-bit incrementer for calculating the upper part Fbb high of the multiplication / subtraction operation result. In incrementer 404, Fc
high + 1 is obtained, and either Fc high + 1 or Fc high is selected according to the carry CC value of the final adder 402,
Output as Fbb high. In the leading 1 detection circuit 405,
Fbb high is input and the position of the leading "1" is detected.
The output value Snorm is input to the normalization shifter 406 as the number of normalization shift steps.

【0053】正規化シフタ406は、乗加減算の演算結
果Fbb(Fbb high ,Fbb lowのビット結合)の正規
化を行うバレル・シフタである。53ビット幅の先行1
検出回路405の出力Snormだけ左にシフトされた出力
Fnを得る。丸め回路407は、例えば、IEEE 7
54規格に従って、出力Fnの丸め処理を行い、最終演
算結果Fmacを得る。
The normalization shifter 406 is a barrel shifter for normalizing the multiplication / subtraction operation result Fbb (bit combination of Fbb high and Fbb low). 53 bits wide leading 1
The output Fn shifted to the left by the output Snorm of the detection circuit 405 is obtained. The rounding circuit 407 is, for example, IEEE 7
According to the H.54 standard, the output Fn is rounded to obtain the final calculation result Fmac.

【0054】次に、第2の実施例における(浮動小数
点)乗加減算器のより詳細な動作について、図5及び図
7を参照して説明する。図7は、乗加減算器におけるデ
ータ信号の流れを表している。
Next, a more detailed operation of the (floating point) multiplier adder / subtractor in the second embodiment will be described with reference to FIGS. FIG. 7 shows the flow of data signals in the multiplier / subtractor.

【0055】まず、正規化されている第1のオペランド
Aの仮数部Fa及び第2のオペランドBの仮数部Fb
は、乗算アレイ401に入力され乗算が行われる。本実
施例では、2次のブースのアルゴリズムを用いているの
で、27個の部分積が4段の4−2コンパクタ(加算器
4w)により構成されるワラス・ツリー(図6)で加算
される。一方、正規化されている第3のオペランドCの
仮数部Fcは、桁合わせシフタ403に入力され、乗算
アレイ401におけるFa,Fbの乗算処理に並行して
桁合わせが行われる。桁合わせは、オペランドA,B及
びC各々の指数部である、Ea,Eb及びEcに基づい
て、| Ea+Eb−Ec| だけシフトすることによ
って行われる。桁合わせシフト結果Fc shift は、積
(Fa×Fb)の各デジットと同じ桁になる部分Fc lo
w と、積(Fa×F)の桁幅を超える上位の部分Fc hi
ghとに分割される。
First, the normalized mantissa part Fa of the first operand A and the normalized mantissa part Fb of the second operand B are normalized.
Is input to the multiplication array 401 and multiplication is performed. Since the second-order Booth's algorithm is used in this embodiment, 27 partial products are added by the Wallace tree (FIG. 6) constituted by four stages of 4-2 compactors (adders 4w). . On the other hand, the normalized mantissa part Fc of the third operand C is input to the digit alignment shifter 403, and digit alignment is performed in parallel with the multiplication processing of Fa and Fb in the multiplication array 401. The digit alignment is performed by shifting by | Ea + Eb−Ec | based on Ea, Eb, and Ec which are exponents of the operands A, B, and C, respectively. The digit alignment shift result Fc shift is a portion Fc lo that has the same digit as each digit of the product (Fa × Fb).
w and the upper part Fc hi that exceeds the digit width of the product (Fa × F)
split into gh and.

【0056】Fc low は乗算アレイ401に入力され、
部分積と共にワラス・ツリーで加算され、乗加減算の演
算結果の下位部分がキャリー・セーブ・フォーム(和成
分Fss,キャリー成分Fcc)で求められる。これら
の和成分Fss,キャリー成分Fccは、最終加算器4
02で加算され、2進数の乗加減算の演算結果の下位部
分Fbb lowが算出される。この際、キャリーオーバが発
生すると、このオーバ分をFc highのビット幅に担わせ
るべく、最終加算器402のキャリー出力CCは、イン
クリメンタ404に入力される。
Fc low is input to the multiplication array 401,
The partial product is added in the Wallace tree, and the lower part of the multiplication / subtraction operation result is obtained in the carry save form (sum component Fss, carry component Fcc). These sum component Fss and carry component Fcc are added to the final adder 4
02 is added to calculate the lower part Fbb low of the operation result of binary addition / subtraction. At this time, when a carry-over occurs, the carry output CC of the final adder 402 is input to the incrementer 404 so that the bit width of Fc high can be covered by the carry-over.

【0057】一方、桁合わせシフト結果Fc shift の上
位部分Fc highはインクリメンタ404に入力される。
Fc highからFc high+1が生成される。インクリメン
タ404において、最終加算器402のキャリーCCの
値が「1」のとき、Fc high+1が選択され、キャリー
CCの値が「0」のとき、Fc highが選択される。選択
されたFc high+1あるいはFc highが、乗加減算の演
算結果の上位部分Fbbhigh として出力される。また、
インクリメンタ404の出力Fbb high は先行1検出回
路405に入力され、正規化シフトに必要なシフト・ス
テップ数Snormが算出される。乗加減算の演算結果Fbb
high 及びFbb lowはビット結合され、正規化シフタ1
06においてシフト・ステップ数Snorm分だけシフトさ
れ、正規化される。正規化された正規化結果Fnは、丸
め回路107において、有効桁数に満たない下位ビット
(sticky)について、例えば、IEEE−754に準じ
た丸めが施され、乗加減算の演算結果Fmacを得る。
On the other hand, the upper part Fc high of the digit alignment shift result Fc shift is input to the incrementer 404.
Fc high + 1 is generated from Fc high. In the incrementer 404, Fc high + 1 is selected when the carry CC value of the final adder 402 is "1", and Fc high is selected when the carry CC value is "0". The selected Fc high + 1 or Fc high is output as the upper part Fbbhigh of the multiplication / subtraction operation result. Also,
The output Fbb high of the incrementer 404 is input to the preceding 1 detection circuit 405, and the number of shift steps Snorm required for the normalized shift is calculated. Multiplication addition / subtraction operation result Fbb
high and Fbb low are bit-combined and normalized shifter 1
At 06, the number of shift steps is shifted by Snorm and normalized. The normalized normalization result Fn is rounded by the rounding circuit 107 for lower bits (sticky) less than the number of significant digits according to, for example, IEEE-754, and a multiplication / subtraction operation result Fmac is obtained.

【0058】このように、第3のオペランドCの加算を
乗算アレイ401で行うことにより、従来、約160ビ
ットのビット幅を必要とした、乗加減算器を構成する桁
合せシフタ202、加算器203、先行1検出器204
等の演算モジュールのビット幅を減らした構成を得るこ
とが可能となる。これによって、乗加減算の演算速度の
高速化を実現することができる。 (バレルシフタ)次に、乗加減算器等の演算装置におい
て、データをシフトするために用いられるバレルシフタ
の改良について説明する。第1の実施例を図16を参照
して説明する。同図は、入出力データ長が16ビットで
あり、シフト量を4ビット長の2進数値b8 b4 b2 b
1 にて指定する単一方向バレルシフタの機能ブロック図
を示している。この例では、8、4、2、1ビットのシ
フトを行うかどうかを選択することによって、指定され
たシフト量だけのシフトを実現する。8ビット及び4ビ
ットのシフトは、1組の信号シフト手段と、4入力1出
力のセレクト手段とにて行われる。同様に、2ビット及
び1ビットのシフトは、1組のシフト段と、4入力1出
力のセレクト手段とにて実現される。
As described above, by performing the addition of the third operand C by the multiplication array 401, conventionally, a digit shifter 202 and an adder 203, which constitute a multiplication / subtraction device, which required a bit width of about 160 bits. , Leading one detector 204
It is possible to obtain a configuration in which the bit width of the arithmetic module etc. is reduced. As a result, it is possible to realize a higher calculation speed for multiplication, addition and subtraction. (Barrel Shifter) Next, the improvement of the barrel shifter used for shifting data in an arithmetic unit such as a multiplier / subtractor will be described. A first embodiment will be described with reference to FIG. In this figure, the input / output data length is 16 bits, and the shift amount is a 4-bit binary value b8 b4 b2 b.
The functional block diagram of the unidirectional barrel shifter specified in 1 is shown. In this example, by selecting whether or not the shift of 8, 4, 2, 1 bits is performed, the shift by the designated shift amount is realized. 8-bit and 4-bit shifts are performed by a pair of signal shift means and 4-input 1-output select means. Similarly, 2-bit and 1-bit shifts are realized by a pair of shift stages and 4-input 1-output select means.

【0059】図17は、図16に示された、初段の8ビ
ット+4ビットシフトを行う4入力1出力のセレクト手
段ならびにセレクト手段を適切に動作させるための制御
信号を生成するセレクタ制御信号生成手段の構成例を示
している。図16に示される16ビット長のシフタを構
成するためには、もう一段、2ビット+1ビットシフト
に対応する機構を縦続接続する。ここでは、セレクタ制
御信号生成手段に入力された2ビットのシフト量指示信
号をデコードして、4入力1出力のトランスミッション
ゲート形セレクタのトランジスタのうち、1組のpチャ
ネル及びnチャネルトランジスタを導通させることによ
り、信号シフト手段によって供給された信号の内の適切
なものを次の段あるいは出力に伝えるようになってい
る。このシフタについて、シフト量制御入力によって1
3ビットのシフトが指示された場合について考えて見
る。13ビットというシフト量を2進数値にて表現する
と、(1101)となることから、8ビット、4ビット
及び1ビットシフトを行えば良いことになる。このこと
を図16にて考えると、まず、初段の8ビット+4ビッ
トシフト段においては、合計12ビットのシフトが行わ
れることになり、続く2ビット+1ビットのシフト段に
おいては、1ビットのシフトが行われることから、両段
合わせて13ビットのシフトが実現される。例えば、デ
ータ入力においてビット16にあったデータは、最初の
8ビット+4ビットシフト段において、ビット位置が1
2ビット右方向にシフトされ、ビット位置が4ビット目
に相当する位置にまで移動する。その後、2ビット+1
ビットシフト段において、1ビットだけ右方向にシフト
される結果、最終的には入力されたビット位置(16)
から13ビットだけ右にシフトした3ビット目のビット
位置にデータが現われる。
FIG. 17 is a 4-input 1-output selecting means for shifting 8 bits + 4 bits in the first stage shown in FIG. 16 and a selector control signal generating means for generating a control signal for properly operating the selecting means. The example of composition of is shown. In order to form the 16-bit length shifter shown in FIG. 16, another mechanism corresponding to 2 bits + 1 bit shift is connected in cascade. Here, the 2-bit shift amount instruction signal input to the selector control signal generation means is decoded to make one set of p-channel and n-channel transistors conductive among the transistors of the 4-input 1-output transmission gate type selector. Thus, the appropriate one of the signals supplied by the signal shifting means is transmitted to the next stage or output. About this shifter, 1 by the shift amount control input
Consider the case where a 3-bit shift is instructed. When the shift amount of 13 bits is expressed by a binary value, it becomes (1101), so it is sufficient to perform 8-bit, 4-bit and 1-bit shifts. Considering this in FIG. 16, first, in the first 8-bit + 4-bit shift stage, a total of 12 bits are shifted, and in the subsequent 2-bit + 1-bit shift stage, 1-bit shift is performed. Therefore, a 13-bit shift is realized in both stages. For example, the data in bit 16 at the data input has a bit position of 1 in the first 8 bit + 4 bit shift stage.
It is shifted to the right by 2 bits and the bit position is moved to a position corresponding to the 4th bit. Then 2 bits + 1
In the bit shift stage, as a result of shifting rightward by 1 bit, the bit position (16) finally input
The data appears at the third bit position, which is shifted to the right by 13 bits from.

【0060】図18は、図17において示した8ビット
+4ビットシフト段における信号シフト手段ならびにセ
レクト手段の構成を示している。
FIG. 18 shows the structure of the signal shift means and the select means in the 8-bit + 4-bit shift stage shown in FIG.

【0061】また、図24は、従来の構成によって、8
ビットシフト及び4ビットシフトを独立して実行する場
合の信号シフト手段ならびにセレクト手段の接続形態を
示している。この場合、信号シフト手段の配線が縦方向
に占める面積は8本(図中配線8本分の高さとして示さ
れている)+4本(同じく、配線4本分の高さとして示
されている)=12本の配線によって決定されるが、本
発明による図18の構成においても同じく12本分の配
線面積となることから、構成を変更することによる信号
シフト手段の占有面積の変化(増加)はないことにな
る。また、図19に示す、本発明における4入力1出力
セレクト手段をトランスミッションゲートにて構成した
場合の回路と、図25に示す、これと等価な従来の構成
による回路とを比較すると、セレクタを動作させるため
の制御信号線の本数が従来の4本から本発明における構
成では8本と増加しはするものの、トランジスタの数と
しては全く同じであり、制御信号線を除いてはハードウ
エアの増加はない。
In addition, FIG. 24 shows a conventional configuration of 8
The connection form of the signal shift means and the select means in the case of independently performing the bit shift and the 4-bit shift is shown. In this case, the area occupied by the wirings of the signal shift means in the vertical direction is 8 (shown as the height of 8 wirings in the figure) + 4 (also shown as the height of 4 wirings). ) = 12 wirings, but the wiring area for 12 wirings is also obtained in the configuration of FIG. 18 according to the present invention. Therefore, the area occupied by the signal shift means is changed (increased) by changing the configuration. There will be no. Further, comparing the circuit shown in FIG. 19 in which the 4-input 1-output selecting means of the present invention is configured with a transmission gate with the circuit shown in FIG. 25 having the equivalent conventional structure, the selector operates. Although the number of control signal lines for increasing the number is increased from eight in the conventional configuration to eight in the configuration of the present invention, the number of transistors is exactly the same, and the hardware is not increased except for the control signal lines. Absent.

【0062】図19及び図25で、データ信号がそれぞ
れ上部から入力されて、出力されるまでの経路について
考えてみると、従来の構成では2つのトランジスタ対を
通過するのに対して、本発明による構成では1つのトラ
ンジスタ対を通過するだけであることから、信号経路に
おけるインピーダンスが半分に低下し、信号通過時の遅
延時間が減少するのと同時に、トランジスタ対における
電力消費量が減少することになる。
19 and 25, considering the paths from the input of the data signal to the output of the data signal, the data signal passes through two transistor pairs in the conventional configuration. Since only one transistor pair is passed in the configuration according to, the impedance in the signal path is reduced to half, and the delay time at the time of passing the signal is reduced, and at the same time, the power consumption in the transistor pair is reduced. Become.

【0063】すなわち、本発明のバレルシフタの第1の
実施例においては、セレクタの制御信号線の本数が若干
増加するが、制御信号を生成するためのハードウエアが
増加する代償として、シフタの高速化ならびに低消費電
力化を図れることになる。
That is, in the first embodiment of the barrel shifter of the present invention, although the number of control signal lines of the selector is slightly increased, the speed of the shifter is increased at the cost of increased hardware for generating the control signal. In addition, low power consumption can be achieved.

【0064】図20はこの第1の実施例について、1段
のセレクタ段において実行されるビットシフト量の組み
合わせを変更したものであり、8ビット/1ビットシフ
トと、4ビット/2ビットシフトとを、それぞれ足し合
わせた数、すなわち図18に示したような信号シフト手
段における横方向の配線の長さがほぼ等しくなるような
構成とすることによって、それぞれのセレクト手段にお
ける負荷容量を均等化させ、セレクタ段の前後に信号強
化用のバッファ回路を用いるような場合において、負荷
容量分担の設計を容易にするといった応用が可能であ
る。
FIG. 20 shows a modification of the combination of bit shift amounts executed in one selector stage in the first embodiment, that is, 8 bit / 1 bit shift and 4 bit / 2 bit shift. By equalizing the load capacities in the respective selecting means by making the total number of wirings, that is, the lengths of the horizontal wirings in the signal shifting means as shown in FIG. In the case where a buffer circuit for signal enhancement is used before and after the selector stage, the application of facilitating the design of load capacity sharing is possible.

【0065】図21に、本発明のバレルシフタの第2の
実施例を示す。この実施例は、入出力データ長が16ビ
ットであり、シフト量が4ビット長の2進数値にて指定
され、シフト方向が1ビットの信号にて指定される、両
方向バレルシフタである。この例では、データ入力側か
らデータ出力側に向って順に、ビット順逆転+8ビット
シフト、2ビットシフト+1ビットシフト、4ビットシ
フト+ビット順逆転を、それぞれ実行するセレクタ段
が、信号シフト/ビット順逆転手段あるいは信号シフト
手段に引き続いて接続されている。
FIG. 21 shows a second embodiment of the barrel shifter of the present invention. This embodiment is a bidirectional barrel shifter in which the input / output data length is 16 bits, the shift amount is designated by a 4-bit binary value, and the shift direction is designated by a 1-bit signal. In this example, selector stages that perform bit order inversion + 8 bit shift, 2 bit shift + 1 bit shift, 4 bit shift + bit order inversion in order from the data input side to the data output side are signal shift / bit. It is connected subsequently to the forward / reverse means or the signal shift means.

【0066】図22は、図21に示されるビット順逆転
を含むセレクト手段ならびにセレクタ制御信号生成手段
の構成例である。本発明のバレルシフタの第1の実施例
において2種類のシフト量を組み合わせる代わりに、1
種類のシフト量と、ビット順逆転操作とを組み合わせて
1段としているのが特徴である。そして、図21に示す
構成においては、その初段に図22に示すビット順逆転
+8ビットシフトを行うブロックを設置した後、第1の
実施例における図17に示すような構成を用いた2ビッ
ト+1ビットシフトを実行するブロックを縦続接続す
る。そして、最後に図21に示す構成において4ビット
シフトを行ってからビット順を逆転させる機能を持たせ
た機能ブロックを設置することによって、全体の両方向
バレルシフタを構成している。すなわち、4入力1出力
のセレクト手段を用いることによる特質は、第1の実施
例におけるものと同一であることになる。
FIG. 22 shows an example of the configuration of the selecting means and selector control signal generating means including the bit order inversion shown in FIG. Instead of combining two types of shift amounts in the first embodiment of the barrel shifter of the present invention,
The feature is that the shift amount of each kind and the bit order inversion operation are combined to form one stage. Then, in the configuration shown in FIG. 21, after the block for performing the bit order inversion + 8 bit shift shown in FIG. 22 is installed at the first stage, 2 bits + 1 using the configuration shown in FIG. 17 in the first embodiment. Cascade the blocks that perform bit shifting. Finally, in the configuration shown in FIG. 21, the entire bidirectional barrel shifter is configured by installing a functional block having a function of performing a 4-bit shift and then reversing the bit order. That is, the characteristics of using the 4-input 1-output select means are the same as those in the first embodiment.

【0067】ここで、図21に示す両方向シフタにおけ
るデータの流れについて説明する。例えば、13ビット
の右方向へのシフトを行う場合について考える。図21
に示したシフタにおいて、ビット順を逆転させない場合
に右方向へのシフトが行われるように信号シフト手段が
構成されているものとすると、まず、初段のビット順逆
転+8ビットシフト段においては、8ビット右シフトの
みが行われる。そして、次の2ビット+1ビットシフト
段において1ビットの右シフトが行われたのち、最後の
4ビットシフト+ビット順逆転段においては、4ビット
右シフトのみを実行することによって、全体で13ビッ
トの右シフトが実現される。すなわち、このシフタの初
段と最終段に設置されているビット順逆転機構を使用し
ないことによって、このシフタのディフォルトのシフト
方向である右方向へのシフトであることを指示し、入力
データのシフト量は、8ビットシフト+4ビットシフト
+1ビットシフトにより、13ビットシフトとなる。
The data flow in the bidirectional shifter shown in FIG. 21 will be described. For example, consider the case of shifting 13 bits to the right. Figure 21
In the shifter shown in FIG. 3, assuming that the signal shift means is configured so that the shift is performed to the right when the bit order is not reversed, first, in the first bit order inversion + 8 bit shift stage, Only bit shift right is performed. Then, after the right shift of 1 bit is performed in the next 2-bit + 1-bit shift stage, only the 4-bit right shift is executed in the last 4-bit shift + bit forward inversion stage, so that a total of 13 bits is obtained. The right shift of is realized. In other words, by not using the bit order inversion mechanism installed in the first stage and the last stage of this shifter, it is indicated that the shift is to the right, which is the default shift direction of this shifter. Becomes a 13-bit shift by 8 bit shift + 4 bit shift + 1 bit shift.

【0068】ここで、入力データにおけるビット位置が
16ビット目にあったデータが、シフタの13ビット右
シフトの操作によってどのように流れていくのかについ
て説明すると、初段のビット順逆転+8ビットシフト段
においては8ビットシフトのみの操作を受けて、16ビ
ット目にあったデータのビット位置が8ビット目に移動
する。続いて、2ビット+1ビットシフト段にて1ビッ
ト右シフトされて、ビット位置が7ビット目となる。そ
して、最後の4ビットシフト+ビット順逆転手段におい
ては、4ビットシフトのみが行われて、最終的にはデー
タは3ビット目の位置に現われる。当初の16ビット目
の位置から、13ビットシフトした3ビット目の位置に
データがシフトされることがわかる。
Here, it will be described how the data whose bit position in the input data is at the 16th bit flows by the operation of shifting the shifter 13 bits to the right. In, the bit position of the 16th bit data is moved to the 8th bit by the operation of only the 8 bit shift. Subsequently, the data is shifted right by 1 bit in the 2 bit + 1 bit shift stage, and the bit position becomes the 7th bit. Then, in the last 4-bit shift + bit order inversion means, only 4-bit shift is performed, and finally the data appears at the position of the third bit. It can be seen that the data is shifted from the initial position of the 16th bit to the position of the 3rd bit which is shifted by 13 bits.

【0069】13ビット左シフトの操作について説明す
る。この場合には、初段と最終段におけるビット順逆転
機構が両方動作する。まず、初段のビット順逆転+8ビ
ットシフト段においては、入力データのビット順を逆転
した後に8ビット右シフトする。これにより、例えば、
当初0ビット目にあったデータは、7ビット目の位置に
まで移動する。そして、2ビット+1ビットシフト段に
て1ビット右シフトされることによって6ビット目にビ
ット位置が移動する。最後の4ビットシフト+ビット順
逆転段においては、6ビット目のデータを4ビット右シ
フトした後にビット順を逆転させる。これにより、6ビ
ット目の位置から論理的にはまず2ビット目の位置に移
動した後、ビット順逆転によって13ビット目の位置に
移動することになる。0ビット位置のデータの13ビッ
ト位置への左シフトが達成される。
The operation of 13-bit left shift will be described. In this case, both the bit order inversion mechanism at the first stage and the last stage operate. First, in the bit order inversion + 8 bit shift stage of the first stage, the bit order of the input data is inverted and then right shifted by 8 bits. This gives, for example,
The data originally in the 0th bit moves to the position of the 7th bit. Then, the bit position is moved to the 6th bit by right shifting by 1 bit in the 2 bits + 1 bit shift stage. In the final 4-bit shift + bit order inversion stage, the bit order is reversed after right-shifting the sixth bit data by 4 bits. As a result, the position of the 6th bit is logically moved to the position of the 2nd bit and then to the position of the 13th bit by bit order inversion. A left shift of the 0 bit position data to the 13 bit position is achieved.

【0070】図23は、図22に示す信号シフト/ビッ
ト順逆転手段の構成例を示している。縦方向へは16本
分の配線スペースが必要となることが分かる。このと
き、配線容量が最大となる信号パスは、同図におけるb
0 から入力されて、x15に出力されるものであり、ちょ
うど入力データ列の横幅に相当する距離となる。
FIG. 23 shows a configuration example of the signal shift / bit order inversion means shown in FIG. It can be seen that 16 wiring spaces are required in the vertical direction. At this time, the signal path having the maximum wiring capacitance is b in FIG.
It is input from 0 and output to x15, which is exactly the width of the input data string.

【0071】図26は、同じ機能を有する信号シフト/
ビット順逆転手段を、従来の2入力1出力セレクト手段
を用いて構成した例を示している。この場合、ビット順
逆転のみを行う信号逆転手段においてすでに16本分の
縦方向への配線領域が必要となっている。さらには8ビ
ットシフトを行うための8本分の配線スペースが加わる
ことから、合わせて24本分の配線スペースが必要とな
る。すなわち、信号シフト/ビット順逆転手段に要する
配線領域の面積という観点では、本発明のバレルシフタ
を用いたものの方が小さくて済む。また、図26に示さ
れる従来の構成では、信号が入力されてから出力される
までの最長の信号パスは、同図中のb0 から入力されて
y15を経由してz7 に至るという経路であるが、本発明
による図23に示すものと比べると、y15からz7にい
たる配線長が余分に加わっている。従って、本発明のバ
レルシフタを用いることによって、信号の伝搬距離を短
縮することができるから、シフト動作の高速化を図るこ
とが可能となる。
FIG. 26 shows a signal shift / function having the same function.
An example in which the bit-order inversion means is configured by using the conventional 2-input 1-output select means is shown. In this case, the signal reversing means for performing only the bit order reversal already requires 16 wiring areas in the vertical direction. Furthermore, since a wiring space for 8 lines is added for performing 8-bit shift, a total of 24 wiring spaces are required. That is, from the viewpoint of the area of the wiring region required for the signal shift / bit order inversion means, the one using the barrel shifter of the present invention can be made smaller. Further, in the conventional configuration shown in FIG. 26, the longest signal path from the input of a signal to the output thereof is the path from b0 in the figure to z7 via y15. However, as compared with the one shown in FIG. 23 according to the present invention, an additional wiring length from y15 to z7 is added. Therefore, by using the barrel shifter of the present invention, the propagation distance of the signal can be shortened, and the shift operation can be speeded up.

【0072】[0072]

【発明の効果】【The invention's effect】

(乗加減算器)以上説明したように、本発明の乗加減算
器においては、オペランドA,B及びCの乗加減算(A
×B+C)の演算を行うに際し、第3のオペランドCの
加算を、第1及び第2のオペランドA,Bの乗算を行う
乗算アレイにおける部分積の加算と同時に行うようにし
たので、従来の乗加減算器に比較して、乗加減算器を構
成するシフタ、加算器、先行1検出器等の演算モジュー
ルのビット幅を減らしてコンパクトに構成することが可
能となり、乗加減算の演算速度をより一層高速化するこ
とが可能となる。 (バレルシフタ)シフトを行うセレクタを従来の2入力
1出力のものに対して4入力1出力のものを使用するこ
とによって、入力データ信号がシフトされて出力される
までに通過する信号経路のトランジスタ対の数を従来構
成に比して略1/2にまで減少させることが可能とな
り、信号の通過に要する時間が短縮される。よって、シ
フト動作の高速化及びがトランジスタの消費電力の低減
が達成される。
(Multiply-adder / subtractor) As described above, in the multiplier-adder / subtractor of the present invention, the multiplier-adder / subtractor (A
XB + C), the third operand C is added at the same time as the partial product addition in the multiplication array for multiplying the first and second operands A and B. Compared with the adder / subtractor, it is possible to reduce the bit width of the arithmetic modules such as the shifter, adder, and leading 1 detector that compose the adder-subtractor, and to make the arithmetic module more compact. Can be converted. (Barrel shifter) By using a selector for performing shift, which has four inputs and one output, as compared with the conventional one having two inputs and one output, a transistor pair of a signal path through which an input data signal is shifted and output is output. It is possible to reduce the number of H.sub.2 to about 1/2 as compared with the conventional configuration, and the time required for passing a signal is shortened. Therefore, speeding up of the shift operation and reduction of power consumption of the transistor can be achieved.

【0073】また、ビット順の逆転機構を利用した左右
両方向へのシフトにも同様に適用でき、配線面積の低減
と同時に低消費電力ならびに高速動作を達成することが
可能となる。勿論、本発明のバレルシフタを用いること
によって、乗算器等の演算装置のビット逆転演算を高速
かつ低消費電力にて実行することが可能となる。
Further, the invention can be similarly applied to the shift in both the left and right directions using the bit-order inversion mechanism, and it is possible to reduce the wiring area and at the same time achieve low power consumption and high-speed operation. Of course, by using the barrel shifter of the present invention, it becomes possible to execute the bit inversion operation of an arithmetic unit such as a multiplier at high speed and low power consumption.

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

【図1】本発明に係る乗加減算の構成を示すブロック
図。
FIG. 1 is a block diagram showing a configuration of multiplication, addition and subtraction according to the present invention.

【図2】本発明に係る乗加減算器における乗算アレイの
構成を示すブロック図。
FIG. 2 is a block diagram showing a configuration of a multiplication array in the multiplication / subtraction device according to the present invention.

【図3】ワラス・ツリーによる部分積と第3のオペラン
ドとの加算を説明する説明図。
FIG. 3 is an explanatory diagram illustrating addition of a partial product by a Wallace tree and a third operand.

【図4】加算器群によるワラス・ツリーの構成例を示す
説明図。
FIG. 4 is an explanatory diagram showing a configuration example of a Wallace tree by an adder group.

【図5】本発明に係る浮動小数点乗加減算器の構成を示
すブロック図。
FIG. 5 is a block diagram showing a configuration of a floating point multiplication adder / subtractor according to the present invention.

【図6】加算器群によるワラス・ツリーの構成例を示す
説明図。
FIG. 6 is an explanatory diagram showing a configuration example of a Wallace tree by an adder group.

【図7】本発明に係る浮動小数点乗加減算器の動作を説
明する説明図。
FIG. 7 is an explanatory diagram for explaining the operation of the floating point multiplication adder / subtractor according to the present invention.

【図8】従来の乗加減算器の構成例を示すブロック図。FIG. 8 is a block diagram showing a configuration example of a conventional multiplying / subtracting device.

【図9】従来の乗加減算器における乗算アレイの構成を
示すブロック図。
FIG. 9 is a block diagram showing a configuration of a multiplication array in a conventional multiplication / subtraction device.

【図10】ワラス・ツリーによる部分積の加算を説明す
る説明図。
FIG. 10 is an explanatory diagram illustrating addition of partial products by a Wallace tree.

【図11】加算器群によるワラス・ツリーの構成例を示
す説明図。
FIG. 11 is an explanatory diagram showing a configuration example of a Wallace tree by an adder group.

【図12】加算器4w(4−2コンパクタ)の構成例を
示す論理回路図。
FIG. 12 is a logic circuit diagram showing a configuration example of an adder 4w (4-2 compactor).

【図13】従来の乗加減算演算器の他の構成例を示すブ
ロック図。
FIG. 13 is a block diagram showing another configuration example of a conventional multiply-add / subtract arithmetic unit.

【図14】従来の浮動小数点乗加減算器の構成例を示す
ブロック図。
FIG. 14 is a block diagram showing a configuration example of a conventional floating point multiplication adder / subtractor.

【図15】乗算アレイ201におけるワラス・ツリーの
構成例を示すブロック図。
FIG. 15 is a block diagram showing a configuration example of a Wallace tree in the multiplication array 201.

【図16】本発明のバレルシフタの第1の実施例を示
す、16ビット長単一方向バレルシフタの構成図。
FIG. 16 is a configuration diagram of a 16-bit length unidirectional barrel shifter showing the first embodiment of the barrel shifter of the present invention.

【図17】第1の実施例において使用されるセレクト手
段、セレクタ制御信号生成手段及び周辺回路の構成例を
示すブロック図。
FIG. 17 is a block diagram showing a configuration example of a selection unit, a selector control signal generation unit and a peripheral circuit used in the first embodiment.

【図18】本発明による16ビット長バレルシフタの、
8ビット+4ビット信号シフト手段の構成例を示すブロ
ック図。
FIG. 18 shows a 16-bit length barrel shifter according to the present invention,
The block diagram which shows the structural example of 8-bit + 4-bit signal shift means.

【図19】本発明における4入力1出力セレクト手段の
構成例を示すブロック図。
FIG. 19 is a block diagram showing a configuration example of 4-input 1-output selecting means according to the present invention.

【図20】上記バレルシフタの第1の実施例を、負荷分
散を考慮して構成変更した例を示すブロック図。
FIG. 20 is a block diagram showing an example in which the configuration of the first embodiment of the barrel shifter is changed in consideration of load distribution.

【図21】第2の実施例である、16ビット長両方向バ
レルシフタの構成例を示すブロック図。
FIG. 21 is a block diagram showing a configuration example of a 16-bit long bidirectional barrel shifter which is a second embodiment.

【図22】第2の実施例において使用されるセレクト手
段、セレクタ制御信号生成手段及び周辺回路の構成例を
示すブロック図。
FIG. 22 is a block diagram showing a configuration example of a selection unit, a selector control signal generation unit, and a peripheral circuit used in the second embodiment.

【図23】第2の実施例における16ビット長両方向バ
レルシフタの8ビット信号シフト/ビット順逆転手段の
構成例を示すブロック図。
FIG. 23 is a block diagram showing a configuration example of 8-bit signal shift / bit order inversion means of a 16-bit length bidirectional barrel shifter in the second embodiment.

【図24】バレルシフタの従来構成における、16ビッ
ト長バレルシフタの8ビット及び4ビット信号シフト手
段の構成例を示すブロック図。
FIG. 24 is a block diagram showing a configuration example of 8-bit and 4-bit signal shifting means of a 16-bit length barrel shifter in a conventional barrel shifter configuration.

【図25】従来構成における2入力1出力セレクト手段
の構成例を示すブロック図。
FIG. 25 is a block diagram showing a configuration example of a 2-input 1-output selecting unit in a conventional configuration.

【図26】従来構成における16ビット長両方向バレル
シフタのビット順逆転手段ならびに8ビット信号シフト
手段の構成例を示すブロック図。
FIG. 26 is a block diagram showing a configuration example of bit order inversion means and 8-bit signal shift means of a 16-bit long bidirectional barrel shifter in a conventional configuration.

【図27】従来の単一方向バレルシフタの構成例を示す
ブロック図。
FIG. 27 is a block diagram showing a configuration example of a conventional unidirectional barrel shifter.

【図28】独立した左及び右シフタの出力を選択するこ
とによって両方向バレルシフタを構成した例を示すブロ
ック図。
FIG. 28 is a block diagram showing an example in which a bidirectional barrel shifter is configured by selecting outputs of independent left and right shifters.

【図29】従来の構成における、単一方向バレルシフタ
の前後に入力データのビットの並びを逆に配列するビッ
ト順逆転機構を設けた両方向バレルシフタの構成例を示
すブロック図。
FIG. 29 is a block diagram showing a configuration example of a bidirectional barrel shifter in which a bit order inversion mechanism that reversely arranges bits of input data is arranged before and after the unidirectional barrel shifter in the conventional configuration.

【符号の説明】[Explanation of symbols]

101,201,301,401 乗算アレイ 202, 403 桁合わせシフタ 102,203,402, 最終加算器 404 インクリメンタ 204,405 先行1検出回路 205,406 正規化シフタ 206,407 丸め回路 101, 201, 301, 401 Multiplying array 202, 403 Digit adjustment shifter 102, 203, 402, Final adder 404 Incrementer 204, 405 Leading 1 detection circuit 205, 406 Normalization shifter 206, 407 Rounding circuit

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G06F 17/10 ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI technical display location G06F 17/10

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】入力される第1及び第2のオペランドを乗
算した乗算値と、入力される第3のオペランドとの、加
算あるいは減算を行う固定小数点演算の乗加減算器であ
って、 所定乗算アルゴリズムに従って、前記第1及び第2のオ
ペランドに対応する複数の部分積を生成する部分積生成
回路と、 前記複数の部分積の加算と、前記第3のオペランドの加
算若しくは減算とを、木構造に配列された複数の加算器
群によって行って重み付された複数の乗算中間値を出力
する乗算アレイと、 前記複数の乗算中間値を加算して乗加減算値を求める桁
上げ伝搬型加算器と、 を備えることを特徴とする乗加減算器。
1. A multi-point adder / subtractor of fixed-point arithmetic for performing addition or subtraction between a multiplication value obtained by multiplying input first and second operands and an input third operand, which is a predetermined multiplication. According to an algorithm, a partial product generation circuit that generates a plurality of partial products corresponding to the first and second operands, an addition of the plurality of partial products, and an addition or subtraction of the third operand are performed in a tree structure. A multiplying array for outputting a plurality of weighted intermediate values of multiplication performed by a plurality of adder groups arranged in a plurality of groups, and a carry propagation type adder for adding the plurality of intermediate values of multiplication to obtain a multiplication / subtraction value A multiplicative adder / subtractor, comprising:
【請求項2】入力される第1及び第2のオペランドを乗
算した乗算値と、入力される第3のオペランドとの、加
算あるいは減算を行う浮動小数点演算の乗加減算器であ
って、 その仮数部演算器が、 所定乗算アルゴリズムに従って、前記第1及び第2のオ
ペランド各々の仮数部の各値に対応する複数の部分積を
生成する部分積生成回路と、 前記複数の部分積の加算と、前記第3のオペランドの仮
数部の値の加算若しくは減算とを、木構造に配列された
複数の加算器群によって行って重み付された複数の乗算
中間値を出力する乗算アレイと、 前記複数の乗算中間値を加算して乗加減算値を求める桁
上げ伝搬型加算器と、 を備えることを特徴とする乗加減算器。
2. A multiplicative adder / subtractor of a floating point operation for adding or subtracting a multiplication value obtained by multiplying an input first and second operand and an input third operand, the mantissa thereof A partial arithmetic unit for generating a plurality of partial products corresponding to respective values of the mantissa of each of the first and second operands according to a predetermined multiplication algorithm; and addition of the plurality of partial products, A multiplication array that performs addition or subtraction of the mantissa value of the third operand by a plurality of adder groups arranged in a tree structure, and outputs a plurality of weighted multiplication intermediate values; A carry-propagation adder for adding a multiplication intermediate value to obtain a multiplication addition / subtraction value, and a multiplication addition / subtraction device.
【請求項3】入力される第1及び第2のオペランドを乗
算した乗算値と、入力される第3のオペランドとの、加
算あるいは減算を行う浮動小数点演算の乗加減算器であ
って、 所定乗算アルゴリズムに従って、前記第1及び第2のオ
ペランド各々の仮数部の各値に対応する複数の部分積を
生成する部分積生成回路と、 前記第3のオペランドの指数部の値が前記第1及び第2
のオペランドの積の指数部の値と等しくなるように、前
記第3のオペランドの仮数部の値の桁合わせを行うシフ
ト回路と、 前記複数の部分積の加算と、桁合わせされた前記第3の
オペランドの仮数部の値の一部若しくは全部との加算又
は減算とを、木構造に配列された複数の加算器群によっ
て行って重み付された複数の乗算中間値を出力する乗算
アレイと、 前記複数の乗算中間値を加算して乗加減算の演算値を求
める桁上げ伝搬型加算器と、 を備える、ことを特徴とする乗加減算器。
3. A multiply-adder / subtractor for floating-point arithmetic, which performs addition or subtraction between a multiplication value obtained by multiplying input first and second operands and an input third operand, the multiplication being a predetermined multiplication. A partial product generation circuit for generating a plurality of partial products corresponding to respective mantissa values of the first and second operands according to an algorithm; and a value of an exponent part of the third operand for the first and second operands. Two
A shift circuit that performs digit adjustment of the mantissa value of the third operand so as to be equal to the exponent value of the product of the operands, the addition of the partial products, and the digit-adjusted third operation. A multiplication array that performs addition or subtraction with a part or all of the mantissa value of the operand of by a plurality of adder groups arranged in a tree structure and outputs a plurality of weighted intermediate intermediate values; A carry propagation adder for adding the plurality of intermediate values for multiplication to obtain a multiplication / subtraction operation value, and a multiplication / subtraction device.
【請求項4】入力される第1及び第2のオペランドを乗
算した乗算値と、入力される第3のオペランドとの、加
算あるいは減算を行う浮動小数点演算の乗加減算器であ
って、 所定乗算アルゴリズムに従って、前記第1及び第2のオ
ペランド各々の仮数部の各値に対応する複数の部分積を
生成する部分積生成回路と、 前記第3のオペランドの指数部の値が前記第1及び第2
のオペランドの積の指数部の値と等しくなるように、前
記第3のオペランドの仮数部の値の桁合わせを行うシフ
ト回路と、 前記複数の部分積の加算と、桁合わせされた前記第3の
オペランドの仮数部の値のうち、前記第1及び第2のオ
ペランドの仮数部の積の演算に割当てられた桁数によっ
て表される値内の、下位桁の各ディジットの値の加算若
しくは減算とを、木構造に配列された複数の加算器群に
よって行って重み付された複数の乗算中間値を出力する
乗算アレイと、 前記複数の乗算中間値を加算して下位桁の乗加減算値を
求める桁上げ伝搬型加算器と、 桁合わせされた前記第3のオペランドの仮数部の値のう
ち、前記第1及び第2のオペランドの仮数部の積の演算
に割当てられた桁数によって表される値を超える、上位
桁の値と、前記桁上げ伝搬型加算器の桁上げ出力とを、
加算して上位桁出力値を得る増分加算器と、 前記上位桁出力値及び前記下位桁の乗加減算値をビット
結合して最終乗加減算値を得る手段と、 を備えることを特徴とする乗加減算器。
4. A multiply-adder / subtractor of a floating-point operation for performing addition or subtraction between a multiplication value obtained by multiplying input first and second operands and an input third operand, wherein the predetermined multiplication is performed. A partial product generation circuit for generating a plurality of partial products corresponding to respective mantissa values of the first and second operands according to an algorithm; and a value of an exponent part of the third operand for the first and second operands. Two
A shift circuit that performs digit adjustment of the mantissa value of the third operand so as to be equal to the exponent value of the product of the operands, the addition of the partial products, and the digit-adjusted third operation. Addition or subtraction of the value of each digit of the lower digit in the value represented by the number of digits assigned to the operation of the product of the mantissas of the first and second operands of the value of the mantissa of the operand And a multiplication array that outputs a plurality of weighted multiplication intermediate values by a plurality of adder groups arranged in a tree structure, and the plurality of multiplication intermediate values are added to obtain the addition, subtraction value of the lower digit. The carry propagation adder to be obtained, and the number of digits assigned to the operation of the product of the mantissa parts of the first and second operands among the mantissa values of the third operand that have been aligned. The value of the upper digit that exceeds the value And the carry output of the carry propagation type adder,
An increment adder for adding to obtain an upper digit output value, and a means for bit-combining the upper digit output value and the lower and upper digit addition and subtraction values to obtain a final multiplication, addition and subtraction value. vessel.
【請求項5】前記乗算アレイを構成する加算器群とし
て、和を和成分、桁上げ成分に分けて求める桁上げ保存
型加算器、冗長数を用いて加算するSD加算器、PD加
算器、全加算器のうちいずれかが用いられることを特徴
とする請求項1乃至5のいずれか1つに記載の乗加減算
器。
5. A carry-save adder that divides a sum into a sum component and a carry component as an adder group that constitutes the multiplication array, an SD adder that adds using a redundant number, a PD adder, 6. The adder / subtractor according to claim 1, wherein any one of full adders is used.
【請求項6】少なくともデータ入力、データ出力、制御
入力を持ち、入力されるデータを制御入力によって指定
されたビット数だけシフトして出力するバレルシフタで
あって、 供給されるl(整数)ビットからなる入力データから、
4つのビット信号を出力するl個の信号シフト手段と、 各信号シフト手段が出力する4つのビット信号の中から
1つを選択するl個のセレクト手段と、 供給される制御入力をデコードして、各セレクト手段に
選択すべきビット信号を指令する制御信号を与える制御
信号生成手段と、を備え、 前記l個の信号シフト手段のうちi番目の信号シフト手
段は、入力データのi番目のビット信号に対し、0ビッ
ト、n(整数)ビット、m(整数)ビット、m+nビッ
ト、ビット位置をシフトした位置にある4つのビット信
号を出力するようになされる、 ことを特徴とするバレルシフタ。
6. A barrel shifter which has at least a data input, a data output and a control input, shifts the input data by the number of bits designated by the control input, and outputs the shifted data, from the supplied l (integer) bits. From the input data
L signal shift means for outputting four bit signals, l select means for selecting one from the four bit signals output by each signal shift means, and decoding the supplied control input , A control signal generation means for giving a control signal for instructing a bit signal to be selected to each selection means, wherein the i-th signal shift means of the l signal shift means is the i-th bit of the input data. The barrel shifter is characterized in that it outputs 0 bits, n (integer) bits, m (integer) bits, m + n bits, and 4 bit signals at positions where bit positions are shifted with respect to the signal.
【請求項7】少なくともデータ入力、データ出力、制御
入力を持ち、入力されるデータを制御入力によって指定
されたビット数だけシフトして出力するバレルシフタで
あって、 供給されるl(整数)ビットからなる入力データから、
4つのビット信号を出力するl個の第1の信号シフト/
ビット順逆転手段と、 前記第1の信号シフト/ビット順逆転手段各々が出力す
る4つのビット信号の中から1つを選択するl個の第1
のセレクト手段と、 前記l個の第1のセレクト手段から入力されるl個の出
力から、4つのビット信号を出力するl個の信号シフト
手段と、 各信号シフト手段が出力する4つのビット信号の中から
1つを選択するl個の第2のセレクト手段と、 前記l個の第2のセレクト手段から入力されるl個の出
力から、4つのビット信号を出力するl個の第2の信号
シフト/ビット順逆転手段と、 前記第2の信号シフト/ビット順逆転手段各々が出力す
る4つのビット信号の中から1つを選択するl個の第3
のセレクト手段と、 供給される制御入力をデコードして、各セレクト手段に
選択すべきビット信号を指令する制御信号を与える制御
信号生成手段と、を備え、 前記l個の第1の信号シフト/ビット順逆転手段のうち
i番目の第1の信号シフト/ビット順逆転手段は、入力
データのi番目のビット信号に対し、変化なし、ビット
順逆転、o(整数)ビットシフト、ビット順逆転及びo
(整数)ビットシフト、となる関係にある4つのビット
信号を出力し、 前記l個の信号シフト手段のうちi番目の信号シフト手
段は、入力されるi番目のビット信号に対し、シフトな
し、p(整数)+q(整数)ビット、p(整数)ビッ
ト、q(整数)ビット、ビット位置をシフトした位置に
ある4つのビット信号を出力し、 前記l個の第2の信号シフト/ビット順逆転手段のうち
i番目の第2の信号シフト/ビット順逆転手段は、入力
データのi番目のビット信号に対し、変化なし、ビット
順逆転、r(整数)ビットシフト、r(整数)ビットシ
フト及びビット順逆転、となる関係にある4つのビット
信号を出力する、 ことを特徴とする両方向シフトのバレルシフタ。
7. A barrel shifter which has at least a data input, a data output, and a control input, and shifts and outputs the input data by the number of bits designated by the control input, and from the supplied l (integer) bits. From the input data
L first signal shifts / outputting 4 bit signals /
Bit order inversion means, and l first first signals selecting one from four bit signals output by each of the first signal shift / bit order inversion means
Selecting means, l signal shifting means for outputting four bit signals from the l outputs inputted from the l first selecting means, and four bit signals outputted by each signal shifting means. From the l second select means for selecting one from among the 1 second outputs, and the l second outputs for outputting four bit signals from the l outputs inputted from the l second select means. A signal shift / bit order inversion means, and one third third one selecting one from the four bit signals output by each of the second signal shift / bit order inversion means.
Selection means and control signal generation means for decoding the supplied control input to give a control signal for instructing each selection means of a bit signal to be selected. The i-th first signal shift / bit order inversion means of the bit order inversion means does not change, bit order inversion, o (integer) bit shift, bit order inversion, and i-th bit signal of the input data. o
(Integer) bit shift, which outputs four bit signals, and the i-th signal shift means of the l signal shift means does not shift the input i-th bit signal, p (integer) + q (integer) bits, p (integer) bits, q (integer) bits, and outputs four bit signals at positions where bit positions are shifted, and the l second signal shift / bit order The i-th second signal shift / bit order inversion means of the inversion means does not change, bit order inversion, r (integer) bit shift, r (integer) bit shift with respect to the i-th bit signal of the input data. A bidirectional shift barrel shifter, which outputs four bit signals that are in a relationship of: and bit order inversion.
【請求項8】前記信号シフト手段及びセレクト手段が所
要段数だけ縦続接続されることを特徴とする請求項6又
は7記載のバレルシフタ。
8. The barrel shifter according to claim 6, wherein the signal shift means and the select means are connected in cascade for a required number of stages.
JP24698994A 1994-09-14 1994-09-14 Barrel shifter Expired - Fee Related JP3493064B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24698994A JP3493064B2 (en) 1994-09-14 1994-09-14 Barrel shifter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24698994A JP3493064B2 (en) 1994-09-14 1994-09-14 Barrel shifter

Publications (2)

Publication Number Publication Date
JPH0887400A true JPH0887400A (en) 1996-04-02
JP3493064B2 JP3493064B2 (en) 2004-02-03

Family

ID=17156724

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24698994A Expired - Fee Related JP3493064B2 (en) 1994-09-14 1994-09-14 Barrel shifter

Country Status (1)

Country Link
JP (1) JP3493064B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8051123B1 (en) 2006-12-15 2011-11-01 Nvidia Corporation Multipurpose functional unit with double-precision and filtering operations
US8106914B2 (en) 2007-12-07 2012-01-31 Nvidia Corporation Fused multiply-add functional unit
US8190669B1 (en) 2004-10-20 2012-05-29 Nvidia Corporation Multipurpose arithmetic functional unit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8190669B1 (en) 2004-10-20 2012-05-29 Nvidia Corporation Multipurpose arithmetic functional unit
US8051123B1 (en) 2006-12-15 2011-11-01 Nvidia Corporation Multipurpose functional unit with double-precision and filtering operations
US8106914B2 (en) 2007-12-07 2012-01-31 Nvidia Corporation Fused multiply-add functional unit

Also Published As

Publication number Publication date
JP3493064B2 (en) 2004-02-03

Similar Documents

Publication Publication Date Title
JP5273866B2 (en) Multiplier / accumulator unit
JP3761977B2 (en) Floating-point multiplier with reduced critical path by using delay matching technology and its operation method
US4969118A (en) Floating point unit for calculating A=XY+Z having simultaneous multiply and add
KR940002479B1 (en) High speed parallel multiplier
Quach et al. On fast IEEE rounding
US6751644B1 (en) Method and apparatus for elimination of inherent carries
US5633819A (en) Inexact leading-one/leading-zero prediction integrated with a floating-point adder
US6411980B2 (en) Data split parallel shifter and parallel adder/subtractor
Oklobdzija High-speed VLSI arithmetic units: Adders and multipliers
JP3436994B2 (en) Shift device
JP3313002B2 (en) Floating point arithmetic unit
JP3493064B2 (en) Barrel shifter
US4866655A (en) Arithmetic processor and divider using redundant signed digit
US5170371A (en) Method and apparatus for rounding in high-speed multipliers
KR100627993B1 (en) Three input split-adder
US4823300A (en) Performing binary multiplication using minimal path algorithm
US4979141A (en) Technique for providing a sign/magnitude subtraction operation in a floating point computation unit
US6269385B1 (en) Apparatus and method for performing rounding and addition in parallel in floating point multiplier
US5097434A (en) Hybrid signed-digit/logarithmic number system processor
US6202078B1 (en) Arithmetic circuit using a booth algorithm
US20080071852A1 (en) Method to perform a subtraction of two operands in a binary arithmetic unit plus arithmetic unit to perform such a method
JPH04172526A (en) Floating point divider
Stouraitis et al. Hybrid signed digit logarithmic number system processor
JPH063578B2 (en) Processor
US20100030836A1 (en) Adder, Synthesis Device Thereof, Synthesis Method, Synthesis Program, and Synthesis Program Storage Medium

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071114

Year of fee payment: 4

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081114

Year of fee payment: 5

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091114

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees