JPH11126157A - Multiplication method and multiplication circuit - Google Patents
Multiplication method and multiplication circuitInfo
- Publication number
- JPH11126157A JPH11126157A JP9292215A JP29221597A JPH11126157A JP H11126157 A JPH11126157 A JP H11126157A JP 9292215 A JP9292215 A JP 9292215A JP 29221597 A JP29221597 A JP 29221597A JP H11126157 A JPH11126157 A JP H11126157A
- Authority
- JP
- Japan
- Prior art keywords
- partial product
- bit
- circuit
- maximum value
- significant
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
(57)【要約】
【課題】演算時間を短縮しセレクタを省略できる乗算方
法および乗算回路を提供する。
【解決手段】ブースアルゴリズムを用いた乗算回路であ
って、負の最大値と負の最大値とを乗算する場合、最上
位の部分積の2の補数化補正ビットまたは最下位ビット
を0とし、他の部分積の最下位ビットと2の補数化補正
ビットを加算した結果を11とすることにより、正の最
大値に押さえ込むように構成している。
(57) Abstract: A multiplication method and a multiplication circuit capable of shortening an operation time and omitting a selector are provided. A multiplication circuit using the Booth algorithm, wherein when multiplying a negative maximum value and a negative maximum value, a 2's complement correction bit or a least significant bit of the most significant partial product is set to 0, The result of adding the least significant bit of the other partial product and the 2's complement correction bit is set to 11 so as to suppress the value to a positive maximum value.
Description
【0001】[0001]
【発明の属する技術分野】この発明は、半導体集積回路
における、特にブースアルゴリズムを用いた乗算方法お
よび乗算回路に関するものである。The present invention relates to a multiplication method and a multiplication circuit using a Booth algorithm in a semiconductor integrated circuit.
【0002】[0002]
【従来の技術】2の補数表現であらわされている2進数
の乗算において、乗数がiビット、被乗数がjビット、
積出力がi+j−1ビットの場合で、乗数、被乗数がと
もに負の最大値のとき、積出力にオーバーフローが発生
する。これを回避するために、乗数、被乗数がともに負
の最大値の場合、積出力を正の最大値に丸め込みが必要
となる。たとえば、最上位ビットの右側に小数点がある
固定小数点の乗算器で、乗数、被乗数がともに8ビッ
ト、積出力が15ビットの場合、1.000 0000×1.000 00
00= 1.00 0000 0000 0000{(−1)×(−1)=−
1}となり、オーバーフローが起こっていることがわか
る。2. Description of the Related Art In a binary multiplication represented by a two's complement representation, a multiplier is i bits, a multiplicand is j bits,
When the product output is i + j-1 bits and both the multiplier and the multiplicand are negative maximum values, an overflow occurs in the product output. In order to avoid this, when both the multiplier and the multiplicand have the negative maximum values, it is necessary to round the product output to the positive maximum value. For example, in a fixed-point multiplier having a decimal point on the right side of the most significant bit, when the multiplier and multiplicand are both 8 bits and the product output is 15 bits, 1.000 0000 × 1.000 00
00 = 1.00 0000 0000 0000 {(-1) × (-1) =-
1}, which indicates that overflow has occurred.
【0003】図14は、従来のリミッタ機能付き8ビッ
ト×8ビット乗算器のブロック図である。図14におい
て、xs、xi(iは6〜0)は被乗数X、ys、yj
(jは6〜0)は乗数Y、pmn(mは1〜4、nはs
または7〜0)は部分積、cs、c13 〜c 00 、s
s、s14〜s 00 は中間和、zs、z13〜z00は積出力
であり、記号の上に線が引いてあるものは反転を意味す
る。また200はブースアルゴリズムをつくるブースリ
コーダ、201は部分積ブロック、202は部分積加算
過程、203は加算器、204はオーバーフロー探知回
路、205はセレクタである。FIG. 14 is a block diagram of a conventional 8-bit × 8-bit multiplier with a limiter function. In FIG. 14, xs and xi (i is 6 to 0) are multiplicands X, ys and yj.
(J is 6 to 0) is a multiplier Y, pmn (m is 1 to 4, n is s)
Or 7 to 0) are partial products, cs, c13 to c00, s
s and s14 to s00 are intermediate sums, zs and z13 to z00 are product outputs, and a symbol with a line over it means inversion. Reference numeral 200 denotes a booth recorder for creating a Booth algorithm, 201 denotes a partial product block, 202 denotes a partial product addition process, 203 denotes an adder, 204 denotes an overflow detection circuit, and 205 denotes a selector.
【0004】ブースリコーダ200を用いた乗算器にお
いて、部分積は0、±X、±2Xの5つの値を取りう
る。2の補数表現における2進数の場合、2X(被乗数
Xの2倍)は被乗数Xを左方向に1ビットシフトすれば
よい。また、−X、−2Xの負の倍数の場合は、各ビッ
トを反転させ、最下位ビットに1を加える必要がある
(−2Xの場合はシフト動作も必要)。In a multiplier using the Booth recorder 200, a partial product can take five values of 0, ± X, ± 2X. In the case of a binary number in a two's complement representation, 2X (twice the multiplicand X) may be obtained by shifting the multiplicand X one bit to the left. Further, in the case of negative multiples of -X and -2X, it is necessary to invert each bit and add 1 to the least significant bit (in the case of -2X, a shift operation is also required).
【0005】部分積生成において加算を行なうと部分積
生成の演算時間が増加するため、部分積が負の値の場合
1を加算するという作業は、通常、部分積加算課程(W
allace Tree)202内で行なわれる。この
部分積生成段階では部分積pmnと2の補数化補正ビッ
トphに分けられる。部分積生成においてはシフト動
作、および反転動作しか必要ないので高速に部分積を求
められる。[0005] When performing addition in the partial product generation, the operation time of the partial product generation increases. Therefore, the operation of adding 1 when the partial product is a negative value is usually performed by a partial product addition process (W
Alliance Tree) 202. In this partial product generation stage, the partial product is divided into a partial product pmn and a two's complement correction bit ph. Since only a shift operation and an inversion operation are required in the partial product generation, a partial product can be obtained at high speed.
【0006】図14におけるブースリコーダ200の回
路を図9に示し、部分積ブロック201の部分積生成回
路を図10に示し、最下位の部分積生成回路を図11に
示し、部分積の2の補数化補正ビットを図12に示す。
ブースリコーダ回路を示す図9において、y2j−1、
y2j、y2j+1は乗数Yの隣り合う3ビットを示し
ている。28,31はインバータ回路、29はExNO
R回路、32はExOR回路、33はNAND回路、3
0,34,35,36はインバータ回路である。nr
s、r2、r1はブースリコーダ回路が生成する信号で
ある。ブースリコーダ200を用いて部分積を生成する
場合、部分積の取りうる値は、0、±X、±2Xの5通
りであることを述べたが、ここで、nrsは正/負の符
号を表すものであり、1なら部分積が正、0なら部分積
が負である。r2は生成される部分積が2倍(±2Xの
どちらかの値)を取ることを表す。r1は生成される部
分積が1倍(±Xのどちらかの値)を取ることを表す。FIG. 9 shows the circuit of the booth recorder 200 in FIG. 14, FIG. 10 shows the partial product generation circuit of the partial product block 201, and FIG. 11 shows the lowest partial product generation circuit. FIG. 12 shows the complementation correction bits.
In FIG. 9 showing a booth recorder circuit, y2j-1,
y2j and y2j + 1 indicate three adjacent bits of the multiplier Y. 28 and 31 are inverter circuits, 29 is ExNO
R circuit, 32 is an ExOR circuit, 33 is a NAND circuit, 3
Reference numerals 0, 34, 35 and 36 are inverter circuits. nr
s, r2, and r1 are signals generated by the booth recorder circuit. When a partial product is generated using the booth recorder 200, it has been described that there are five possible values of the partial product, 0, ± X, ± 2X, where nrs is a positive / negative sign. 1 indicates that the partial product is positive, and 0 indicates that the partial product is negative. r2 indicates that the generated partial product takes twice (a value of ± 2X). r1 indicates that the generated partial product takes one time (any value of ± X).
【0007】部分積生成回路を示す図10において、x
i は被乗数Xの1ビットである。37はExNOR回
路、38,39はAND回路、40はOR回路である。
xhは生成される部分積が±2Xを取ったときにシフト
動作するためのものでひとつ上位の部分積生成回路のx
l入力につながる。pmnは生成される部分積の最下位
を除く1ビットをあらわす。In FIG. 10 showing a partial product generation circuit, x
i is one bit of the multiplicand X. 37 is an ExNOR circuit, 38 and 39 are AND circuits, and 40 is an OR circuit.
xh is used to perform a shift operation when the generated partial product takes ± 2X, and xh of the partial product generation circuit one higher order
l input. pmn represents one bit excluding the least significant part of the generated partial product.
【0008】部分積の最下位生成回路を示す図11にお
いて、x0 は最下位ビットである。41はExNOR回
路、42はインバータ回路、43,44はAND回路、
45はOR回路である。pm0は部分積の最下位ビット
である。部分積の2の補数化補正ビット生成回路を示す
図12において、phmは部分積の2の補数化補正ビッ
トである。46はインバータ回路である。In FIG. 11 showing the least significant generation circuit of the partial product, x0 is the least significant bit. 41 is an ExNOR circuit, 42 is an inverter circuit, 43 and 44 are AND circuits,
45 is an OR circuit. pm0 is the least significant bit of the partial product. In FIG. 12 showing the 2's complementation correction bit generation circuit of the partial product, phm is a 2's complementation correction bit of the partial product. 46 is an inverter circuit.
【0009】図14における各桁の部分積の数は、最下
位桁から、2、1、3、2、…となっている。そのた
め、中間和(Wallace Treeでの加算結果)
が最下位から順に求とまらないので、加算器(ADDE
R)203の効率が悪くなってしまう。そこで、図15
のように部分積生成と同時に、部分積の最下位ビット
(pm0、mは1〜4)と補正ビット(phm、mは1
〜4)を加算して、pcm、plm(pcmは桁上がり
ビット、plmは同桁ビット、mは1〜4)を生成して
おく。図15における最下位の部分積生成回路(部分積
の最下位と2の補数化補正ビットを加算して部分積を求
める回路)すなわち部分積のLSB加算・部分積生成回
路を図13に示す。47はインバータ回路、48はEx
NOR回路、49はAND回路、50、51、53はA
ND回路、52はOR回路である。生成するplmはp
l=x0・r1となり、pcmはpc=/nrs・/x
0・r1+/nrs・r2となる。なお式中の/は反転
を意味する。図15の乗算器において、ブースリコーダ
200、部分積セレクタ205など他の回路は図14の
乗算器と同じである。また、図16は図15の乗算器の
ブロック図を乗算がわかりやすくなるように別の形で表
した概念図である。The number of partial products of each digit in FIG. 14 is 2, 1, 3, 2,... From the least significant digit. Therefore, the intermediate sum (addition result in Wallace Tree)
Cannot be obtained in order from the lowest order, so the adder (ADDE
R) 203 becomes inefficient. Therefore, FIG.
, The least significant bit (pm0, m is 1 to 4) and the correction bit (phm, m are 1) of the partial product
4) are added to generate pcm and plm (pcm is a carry bit, plm is the same bit, and m is 1 to 4). FIG. 13 shows the least significant partial product generation circuit (the circuit that adds the least significant part of the partial product and the 2's complement correction bit to obtain a partial product) in FIG. 15, that is, the LSB addition / partial product generation circuit of the partial product. 47 is an inverter circuit, 48 is Ex
NOR circuit, 49 is AND circuit, 50, 51, 53 are A
An ND circuit 52 is an OR circuit. The generated plm is p
l = x0 · r1, and pcm is pc = / nrs · / x
0 · r1 + / nrs · r2. In the formula, / means inversion. In the multiplier of FIG. 15, other circuits such as the booth recorder 200 and the partial product selector 205 are the same as those of the multiplier of FIG. FIG. 16 is a conceptual diagram showing a block diagram of the multiplier of FIG. 15 in another form so that multiplication can be easily understood.
【0010】[0010]
【発明が解決しようとする課題】従来の乗算回路では、
オーバーフローの発生(乗数、被乗数がともに負の最大
値である場合)をオーバーフロー探知回路204により
判定し、オーバーフローが発生する場合には、積出力の
手前にあるセレクタ205により正の最大値に値を固定
し、また、オーバーフローが発生しない場合は乗算結果
を出力していた。SUMMARY OF THE INVENTION In a conventional multiplication circuit,
The occurrence of overflow (when both the multiplier and the multiplicand are negative maximum values) is determined by the overflow detection circuit 204, and when an overflow occurs, the value is set to the positive maximum value by the selector 205 before the product output. The output was multiplied and output when the overflow did not occur.
【0011】しかしながら、乗算回路の演算時間、およ
び素子数がセレクタ分増加してしまうという欠点があっ
た。したがって、この発明の目的は、演算時間を短縮し
セレクタを省略できる乗算方法および乗算回路を提供す
ることである。However, there is a disadvantage that the operation time and the number of elements of the multiplication circuit are increased by the amount of the selector. SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a multiplication method and a multiplication circuit that can shorten the operation time and omit the selector.
【0012】[0012]
【課題を解決するための手段】請求項1記載の乗算方法
は、ブースアルゴリズムを用いた乗算方法であって、負
の最大値と負の最大値とを乗算する場合、最上位の部分
積の2の補数化補正ビットまたは最下位ビットを0と
し、他の部分積の最下位ビットと2の補数化補正ビット
を加算した結果を11とすることにより、正の最大値に
押さえ込むように構成したことを特徴とするものであ
る。A multiplication method according to claim 1 is a multiplication method using the Booth algorithm, wherein when multiplying a negative maximum value by a negative maximum value, the highest partial product is calculated. The 2's complement correction bit or the least significant bit is set to 0, and the result of adding the 2's complement correction bit to the least significant bit of the other partial product and the 2's complement correction bit is set to 11, so that the maximum value is suppressed to a positive maximum value. It is characterized by the following.
【0013】請求項1記載の乗算方法によれば、オーバ
ーフローが発生する場合、ブースアルゴリズムを用いた
乗算器の部分積生成は、最上位の部分積がすべて1で出
力される。ここで、オーバーフローが発生する場合に限
り、最上位の部分積の2の補数化補正ビットを0、他の
桁の部分積の最下位ビットと2の補数化補正ビットを加
算した結果すなわち後述のplm、pcm(ただしm=
1、2、3...)を11とすることにより、積の出力
部にセレクタを用いずかつ演算時間を短縮して、正の最
大値を出力する乗算器を提供できる。According to the first aspect of the present invention, when an overflow occurs, in the partial product generation of the multiplier using the Booth algorithm, all the highest partial products are output as "1". Here, only when an overflow occurs, the result of adding the 2's complementation correction bit of the most significant partial product to the 0's and the least significant bit of the partial product of the other digits to the 2's complementation correction bit, that is, plm, pcm (where m =
1, 2, 3,. . . Is set to 11, it is possible to provide a multiplier that outputs a positive maximum value without using a selector in the output section of the product and reducing the calculation time.
【0014】請求項2記載の乗算方法は、ブースアルゴ
リズムを用いた乗算方法であって、負の最大値と負の最
大値とを乗算する場合、生成される部分積の2の補数化
補正ビットまたは最下位ビットを0とし、部分積の(最
下位+1)ビットを1とすることにより、正の最大値に
押さえ込むように構成したことを特徴とするものであ
る。According to a second aspect of the present invention, there is provided a multiplication method using the Booth algorithm, wherein when a negative maximum value is multiplied by a negative maximum value, a 2's complement correction bit of a generated partial product is multiplied. Alternatively, the least significant bit is set to 0, and the (lowest +1) bit of the partial product is set to 1, thereby suppressing the maximum value to a positive value.
【0015】請求項2記載の乗算方法によれば、請求項
1と同様な効果がある。請求項3記載の乗算回路は、ブ
ースアルゴリズムを用いた乗算回路の部分積のLSB加
算・部分積生成回路であって、負の最大値と負の最大値
とを乗算する場合、部分積の最下位ビットと2の補数化
補正ビットを加算した結果を11とするように構成した
部分積のLSB加算・部分積生成回路を有し、2の補数
化補正ビットを0にする手段を有するものである。According to the multiplying method of the second aspect, the same effect as that of the first aspect is obtained. A multiplication circuit according to claim 3 is an LSB addition / partial product generation circuit of a partial product of the multiplication circuit using the Booth algorithm, wherein when multiplying a negative maximum value by a negative maximum value, the partial product An LSB addition / partial product generation circuit for a partial product configured so that the result of adding the lower-order bit and the two's complement correction bit is set to 11, and means for setting the two's complement correction bit to 0 are provided. is there.
【0016】請求項3記載の乗算回路によれば、請求項
1と同様な効果がある。請求項4記載の乗算回路は、ブ
ースアルゴリズムを用いた乗算回路の部分積生成回路で
あって、負の最大値と負の最大値とを乗算する場合、部
分積の(最下位+1)ビットを1とするように構成した
部分積生成回路を有し、部分積の2の補数化補正ビット
を0とする手段を有するものである。According to the multiplying circuit of the third aspect, the same effect as that of the first aspect is obtained. The multiplying circuit according to claim 4 is a partial product generating circuit of the multiplying circuit using the Booth algorithm, and when multiplying a negative maximum value by a negative maximum value, the (lowest +1) bits of the partial product are added. It has a partial product generation circuit configured to be 1 and has means for setting the 2's complementation correction bit of the partial product to 0.
【0017】請求項4記載の乗算回路によれば、請求項
1と同様な効果がある。According to the multiplying circuit of the fourth aspect, the same effect as that of the first aspect is obtained.
【0018】[0018]
(第1の実施の形態)この発明の第1の実施の形態を図
1ないし図6に基づいて説明する。すなわち、第1の実
施の形態は、ブースアルゴリズムを用いた乗算方法であ
って、負の最大値と負の最大値とを乗算する場合、最上
位の部分積の2の補数化補正ビットを0とし、他の部分
積の最下位ビットと2の補数化補正ビットを加算した結
果を11とすることにより、正の最大値に押さえ込むよ
うに構成するものである。(First Embodiment) A first embodiment of the present invention will be described with reference to FIGS. That is, the first embodiment is a multiplication method using the Booth algorithm. When multiplying a negative maximum value by a negative maximum value, the 2's complement correction bit of the highest partial product is set to 0. The result obtained by adding the least significant bit of the other partial product and the 2's complement correction bit is set to 11 so as to suppress the result to a positive maximum value.
【0019】図1は部分積のSB加算・部分積生成回路
すなわち、部分積の最下位ビット生成回路(従来例の図
13に対応する回路)である。図1において、nrs、
r2、r1は図9に示すブースリコーダ回路から出力さ
れる値である。ブースリコーダを用いて部分積を生成す
る場合、部分積の取りうる値は、0、±X、±2Xの5
通りである。ここで、nrsは正/負の符号を表すもの
であり、1なら部分積が正、0なら部分積が負である。
r2は生成される部分積が2倍(±2Xのどちらかの
値)を取ることをあらわす。r1は生成される部分積が
1倍(±Xのどちらかの値)を取ることをあわらす。x
0は被乗数Xの最下位ビットである。nflgは図15
に示すオーバーフロー探知回路204より出力するもの
で、オーバーフローが発生するか発生しないかをあらわ
す。この例では、通常は1で、オーバーフローが発生す
る場合0となる。pl、pcは生成される部分積で、部
分積の最下位ビットと2の補数化の補正ビットの足し合
わせを行なっている。すなわちpl=x0・r1+/n
flg pc=(/nrs+/nflg)・/x0・(r1+/
nflg)+/nrs・r2 /は反転を表す。また、xhは生成される部分積が±2
Xを取ったときにシフト動作が必要となるが、そのため
のものでひとつ上位ビットの部分積生成回路たとえば図
10のxl入力につながる。FIG. 1 shows a partial product SB addition / partial product generation circuit, that is, a least significant bit generation circuit of a partial product (a circuit corresponding to FIG. 13 of a conventional example). In FIG. 1, nrs,
r2 and r1 are values output from the booth recorder circuit shown in FIG. When a partial product is generated using a booth recorder, the possible values of the partial product are 5 of 0, ± X, ± 2X.
It is on the street. Here, nrs represents a positive / negative sign. If 1, the partial product is positive, and if 0, the partial product is negative.
r2 indicates that the generated partial product takes twice (a value of ± 2X). r1 indicates that the generated partial product takes one time (any value of ± X). x
0 is the least significant bit of the multiplicand X. nflg is shown in FIG.
Is output from the overflow detection circuit 204, and indicates whether or not overflow occurs. In this example, it is normally 1 and becomes 0 when an overflow occurs. pl and pc are generated partial products, and add up the least significant bit of the partial product and the correction bit of 2's complement. That is, pl = x0 · r1 + / n
flg pc = (/ nrs + / nflg) ./ x0. (r1 + /
nflg) + / nrs · r2 / represents inversion. Further, xh is a partial product generated ± 2.
When X is taken, a shift operation is required. For this purpose, it leads to a partial product generation circuit for one upper bit, for example, the xl input in FIG.
【0020】1,2,4はExNOR回路、3はNOR
回路、5はインバータ回路、6、7、9はAND回路、
8,10はOR回路である。基本的な動作は図13に示
した部分積の最下位ビット生成回路と等価なものであ
る。図13の部分積の最下位ビット生成回路との違い
は、オーバーフローが発生する場合には、部分積の最下
位ビット生成回路の出力pc、plがともに1となると
ころにある。1, 2 and 4 are ExNOR circuits and 3 is a NOR circuit.
Circuit, 5 is an inverter circuit, 6, 7, and 9 are AND circuits,
8 and 10 are OR circuits. The basic operation is equivalent to the least significant bit generation circuit of the partial product shown in FIG. The difference from the least significant bit generation circuit of the partial product in FIG. 13 is that when an overflow occurs, both the outputs pc and pl of the least significant bit generation circuit of the partial product become 1.
【0021】ここで、図8を参照する。図8における記
号の振り方は従来の技術の項で説明した図14および図
15と同様なので記号の説明を省略する。図8は被乗数
x、乗数yともに8ビット乗算器において、(負の最大
値)×(負の最大値)、つまりオーバーフローが起こる
状態を表したブロック図である。ただし、中間和S、
C、についてはワラストリーの接続方法で値が変わるの
で記号のままの記述としている。このオーバーフローが
起こる場合に、pl1〜p14、および、pc1〜pc
3を1とし、pc4を0とするような回路構成とすれ
ば、積が正の最大値になることが分かる。Here, reference is made to FIG. The way of assigning the symbols in FIG. 8 is the same as that in FIGS. 14 and 15 described in the section of the related art, so the explanation of the symbols will be omitted. FIG. 8 is a block diagram showing (negative maximum value) × (negative maximum value), that is, a state in which overflow occurs in an 8-bit multiplier for both the multiplicand x and the multiplier y. However, the intermediate sum S,
Since the value of C changes depending on the connection method of the Wallace tree, it is described as a symbol. When this overflow occurs, pl1 to p14 and pc1 to pc
With a circuit configuration in which 3 is set to 1 and pc4 is set to 0, the product has a positive maximum value.
【0022】そこで、図5のような乗算器を考える。図
5は、図1に示した部分積の最下位ビット加算・部分積
生成回路を用いた、乗算器のブロック図である。すなわ
ち、ブースリコーダ200、部分積加算過程202、加
算器203は、図14等に示す従来例と同じ機能であ
る。オーバーフロー探知回路は図4に示す。図4におい
て、23〜27は4入力NOR回路であり、そのうちN
OR回路23,26は1入力が反転入力である。27は
4入力NAND回路である。Therefore, consider a multiplier as shown in FIG. FIG. 5 is a block diagram of a multiplier using the least significant bit addition / partial product generation circuit of the partial product shown in FIG. That is, the booth recorder 200, the partial product addition process 202, and the adder 203 have the same functions as those of the conventional example shown in FIG. The overflow detection circuit is shown in FIG. In FIG. 4, 23 to 27 are 4-input NOR circuits, of which N
One input of the OR circuits 23 and 26 is an inverted input. 27 is a 4-input NAND circuit.
【0023】また部分積ブロック201′では、図13
に示した従来の乗算器のように、部分積の最下位ビット
と2の補数化補正ビットを部分積生成と同時に加算しp
lm(mは1〜3)、pcm(mは1〜3)を出力して
いる。ただし、最上位の部分積については、p40、p
h4を出力している。つまり、最上位の部分積に関して
は、図14に示した乗算器のように、部分積の最下位ビ
ットと2の補数化補正ビットの加算を部分積生成と同時
に行なっていない。In the partial product block 201 ', FIG.
, The least significant bit of the partial product and the two's complement correction bit are added simultaneously with the generation of the partial product, and p
lm (m is 1 to 3) and pcm (m is 1 to 3) are output. However, p40, p
h4 is output. In other words, regarding the uppermost partial product, unlike the multiplier shown in FIG. 14, the addition of the least significant bit of the partial product and the 2's complement correction bit is not performed simultaneously with the generation of the partial product.
【0024】最上位部分積の最下位ビットp40を図2
に示し、最上位部分積の2の補数化補正ビットph4を
生成する回路を図3に示す。符号の振り方は図1と同じ
であるので説明は省く。ただし、11はExNOR回
路、16はExOR回路、12はインバータ回路、1
3,14はアンド回路、15はOR回路である。図2の
最上位部分積の最下位ビット生成回路は、従来の最下位
ビット生成回路と同じである。図3の最上位部分積の2
の補数化補正ビット生成回路の出力ph4は、オーバー
フローが発生する場合は、0が出力されるようになって
いる。The least significant bit p40 of the most significant partial product is shown in FIG.
FIG. 3 shows a circuit for generating the 2's complement correction bit ph4 of the uppermost partial product. The manner of assigning the symbols is the same as in FIG. Here, 11 is an ExNOR circuit, 16 is an ExOR circuit, 12 is an inverter circuit, 1
3 and 14 are AND circuits, and 15 is an OR circuit. The least significant bit generation circuit of the most significant partial product in FIG. 2 is the same as the conventional least significant bit generation circuit. 2 of the uppermost partial product in FIG.
The output ph4 of the complemented correction bit generation circuit is output 0 when an overflow occurs.
【0025】図6に図5に示した乗算器が、(負の最大
値)×(負の最大値)を行なうときの部分積の状態を示
す。図6より、正の最大値に押さえ込まれ、オーバーフ
ローが発生していないことが分かる。第1の実施の形態
によれば、オーバーフローが発生する場合、ブースアル
ゴリズムを用いた乗算器の部分積生成は、最上位の部分
積の各桁がすべて1となる。ここで、オーバーフローが
発生する場合に限り、最上位の部分積の2の補数化補正
ビットを0、他の桁の部分積の最下位ビットと2の補数
化補正ビットを加算した結果、plm、pcm(ただし
m=1、2、3...)を11とすることにより、積の
出力部にセレクタを用いずかつ演算時間を短縮して、正
の最大値を出力する乗算器を提供できる。FIG. 6 shows the state of the partial product when the multiplier shown in FIG. 5 performs (negative maximum value) × (negative maximum value). From FIG. 6, it can be seen that the value is suppressed to the positive maximum value and no overflow occurs. According to the first embodiment, when an overflow occurs, in the partial product generation of the multiplier using the Booth algorithm, all the digits of the uppermost partial product become 1. Here, only when an overflow occurs, as a result of adding the 2's complement correction bit of the most significant partial product to 0 and the least significant bit of the partial product of other digits and the 2's complement correction bit, plm, By setting pcm (where m = 1, 2, 3,...) to 11, it is possible to provide a multiplier that outputs a positive maximum value without using a selector in the product output unit and shortening the operation time. .
【0026】したがって、オバーフローを回避するの
に、出力部のセレクタが不要になる。素子数の削減が図
れる。また、高速にオバーフロー判定フラグの値を求め
ることにより、オーバーフローが発生しない(セレクタ
がない)乗算器に比べて、遅延増加のないリミッタ機能
付き乗算器を提供できる。 (第2の実施の形態)この発明の第2の実施の形態を図
7により説明する。すなわち、第2の実施の形態は、ブ
ースアルゴリズムを用いた乗算方法であって、負の最大
値と負の最大値とを乗算する場合、生成される部分積の
2の補数化補正ビットまたは最下位ビットを0とし、部
分積の(最下位+1)ビットを1とすることにより、正
の最大値に押さえ込むように構成している。Therefore, a selector at the output unit is not required to avoid overflow. The number of elements can be reduced. Further, by obtaining the value of the overflow determination flag at high speed, it is possible to provide a multiplier with a limiter function that does not increase the delay as compared with a multiplier in which overflow does not occur (there is no selector). (Second Embodiment) A second embodiment of the present invention will be described with reference to FIG. That is, the second embodiment is a multiplication method using the Booth algorithm, and when multiplying a negative maximum value and a negative maximum value, a two's complement correction bit or a minimum value of a generated partial product is used. The lower bit is set to 0 and the (lowest +1) bit of the partial product is set to 1 so as to suppress the value to a positive maximum value.
【0027】図7は図14に示したタイプの乗算器、つ
まり部分積生成時において、部分積の最下位ビットと2
の補数化補正ビットを加算しないものにおいて、部分積
の(最下位+1)ビットの部分積生成に用いる部分積の
(最下位+1)ビット生成回路である。図7において、
x1は被乗数Xの(最下位+1)ビット、pm1(m=
1、2、..)は生成される部分積の(最下位+1)ビ
ットが1である。17,19はExNOR回路、18は
インバータ回路、20,21はAND回路、22はOR
回路である。その他の記号については図1と同じである
ので説明を省略する。FIG. 7 shows a multiplier of the type shown in FIG. 14, that is, the least significant bit of the partial product and 2
Is a partial product (least significant +1) bit generation circuit used for generating a partial product of the (least significant +1) bit of the partial product in which the complemented correction bits of the partial product are not added. In FIG.
x1 is the (least significant +1) bit of the multiplicand X, pm1 (m =
1, 2,. . ) Is (the least significant + 1) bit of the generated partial product is 1. 17 and 19 are ExNOR circuits, 18 is an inverter circuit, 20 and 21 are AND circuits, and 22 is an OR circuit.
Circuit. Other symbols are the same as those in FIG.
【0028】そして第2の実施の形態は、図14に示し
たタイプの乗算器に対して、図7の部分積生成回路をp
11、p21、p31に、図3の2の補数化補正ビット
生成回路をph1、ph2、ph3、ph4に用いるも
のである。これにより、第1の実施の形態と同様の効果
が得られるので、積出力の手前にあるセレクタが不要と
なる。In the second embodiment, the partial product generation circuit shown in FIG.
The two-complement correction bit generation circuit of FIG. 3 is used for ph1, ph2, ph3, and ph4 for 11, p21, and p31. As a result, the same effect as in the first embodiment can be obtained, so that a selector before the product output is not required.
【0029】(その他の実施の形態)前記の実施の形態
の説明として8ビット×8ビットの乗算器を用いて、最
上位の部分積の2の補数化補正ビットをオーバーフロー
が発生する場合に0とすることにより、オーバーフロー
の発生を押さえられることを述べた。しかし、オーバフ
ローが発生する際、最上位の2の補数化補正ビットか最
上位の部分積の最下位ビットのどちらかを“0”とすれ
ばよいので、最上位の部分積の最下位ビットを0とする
ことでも同様の効果が得られる。また、他のビットの乗
算器においても同じことがいえる。(Other Embodiments) As an explanation of the above-described embodiment, an 8-bit × 8-bit multiplier is used to set the 2's complement correction bit of the uppermost partial product to 0 when overflow occurs. As described above, the occurrence of overflow can be suppressed. However, when an overflow occurs, either the most significant two's complement correction bit or the least significant bit of the most significant partial product may be set to “0”, so that the least significant bit of the most significant partial product is set to “0”. The same effect can be obtained by setting it to 0. The same can be said for the multipliers of other bits.
【0030】さらに、積和演算器のように乗算と他の演
算を同時に行なう演算器についても実施可能である。Further, the present invention can be applied to an arithmetic unit which performs multiplication and other operations simultaneously, such as a product-sum arithmetic unit.
【0031】[0031]
【発明の効果】請求項1記載の乗算方法によれば、オー
バーフローが発生する場合、ブースアルゴリズムを用い
た乗算器の部分積生成は、最上位の部分積がすべて1で
出力される。ここで、オーバーフローが発生する場合に
限り、最上位の部分積の2の補数化補正ビットを0、他
の桁の部分積の最下位ビットと2の補数化補正ビットを
加算した結果とすることにより、積の出力部にセレクタ
を用いずかつ演算時間を短縮して、正の最大値を出力す
る乗算器を提供できる。According to the multiplication method of the present invention, when an overflow occurs, the partial product generation of the multiplier using the Booth algorithm outputs all ones at the highest order. Here, only when an overflow occurs, the result of adding the 2's complement correction bit of the most significant partial product to 0 and the least significant bit of the partial product of another digit and the 2's complement correction bit is used. Accordingly, it is possible to provide a multiplier that outputs a positive maximum value without using a selector in the output section of the product and reducing the calculation time.
【0032】請求項2記載の乗算方法によれば、請求項
1と同様な効果がある。請求項3記載の乗算回路によれ
ば、請求項1と同様な効果がある。請求項4記載の乗算
回路によれば、請求項1と同様な効果がある。According to the multiplying method of the second aspect, the same effect as that of the first aspect is obtained. According to the multiplying circuit of the third aspect, the same effect as that of the first aspect is obtained. According to the multiplying circuit of the fourth aspect, the same effect as that of the first aspect is obtained.
【図1】この発明の第1の実施の形態における部分積の
LSB(最下位ビット)加算・部分積生成回路図であ
る。FIG. 1 is an LSB (least significant bit) addition / partial product generation circuit diagram of a partial product according to a first embodiment of the present invention;
【図2】第1の実施の形態における最上位部分積のLS
B(最下位ビット)生成回路図である。FIG. 2 shows the LS of the uppermost partial product in the first embodiment.
FIG. 3 is a circuit diagram of a B (least significant bit) generation circuit.
【図3】第1の実施の形態における最上位部分積の2の
補数化補正ビット生成回路図である。FIG. 3 is a circuit diagram of a 2's complement correction bit generation circuit of the most significant partial product in the first embodiment.
【図4】オーバーフロー探知回路図である。FIG. 4 is an overflow detection circuit diagram.
【図5】第1の実施の形態における乗算器ブロック図で
ある。FIG. 5 is a multiplier block diagram according to the first embodiment.
【図6】第1の実施の形態における(負の最大値)×
(負の最大値)の場合の乗算器ブロック図である。FIG. 6 shows (negative maximum value) × in the first embodiment.
It is a multiplier block diagram in the case of (negative maximum value).
【図7】第2の実施の形態における部分積のLSB+1
(最下位+1ビット)の生成回路図である。FIG. 7 shows LSB + 1 of a partial product in the second embodiment.
FIG. 9 is a diagram of a generation circuit of (lowest +1 bit).
【図8】従来の乗算器のオーバーフローが発生する場合
のブロック図である。FIG. 8 is a block diagram when an overflow of a conventional multiplier occurs.
【図9】ブースリコーダ回路図である。FIG. 9 is a booth recorder circuit diagram.
【図10】部分積生成回路図である。FIG. 10 is a partial product generation circuit diagram.
【図11】従来の部分積の最下位ビット生成回路図であ
る。FIG. 11 is a circuit diagram of a conventional least significant bit generation circuit for a partial product.
【図12】2の補数化補正ビット生成回路図である。FIG. 12 is a circuit diagram of a two's complement correction bit generation circuit.
【図13】従来の部分積の最下位ビット加算・部分積生
成回路図である。FIG. 13 is a circuit diagram of a conventional least significant bit addition / partial product generation circuit for a partial product.
【図14】従来の8ビット×8ビットの第1の乗算器の
ブロック図である。FIG. 14 is a block diagram of a conventional 8-bit × 8-bit first multiplier.
【図15】従来の8ビット×8ビット乗算器の第2の乗
算器のブロック図である。FIG. 15 is a block diagram of a second multiplier of the conventional 8-bit × 8-bit multiplier.
【図16】図15の乗算器の概念図である。16 is a conceptual diagram of the multiplier of FIG.
1、2、4、11、17、19、29、37、41、4
8…ExNOR回路 3…NOR回路 5、12、18、28、30、31、34、35、3
6、42、46、47…インバータ回路 6、7、9、13、14、20、21、38、39、4
3、44、50、51、53…AND回路 8、10、15、22、40、45、52…OR回路 16、32…ExOR回路 23、26…4入力NOR回路(内1入力は反転) 24、25…4入力NOR回路 27…4入力NAND回路 33…NAND回路 49…AND回路(入力反転)1, 2, 4, 11, 17, 19, 29, 37, 41, 4
8 ExNOR circuit 3 NOR circuit 5, 12, 18, 28, 30, 31, 34, 35, 3
6, 42, 46, 47 ... Inverter circuits 6, 7, 9, 13, 14, 20, 21, 38, 39, 4
3, 44, 50, 51, 53 ... AND circuit 8, 10, 15, 22, 40, 45, 52 ... OR circuit 16, 32 ... ExOR circuit 23, 26 ... 4-input NOR circuit (1 input is inverted) 24 , 25 ... 4-input NOR circuit 27 ... 4-input NAND circuit 33 ... NAND circuit 49 ... AND circuit (input inversion)
Claims (4)
あって、負の最大値と負の最大値とを乗算する場合、最
上位の部分積の2の補数化補正ビットまたは最下位ビッ
トを0とし、他の部分積の最下位ビットと2の補数化補
正ビットを加算した結果を11とすることにより、正の
最大値に押さえ込むように構成したことを特徴とする乗
算方法。1. A multiplication method using the Booth algorithm, wherein when a negative maximum value is multiplied by a negative maximum value, a 2's complement correction bit or a least significant bit of a most significant partial product is set to 0. A multiplication method characterized in that a result obtained by adding the least significant bit of another partial product and a 2's complement correction bit is set to 11 so as to suppress the result to a positive maximum value.
あって、負の最大値と負の最大値とを乗算する場合、生
成される部分積の2の補数化補正ビットまたは最下位ビ
ットを0とし、部分積の(最下位+1)ビットを1とす
ることにより、正の最大値に押さえ込むように構成した
ことを特徴とする乗算方法。2. A multiplication method using the Booth algorithm, wherein when a negative maximum value is multiplied by a negative maximum value, a 2's complement correction bit or a least significant bit of a generated partial product is set to 0. , Wherein the (lowest order + 1) bit of the partial product is set to 1 so as to suppress the partial product to a positive maximum value.
部分積のLSB加算・部分積生成回路であって、負の最
大値と負の最大値とを乗算する場合、部分積の最下位ビ
ットと2の補数化補正ビットを加算した結果を11とす
るように構成した部分積のLSB加算・部分積生成回路
を有し、2の補数化補正ビットを0にする手段を有する
乗算回路。3. An LSB addition / partial product generation circuit for a partial product of a multiplication circuit using a Booth algorithm, wherein when multiplying a negative maximum value by a negative maximum value, the least significant bit of the partial product is equal to 2 A multiplication circuit having an LSB addition / partial product generation circuit for a partial product configured so that the result of adding the complementation correction bit of 2 is set to 11, and means for setting the 2's complementation correction bit to 0.
部分積生成回路であって、負の最大値と負の最大値とを
乗算する場合、部分積の(最下位+1)ビットを1とす
るように構成した部分積生成回路を有し、部分積の2の
補数化補正ビットを0とする手段を有する乗算回路。4. A partial product generation circuit of a multiplication circuit using a Booth algorithm, wherein when multiplying a negative maximum value by a negative maximum value, the (lowest + 1) bit of the partial product is set to 1. And a means for setting a 2's complement correction bit of the partial product to 0.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP9292215A JPH11126157A (en) | 1997-10-24 | 1997-10-24 | Multiplication method and multiplication circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP9292215A JPH11126157A (en) | 1997-10-24 | 1997-10-24 | Multiplication method and multiplication circuit |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH11126157A true JPH11126157A (en) | 1999-05-11 |
Family
ID=17779010
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP9292215A Pending JPH11126157A (en) | 1997-10-24 | 1997-10-24 | Multiplication method and multiplication circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH11126157A (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100403194B1 (en) * | 2000-06-21 | 2003-10-23 | 주식회사 에이디칩스 | Multiplier |
| KR100431354B1 (en) * | 2001-10-11 | 2004-05-14 | (주)씨앤에스 테크놀로지 | The multiplier circuit |
| WO2006022089A1 (en) * | 2004-08-26 | 2006-03-02 | Matsushita Electric Industrial Co., Ltd. | Multiplying device |
| CN100440136C (en) * | 2005-02-17 | 2008-12-03 | 松下电器产业株式会社 | arithmetic unit |
| JP2009524169A (en) * | 2006-01-20 | 2009-06-25 | クゥアルコム・インコーポレイテッド | Pre-saturated fixed point multiplier |
| JP2021152856A (en) * | 2020-03-19 | 2021-09-30 | 株式会社東芝 | Arithmetic circuit |
-
1997
- 1997-10-24 JP JP9292215A patent/JPH11126157A/en active Pending
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100403194B1 (en) * | 2000-06-21 | 2003-10-23 | 주식회사 에이디칩스 | Multiplier |
| KR100431354B1 (en) * | 2001-10-11 | 2004-05-14 | (주)씨앤에스 테크놀로지 | The multiplier circuit |
| WO2006022089A1 (en) * | 2004-08-26 | 2006-03-02 | Matsushita Electric Industrial Co., Ltd. | Multiplying device |
| CN100440136C (en) * | 2005-02-17 | 2008-12-03 | 松下电器产业株式会社 | arithmetic unit |
| JP2009524169A (en) * | 2006-01-20 | 2009-06-25 | クゥアルコム・インコーポレイテッド | Pre-saturated fixed point multiplier |
| JP2011248904A (en) * | 2006-01-20 | 2011-12-08 | Qualcomm Incorporated | Pre-saturating fixed-point multiplier |
| US8082287B2 (en) | 2006-01-20 | 2011-12-20 | Qualcomm Incorporated | Pre-saturating fixed-point multiplier |
| TWI396130B (en) * | 2006-01-20 | 2013-05-11 | Qualcomm Inc | Pre-saturating fixed-point multiplier |
| JP2021152856A (en) * | 2020-03-19 | 2021-09-30 | 株式会社東芝 | Arithmetic circuit |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100294015B1 (en) | Adder for handling multiple data with different data type | |
| US5070471A (en) | High speed multiplier which divides multiplying factor into parts and adds partial end products | |
| JPS62280930A (en) | Digital multiplier | |
| US3842250A (en) | Circuit for implementing rounding in add/subtract logic networks | |
| JPH11126157A (en) | Multiplication method and multiplication circuit | |
| CN100517213C (en) | Multiplying device | |
| US6484193B1 (en) | Fully pipelined parallel multiplier with a fast clock cycle | |
| JPH0464091B2 (en) | ||
| US8606842B2 (en) | N-digit subtraction unit, N-digit subtraction module, N-digit addition unit and N-digit addition module | |
| JPH0793134A (en) | Multiplier | |
| JP2682142B2 (en) | Multiplier | |
| Nagendra et al. | Unifying carry-sum and signed-digital number representations for low power | |
| JP2777265B2 (en) | High radix square root arithmetic unit | |
| JP2518551B2 (en) | Multi-input adder circuit | |
| KR950015180B1 (en) | High speed adder | |
| JPH0635673A (en) | Multiplication method and circuit | |
| JP3122622B2 (en) | Division device | |
| JP2681968B2 (en) | Arithmetic processing unit | |
| SU607216A1 (en) | Arrangement for subtracting decimal numbers | |
| JP3417172B2 (en) | Arithmetic circuit | |
| JP2537876B2 (en) | Rounding circuit | |
| JP3461252B2 (en) | Multiplication method | |
| KR0153759B1 (en) | High speed multiplication-accumulation circuit | |
| JP2996024B2 (en) | Multiplication circuit | |
| JPH02300930A (en) | Multiplication circuit |