JPH09179723A - Multiplier and arithmetic unit for sum of product - Google Patents

Multiplier and arithmetic unit for sum of product

Info

Publication number
JPH09179723A
JPH09179723A JP7340331A JP34033195A JPH09179723A JP H09179723 A JPH09179723 A JP H09179723A JP 7340331 A JP7340331 A JP 7340331A JP 34033195 A JP34033195 A JP 34033195A JP H09179723 A JPH09179723 A JP H09179723A
Authority
JP
Japan
Prior art keywords
partial product
bit
data
multiplier
complement
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
JP7340331A
Other languages
Japanese (ja)
Other versions
JP3558436B2 (en
Inventor
Yuji Nakai
祐二 中居
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 Holdings Corp
Original Assignee
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP34033195A priority Critical patent/JP3558436B2/en
Publication of JPH09179723A publication Critical patent/JPH09179723A/en
Application granted granted Critical
Publication of JP3558436B2 publication Critical patent/JP3558436B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce the number of inputs to an adder for adding partial products in a multiplier. SOLUTION: A multiplier encoder 101 encodes an 8-bit multiplier in accordance with secondary Booth's algorithm. In parallel with the encoding, a complementer 102 bit-inverts the five lower bits of an 8-bit multiplicand and adds '1' to the bit-inverted multi-plicand to form a 2's compliment and finds out complement data and a carry. A multi-input adder 104 adds four partial products generated by 1st to 4th partial product generators 110 to 113 from the output of the encoder 101 and the multiplicand to find out a product. When the logic value of a partial product complementing bit in the uppermost part of the output from the encoder 101 is '1', a selector circuit 103 substitutes the five lower bits of 4th partial product data generated by the 4th partial product generator 113 for the complement data of the circuit 102 and the influence of the carry of the complementer 102 to three upper bits of the 4th partial product data is attained in the 1st and 2nd partial product generators 110, 111.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、乗算装置と、それ
を用いた積和演算装置とに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multiplication device and a product-sum calculation device using the multiplication device.

【0002】[0002]

【従来の技術】近年、半導体集積回路の高速化への要求
は高まっており、演算要素の1つである乗算装置につい
て、高速の乗算装置が必要になっている。高速の乗算装
置を実現するためのアルゴリズムの1つとして、乗数を
コード化して部分積を生成するブース(Booth)の
アルゴリズムがある。乗算装置では、一般に、乗数、被
乗数入力を用いて発生させた複数の部分積を加算するこ
とにより、積を算出する。ブースのアルゴリズムによれ
ば、乗数をコード化して部分積を生成することにより、
部分積の数を減らすことができる。例えば、2次のブー
スのアルゴリズムでは部分積の数を約半分にすることが
できる。部分積の加算を行う加算器の動作速度は、部分
積の数に依存し、部分積の数が多ければ動作速度は遅く
なる。部分積の数、すなわち加算器の入力数が約半分に
なれば、加算器の負担が軽減される結果、加算の高速化
が達成される。
2. Description of the Related Art In recent years, there has been an increasing demand for speeding up of semiconductor integrated circuits, and a high-speed multiplying device is required for a multiplying device which is one of the arithmetic elements. As one of algorithms for realizing a high-speed multiplication device, there is Booth's algorithm for coding a multiplier to generate a partial product. In a multiplication device, generally, a product is calculated by adding a plurality of partial products generated using inputs of a multiplier and a multiplicand. According to Booth's algorithm, by encoding the multipliers to generate partial products,
The number of partial products can be reduced. For example, the number of partial products can be halved in the second-order Booth algorithm. The operation speed of the adder for adding partial products depends on the number of partial products, and the larger the number of partial products, the lower the operation speed. If the number of partial products, that is, the number of inputs to the adder is reduced to about half, the load on the adder is reduced, and as a result, the speeding up of the addition is achieved.

【0003】さて、乗数をコード化して生成された負の
部分積データは、1の補数形式のデータである。したが
って、負の部分積データに符号拡張を施す処理と、負の
部分積データを2の補数化するための論理値“1”のビ
ットを該部分積データの最下位ビットに加算する処理と
が必要である。正の部分積データでは、その最下位ビッ
トに論理値“0”のビットが加算される。以下の説明で
は、部分積データの最下位ビットに加算されるべき論理
値“1”又は“0”のビットを補数化ビットという。
Now, the negative partial product data generated by coding the multiplier is data in the one's complement format. Therefore, the process of performing sign extension on the negative partial product data and the process of adding the bit of the logical value “1” for converting the negative partial product data to 2's complement to the least significant bit of the partial product data are performed. is necessary. In the positive partial product data, the bit having the logical value "0" is added to the least significant bit. In the following description, a bit having a logical value "1" or "0" to be added to the least significant bit of the partial product data is called a complemented bit.

【0004】特開昭58−56033号には、2次のブ
ースのアルゴリズムを実現するための乗数エンコーダ
と、符号拡張省略機構とを備えた8ビット×8ビットの
乗算装置が開示されている。その部分積発生方法に係る
動作の概要を、図25に示す。図25において、X[0]
〜X[7] は被乗数の8ビットを、Y[0] 〜Y[7] は乗数
の8ビットを、M[0] 〜M[15]は積の16ビットをそれ
ぞれ表している。加算器の第1入力は、乗数エンコーダ
のコード化出力の第1の部分(最下位部分)と、被乗数
とを用いて生成された第1部分積データP0[0] 〜P0
[7] (ビット位置M[0] 〜M[7] )と、第1部分積の符
号の反転ビットIS0(ビット位置M[8])とで構成さ
れる。加算器の第2入力は、乗数エンコーダのコード化
出力の第2の部分と、被乗数とを用いて生成された第2
部分積データP1[0] 〜P1[7] (ビット位置M[2] 〜
M[9] )と、第2部分積の符号の反転ビットIS1(ビ
ット位置M[10])と、第1部分積データの最下位ビット
に加算されるべき補数化ビットBC0(ビット位置M
[0] )とで構成される。加算器の第3入力は、乗数エン
コーダのコード化出力の第3の部分と、被乗数とを用い
て生成された第3部分積データP2[0] 〜P2[7] (ビ
ット位置M[4] 〜M[11])と、第3部分積の符号の反転
ビットIS2(ビット位置M[12])と、第2部分積デー
タの最下位ビットに加算されるべき補数化ビットBC1
(ビット位置M[2] )とで構成される。加算器の第4入
力は、乗数エンコーダのコード化出力の第4の部分(最
上位部分)と、被乗数とを用いて生成された第4部分積
データP3[0] 〜P3[7] (ビット位置M[6] 〜M[1
3])と、第4部分積の符号の反転ビットIS3(ビット
位置M[14])と、第3部分積データの最下位ビットに加
算されるべき補数化ビットBC2(ビット位置M[4] )
とで構成される。加算器の第5入力は、ビット位置M
[8] ,M[9] ,M[11],M[13],M[15]の5個の論理値
“1”のビットと、第4部分積データの最下位ビットに
加算されるべき補数化ビットBC3(ビット位置M[6]
)とで構成される。第1〜第4部分積の各々の符号の
反転ビットIS0〜IS3と、桁上げ伝播のための5個
の論理値“1”のビットとは、各部分積の符号拡張を省
略するためのビットである。補数化ビットBC3は、乗
数エンコーダのコード化出力の最上位部分の中に含まれ
ていたビットであり、第4部分積データを2の補数化す
るためのビット、すなわち最上位部分積補数化ビットで
ある。そして、上記第1〜第5入力を加算することによ
り、2の補数形式の16ビットの積M[0] 〜M[15]が求
められる。
Japanese Unexamined Patent Publication (Kokai) No. 58-56033 discloses an 8-bit.times.8-bit multiplier having a multiplier encoder for realizing a secondary Booth's algorithm and a sign extension omission mechanism. An outline of the operation according to the partial product generation method is shown in FIG. In FIG. 25, X [0]
˜X [7] represents 8 bits of the multiplicand, Y [0] to Y [7] represent 8 bits of the multiplier, and M [0] to M [15] represent 16 bits of the product. The first input of the adder is the first partial product data P0 [0] to P0 generated using the first part (the lowest part) of the coded output of the multiplier encoder and the multiplicand.
[7] (bit positions M [0] to M [7]) and the inversion bit IS0 of the sign of the first partial product (bit position M [8]). The second input of the adder is a second portion generated using the second portion of the coded output of the multiplier encoder and the multiplicand.
Partial product data P1 [0] to P1 [7] (bit position M [2] to
M [9]), the inversion bit IS1 of the sign of the second partial product (bit position M [10]), and the complementation bit BC0 (bit position M) to be added to the least significant bit of the first partial product data.
[0]) and. The third input of the adder is the third partial product data P2 [0] to P2 [7] (bit position M [4]) generated using the third part of the coded output of the multiplier encoder and the multiplicand. ~ M [11]), the inversion bit IS2 of the sign of the third partial product (bit position M [12]), and the complemented bit BC1 to be added to the least significant bit of the second partial product data.
(Bit position M [2]). The fourth input of the adder is the fourth partial product data P3 [0] to P3 [7] (bits) generated using the fourth part (most significant part) of the coded output of the multiplier encoder and the multiplicand. Positions M [6] to M [1
3]), the inversion bit IS3 of the sign of the fourth partial product (bit position M [14]), and the complemented bit BC2 (bit position M [4]) to be added to the least significant bit of the third partial product data. )
It is composed of The fifth input of the adder is the bit position M
[8], M [9], M [11], M [13], M [15] 5 logical value "1" bits and the least significant bit of the 4th partial product data should be added Complement bit BC3 (bit position M [6]
). The inversion bits IS0 to IS3 of the signs of the first to fourth partial products and the five bits of the logical value "1" for carry propagation are bits for omitting the sign extension of each partial product. Is. The complement bit BC3 is a bit included in the most significant part of the coded output of the multiplier encoder, and is a bit for making the fourth partial product data 2's complement, that is, the most significant partial product complement bit. Is. Then, by adding the first to fifth inputs, 16-bit products M [0] to M [15] in 2's complement format are obtained.

【0005】[0005]

【発明が解決しようとする課題】上記従来の8ビット×
8ビットの乗算装置は、5入力の加算器を必要とした。
つまり、一部のビット位置M[6] ,M[8] のみのため
に、加算器の負担が十分には軽減されない問題があっ
た。また、乗数のコード化処理のための時間は、被乗数
側では空き時間となっていた。
The above-mentioned conventional 8 bits ×
The 8-bit multiplier required a 5-input adder.
That is, there is a problem that the load on the adder cannot be reduced sufficiently because of only some of the bit positions M [6] and M [8]. In addition, the time required for the encoding process of the multiplier is an idle time on the multiplicand side.

【0006】本発明の目的は、乗数のコード化処理の際
に生じる被乗数側の空き時間を有効利用して、乗算装置
の中の部分積の加算のための加算器の入力数を低減する
ことにある。
An object of the present invention is to effectively utilize the idle time on the multiplicand side generated during the encoding process of the multiplier, and reduce the number of inputs of the adder for adding the partial products in the multiplier. It is in.

【0007】本発明の他の目的は、本発明の乗算装置を
用いることにより加算器の入力数を低減した積和演算装
置を提供することにある。
Another object of the present invention is to provide a product-sum calculation device in which the number of inputs of an adder is reduced by using the multiplication device of the present invention.

【0008】[0008]

【課題を解決するための手段】上記従来の8ビット×8
ビットの乗算装置において加算器の第5入力を構成する
6ビットのうち、ビット位置M[8] ,M[9] ,M[11],
M[13],M[15]の5個の論理値“1”のビットは、加算
器の第1〜第4入力の中へ容易に移動させることができ
る。本発明は、ビット位置M[6] への最上位部分積補数
化ビットBC3の加算と同等の効果を、被乗数の下位ビ
ットを補数回路で2の補数化することにより得られる補
数データと桁上げとを用いて、加算器の第1〜第4入力
の中で達成することとしたものである。すなわち、従来
は第4部分積データへの最上位部分積補数化ビットBC
3の加算が加算器の中で行われていたのに対して、本発
明では補数回路の中で被乗数の下位ビットの反転データ
に1を加算して補数データを求めておき、最上位部分積
補数化ビットBC3の論理値が“1”である場合には、
第4部分積データの下位ビットを補数データに差し替
え、かつ第4部分積データの上位ビットへの補数回路の
桁上げの影響を加算器の第1及び第2入力の中で達成す
ることとした。これにより、加算器の入力数が低減され
る。補数データと桁上げとを求める補数化処理は、乗数
のコード化処理の際に生じる被乗数側の空き時間を利用
して実行される。
[Means for Solving the Problems] Conventional 8 bits × 8
Of the 6 bits forming the fifth input of the adder in the bit multiplier, bit positions M [8], M [9], M [11],
The five logical "1" bits of M [13], M [15] can be easily moved into the first to fourth inputs of the adder. The present invention has the same effect as the addition of the most significant partial product complement bit BC3 to the bit position M [6], and the complement data and carry obtained by converting the lower bit of the multiplicand to 2 in the complement circuit. And are to be achieved in the first to fourth inputs of the adder. That is, conventionally, the most significant partial product complement bit BC for the fourth partial product data is used.
While the addition of 3 is performed in the adder, in the present invention, the complement data is obtained by adding 1 to the inverted data of the lower bit of the multiplicand in the complement circuit, and the most significant partial product is obtained. When the logical value of the complement bit BC3 is “1”,
The lower bit of the fourth partial product data is replaced with the complementary data, and the carry effect of the complement circuit on the upper bit of the fourth partial product data is achieved in the first and second inputs of the adder. . This reduces the number of inputs to the adder. The complementation process for obtaining the complement data and the carry is executed by utilizing the free time on the multiplicand side that occurs during the coding process of the multiplier.

【0009】詳細に説明すると、本発明の乗算装置は、
上記目的を達成するために、乗数をコード化するための
乗数エンコーダと、被乗数の下位ビットをビット反転し
て1を加算することにより2の補数化して補数データと
桁上げとを出力するための補数回路と、乗数エンコーダ
のコード化出力と被乗数と補数回路の出力する補数デー
タ及び桁上げとを用いて複数の部分積を生成するための
部分積発生手段と、該部分積発生手段で生成された複数
の部分積を加算するための加算器とを備えた構成を採用
したものである。
More specifically, the multiplication device of the present invention is
In order to achieve the above object, a multiplier encoder for encoding a multiplier and a complement of 2 by complementing the low order bit of the multiplicand and adding 1 to output complement data and carry are provided. A complement circuit, a partial product generating means for generating a plurality of partial products using the coded output of the multiplier encoder, the multiplicand, the complement data output from the complement circuit and the carry, and the partial product generating means. In addition, a configuration including an adder for adding a plurality of partial products is adopted.

【0010】上記部分積発生手段は、少なくとも、次の
ような選択回路と、第1〜第3型の部分積発生器とで構
成される。すなわち、選択回路は、乗数エンコーダのコ
ード化出力の最上位部分の中の部分積補数化ビットに応
じて、被乗数の下位ビットと、補数回路の出力する補数
データとのいずれか一方を選択するための回路である。
第1型の部分積発生器は、乗数エンコーダのコード化出
力の一部と、被乗数とを用いて第1型の部分積データを
生成し、該第1型の部分積データを含んだ部分積を加算
器へ供給する。第2型の部分積発生器は、乗数エンコー
ダのコード化出力の他の一部と、被乗数とを用いて第2
型の部分積データを生成し、かつ補数回路の出力する桁
上げを第2型の部分積データの上位ビット位置に付加
し、該桁上げが付加された第2型の部分積データを含ん
だ部分積を加算器へ供給する。第3型の部分積発生器
は、乗数エンコーダのコード化出力の最上位部分と、被
乗数の上位ビットとを用いて第3型の部分積データのう
ちの上位ビットを、乗数エンコーダのコード化出力の最
上位部分と、選択回路の出力データとを用いて第3型の
部分積データのうちの下位ビットをそれぞれ生成し、該
第3型の部分積データを含んだ部分積を加算器へ供給す
るものである。
The partial product generating means is composed of at least the following selection circuit and first to third type partial product generators. That is, the selection circuit selects either the lower bit of the multiplicand or the complement data output by the complement circuit according to the partial product complemented bit in the most significant part of the coded output of the multiplier encoder. Circuit.
The first-type partial product generator generates a first-type partial product data by using a part of the coded output of the multiplier encoder and the multiplicand, and a partial product including the first-type partial product data. Is supplied to the adder. The second type partial product generator uses the other part of the encoded output of the multiplier encoder and the multiplicand to generate a second product.
Type partial product data is generated, and the carry output by the complement circuit is added to the upper bit position of the second type partial product data, and the carry is added to the second type partial product data. Supply the partial product to the adder. The third type partial product generator uses the most significant part of the encoded output of the multiplier encoder and the upper bits of the multiplicand to output the upper bits of the third type partial product data to the encoded output of the multiplier encoder. Of the third type partial product data are generated by using the uppermost part of the above and the output data of the selection circuit, and the partial product including the third type partial product data is supplied to the adder. To do.

【0011】上記本発明の乗算装置によれば、乗数のコ
ード化処理と並行して被乗数の補数化処理が行われるの
で、被乗数の補数化ビット数があまり大きくない限り、
乗数のコード化処理に要する時間と、被乗数の補数化処
理に要する時間とが釣り合って好都合である。なお、補
数回路の出力する補数データが選択回路によって選択さ
れる場合には第3型の部分積データの下位ビットの生成
に際して桁上げが生じるが、この桁上げは第2型の部分
積データの上位ビット位置に付加された桁上げとして反
映されている。
According to the above-described multiplication device of the present invention, since the multiplicand is complemented in parallel with the multiplier coding process, unless the number of bits to be complemented of the multiplicand is too large.
This is convenient because the time required for the encoding process of the multiplier and the time required for the complementing process of the multiplicand are balanced. When the complement data output by the complement circuit is selected by the selection circuit, a carry occurs when the lower bits of the third type partial product data are generated. This carry is generated by the second type partial product data. It is reflected as a carry added to the high-order bit position.

【0012】さて、第1の被乗数をXA、第1の乗数を
YAとした複数の部分積を上記本発明の乗算装置で求
め、第2の被乗数をXB、第2の乗数をYBとした複数
の部分積を同じ構成の乗算装置で求め、かつ全ての部分
積を多入力加算器で加算することとすれば、第1の積X
A×YAと第2の積XB×YBとの和、すなわち積和U
を算出するための、加算器の入力数を低減した演算装置
を実現できる。ただし、乗数及び被乗数XA,YA,X
B,YBがいずれも8ビットである場合には、第1の乗
数YAのコード最上位部分と第1の被乗数XAとを用い
て生成された部分積データを含んだ加算器入力と、第2
の乗数YBのコード最上位部分と第2の被乗数XBとを
用いて生成された部分積データを含んだ加算器入力との
各々のビット位置U[5] に空きが生じる。本発明の積和
演算装置は、このビット位置U[5]の2つの空きを利用
して、ビット位置U[6] への第2の積XB×YBに係る
最上位部分積補数化ビットの付加と同等の効果を実現す
ることとしたものである。
A plurality of partial products in which the first multiplicand is XA and the first multiplier is YA are obtained by the multiplication device of the present invention, and the second multiplicand is XB and the second multiplier is YB. If the partial products of are obtained by a multiplier having the same configuration and all the partial products are added by the multi-input adder, the first product X
Sum of A × YA and second product XB × YB, that is, product sum U
It is possible to realize an arithmetic unit for reducing the number of inputs of the adder for calculating However, the multiplier and multiplicand XA, YA, X
If both B and YB are 8 bits, an adder input including partial product data generated by using the code most significant part of the first multiplier YA and the first multiplicand XA, and
A vacancy occurs at each bit position U [5] between the most significant part of the code of the multiplier YB and the adder input containing the partial product data generated using the second multiplicand XB. The product-sum calculation apparatus of the present invention utilizes the two vacant positions at the bit position U [5] to store the most significant partial product complementation bit of the second product XB × YB at the bit position U [6]. This is to achieve the same effect as the addition.

【0013】詳細に説明すると、本発明の積和演算装置
は、第1の乗数YAをコード化するための第1の乗数エ
ンコーダと、第2の乗数YBをコード化するための第2
の乗数エンコーダと、第1の被乗数XAの下位ビットを
ビット反転して1を加算することにより2の補数化して
補数データと桁上げとを出力するための補数回路と、第
1の乗数エンコーダのコード化出力と第2の乗数エンコ
ーダのコード化出力と第1の被乗数XAと補数回路の出
力する補数データ及び桁上げとを用いて複数の部分積を
生成するための第1の部分積発生手段と、第2の乗数エ
ンコーダのコード化出力と第2の被乗数XBとを用いて
複数の部分積を生成するための第2の部分積発生手段
と、第1の部分積発生手段で生成された複数の部分積と
第2の部分積発生手段で生成された複数の部分積とを加
算するための加算器とを備えた構成を採用したものであ
る。
More specifically, the product-sum calculation apparatus of the present invention comprises a first multiplier encoder for coding the first multiplier YA and a second multiplier encoder for coding the second multiplier YB.
Of the first multiplicand XA, a low-order bit of the first multiplicand XA is bit-inverted, and 1 is added to form a two's complement to output complement data and carry. First partial product generating means for generating a plurality of partial products using the coded output, the coded output of the second multiplier encoder, the first multiplicand XA, the complement data output from the complement circuit, and the carry. And a second partial product generating means for generating a plurality of partial products using the coded output of the second multiplier encoder and the second multiplicand XB, and the first partial product generating means. This configuration employs a configuration including an adder for adding a plurality of partial products and a plurality of partial products generated by the second partial product generating means.

【0014】上記第1の部分積発生手段は、少なくと
も、次のような選択回路と、第1〜第3型の部分積発生
器とで構成される。すなわち、選択回路は、第1の乗数
エンコーダのコード化出力の最上位部分の中の部分積補
数化ビットに応じて、第1の被乗数XAの下位ビット
と、補数回路の出力する補数データとのいずれか一方を
選択するための回路である。第1型の部分積発生器は、
第1の乗数エンコーダのコード化出力の一部と、第1の
被乗数XAとを用いて第1型の部分積データを生成し、
該第1型の部分積データを含んだ部分積を加算器へ供給
する。第2型の部分積発生器は、第1の乗数エンコーダ
のコード化出力の他の一部と、第1の被乗数XAとを用
いて第2型の部分積データを生成し、かつ補数回路の出
力する桁上げを第2型の部分積データの上位ビット位置
に付加し、該桁上げが付加された第2型の部分積データ
を含んだ部分積を加算器へ供給する。第3型の部分積発
生器は、第1の乗数エンコーダのコード化出力の最上位
部分と、第1の被乗数XAの上位ビットとを用いて第3
型の部分積データのうちの上位ビットを、第1の乗数エ
ンコーダのコード化出力の最上位部分と、選択回路の出
力データとを用いて第3型の部分積データのうちの下位
ビットをそれぞれ生成し、かつ第2の乗数エンコーダの
コード化出力の最上位部分の中の部分積補数化ビットを
第3型の部分積データの下位ビット位置に付加し、該部
分積補数化ビットが付加された第3型の部分積データを
含んだ部分積を加算器へ供給するものである。上記第2
の部分積発生手段は、少なくとも、次のような第4及び
第5型の部分積発生器で構成される。すなわち、第4型
の部分積発生器は、第2の乗数エンコーダのコード化出
力の一部と、第2の被乗数XBとを用いて第4型の部分
積データを生成し、該第4型の部分積データを含んだ部
分積を加算器へ供給する。第5型の部分積発生器は、第
2の乗数エンコーダのコード化出力の最上位部分と、第
2の被乗数XBとを用いて第5型の部分積データを生成
し、かつ第2の乗数エンコーダのコード化出力の最上位
部分の中の部分積補数化ビットを第5型の部分積データ
の下位ビット位置に付加し、該部分積補数化ビットが付
加された第5型の部分積データを含んだ部分積を加算器
へ供給するものである。
The first partial product generating means comprises at least the following selection circuit and first to third type partial product generators. That is, the selection circuit selects the lower bit of the first multiplicand XA and the complement data output from the complement circuit according to the partial product complemented bit in the uppermost part of the coded output of the first multiplier encoder. This is a circuit for selecting either one. The first type partial product generator is
Generating a first type partial product data using a portion of the encoded output of the first multiplier encoder and the first multiplicand XA;
The partial product including the partial product data of the first type is supplied to the adder. The second type partial product generator uses the other part of the coded output of the first multiplier encoder and the first multiplicand XA to generate the second type partial product data and outputs the complementary circuit of the complement circuit. The carry to be output is added to the upper bit position of the second type partial product data, and the partial product including the second type partial product data to which the carry is added is supplied to the adder. A third type partial product generator uses the most significant portion of the coded output of the first multiplier encoder and the high order bits of the first multiplicand XA to generate a third product.
The upper bits of the partial product data of the type are respectively assigned to the lower bits of the partial product data of the third type by using the most significant part of the encoded output of the first multiplier encoder and the output data of the selection circuit. Generate and add a partial product complement bit in the most significant part of the encoded output of the second multiplier encoder to the lower bit position of the third type partial product data, and the partial product complement bit is added The partial product including the third type partial product data is supplied to the adder. The second
The partial product generating means is composed of at least the following fourth and fifth type partial product generators. That is, the fourth type partial product generator generates the fourth type partial product data by using a part of the coded output of the second multiplier encoder and the second multiplicand XB, and the fourth type partial product data is generated. The partial product including the partial product data of is supplied to the adder. The fifth type partial product generator generates a fifth type partial product data by using the uppermost part of the coded output of the second multiplier encoder and the second multiplicand XB, and the second multiplier Fifth type partial product data in which the partial product complement bit in the most significant part of the encoded output of the encoder is added to the lower bit position of the fifth type partial product data, and the partial product complement bit is added Is supplied to the adder.

【0015】上記本発明の積和演算装置によれば、第2
の乗数エンコーダのコード化出力の最上位部分の中の部
分積補数化ビットが、第3型の部分積データの下位ビッ
ト位置と、第5型の部分積データの下位ビット位置とに
二重に付加される。これにより、加算器の入力数が低減
される。
According to the above product-sum calculation apparatus of the present invention,
The partial product complemented bits in the most significant part of the coded output of the multiplier encoder are doubled in the lower bit position of the third type partial product data and the lower bit position of the fifth type partial product data. Is added. This reduces the number of inputs to the adder.

【0016】[0016]

【発明の実施の形態】以下、本発明に係る乗算装置及び
積和演算装置の具体例について、図面を参照しながら説
明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Specific examples of a multiplication device and a product-sum calculation device according to the present invention will be described below with reference to the drawings.

【0017】図1は、被乗数をX、乗数をYとして積M
を算出するための本発明に係る8ビット×8ビットの乗
算装置の概略構成例を示している。図1の乗算装置は、
2次のブースのアルゴリズムと符号拡張の省略とを採用
した乗算装置であって、乗数エンコーダ101と、補数
回路102と、選択回路103と、第1〜第4の部分積
発生器110〜113と、多入力加算器104とで構成
される。
FIG. 1 shows a product M in which the multiplicand is X and the multiplier is Y.
1 shows a schematic configuration example of an 8-bit × 8-bit multiplication device according to the present invention for calculating The multiplication device of FIG.
A multiplication device employing a second-order Booth algorithm and omission of sign extension, comprising a multiplier encoder 101, a complement circuit 102, a selection circuit 103, and first to fourth partial product generators 110 to 113. , And a multi-input adder 104.

【0018】乗数エンコーダ101は、2次のブースの
アルゴリズムに従って乗数Yをコード化し、第1(最下
位)、第2、第3及び第4(最上位)の部分を備えたコ
ード化出力を供給するものである。
The multiplier encoder 101 encodes the multiplier Y according to the quadratic Booth's algorithm and provides a coded output with first (least significant), second, third and fourth (most significant) portions. To do.

【0019】補数回路102は、被乗数Xの下位5ビッ
トデータをビット反転して1を加算することによって2
の補数化し、5ビットの補数データ(IX+1)と、桁
上げとを出力するものである。ここに、“I”はビット
反転操作を意味するものとする。
The complement circuit 102 bit-inverts the lower 5 bit data of the multiplicand X and adds 1 to obtain 2
Is complemented to output 5-bit complement data (IX + 1) and carry. Here, "I" means a bit inversion operation.

【0020】選択回路103は、乗数エンコーダ101
のコード化出力の第4の部分(最上位部分)の中の部分
積補数化ビット、すなわち最上位部分積補数化ビットに
応じて、被乗数Xの下位5ビットデータと、補数回路1
02の出力する5ビットの補数データとのいずれか一方
を選択するものである。最上位部分積補数化ビットの論
理値が“0”ならば被乗数Xの下位5ビットデータが、
最上位部分積補数化ビットの論理値が“1”ならば補数
回路102の出力する5ビットの補数データがそれぞれ
選択される。
The selection circuit 103 is a multiplier encoder 101.
Depending on the partial product complemented bit in the fourth part (most significant part) of the coded output of, i.e., the most significant partial product complemented bit, the lower 5 bits of the multiplicand X and the complement circuit 1
One of the 5-bit complement data output by 02 is selected. If the logical value of the most significant partial product complement bit is "0", the lower 5 bit data of the multiplicand X,
If the logical value of the most significant partial product complement bit is "1", the 5-bit complement data output from the complement circuit 102 is selected.

【0021】第1〜第4の部分積発生器110〜113
は、それぞれ第1(最下位)部分積データP0と、第2
部分積データP1と、第3部分積データP2と、第4
(最上位)部分積データP3とを生成するものである。
このうち、第1の部分積発生器110は、乗数エンコー
ダ101のコード化出力の第1の部分(最下位部分)
と、被乗数Xとを用いて第1部分積データP0を生成
し、第1部分積データP0の最下位ビットに加算される
べき補数化ビットを第2部分積データP1の下位ビット
位置に付加し、かつ第1部分積の符号ビットと、その反
転ビットと、最上位部分積補数化ビットを反映した補数
化ビットとを第1部分積データP0の上位ビット位置に
付加する。第2の部分積発生器111は、乗数エンコー
ダ101のコード化出力の第2の部分と、被乗数Xとを
用いて第2部分積データP1を生成し、第2部分積デー
タP1の最下位ビットに加算されるべき補数化ビットを
第3部分積データP2の下位ビット位置に付加し、かつ
第2部分積の符号の反転ビットと、補数回路102の出
力する桁上げを反映した補数化ビットとを第2部分積デ
ータP1の上位ビット位置に付加する。第3の部分積発
生器112は、乗数エンコーダ101のコード化出力の
第3の部分と、被乗数Xとを用いて第3部分積データP
2を生成し、第3部分積データP2の最下位ビットに加
算されるべき補数化ビットを第4部分積データP3の下
位ビット位置に付加し、かつ第3部分積の符号の反転ビ
ットと、論理値“1”のビットとを第3部分積データP
2の上位ビット位置に付加する。第4の部分積発生器1
13は、乗数エンコーダ101のコード化出力の第4の
部分(最上位部分)と、被乗数Xの上位3ビットとを用
いて第4部分積データP3のうちの上位3ビットを生成
し、乗数エンコーダ101のコード化出力の第4の部分
(最上位部分)と、選択回路103の出力データとを用
いて第4部分積データP3のうちの下位5ビットを生成
し、かつ第4部分積の符号の反転ビットと、論理値
“1”のビットとを第4部分積データP3の上位ビット
位置に付加する。
The first to fourth partial product generators 110 to 113
Are the first (lowest) partial product data P0 and the second
Partial product data P1, third partial product data P2, fourth
And (top) partial product data P3.
Of these, the first partial product generator 110 is the first part (the lowest part) of the encoded output of the multiplier encoder 101.
And the multiplicand X are used to generate the first partial product data P0, and the complemented bit to be added to the least significant bit of the first partial product data P0 is added to the lower bit position of the second partial product data P1. , And the sign bit of the first partial product, its inversion bit, and the complemented bit reflecting the most significant partial product complemented bit are added to the upper bit positions of the first partial product data P0. The second partial product generator 111 generates the second partial product data P1 using the second part of the coded output of the multiplier encoder 101 and the multiplicand X, and outputs the least significant bit of the second partial product data P1. To the lower bit position of the third partial product data P2, and the inverted bit of the sign of the second partial product and the complemented bit reflecting the carry output from the complement circuit 102. Is added to the upper bit position of the second partial product data P1. The third partial product generator 112 uses the third part of the encoded output of the multiplier encoder 101 and the multiplicand X to generate third partial product data P.
2 is generated, the complemented bit to be added to the least significant bit of the third partial product data P2 is added to the lower bit position of the fourth partial product data P3, and the inverted bit of the sign of the third partial product, The bit of logical value "1" and the third partial product data P
It is added to the high-order bit position of 2. Fourth partial product generator 1
13 uses the fourth part (most significant part) of the encoded output of the multiplier encoder 101 and the upper 3 bits of the multiplicand X to generate the upper 3 bits of the fourth partial product data P3, and the multiplier encoder The fourth part (uppermost part) of the coded output of 101 and the output data of the selection circuit 103 are used to generate the lower 5 bits of the fourth partial product data P3, and the sign of the fourth partial product. And the bit having the logical value "1" are added to the upper bit position of the fourth partial product data P3.

【0022】多入力加算器104は、第1〜第4の部分
積発生器110〜113の出力の加算を行い、2の補数
形式の積Mを出力するための加算器であって、ワレス
(Wallace)のトリー回路と、桁上げ伝搬加算器
(CPA)とで構成される。
The multi-input adder 104 is an adder for adding the outputs of the first to fourth partial product generators 110 to 113 and outputting the product M in the two's complement form. Wallace) tree circuit and a carry propagation adder (CPA).

【0023】図2は、乗数エンコーダ101の内部構成
を示している。図2の乗数エンコーダ101は、4つの
ブースエンコーダBEより構成される。各ブースエンコ
ーダBEには、乗数Yを構成する8ビットY[0] 〜Y
[7] のうちの3ビット、すなわちY[i*2+1] ,Y[i*2]
,Y[i*2-1] が入力される。ここに、“*”は乗算を
意味し、iは0、1、2又は3であり、Y[-1]=“0”
である。図2に示されたコード化出力のうちのBCP
[0] 〜BCP[3] は、各部分積データの最下位ビットに
加算されるべき補数化ビットである。BCP[3] は、前
述の最上位部分積補数化ビットである。
FIG. 2 shows the internal structure of the multiplier encoder 101. The multiplier encoder 101 of FIG. 2 is composed of four Booth encoders BE. Each booth encoder BE has 8 bits Y [0] to Y that form a multiplier Y.
3 bits of [7], that is, Y [i * 2 + 1], Y [i * 2]
, Y [i * 2-1] is input. Here, “*” means multiplication, i is 0, 1, 2 or 3, and Y [−1] = “0”
It is. BCP of the coded output shown in FIG.
[0] to BCP [3] are complemented bits to be added to the least significant bit of each partial product data. BCP [3] is the most significant partial product complement bit described above.

【0024】図3は、補数回路102及び選択回路10
3の詳細を示している。補数回路(COMP)102
は、被乗数Xの下位5ビットデータX[0] 〜X[4] をビ
ット反転して1を加算することにより2の補数化し、5
ビットの補数データXC[0] 〜XC[4] と桁上げXC
[5] とを出力する。選択回路(SEL)103は、最上
位部分積補数化ビットBCP[3] に応じて、被乗数の下
位5ビットデータX[0] 〜X[4] と、5ビットの補数デ
ータXC[0] 〜XC[4] とのいずれか一方を、被選択デ
ータXS[0] 〜XS[4] として出力する。
FIG. 3 shows the complement circuit 102 and the selection circuit 10.
3 is shown in detail. Complement circuit (COMP) 102
Is a two's complement by bit-reversing the lower 5 bit data X [0] to X [4] of the multiplicand X and adding 1 to obtain 5's complement.
Bit complement data XC [0] to XC [4] and carry XC
Outputs [5]. The selection circuit (SEL) 103, in accordance with the most significant partial product complementation bit BCP [3], the lower 5 bits data X [0] to X [4] of the multiplicand and the 5 bits complement data XC [0] to Either one of XC [4] is output as the selected data XS [0] to XS [4].

【0025】図4(a)及び(b)は第1の部分積発生
器110の内部構成を、図5(a)及び(b)は第2の
部分積発生器111の内部構成を、図6(a)及び
(b)は第3の部分積発生器112の内部構成を、図7
(a)及び(b)は第4の部分積発生器113の内部構
成をそれぞれ示している。第1〜第4の部分積発生器1
10〜113は、7種類の単位部分積発生器PPG1〜
PPG7の組み合わせで構成される。図4(a)に示さ
れたS3C及びIS3Cは、最上位部分積補数化ビット
BCP[3] から生成された補数化ビットと、その反転ビ
ットである。図5(a)に示されたC3[0] は、最上位
部分積補数化ビットBCP[3] と、補数回路102の桁
上げXC[5] と、選択回路103の出力データの最上位
ビットXS[4] とから生成された補数化ビットである。
また、図5(a)に示されたC3[1]は、最上位部分積
補数化ビットBCP[3] と、補数回路102の桁上げX
C[5]とから生成された補数化ビットである。
FIGS. 4A and 4B show the internal structure of the first partial product generator 110, and FIGS. 5A and 5B show the internal structure of the second partial product generator 111. 6 (a) and 6 (b) show the internal structure of the third partial product generator 112.
(A) and (b) have shown the internal structure of the 4th partial product generator 113, respectively. First to fourth partial product generators 1
10 to 113 are seven types of unit partial product generators PPG1 to PPG1.
It is composed of a combination of PPG7. S3C and IS3C shown in FIG. 4A are the complemented bit generated from the most significant partial product complemented bit BCP [3] and its inverted bit. C3 [0] shown in FIG. 5A is the most significant partial product complement bit BCP [3], the carry XC [5] of the complement circuit 102, and the most significant bit of the output data of the selection circuit 103. It is a complemented bit generated from XS [4].
Further, C3 [1] shown in FIG. 5A is the most significant partial product complement bit BCP [3] and the carry X of the complement circuit 102.
It is a complemented bit generated from C [5].

【0026】図8は各ブースエンコーダBEの内部構成
を、図9は各ブースエンコーダBEの真理値表をそれぞ
れ示している。図9中のX[7:0] は、被乗数Xを構成す
る8ビットX[0] 〜X[7] を意味する簡略表記である。
「BX1=“1”」は部分積として被乗数Xの1倍数を
発生すべきことを、「BX2=“1”」は部分積として
被乗数Xの2倍数を発生すべきことを、「BC=
“1”」は負の部分積を発生すべきことをそれぞれ表し
ている。
FIG. 8 shows the internal structure of each Booth encoder BE, and FIG. 9 shows the truth table of each Booth encoder BE. X [7: 0] in FIG. 9 is a shorthand notation that means 8 bits X [0] to X [7] forming the multiplicand X.
"BX1 =" 1 "" means that a multiple of the multiplicand X should be generated as a partial product, "BX2 =" 1 "" means that a multiple of the multiplicand X should be generated as a partial product, and "BC ="
Each "1" indicates that a negative partial product should be generated.

【0027】図10は補数回路COMPの内部構成を、
図11は選択回路SELの内部構成を、図12〜図18
は第1〜第7の単位部分積発生器PPG1〜PPG7の
内部構成をそれぞれ示している。各構成の詳細説明は省
略する。
FIG. 10 shows the internal structure of the complement circuit COMP.
FIG. 11 shows the internal configuration of the selection circuit SEL as shown in FIGS.
Indicate the internal configurations of the first to seventh unit partial product generators PPG1 to PPG7, respectively. Detailed description of each configuration is omitted.

【0028】図19は、図1の乗算装置における部分積
発生方法を示している。図19において、加算器104
の第1入力は、第1部分積データP0[0] 〜P0[7]
(ビット位置M[0] 〜M[7] )と、第1部分積の符号ビ
ットS0(ビット位置M[8] 及びM[9] )と、その反転
ビットIS0(ビット位置M[10])と、最上位部分積補
数化ビットBCP[3] から生成された補数化ビットS3
C(ビット位置M[12])と、その反転ビットIS3C
(ビット位置M[11])とで構成される。加算器104の
第2入力は、第2部分積データP1[0] 〜P1[7] (ビ
ット位置M[2] 〜M[9] )と、第2部分積の符号の反転
ビットIS1(ビット位置M[10])と、補数回路(CO
MP)102の桁上げXC[5] から生成された補数化ビ
ットC3[0],C3[1] (それぞれビット位置M[11],
M[12])と、第1部分積データの最下位ビットに加算さ
れるべき補数化ビットBC0(ビット位置M[0] )とで
構成される。加算器104の第3入力は、第3部分積デ
ータP2[0] 〜P2[7] (ビット位置M[4] 〜M[11])
と、第3部分積の符号の反転ビットIS2(ビット位置
M[12])と、論理値“1”のビット(ビット位置M[1
3])と、第2部分積データの最下位ビットに加算される
べき補数化ビットBC1(ビット位置M[2] )とで構成
される。加算器104の第4入力は、第4部分積データ
P3[0] 〜P3[7](ビット位置M[6] 〜M[13])と、
第4部分積の符号の反転ビットIS3(ビット位置M[1
4])と、論理値“1”のビット(ビット位置M[15])
と、第3部分積データの最下位ビットに加算されるべき
補数化ビットBC2(ビット位置M[4])とで構成され
る。4つのビットS3C,IS3C,C3[1] ,C3
[0] は、第4部分積データのうちの上位3ビットデータ
P3[5] 〜P3[7] を2の補数化するために付加された
ビットである。なお、必要に応じて(最上位部分積補数
化ビットBCP[3] の論理値が“1”ならば)、補数回
路(COMP)102で2の補数化された5ビットの補
数データXC[0] 〜XC[4] が、第4部分積データのう
ちの下位5ビットデータP3[0] 〜P3[4] として使わ
れる。そして、上記第1〜第4入力を加算器104で加
算することにより、2の補数形式の16ビットの積M
[0] 〜M[15]が求められる。
FIG. 19 shows a partial product generation method in the multiplication device of FIG. In FIG. 19, the adder 104
The first input of is the first partial product data P0 [0] to P0 [7]
(Bit positions M [0] to M [7]), the sign bit S0 of the first partial product (bit positions M [8] and M [9]), and its inversion bit IS0 (bit position M [10]). And the complemented bit S3 generated from the most significant partial product complemented bit BCP [3]
C (bit position M [12]) and its inverted bit IS3C
(Bit position M [11]). The second input of the adder 104 is the second partial product data P1 [0] to P1 [7] (bit positions M [2] to M [9]) and the inverted bit IS1 (bit of the sign of the second partial product). Position M [10]) and complement circuit (CO
MP) 102 carry XC [5] generated complemented bits C3 [0], C3 [1] (respectively bit positions M [11],
M [12]) and the complemented bit BC0 (bit position M [0]) to be added to the least significant bit of the first partial product data. The third input of the adder 104 is the third partial product data P2 [0] to P2 [7] (bit positions M [4] to M [11]).
, The inversion bit IS2 of the sign of the third partial product (bit position M [12]), and the bit of the logical value "1" (bit position M [1
3]) and the complementary bit BC1 (bit position M [2]) to be added to the least significant bit of the second partial product data. The fourth input of the adder 104 is the fourth partial product data P3 [0] to P3 [7] (bit positions M [6] to M [13]),
Inversion bit IS3 of the sign of the fourth partial product (bit position M [1
4]) and the bit of logical value “1” (bit position M [15])
And the complemented bit BC2 (bit position M [4]) to be added to the least significant bit of the third partial product data. 4 bits S3C, IS3C, C3 [1], C3
[0] is a bit added for converting the higher-order 3-bit data P3 [5] to P3 [7] of the fourth partial product data to 2's complement. Incidentally, if necessary (if the logical value of the most significant partial product complementation bit BCP [3] is "1"), the complement circuit (COMP) 102 complements the two-complement 5-bit complement data XC [0. ] To XC [4] are used as the lower 5 bit data P3 [0] to P3 [4] of the fourth partial product data. Then, the first to fourth inputs are added by the adder 104 to obtain a 16-bit product M of 2's complement format.
[0] to M [15] are required.

【0029】図20は第i+1部分積(0≦i≦2)、
すなわち第1(最下位)、第2及び第3部分積の発生に
係る真理値表を、図21は第4(最上位)部分積の発生
に係る真理値表をそれぞれ示している。ここに、“*”
は乗算を、“I”はビット反転操作を、“<<1”は1ビ
ット左シフト操作(2倍操作)をそれぞれ意味するもの
とする。Y[-1]は常に論理値“0”である。Pi[7:0]
、P3[7:6] 、P3[4:0] などの表記は、図9中の被
乗数X[7:0] と同様の簡略表記である。
FIG. 20 shows the i + 1th partial product (0≤i≤2),
That is, FIG. 21 shows a truth table relating to the generation of the first (lowest), second and third partial products, and FIG. 21 shows a truth table relating to the generation of the fourth (top) partial product. here,"*"
Means multiplication, “I” means bit inversion operation, and “<< 1” means 1-bit left shift operation (double operation). Y [-1] is always the logical value "0". Pi [7: 0]
, P3 [7: 6], P3 [4: 0], etc. are the same abbreviations as the multiplicand X [7: 0] in FIG.

【0030】図20によれば、例えば、Y[3] =
“0”、Y[2] =“0”、かつY[1] =“1”ならば、
発生すべき部分積は被乗数X[7:0] の1倍数である。こ
のとき、第2の部分積発生器111により、第2部分積
の符号ビットS1に被乗数の最上位ビットX[7] が設定
され(実際には、第2部分積の符号の反転ビットIS1
に被乗数の最上位反転ビットIX[7] が設定される)、
第2部分積データP1[7:0]に被乗数X[7:0] が設定さ
れ、第2部分積データの最下位ビットに加算されるべき
補数化ビットBC1に論理値“0”が設定される。ま
た、Y[3] =“1”、Y[2] =“0”、かつY[1] =
“0”ならば、発生すべき部分積は被乗数X[7:0]の−
2倍数である。このとき、第2の部分積発生器111に
より、第2部分積の符号ビットS1に被乗数の最上位反
転ビットIX[7] が設定され(実際には、第2部分積の
符号の反転ビットIS1に被乗数の最上位ビットX[7]
が設定される)、第2部分積データP1[7:0] に被乗数
の下位6ビットデータX[6:0] の2倍数の反転データが
設定され、第2部分積データの最下位ビットに加算され
るべき補数化ビットBC1に論理値“1”が設定され
る。なお、図20中の“FF(16進数表示)”は、8
個の論理値“1”のビットを表している。
According to FIG. 20, for example, Y [3] =
If “0”, Y [2] = “0”, and Y [1] = “1”,
The partial product to be generated is a multiple of the multiplicand X [7: 0]. At this time, the second partial product generator 111 sets the most significant bit X [7] of the multiplicand in the sign bit S1 of the second partial product (actually, the inverted bit IS1 of the sign of the second partial product).
Is set to the most significant inversion bit IX [7] of the multiplicand),
The multiplicand X [7: 0] is set in the second partial product data P1 [7: 0], and the logical value “0” is set in the complemented bit BC1 to be added to the least significant bit of the second partial product data. It Further, Y [3] = “1”, Y [2] = “0”, and Y [1] =
If “0”, the partial product to be generated is − of multiplicand X [7: 0].
It is a multiple. At this time, the second partial product generator 111 sets the most significant inversion bit IX [7] of the multiplicand in the sign bit S1 of the second partial product (actually, the inversion bit IS1 of the sign of the second partial product). The most significant bit X [7] of the multiplicand
Is set), inverted data of a multiple of the lower 6-bit data X [6: 0] of the multiplicand is set in the second partial product data P1 [7: 0], and the least significant bit of the second partial product data is set. A logical value "1" is set in the complemented bit BC1 to be added. Note that “FF (hexadecimal number display)” in FIG.
Represents a bit of a logical value "1".

【0031】図21によれば、例えば、Y[7] =
“0”、Y[6] =“0”、かつY[5] =“1”ならば、
発生すべき部分積は被乗数X[7:0] の1倍数である。こ
のとき、選択回路103は、被選択データXS[4:0] に
被乗数の下位5ビットデータX[4:0] を設定する。第4
の部分積発生器113は、第4部分積の符号ビットS3
に被乗数の最上位ビットX[7] を設定し(実際には、第
4部分積の符号の反転ビットIS3に被乗数の最上位反
転ビットIX[7] が設定される)、第4部分積データP
3[7:0] に被乗数X[7:0] を設定する。第1の部分積発
生器110は、補数化ビットS3Cに論理値“0”を、
その反転ビットIS3Cに論理値“1”をそれぞれ設定
する。第2の部分積発生器111は、補数化ビットC3
[1] ,C3[0]にそれぞれ論理値“0”を設定する。ま
た、Y[7] =“1”、Y[6] =“1”、かつY[5] =
“0”ならば、発生すべき部分積は被乗数X[7:0] の−
1倍数である。このとき、選択回路103は、被選択デ
ータXS[4:0] に被乗数の下位5ビットの補数データX
C[4:0] を設定する。第4の部分積発生器113は、第
4部分積の符号ビットS3に被乗数の最上位反転ビット
IX[7] を設定し(実際には、第4部分積の符号の反転
ビットIS3に被乗数の最上位ビットX[7] が設定され
る)、第4部分積データの上位3ビットP3[7:5] に被
乗数の上位反転3ビットIX[7:5] を、第4部分積デー
タの下位5ビットP3[4:0] に補数データXC[4:0] を
それぞれ設定する。第1の部分積発生器110は、補数
化ビットS3Cに論理値“0”を、その反転ビットIS
3Cに論理値“1”をそれぞれ設定する。第2の部分積
発生器111は、補数化ビットC3[1] に論理値“0”
を、補数化ビットC3[0] に補数回路102の桁上げX
C[5] をそれぞれ設定する。なお、図21中の“3(1
6進数表示)”は、2個の論理値“1”のビットを表し
ている。
According to FIG. 21, for example, Y [7] =
If “0”, Y [6] = “0”, and Y [5] = “1”,
The partial product to be generated is a multiple of the multiplicand X [7: 0]. At this time, the selection circuit 103 sets the lower 5-bit data X [4: 0] of the multiplicand to the selected data XS [4: 0]. 4th
Partial product generator 113 of the fourth partial product
The most significant bit X [7] of the multiplicand is set (actually, the most inverted bit IX [7] of the multiplicand is set to the inversion bit IS3 of the sign of the fourth partial product), and the fourth partial product data P
Set the multiplicand X [7: 0] to 3 [7: 0]. The first partial product generator 110 outputs a logical value “0” to the complementation bit S3C,
The logical value "1" is set to each of the inversion bits IS3C. The second partial product generator 111 generates a complement bit C3.
The logical value “0” is set to each of [1] and C3 [0]. Further, Y [7] = “1”, Y [6] = “1”, and Y [5] =
If “0”, the partial product to be generated is − of multiplicand X [7: 0].
It is a multiple. At this time, the selection circuit 103 adds the complement data X of the lower 5 bits of the multiplicand to the selected data XS [4: 0].
Set C [4: 0]. The fourth partial product generator 113 sets the most significant inverted bit IX [7] of the multiplicand to the sign bit S3 of the fourth partial product (actually, the inverted bit IS3 of the sign of the fourth partial product is set to the multiplicand). (The most significant bit X [7] is set), the upper 3 bits P3 [7: 5] of the fourth partial product data are set to the upper inverted 3 bits IX [7: 5] of the multiplicand, and the lower part of the fourth partial product data is set. Complement data XC [4: 0] is set in each of 5 bits P3 [4: 0]. The first partial product generator 110 outputs the logical value "0" to the complemented bit S3C and the inverted bit IS thereof.
A logical value "1" is set in each of 3C. The second partial product generator 111 outputs a logical value “0” to the complemented bit C3 [1].
To the complement bit C3 [0] and carry X of the complement circuit 102.
Set C [5] respectively. Note that "3 (1
"Hexadecimal notation)" represents two bits of logical value "1".

【0032】以上説明してきたとおり、図1の乗算装置
によれば、従来の乗算装置におけるビット位置M[6] へ
の最上位部分積補数化ビットBC3の付加と同等の効果
を、被乗数の下位5ビットデータX[4:0] を2の補数化
することにより得られる補数データXC[4:0] と桁上げ
XC[5] とを用いて、加算器104の第1〜第4入力の
中で達成することとしたので、加算器104の入力数が
低減される結果、加算の高速化が達成される。
As described above, according to the multiplication device of FIG. 1, the same effect as the addition of the most significant partial product complement bit BC3 to the bit position M [6] in the conventional multiplication device can be obtained. Using the complement data XC [4: 0] obtained by converting the 5-bit data X [4: 0] to 2's complement and the carry XC [5], the first to fourth inputs of the adder 104 are input. Since the number of inputs to the adder 104 is reduced, the speeding up of addition is achieved.

【0033】なお、演算X×Y+Aのための演算装置
は、図1中の加算器104を5入力加算器に置き換え、
該5入力加算器へ加数Aに応じた16ビットデータを第
5入力として供給することによって実現できる。
Incidentally, the arithmetic unit for the operation X × Y + A is obtained by replacing the adder 104 in FIG. 1 with a 5-input adder.
This can be realized by supplying 16-bit data corresponding to the addend A to the 5-input adder as the fifth input.

【0034】また、第1の被乗数(8ビット)をXA、
第1の乗数(8ビット)をYAとした第1の積XA×Y
Aと、第2の被乗数(8ビット)をXB、第2の乗数
(8ビット)をYBとした第2の積XB×YBとの和、
すなわち積和XA×YA+XB×YBを算出するための
積和演算装置は、図1中の加算器104を除く構成要素
を二重に設け、かつ8つの部分積を加算するための多入
力加算器を追加することによって実現できる。
Further, the first multiplicand (8 bits) is XA,
First product XA × Y where YA is the first multiplier (8 bits)
The sum of A and a second product XB × YB in which the second multiplicand (8 bits) is XB and the second multiplier (8 bits) is YB;
That is, the product-sum calculation apparatus for calculating the product sum XA × YA + XB × YB is a multi-input adder for adding the constituent elements except the adder 104 in FIG. 1 in duplicate and for adding eight partial products. Can be achieved by adding

【0035】図22は、本発明に係る8ビット・4入力
の積和演算装置の他の構成例を示している。図22の積
和演算装置は、第1の乗数エンコーダ101aと、第2
の乗数エンコーダ101bと、補数回路102aと、選
択回路103aと、第1〜第3の部分積発生器110a
〜112aと、第4の部分積発生器213と、第5〜第
8の部分積発生器310〜313と、多入力加算器30
4とで構成される。
FIG. 22 shows another configuration example of the 8-bit / 4-input multiply-accumulate operation apparatus according to the present invention. The product-sum calculation apparatus of FIG. 22 includes a first multiplier encoder 101a and a second multiplier encoder 101a.
Multiplier encoder 101b, complement circuit 102a, selection circuit 103a, and first to third partial product generators 110a
-112a, the 4th partial product generator 213, the 5th-8th partial product generators 310-313, and the multi-input adder 30.
And 4.

【0036】第1の乗数エンコーダ101aは、2次の
ブースのアルゴリズムに従って第1の乗数YAをコード
化するものである。第2の乗数エンコーダ101bは、
2次のブースのアルゴリズムに従って第2の乗数YBを
コード化するものである。第1及び第2の乗数エンコー
ダ101a,101bの各々の内部構成は、図1の乗数
エンコーダ101と同様である。
The first multiplier encoder 101a encodes the first multiplier YA according to the second order Booth algorithm. The second multiplier encoder 101b is
The second multiplier YB is encoded according to the second order Booth's algorithm. The internal configuration of each of the first and second multiplier encoders 101a and 101b is the same as that of the multiplier encoder 101 in FIG.

【0037】補数回路102aは、第1の被乗数XAの
下位5ビットデータをビット反転して1を加算すること
によって2の補数化し、5ビットの補数データ(IXA
+1)と、桁上げとを出力するものである。
The complement circuit 102a bit-inverts the lower 5-bit data of the first multiplicand XA and adds 1 to make it 2's complement, and the 5-bit complement data (IXA).
+1) and carry are output.

【0038】選択回路103aは、第1の乗数エンコー
ダ101aのコード化出力の最上位部分の中の部分積補
数化ビット、すなわち第1の最上位部分積補数化ビット
に応じて、第1の被乗数XAの下位5ビットデータと、
補数回路102aの出力する5ビットの補数データとの
いずれか一方を選択するものである。
The selection circuit 103a is responsive to the partial product complement bit in the most significant part of the coded output of the first multiplier encoder 101a, ie the first most significant partial product complement bit, to produce a first multiplicand. Lower 5 bits data of XA,
One of the 5-bit complement data output from the complement circuit 102a is selected.

【0039】第1〜第4の部分積発生器110a〜11
2a,213は、第1の積XA×YAに係る部分積を生
成するものであって、それぞれ第1部分積データP0
と、第2部分積データP1と、第3部分積データP2
と、第4部分積データP3とを生成する。第5〜第8の
部分積発生器310〜313は、第2の積XB×YBに
係る部分積を生成するものであって、それぞれ第5部分
積データP4と、第6部分積データP5と、第7部分積
データP6と、第8部分積データP7とを生成する。こ
のうち、第1〜第3の部分積発生器110a〜112a
の各々の内部構成は、図1の第1〜第3の部分積発生器
110〜112と同様である。第4の部分積発生器21
3は、第1の乗数エンコーダ101aのコード化出力の
最上位部分と、第1の被乗数XAの上位3ビットとを用
いて第4部分積データP3のうちの上位3ビットを生成
し、第1の乗数エンコーダ101aのコード化出力の最
上位部分と、選択回路103aの出力データとを用いて
第4部分積データP3のうちの下位5ビットを生成し、
第2の乗数エンコーダ101bのコード化出力の最上位
部分の中の部分積補数化ビット、すなわち第2の最上位
部分積補数化ビットを第4部分積データP3の下位ビッ
ト位置に付加し、かつ第4部分積の符号の反転ビット
と、論理値“1”のビットとを第4部分積データP3の
上位ビット位置に付加するものである。第4の部分積発
生器213の内部構成は、図1の第4の部分積発生器1
13とほぼ同様である。
The first to fourth partial product generators 110a to 110
2a and 213 generate partial products related to the first product XA × YA, and each of them is the first partial product data P0.
, Second partial product data P1, and third partial product data P2
And the fourth partial product data P3 are generated. The fifth to eighth partial product generators 310 to 313 generate partial products relating to the second product XB × YB, and respectively include fifth partial product data P4 and sixth partial product data P5. , The seventh partial product data P6 and the eighth partial product data P7 are generated. Of these, the first to third partial product generators 110a to 112a
Each of the internal configurations is similar to that of the first to third partial product generators 110 to 112 in FIG. Fourth partial product generator 21
3 uses the most significant part of the encoded output of the first multiplier encoder 101a and the most significant 3 bits of the first multiplicand XA to generate the most significant 3 bits of the fourth partial product data P3; The lowermost 5 bits of the fourth partial product data P3 are generated using the uppermost part of the coded output of the multiplier encoder 101a and the output data of the selection circuit 103a.
Add a partial product complement bit in the most significant part of the coded output of the second multiplier encoder 101b, ie the second most significant partial product complement bit, to the lower bit position of the fourth partial product data P3, and The inversion bit of the sign of the fourth partial product and the bit of the logical value "1" are added to the upper bit position of the fourth partial product data P3. The internal configuration of the fourth partial product generator 213 is the same as the fourth partial product generator 1 of FIG.
It is almost the same as 13.

【0040】第5の部分積発生器310は、第2の乗数
エンコーダ101bのコード化出力の第1の部分(最下
位部分)と、第2の被乗数XBとを用いて第5部分積デ
ータP4を生成し、第5部分積データP4の最下位ビッ
トに加算されるべき補数化ビットを第6部分積データP
5の下位ビット位置に付加し、かつ第5部分積の符号ビ
ットと、その反転ビットとを第5部分積データP4の上
位ビット位置に付加する。第6の部分積発生器311
は、第2の乗数エンコーダ101bのコード化出力の第
2の部分と、第2の被乗数XBとを用いて第6部分積デ
ータP5を生成し、第6部分積データP5の最下位ビッ
トに加算されるべき補数化ビットを第7部分積データP
6の下位ビット位置に付加し、かつ第6部分積の符号の
反転ビットと、論理値“1”のビットとを第6部分積デ
ータP5の上位ビット位置に付加する。第7の部分積発
生器312は、第2の乗数エンコーダ101bのコード
化出力の第3の部分と、第2の被乗数XBとを用いて第
7部分積データP6を生成し、第7部分積データP6の
最下位ビットに加算されるべき補数化ビットを第8部分
積データP7の下位ビット位置に付加し、かつ第7部分
積の符号の反転ビットと、論理値“1”のビットとを第
7部分積データP6の上位ビット位置に付加する。第8
の部分積発生器113は、第2の乗数エンコーダ101
bのコード化出力の第4の部分(最上位部分)と、第2
の被乗数XBとを用いて第8部分積データP7を生成
し、第8部分積データP7の最下位ビットに加算される
べき補数化ビット、すなわち前記第2の最上位部分積補
数化ビットを第8部分積データP7の下位ビット位置に
付加し、かつ第8部分積の符号の反転ビットと、論理値
“1”のビットとを第8部分積データP7の上位ビット
位置に付加する。第5〜第8の部分積発生器310〜3
13は、前記7種類の単位部分積発生器PPG1〜PP
G7のうちの第1及び第2の単位部分積発生器PPG
1,PPG2の組み合わせで構成される。
The fifth partial product generator 310 uses the first part (the lowest part) of the coded output of the second multiplier encoder 101b and the second multiplicand XB to calculate the fifth partial product data P4. To generate a complementary bit to be added to the least significant bit of the fifth partial product data P4,
5, and the sign bit of the fifth partial product and its inverted bit are added to the upper bit position of the fifth partial product data P4. Sixth partial product generator 311
Generates the sixth partial product data P5 using the second part of the encoded output of the second multiplier encoder 101b and the second multiplicand XB, and adds it to the least significant bit of the sixth partial product data P5. The complementary bit to be processed is the seventh partial product data P
6 is added to the lower bit position, and the inverted bit of the sign of the sixth partial product and the bit having the logical value "1" are added to the upper bit position of the sixth partial product data P5. The seventh partial product generator 312 generates the seventh partial product data P6 using the third part of the coded output of the second multiplier encoder 101b and the second multiplicand XB, and outputs the seventh partial product data P6. The complemented bit to be added to the least significant bit of the data P6 is added to the lower bit position of the eighth partial product data P7, and the inverted bit of the sign of the seventh partial product and the bit of logical value "1" are added. It is added to the upper bit position of the seventh partial product data P6. 8th
The partial product generator 113 of the second multiplier encoder 101
The fourth part (top part) of the coded output of b and the second part
And the multiplicand XB of the eighth partial product data P7 is generated, and the complemented bit to be added to the least significant bit of the eighth partial product data P7, that is, the second most significant partial product complemented bit is It is added to the lower bit position of the 8th partial product data P7, and the inverted bit of the sign of the 8th partial product data and the bit of the logical value "1" are added to the higher bit position of the 8th partial product data P7. Fifth to eighth partial product generators 310-3
Reference numeral 13 denotes the seven types of unit partial product generators PPG1 to PP
First and second unit partial product generators PPG of G7
1 and PPG2 are combined.

【0041】多入力加算器304は、第1〜第8の部分
積発生器110a〜112a,213,310〜313
の出力の加算を行い、2の補数形式の積和XA×YA+
XB×YBを出力するための加算器であって、ワレス
(Wallace)のトリー回路と、桁上げ伝搬加算器
(CPA)とで構成される。
The multi-input adder 304 includes first to eighth partial product generators 110a to 112a, 213, 310 to 313.
Are added together and the product sum XA × YA + in 2's complement format is added.
This is an adder for outputting XB × YB, and is composed of a Wallace tree circuit and a carry propagation adder (CPA).

【0042】図23は、図22の積和演算装置における
第1の積XA×YAに係る部分積の発生方法を示してい
る。図23に示された加算器304の第1〜第4入力
は、図19に示された加算器104の第1〜第4入力と
同様である。ただし、加算器304の第4入力では、第
4部分積データの最下位ビットP3[0] と、第3部分積
データの最下位ビットに加算されるべき補数化ビットB
C2との間に、第2の最上位部分積補数化ビットBC7
が挿入される。
FIG. 23 shows a method of generating a partial product relating to the first product XA.times.YA in the product-sum calculation device of FIG. The first to fourth inputs of the adder 304 shown in FIG. 23 are the same as the first to fourth inputs of the adder 104 shown in FIG. However, at the fourth input of the adder 304, the least significant bit P3 [0] of the fourth partial product data and the complemented bit B to be added to the least significant bit of the third partial product data.
The second most significant partial product complementation bit BC7
Is inserted.

【0043】図24は、図22の積和演算装置における
第2の積XB×YBに係る部分積の発生方法を示してい
る。加算器304の第5入力は、第5部分積データP4
[0]〜P4[7] と、第5部分積の符号ビットS4と、そ
の反転ビットIS4とで構成される。加算器304の第
6入力は、第6部分積データP5[0] 〜P5[7] と、第
6部分積の符号の反転ビットIS5と、論理値“1”の
ビットと、第5部分積データの最下位ビットに加算され
るべき補数化ビットBC4とで構成される。加算器30
4の第7入力は、第7部分積データP6[0] 〜P6[7]
と、第7部分積の符号の反転ビットIS6と、論理値
“1”のビットと、第6部分積データの最下位ビットに
加算されるべき補数化ビットBC5とで構成される。加
算器304の第8入力は、第8部分積データP7[0] 〜
P7[7] と、第8部分積の符号の反転ビットIS7と、
論理値“1”のビットと、第7部分積データの最下位ビ
ットに加算されるべき補数化ビットBC6と、第2の最
上位部分積補数化ビットBC7とで構成される。加算器
304の第8入力において、第2の最上位部分積補数化
ビットBC7は、第8部分積データの最下位ビットP7
[0] と、第7部分積データの最下位ビットに加算される
べき補数化ビットBC6との間に挿入される。そして、
上記第1〜第8入力を加算器304で加算することによ
り、2の補数形式の16ビットの積和XA×YA+XB
×YBが求められる。
FIG. 24 shows a method of generating a partial product relating to the second product XB.times.YB in the product-sum calculation device of FIG. The fifth input of the adder 304 is the fifth partial product data P4.
[0] to P4 [7], the sign bit S4 of the fifth partial product, and its inversion bit IS4. The sixth input of the adder 304 is the sixth partial product data P5 [0] to P5 [7], the inversion bit IS5 of the sign of the sixth partial product, the bit of the logical value "1", and the fifth partial product. Complementary bit BC4 to be added to the least significant bit of data. Adder 30
The seventh input of No. 4 is the seventh partial product data P6 [0] to P6 [7]
, The inversion bit IS6 of the sign of the seventh partial product, the bit of the logical value "1", and the complementation bit BC5 to be added to the least significant bit of the sixth partial product data. The eighth input of the adder 304 is the eighth partial product data P7 [0]
P7 [7] and the inversion bit IS7 of the sign of the eighth partial product,
It is composed of a bit having a logical value "1", a complemented bit BC6 to be added to the least significant bit of the seventh partial product data, and a second most significant partial product complemented bit BC7. At the eighth input of adder 304, the second most significant partial product complement bit BC7 is the least significant bit P7 of the eighth partial product data.
It is inserted between [0] and the complemented bit BC6 to be added to the least significant bit of the seventh partial product data. And
By adding the first to eighth inputs by the adder 304, the 16-bit product sum XA × YA + XB in the 2's complement format
XYB is required.

【0044】図22の積和演算装置は、図20の真理値
表に従って第1〜第3部分積を、図21の真理値表に従
って第4部分積を、図20の真理値表に従って第5〜第
8部分積を生成するものである。しかも、第8部分積デ
ータの最下位ビットP7[0]に加算されるべき補数化ビ
ット、すなわち第2の最上位部分積補数化ビットBC7
を第8部分積データの最下位ビットP7[0] の1ビット
下位の位置に二重に付加することによって、該第2の最
上位部分積補数化ビットBC7を第8部分積データの最
下位ビットP7[0] の位置に付加したのと同等の効果を
あげている。これにより、8入力の加算器304で高速
加算が達成される。
The sum-of-products calculation device of FIG. 22 calculates the first to third partial products according to the truth table of FIG. 20, the fourth partial product according to the truth table of FIG. 21, and the fifth part of the truth table of FIG. ~ Is to generate an eighth partial product. Moreover, the complemented bit to be added to the least significant bit P7 [0] of the eighth partial product data, that is, the second most significant partial product complemented bit BC7.
Is added to the position of 1 bit lower than the least significant bit P7 [0] of the eighth partial product data so that the second most significant partial product complement bit BC7 is added to the least significant bit of the eighth partial product data. It has the same effect as adding to the position of bit P7 [0]. Thus, the 8-input adder 304 achieves high-speed addition.

【0045】以上、本発明に係る図1の乗算装置と、図
22の積和演算装置との詳細を説明した。
The details of the multiplication device of FIG. 1 and the product-sum calculation device of FIG. 22 according to the present invention have been described above.

【0046】なお、図1の乗算装置では第4の部分積発
生器113と選択回路103とを別の回路ブロックとし
たが、第4の部分積発生器113の中の5個の単位部分
積発生器PPG3の中に選択回路103の機能を持たせ
てもよい。図22の積和演算装置の第4の部分発生器2
13と選択回路103aとについても同様である。
Although the fourth partial product generator 113 and the selection circuit 103 are separate circuit blocks in the multiplication apparatus of FIG. 1, five unit partial products in the fourth partial product generator 113 are included. The generator PPG3 may have the function of the selection circuit 103. The fourth partial generator 2 of the product-sum calculation apparatus of FIG.
The same applies to 13 and the selection circuit 103a.

【0047】また、図1の乗算装置の乗数エンコーダ1
01では2次のブースのアルゴリズムを採用したが、こ
れに代えて、3次以上のブースのアルゴリズムや、その
他の乗数コード化アルゴリズムを採用してもよい。図2
2の積和演算装置の第1及び第2の乗数エンコーダ10
1a,101bについても同様である。
Also, the multiplier encoder 1 of the multiplication device of FIG.
Although 01 uses the second-order Booth's algorithm, a third-order or higher-order Booth's algorithm or another multiplier coding algorithm may be used instead. FIG.
First and second multiplier encoders 10 of the product sum operation device of 2
The same applies to 1a and 101b.

【0048】図1の乗算装置では、第4部分積データの
最下位ビットP3[0] (ビット位置M[6] )に加算され
るべき補数化ビットに代わる補数化ビットIS3Cを加
算器104の第1入力のビット位置M[11](これは、ビ
ット位置M[6] に最も近い空きビット位置である)に付
加するように、補数回路102で8ビット被乗数の下位
5ビットデータX[4:0] を2の補数化することとした。
ただし、補数化ビットIS3Cの付加ビット位置を変更
すれば、これに応じて補数回路102における被乗数の
補数化ビット数が変更され、かつ該補数回路102の桁
上げに基づく補数化ビットC3[0] ,C3[1] の付加ビ
ット位置が変更される。8ビット被乗数X[7:0] の全体
を2の補数化するようにしてもよい。被乗数X及び乗数
Yのビット数は任意に変更可能である。図22の積和演
算装置でも、同様の変更が可能である。
In the multiplication device of FIG. 1, the complemented bit IS3C in place of the complemented bit to be added to the least significant bit P3 [0] (bit position M [6]) of the fourth partial product data is added to the adder 104. The complement circuit 102 adds the lower 5-bit data X [4 of the 8-bit multiplicand to the bit position M [11] of the first input (this is the empty bit position closest to the bit position M [6]). : 0] is made to be two's complement.
However, if the additional bit position of the complement bit IS3C is changed, the complement bit number of the multiplicand in the complement circuit 102 is changed accordingly, and the complement bit C3 [0] based on the carry of the complement circuit 102 is changed. , C3 [1] additional bit positions are changed. The 8-bit multiplicand X [7: 0] may be wholly complemented with two. The bit numbers of the multiplicand X and the multiplier Y can be arbitrarily changed. Similar changes can be made in the product-sum calculation apparatus of FIG.

【0049】[0049]

【発明の効果】以上説明してきたとおり、本発明の乗算
装置によれば、最上位部分積データの最下位ビットと同
じビット位置への最上位部分積補数化ビットの付加と同
等の効果を、被乗数の下位ビットを2の補数化すること
により得られる補数データと桁上げとを用いて、各部分
積データの中で達成することとしたので、乗数のコード
化処理の際に生じる被乗数側の空き時間を有効利用し
て、部分積の加算のための加算器の入力数を低減するこ
とができる。
As described above, according to the multiplication device of the present invention, the same effect as the addition of the most significant partial product complementation bit to the same bit position as the least significant bit of the most significant partial product data can be obtained. Since it is decided to achieve in each partial product data by using the complement data and the carry obtained by converting the lower bit of the multiplicand to 2's complement, the multiplicand side generated at the time of the encoding process of the multiplier The free time can be effectively used to reduce the number of inputs to the adder for adding partial products.

【0050】また、本発明の積和演算装置によれば、第
1の積XA×YAの算出に上記本発明の乗算装置を用い
たので、加算器の入力数が低減される。しかも、第2の
積XB×YBに係る最上位部分積補数化ビットの二重付
加を採用したので、第2の積に係る加算器の入力数が低
減され、かつ第2の積を算出するための乗算装置の構成
が簡略化される。
Further, according to the product-sum calculation apparatus of the present invention, since the multiplication apparatus of the present invention is used for calculating the first product XA.times.YA, the number of inputs of the adder can be reduced. Moreover, since the double addition of the most significant partial product complementation bit relating to the second product XB × YB is adopted, the number of inputs of the adder relating to the second product is reduced, and the second product is calculated. The configuration of the multiplication device for is simplified.

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

【図1】本発明に係る乗算装置の構成例を示す概略ブロ
ック図である。
FIG. 1 is a schematic block diagram showing a configuration example of a multiplication device according to the present invention.

【図2】図1中の乗数エンコーダの内部構成を示すブロ
ック図である。
FIG. 2 is a block diagram showing an internal configuration of a multiplier encoder in FIG.

【図3】図1中の補数回路及び選択回路の詳細を示すブ
ロック図である。
3 is a block diagram showing details of a complement circuit and a selection circuit in FIG.

【図4】(a)及び(b)は、図1中の第1の部分積発
生器の内部構成を示すブロック図である。
4 (a) and (b) are block diagrams showing an internal configuration of a first partial product generator in FIG.

【図5】(a)及び(b)は、図1中の第2の部分積発
生器の内部構成を示すブロック図である。
5 (a) and 5 (b) are block diagrams showing an internal configuration of a second partial product generator in FIG.

【図6】(a)及び(b)は、図1中の第3の部分積発
生器の内部構成を示すブロック図である。
6 (a) and 6 (b) are block diagrams showing an internal configuration of a third partial product generator in FIG.

【図7】(a)及び(b)は、図1中の第4の部分積発
生器の内部構成を示すブロック図である。
7 (a) and (b) are block diagrams showing the internal configuration of a fourth partial product generator in FIG.

【図8】図2中の各ブースエンコーダの内部構成を示す
回路図である。
8 is a circuit diagram showing an internal configuration of each Booth encoder in FIG. 2. FIG.

【図9】図8のブースエンコーダの真理値表を示す図で
ある。
9 is a diagram showing a truth table of the Booth encoder shown in FIG. 8;

【図10】図3中の補数回路の内部構成を示す回路図で
ある。
10 is a circuit diagram showing an internal configuration of a complement circuit in FIG.

【図11】図3中の選択回路の内部構成を示す回路図で
ある。
11 is a circuit diagram showing an internal configuration of a selection circuit in FIG.

【図12】第1の単位部分積発生器の内部構成を示す回
路図である。
FIG. 12 is a circuit diagram showing an internal configuration of a first unit partial product generator.

【図13】第2の単位部分積発生器の内部構成を示す回
路図である。
FIG. 13 is a circuit diagram showing an internal configuration of a second unit partial product generator.

【図14】第3の単位部分積発生器の内部構成を示す回
路図である。
FIG. 14 is a circuit diagram showing an internal configuration of a third unit partial product generator.

【図15】第4の単位部分積発生器の内部構成を示す回
路図である。
FIG. 15 is a circuit diagram showing an internal configuration of a fourth unit partial product generator.

【図16】第5の単位部分積発生器の内部構成を示す回
路図である。
FIG. 16 is a circuit diagram showing an internal configuration of a fifth unit partial product generator.

【図17】第6の単位部分積発生器の内部構成を示す回
路図である。
FIG. 17 is a circuit diagram showing an internal configuration of a sixth unit partial product generator.

【図18】第7の単位部分積発生器の内部構成を示す回
路図である。
FIG. 18 is a circuit diagram showing an internal configuration of a seventh unit partial product generator.

【図19】図1の乗算装置における部分積発生方法を示
す図である。
19 is a diagram showing a partial product generation method in the multiplication device in FIG. 1. FIG.

【図20】図1の乗算装置の第1、第2及び第3部分積
の発生に係る真理値表を示す図である。
20 is a diagram showing a truth table relating to the generation of first, second and third partial products of the multiplication device of FIG. 1;

【図21】図1の乗算装置の第4部分積の発生に係る真
理値表を示す図である。
21 is a diagram showing a truth table relating to the generation of a fourth partial product in the multiplication device shown in FIG. 1;

【図22】本発明に係る積和演算装置の構成例を示す概
略ブロック図である。
FIG. 22 is a schematic block diagram showing a configuration example of a product-sum calculation apparatus according to the present invention.

【図23】図22の積和演算装置における第1の積に係
る部分積の発生方法を示す図である。
23 is a diagram showing a method of generating a partial product relating to a first product in the product-sum calculation apparatus of FIG. 22.

【図24】図22の積和演算装置における第2の積に係
る部分積の発生方法を示す図である。
FIG. 24 is a diagram showing a method of generating a partial product relating to a second product in the product-sum calculation apparatus of FIG. 22.

【図25】従来の乗算装置における部分積発生方法を示
す図である。
FIG. 25 is a diagram showing a partial product generation method in a conventional multiplication device.

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

101,101a,101b 乗数エンコーダ 102,102a 補数回路(COMP) 103,103a 選択回路(SEL) 104,304 多入力加算器 110〜113 部分積発生器 110a〜112a,213 部分積発生器 310〜313 部分積発生器 101, 101a, 101b Multiplier encoder 102, 102a Complement circuit (COMP) 103, 103a Selection circuit (SEL) 104, 304 Multi-input adder 110-113 Partial product generator 110a-112a, 213 Partial product generator 310-313 Part Product generator

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 乗数をコード化するための乗数エンコー
ダと、 被乗数の下位ビットをビット反転して1を加算すること
により2の補数化し、補数データと桁上げとを出力する
ための補数回路と、 前記乗数エンコーダのコード化出力と、前記被乗数と、
前記補数回路の出力する補数データ及び桁上げとを用い
て複数の部分積を生成するための部分積発生手段と、 前記部分積発生手段で生成された複数の部分積を加算す
るための加算器とを備えたことを特徴とする乗算装置。
1. A multiplier encoder for encoding a multiplier, and a complement circuit for converting two bits of a lower bit of a multiplicand and adding 1 to form 2's complement, and outputting complement data and a carry. A coded output of the multiplier encoder, the multiplicand,
Partial product generating means for generating a plurality of partial products using the complement data and carry carried by the complement circuit; and an adder for adding the plurality of partial products generated by the partial product generating means. And a multiplication device.
【請求項2】 請求項1記載の乗算装置において、 前記部分積発生手段は、 前記乗数エンコーダのコード化出力の最上位部分の中の
部分積補数化ビットに応じて、前記被乗数の下位ビット
と、前記補数回路の出力する補数データとのいずれか一
方を選択するための選択回路と、 前記乗数エンコーダのコード化出力の一部と、前記被乗
数とを用いて第1型の部分積データを生成し、該第1型
の部分積データを含んだ部分積を前記加算器へ供給する
ための第1型の部分積発生器と、 前記乗数エンコーダのコード化出力の他の一部と、前記
被乗数とを用いて第2型の部分積データを生成し、かつ
前記補数回路の出力する桁上げを前記第2型の部分積デ
ータの上位ビット位置に付加し、該桁上げが付加された
第2型の部分積データを含んだ部分積を前記加算器へ供
給するための第2型の部分積発生器と、 前記乗数エンコーダのコード化出力の最上位部分と、前
記被乗数の上位ビットとを用いて第3型の部分積データ
のうちの上位ビットを、前記乗数エンコーダのコード化
出力の最上位部分と、前記選択回路の出力データとを用
いて前記第3型の部分積データのうちの下位ビットをそ
れぞれ生成し、該第3型の部分積データを含んだ部分積
を前記加算器へ供給するための第3型の部分積発生器と
を備えたことを特徴とする乗算装置。
2. The multiplication device according to claim 1, wherein the partial product generation means sets a lower bit of the multiplicand according to a partial product complementation bit in a most significant part of the coded output of the multiplier encoder. , A selection circuit for selecting one of the complement data output from the complement circuit, a part of the coded output of the multiplier encoder, and the multiplicand to generate partial product data of the first type A partial product generator of the first type for supplying a partial product containing the partial product data of the first type to the adder, another part of the coded output of the multiplier encoder, and the multiplicand Is used to generate the second type partial product data, and the carry output from the complement circuit is added to the high-order bit position of the second type partial product data, and the carry is added to the second The partial product containing the partial product data of the type A second-type partial product generator for supplying to the adder, a most significant part of the coded output of the multiplier encoder, and the high-order bit of the multiplicand. Using the most significant bit of the coded output of the multiplier encoder and the output data of the selection circuit, the least significant bit of the partial product data of the third type is generated, and the high order bit of the third type is generated. And a third type partial product generator for supplying a partial product containing partial product data to the adder.
【請求項3】 第1の被乗数をXA、第1の乗数をYA
とした第1の積XA×YAと、第2の被乗数をXB、第
2の乗数をYBとした第2の積XB×YBとの和を算出
するための積和演算装置であって、 前記第1の乗数YAをコード化するための第1の乗数エ
ンコーダと、 前記第2の乗数YBをコード化するための第2の乗数エ
ンコーダと、 前記第1の被乗数XAの下位ビットをビット反転して1
を加算することにより2の補数化し、補数データと桁上
げとを出力するための補数回路と、 前記第1の乗数エンコーダのコード化出力と、前記第2
の乗数エンコーダのコード化出力と、前記第1の被乗数
XAと、前記補数回路の出力する補数データ及び桁上げ
とを用いて複数の部分積を生成するための第1の部分積
発生手段と、 前記第2の乗数エンコーダのコード化出力と、前記第2
の被乗数XBとを用いて複数の部分積を生成するための
第2の部分積発生手段と、 前記第1の部分積発生手段で生成された複数の部分積
と、前記第2の部分積発生手段で生成された複数の部分
積とを加算するための加算器とを備えたことを特徴とす
る積和演算装置。
3. The first multiplicand is XA, and the first multiplier is YA.
And a second product XB × YB in which the second multiplicand is XB and the second multiplier is YB. A first multiplier encoder for encoding the first multiplier YA, a second multiplier encoder for encoding the second multiplier YB, and bit inversion of the lower bits of the first multiplicand XA. 1
2's complement by adding, and a complement circuit for outputting complement data and carry; a coded output of the first multiplier encoder;
First partial product generating means for generating a plurality of partial products using the coded output of the multiplier encoder, the first multiplicand XA, and the complement data and the carry output from the complement circuit, A coded output of the second multiplier encoder;
Second partial product generating means for generating a plurality of partial products by using the multiplicand XB of, and a plurality of partial products generated by the first partial product generating means, and a second partial product generation And a plurality of partial products generated by the means, and an adder for adding the partial products.
【請求項4】 請求項3記載の積和演算装置において、 前記第1の部分積発生手段は、 前記第1の乗数エンコーダのコード化出力の最上位部分
の中の部分積補数化ビットに応じて、前記第1の被乗数
XAの下位ビットと、前記補数回路の出力する補数デー
タとのいずれか一方を選択するための選択回路と、 前記第1の乗数エンコーダのコード化出力の一部と、前
記第1の被乗数XAとを用いて第1型の部分積データを
生成し、該第1型の部分積データを含んだ部分積を前記
加算器へ供給するための第1型の部分積発生器と、 前記第1の乗数エンコーダのコード化出力の他の一部
と、前記第1の被乗数XAとを用いて第2型の部分積デ
ータを生成し、かつ前記補数回路の出力する桁上げを前
記第2型の部分積データの上位ビット位置に付加し、該
桁上げが付加された第2型の部分積データを含んだ部分
積を前記加算器へ供給するための第2型の部分積発生器
と、 前記第1の乗数エンコーダのコード化出力の最上位部分
と、前記第1の被乗数XAの上位ビットとを用いて第3
型の部分積データの上位ビットを、前記第1の乗数エン
コーダのコード化出力の最上位部分と、前記選択回路の
出力データとを用いて前記第3型の部分積データの下位
ビットをそれぞれ生成し、かつ前記第2の乗数エンコー
ダのコード化出力の最上位部分の中の部分積補数化ビッ
トを前記第3型の部分積データの下位ビット位置に付加
し、該部分積補数化ビットが付加された第3型の部分積
データを含んだ部分積を前記加算器へ供給するための第
3型の部分積発生器とを備え、 前記第2の部分積発生手段は、 前記第2の乗数エンコーダのコード化出力の一部と、前
記第2の被乗数XBとを用いて第4型の部分積データを
生成し、該第4型の部分積データを含んだ部分積を前記
加算器へ供給するための第4型の部分積発生器と、 前記第2の乗数エンコーダのコード化出力の最上位部分
と、前記第2の被乗数XBとを用いて第5型の部分積デ
ータを生成し、かつ前記第2の乗数エンコーダのコード
化出力の最上位部分の中の部分積補数化ビットを前記第
5型の部分積データの下位ビット位置に付加し、該部分
積補数化ビットが付加された第5型の部分積データを含
んだ部分積を前記加算器へ供給するための第5型の部分
積発生器とを備えたことを特徴とする乗算装置。
4. The product-sum calculation apparatus according to claim 3, wherein the first partial product generating means is responsive to a partial product complement bit in the most significant part of the coded output of the first multiplier encoder. A selection circuit for selecting one of the lower bit of the first multiplicand XA and the complement data output from the complement circuit, and a part of the coded output of the first multiplier encoder, A first type partial product generation for generating a first type partial product data by using the first multiplicand XA and supplying a partial product including the first type partial product data to the adder Unit, another part of the coded output of the first multiplier encoder, and the first multiplicand XA to generate second type partial product data, and a carry output from the complement circuit. To the upper bit position of the second type partial product data A second type partial product generator for supplying the adder with a partial product containing the second type partial product data to which the carry is added; and a maximum of the coded output of the first multiplier encoder. A third part is formed using the upper part and the upper bits of the first multiplicand XA.
The upper bits of the partial product data of the type are respectively generated by using the uppermost part of the coded output of the first multiplier encoder and the output data of the selection circuit to generate the lower bits of the partial product data of the third type. And a partial product complement bit in the most significant part of the coded output of the second multiplier encoder is added to the lower bit position of the partial product data of the third type, and the partial product complement bit is added. A third partial product generator for supplying a partial product including the generated third partial product data to the adder, wherein the second partial product generating means includes the second multiplier. A fourth type partial product data is generated by using a part of the encoded output of the encoder and the second multiplicand XB, and a partial product including the fourth type partial product data is supplied to the adder. A partial product generator of the fourth type for A fifth type of partial product data is generated using the uppermost portion of the encoded output of the encoder and the second multiplicand XB, and among the uppermost portion of the encoded output of the second multiplier encoder A partial product complement bit is added to the lower bit position of the fifth type partial product data, and a partial product including the fifth type partial product data with the partial product complement bit added is supplied to the adder. And a fifth type partial product generator for performing the multiplication.
JP34033195A 1995-12-27 1995-12-27 Multiplier and product-sum operation unit Expired - Fee Related JP3558436B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34033195A JP3558436B2 (en) 1995-12-27 1995-12-27 Multiplier and product-sum operation unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34033195A JP3558436B2 (en) 1995-12-27 1995-12-27 Multiplier and product-sum operation unit

Publications (2)

Publication Number Publication Date
JPH09179723A true JPH09179723A (en) 1997-07-11
JP3558436B2 JP3558436B2 (en) 2004-08-25

Family

ID=18335922

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34033195A Expired - Fee Related JP3558436B2 (en) 1995-12-27 1995-12-27 Multiplier and product-sum operation unit

Country Status (1)

Country Link
JP (1) JP3558436B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6272513B1 (en) 1998-02-23 2001-08-07 Denso Corporation Multiplying device
JP2007324980A (en) * 2006-06-01 2007-12-13 Nec Electronics Corp Filter processing apparatus, multiplier, and motion compensation processing device
JP2010165179A (en) * 2009-01-15 2010-07-29 Hiroshima Univ Semiconductor device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6272513B1 (en) 1998-02-23 2001-08-07 Denso Corporation Multiplying device
JP2007324980A (en) * 2006-06-01 2007-12-13 Nec Electronics Corp Filter processing apparatus, multiplier, and motion compensation processing device
JP2010165179A (en) * 2009-01-15 2010-07-29 Hiroshima Univ Semiconductor device

Also Published As

Publication number Publication date
JP3558436B2 (en) 2004-08-25

Similar Documents

Publication Publication Date Title
US5426598A (en) Adder and multiplier circuit employing the same
EP1025486A1 (en) Fast regular multiplier architecture
US5784305A (en) Multiply-adder unit
US7308471B2 (en) Method and device for performing operations involving multiplication of selectively partitioned binary inputs using booth encoding
US20040153489A1 (en) Multiply execution unit for preforming integer and XOR multiplication
US4879677A (en) Parallel adder circuit with sign bit decoder for multiplier
Yan et al. An energy-efficient multiplier with fully overlapped partial products reduction and final addition
US6260056B1 (en) Circuit and method for fast squaring by breaking the square into a plurality of terms
WO2005086675A2 (en) Arithmetic circuit with balanced logic levels for low-power operation
US20050228845A1 (en) Shift and recode multiplier
JPH09179723A (en) Multiplier and arithmetic unit for sum of product
EP0314968B1 (en) Overlapped multiple-bit scanning multiplication system with banded partial product matrix
JPH0149973B2 (en)
US7840628B2 (en) Combining circuitry
US20200125329A1 (en) Rank-based dot product circuitry
CN112631546A (en) KO-8 algorithm-based high-performance modular multiplier
JPH056892B2 (en)
EP0326414A2 (en) High speed multiplier
JP3190826B2 (en) Product-sum operation unit
JPH09311779A (en) Multiplier and digital signal processor using the same
JP2765516B2 (en) Multiply-accumulate unit
TW200534161A (en) Sign extension method and architecture of a multiplier
JPS62216034A (en) Parallel multiplier
JPS62216035A (en) Parallel multiplier
JPS6158036A (en) Multiplier

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20031128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20031224

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040511

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040518

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees