JP3106767B2 - Multiplication method and multiplication circuit - Google Patents

Multiplication method and multiplication circuit

Info

Publication number
JP3106767B2
JP3106767B2 JP05073164A JP7316493A JP3106767B2 JP 3106767 B2 JP3106767 B2 JP 3106767B2 JP 05073164 A JP05073164 A JP 05073164A JP 7316493 A JP7316493 A JP 7316493A JP 3106767 B2 JP3106767 B2 JP 3106767B2
Authority
JP
Japan
Prior art keywords
partial product
absolute value
circuit
multiplicand
multiplier
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.)
Expired - Fee Related
Application number
JP05073164A
Other languages
Japanese (ja)
Other versions
JPH06290029A (en
Inventor
貴行 峯丸
真木 豊蔵
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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP05073164A priority Critical patent/JP3106767B2/en
Publication of JPH06290029A publication Critical patent/JPH06290029A/en
Application granted granted Critical
Publication of JP3106767B2 publication Critical patent/JP3106767B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、例えばディジタル信号
処理等に用いられる乗算方法及び乗算回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multiplication method and a multiplication circuit used for, for example, digital signal processing.

【0002】[0002]

【従来の技術】従来、乗数をブースアルゴリズムに従っ
てコード化し、そのコード信号を用いて被乗数から部分
積を生成し、前記部分積をWallace Tree等
を用いて加算することで乗算を行なう方法があった。
2. Description of the Related Art Conventionally, there has been a method in which a multiplier is coded according to a Booth algorithm, a partial product is generated from a multiplicand using the code signal, and the partial product is added using a Wallace Tree or the like to perform multiplication. .

【0003】また、乗数Pと被乗数Qを乗算する場合に
ROMを用いる方法があり、その方法によると、データ
のビット長をMビットとすると、必要なROMの容量は
2Mワードとなる。乗算の交換可能であることを利用し
て、ワード数を半減する方法等があるが、Mが大きくな
るとワード数が非常に大きくなる。そこで、乗数Pと被
乗数QをそれぞれNビット毎に分割し、アドレス2Nビ
ット、データ数22NのROMを用いて部分積を生成し、
それをシフト加算することで乗算を行なう方法もあっ
た。
There is also a method of using a ROM when multiplying the multiplier P and the multiplicand Q. According to this method, if the bit length of data is M bits, the required capacity of the ROM is 22 M words. There is a method of halving the number of words by utilizing the interchangeability of multiplication, but the number of words becomes very large as M increases. Therefore, by dividing the multiplier factor P and the multiplicand Q for each N bits each, to generate a partial product using the ROM address 2N bits, the data number 2 2N,
There has also been a method of performing multiplication by shifting and adding them.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、乗数P
のみをブースアルゴリズムに従ってコード化する方法で
は、データのビット長が長くなると、部分積の個数が増
加するため、部分積を加算する部分の回路規模が大きく
なりやすいという問題点があった。
However, the multiplier P
In the method of coding only the data according to the Booth algorithm, if the bit length of the data becomes longer, the number of the partial products increases, so that there is a problem that the circuit scale of the portion to which the partial products are added tends to be large.

【0005】また、ROMを用いる後者の方法では、入
力されるデータが2の補数表現された数の場合には、最
上位のNビットに関する演算とそのほかのNビットの部
分に関する演算は、符号の演算をするかしないかでその
意味が異なるので、異なる種類のROMを用意する必要
があると言う問題点があった。
In the latter method using a ROM, when the input data is a number expressed in 2's complement, the operation on the most significant N bits and the operation on the other N bits are performed by using the sign code. Since the meaning is different depending on whether or not the operation is performed, there is a problem that different types of ROMs need to be prepared.

【0006】本発明は上記問題点を除去し、乗数、被乗
数を高次のブースアルゴリズムを利用してコード化する
ことで、データのビット長が長くなっても回路規模をそ
れほど増やさずに乗算が可能となる乗算方法を提供する
ことを目的とする。
The present invention eliminates the above problems and encodes the multiplier and the multiplicand using a higher-order Booth algorithm, so that multiplication can be performed without increasing the circuit scale even if the data bit length is increased. It is an object to provide a possible multiplication method.

【0007】[0007]

【課題を解決するための手段】本発明は、乗数、被乗数
の両方を高次のブースアルゴリズムに従ってコード信号
化する手段と、前記コード信号を用いて部分積を生成す
る手段と、前記部分積を加算する手段を備え、 前記コー
ド信号化する手段は、乗数と被乗数をコード化したそれ
ぞれのコード信号を絶対値と符号を表す部分とで構成
し、 前記部分積を生成する手段は、乗数のコード信号の
絶対値と被乗数のコード信号の絶対値から絶対値部分の
部分積を生成し、 前記部分積を加算する手段は、乗数と
被乗数のコード信号の符号を表す部分が同一符号の場合
は前記絶対値部分の部分積を加算し、異符号の場合は減
算する処理を行うことを特徴とする。
SUMMARY OF THE INVENTION According to the present invention, there are provided a multiplier, a multiplicand.
Both code signals according to the higher order Booth algorithm
Means for generating a partial product using the code signal.
Means that includes means for adding said partial products, said code
The means for converting to a signal is a code that encodes the multiplier and the multiplicand.
Each code signal consists of absolute value and sign part
And the means for generating the partial product comprises:
From the absolute value of the code signal of the absolute value and the multiplicand
The means for generating a partial product and adding the partial product includes a multiplier and a multiplier.
When the sign representing the sign of the code signal of the multiplicand is the same sign
Adds the partial product of the absolute value part,
Is performed .

【0008】また、乗数と被乗数をコード化したコード
信号の絶対値部分のMSBが“1”となる場合(最大値
をとる場合)に、部分積の生成をシフト動作で行うこと
を特徴とする
Also, a code encoding a multiplier and a multiplicand
When the MSB of the absolute value part of the signal is "1" (maximum value
), The partial product is generated by a shift operation.
It is characterized by .

【0009】[0009]

【作用】本発明によれば、高次のブースアルゴリズムを
利用して乗数P、被乗数Qの両方をコード化すること
で、ビット長が増加しても回路規模をそれほど大きくせ
ずに乗算をおこなう乗算回路を構成することが可能とな
る。
According to the present invention, both the multiplier P and the multiplicand Q are coded by using a higher-order Booth algorithm, so that multiplication is performed without increasing the circuit size even if the bit length increases. A multiplication circuit can be configured.

【0010】また、部分積を生成する場合に、高次のブ
ースアルゴリズムを利用してコード化することにより、
ROMを用いる方法で発生した、最上位を含むNビット
に関する演算とそのほかの部分に関する演算が異なると
いう問題は起こらず、同一の回路を用いて演算すること
が可能となる。
When a partial product is generated, coding is performed using a higher-order Booth algorithm.
There is no problem that the operation on the N bits including the most significant bit and the operation on the other parts generated by the method using the ROM are different from each other, and the operation can be performed using the same circuit.

【0011】さらに、前記コード信号のうちに符号を表
すビットを1ビット取り、これに関する処理を部分積を
加算する手段で行なうことで、前記コード信号をMビッ
トの信号線で表すことができ、部分積を演算する回路の
規模を抑えることができる。
Further, by taking one bit representing a code from the code signal and performing a process related thereto by means for adding a partial product, the code signal can be represented by an M-bit signal line, The size of the circuit for calculating the partial product can be reduced.

【0012】また、前記コード信号MビットのうちMS
Bを利用する場合が2M-1の1通りしかなく、2のべき
に関する処理をシフト動作で実現することにより、部分
積を演算する回路の規模を抑えることもできる。
Further, MS of the M bits of the code signal
B is used only in one case of 2 M−1 , and by realizing the process related to the power of 2 by the shift operation, the scale of the circuit for calculating the partial product can be suppressed.

【0013】[0013]

【実施例】次に、本発明の乗算方法を8ビットの場合を
例として説明する。
Next, the multiplication method according to the present invention will be described with reference to the case of 8 bits.

【0014】8ビットの2の補数表現された乗数Pと、
被乗数Qを2のべき表示で表すと(数1)となる。
An 8-bit two's complement multiplier P,
When the multiplicand Q is represented by a power of two, it becomes (Equation 1).

【0015】[0015]

【数1】 (Equation 1)

【0016】但し、pi,qj (0≦i、j≦7)は1か
0の値をとる。このP、Qを4次のブース法を利用して
表現すると(M=4に相当)、(数2)となる。
However, p i , q j (0 ≦ i, j ≦ 7) takes a value of 1 or 0. If P and Q are expressed using the fourth-order Booth method (corresponding to M = 4), the following equation (2) is obtained.

【0017】[0017]

【数2】 (Equation 2)

【0018】但し、−8≦Xi、Yj≦8である。−8≦
i、Yj≦8の数を表現するために、符号ビット+絶対
値で表示するとすると、M+1=5ビットで表現でき
る。このX1、X0、Y1、Y0を用いると、P×Qは(数
3)と表すことができる。
However, -8 ≦ X i and Y j ≦ 8. −8 ≦
In order to represent the number of X i , Y j ≦ 8, if it is represented by a sign bit + an absolute value, it can be represented by M + 1 = 5 bits. By using X 1 , X 0 , Y 1 , and Y 0 , P × Q can be expressed by (Equation 3).

【0019】[0019]

【数3】 (Equation 3)

【0020】つまり、X11、X01、X10、X00
を求め、シフト加算すればよい。そして上記4つの部分
積は、以下のようにして求めることができる。
That is, X 1 Y 1 , X 0 Y 1 , X 1 Y 0 , X 0 Y 0
, And shift and add. The above four partial products can be obtained as follows.

【0021】Xi、Yjの絶対値を示すそれぞれ4ビット
の部分をあわせて8ビットの入力信号としてその組み合
わせからXijの値を出力する。この組み合わせは、0
の場合を除いて8×8=64通りある。Xi、Yjのどち
らかが0の場合は、部分積は”0”となる。
[0021] X i, and outputs the absolute value the values of X i Y j from its combination as an input signal of 8 bits together portions of 4 bits each indicating the Y j. This combination is 0
Except for the case, there are 64 (= 8 × 8) patterns. When either X i or Y j is 0, the partial product is “0”.

【0022】部分積を生成するに必要な組合せの数は、
以下の様にして低減できる。つまり、絶対値を示す4ビ
ットの部分のうち、MSBは絶対値が8の場合にのみ1
となる。そこで、部分積を生成する前に、Xi、Yjのそ
れぞれ絶対値を表わす4ビットの部分のMSBに着目
し、このMSBが1でない場合には、MSBを除く3ビ
ットの部分をそのまま部分積生成回路に入力し、部分積
を生成する。
The number of combinations required to generate a partial product is
It can be reduced as follows. That is, of the 4-bit portion indicating the absolute value, the MSB is 1 only when the absolute value is 8.
Becomes Therefore, before generating the partial product, attention is paid to the MSB of the 4-bit portion representing the absolute value of each of X i and Y j . If this MSB is not 1, the 3-bit portion excluding the MSB is partially Input to the product generation circuit to generate a partial product.

【0023】一方、MSBが1である場合には、MSB
を除いた3ビットの部分を”001”とし(つまり、1
/8の値にして)、部分積生成回路に入力するのであ
る。
On the other hand, when the MSB is 1, the MSB
Is set to "001" (that is, 1 bit).
/ 8) and input to the partial product generation circuit.

【0024】以上の操作の結果生成された部分積を、両
方のMSBが0である場合には0ビット(1倍に相
当)、一方のMSBが1である場合には3ビット(8倍
に相当)、両方のMSBが1である場合には6ビット
(64倍に相当)左シフト(下位は0づめ)すれば正し
い部分積を得ることができ、この場合、部分積を生成す
るために必要な組合せの数は、7×7=49通りとする
こともできる。
The partial product generated as a result of the above operation is represented by 0 bits (corresponding to 1) when both MSBs are 0, and 3 bits (corresponding to 8 times) when one of the MSBs is 1. If both MSBs are 1, then a 6-bit (corresponding to 64 times) left shift (lower order by 0) can obtain a correct partial product. In this case, to generate a partial product, The number of required combinations can be 7 × 7 = 49.

【0025】以上の操作の例を挙げると、Xiの絶対値
を表す4ビットのMSBが1(Xiの絶対値=8)であ
り、Yjの絶対値を表す4ビットのMSBが1でない場
合は、部分積生成回路では”001”×”Yjの絶対
値”の演算が実施される事になる。この演算の結果は、
本来の演算結果の8分の1である。MSBの一方が1で
あるので、この演算結果に対して3ビットの左シフトが
施され、部分積である、”Xiの絶対値”×”Yjの絶対
値”を得ることができる。
[0025] Examples of the above operation, 4-bit MSB representing the absolute value of X i is 1 (absolute value of X i = 8), 4-bit MSB representing the absolute value of Y j is 1 If not, the partial product generation circuit performs an operation of “001” × “absolute value of Y j ”. The result of this operation is
One-eighth of the original operation result. Since one of the MSB is 1, the left shift 3 bits for this calculation result is performed, it is possible to obtain a partial product, "the absolute value of X i" × "the absolute value of Y j".

【0026】同様に両方のMSBが1である場合、すな
わち”Xiの絶対値”×”Yjの絶対値”=64の場合に
は、部分積生成回路の入力はそれぞれ”001”であ
り、その出力は”1”となる。この出力を6ビット左シ
フトするので、”1000000”=64を得る。ま
た、4つの符号ビットは、部分積加算手段に入力され、
部分積の加減算を制御する。
Similarly, when both MSBs are 1, that is, when “absolute value of X i ” × “absolute value of Y j ” = 64, the input of the partial product generation circuit is “001”. , Its output becomes “1”. Since this output is shifted left by 6 bits, "1,000,000" = 64 is obtained. Also, the four sign bits are input to the partial product addition means,
Controls addition and subtraction of partial products.

【0027】部分積の加減算は(数3)に従って行われ
る。部分積Xijは2つの符号ビットの排他的論理和が
1の時に負となるので、その場合には減算を行い、排他
的論理和が0の時は正であるので、加算を行う。
The addition and subtraction of the partial product is performed according to (Equation 3). The partial product X i Y j is negative when the exclusive OR of the two sign bits is 1, so in that case, subtraction is performed, and when the exclusive OR is 0, the addition is performed. .

【0028】(数3)の2のべきに関する処理は左シフ
トで行う。つまり、X11は8ビット、X10、X01
は4ビット、X00は0ビット左シフトして加減算す
る。以上の部分積の加減算の結果、P×Qの積を得るこ
とができる。
The processing relating to the power of 2 in (Equation 3) is performed by shifting left. That is, X 1 Y 1 is 8 bits, X 1 Y 0 , X 0 Y 1
Is 4 bits, and X 0 Y 0 is shifted left by 0 bits to perform addition and subtraction. As a result of the above addition and subtraction of the partial products, a product of P × Q can be obtained.

【0029】次に本発明の乗算方法を利用した、8ビッ
ト×8ビットの乗算回路の実施例について、図面を用い
て詳細に説明する。
Next, an embodiment of an 8-bit × 8-bit multiplication circuit using the multiplication method of the present invention will be described in detail with reference to the drawings.

【0030】図1に本実施例回路の構成図を示す。乗数
1と被乗数2はそれぞれブースコード化手段3、4に入
力される。乗数1をコード信号化したコード信号5、6
と被乗数2をコード化したコード信号7、8の4つの各
5ビット信号のうち、絶対値を表わす4ビットの部分が
部分積生成手段9に入力され、部分積生成手段9から部
分積14〜17が出力され、出力された部分積14〜1
7は部分積加算手段18に入力される。また、コード信
号5〜8の符号を表わす符号ビット10〜13も部分積
加算手段18に入力され、各部分積14〜17の加減算
を制御する。部分積加算手段18で、この加減算を行
い、乗数1と被乗数2の積19が出力される。
FIG. 1 shows a configuration diagram of the circuit of this embodiment. The multiplier 1 and the multiplicand 2 are input to booth coding means 3 and 4, respectively. Code signals 5, 6 obtained by converting multiplier 1 into code signals
Of the four 5-bit signals of code signals 7 and 8 obtained by encoding the multiplicand 2 and the 4-bit portion representing the absolute value, the 4-bit portion is input to the partial product generation means 9 and the partial products 14 to 17 is output, and the output partial products 14-1
7 is input to the partial product addition means 18. Further, code bits 10 to 13 representing the codes of the code signals 5 to 8 are also input to the partial product adding means 18 to control addition and subtraction of the partial products 14 to 17. This addition / subtraction is performed by the partial product addition means 18, and the product 19 of the multiplier 1 and the multiplicand 2 is output.

【0031】次に部分積生成手段9について説明する。
図2にその回路構成を示す。コード信号5〜8の絶対値
を示す部分である4ビットの絶対値信号101〜104
は(101、103)、(101、104)、(10
2、103)、(102、104)という組みでそれぞ
れ”001”生成回路(105、106)、(107、
108)、(109、110)、(111、112)に
入力される。”001”生成回路105〜112はすべ
て同じ回路で、入力される4ビットの絶対値信号のMS
Bが1である場合には”001”を、MSBが0である
場合にはMSBを除く3ビットを出力する。
Next, the partial product generating means 9 will be described.
FIG. 2 shows the circuit configuration. 4-bit absolute value signals 101 to 104, which are portions indicating the absolute values of the code signals 5 to 8
Are (101, 103), (101, 104), (10
2, 103) and (102, 104) as "001" generation circuits (105, 106), (107,
108), (109, 110) and (111, 112). The “001” generation circuits 105 to 112 are all the same circuit, and the MS of the input 4-bit absolute value signal is
When B is 1, "001" is output, and when MSB is 0, 3 bits excluding the MSB are output.

【0032】”001”生成回路105〜112の出力
は、部分積生成回路113〜116に入力される。ま
た、4ビットの絶対値信号101〜104のうち、MS
Bが(101、103)、(101、104)、(10
2、103)、(102、104)という組みでそれぞ
れシフター117〜120に入力される。
Outputs of the "001" generating circuits 105 to 112 are input to partial product generating circuits 113 to 116. Also, among the 4-bit absolute value signals 101 to 104, MS
B is (101, 103), (101, 104), (10
2, 103) and (102, 104) are input to the shifters 117 to 120, respectively.

【0033】4つの部分積生成回路113〜116は全
く同じ回路で、入力される2つの3ビット(10進の0
〜7に相当)の信号の積を出力する。出力された積はそ
れぞれシフター117〜120に入力される。
The four partial product generation circuits 113 to 116 are exactly the same circuit, and receive two 3-bit (decimal 0) bits.
7) is output. The output products are input to shifters 117 to 120, respectively.

【0034】このシフターも全て同じ回路であり、ここ
ではシフター117について述べる。部分積生成回路1
13の出力と絶対値信号101のMSBと絶対値信号1
03のMSBが入力されると、両方のMSBが0の時は
部分積生成回路112の出力を0ビットシフト(スル
ー)し、MSBの一方が1の時は部分積生成回路112
の出力を3ビット左シフト(0づめ)して出力し、両方
のMSBが1の時は部分積生成回路112の出力を6ビ
ット左シフト(0づめ)して部分積14として出力す
る。
All the shifters have the same circuit, and the shifter 117 will be described here. Partial product generation circuit 1
13 and the MSB of the absolute value signal 101 and the absolute value signal 1
When the MSBs of 03 are input, the output of the partial product generation circuit 112 is shifted (through) by 0 bit when both MSBs are 0, and when one of the MSBs is 1, the partial product generation circuit 112 is shifted.
Is shifted left by 3 bits (zeroed) and output. When both MSBs are 1, the output of the partial product generation circuit 112 is shifted left by 6 bits (zeroed) and output as a partial product.

【0035】次に、部分積加算手段18について説明す
る。図3にその構成図を示す。部分積加算手段18は加
算入力生成部200と4入力加算回路201で構成され
る。加算入力生成部200は加算入力生成回路202〜
205の4つの同じ回路から構成され、部分積生成手段
9から送られる部分積14〜17と符号ビット10〜1
3から減算信号210〜213と加算入力220〜22
3を生成する。
Next, the partial product adding means 18 will be described. FIG. 3 shows the configuration diagram. The partial product addition means 18 includes an addition input generation unit 200 and a 4-input addition circuit 201. The addition input generation section 200 includes addition input generation circuits 202 to
205, four partial circuits 14 to 17 and code bits 10 to 1 sent from the partial product generating means 9.
3, subtraction signals 210 to 213 and addition inputs 220 to 22
3 is generated.

【0036】ここで、加算入力生成回路202の構成を
説明する。その他の加算入力生成回路203〜205は
入力される信号のみが異なるので、説明を省略する。
Here, the configuration of the addition input generation circuit 202 will be described. The other addition input generation circuits 203 to 205 are different from each other only in the input signal, and thus the description is omitted.

【0037】図4に加算入力生成回路202の構成を示
す。加算入力生成回路202は、排他的論理和回路30
0とビット反転回路301とセレクタ302で構成され
る。排他的論理和回路300には符号ビット11と符号
ビット13が入力され、その排他的論理和出力が減算信
号210となる。符号ビット11と符号ビット13が異
なる値、即ち部分積14の値が負である場合に”1”と
なる。
FIG. 4 shows the configuration of the addition input generation circuit 202. The addition input generation circuit 202 includes the exclusive OR circuit 30.
It comprises 0, a bit inversion circuit 301 and a selector 302. The sign bit 11 and the sign bit 13 are input to the exclusive OR circuit 300, and the exclusive OR output thereof becomes a subtraction signal 210. When the sign bit 11 and the sign bit 13 are different values, that is, when the value of the partial product 14 is negative, it becomes “1”.

【0038】部分積生成回路9で生成された部分積14
は、ビット反転回路301とセレクタ302に入力され
る。ビット反転回路301では、部分積14のそれぞれ
のビットを反転してセレクタ302に入力する。セレク
タ302では部分積14とビット反転回路301の出力
とを、減算信号210で切り替えて加算入力220とし
て出力する。切り替えは、減算信号210が”1”であ
るときは、ビット反転回路301の出力を出力し、減算
信号210が”0”であるときは、部分積14を出力す
ると言うように行われる。
The partial product 14 generated by the partial product generation circuit 9
Is input to the bit inversion circuit 301 and the selector 302. In the bit inversion circuit 301, each bit of the partial product 14 is inverted and input to the selector 302. The selector 302 switches between the partial product 14 and the output of the bit inversion circuit 301 with the subtraction signal 210 and outputs the result as the addition input 220. Switching is performed such that when the subtraction signal 210 is “1”, the output of the bit inversion circuit 301 is output, and when the subtraction signal 210 is “0”, the partial product 14 is output.

【0039】加算入力生成部200からの出力、減算信
号210〜213と加算入力220〜223は4入力加
算回路201に入力される。4入力加算回路201にお
いてこれら8つの信号は、減算信号210と加算入力2
20、減算信号211と加算入力221、減算信号21
2と加算入力222、減算信号213と加算入力223
の4つの組として扱われる。
The output from the addition input generation unit 200, the subtraction signals 210 to 213 and the addition inputs 220 to 223 are input to a four-input addition circuit 201. In the four-input adding circuit 201, these eight signals are the subtracted signal 210 and the added input 2
20, subtraction signal 211, addition input 221, subtraction signal 21
2 and addition input 222, subtraction signal 213 and addition input 223
Are treated as four sets.

【0040】これらの組はそれぞれ(数3)のX11
10、X01、X00の値を示している。4入力加算
回路201では(数3)の加算を行い、P×Qの前記積
19を得る。ここで28、24についての処理は、それぞ
れX11を8ビット左シフト、X01とX10を4ビッ
ト左シフトして加算することで容易に実現できる。又、
11、X10、X01、X00の値が負である場合、
すなわち減算信号210〜213が”1”である場合に
は、減算信号210〜213の対応する加算入力220
〜223のLSB桁に1を加え、MSB桁より上位の桁
を1で符号拡張する事により、2の補数演算により減算
が実行できる。
Each of these sets is represented by (Equation 3) X 1 Y 1 ,
The values of X 1 Y 0 , X 0 Y 1 , and X 0 Y 0 are shown. The 4-input addition circuit 201 performs the addition of (Equation 3) to obtain the product 19 of P × Q. Here, the processing of 2 8 and 2 4 can be easily realized by shifting X 1 Y 1 to the left by 8 bits and shifting X 0 Y 1 and X 1 Y 0 to the left by 4 bits and adding them. or,
If the values of X 1 Y 1 , X 1 Y 0 , X 0 Y 1 , X 0 Y 0 are negative,
That is, when the subtraction signals 210 to 213 are “1”, the corresponding addition inputs 220 of the subtraction signals 210 to 213
By adding 1 to the LSB digit of 〜223 and sign-extending the digit higher than the MSB digit by 1, the subtraction can be performed by two's complement operation.

【0041】次に乗算回路の第2の実施例について述べ
る。第2の実施例は、第1の実施例において部分積生成
手段9と部分積加算手段18の加算入力生成部225は
同じ回路が4つで構成されているので、絶対値信号10
1〜104を時分割して入力することにより、1つの回
路で部分積生成・加算入力生成部を構成したもので、こ
の場合の構成を図5に示す。
Next, a second embodiment of the multiplying circuit will be described. In the second embodiment, the absolute value signal 10 is used because the partial input generator 225 of the partial product generator 9 and the addition input generator 225 of the partial product adder 18 in the first embodiment are composed of four identical circuits.
The partial product generation / addition input generation unit is configured by one circuit by inputting 1 to 104 in a time-division manner. FIG. 5 shows the configuration in this case.

【0042】図5において乗数1と被乗数2はそれぞれ
ブースコード化手段3、4に入力され、コード信号5〜
8を生成する。コード信号5〜8はそれぞれデータラッ
チ500〜503にとりこまれ、4サイクルの間保持さ
れる。データラッチ500〜503の出力、コード入力
504〜507は部分積生成・加算手段508に入力さ
れ、部分積生成・加算手段508において演算処理され
た信号が積19として出力される。
In FIG. 5, a multiplier 1 and a multiplicand 2 are input to booth coding means 3 and 4, respectively, and code signals 5 to 5 are input.
8 is generated. The code signals 5 to 8 are taken into the data latches 500 to 503, respectively, and are held for four cycles. The outputs of the data latches 500 to 503 and the code inputs 504 to 507 are input to the partial product generating / adding means 508, and the signal processed by the partial product generating / adding means 508 is output as the product 19.

【0043】ここで、第1の実施例と変更のある部分積
生成・加算手段508について説明する。図6に部分積
生成・加算手段508の構成を示す。コード入力504
と505はセレクタ600にコード入力506と507
はセレクタ601にそれぞれ入力される。セレクタ60
0では、制御回路603から出力される制御信号604
により、制御信号604が”0”のときはコード入力5
04を、制御信号604が”1”のときはコード入力5
05を出力する。同様にセレクタ601では、制御回路
603から出力される制御信号605により、制御信号
605が”0”のときはコード入力506を、制御信号
605が”1”のときはコード入力507を出力する。
ここで、制御信号604と制御信号605を1サイクル
ずつ、(0、0)、(1、0)、(0、1)、(1、
1)の様に切り替えると、それに対応して(数3)の、
(X11)、(X01)、(X10)、(X00)の組
み合わせで、信号が選択されることになる。
Here, a description will be given of a partial product generating / adding means 508 which is different from the first embodiment. FIG. 6 shows the configuration of the partial product generating / adding means 508. Code input 504
And 505 are the code inputs 506 and 507 to the selector 600
Are input to the selector 601 respectively. Selector 60
At 0, the control signal 604 output from the control circuit 603
When the control signal 604 is "0", the code input 5
04 when the control signal 604 is “1”.
05 is output. Similarly, the selector 601 outputs a code input 506 when the control signal 605 is “0” and a code input 507 when the control signal 605 is “1” according to the control signal 605 output from the control circuit 603.
Here, the control signal 604 and the control signal 605 are changed one cycle at a time (0, 0), (1, 0), (0, 1), (1,
When switching as in 1), corresponding to (Equation 3),
A signal is selected by a combination of (X 1 Y 1 ), (X 0 Y 1 ), (X 1 Y 0 ), and (X 0 Y 0 ).

【0044】セレクタ600、601で選択された信号
は、それぞれその絶対値を示す部分と符号ビットとに分
けられる。すなわちセレクタ600の出力は絶対値信号
606と符号ビット607、セレクタ601の出力は絶
対値信号608と符号ビット609に分離される。絶対
値信号606と絶対値信号608はそれぞれ”001”
生成回路610、611に入力される。”001”生成
回路610、611は前記”001”生成回路105〜
112と全く同様の回路であるので、動作の説明は省略
する。”001”生成回路610、611の出力は部分
積生成回路612に入力される。部分積生成回路612
は前記部分積生成回路113〜116と全く同じ回路
で、3ビット×3ビットの積を出力しシフター613に
入力する。シフター613は前記シフター117〜12
0と全く同様の回路で、部分積生成回路612の出力と
絶対値信号606のMSBと絶対値信号608のMSB
から部分積614を出力する。この回路の動作は前記シ
フター117〜120と全く同様であり説明は省略す
る。
Each of the signals selected by the selectors 600 and 601 is divided into a part indicating its absolute value and a sign bit. That is, the output of the selector 600 is separated into an absolute value signal 606 and a sign bit 607, and the output of the selector 601 is separated into an absolute value signal 608 and a sign bit 609. The absolute value signal 606 and the absolute value signal 608 are each “001”.
The signals are input to the generation circuits 610 and 611. The “001” generating circuits 610 and 611 are the “001” generating circuits 105 to
Since the circuit is completely the same as 112, the description of the operation is omitted. The outputs of the “001” generation circuits 610 and 611 are input to the partial product generation circuit 612. Partial product generation circuit 612
Is the same circuit as the partial product generation circuits 113 to 116, outputs a product of 3 bits × 3 bits, and inputs the product to the shifter 613. The shifters 613 are the shifters 117 to 12.
0, the output of the partial product generation circuit 612, the MSB of the absolute value signal 606, and the MSB of the absolute value signal 608.
Output the partial product 614 from. The operation of this circuit is exactly the same as that of the shifters 117 to 120, and the description is omitted.

【0045】部分積614はシフター615に入力され
る。シフター615では、前記制御回路603で生成さ
れるシフト量制御信号616で指定される量だけ部分積
614を左シフトする。シフト量制御信号616は1サ
イクル毎に8、4、4、0ビットのシフト量を与える。
これにより(数3)の2のべき乗に関する処理が施され
る。
The partial product 614 is input to the shifter 615. The shifter 615 shifts the partial product 614 to the left by an amount specified by the shift amount control signal 616 generated by the control circuit 603. The shift amount control signal 616 gives a shift amount of 8, 4, 4, 0 bits per cycle.
As a result, processing relating to the power of 2 of (Equation 3) is performed.

【0046】シフター615の出力は加減算回路617
に入力される。加減算回路617の出力は1サイクル毎
にレジスタ618に取り込まれ、取り込まれた信号は、
加減算回路617のもう一方の入力とされ、これにより
加減算回路617は累積加算器として動作する。加減算
回路617では、符号ビット607と符号ビット609
から排他的論理和回路619で生成される減算信号62
0が”1”の場合にはレジスタ618に取り込まれた信
号からシフター615の出力を減算し、減算信号620
が”0”の場合にはレジスタ618に取り込まれた信号
とシフター615の出力を加算する。またこの累積加算
は制御回路603で生成されるリセット信号621を受
けて初期化される。初期化から累積加算を4サイクル行
った信号が積19として出力される。この一連の動作の
タイミングを(表1)に示す。
The output of the shifter 615 is added to an addition / subtraction circuit 617.
Is input to The output of the addition / subtraction circuit 617 is taken into the register 618 every cycle, and the taken signal is
This is the other input of the addition / subtraction circuit 617, whereby the addition / subtraction circuit 617 operates as a cumulative adder. In the addition / subtraction circuit 617, the sign bit 607 and the sign bit 609
Signal 62 generated by the exclusive OR circuit 619 from the
When 0 is “1”, the output of the shifter 615 is subtracted from the signal taken into the register 618, and the subtracted signal 620
Is "0", the signal taken into the register 618 and the output of the shifter 615 are added. The cumulative addition is initialized by receiving a reset signal 621 generated by the control circuit 603. A signal obtained by performing cumulative addition for four cycles from the initialization is output as a product 19. The timing of this series of operations is shown in (Table 1).

【0047】[0047]

【表1】 [Table 1]

【0048】なお、(表1)中において、記号^は、べ
き乗を意味する。例えば、2^4は、2の4乗即ち16
を意味する。
In Table 1, the symbol ^ means a power. For example, 2 ^ 4 is 2 to the fourth power or 16
Means

【0049】[0049]

【発明の効果】以上説明したように、乗数、被乗数の両
方を高次のブースアルゴリズムに従ってコード化し、前
記コード信号を用いて乗数、被乗数を複数の部分に分割
し、各分割部分同士を乗算して得られる部分積を加算し
て積を得るので、データのビット長が長くなっても回路
規模をそれほど増やさずに乗算が可能となる。
As described above, both the multiplier and the multiplicand are coded according to the higher-order Booth algorithm, the multiplier and the multiplicand are divided into a plurality of parts by using the code signal, and each divided part is multiplied. Since the product is obtained by adding the partial products obtained as described above, multiplication can be performed without increasing the circuit scale even if the bit length of the data becomes long.

【0050】また、部分積を生成する場合に、高次のブ
ースアルゴリズムを利用してコード化するので、同一の
回路を用いて部分積を生成することが可能となる。これ
により、回路の設計時間を短縮することができる。
When a partial product is generated, the coding is performed by using a higher-order Booth algorithm. Therefore, it is possible to generate the partial product using the same circuit. As a result, the circuit design time can be reduced.

【0051】さらに、前記コード信号のうちに符号を表
すビットを1ビット取り、これに関する処理を部分積を
加算する手段で行い、部分積を演算する回路の規模を抑
えることが可能となる。
Furthermore, one bit representing a code is taken out of the code signal, and processing relating to the bit is performed by means for adding a partial product, so that the scale of a circuit for calculating the partial product can be suppressed.

【0052】また、前記コード信号MビットのうちMS
Bを利用する場合は2M−1の1通りだけであり、2の
べきに関する処理をシフト動作で行うことで、部分積を
演算する回路の規模を抑えることが可能となる。
Further, MS of the M bits of the code signal
In the case of using B, there is only one type of 2M-1, and by performing the process related to the power of 2 by the shift operation, it is possible to suppress the scale of the circuit that calculates the partial product.

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

【図1】本発明の乗算回路の一実施例1の構成図FIG. 1 is a configuration diagram of a first embodiment of a multiplication circuit according to the present invention;

【図2】同実施例における部分積生成手段の構成図FIG. 2 is a configuration diagram of a partial product generation unit in the embodiment.

【図3】同実施例における部分積加算手段の構成図FIG. 3 is a configuration diagram of a partial product addition unit in the embodiment.

【図4】同実施例における加算入力生成回路の構成図FIG. 4 is a configuration diagram of an addition input generation circuit in the embodiment.

【図5】本発明の乗算回路の他の実施例の構成図FIG. 5 is a configuration diagram of another embodiment of the multiplication circuit of the present invention.

【図6】同実施例における部分積生成・加算手段の構成
FIG. 6 is a configuration diagram of a partial product generation / addition unit in the embodiment.

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

1 乗数 2 被乗数 3、4 ブースコード化手段 9 部分積生成手段 18 部分積加算手段 19 積 105-112 ”001”生成回路 113-116 部分積生成回路 117-120 シフター 200 加算入力生成部 201 4入力加算回路 202-205 加算入力生成回路 508 部分積生成・加算手段 600、601 セレクタ 610、611 ”001”生成回路 612 部分積生成回路 613 シフター 615 シフター 617 加減算回路 618 レジスタ 1 multiplier 2 multiplicand 3, 4 Booth coding means 9 partial product generating means 18 partial product adding means 19 product 105-112 “001” generating circuit 113-116 partial product generating circuit 117-120 shifter 200 addition input generating unit 2014 input Addition circuit 202-205 Addition input generation circuit 508 Partial product generation / addition means 600, 601 Selector 610, 611 "001" generation circuit 612 Partial product generation circuit 613 Shifter 615 Shifter 617 Addition / subtraction circuit 618 Register

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 7/52 310 G06F 17/10 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 7 , DB name) G06F 7/52 310 G06F 17/10

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】乗数、被乗数の両方を高次のブースアルゴ
リズムに従ってコード信号化する手段と、前記コード信
号を用いて部分積を生成する手段と、前記部分積を加算
する手段を備え、 前記コード信号化する手段は、乗数と被乗数をコード化
したそれぞれのコード信号を絶対値と符号を表す部分と
で構成し、 前記部分積を生成する手段は、乗数のコード信号の絶対
値と被乗数のコード信号の絶対値から絶対値部分の部分
積を生成し、 前記部分積を加算する手段は、乗数と被乗数のコード信
号の符号を表す部分が同一符号の場合は前記絶対値部分
の部分積を加算し、異符号の場合は減算する処理を行う
ことを特徴とす乗算回路
1. A means for converting both a multiplier and a multiplicand into a code signal in accordance with a higher-order Booth algorithm;
Means for generating a partial product using a signal, and adding the partial product
Means for encoding the multiplier and the multiplicand.
Each of the code signals obtained is a part representing the absolute value and the sign.
And the means for generating the partial product includes an absolute value of the code signal of the multiplier.
From the absolute value of the code signal of the value and the multiplicand to the absolute value part
The means for generating a product and adding the partial products comprises a code signal for the multiplier and the multiplicand.
If the part representing the sign of the signal is the same sign, the absolute value part
Partial product adding, multiplying circuits you and performing processing in the case of different signs for subtraction.
【請求項2】前記部分積を生成する手段は、乗数と被乗
数をコード化したコード信号の前記絶対値部分のMSB
が“1”となる場合(最大値をとる場合)に、部分積の生
成をシフト動作で行うことを特徴とする請求項1記載の
乗算回路。
2. The method according to claim 1, wherein the means for generating the partial product includes a multiplier and a multiplicand.
MSB of the absolute value part of the code signal encoding the number
Is "1" (maximum value), the partial product
The multiplication circuit according to claim 1, wherein the generation is performed by a shift operation .
【請求項3】乗数と被乗数をコード化したそれぞれのコ
ード信号を絶対値と符号を表す部分とで構成し、前記乗
数、前記被乗数の両方を高次のブースアルゴリズムに従
ってコード信号化するステップと、 乗数のコード信号の絶対値と被乗数のコード信号の絶対
値から絶対値部分の部分積を生成するステップと、 乗数と被乗数のコード信号の符号を表す部分が同一符号
の場合は前記絶対値部分の部分積を加算し、異符号の場
合は減算する処理を行うステップを含むことを特徴とす
る乗算方法
3. A method for encoding a multiplier and a multiplicand.
The code signal is composed of an absolute value and a part representing a sign.
Both the number and the multiplicand follow the higher order Booth algorithm.
A step of encoding signals of I, the absolute of the absolute value and the multiplicand code signal code signal of the multiplier
The step of generating a partial product of the absolute value part from the value and the part representing the sign of the code signal of the multiplier and the multiplicand are the same sign
In the case of, the partial product of the absolute value part is added, and
The step of performing a subtraction process if
Multiplication method .
JP05073164A 1993-03-31 1993-03-31 Multiplication method and multiplication circuit Expired - Fee Related JP3106767B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP05073164A JP3106767B2 (en) 1993-03-31 1993-03-31 Multiplication method and multiplication circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP05073164A JP3106767B2 (en) 1993-03-31 1993-03-31 Multiplication method and multiplication circuit

Publications (2)

Publication Number Publication Date
JPH06290029A JPH06290029A (en) 1994-10-18
JP3106767B2 true JP3106767B2 (en) 2000-11-06

Family

ID=13510254

Family Applications (1)

Application Number Title Priority Date Filing Date
JP05073164A Expired - Fee Related JP3106767B2 (en) 1993-03-31 1993-03-31 Multiplication method and multiplication circuit

Country Status (1)

Country Link
JP (1) JP3106767B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3417286B2 (en) 1998-02-23 2003-06-16 株式会社デンソー Multiplier

Also Published As

Publication number Publication date
JPH06290029A (en) 1994-10-18

Similar Documents

Publication Publication Date Title
KR0165719B1 (en) Multiplication device using semiconductor memory
US4346451A (en) Dual moduli exponent transform type high speed multiplication system
JP3276444B2 (en) Division circuit
JPS595350A (en) Combined multiplier
JP3106767B2 (en) Multiplication method and multiplication circuit
JP3660075B2 (en) Dividing device
US5485413A (en) Multiplier utilizing the booth algorithm
JPS58137045A (en) Parallel multiplier
JP3417286B2 (en) Multiplier
JP3190826B2 (en) Product-sum operation unit
JP2606326B2 (en) Multiplier
JPS5841532B2 (en) Sekiwa Keisan Cairo
JP3071607B2 (en) Multiplication circuit
JP4042215B2 (en) Arithmetic processing apparatus and method
JPH0869372A (en) Binary multiplier
JP3855491B2 (en) Multiplier
JP3610564B2 (en) Information processing device
JP2699358B2 (en) Decoder circuit
JP2777265B2 (en) High radix square root arithmetic unit
JP3230349B2 (en) Decimal multiplier
JP3612950B2 (en) Arithmetic apparatus and method
JP2568608B2 (en) Multiplication circuit
JP3197186B2 (en) Multiplication device using semiconductor memory
JPH05216626A (en) Multiplier
JP2004295345A (en) Arithmetic unit and multiplying unit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees