JP2000099313A - Multiplier - Google Patents

Multiplier

Info

Publication number
JP2000099313A
JP2000099313A JP10271537A JP27153798A JP2000099313A JP 2000099313 A JP2000099313 A JP 2000099313A JP 10271537 A JP10271537 A JP 10271537A JP 27153798 A JP27153798 A JP 27153798A JP 2000099313 A JP2000099313 A JP 2000099313A
Authority
JP
Japan
Prior art keywords
bit
multiplier
bits
partial product
multiplicand
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
JP10271537A
Other languages
Japanese (ja)
Other versions
JP3855491B2 (en
Inventor
Hiroaki Dosono
博明 堂園
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.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP27153798A priority Critical patent/JP3855491B2/en
Publication of JP2000099313A publication Critical patent/JP2000099313A/en
Application granted granted Critical
Publication of JP3855491B2 publication Critical patent/JP3855491B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a repetitive multiplier which can increase its operation speed with a small-scale configuration. SOLUTION: When an 8-bit multiplicand X is multiplied by an 8-bit multiplier Y with addition of a code, the 2-bit code expansion is carried out. Meanwhile, the 2-bit 0 expansion is carried out with addition of no code. Thus, this multiplier M1 performs alternatively the multiplication with a code and the multiplication with no code. In such a constitution, a partial product generation circuit 22 generates a 1st partial product B0 corresponding to the least significant bit of the multiplier Y in a 1st cycle of operation. A partial product generation circuit 20 successively generates the partial products B1, B2... excluding the product B0 in each cycle and in the order of lower ranks. Then the partial product that is generated by the circuit 20 in the current cycle is added to the intermediate sum that is held in the preceding cycle, so that the partial products are cumulatively added together at the circuit parts (24 to 30). An augend selection circuit 32 supplies the product B0 received from the circuit 22 to each of said circuit parts in the 1st cycle only. As a result, the cumulative addition of partial products is possible in and after the 1st cycle and the number of cycles is decreased by one.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、乗算を複数の演算
サイクルに分割し、各々の演算サイクルで部分積を生成
すると共に、その部分積を累積加算していくことによ
り、全ての部分積の和である乗算結果を求める、繰り返
し型の乗算器(反復乗算器)に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention divides a multiplication into a plurality of operation cycles, generates a partial product in each operation cycle, and accumulates the partial products, thereby obtaining a sum of all the partial products. The present invention relates to an iterative multiplier (iterative multiplier) for obtaining a multiplication result that is a sum.

【0002】[0002]

【従来の技術】従来より、ディジタル信号処理装置に用
いられる乗算器の構成として、例えば電子情報通信学会
編の「ディジタル信号処理ハンドブック:第243頁〜
第244頁」等に記載されているように、キャリーセー
ブアダー方式並列乗算器や、部分積の生成に2次のブー
スのアルゴリズムを用いた並列乗算器、或いは、部分積
の加算にワレーストリー(Wallace Tree)の方法を用い
た並列乗算器などがある。
2. Description of the Related Art Conventionally, as a configuration of a multiplier used in a digital signal processing apparatus, for example, "Digital Signal Processing Handbook: pages 243 to 243" edited by the Institute of Electronics, Information and Communication Engineers.
Page 244 "or the like, a carry-save adder type parallel multiplier, a parallel multiplier using a secondary Booth's algorithm for generating partial products, or a wary tree (for adding partial products). Wallace Tree).

【0003】しかし、これらの並列乗算器では、多くの
部分積発生回路と多くの加算回路が必要になるため、ハ
ードウエアをICチップ上に実現した場合(即ち、IC
化した場合)に占有面積が大きくなってしまう。このた
め、ICチップ上での占有面積を小さくしたい場合に
は、乗算を複数の演算サイクルに分割して実行する繰り
返し乗算器(反復乗算器)が用いられる。
However, these parallel multipliers require a large number of partial product generation circuits and a large number of addition circuits. Therefore, when hardware is realized on an IC chip (ie, an IC chip).
Occupied area becomes large. Therefore, when it is desired to reduce the occupied area on the IC chip, a repetitive multiplier (iterative multiplier) that divides and executes multiplication in a plurality of operation cycles is used.

【0004】ここで、従来の繰り返し乗算器のうち、部
分積の生成に2次のブースのアルゴリズムを用いたもの
について説明する。尚、本明細書において、「符号拡
張」とは、データの最上位ビット側にその最上位ビット
と同じビットを追加することを意味し、「0拡張」と
は、データの最上位ビット側に“0”のビットを追加す
ることを意味している。そして、「符号拡張」と「0拡
張」との両方を総称して、「拡張」という。
Here, a description will be given of a conventional iterative multiplier using a secondary Booth algorithm for generating a partial product. In this specification, “sign extension” means that the same bit as the most significant bit is added to the most significant bit of data, and “0 extension” means that the most significant bit of data is This means that a “0” bit is added. Then, both “sign extension” and “0 extension” are collectively referred to as “extension”.

【0005】まず、ブースのアルゴリズムには、2の補
数表示形式の乗算(即ち、2の補数表示の2進数の乗算
であって、符号付き乗算)を補正無しで実行できるとい
う特徴があり、その中でも特に2次のブースのアルゴリ
ズムは、部分積の数を半減させることができるため、こ
の種の乗算器において頻繁に利用されている。
First, Booth's algorithm is characterized in that two's complement multiplication (ie, a two's complement binary multiplication and signed multiplication) can be executed without correction. Above all, the second-order Booth algorithm is frequently used in this type of multiplier because the number of partial products can be halved.

【0006】尚、2次のブースのアルゴリズムは、被乗
数をXとし乗数をYとすると、図7の真理値表に示す法
則を用いて部分積を生成するものである。つまり、乗数
Yを構成するビットを、Y[i+1] ,Y[i] ,Y[i-1]
(i=0,2,4,…)というように前後1ビットが重
複した連続する3ビットずつのグループに分け(図9参
照)、その各グループのビットの並びに応じて、
「0」,「+X」,「−X」,「+2X」,「−2X」
のうちの何れかを表すデータを部分積とする。但し、[]
内の値は、データにおける最下位ビットを0ビット目と
した場合のビット位置を示している。よって、例えばY
[7] は、乗数Yを構成するビットのうち、最下位ビット
Y[0] から数えて(換言すれば、最下位ビットY[0] を
1ビット目とした場合の)8ビット目を表すこととな
る。また、Y[-1]は、実際には存在しないダミービット
であり、“0”と見なされる。
The second-order Booth algorithm generates a partial product using the rule shown in the truth table of FIG. 7 when the multiplicand is X and the multiplier is Y. That is, bits forming the multiplier Y are represented by Y [i + 1], Y [i], Y [i-1].
(I = 0, 2, 4,...) And divided into groups of three consecutive bits in which one bit before and after is overlapped (see FIG. 9), and according to the bit sequence of each group,
"0", "+ X", "-X", "+ 2X", "-2X"
Is a partial product. However, []
The values in parentheses indicate the bit positions when the least significant bit in the data is the 0th bit. Thus, for example, Y
[7] represents the eighth bit of the bits constituting the multiplier Y, counting from the least significant bit Y [0] (in other words, when the least significant bit Y [0] is the first bit). It will be. Y [-1] is a dummy bit that does not actually exist and is regarded as "0".

【0007】そして、このような2次のブースのアルゴ
リズムを用いた乗算では、図7の真理値表に従って生成
される部分積の各々を2ビットずつシフトして累積加算
することにより、被乗数と乗数との積を得る。例とし
て、図8に、2の補数表示形式の8ビット×8ビットの
乗算例を示す。この例の場合、乗数Yを構成するビット
が、図9に示す如く4つのグループG0 〜G3 に分けら
れ、その各グループG0〜G3 に対応して4つの部分積
B0 〜B3 が生成される。そして、その4つの各部分積
B0 〜B3 が、図8に示す如く2ビットずつシフトして
累積加算されることにより、被乗数Xと乗数Yとの積を
表す2の補数表示の15ビットのデータが得られる。
In the multiplication using the secondary Booth's algorithm, the multiplicand and the multiplier are calculated by shifting each of the partial products generated according to the truth table of FIG. To get the product. As an example, FIG. 8 shows an example of multiplication of 8 bits × 8 bits in a two's complement display format. In this example, the bits forming the multiplier Y are divided into four groups G0 to G3 as shown in FIG. 9, and four partial products B0 to B3 are generated corresponding to the groups G0 to G3. Then, the four partial products B0 to B3 are shifted by 2 bits at a time as shown in FIG. 8 and cumulatively added, so that 15-bit data of 2's complement notation representing the product of the multiplicand X and the multiplier Y is obtained. Is obtained.

【0008】尚、図8では、部分積B0 〜B3 の各ビッ
トを「○」印と「●」印で示している。また、図8にお
ける「□」印は、加算時の桁合わせに必要となる符号拡
張ビットを示している。つまり、2次のブースのアルゴ
リズムでは、図7の如く部分積が「−2X」或いは「2
X」となる場合があるため、最低限生成すべき必須の部
分積としては、図8にて「●」印で示したビットから右
側の9(=8+1)ビットであるが、加算時において全
ての部分積B0 〜B3 の最上位ビットのビット位置を一
致させるために、上記「□」印で示す符号拡張ビットが
付加される。
In FIG. 8, each bit of the partial products B0 to B3 is indicated by "O" and "●". 8 indicate sign extension bits necessary for digit alignment during addition. That is, in the second order Booth algorithm, the partial product is “−2X” or “2X” as shown in FIG.
X, the minimum required partial product to be generated is 9 (= 8 + 1) bits on the right side of the bit indicated by the mark “●” in FIG. In order to make the bit positions of the most significant bits of the partial products B0 to B3 coincide with each other, a sign extension bit indicated by the above-mentioned "□" is added.

【0009】次に、図10は、2次のブースのアルゴリ
ズムを用いて2の補数表示形式の8ビット×8ビットの
乗算を行う従来の繰り返し乗算器J1の構成を表すブロ
ック図であり、図11は、その繰り返し乗算器J1の乗
算動作を表す模式図である。図10に示すように、繰り
返し乗算器J1には、8ビットの被乗数Xと乗数Yが入
力されると共に、演算の1サイクル目(第1演算サイク
ル),2サイクル目(第2演算サイクル),3サイクル
目(第3演算サイクル),4サイクル目(第4演算サイ
クル)といった具合に演算のサイクル数を示す演算サイ
クル信号が制御線Lを介して入力される。
Next, FIG. 10 is a block diagram showing the configuration of a conventional repetitive multiplier J1 for performing multiplication of 8 bits × 8 bits in a two's complement display format using a secondary Booth algorithm. FIG. 11 is a schematic diagram showing the multiplication operation of the repetitive multiplier J1. As shown in FIG. 10, an 8-bit multiplicand X and a multiplier Y are input to the repetitive multiplier J1, and the first cycle (first operation cycle), the second cycle (second operation cycle), An operation cycle signal indicating the number of operation cycles, such as a third cycle (third operation cycle) and a fourth cycle (fourth operation cycle), is input via the control line L.

【0010】そして、この繰り返し乗算器J1は、外部
から入力される8ビットの被乗数Xを、制御線Lからの
演算サイクル信号が1サイクル目を示す値になったタイ
ミング(或いは、その直前のタイミング)で保持する被
乗数保持回路100と、外部から入力される8ビットの
乗数Yを、制御線Lからの演算サイクル信号が1サイク
ル目を示す値になったタイミング(或いは、その直前の
タイミング)で保持する乗数保持回路102と、制御線
Lからの演算サイクル信号の変化に同期して、乗数保持
回路102に保持されている乗数Yを構成するビットの
うちで図9に示す各グループG0 〜G3 の何れかの3ビ
ットを下位のものから順番に選択して出力する乗数ビッ
ト選択回路104とを備えている。
The repetitive multiplier J1 changes the 8-bit multiplicand X input from the outside at the timing when the operation cycle signal from the control line L becomes a value indicating the first cycle (or the timing immediately before that). ) And the 8-bit multiplier Y input from the outside at the timing (or immediately preceding timing) at which the operation cycle signal from the control line L reaches the value indicating the first cycle. Each of the groups G0 to G3 shown in FIG. 9 of the multiplier holding circuit 102 to be held and the bits constituting the multiplier Y held in the multiplier holding circuit 102 in synchronization with the change of the operation cycle signal from the control line L. And a multiplier bit selection circuit 104 for selecting and outputting any one of the three bits in order from the lower one.

【0011】尚、乗数ビット選択回路104は、演算サ
イクル信号が1サイクル目を示す値になると、図9に示
す最下位側の第1グループG0 の3ビット(Y[1] ,Y
[0],Y[-1]:但しY[-1]はダミービットで“0”)を
出力し、演算サイクル信号が2サイクル目を示す値にな
ると、図9に示す第2グループG1 の3ビット(Y[3]
,Y[2] ,Y[1] )を出力し、演算サイクル信号が3
サイクル目を示す値になると、図9に示す第3グループ
G2 の3ビット(Y[5] ,Y[4] ,Y[3] )を出力し、
演算サイクル信号が4サイクル目を示す値になると、図
9に示す第4グループG3 の3ビット(Y[7] ,Y[6]
,Y[5] )を出力する。
When the operation cycle signal reaches the value indicating the first cycle, the multiplier bit selection circuit 104 outputs three bits (Y [1], Y [1], Y [1], Y [1]) of the lowest group G0 shown in FIG.
[0], Y [-1]: However, Y [-1] is a dummy bit and outputs "0". When the operation cycle signal becomes a value indicating the second cycle, the second group G1 shown in FIG. 3 bits (Y [3]
, Y [2], Y [1]) and the operation cycle signal is 3
When the value indicates the cycle, three bits (Y [5], Y [4], Y [3]) of the third group G2 shown in FIG.
When the operation cycle signal reaches a value indicating the fourth cycle, the three bits (Y [7], Y [6]) of the fourth group G3 shown in FIG.
, Y [5]).

【0012】そして更に、この繰り返し乗算器J1は、
乗数ビット選択回路104からの3ビットの出力と被乗
数保持回路100に保持されている8ビットの被乗数X
とから、2次のブースのアルゴリズムに基づき9ビット
の部分積を生成して出力する部分積発生回路106と、
入力される7ビットデータを2ビット符号拡張して(つ
まり、データの最上位ビット側にその最上位ビットと同
じビットを2ビット追加して)出力する符号拡張器10
8と、符号拡張器108からの9ビットデータと部分積
発生回路106からの9ビットの部分積とを加算する加
算器110と、加算器110から出力される9ビットデ
ータの上位7ビットを演算サイクル信号の変化に同期し
て保持すると共に、自己が保持している7ビットデータ
を符号拡張器108に供給する中間和保持回路112
と、加算器110から出力される9ビットデータの下位
2ビットを演算サイクル信号の変化に同期して保持する
シフトレジスタ114とを備えている。
Further, this repetitive multiplier J1
The 3-bit output from the multiplier bit selection circuit 104 and the 8-bit multiplicand X held in the multiplicand holding circuit 100
A partial product generation circuit 106 for generating and outputting a 9-bit partial product based on the secondary Booth algorithm;
Sign extender 10 that performs 2-bit sign extension on input 7-bit data (that is, adds 2 bits the same as the most significant bit to the most significant bit side of the data) and outputs it
8, an adder 110 that adds 9-bit data from the sign extender 108 and a 9-bit partial product from the partial product generation circuit 106, and calculates the upper 7 bits of the 9-bit data output from the adder 110 An intermediate sum holding circuit 112 that holds the 7-bit data held by itself and supplies it to the sign extender 108 while holding the data in synchronization with the change of the cycle signal.
And a shift register 114 that holds the lower 2 bits of the 9-bit data output from the adder 110 in synchronization with a change in the operation cycle signal.

【0013】尚、例えば、演算サイクル信号は所定のク
ロックの立ち上がりタイミングで値が順次変化し、中間
和保持回路112とシフトレジスタ114は、演算サイ
クル信号の値が変化してからクロックが立ち下がったタ
イミング(つまり、演算サイクル信号の変化に対してク
ロックの半周期分ずれたタイミング)でデータの保持動
作を行う。また、中間和保持回路112とシフトレジス
タ114は、演算サイクル信号が1サイクル目を示す値
になる直前に初期化されて、その保持内容(即ち、保持
するデータのビット)が全て“0”になる。
For example, the value of the operation cycle signal sequentially changes at a predetermined clock rising timing, and the clock of the intermediate sum holding circuit 112 and the shift register 114 falls after the value of the operation cycle signal changes. The data holding operation is performed at a timing (that is, a timing shifted by a half cycle of the clock with respect to the change of the operation cycle signal). Further, the intermediate sum holding circuit 112 and the shift register 114 are initialized immediately before the operation cycle signal becomes a value indicating the first cycle, and the held contents (that is, the bits of the held data) are all set to “0”. Become.

【0014】このように構成された繰り返し乗算器J1
は、以下のように動作する。まず、演算の1サイクル目
(即ち、演算サイクル信号が1サイクル目を示す値にな
った場合)には、乗数ビット選択回路104から、乗数
保持回路102に保持されている乗数Yを構成するビッ
トの一部として、図9に示す第1グループG0 の3ビッ
ト(Y[1] ,Y[0] ,Y[-1])が出力され、更に、部分
積発生回路106により、図10のに示す如く、上記
第1グループG0 の3ビットと被乗数保持回路100に
保持されいてる被乗数Xとから9ビットの第1部分積B
0 が生成されて出力される。そして、図11の上から3
段目〜5段目に示すように、中間和保持回路112の初
期値(即ち、全ビットが“0”の7ビットデータ)を符
号拡張器108にて2ビット符号拡張した全ビットが
“0”の9ビットデータと、部分積発生回路106から
の9ビットの第1部分積B0 とが、加算器110によっ
て加算され、更に、その加算器110の加算結果である
9ビットデータのうちの上位7ビットが中間和保持回路
112に保持される。また、加算器110の加算結果で
ある9ビットデータのうちの下位2ビット(図11にお
ける「中間和1」の段の「◎」印の2ビット)が、シフ
トレジスタ114の上位2ビット位置に保持される。
The repetitive multiplier J1 constructed as described above
Works as follows. First, in the first cycle of the operation (that is, when the operation cycle signal has a value indicating the first cycle), the multiplier bit selection circuit 104 outputs the bits constituting the multiplier Y held in the multiplier holding circuit 102. 10 are output as a part of the first group G0 shown in FIG. 9 (Y [1], Y [0], Y [-1]). As shown, a 9-bit first partial product B is obtained from the 3 bits of the first group G0 and the multiplicand X held in the multiplicand holding circuit 100.
0 is generated and output. Then, from the top of FIG.
As shown in the fifth to fifth stages, the initial value of the intermediate sum holding circuit 112 (that is, 7-bit data in which all bits are “0”) is 2-bit sign-extended by the sign extender 108 to “0”. 9-bit data and the 9-bit first partial product B0 from the partial product generation circuit 106 are added by the adder 110, and the higher-order 9-bit data of the addition result of the adder 110 is added. Seven bits are held in the intermediate sum holding circuit 112. Also, the lower 2 bits (2 bits indicated by “◎” in the “intermediate sum 1” stage in FIG. 11) of the 9-bit data that is the addition result of the adder 110 are Will be retained.

【0015】次に、演算の2サイクル目(即ち、演算サ
イクル信号が2サイクル目を示す値になった場合)に
は、乗数ビット選択回路104から、乗数保持回路10
2に保持されている乗数Yを構成するビットの一部とし
て、図9に示す第2グループG1 の3ビット(Y[3] ,
Y[2] ,Y[1] )が出力され、更に、部分積発生回路1
06により、図10のに示す如く、上記第2グループ
G1 の3ビットと被乗数保持回路100に保持されいて
る被乗数Xとから9ビットの第2部分積B1 が生成され
て出力される。そして、図11の上から5段目〜7段目
に示すように、中間和保持回路112に保持されている
7ビットデータを符号拡張器108にて2ビット(図1
1における「中間和1」の段の「□」印の2ビット)符
号拡張した9ビットデータと、部分積発生回路106か
らの9ビットの第2部分積B1 とが、加算器110によ
って加算され、更に、その加算器110の加算結果であ
る9ビットデータのうちの上位7ビットが中間和保持回
路112に更新して保持される。また、シフトレジスタ
114が2ビット下位ビット側へシフト(右シフト)さ
れ、加算器110の加算結果である9ビットデータのう
ちの下位2ビット(図11における「中間和2」の段の
「◎」印の4ビットのうちの上位2ビット)が、シフト
レジスタ114の上位2ビット位置に保持される。この
結果、図11における「中間和2」の段の「◎」印の4
ビットが、シフトレジスタ114に保持されることとな
る。
Next, in the second cycle of the operation (that is, when the operation cycle signal becomes a value indicating the second cycle), the multiplier bit selection circuit 104
As a part of the bits forming the multiplier Y held in 2, the three bits (Y [3], Y [3],
Y [2], Y [1]) are output, and the partial product generation circuit 1
In step 06, as shown in FIG. 10, a 9-bit second partial product B1 is generated and output from the 3 bits of the second group G1 and the multiplicand X held in the multiplicand holding circuit 100. Then, as shown in the fifth to seventh stages from the top in FIG. 11, the sign extender 108 converts the 7-bit data held in the intermediate sum holding circuit 112 into two bits (FIG. 1).
The two 9-bit sign-extended 9-bit data of the "intermediate sum 1" stage in FIG. 1 and the 9-bit second partial product B1 from the partial product generating circuit 106 are added by the adder 110. Further, the upper 7 bits of the 9-bit data as the addition result of the adder 110 are updated and held in the intermediate sum holding circuit 112. Further, the shift register 114 is shifted to the lower 2 bits by 2 bits (right shift), and the lower 2 bits of the 9-bit data that is the addition result of the adder 110 ("◎" in the "intermediate sum 2" stage in FIG. 11). The upper 2 bits of the 4 bits marked with “” are held in the upper 2 bit positions of the shift register 114. As a result, the “◎” mark 4 in the “intermediate sum 2” stage in FIG.
The bit will be held in the shift register 114.

【0016】そして、図11の上から7段目〜9段目及
び9段目〜11段目に示すように、演算の3サイクル目
と4サイクル目も同様に実行され、その結果、被乗数X
と乗数Yとの積を表す15ビットデータのうち、上位7
ビットが中間和保持回路112に保持され、下位8ビッ
ト(図11における「積」の段の「◎」印の8ビット)
がシフトレジスタ114に保持されて、乗算が終了す
る。
Then, as shown in the seventh to ninth stages and the ninth to eleventh stages from the top in FIG. 11, the third and fourth cycles of the operation are similarly executed, and as a result, the multiplicand X
Of the 15-bit data representing the product of
The bit is held in the intermediate sum holding circuit 112, and the lower 8 bits (8 bits indicated by “◎” in the “product” stage in FIG. 11)
Is held in the shift register 114, and the multiplication ends.

【0017】一方、ブースのアルゴリズムを用いた乗算
は、符号付きの2の補数表示形式の乗算(符号付き乗
算)を前提とするものであるため、そのままでは符号無
し乗算(即ち、絶対値表示の2進数の乗算)を行うこと
ができない。このため、2次のブースのアルゴリズムを
用いて、符号付き乗算と符号無し乗算とを共通のハード
ウエアで択一的に行うためには、入力される被乗数Xと
乗数Yを、以下に説明するように少なくとも1ビット拡
張して取り扱う。尚、ここでは、8ビット×8ビットの
乗算を行う場合を例に挙げて説明する。
On the other hand, since the multiplication using the Booth algorithm is based on multiplication in signed two's complement notation (signed multiplication), unsigned multiplication (that is, absolute value notation) is performed as it is. Binary multiplication) cannot be performed. Therefore, in order to selectively perform signed multiplication and unsigned multiplication using common hardware using the second-order Booth algorithm, input multiplicand X and multiplier Y will be described below. Is extended by at least one bit. Here, a case of performing multiplication of 8 bits × 8 bits will be described as an example.

【0018】まず、符号無し乗算を行う場合には、8ビ
ットの被乗数Xと乗数Yの最上位ビットX[7] ,Y[7]
が符号ビットではないため、その被乗数Xと乗数Yの各
々の最上位ビットX[7] ,Y[7] よりも上位側に、正を
示す“0”のビットを少なくとも1ビット追加して(即
ち、被乗数Xと乗数Yの各々を少なくとも1ビット0拡
張して)、被乗数Xと乗数Yを符号付き数として取り扱
う。また、符号付き乗算を行う場合には、元々、被乗数
Xと乗数Yの最上位ビットX[7] ,Y[7] は符号ビット
であるが、その最上位ビットX[7] ,Y[7] よりも上位
側に、更にその最上位ビットX[7] ,Y[7] と同じ値の
ビットを少なくとも1ビット追加する(即ち、被乗数X
と乗数Yの各々を最上位ビットで少なくとも1ビット符
号拡張する)。これは、共通のハードウェアで符号付き
乗算と符号無し乗算を行うためである。
First, when performing unsigned multiplication, the most significant bits X [7] and Y [7] of the 8-bit multiplicand X and the multiplier Y
Is not a sign bit, and at least one bit of positive “0” is added above the most significant bits X [7] and Y [7] of each of the multiplicand X and the multiplier Y ( That is, each of the multiplicand X and the multiplier Y is extended by at least one bit 0), and the multiplicand X and the multiplier Y are treated as signed numbers. When signed multiplication is performed, the most significant bits X [7] and Y [7] of the multiplicand X and the multiplier Y are originally sign bits, but the most significant bits X [7] and Y [7]. , And at least one bit having the same value as the most significant bits X [7] and Y [7] is added (ie, the multiplicand X
And each of the multipliers Y is sign-extended by at least one bit with the most significant bit). This is because signed multiplication and unsigned multiplication are performed by common hardware.

【0019】そして、上記のように少なくとも1ビット
拡張した被乗数Xと乗数Yについて、図8と同様の手順
で乗算を行えば良い。例として、図12に、8ビット×
8ビットの符号付き乗算と符号無し乗算とを切り替えて
行う場合の実行例を示す。この例の場合、「△」印で示
すように、符号付き乗算を行う場合には、被乗数Xと乗
数Yの各々が最上位ビットで1ビット符号拡張され、符
号無し乗算を行う場合には、被乗数Xと乗数Yの各々が
1ビット0拡張される。そして、1ビット拡張された9
ビットの乗数Yを構成するビットが、図9に示した状態
と同様に5つのグループに分けられ、その各グループに
対応して5つの部分積B0 〜B4 が生成される。そして
更に、その5つの各部分積B0 〜B4 が、2ビットずつ
シフトして累積加算されることにより、被乗数Xと乗数
Yとの積を表す16ビットのデータが得られる。
Then, the multiplicand X and the multiplier Y extended by at least one bit as described above may be multiplied in the same procedure as in FIG. As an example, FIG.
An execution example in the case of switching between 8-bit signed multiplication and unsigned multiplication will be described. In the case of this example, as shown by the “△” mark, when performing signed multiplication, each of the multiplicand X and the multiplier Y is one-bit sign-extended with the most significant bit, and when performing unsigned multiplication, Each of the multiplicand X and the multiplier Y is extended by one bit 0. And 9 which is extended by 1 bit
The bits forming the multiplier Y of the bits are divided into five groups as in the state shown in FIG. 9, and five partial products B0 to B4 are generated corresponding to each group. Further, the five partial products B0 to B4 are shifted by 2 bits and cumulatively added, thereby obtaining 16-bit data representing the product of the multiplicand X and the multiplier Y.

【0020】但し、この場合、1ビット拡張された乗数
Yを構成するビットのうちの最上位側のビットのグルー
プ(第5グループ)に対応する第5部分積B4 は、符号
無し乗算の場合で且つ元の乗数Yの最上位ビットY[7]
が“1”である場合にのみ「+X」となり、それ以外の
場合には、「0」となる。
However, in this case, the fifth partial product B4 corresponding to the group of the most significant bit (fifth group) among the bits constituting the multiplier Y extended by 1 bit is an unsigned multiplication. And the most significant bit Y [7] of the original multiplier Y
Is "+ X" only when is "1", otherwise it is "0".

【0021】即ち、まず、符号無し乗算の場合には、1
ビット拡張した乗数Yの最上位ビット(Y[8] )が
“0”となるが、それより上位のビット(Y[9])も
“0”と見なすことができるため、1ビット拡張した乗
数Yの3ビットずつのグループのうちで、図9における
第4グループG3 よりも1つ上位の第5グループG4
(Y[9] ,Y[8] ,Y[7] )のビットの並びは、「0,
0,0」か「0,0,1」になる。このため、第5部分
積B4 は、元の乗数Yの最上位ビットY[7] が“1”で
ある場合に「+X」となり、上記最上位ビットY[7] が
“0”である場合に「0」となる(図7参照)。また、
符号付き乗算の場合には、1ビット拡張した乗数Yの上
位2ビット(Y[8] ,Y[7] )が、元の乗数Yの最上位
ビットY[7] と同じ値になるが、それより上位のビット
(Y[9] )も元の乗数Yの最上位ビットY[7] と同じ値
と見なすことができる。このため、1ビット拡張した乗
数Yの上記第5グループG4 (Y[9] ,Y[8] ,Y[7]
)のビットの並びは、「0,0,0」か「1,1,
1」になり、第5部分積B4 は常に「0」となる(図7
参照)。よって、第5部分積B4 は、符号無し乗算の場
合で且つ元の乗数Yの最上位ビットY[7] が“1”であ
る場合にのみ「+X」となり、それ以外の場合には
「0」となるのである。
That is, first, in the case of unsigned multiplication, 1
Although the most significant bit (Y [8]) of the bit-expanded multiplier Y becomes “0”, the higher bit (Y [9]) can be regarded as “0”, so that the bit-expanded multiplier 1 Among the groups of three bits of Y, the fifth group G4, which is one level higher than the fourth group G3 in FIG.
The bit arrangement of (Y [9], Y [8], Y [7]) is "0,
0,0 "or" 0,0,1 ". Therefore, the fifth partial product B4 becomes "+ X" when the most significant bit Y [7] of the original multiplier Y is "1", and when the most significant bit Y [7] is "0". Becomes "0" (see FIG. 7). Also,
In the case of signed multiplication, the upper two bits (Y [8], Y [7]) of the multiplier Y extended by 1 bit have the same value as the most significant bit Y [7] of the original multiplier Y, The higher-order bits (Y [9]) can be regarded as having the same value as the most significant bit Y [7] of the original multiplier Y. Therefore, the fifth group G4 (Y [9], Y [8], Y [7]) of the multiplier Y extended by 1 bit
) Is "0,0,0" or "1,1,
1 ", and the fifth partial product B4 is always" 0 "(FIG. 7).
reference). Therefore, the fifth partial product B4 becomes "+ X" only in the case of unsigned multiplication and when the most significant bit Y [7] of the original multiplier Y is "1", and in other cases, it becomes "0". It becomes.

【0022】尚、図12においても図8と同様に、部分
積B0 〜B4 の各ビットを「○」印と「●」印で示し、
また、「□」印は、加算時の桁合わせに必要となる符号
拡張ビットを示している。つまり、第1部分積B0 〜第
4部分積B3 については、図12にて「●」印と「○」
印で示した10ビット(=9+1)が必須となり、加算
時において各部分積B0 〜B3 の最上位ビットのビット
位置を一致させるために、上記「□」印で示す符号拡張
ビットが付加される。また、この例の場合、第5部分積
B4 については、「○」印のみで示した8ビットが必須
となる。
In FIG. 12, similarly to FIG. 8, each bit of the partial products B0 to B4 is indicated by "O" and "●".
Also, “□” indicates sign extension bits required for digit alignment at the time of addition. In other words, regarding the first partial product B0 to the fourth partial product B3, in FIG.
The 10 bits (= 9 + 1) indicated by the mark are essential, and the sign extension bits indicated by the "□" mark are added in order to match the bit positions of the most significant bits of the partial products B0 to B3 during addition. . In the case of this example, for the fifth partial product B4, 8 bits indicated only by the mark "O" are indispensable.

【0023】以上の内容を踏まえると、例えば、2次の
ブースのアルゴリズムを用いて8ビット×8ビットの符
号付き乗算と符号無し乗算とを択一的に実行する繰り返
し乗算器(以下、「符号付き/無し繰り返し乗算器」と
いう)は、図13のように構成され、その乗算動作は図
14のようになる。
In view of the above, for example, an iterative multiplier (hereinafter, referred to as a “signature multiplier”) that alternatively executes a signed multiplication and an unsigned multiplication of 8 bits × 8 bits using a second-order Booth algorithm. The "multiplier with / without" is configured as shown in FIG. 13, and the multiplication operation is as shown in FIG.

【0024】即ち、まず図13に示すように、この符号
付き/無し繰り返し乗算器J2には、8ビットの被乗数
Xと乗数Yが入力されると共に、演算の1サイクル目,
2サイクル目,…といった具合に演算のサイクル数を示
す演算サイクル信号が第1制御線L1 を介して入力され
る。また更に、当該乗算器J2が行う乗算の種類を符号
付き乗算と符号無し乗算との何れかに設定するための切
替信号が第2制御線L2 を介して入力される。
That is, as shown in FIG. 13, an 8-bit multiplicand X and a multiplier Y are input to the signed / unsigned repetition multiplier J2, and the first cycle of the operation is performed.
In the second cycle,..., An operation cycle signal indicating the number of operation cycles is input via the first control line L1. Further, a switching signal for setting the type of multiplication performed by the multiplier J2 to either signed multiplication or unsigned multiplication is input via the second control line L2.

【0025】そして、この符号付き/無し繰り返し乗算
器J2は、外部から入力される8ビットの被乗数Xを、
第1制御線L1 からの演算サイクル信号が1サイクル目
を示す値になったタイミング(或いは、その直前のタイ
ミング)で保持する被乗数保持回路200と、第2制御
線L2 からの切替信号が符号付き乗算の実行を示す場合
に、被乗数保持回路200に保持されている被乗数Xを
1ビット符号拡張して出力し、逆に上記切替信号が符号
無し乗算の実行を示す場合には、被乗数保持回路200
に保持されている被乗数Xを1ビット0拡張して出力す
るビット拡張器202と、第2制御線L2 からの切替信
号が符号付き乗算の実行を示す場合に、外部から入力さ
れる8ビットの乗数Yを1ビット符号拡張して出力し、
逆に上記切替信号が符号無し乗算の実行を示す場合に
は、外部から入力される8ビットの乗数Yを1ビット0
拡張して出力するビット拡張器204と、そのビット拡
張器204から出力される9ビットの乗数Y(1ビット
拡張後の乗数Y)を、第1制御線L1 からの演算サイク
ル信号が1サイクル目を示す値になったタイミング(或
いは、その直前のタイミング)で保持する乗数保持回路
206と、第1制御線L1 からの演算サイクル信号の変
化に同期して、乗数保持回路206に保持されている9
ビットの乗数Yを構成するビットのうちで図9に示す各
グループG0 〜G3 の何れかの3ビットを下位のものか
ら順番に選択して出力する乗数ビット選択回路208と
を備えている。尚、乗数ビット選択回路208は、図1
0の乗数ビット選択回路104と同様に動作する。
The signed / unsigned repetitive multiplier J2 converts an 8-bit multiplicand X input from the outside into
The multiplicand holding circuit 200 which holds the operation cycle signal from the first control line L1 at the timing (or the immediately preceding timing) at which the value indicates the first cycle, and the switching signal from the second control line L2 are signed When the execution of the multiplication is indicated, the multiplicand X held in the multiplicand holding circuit 200 is sign-extended by 1 bit and output, and when the switching signal indicates the execution of the unsigned multiplication, the multiplicand holding circuit 200 is output.
And a bit extender 202 that extends the multiplicand X stored in the bit line by one bit 0 and outputs the result. When the switching signal from the second control line L2 indicates the execution of signed multiplication, an externally input 8-bit The multiplier Y is sign-extended by 1 bit and output,
Conversely, if the switching signal indicates the execution of unsigned multiplication, the externally input 8-bit multiplier Y is set to 1 bit 0
A bit extender 204 that expands and outputs, and a 9-bit multiplier Y (multiplier Y after 1-bit expansion) output from the bit expander 204 are converted into a first cycle by an operation cycle signal from the first control line L1. Is held by the multiplier holding circuit 206 at the timing (or the immediately preceding timing) at which the value indicates the value, and the multiplier holding circuit 206 synchronizes with the change of the operation cycle signal from the first control line L1. 9
A multiplier bit selection circuit 208 for selecting and outputting one of the three bits of each of the groups G0 to G3 shown in FIG. It should be noted that the multiplier bit selection circuit 208 corresponds to FIG.
The operation is the same as that of the multiplier bit selection circuit 104.

【0026】また更に、この符号付き/無し繰り返し乗
算器J2は、乗数ビット選択回路208からの3ビット
の出力とビット拡張器202から出力される9ビットの
被乗数X(1ビット拡張後の被乗数X)とから、2次の
ブースのアルゴリズムに基づき10ビットの部分積を生
成して出力する部分積発生回路210と、第2制御線L
2 からの切替信号が符号無し乗算の実行を示し且つ乗数
保持回路206に保持されている9ビットの乗数Yにて
最下位ビットから数えて8ビット目(即ち、外部から入
力される元の乗数Yの最上位ビット)Y[7] が“1”で
ある場合に、第1制御線L1 からの演算サイクル信号が
4サイクル目を示す値になったタイミングにて、被乗数
保持回路200に保持されている8ビットの被乗数Xを
第5部分積B4 として出力し、それ以外の場合には、全
ビットが“0”の8ビットデータを第5部分積B4 とし
て出力する最終部分積発生回路212とを備えている。
Further, the signed / unsigned repetitive multiplier J2 includes a 3-bit output from the multiplier bit selection circuit 208 and a 9-bit multiplicand X (one-bit expanded multiplicand X) output from the bit expander 202. ), A partial product generating circuit 210 for generating and outputting a 10-bit partial product based on the secondary Booth algorithm, and a second control line L
2 indicates the execution of unsigned multiplication, and the 9-bit multiplier Y held in the multiplier holding circuit 206 is the eighth bit counted from the least significant bit (ie, the original multiplier input from the outside). When the most significant bit Y [7] of Y is "1", the multiplicand holding circuit 200 holds the operation cycle signal at the timing when the operation cycle signal from the first control line L1 becomes a value indicating the fourth cycle. A final partial product generation circuit 212 which outputs the 8-bit multiplicand X as the fifth partial product B4, and otherwise outputs 8-bit data in which all bits are "0" as the fifth partial product B4. It has.

【0027】そして更に、この符号付き/無し繰り返し
乗算器J2は、入力される8ビットデータを2ビット符
号拡張して出力する符号拡張器214と、符号拡張器2
14からの10ビットデータと部分積発生回路210か
らの10ビットの部分積とを加算する加算器216と、
加算器216から出力される10ビットデータの上位8
ビットを演算サイクル信号の変化に同期して保持すると
共に、自己が保持している8ビットデータを符号拡張器
214に供給する中間和保持回路218と、加算器21
6から出力される10ビットデータの下位2ビットを演
算サイクル信号の変化に同期して保持するシフトレジス
タ220と、加算器216から出力される10ビットデ
ータの上位8ビットと最終部分積発生回路212の出力
とを加算する加算器222と、その加算器222から出
力される8ビットデータを演算サイクル信号の変化に同
期して保持する積上位ビットレジスタ224とを備えて
いる。
Further, the signed / unsigned repetitive multiplier J2 is provided with a sign extender 214 for extending the input 8-bit data by 2-bit sign extension and outputting, and a sign extender 2
An adder 216 for adding the 10-bit data from 14 and the 10-bit partial product from the partial product generation circuit 210;
Top 8 of 10-bit data output from adder 216
An intermediate sum holding circuit 218 that holds the bits in synchronization with the change of the operation cycle signal and supplies the 8-bit data held by itself to the sign extender 214;
6, a shift register 220 for holding the lower 2 bits of the 10-bit data output from the adder 216 in synchronization with the change of the operation cycle signal, and the upper 8 bits of the 10-bit data output from the adder 216 , And a product upper bit register 224 that holds 8-bit data output from the adder 222 in synchronization with a change in the operation cycle signal.

【0028】尚、この符号付き/無し繰り返し乗算器J
2においても、例えば、演算サイクル信号は所定のクロ
ックの立ち上がりタイミングで値が順次変化し、中間和
保持回路218とシフトレジスタ220及び積上位ビッ
トレジスタ224は、演算サイクル信号の値が変化して
からクロックが立ち下がったタイミングでデータの保持
動作を行う。また、中間和保持回路218,シフトレジ
スタ220,及び積上位ビットレジスタ224は、演算
サイクル信号が1サイクル目を示す値になる直前に初期
化されて、保持するデータのビットが全て“0”にな
る。一方、積上位ビットレジスタ224は、演算サイク
ル信号が4サイクル目を示す値になった場合にのみデー
タの保持動作を行うようにしても良い。
The signed / unsigned repetition multiplier J
Also in 2, for example, the value of the operation cycle signal changes sequentially at a predetermined clock rising timing, and the intermediate sum holding circuit 218, the shift register 220, and the product upper bit register 224 change the value of the operation cycle signal after the change. The data holding operation is performed at the timing when the clock falls. Further, the intermediate sum holding circuit 218, the shift register 220, and the product upper bit register 224 are initialized immediately before the operation cycle signal becomes a value indicating the first cycle, and all the bits of the held data are set to “0”. Become. On the other hand, the product upper bit register 224 may perform the data holding operation only when the operation cycle signal becomes a value indicating the fourth cycle.

【0029】このように構成された符号付き/無し繰り
返し乗算器J2は、以下のように動作する。まず、符号
付き演算の場合(即ち、切替信号が符号付き乗算の実行
を示す場合)には、8ビットの被乗数Xを1ビット符号
拡張した9ビットの被乗数Xがビット拡張器202から
出力されると共に、8ビットの乗数Yを1ビット符号拡
張した9ビットの乗数Yが乗数保持回路206から出力
される。また逆に、符号無し演算の場合(即ち、切替信
号が符号無し乗算の実行を示す場合)には、8ビットの
被乗数Xを1ビット0拡張した9ビットの被乗数Xがビ
ット拡張器202から出力されると共に、8ビットの乗
数Yを1ビット0拡張した9ビットの乗数Yが乗数保持
回路206から出力される。
The signed / unsigned repetitive multiplier J2 configured as described above operates as follows. First, in the case of signed operation (that is, when the switching signal indicates the execution of signed multiplication), the 9-bit multiplicand X obtained by sign-extending the 8-bit multiplicand X by 1 bit is output from the bit extender 202. At the same time, a 9-bit multiplier Y obtained by sign-extending the 8-bit multiplier Y by 1 bit is output from the multiplier holding circuit 206. Conversely, in the case of unsigned operation (that is, when the switching signal indicates the execution of unsigned multiplication), the 9-bit multiplicand X obtained by extending the 8-bit multiplicand X by 1 bit 0 is output from the bit expander 202. At the same time, a 9-bit multiplier Y obtained by extending the 8-bit multiplier Y by 1 bit 0 is output from the multiplier holding circuit 206.

【0030】そして、演算の1サイクル目(即ち、演算
サイクル信号が1サイクル目を示す値になった場合)に
は、乗数ビット選択回路208から、乗数保持回路20
6に保持されている9ビットの乗数Yを構成するビット
の一部として、図9に示す第1グループG0 の3ビット
(Y[1] ,Y[0] ,Y[-1])が出力され、更に、部分積
発生回路210により、図13のに示す如く、上記第
1グループG0 の3ビットとビット拡張器202から出
力される9ビットの被乗数Xとから、10ビットの第1
部分積B0 が生成されて出力される。そして更に、図1
4の上から3段目〜5段目に示すように、中間和保持回
路218の初期値(即ち、全ビットが“0”の8ビット
データ)を符号拡張器214にて2ビット符号拡張した
全ビットが“0”の10ビットデータと、部分積発生回
路210からの10ビットの第1部分積B0 とが、加算
器216によって加算され、更に、その加算器216の
加算結果である10ビットデータのうちの上位8ビット
が中間和保持回路218に保持される。また、加算器2
16の加算結果である10ビットデータのうちの下位2
ビット(図14における「中間和1」の段の「◎」印の
2ビット)が、シフトレジスタ220の上位2ビット位
置に保持される。
Then, in the first cycle of the operation (that is, when the operation cycle signal has a value indicating the first cycle), the multiplier bit selection circuit 208 sends the multiplier holding circuit 20
As a part of the bits constituting the 9-bit multiplier Y held in 6, three bits (Y [1], Y [0], Y [-1]) of the first group G0 shown in FIG. 9 are output. Further, as shown in FIG. 13, the partial product generation circuit 210 calculates the 10-bit first multiplicand X from the 3 bits of the first group G0 and the 9-bit multiplicand X output from the bit expander 202.
A partial product B0 is generated and output. And further, FIG.
As shown in the third to fifth stages from the top of FIG. 4, the initial value of the intermediate sum holding circuit 218 (that is, 8-bit data in which all bits are “0”) is 2-bit sign-extended by the sign extender 214. The adder 216 adds the 10-bit data in which all the bits are “0” and the 10-bit first partial product B0 from the partial product generation circuit 210, and further adds the 10-bit result of the adder 216. The upper 8 bits of the data are held in the intermediate sum holding circuit 218. Adder 2
Lower 2 bits of 10-bit data that is the result of adding 16
The bits (two bits marked with “◎” at the stage of “intermediate sum 1” in FIG. 14) are held in the upper two bit positions of the shift register 220.

【0031】次に、演算の2サイクル目(即ち、演算サ
イクル信号が2サイクル目を示す値になった場合)に
は、乗数ビット選択回路208から、乗数保持回路20
6に保持されている9ビットの乗数Yを構成するビット
の一部として、図9に示す第2グループG1 の3ビット
(Y[3] ,Y[2] ,Y[1] )が出力され、更に、部分積
発生回路210により、図13のに示す如く、上記第
2グループG1 の3ビットとビット拡張器202から出
力される9ビットの被乗数Xとから、10ビットの第2
部分積B1 が生成されて出力される。そして、図14の
上から5段目〜7段目に示すように、中間和保持回路2
18に保持されている8ビットデータを符号拡張器21
4にて2ビット(図14における「中間和1」の段の
「□」印の2ビット)符号拡張した10ビットデータ
と、部分積発生回路210からの10ビットの第2部分
積B1 とが、加算器216によって加算され、更に、そ
の加算器216の加算結果である10ビットデータのう
ちの上位8ビットが中間和保持回路218に更新して保
持される。また、シフトレジスタ220が2ビット下位
ビット側へシフト(右シフト)され、加算器216の加
算結果である10ビットデータのうちの下位2ビット
(図14における「中間和2」の段の「◎」印の4ビッ
トのうちの上位2ビット)が、シフトレジスタ220の
上位2ビット位置に保持される。この結果、図14にお
ける「中間和2」の段の「◎」印の4ビットが、シフト
レジスタ220に保持されることとなる。
Next, in the second cycle of the operation (that is, when the operation cycle signal has a value indicating the second cycle), the multiplier bit selection circuit 208 sends the multiplier holding circuit 20
As a part of the bits constituting the 9-bit multiplier Y held in 6, three bits (Y [3], Y [2], Y [1]) of the second group G1 shown in FIG. 9 are output. Further, as shown in FIG. 13, the 10-bit second multiplicand X output from the bit expander 202 is calculated by the partial product generation circuit 210 from the 3 bits of the second group G1.
A partial product B1 is generated and output. Then, as shown in the fifth to seventh stages from the top in FIG.
The eight-bit data held in the code extender 21
The 10-bit data sign-extended by 2 bits at 4 (the 2 bits marked with “□” at the “intermediate sum 1” stage in FIG. 14) and the 10-bit second partial product B 1 from the partial product generation circuit 210 are , And the upper 8 bits of the 10-bit data as the addition result of the adder 216 are updated and held in the intermediate sum holding circuit 218. Also, the shift register 220 is shifted to the lower 2 bits by 2 bits (to the right), and the lower 2 bits of the 10-bit data that is the addition result of the adder 216 (“◎ in the“ intermediate sum 2 ”stage in FIG. 14). The upper two bits of the four bits marked with “” are held in the upper two bit positions of the shift register 220. As a result, four bits marked with “◎” at the stage of “intermediate sum 2” in FIG. 14 are held in the shift register 220.

【0032】そして、図14の上から7段目〜9段目及
び9段目〜11段目に示すように、演算の3サイクル目
と4サイクル目も同様に実行され、その結果、図14に
おける「中間和4」の段の「◎」印の8ビットが、シフ
トレジスタ220に保持されることとなるが、特に演算
の4サイクル目では、図14の上から11段目〜13段
目に示すように、加算器216の加算結果である10ビ
ットデータのうちの上位8ビット(図14における「中
間和4」の段の「○」印の8ビット)と最終部分積発生
回路212から出力される8ビットの第5部分積B4 と
が、加算器222によって加算され、その加算器222
の加算結果である8ビットデータ(図14における
「積」の段の「○」印の8ビット)が積上位ビットレジ
スタ224に保持される。
Then, as shown in the seventh to ninth stages and the ninth to eleventh stages from the top in FIG. 14, the third and fourth cycles of the operation are executed in the same manner. 8 are stored in the shift register 220 in the “intermediate sum 4” stage, and especially in the fourth cycle of the operation, the eleventh to thirteenth stages from the top in FIG. As shown in FIG. 14, the upper 8 bits (8 bits marked with “○” in the “intermediate sum 4” stage in FIG. 14) of the 10-bit data as the addition result of the adder 216 and the final partial product generation circuit 212 The output 8-bit fifth partial product B4 is added by the adder 222, and the adder 222
Is stored in the product upper bit register 224.

【0033】よって、演算の4サイクル目が終了した時
点においては、被乗数Xと乗数Yとの積を表す16ビッ
トデータのうち、上位8ビットが積上位ビットレジスタ
224に保持され、下位8ビットがシフトレジスタ22
0に保持されることとなり、これにより乗算が終了す
る。
Therefore, when the fourth cycle of the operation is completed, the upper 8 bits of the 16-bit data representing the product of the multiplicand X and the multiplier Y are held in the product upper bit register 224, and the lower 8 bits are stored. Shift register 22
This means that the multiplication is completed.

【0034】一方、図15は、2次のブースのアルゴリ
ズムを用いた8ビット×8ビットの符号付き/無し繰り
返し乗算器の他の従来構成を表すブロック図であり、図
16は、図15の符号付き/無し繰り返し乗算器J3の
乗算動作を表す模式図である。
On the other hand, FIG. 15 is a block diagram showing another conventional configuration of an 8-bit × 8-bit signed / unsigned repetition multiplier using the second-order Booth algorithm, and FIG. It is a schematic diagram showing the multiplication operation | movement of the signed / unsigned repetition multiplier J3.

【0035】図15に示すように、この符号付き/無し
繰り返し乗算器J3は、外部から入力される8ビットの
被乗数Xを、第1制御線L1 からの演算サイクル信号が
1サイクル目を示す値になったタイミング(或いは、そ
の直前のタイミング)で保持する被乗数保持回路300
と、第2制御線L2 からの切替信号が符号付き乗算の実
行を示す場合に、被乗数保持回路300に保持されてい
る被乗数Xを2ビット符号拡張して出力し、逆に上記切
替信号が符号無し乗算の実行を示す場合には、被乗数保
持回路300に保持されている被乗数Xを2ビット0拡
張して出力するビット拡張器302と、第2制御線L2
からの切替信号が符号付き乗算の実行を示す場合に、外
部から入力される8ビットの乗数Yを2ビット符号拡張
して出力し、逆に上記切替信号が符号無し乗算の実行を
示す場合には、外部から入力される8ビットの乗数Yを
2ビット0拡張して出力するビット拡張器304と、そ
のビット拡張器304から出力される10ビットの乗数
Y(2ビット拡張後の乗数Y)を、第1制御線L1 から
の演算サイクル信号が1サイクル目を示す値になったタ
イミング(或いは、その直前のタイミング)で保持する
乗数保持回路306とを備えている。
As shown in FIG. 15, the signed / unsigned repetitive multiplier J3 converts an 8-bit multiplicand X input from the outside into a value indicating that the operation cycle signal from the first control line L1 indicates the first cycle. Multiplicand holding circuit 300 holding at the timing (or timing immediately before)
And when the switching signal from the second control line L2 indicates the execution of signed multiplication, the multiplicand X held in the multiplicand holding circuit 300 is sign-extended by 2 bits and output. In the case of indicating the execution of the null multiplication, the bit extender 302 that extends the multiplicand X held in the multiplicand holding circuit 300 by two bits 0 and outputs the result, and the second control line L2
When the switching signal from the indicates execution of signed multiplication, the externally input 8-bit multiplier Y is sign-extended by 2 bits and output, and conversely, when the switching signal indicates execution of unsigned multiplication, Is a bit extender 304 that extends an 8-bit multiplier Y input from the outside by two bits 0 and outputs the same, and a 10-bit multiplier Y output from the bit expander 304 (multiplier Y after 2-bit expansion) At the timing when the operation cycle signal from the first control line L1 reaches the value indicating the first cycle (or the timing immediately before), and a multiplier holding circuit 306.

【0036】そして更に、この符号付き/無し繰り返し
乗算器J3は、第1制御線L1 からの演算サイクル信号
の変化に同期して、乗数保持回路306に保持されてい
る10ビットの乗数Yを構成するビットのうちで図17
に示す各グループG0 〜G4の何れかの3ビットを下位
のものから順番に選択して出力する乗数ビット選択回路
308と、その乗数ビット選択回路308からの3ビッ
トの出力とビット拡張器302から出力される10ビッ
トの被乗数X(2ビット拡張後の被乗数X)とから、2
次のブースのアルゴリズムに基づき10ビットの部分積
を生成して出力する部分積発生回路310と、図13の
符号付き/無し繰り返し乗算器J2に設けられた符号拡
張器214,加算器216,中間和保持回路218,及
びシフトレジスタ220と同様の、符号拡張器314,
加算器316,中間和保持回路318,及びシフトレジ
スタ320とを備えている。尚、シフトレジスタ320
は、10ビットデータを格納可能なものである。
Further, the signed / unsigned repetitive multiplier J3 forms the 10-bit multiplier Y held in the multiplier holding circuit 306 in synchronization with the change of the operation cycle signal from the first control line L1. FIG.
, A multiplier bit selection circuit 308 for selecting and outputting any three bits of each of the groups G0 to G4 in order from the lower one, a 3-bit output from the multiplier bit selection circuit 308 and a bit extender 302. From the output 10-bit multiplicand X (multiplicand X after 2-bit expansion), 2
A partial product generation circuit 310 that generates and outputs a 10-bit partial product based on the next Booth's algorithm, a sign extender 214, an adder 216, and an intermediate A sign extender 314, similar to the sum holding circuit 218 and the shift register 220,
An adder 316, an intermediate sum holding circuit 318, and a shift register 320 are provided. Note that the shift register 320
Is capable of storing 10-bit data.

【0037】ここで、図17における「△」印の2ビッ
トは、ビット拡張器304によって拡張された分の乗数
Yの上位2ビット(Y[9] ,Y[8] )である。そして、
乗数ビット選択回路308は、演算サイクル信号が1サ
イクル目を示す値になると、図17に示す最下位側の第
1グループG0 の3ビット(Y[1] ,Y[0] ,Y[-1]:
但しY[-1]はダミービットで“0”)を出力し、演算サ
イクル信号が2サイクル目を示す値になると、図17に
示す第2グループG1 の3ビット(Y[3] ,Y[2] ,Y
[1] )を出力し、演算サイクル信号が3サイクル目を示
す値になると、図17に示す第3グループG2 の3ビッ
ト(Y[5] ,Y[4] ,Y[3] )を出力し、演算サイクル
信号が4サイクル目を示す値になると、図17に示す第
4グループG3 の3ビット(Y[7] ,Y[6] ,Y[5] )
を出力し、演算サイクル信号が5サイクル目を示す値に
なると、図17に示す第5グループG4 の3ビット(Y
[9] ,Y[8] ,Y[7] )を出力する。
Here, the two bits marked with “△” in FIG. 17 are the upper two bits (Y [9], Y [8]) of the multiplier Y extended by the bit extender 304. And
When the operation cycle signal reaches a value indicating the first cycle, the multiplier bit selection circuit 308 outputs three bits (Y [1], Y [0], Y [-1) of the first group G0 on the lowermost side shown in FIG. ]:
However, Y [-1] is a dummy bit and outputs "0", and when the operation cycle signal becomes a value indicating the second cycle, the three bits (Y [3], Y [3]) of the second group G1 shown in FIG. 2], Y
[1]), and when the operation cycle signal reaches a value indicating the third cycle, the three bits (Y [5], Y [4], Y [3]) of the third group G2 shown in FIG. 17 are output. When the operation cycle signal reaches a value indicating the fourth cycle, the three bits (Y [7], Y [6], Y [5]) of the fourth group G3 shown in FIG.
When the operation cycle signal reaches a value indicating the fifth cycle, three bits (Y
[9], Y [8], Y [7]).

【0038】このように構成された符号付き/無し繰り
返し乗算器J3は、以下のように動作する。まず、符号
付き演算の場合(即ち、切替信号が符号付き乗算の実行
を示す場合)には、8ビットの被乗数Xを2ビット符号
拡張した10ビットの被乗数Xがビット拡張器302か
ら出力されると共に、8ビットの乗数Yを2ビット符号
拡張した10ビットの乗数Yが乗数保持回路306から
出力される。また逆に、符号無し演算の場合(即ち、切
替信号が符号無し乗算の実行を示す場合)には、8ビッ
トの被乗数Xを2ビット0拡張した10ビットの被乗数
Xがビット拡張器302から出力されると共に、8ビッ
トの乗数Yを2ビット0拡張した10ビットの乗数Yが
乗数保持回路306から出力される。
The signed / unsigned repetitive multiplier J3 thus configured operates as follows. First, in the case of signed operation (that is, when the switching signal indicates execution of signed multiplication), a 10-bit multiplicand X obtained by sign-extending an 8-bit multiplicand X by 2 bits is output from the bit extender 302. At the same time, a 10-bit multiplier Y obtained by extending the 8-bit multiplier Y by 2 bits is output from the multiplier holding circuit 306. Conversely, in the case of unsigned operation (ie, when the switching signal indicates the execution of unsigned multiplication), the 10-bit multiplicand X obtained by extending the 8-bit multiplicand X by 2 bits 0 is output from the bit extender 302. At the same time, a 10-bit multiplier Y obtained by extending the 8-bit multiplier Y by 2 bits 0 is output from the multiplier holding circuit 306.

【0039】そして、演算の1サイクル目(即ち、演算
サイクル信号が1サイクル目を示す値になった場合)に
は、乗数ビット選択回路308から、乗数保持回路30
6に保持されている10ビットの乗数Yを構成するビッ
トの一部として、図17に示す第1グループG0 の3ビ
ット(Y[1] ,Y[0] ,Y[-1])が出力され、更に、部
分積発生回路310により、図15のに示す如く、上
記第1グループG0 の3ビットとビット拡張器302か
ら出力される10ビットの被乗数Xとから、10ビット
の第1部分積B0 が生成されて出力される。そして更
に、図16の上から3段目〜5段目に示すように、中間
和保持回路318の初期値(即ち、全ビットが“0”の
8ビットデータ)を符号拡張器314にて2ビット符号
拡張した全ビットが“0”の10ビットデータと、部分
積発生回路310からの10ビットの第1部分積B0 と
が、加算器316によって加算され、更に、その加算器
316の加算結果である10ビットデータのうちの上位
8ビットが中間和保持回路318に保持される。また、
加算器316の加算結果である10ビットデータのうち
の下位2ビット(図16における「中間和1」の段の
「◎」印の2ビット)が、シフトレジスタ320の上位
2ビット位置に保持される。
Then, in the first cycle of the operation (that is, when the operation cycle signal becomes a value indicating the first cycle), the multiplier bit selection circuit 308 sends the multiplier holding circuit 30
As a part of the bits forming the 10-bit multiplier Y held in 6, three bits (Y [1], Y [0], Y [-1]) of the first group G0 shown in FIG. Further, as shown in FIG. 15, the 10-bit first partial product is generated by the partial product generation circuit 310 from the 3 bits of the first group G0 and the 10-bit multiplicand X output from the bit expander 302. B0 is generated and output. Further, as shown in the third to fifth stages from the top in FIG. 16, the initial value of the intermediate sum holding circuit 318 (that is, 8-bit data in which all bits are “0”) is The adder 316 adds the 10-bit data in which all the bits subjected to the bit sign extension are "0" and the 10-bit first partial product B0 from the partial product generation circuit 310, and further adds the addition result of the adder 316. The upper 8 bits of the 10-bit data are held in the intermediate sum holding circuit 318. Also,
The lower 2 bits (2 bits indicated by “◎” in the “intermediate sum 1” stage in FIG. 16) of the 10-bit data that is the addition result of the adder 316 are held in the upper 2 bits of the shift register 320. You.

【0040】次に、演算の2サイクル目(即ち、演算サ
イクル信号が2サイクル目を示す値になった場合)に
は、乗数ビット選択回路308から、乗数保持回路30
6に保持されている10ビットの乗数Yを構成するビッ
トの一部として、図17に示す第2グループG1 の3ビ
ット(Y[3] ,Y[2] ,Y[1] )が出力され、更に、部
分積発生回路310により、図15のに示す如く、上
記第2グループG1 の3ビットとビット拡張器302か
ら出力される10ビットの被乗数Xとから、10ビット
の第2部分積B1 が生成されて出力される。そして、図
16の上から5段目〜7段目に示すように、中間和保持
回路318に保持されている8ビットデータを符号拡張
器314にて2ビット(図16における「中間和1」の
段の「□」印の2ビット)符号拡張した10ビットデー
タと、部分積発生回路310からの10ビットの第2部
分積B1 とが、加算器316によって加算され、更に、
その加算器316の加算結果である10ビットデータの
うちの上位8ビットが中間和保持回路318に更新して
保持される。また、シフトレジスタ320が2ビット下
位ビット側へシフト(右シフト)され、加算器316の
加算結果である10ビットデータのうちの下位2ビット
(図16における「中間和2」の段の「◎」印の4ビッ
トのうちの上位2ビット)が、シフトレジスタ320の
上位2ビット位置に保持される。この結果、図16にお
ける「中間和2」の段の「◎」印の4ビットが、シフト
レジスタ320に保持されることとなる。
Next, in the second cycle of the operation (that is, when the operation cycle signal has a value indicating the second cycle), the multiplier bit selection circuit 308 sends the multiplier holding circuit 30
As a part of the bits forming the 10-bit multiplier Y held in 6, three bits (Y [3], Y [2], Y [1]) of the second group G1 shown in FIG. 17 are output. Further, as shown in FIG. 15, the 10-bit second partial product B1 is obtained from the 3 bits of the second group G1 and the 10-bit multiplicand X output from the bit expander 302, as shown in FIG. Is generated and output. Then, as shown in the fifth to seventh stages from the top in FIG. 16, the 8-bit data held in the intermediate sum holding circuit 318 is converted into two bits by the sign extender 314 (“intermediate sum 1” in FIG. 16). The 2 bit sign-extended (2 bits) sign-extended 10-bit data and the 10-bit second partial product B1 from the partial product generation circuit 310 are added by the adder 316.
The upper 8 bits of the 10-bit data as the addition result of the adder 316 are updated and held in the intermediate sum holding circuit 318. Also, the shift register 320 is shifted to the lower 2 bits (to the right), and the lower 2 bits of the 10-bit data that is the addition result of the adder 316 (“「 in the “intermediate sum 2” stage in FIG. 16). The upper 2 bits of the 4 bits marked with “” are held in the upper 2 bit positions of the shift register 320. As a result, the four bits marked with “◎” in the “intermediate sum 2” stage in FIG. 16 are held in the shift register 320.

【0041】そして、図16の上から7段目〜9段目,
9段目〜11段目,及び11段目〜13段目に示すよう
に、演算の3サイクル目,4サイクル目,及び5サイク
ル目も同様に実行され、その結果、被乗数Xと乗数Yと
の積を表す16ビットデータのうち、上位6ビット(図
16における「積」の段の「○」印の6ビット)が中間
和保持回路318の下位6ビット位置に保持され、下位
10ビット(図16における「積」の段の「◎」印の1
0ビット)がシフトレジスタ320に保持されて、乗算
が終了する。
Then, from the top in FIG.
As shown in the ninth to eleventh stages and the eleventh to thirteenth stages, the third, fourth, and fifth cycles of the operation are similarly executed. As a result, the multiplicand X, the multiplier Y, Of the 16-bit data representing the product of, the upper 6 bits (6 bits marked with “○” in the “product” stage in FIG. 16) are held in the lower 6 bits of the intermediate sum holding circuit 318, and the lower 10 bits ( 1 of “◎” mark of the “product” stage in FIG. 16
0 bit) is held in the shift register 320, and the multiplication ends.

【0042】[0042]

【発明が解決しようとする課題】ところで、図10,図
13,及び図15の各々に示した従来の繰り返し乗算器
J1,J2,J3では、図11,図14,及び図16の
上から3段目〜5段目に示したように、演算の1サイク
ル目において、加算器110,216,316は、中間
和保持回路112,218,318の初期値(全ビット
が“0”のデータ)に第1部分積B0 を加算することと
なる。このため、演算の1サイクル目では、部分積の累
積加算が実質的には行われず、無駄が生じている。
The conventional iterative multipliers J1, J2, and J3 shown in FIGS. 10, 13, and 15, respectively, have three lines from the top in FIG. 11, FIG. 14, and FIG. As shown in the stages from the fifth stage to the fifth stage, in the first cycle of the operation, the adders 110, 216, 316 initialize the intermediate sum holding circuits 112, 218, 318 with initial values (data in which all bits are “0”). Is added to the first partial product B0. For this reason, in the first cycle of the operation, the cumulative addition of the partial products is not substantially performed, resulting in waste.

【0043】特に、符号付き乗算と符号無し乗算とを共
通のハードウエアで択一的に行う構成の場合には、前述
したように、入力される被乗数Xと乗数Yを少なくとも
1ビット拡張(符号拡張又は0拡張)して処理すること
となり、それに伴い、符号付き乗算だけを行う構成の場
合と比較して部分積が1つ余分に生成される。よって、
図11と図16との対比からも分かるように、1つ余分
に生成される部分積(第5部分積B4 )を加算するため
の演算サイクル(図16の5サイクル目)が1サイク
ル余分に必要となり、積を得るまでの演算速度が低下す
るという点で非常に不利である。
In particular, in a configuration in which signed multiplication and unsigned multiplication are selectively performed by common hardware, as described above, the input multiplicand X and multiplier Y are extended by at least one bit (code (Extended or 0-extended), and accordingly, one extra partial product is generated as compared with the configuration in which only signed multiplication is performed. Therefore,
As can be seen from a comparison between FIG. 11 and FIG. 16, an operation cycle (fifth cycle in FIG. 16) for adding a partial product (fifth partial product B4) generated by one extra is added by one cycle. This is very disadvantageous in that the speed of calculation required to obtain the product decreases.

【0044】また、図13に示した符号付き/無し繰り
返し乗算器J2のように、1つ余分に生じる部分積(第
5部分積B4 )だけを加算するための加算器222を追
加して設ければ、演算サイクルを1サイクル減らすこと
ができ、延いては、符号付き乗算だけを行う構成の場合
と同等の演算速度を達成することができるが、加算器は
回路規模が比較的大きいため、IC化した場合のチップ
サイズの面において不利である。
Further, an adder 222 for adding only one extra partial product (fifth partial product B4) is additionally provided as in the signed / unsigned repetitive multiplier J2 shown in FIG. If this is the case, the operation cycle can be reduced by one cycle, and furthermore, the operation speed equivalent to that of the configuration in which only signed multiplication is performed can be achieved. However, since the adder has a relatively large circuit scale, It is disadvantageous in terms of chip size when it is made into an IC.

【0045】本発明は、こうした問題に鑑みなされたも
のであり、比較的小規模な回路構成で演算速度を向上さ
せることのできる繰り返し型の乗算器(反復乗算器)を
提供することを目的としている。
The present invention has been made in view of such a problem, and has as its object to provide a repetitive multiplier (iterative multiplier) that can improve the operation speed with a relatively small circuit configuration. I have.

【0046】[0046]

【課題を解決するための手段、及び発明の効果】上記目
的を達成するためになされた本発明の乗算器において
は、被乗数保持手段が被乗数を保持し、乗数保持手段が
乗数を保持する。
In the multiplier according to the present invention which has been made to achieve the above object, the multiplicand holding means holds the multiplicand, and the multiplier holding means holds the multiplier.

【0047】そして、第1の部分積発生回路が、演算の
サイクル数を示す演算サイクル信号の変化に同期して、
乗数保持手段に保持されている乗数を構成するビットの
うちの最下位側の一部のビットを除く他の一部のビット
を、下位のものから順番に選択すると共に、その選択し
た一部のビットと被乗数保持手段に保持されている被乗
数とから部分積を生成する。
Then, the first partial product generating circuit synchronizes with the change of the operation cycle signal indicating the number of operation cycles,
Among the bits constituting the multiplier held in the multiplier holding means, some of the bits other than some of the least significant bits are selected in order from the lower one, and the selected A partial product is generated from the bit and the multiplicand held in the multiplicand holding means.

【0048】また、第2の部分積発生回路は、演算サイ
クル信号が最初の演算サイクルを示す場合に、乗数保持
手段に保持されている乗数を構成するビットのうちの最
下位側の一部のビットと被乗数保持手段に保持されてい
る被乗数とから、部分積を生成する。
When the operation cycle signal indicates the first operation cycle, the second partial product generation circuit outputs the least significant part of the bits constituting the multiplier held in the multiplier holding means. A partial product is generated from the bit and the multiplicand held in the multiplicand holding means.

【0049】そして、加算手段とその加算手段の加算結
果を保持する加算結果保持手段とを有する部分積累積加
算回路では、加算手段が加算結果保持手段に保持されて
いる値に第1の部分積発生回路によって生成された部分
積を加算すると共に、加算結果保持手段が演算サイクル
信号の変化に同期して加算手段の加算結果を更新して保
持することにより、第1の部分積発生回路によって生成
される部分積を累積加算するが、特に本発明において、
演算サイクル信号が最初の演算サイクルを示す場合に
は、被加数選択回路が、第2の部分発生回路によって生
成された部分積を、加算結果保持手段に保持されている
値に代えて、加算手段に被加数(即ち、第1の部分積発
生回路によって生成された部分積と加算される数)とし
て供給する。
In the partial product accumulative addition circuit having the addition means and the addition result holding means for holding the addition result of the addition means, the addition means adds the first partial product to the value held in the addition result holding means. The partial product generated by the first partial product generation circuit is added by adding the partial products generated by the generation circuit, and the addition result holding means updates and holds the addition result of the addition means in synchronization with the change of the operation cycle signal. Is cumulatively added, particularly in the present invention,
When the operation cycle signal indicates the first operation cycle, the augend selection circuit adds the partial product generated by the second partial generation circuit, instead of the value held in the addition result holding means. It is supplied to the means as an augend (ie, a number that is added to the partial product generated by the first partial product generation circuit).

【0050】このような本発明の乗算器において、演算
サイクル信号が最初の演算サイクルを示す1サイクル目
では、部分積累積加算回路の加算手段が、その時点での
加算結果保持手段の初期値ではなく、第2の部分積発生
回路によって生成された部分積(即ち、乗数の最下位側
の一部のビットに対応した第1部分積)に、第1の部分
積発生回路によって生成された部分積(即ち、乗数の最
下位側の一部のビットより上位の一部のビットに対応し
た部分積)を加算することとなる。
In such a multiplier according to the present invention, in the first cycle in which the operation cycle signal indicates the first operation cycle, the addition means of the partial product accumulative addition circuit uses the initial value of the addition result holding means at that time. Instead, the partial product generated by the second partial product generation circuit (ie, the first partial product corresponding to some of the least significant bits of the multiplier) is added to the partial product generated by the first partial product generation circuit. The products (that is, partial products corresponding to some bits higher than some least significant bits of the multiplier) are added.

【0051】そして、演算サイクル信号が2番目以降の
演算サイクルを示す2サイクル目以降では、従来の乗算
器と同様に、部分積累積加算回路の加算手段は、前回の
演算サイクルで加算結果保持手段に保持された値に第1
の部分積発生回路によって今回生成された部分積を加算
することとなる。
Then, in the second and subsequent cycles in which the operation cycle signal indicates the second and subsequent operation cycles, the addition means of the partial product accumulative addition circuit performs the addition result holding means in the previous operation cycle similarly to the conventional multiplier. To the value held in
The partial products generated this time by the partial product generating circuit are added.

【0052】よって、本発明の繰り返し型の乗算器によ
れば、演算の1サイクル目から、乗数の最下位側の一部
のビットに対応した第1部分積とそれより上位の部分積
とを加算して、従来の乗算器のような1サイクル目の無
駄を無くすことができ、その結果、回路規模が比較的大
きい加算器を追加することなく、積を得るまでの演算速
度を向上させることができる。
Therefore, according to the iterative multiplier of the present invention, from the first cycle of the operation, the first partial product corresponding to some least significant bits of the multiplier and the higher partial product are calculated. Addition can eliminate waste in the first cycle as in a conventional multiplier, and as a result, improve the operation speed until a product is obtained without adding an adder having a relatively large circuit size. Can be.

【0053】ところで、請求項2に記載のように、第1
の部分積発生回路と第2の部分積発生回路とが、2次の
ブースのアルゴリズムに基づいて部分積を生成するよう
に構成すれば、乗数の1ビットずつに対応して部分積を
生成する場合と比較して、乗算に必要な部分積の数を半
減させることができ、積を得るまでの演算速度を向上さ
せるのに非常に有利である。
By the way, as described in claim 2, the first
If the partial product generation circuit and the second partial product generation circuit are configured to generate a partial product based on a secondary Booth algorithm, the partial product is generated corresponding to each bit of the multiplier. Compared with the case, the number of partial products required for multiplication can be reduced by half, which is very advantageous for improving the calculation speed until obtaining the product.

【0054】一方、請求項3に記載の乗算器では、2次
のブースのアルゴリズムを用いた請求項2に記載の乗算
器において、被乗数保持手段は、当該乗算器が行う乗算
の種類を符号付き乗算と符号無し乗算との何れかに設定
するための切替信号が符号付き乗算の実行を示す場合に
は、外部から入力される被乗数を、その最上位ビットで
2ビット符号拡張して保持し、前記切替信号が符号無し
乗算の実行を示す場合には、外部から入力される被乗数
を、その最上位ビット側を2ビット0拡張して保持す
る。そして同様に、乗数保持手段も、前記切替信号が符
号付き乗算の実行を示す場合には、外部から入力される
乗数を、その最上位ビットで2ビット符号拡張して保持
し、前記切替信号が符号無し乗算の実行を示す場合に
は、外部から入力される乗数を、その最上位ビット側を
2ビット0拡張して保持する。
On the other hand, in the multiplier according to the third aspect, the multiplier according to the second aspect uses a second-order Booth's algorithm, and the multiplicand holding means determines whether the type of multiplication performed by the multiplier is signed. When the switching signal for setting to any of the multiplication and the unsigned multiplication indicates execution of signed multiplication, the multiplicand input from the outside is sign-extended by the most significant bit by two bits and held, If the switching signal indicates that unsigned multiplication is to be performed, the multiplicand input from the outside is held by extending the most significant bit side by two bits 0. Similarly, when the switching signal indicates execution of signed multiplication, the multiplier holding means also holds the multiplier input from the outside by sign-extending the most significant bit by two bits, and the switching signal is When the execution of the unsigned multiplication is indicated, the multiplier input from the outside is held by extending the most significant bit side by 2 bits 0.

【0055】そして、このような請求項3に記載の乗算
器によれば、2次のブースのアルゴリズムを用いて、符
号付き乗算と符号無し乗算とを共通のハードウエアで択
一的に行うことができるようになる。そして、この乗算
器の場合には、入力される被乗数と乗数を2ビット拡張
(符号拡張又は0拡張)して処理することとなるため、
符号付き乗算だけを行う構成の場合と比較して部分積が
1つ余分に生成されるが、前述したように演算の1サイ
クル目から部分積の累積加算を行うことができるため、
加算器を特別に追加することなく、従来の符号付き乗算
だけを行う乗算器の場合と同等の演算速度を達成するこ
とができる。つまり、請求項3に記載の乗算器によれ
ば、演算速度を低下させることなく且つ比較的小規模な
回路構成で、符号付き乗算と符号無し乗算とを切り替え
て実行することができる。
According to the multiplier of the third aspect, signed multiplication and unsigned multiplication are selectively performed by common hardware using a second-order Booth algorithm. Will be able to In the case of this multiplier, the input multiplicand and multiplier are extended by 2 bits (sign extension or 0 extension) and processed.
One extra partial product is generated as compared with the configuration in which only signed multiplication is performed. However, since the partial product can be cumulatively added from the first cycle of the operation as described above,
An operation speed equivalent to that of a conventional multiplier that performs only signed multiplication can be achieved without any additional adder. That is, according to the multiplier of the third aspect, signed multiplication and unsigned multiplication can be switched and executed without lowering the operation speed and with a relatively small circuit configuration.

【0056】[0056]

【発明の実施の形態】以下、本発明の一実施形態につい
て、図面を用いて説明する。まず図1は、8ビットの被
乗数Xと乗数Yを入力して符号付き乗算と符号無し乗算
とを択一的に行う第1実施形態の繰り返し乗算器(符号
付き/無し繰り返し乗算器)M1の構成を表すブロック
図であり、図2は、その繰り返し乗算器M1の乗算動作
を表す模式図である。尚、本第1実施形態の繰り返し乗
算器M1においても、演算の1サイクル目,2サイクル
目,…といった具合に演算のサイクル数を示す演算サイ
クル信号が第1制御線L1 を介して入力され、また、当
該乗算器M1が行う乗算の種類を符号付き乗算と符号無
し乗算との何れかに設定するための切替信号が第2制御
線L2 を介して入力される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. First, FIG. 1 shows a repetition multiplier (signed / unsigned repetition multiplier) M1 of the first embodiment that inputs an 8-bit multiplicand X and a multiplier Y and selectively performs signed multiplication and unsigned multiplication. FIG. 2 is a block diagram illustrating a configuration, and FIG. 2 is a schematic diagram illustrating a multiplication operation of the repetitive multiplier M1. In the repetitive multiplier M1 of the first embodiment, an operation cycle signal indicating the number of operation cycles, such as the first cycle, the second cycle,... Of the operation, is input via the first control line L1. In addition, a switching signal for setting the type of multiplication performed by the multiplier M1 to either signed multiplication or unsigned multiplication is input via the second control line L2.

【0057】図1に示す如く、本第1実施形態の繰り返
し乗算器M1は、図15に示した乗算器J3と同様に、
外部から入力される8ビットの被乗数Xを、第1制御線
L1からの演算サイクル信号が1サイクル目を示す値に
なったタイミング(或いは、その直前のタイミング)で
保持する被乗数保持回路10と、第2制御線L2 からの
切替信号が符号付き乗算の実行を示す場合に、被乗数保
持回路10に保持されている被乗数Xを2ビット符号拡
張して出力し、逆に上記切替信号が符号無し乗算の実行
を示す場合には、被乗数保持回路10に保持されている
被乗数Xを2ビット0拡張して出力するビット拡張器1
2と、第2制御線L2 からの切替信号が符号付き乗算の
実行を示す場合に、外部から入力される8ビットの乗数
Yを2ビット符号拡張して出力し、逆に上記切替信号が
符号無し乗算の実行を示す場合には、外部から入力され
る8ビットの乗数Yを2ビット0拡張して出力するビッ
ト拡張器14と、そのビット拡張器14から出力される
10ビットの乗数Y(2ビット拡張後の乗数Y)を、第
1制御線L1 からの演算サイクル信号が1サイクル目を
示す値になったタイミング(或いは、その直前のタイミ
ング)で保持する乗数保持回路16とを備えている。
As shown in FIG. 1, the iterative multiplier M1 of the first embodiment has the same structure as the multiplier J3 shown in FIG.
A multiplicand holding circuit 10 for holding an 8-bit multiplicand X input from the outside at a timing when the operation cycle signal from the first control line L1 has a value indicating the first cycle (or a timing immediately before the same); When the switching signal from the second control line L2 indicates execution of signed multiplication, the multiplicand X held in the multiplicand holding circuit 10 is sign-extended by two bits and output. Is performed, the multiplicand X held in the multiplicand holding circuit 10 is extended by two bits 0 and output.
2 and when the switching signal from the second control line L2 indicates execution of signed multiplication, the 8-bit multiplier Y input from the outside is sign-extended by 2 bits and output. In the case of indicating the execution of the null multiplication, an 8-bit multiplier Y input from the outside is extended by 2 bits by 0 and output, and a 10-bit multiplier Y output from the bit expander 14 ( And a multiplier holding circuit 16 for holding the multiplier Y) after the 2-bit expansion at a timing when the operation cycle signal from the first control line L1 becomes a value indicating the first cycle (or a timing immediately before that). I have.

【0058】また、本第1実施形態の繰り返し乗算器M
1は、乗数保持回路16に保持されている10ビットの
乗数Yを構成するビットのうちで、図3に示す如く最下
位ビットY[0] から4ビット目Y[3] までの4ビットY
[3:0] からなる第1出力と、3ビット目Y[2] から6ビ
ット目Y[5] までの4ビットY[5:2] からなる第2出力
と、5ビット目Y[4] から8ビット目Y[7] までの4ビ
ットY[7:4] からなる第3出力と、7ビット目Y[6] か
ら10ビット目Y[9] までの4ビットY[9:6]からなる
第4出力とを、第1制御線L1 からの演算サイクル信号
の変化に同期して、下位のものから順番に出力する乗数
ビット選択回路18を備えている。
The repetition multiplier M of the first embodiment
1 is a 4-bit Y from the least significant bit Y [0] to the fourth bit Y [3] among bits constituting the 10-bit multiplier Y held in the multiplier holding circuit 16 as shown in FIG.
A first output composed of [3: 0], a second output composed of four bits Y [5: 2] from a third bit Y [2] to a sixth bit Y [5], and a fifth bit Y [4] To the eighth bit Y [7], the third output consisting of four bits Y [7: 4], and the fourth bit Y [9: 6] from the seventh bit Y [6] to the tenth bit Y [9]. And a multiplier bit selection circuit 18 which outputs the fourth output from the first control line L1 in order from the lower one in synchronization with the change of the operation cycle signal from the first control line L1.

【0059】尚、図3における「△」印の2ビットは、
ビット拡張器14によって拡張された分の乗数Yの上位
2ビット(Y[9] ,Y[8] )である。そして、乗数ビッ
ト選択回路18は、演算サイクル信号が1サイクル目を
示す値になると、図3に示す第1出力(Y[3:0] )を出
力し、演算サイクル信号が2サイクル目を示す値になる
と、図3に示す第2出力(Y[5:2] )を出力し、演算サ
イクル信号が3サイクル目を示す値になると、図3に示
す第3出力(Y[7:4] )を出力し、演算サイクル信号が
4サイクル目を示す値になると、図3に示す第4出力
(Y[9:6] )を出力する。
Note that the two bits marked with “△” in FIG.
The upper 2 bits (Y [9], Y [8]) of the multiplier Y extended by the bit extender 14. When the operation cycle signal reaches a value indicating the first cycle, the multiplier bit selection circuit 18 outputs the first output (Y [3: 0]) shown in FIG. 3, and the operation cycle signal indicates the second cycle. When the value reaches the value, the second output (Y [5: 2]) shown in FIG. 3 is output. When the operation cycle signal reaches the value indicating the third cycle, the third output (Y [7: 4]) shown in FIG. ), And when the operation cycle signal reaches a value indicating the fourth cycle, the fourth output (Y [9: 6]) shown in FIG. 3 is output.

【0060】そして、本第1実施形態の繰り返し乗算器
M1は、乗数ビット選択回路18から出力される4ビッ
トのうちの上位3ビットとビット拡張器12から出力さ
れる10ビットの被乗数X(2ビット拡張後の被乗数
X)とから、2次のブースのアルゴリズムに基づき10
ビットの部分積を生成して出力する部分積発生回路20
と、乗数ビット選択回路18から出力される4ビットの
うちの下位2ビットを入力し、その下位2ビットの下位
側に“0”のダミービットを付けた3ビットとビット拡
張器12から出力される10ビットの被乗数Xとから、
2次のブースのアルゴリズムに基づき10ビットの部分
積を生成して出力する部分積発生回路22とを備えてい
る。
The repetitive multiplier M1 of the first embodiment is configured to output the multiplicand X (2) of the upper 3 bits of the 4 bits output from the multiplier bit selection circuit 18 and the 10 bits output from the bit expander 12. From the multiplicand X) after the bit expansion, 10
Partial product generation circuit 20 for generating and outputting a partial product of bits
And the lower two bits of the four bits output from the multiplier bit selection circuit 18, and the three bits obtained by adding a dummy bit of “0” to the lower side of the lower two bits and the output from the bit expander 12. From the 10-bit multiplicand X
A partial product generation circuit 22 for generating and outputting a 10-bit partial product based on a secondary Booth algorithm.

【0061】そして更に、本第1実施形態の繰り返し乗
算器M1は、入力される10ビットデータを2ビット符
号拡張して出力する符号拡張器24と、符号拡張器24
から出力される12ビットデータのうちの上位10ビッ
トと部分積発生回路20からの10ビットの部分積とを
加算する加算器26と、加算器26から出力される10
ビットデータを演算サイクル信号の変化に同期して保持
し出力する中間和保持回路28と、符号拡張器24から
出力される12ビットデータのうちの下位2ビットを演
算サイクル信号の変化に同期して保持するシフトレジス
タ30と、演算サイクル信号が1サイクル目を示す値の
場合に、部分積発生回路22からの10ビットの部分積
を選択して符号拡張器24へ入力させ、それ以外の場合
には、中間和保持回路28からの10ビットデータを選
択して符号拡張器24へ入力させる被加数選択回路32
とを備えている。
Further, the repetition multiplier M1 of the first embodiment includes a sign extender 24 for sign-extending the input 10-bit data by 2 bits and outputting the sign extension, and a sign extender 24.
Adder 26 for adding the upper 10 bits of the 12-bit data output from the above and the 10-bit partial product from partial product generation circuit 20, and 10 output from adder 26.
An intermediate sum holding circuit 28 that holds and outputs bit data in synchronization with a change in the operation cycle signal, and a lower 2 bits of 12-bit data output from the sign extender 24 in synchronization with a change in the operation cycle signal. When the held shift register 30 and the operation cycle signal have a value indicating the first cycle, the 10-bit partial product from the partial product generating circuit 22 is selected and input to the sign extender 24. Is a summand selection circuit 32 that selects 10-bit data from the intermediate sum holding circuit 28 and inputs the data to the sign extender 24.
And

【0062】尚、シフトレジスタ30は、8ビットデー
タを格納可能なものである。また、本第1実施形態の繰
り返し乗算器M1においても、例えば、演算サイクル信
号は所定のクロックの立ち上がりタイミングで値が順次
変化し、中間和保持回路28とシフトレジスタ30は、
演算サイクル信号の値が変化してからクロックが立ち下
がったタイミング(つまり、演算サイクル信号の変化に
対してクロックの半周期分ずれたタイミング)でデータ
の保持動作を行う。
The shift register 30 can store 8-bit data. Also, in the repetitive multiplier M1 of the first embodiment, for example, the value of the operation cycle signal sequentially changes at the rising timing of a predetermined clock, and the intermediate sum holding circuit 28 and the shift register 30
The data holding operation is performed at the timing when the clock falls after the value of the operation cycle signal changes (that is, at the timing shifted by a half cycle of the clock with respect to the change in the operation cycle signal).

【0063】このように構成された本第1実施形態の繰
り返し乗算器M1は、以下のように動作する。まず、符
号付き演算を行う場合(即ち、切替信号が符号付き乗算
の実行を示す場合)には、少なくとも演算サイクル信号
が1サイクル目〜4サイクル目を示す値になっている演
算実行中の間、8ビットの被乗数Xを2ビット符号拡張
した10ビットの被乗数Xがビット拡張器12から継続
して出力されると共に、8ビットの乗数Yを2ビット符
号拡張した10ビットの乗数Yが乗数保持回路16から
継続して出力される。また逆に、符号無し演算を行う場
合(即ち、切替信号が符号無し乗算の実行を示す場合)
には、少なくとも演算サイクル信号が1サイクル目〜4
サイクル目を示す値になっている演算実行中の間、8ビ
ットの被乗数Xを2ビット0拡張した10ビットの被乗
数Xがビット拡張器12から継続して出力されると共
に、8ビットの乗数Yを2ビット0拡張した10ビット
の乗数Yが乗数保持回路16から継続して出力される。
The repetitive multiplier M1 according to the first embodiment thus configured operates as follows. First, when performing a signed operation (i.e., when the switching signal indicates the execution of signed multiplication), at least during the execution of the operation in which the operation cycle signal has a value indicating the first to fourth cycles, 8 The 10-bit multiplicand X obtained by extending the bit multiplicand X by two bits is continuously output from the bit expander 12, and the 10-bit multiplier Y obtained by extending the 8-bit multiplier Y by two bits is stored in the multiplier holding circuit 16. Is output continuously. Conversely, when performing an unsigned operation (ie, when the switching signal indicates execution of unsigned multiplication)
, At least the operation cycle signal is in the first cycle to 4
During the execution of the operation indicating the cycle number, the 10-bit multiplicand X obtained by extending the 8-bit multiplicand X by 2 bits 0 is continuously output from the bit extender 12, and the 8-bit multiplier Y is set to 2 The multiplier Y of 10 bits extended by bit 0 is continuously output from the multiplier holding circuit 16.

【0064】そして、演算の1サイクル目(即ち、演算
サイクル信号が最初の1サイクル目を示す値になった場
合)には、乗数ビット選択回路18から、乗数保持回路
16に保持されている10ビットの乗数Yを構成するビ
ットのうちの、図3に示す第1出力の4ビットY[3:0]
(Y[3] ,Y[2] ,Y[1] ,Y[0] )が出力され、部分
積発生回路22が、乗数ビット選択回路18からの4ビ
ットY[3:0] のうちの下位2ビット(Y[1] ,Y[0] )
の下位側に“0”のダミービットY[-0]を付けた3ビッ
トと、ビット拡張器12から出力される10ビットの被
乗数Xとから、2次のブースのアルゴリズムに基づき1
0ビットの第1部分積B0 を生成して出力する。また、
部分積発生回路20が、乗数ビット選択回路18からの
4ビットY[3:0] のうちの上位3ビット(Y[3] ,Y
[2] ,Y[1] )と、ビット拡張器12から出力される1
0ビットの被乗数Xとから、2次のブースのアルゴリズ
ムに基づき10ビットの第2部分積B1 を生成して出力
する。
Then, in the first cycle of the operation (that is, when the operation cycle signal becomes a value indicating the first cycle), the multiplier bit selection circuit 18 stores the data in the multiplier holding circuit 16. Of the bits constituting the bit multiplier Y, four bits Y [3: 0] of the first output shown in FIG.
(Y [3], Y [2], Y [1], Y [0]) are output, and the partial product generation circuit 22 outputs the four bits Y [3: 0] from the multiplier bit selection circuit 18. Lower 2 bits (Y [1], Y [0])
From the 3 bits with the dummy bit Y [-0] of “0” added to the lower side of the data and the 10-bit multiplicand X output from the bit expander 12, 1
A first partial product B0 of 0 bits is generated and output. Also,
The partial product generation circuit 20 outputs the upper three bits (Y [3], Y [3]) of the four bits Y [3: 0] from the multiplier bit selection circuit 18.
[2], Y [1]) and 1 output from the bit extender 12.
A 10-bit second partial product B1 is generated and output from the 0-bit multiplicand X based on the secondary Booth algorithm.

【0065】そして更に、演算の1サイクル目では、被
加数選択回路32により、部分積発生回路22からの第
1部分積B0 が選択されて符号拡張器24へ入力され
る。このため、図2の上から3段目〜5段目に示すよう
に、部分積発生回路22からの10ビットの第1部分積
B0 が符号拡張器24によって2ビット(図2における
「B0 」の段の「□」印の2ビット)符号拡張されると
共に、その符号拡張後の上位10ビットと部分積発生回
路20からの10ビットの第2部分積B1 とが、加算器
26によって加算され、更に、その加算器26の加算結
果である10ビットデータが中間和保持回路28に保持
される。また、符号拡張器24の出力のうちの下位2ビ
ットである第1部分積B0 の下位2ビット(図2におけ
る「B0 」の段の「☆」印の2ビットであって、「中間
和1」の段の「◎」印の2ビット)が、シフトレジスタ
30の上位2ビット位置に保持される。
Further, in the first cycle of the operation, the first partial product B 0 from the partial product generation circuit 22 is selected by the augend selection circuit 32 and input to the sign extender 24. Therefore, as shown in the third to fifth stages from the top in FIG. 2, the 10-bit first partial product B0 from the partial product generation circuit 22 is converted into two bits ("B0" in FIG. The sign extension is performed by the adder 26, and the upper 10 bits after sign extension and the 10-bit second partial product B1 from the partial product generator 20 are added by the adder 26. Further, 10-bit data as the addition result of the adder 26 is held in the intermediate sum holding circuit 28. The lower two bits of the first partial product B0, which is the lower two bits of the output of the sign extender 24 (the two bits marked with a ".largecircle." In the "B0" stage in FIG. Are stored in the upper two bit positions of the shift register 30.

【0066】次に、演算の2サイクル目(即ち、演算サ
イクル信号が2サイクル目を示す値になった場合)で
は、被加数選択回路32により、中間和保持回路28か
らの10ビットデータ(つまり、1サイクル目で加算器
26から出力された10ビットデータ)が選択されて符
号拡張器24へ入力される。
Next, in the second cycle of the operation (that is, when the operation cycle signal has a value indicating the second cycle), the 10-bit data ( In other words, the 10-bit data output from the adder 26 in the first cycle is selected and input to the sign extender 24.

【0067】また、乗数ビット選択回路18から、乗数
保持回路16に保持されている10ビットの乗数Yを構
成するビットのうちの、図3に示す第2出力の4ビット
Y[5:2] (Y[5] ,Y[4] ,Y[3] ,Y[2] )が出力さ
れ、部分積発生回路20が、乗数ビット選択回路18か
らの4ビットY[5:2] のうちの上位3ビット(Y[5],
Y[4] ,Y[3] )と、ビット拡張器12から出力される
10ビットの被乗数Xとから、2次のブースのアルゴリ
ズムに基づき10ビットの第3部分積B2 を生成して出
力する。
Further, among the bits forming the 10-bit multiplier Y held in the multiplier holding circuit 16 from the multiplier bit selection circuit 18, the 4 bits Y [5: 2] of the second output shown in FIG. (Y [5], Y [4], Y [3], Y [2]), and the partial product generation circuit 20 outputs the four bits Y [5: 2] from the multiplier bit selection circuit 18. Upper 3 bits (Y [5],
Y [4], Y [3]) and the 10-bit multiplicand X output from the bit expander 12 to generate and output a 10-bit third partial product B2 based on a secondary Booth algorithm. .

【0068】このため、演算の2サイクル目では、図2
の上から5段目〜7段目に示すように、中間和保持回路
28に保持されている10ビットデータが符号拡張器2
4によって2ビット(図2における「中間和1」の段の
「□」印の2ビット)符号拡張されると共に、その符号
拡張後の上位10ビットと部分積発生回路20からの1
0ビットの第3部分積B2 とが、加算器26によって加
算され、更に、その加算器26の加算結果である10ビ
ットデータが中間和保持回路28に更新して保持され
る。また、シフトレジスタ30が2ビット下位ビット側
へシフト(右シフト)され、符号拡張器24の出力の下
位2ビットであって、1サイクル目で加算器26から出
力された10ビットデータの下位2ビット(図2におけ
る「中間和1」の段の「☆」印の2ビットであって、
「中間和2」の段の「◎」印の4ビットのうちの上位2
ビット)が、シフトレジスタ30の上位2ビット位置に
保持される。この結果、図2における「中間和2」の段
の「◎」印の4ビットが、シフトレジスタ30の上位4
ビット位置に保持されることとなる。
For this reason, in the second cycle of the operation, FIG.
As shown in the fifth to seventh stages from the top, the 10-bit data held in the intermediate sum holding circuit 28 is
2, the sign extension is performed for 2 bits (2 bits marked with “□” at the stage of “intermediate sum 1” in FIG. 2), and the upper 10 bits after the sign extension and 1 from the partial product generation circuit 20.
The 0-bit third partial product B2 is added by the adder 26, and the 10-bit data as the addition result of the adder 26 is updated and held in the intermediate sum holding circuit 28. Also, the shift register 30 is shifted to the lower 2 bits by 2 bits (right shift), and the lower 2 bits of the output of the sign extender 24 and the lower 2 bits of the 10-bit data output from the adder 26 in the first cycle. Bit (the two bits marked with a “☆” at the “intermediate sum 1” stage in FIG. 2)
Upper 2 bits of 4 bits marked with “◎” in “Intermediate sum 2”
Bit) is held in the upper two bit positions of the shift register 30. As a result, the four bits marked with “◎” at the stage of “intermediate sum 2” in FIG.
It will be held at the bit position.

【0069】次に、演算の3サイクル目(即ち、演算サ
イクル信号が3サイクル目を示す値になった場合)にお
いても、被加数選択回路32により、中間和保持回路2
8からの10ビットデータ(つまり、2サイクル目で加
算器26から出力された10ビットデータ)が選択され
て符号拡張器24へ入力される。
Next, also in the third cycle of the operation (that is, when the operation cycle signal becomes a value indicating the third cycle), the addend selection circuit 32 causes the intermediate sum holding circuit 2 to operate.
10-bit data from 8 (that is, 10-bit data output from the adder 26 in the second cycle) is selected and input to the sign extender 24.

【0070】また、演算の3サイクル目では、乗数ビッ
ト選択回路18から、乗数保持回路16に保持されてい
る10ビットの乗数Yを構成するビットのうちの、図3
に示す第3出力の4ビットY[7:4] (Y[7] ,Y[6] ,
Y[5] ,Y[4] )が出力され、部分積発生回路20が、
乗数ビット選択回路18からの4ビットY[7:4] のうち
の上位3ビット(Y[7] ,Y[6] ,Y[5] )と、ビット
拡張器12から出力される10ビットの被乗数Xとか
ら、2次のブースのアルゴリズムに基づき10ビットの
第4部分積B3 を生成して出力する。
In the third cycle of the operation, the multiplier bit selection circuit 18 outputs the bits of the 10-bit multiplier Y held in the multiplier holding circuit 16 as shown in FIG.
4 bits of the third output Y [7: 4] (Y [7], Y [6],
Y [5], Y [4]) are output, and the partial product generation circuit 20 outputs
The upper 3 bits (Y [7], Y [6], Y [5]) of the 4 bits Y [7: 4] from the multiplier bit selection circuit 18 and the 10 bits output from the bit expander 12 From the multiplicand X, a 10-bit fourth partial product B3 is generated and output based on the secondary Booth algorithm.

【0071】このため、演算の3サイクル目では、図2
の上から7段目〜9段目に示すように、中間和保持回路
28に保持されている10ビットデータが符号拡張器2
4によって2ビット(図2における「中間和2」の段の
「□」印の2ビット)符号拡張されると共に、その符号
拡張後の上位10ビットと部分積発生回路20からの1
0ビットの第4部分積B3 とが、加算器26によって加
算され、更に、その加算器26の加算結果である10ビ
ットデータが中間和保持回路28に更新して保持され
る。また、シフトレジスタ30が2ビット下位ビット側
へシフト(右シフト)され、符号拡張器24の出力の下
位2ビットであって、2サイクル目で加算器26から出
力された10ビットデータの下位2ビット(図2におけ
る「中間和2」の段の「☆」印の2ビットであって、
「中間和3」の段の「◎」印の6ビットのうちの上位2
ビット)が、シフトレジスタ30の上位2ビット位置に
保持される。この結果、図2における「中間和3」の段
の「◎」印の6ビットが、シフトレジスタ30の上位6
ビット位置に保持されることとなる。
Therefore, in the third cycle of the operation, FIG.
As shown in the seventh to ninth stages from the top, the 10-bit data held in the intermediate sum holding circuit 28 is
2, the two bits (two bits marked with "□" at the stage of "intermediate sum 2" in FIG. 2) are sign-extended, and the upper 10 bits after sign extension and 1 from the partial product generation circuit 20.
The 0-bit fourth partial product B3 is added by the adder 26, and the 10-bit data as the addition result of the adder 26 is updated and held in the intermediate sum holding circuit 28. Also, the shift register 30 is shifted to the lower 2 bits (right shift), and the lower 2 bits of the output of the sign extender 24 and the lower 2 bits of the 10-bit data output from the adder 26 in the second cycle. Bit (the two bits marked with a “☆” at the “intermediate sum 2” stage in FIG. 2)
Upper 2 bits out of 6 bits marked with “◎” in “Intermediate sum 3” stage
Bit) is held in the upper two bit positions of the shift register 30. As a result, the 6 bits marked with “◎” at the “intermediate sum 3” stage in FIG.
It will be held at the bit position.

【0072】次に、演算の4サイクル目(即ち、演算サ
イクル信号が4サイクル目を示す値になった場合)にお
いても、被加数選択回路32により、中間和保持回路2
8からの10ビットデータ(つまり、3サイクル目で加
算器26から出力された10ビットデータ)が選択され
て符号拡張器24へ入力される。
Next, also in the fourth cycle of the operation (that is, when the operation cycle signal becomes a value indicating the fourth cycle), the addend selection circuit 32 causes the intermediate sum holding circuit 2 to operate.
The 10-bit data from 8 (that is, the 10-bit data output from the adder 26 in the third cycle) is selected and input to the sign extender 24.

【0073】また、演算の4サイクル目では、乗数ビッ
ト選択回路18から、乗数保持回路16に保持されてい
る10ビットの乗数Yを構成するビットのうちの、図3
に示す第4出力の4ビットY[9:6] (Y[9] ,Y[8] ,
Y[7] ,Y[6] )が出力され、部分積発生回路20が、
乗数ビット選択回路18からの4ビットY[9:6] のうち
の上位3ビット(Y[9] ,Y[8] ,Y[7] )と、ビット
拡張器12から出力される10ビットの被乗数Xとか
ら、2次のブースのアルゴリズムに基づき10ビットの
第5部分積B4 を生成して出力する。尚、前述したよう
に、Y[9] とY[8] は、ビット拡張器14によって拡張
された分の乗数Yの上位2ビットであり、図3において
は「△」印で示されている。
In the fourth cycle of the operation, the multiplier bit selection circuit 18 outputs the bits of the 10-bit multiplier Y held in the multiplier holding circuit 16 as shown in FIG.
4 bits of the fourth output Y [9: 6] (Y [9], Y [8],
Y [7], Y [6]) are output, and the partial product generation circuit 20
The upper 3 bits (Y [9], Y [8], Y [7]) of the 4 bits Y [9: 6] from the multiplier bit selection circuit 18 and the 10 bits output from the bit expander 12 From the multiplicand X, a 10-bit fifth partial product B4 is generated and output based on the secondary Booth algorithm. Note that, as described above, Y [9] and Y [8] are the upper two bits of the multiplier Y extended by the bit extender 14, and are indicated by “△” in FIG. .

【0074】このため、演算の4サイクル目では、図2
の上から9段目〜11段目に示すように、中間和保持回
路28に保持されている10ビットデータが符号拡張器
24によって2ビット(図2における「中間和3」の段
の「□」印の2ビット)符号拡張されると共に、その符
号拡張後の上位10ビットと部分積発生回路20からの
10ビットの第5部分積B4 とが、加算器26によって
加算され、更に、その加算器26の加算結果である10
ビットデータが中間和保持回路28に更新して保持され
る。また、シフトレジスタ30が2ビット下位ビット側
へシフト(右シフト)され、符号拡張器24の出力の下
位2ビットであって、3サイクル目で加算器26から出
力された10ビットデータの下位2ビット(図2におけ
る「中間和3」の段の「☆」印の2ビットであって、
「積」の段の「◎」印の8ビットのうちの上位2ビッ
ト)が、シフトレジスタ30の上位2ビット位置に保持
される。
Therefore, in the fourth cycle of the operation, FIG.
As shown in the ninth to eleventh stages from the top, the 10-bit data held in the intermediate sum holding circuit 28 is converted into two bits by the sign extender 24 (“□” in the “intermediate sum 3” stage in FIG. 2). Sign extension), the sign-extended upper 10 bits and the 10-bit fifth partial product B4 from the partial product generation circuit 20 are added by the adder 26, and further added. 10 which is the addition result of the unit 26
The bit data is updated and held in the intermediate sum holding circuit 28. Further, the shift register 30 is shifted to the lower 2 bits by 2 bits (right shift), and the lower 2 bits of the output of the sign extender 24 and the lower 2 bits of the 10-bit data output from the adder 26 in the third cycle. Bit (the two bits marked with a “☆” at the “intermediate sum 3” stage in FIG. 2)
The upper 2 bits of the 8 bits marked with “◎” in the “product” stage are held in the upper 2 bit positions of the shift register 30.

【0075】この結果、演算の4サイクル目が終了した
時点においては、被乗数Xと乗数Yとの積を表す16ビ
ットデータのうちの下位8ビット(図2における「積」
の段の「◎」印の8ビット)が、シフトレジスタ30に
保持され、上記積を表す16ビットデータのうちの上位
8ビット(図2における「積」の段の「○」印の8ビッ
ト)が、中間和保持回路28の下位8ビット位置に保持
されることとなる。そして、この時点で乗算が終了す
る。
As a result, at the end of the fourth cycle of the operation, the lower 8 bits (“product” in FIG. 2) of the 16-bit data representing the product of the multiplicand X and the multiplier Y
Are stored in the shift register 30 and the upper 8 bits of the 16-bit data representing the product (the 8 bits of the “○” mark of the “product” stage in FIG. 2) ) Is held in the lower 8-bit position of the intermediate sum holding circuit 28. Then, at this point, the multiplication ends.

【0076】尚、本第1実施形態では、被乗数保持回路
10とビット拡張器12が、被乗数保持手段に相当し、
ビット拡張器14と乗数保持回路16が、乗数保持手段
に相当している。また、乗数ビット選択回路18と部分
積発生回路20が、第1の部分積発生回路に相当し、乗
数ビット選択回路18と部分積発生回路22が、第2の
部分積発生回路に相当している。そして、符号拡張器2
4,加算器26,中間和保持回路28,及びシフトレジ
スタ30が、部分積累積加算回路に相当しており、その
中で、符号拡張器24と加算器26が、加算手段に相当
し、中間和保持回路28とシフトレジスタ30が、加算
結果保持手段に相当している。
In the first embodiment, the multiplicand holding circuit 10 and the bit extender 12 correspond to a multiplicand holding means.
The bit expander 14 and the multiplier holding circuit 16 correspond to multiplier holding means. The multiplier bit selection circuit 18 and the partial product generation circuit 20 correspond to a first partial product generation circuit, and the multiplier bit selection circuit 18 and the partial product generation circuit 22 correspond to a second partial product generation circuit. I have. And sign extender 2
4, the adder 26, the intermediate sum holding circuit 28, and the shift register 30 correspond to a partial product accumulating and adding circuit, in which the sign extender 24 and the adder 26 correspond to the adding means, The sum holding circuit 28 and the shift register 30 correspond to an addition result holding unit.

【0077】以上のような本第1実施形態の繰り返し乗
算器M1では、各演算サイクル毎に、乗数ビット選択回
路18及び部分積発生回路20の動作によって、部分積
が乗数Yの下位ビットに対応するものの順に生成される
と共に、その時点で中間和保持回路28及びシフトレジ
スタ30に保持されている値(中間和)に上記部分積発
生回路20で生成された部分積が、符号拡張器24及び
加算器26の動作によって加算され、その加算結果が中
間和保持回路28及びシフトレジスタ30に更新して保
持されることにより、部分積の累積加算が行われる。
In the repetitive multiplier M1 of the first embodiment as described above, the partial product corresponds to the lower bit of the multiplier Y by the operation of the multiplier bit selection circuit 18 and the partial product generation circuit 20 for each operation cycle. The partial products generated by the partial product generation circuit 20 at the value (intermediate sum) held in the intermediate sum holding circuit 28 and the shift register 30 at that time are added to the sign extender 24 and The addition is performed by the operation of the adder 26, and the addition result is updated and held in the intermediate sum holding circuit 28 and the shift register 30, whereby the cumulative addition of the partial products is performed.

【0078】ここで特に、本第1実施形態の繰り返し乗
算器M1においては、乗数ビット選択回路18及び部分
積発生回路20によって、第1部分積B0 以外の他の部
分積B1 〜B4 を下位のものから順に生成するように
し、1サイクル目では、乗数ビット選択回路18及び部
分積発生回路22によって、第1部分積B0 を生成する
ようにしている。そして、被加数選択回路32により、
1サイクル目のみ、符号拡張器24へ中間和保持回路2
8の出力ではなく、部分積発生回路22からの第1部分
積B0 を供給するようにしている。
Here, in particular, in the repetitive multiplier M1 of the first embodiment, the multiplier bit selecting circuit 18 and the partial product generating circuit 20 lower the partial products B1 to B4 other than the first partial product B0 in the lower order. The first partial product B0 is generated by the multiplier bit selection circuit 18 and the partial product generation circuit 22 in the first cycle. Then, by the augend selection circuit 32,
Only in the first cycle, the intermediate sum holding circuit 2 is supplied to the sign extender 24.
8, the first partial product B0 from the partial product generating circuit 22 is supplied.

【0079】このため、演算の1サイクル目では、符号
拡張器24及び加算器26により、部分積発生回路22
からの第1部分積B0 に部分積発生回路20からの第2
部分積B1 が加算され、2サイクル以降では、従来の乗
算器と同様に、符号拡張器24,加算器26,中間和保
持回路28,及びシフトレジスタ30の動作により、部
分積発生回路20によって順次生成される部分積の累積
加算が行われることとなる。
For this reason, in the first cycle of the operation, the sign extender 24 and the adder 26 cause the partial product generating circuit 22
From the partial product generation circuit 20 to the first partial product B0 from
The partial product B1 is added. After the second cycle, the partial product generating circuit 20 sequentially operates by the operation of the sign extender 24, the adder 26, the intermediate sum holding circuit 28, and the shift register 30 as in the conventional multiplier. Cumulative addition of the generated partial products is performed.

【0080】よって、本第1実施形態の繰り返し乗算器
M1によれば、図2と前述した図16との対比からも明
らかなように、演算の1サイクル目から、第1部分積B
0 と第2部分積B1 とを加算して、従来の乗算器のよう
な1サイクル目の無駄を無くすことができ、その結果、
回路規模が比較的大きい加算器を追加することなく、積
を得るまでの演算速度を向上させることができる。
Thus, according to the iterative multiplier M1 of the first embodiment, as is clear from the comparison between FIG. 2 and FIG. 16, the first partial product B
By adding 0 and the second partial product B1, the waste of the first cycle as in the conventional multiplier can be eliminated, and as a result,
The operation speed until obtaining the product can be improved without adding an adder having a relatively large circuit scale.

【0081】特に、本第1実施形態の繰り返し乗算器M
1では、符号付き乗算と符号無し乗算とを択一的に実行
するために、入力される被乗数Xと乗数Yを2ビット拡
張(符号拡張又は0拡張)して処理するため、符号付き
乗算だけを行う構成の場合と比較して第5部分積B4 が
1つ余分に生成されるが、演算の1サイクル目から部分
積の累積加算を行うことができるため、図13に示した
従来の乗算器J2のように加算器を特別に追加すること
なく、従来の符号付き乗算だけを行う乗算器の場合と同
等の演算速度を達成することができる。具体的に説明す
ると、図15に示した従来の符号付き/無し繰り返し乗
算器J3では、積を得るまでに5サイクルを要するが、
本第1実施形態の繰り返し乗算器M1では、4サイクル
で積を得ることができ、これは、符号付き乗算だけを行
う図10に示した従来の繰り返し乗算器J1と同じ演算
速度となる。
In particular, the repetition multiplier M of the first embodiment
In the case of 1, in order to execute signed multiplication and unsigned multiplication alternatively, input multiplicand X and multiplier Y are extended by 2 bits (sign extension or 0 extension) and processed. Although the fifth partial product B4 is generated one extra compared with the case of the configuration in which the multiplication is performed, since the cumulative addition of the partial products can be performed from the first cycle of the operation, the conventional multiplication shown in FIG. The operation speed equivalent to that of the conventional multiplier that performs only signed multiplication can be achieved without adding an adder as in the case of the device J2. Specifically, in the conventional signed / unsigned repetition multiplier J3 shown in FIG. 15, it takes five cycles to obtain a product.
In the iterative multiplier M1 of the first embodiment, a product can be obtained in four cycles, which has the same operation speed as the conventional iterative multiplier J1 shown in FIG. 10 that performs only signed multiplication.

【0082】このように、本第1実施形態の繰り返し乗
算器M1によれば、演算速度を低下させることなく且つ
比較的小規模な回路構成で、符号付き乗算と符号無し乗
算とを切り替えて実行することができる。次に、第2実
施形態について、図4〜図6を用いて説明する。
As described above, according to the iterative multiplier M1 of the first embodiment, signed multiplication and unsigned multiplication are switched and executed without reducing the operation speed and with a relatively small circuit configuration. can do. Next, a second embodiment will be described with reference to FIGS.

【0083】まず図4は、8ビットの被乗数Xと乗数Y
を入力して符号付き乗算と符号無し乗算とを択一的に行
う第2実施形態の繰り返し乗算器(符号付き/無し繰り
返し乗算器)M2の構成を表すブロック図であり、図5
は、その繰り返し乗算器M2の乗算動作を表す模式図で
ある。尚、図4において、第1実施形態の繰り返し乗算
器M1と同様の構成要素については、同一の符号を付し
ているため、詳細な説明は省略する。
First, FIG. 4 shows an 8-bit multiplicand X and a multiplier Y
FIG. 5 is a block diagram illustrating a configuration of a repetition multiplier (signed / unsigned repetition multiplier) M2 according to a second embodiment that performs signed multiplication and unsigned multiplication alternatively by inputting an input signal.
Is a schematic diagram showing a multiplication operation of the repetitive multiplier M2. Note that, in FIG. 4, the same components as those of the repetitive multiplier M1 of the first embodiment are denoted by the same reference numerals, and a detailed description thereof will be omitted.

【0084】図4に示すように、本第2実施形態の繰り
返し乗算器M2は、第1実施形態の乗算器M1と比較し
て、下記の(1)〜(4)の点で異なっている。 (1)乗数ビット選択回路18に代えて設けられた乗数
ビット選択回路34は、乗数保持回路16に保持されて
いる2ビット拡張後の10ビットの乗数Yを構成するビ
ットのうちで、図6に示す如く最下位ビットY[0] から
6ビット目Y[5] までの6ビットY[5:0] からなる第1
出力と、5ビット目Y[4] から10ビット目Y[9] まで
の6ビットY[9:4] からなる第2出力とを、第1制御線
L1 からの演算サイクル信号の変化に同期して、下位の
ものから順番に出力する。
As shown in FIG. 4, the iterative multiplier M2 of the second embodiment differs from the multiplier M1 of the first embodiment in the following points (1) to (4). . (1) The multiplier bit selection circuit 34 provided in place of the multiplier bit selection circuit 18 is one of the bits constituting the 10-bit multiplier Y after the 2-bit expansion held in the multiplier holding circuit 16 shown in FIG. As shown in the figure, the first bit consisting of 6 bits Y [5: 0] from the least significant bit Y [0] to the sixth bit Y [5]
The output and the second output consisting of 6 bits Y [9: 4] from the 5th bit Y [4] to the 10th bit Y [9] are synchronized with the change of the operation cycle signal from the first control line L1. And output in order from the lower order.

【0085】つまり、本第2実施形態の乗数ビット選択
回路34は、演算サイクル信号が1サイクル目を示す値
になると、図6に示す第1出力(Y[5:0] )を出力し、
演算サイクル信号が2サイクル目を示す値になると、図
6に示す第2出力(Y[9:4])を出力する。尚、図6に
おける「△」印の2ビットは、図3の場合と同様に、ビ
ット拡張器14によって拡張された分の乗数Yの上位2
ビット(Y[9] ,Y[8] )である。
That is, when the operation cycle signal reaches the value indicating the first cycle, the multiplier bit selection circuit 34 of the second embodiment outputs the first output (Y [5: 0]) shown in FIG.
When the operation cycle signal reaches a value indicating the second cycle, the second output (Y [9: 4]) shown in FIG. 6 is output. Note that the two bits marked with “2” in FIG. 6 are, as in the case of FIG.
Bits (Y [9], Y [8]).

【0086】(2)部分積発生回路20に代えて、2つ
の部分積発生回路36,38が設けられている。そし
て、一方の部分積発生回路36は、乗数ビット選択回路
34から出力される6ビットのうちの下位2ビット目か
ら4ビット目までの3ビットと、ビット拡張器12から
出力される10ビットの被乗数X(2ビット拡張後の被
乗数X)とから、2次のブースのアルゴリズムに基づき
10ビットの部分積を生成して出力する。
(2) Two partial product generation circuits 36 and 38 are provided instead of the partial product generation circuit 20. The one partial product generation circuit 36 outputs three bits of the lower two bits to the fourth bit of the six bits output from the multiplier bit selection circuit 34 and the ten bits output from the bit expander 12. A 10-bit partial product is generated and output from the multiplicand X (multiplicand X after 2-bit expansion) based on the second-order Booth algorithm.

【0087】また、他方の部分積発生回路38は、第1
実施形態の部分積発生回路20と同様に、乗数ビット選
択回路34から出力される6ビットのうちの上位3ビッ
トと、ビット拡張器12から出力される10ビットの被
乗数Xとから、2次のブースのアルゴリズムに基づき1
0ビットの部分積を生成して出力する。
Further, the other partial product generating circuit 38
Similarly to the partial product generation circuit 20 according to the embodiment, the higher order 3 bits of the 6 bits output from the multiplier bit selection circuit 34 and the 10-bit multiplicand X output from the bit expander 12 are used to calculate a second order. 1 based on Booth's algorithm
Generate and output a 0-bit partial product.

【0088】尚、本第2実施形態においても、部分積発
生回路22は、乗数ビット選択回路34から出力される
6ビットのうちの下位2ビットを入力し、その下位2ビ
ットの下位側に“0”のダミービットを付けた3ビット
とビット拡張器12から出力される10ビットの被乗数
Xとから、2次のブースのアルゴリズムに基づき10ビ
ットの部分積を生成して出力する。
Note that also in the second embodiment, the partial product generation circuit 22 inputs the lower 2 bits of the 6 bits output from the multiplier bit selection circuit 34, and places "2" at the lower side of the lower 2 bits. A 10-bit partial product is generated and output from the 3-bit with the dummy bit of 0 ″ and the 10-bit multiplicand X output from the bit expander 12 based on the secondary Booth algorithm.

【0089】(3)加算器26と中間和保持回路28と
の間に、符号拡張器40と加算器42が追加して設けら
れている。そして、1段目の加算器26が、符号拡張器
24から出力される12ビットデータのうちの上位10
ビットと部分積発生回路36からの10ビットの部分積
とを加算し、符号拡張器40が、加算器26から出力さ
れる10ビットデータを2ビット符号拡張して出力す
る。そして更に、2段目の加算器42が、符号拡張器4
0から出力される12ビットデータのうちの上位10ビ
ットと部分積発生回路38からの10ビットの部分積と
を加算し、その加算器42から出力される10ビットデ
ータが中間和保持回路28に入力される。
(3) A sign extender 40 and an adder 42 are additionally provided between the adder 26 and the intermediate sum holding circuit 28. Then, the first-stage adder 26 outputs the upper 10 bits of the 12-bit data output from the sign extender 24.
The bit and the 10-bit partial product from the partial product generation circuit 36 are added, and the sign extender 40 performs 2-bit sign extension on the 10-bit data output from the adder 26 and outputs the result. Further, the adder 42 in the second stage is used by the sign extender 4
The upper 10 bits of the 12-bit data output from 0 are added to the 10-bit partial product from the partial product generation circuit 38, and the 10-bit data output from the adder 42 is added to the intermediate sum holding circuit 28. Is entered.

【0090】(4)シフトレジスタ30に代えて設けら
れたシフトレジスタ44は、符号拡張器24から出力さ
れる12ビットデータのうちの下位2ビットと、符号拡
張器40から出力される12ビットデータのうちの下位
2ビットとを、演算サイクル信号の変化に同期して保持
する。
(4) The shift register 44 provided in place of the shift register 30 stores the lower 2 bits of the 12-bit data output from the sign extender 24 and the 12-bit data output from the sign extender 40. Are held in synchronization with the change of the operation cycle signal.

【0091】このように構成された本第2実施形態の繰
り返し乗算器M2は、以下のように動作する。まず、符
号付き演算を行う場合(即ち、切替信号が符号付き乗算
の実行を示す場合)には、少なくとも演算サイクル信号
が1サイクル目〜2サイクル目を示す値になっている演
算実行中の間、8ビットの被乗数Xを2ビット符号拡張
した10ビットの被乗数Xがビット拡張器12から継続
して出力されると共に、8ビットの乗数Yを2ビット符
号拡張した10ビットの乗数Yが乗数保持回路16から
継続して出力される。また逆に、符号無し演算を行う場
合(即ち、切替信号が符号無し乗算の実行を示す場合)
には、少なくとも演算サイクル信号が1サイクル目〜2
サイクル目を示す値になっている演算実行中の間、8ビ
ットの被乗数Xを2ビット0拡張した10ビットの被乗
数Xがビット拡張器12から継続して出力されると共
に、8ビットの乗数Yを2ビット0拡張した10ビット
の乗数Yが乗数保持回路16から継続して出力される。
The repetitive multiplier M2 according to the second embodiment thus configured operates as follows. First, when performing a signed operation (that is, when the switching signal indicates the execution of signed multiplication), at least during the execution of the operation in which the operation cycle signal has a value indicating the first cycle to the second cycle, The 10-bit multiplicand X obtained by extending the bit multiplicand X by two bits is continuously output from the bit expander 12, and the 10-bit multiplier Y obtained by extending the 8-bit multiplier Y by two bits is stored in the multiplier holding circuit 16. Is output continuously. Conversely, when performing an unsigned operation (ie, when the switching signal indicates execution of unsigned multiplication)
, At least the operation cycle signal is from the first cycle to the second
During the execution of the operation indicating the cycle number, the 10-bit multiplicand X obtained by extending the 8-bit multiplicand X by 2 bits 0 is continuously output from the bit extender 12, and the 8-bit multiplier Y is set to 2 The multiplier Y of 10 bits extended by bit 0 is continuously output from the multiplier holding circuit 16.

【0092】そして、演算の1サイクル目(即ち、演算
サイクル信号が最初の1サイクル目を示す値になった場
合)には、乗数ビット選択回路34から、乗数保持回路
16に保持されている10ビットの乗数Yを構成するビ
ットのうちの、図6に示す第1出力の6ビットY[5:0]
(Y[5] ,Y[4] ,Y[3] ,Y[2] ,Y[1] ,Y[0])
が出力され、部分積発生回路22が、乗数ビット選択回
路34からの6ビットY[5:0] のうちの下位2ビット
(Y[1] ,Y[0] )の下位側に“0”のダミービットY
[-0]を付けた3ビットと、ビット拡張器12から出力さ
れる10ビットの被乗数Xとから、2次のブースのアル
ゴリズムに基づき10ビットの第1部分積B0 を生成し
て出力する。また、部分積発生回路36が、乗数ビット
選択回路34からの6ビットY[5:0] のうちの下位2ビ
ット目から4ビット目までの3ビット(Y[3] ,Y[2]
,Y[1] )と、ビット拡張器12から出力される10
ビットの被乗数Xとから、2次のブースのアルゴリズム
に基づき10ビットの第2部分積B1 を生成して出力す
る。また更に、部分積発生回路38が、乗数ビット選択
回路34からの6ビットY[5:0] のうちの上位3ビット
(Y[5] ,Y[4] ,Y[3] )と、ビット拡張器12から
出力される10ビットの被乗数Xとから、2次のブース
のアルゴリズムに基づき10ビットの第3部分積B2 を
生成して出力する。
Then, in the first cycle of the operation (that is, when the operation cycle signal becomes a value indicating the first cycle), the multiplier bit selection circuit 34 holds the 10 bits held in the multiplier holding circuit 16. Of the bits forming the bit multiplier Y, 6 bits Y [5: 0] of the first output shown in FIG.
(Y [5], Y [4], Y [3], Y [2], Y [1], Y [0])
Is output, and the partial product generation circuit 22 outputs “0” to the lower side of the lower 2 bits (Y [1], Y [0]) of the 6 bits Y [5: 0] from the multiplier bit selection circuit 34. Dummy bit Y
A 10-bit first partial product B0 is generated and output from the 3-bit with [-0] and the 10-bit multiplicand X output from the bit expander 12 based on the secondary Booth algorithm. Further, the partial product generating circuit 36 outputs three bits (Y [3], Y [2]) of the lower 2nd to 4th bits of the 6 bits Y [5: 0] from the multiplier bit selecting circuit 34.
, Y [1]) and 10 output from the bit expander 12.
From the bit multiplicand X, a 10-bit second partial product B1 is generated and output based on the secondary Booth algorithm. Further, the partial product generation circuit 38 outputs the upper 3 bits (Y [5], Y [4], Y [3]) of the 6 bits Y [5: 0] from the multiplier bit selection circuit 34, Based on the 10-bit multiplicand X output from the expander 12, a 10-bit third partial product B2 is generated and output based on the secondary Booth algorithm.

【0093】そして更に、演算の1サイクル目では、被
加数選択回路32により、部分積発生回路22からの第
1部分積B0 が選択されて符号拡張器24へ入力され
る。このため、演算の1サイクル目では、まず図5の上
から3段目〜5段目に示すように、部分積発生回路22
からの10ビットの第1部分積B0 が符号拡張器24に
よって2ビット(図5における「B0 」の段の「□」印
の2ビット)符号拡張されると共に、その符号拡張後の
上位10ビットと部分積発生回路36からの10ビット
の第2部分積B1 とが、加算器26によって加算され
る。また、符号拡張器24の出力の下位2ビットである
第1部分積B0 の下位2ビット(図5における「B0 」
の段の「☆」印の2ビットであって、「中間和1」の段
の「◎」印の4ビットのうちの下位2ビット)が、シフ
トレジスタ44の上位から3,4ビット目の位置に保持
される。
Further, in the first cycle of the operation, the first partial product B 0 from the partial product generation circuit 22 is selected by the augend selection circuit 32 and input to the sign extender 24. Therefore, in the first cycle of the operation, first, as shown in the third to fifth stages from the top in FIG.
, The sign extension unit 24 sign-extends the first 10-bit partial product B0 by 2 bits (2 bits indicated by the "□" mark in the "B0" stage in FIG. 5) and the upper 10 bits after the sign extension. And the 10-bit second partial product B1 from the partial product generating circuit 36 are added by the adder 26. The lower two bits of the first partial product B0, which is the lower two bits of the output of the sign extender 24 ("B0" in FIG. 5)
, The lower 2 bits of the 4 bits marked “◎” in the “intermediate sum 1” are the 3rd and 4th bits from the upper bit of the shift register 44. Held in position.

【0094】そして更に、演算の1サイクル目では、図
5の上から5段目〜7段目に示すように、加算器26の
加算結果である10ビットデータが符号拡張器40によ
って2ビット(図5における「1段目出力1」の段の
「□」印の2ビット)符号拡張されると共に、その符号
拡張後の上位10ビットと部分積発生回路38からの1
0ビットの第3部分積B2 とが、加算器42によって加
算され、更に、その加算器42の加算結果である10ビ
ットデータが中間和保持回路28に保持される。また、
符号拡張器40の出力の下位2ビット(図5における
「1段目出力1」の段の「☆」印の2ビットであって、
「中間和1」の段の「◎」印の4ビットのうちの上位2
ビット)が、シフトレジスタ44の上位2ビット位置に
保持される。よって、図5における「中間和1」の段の
「◎」印の4ビットが、シフトレジスタ44の上位4ビ
ット位置に保持されることとなる。
Further, in the first cycle of the operation, as shown in the fifth through seventh stages from the top in FIG. In FIG. 5, “1st stage output 1” stage is “2 bits marked with“ □ ”) sign-extended, and the upper 10 bits after sign extension and 1
The 0-bit third partial product B2 is added by the adder 42, and 10-bit data as the addition result of the adder 42 is held in the intermediate sum holding circuit 28. Also,
The lower two bits of the output of the sign extender 40 (the two bits marked with a “☆” in the “first stage output 1” stage in FIG.
High-order 2 of 4 bits marked with “◎” at the stage of “Intermediate sum 1”
Bit) is held in the upper two bit positions of the shift register 44. Therefore, the four bits marked with “◎” at the stage of “intermediate sum 1” in FIG. 5 are held in the upper four bit positions of the shift register 44.

【0095】次に、演算の2サイクル目(即ち、演算サ
イクル信号が2サイクル目を示す値になった場合)で
は、被加数選択回路32により、中間和保持回路28か
らの10ビットデータ(つまり、1サイクル目で加算器
42から出力された10ビットデータ)が選択されて符
号拡張器24へ入力される。
Next, in the second cycle of the operation (that is, when the operation cycle signal has a value indicating the second cycle), the 10-bit data ( That is, 10-bit data output from the adder 42 in the first cycle is selected and input to the sign extender 24.

【0096】また、乗数ビット選択回路34から、乗数
保持回路16に保持されている10ビットの乗数Yを構
成するビットのうちの、図6に示す第2出力の6ビット
Y[9:4] (Y[9] ,Y[8] ,Y[7] ,Y[6] ,Y[5] ,
Y[4] )が出力され、部分積発生回路36が、乗数ビッ
ト選択回路34からの6ビットY[9:4] のうちの下位2
ビット目から4ビット目までの3ビット(Y[7] ,Y
[6] ,Y[5] )と、ビット拡張器12から出力される1
0ビットの被乗数Xとから、2次のブースのアルゴリズ
ムに基づき10ビットの第4部分積B3 を生成して出力
する。そして更に、部分積発生回路38が、乗数ビット
選択回路34からの6ビットY[9:4] のうちの上位3ビ
ット(Y[9] ,Y[8] ,Y[7] )と、ビット拡張器12
から出力される10ビットの被乗数Xとから、2次のブ
ースのアルゴリズムに基づき10ビットの第5部分積B
4 を生成して出力する。尚、Y[9] とY[8] は、図6に
おいて「△」印で示されている。
Further, among the bits constituting the 10-bit multiplier Y held in the multiplier holding circuit 16 from the multiplier bit selection circuit 34, 6 bits Y [9: 4] of the second output shown in FIG. (Y [9], Y [8], Y [7], Y [6], Y [5],
Y [4]) is output, and the partial product generation circuit 36 outputs the lower 2 bits of the 6 bits Y [9: 4] from the multiplier bit selection circuit 34.
3 bits from bit 4 to bit 4 (Y [7], Y
[6], Y [5]) and 1 output from the bit extender 12.
A 10-bit fourth partial product B3 is generated and output from the 0-bit multiplicand X based on the secondary Booth algorithm. Further, the partial product generating circuit 38 outputs the upper 3 bits (Y [9], Y [8], Y [7]) of the 6 bits Y [9: 4] from the multiplier bit selecting circuit 34, Extender 12
From the 10-bit multiplicand X output from the first 10-bit fifth partial product B based on the second-order Booth algorithm
Generate and output 4. Note that Y [9] and Y [8] are indicated by “示” in FIG.

【0097】このため、演算の2サイクル目では、まず
図5の上から7段目〜9段目に示すように、中間和保持
回路28に保持されている10ビットデータが符号拡張
器24によって2ビット(図5における「中間和1」の
段の「□」印の2ビット)符号拡張されると共に、その
符号拡張後の上位10ビットと部分積発生回路36から
の10ビットの第4部分積B3 とが、加算器26によっ
て加算される。また、シフトレジスタ44が4ビット下
位ビット側へシフト(右シフト)され、符号拡張器24
の出力の下位2ビットであって、1サイクル目で加算器
42から出力された10ビットデータの下位2ビット
(図5における「中間和1」の段の「☆」印の2ビット
であって、「積」の段の「◎」印の8ビットのうちの上
位から3,4ビット)が、シフトレジスタ44の上位か
ら3,4ビット目の位置に保持される。
Therefore, in the second cycle of the operation, first, the 10-bit data held in the intermediate sum holding circuit 28 is converted by the sign extender 24 as shown in the seventh to ninth stages from the top in FIG. The two bits (two bits marked with “□” at the stage of “intermediate sum 1” in FIG. 5) are sign-extended, and the upper 10 bits after sign extension and the fourth part of 10 bits from the partial product generation circuit 36 The product B3 is added by the adder 26. Further, the shift register 44 is shifted to the lower 4 bits (right shift), and the sign extender 24 is shifted.
, And the lower 2 bits of the 10-bit data output from the adder 42 in the first cycle (the 2 bits marked with “☆” in the “intermediate sum 1” stage in FIG. 5). , And “product”, the upper 3rd and 4th bits of the 8 bits marked with “)” are held at the positions of the 3rd and 4th bits from the upper side of the shift register 44.

【0098】そして更に、演算の2サイクル目では、図
5の上から9段目〜11段目に示すように、加算器26
の加算結果である10ビットデータが符号拡張器40に
よって2ビット(図5における「1段目出力2」の段の
「□」印の2ビット)符号拡張されると共に、その符号
拡張後の上位10ビットと部分積発生回路38からの1
0ビットの第5部分積B4 とが、加算器42によって加
算され、更に、その加算器42の加算結果である10ビ
ットデータが中間和保持回路28に保持される。また、
符号拡張器40の出力の下位2ビット(図5における
「1段目出力2」の段の「☆」印の2ビットであって、
「積」の段の「◎」印の8ビットのうちの上位2ビッ
ト)が、シフトレジスタ44の上位2ビット位置に保持
される。
Further, in the second cycle of the operation, as shown in the ninth to eleventh stages from the top in FIG.
The sign extension unit 40 sign-extends the 10-bit data, which is the result of the addition, by 2 bits (2 bits indicated by “□” in the “first-stage output 2” stage in FIG. 5), 10 bits and 1 from partial product generation circuit 38
The 0-bit fifth partial product B4 is added by the adder 42, and 10-bit data as the addition result of the adder 42 is held in the intermediate sum holding circuit 28. Also,
The lower two bits of the output of the sign extender 40 (the two bits marked with a “☆” in the “first stage output 2” stage in FIG.
The upper 2 bits of the 8 bits marked with “◎” in the “product” stage are held in the upper 2 bit positions of the shift register 44.

【0099】この結果、演算の2サイクル目が終了した
時点においては、被乗数Xと乗数Yとの積を表す16ビ
ットデータのうちの下位8ビット(図5における「積」
の段の「◎」印の8ビット)が、シフトレジスタ44に
保持され、上記積を表す16ビットデータのうちの上位
8ビット(図5における「積」の段の「○」印の8ビッ
ト)が、中間和保持回路28の下位8ビット位置に保持
されることとなる。そして、この時点で乗算が終了す
る。
As a result, at the time when the second cycle of the operation is completed, the lower 8 bits of the 16-bit data representing the product of the multiplicand X and the multiplier Y (“product” in FIG. 5)
Are stored in the shift register 44, and the upper 8 bits of the 16-bit data representing the product (the 8 bits indicated by the “」 ”mark in the“ product ”stage in FIG. 5) ) Is held in the lower 8-bit position of the intermediate sum holding circuit 28. Then, at this point, the multiplication ends.

【0100】尚、本第2実施形態においても、被乗数保
持回路10とビット拡張器12が、被乗数保持手段に相
当し、ビット拡張器14と乗数保持回路16が、乗数保
持手段に相当している。また、乗数ビット選択回路34
と2つの部分積発生回路36,38が、第1の部分積発
生回路に相当し、乗数ビット選択回路34と部分積発生
回路22が、第2の部分積発生回路に相当している。そ
して、符号拡張器24,加算器26,符号拡張器40,
加算器42,中間和保持回路28,及びシフトレジスタ
44が、部分積累積加算回路に相当しており、その中
で、符号拡張器24,40と加算器26,42が、加算
手段に相当し、中間和保持回路28とシフトレジスタ4
4が、加算結果保持手段に相当している。
In the second embodiment as well, the multiplicand holding circuit 10 and the bit extender 12 correspond to the multiplicand holding means, and the bit extender 14 and the multiplier holding circuit 16 correspond to the multiplier holding means. . The multiplier bit selection circuit 34
And the two partial product generation circuits 36 and 38 correspond to a first partial product generation circuit, and the multiplier bit selection circuit 34 and the partial product generation circuit 22 correspond to a second partial product generation circuit. Then, the sign extender 24, the adder 26, the sign extender 40,
The adder 42, the intermediate sum holding circuit 28, and the shift register 44 correspond to a partial product accumulative addition circuit, and the sign extenders 24 and 40 and the adders 26 and 42 correspond to addition means. , Intermediate sum holding circuit 28 and shift register 4
4 corresponds to the addition result holding means.

【0101】以上詳述したように、本第2実施形態の繰
り返し乗算器M2では、2つの部分積発生回路36,3
8によって各演算サイクル毎に部分積を2つずつ生成
し、その2つの部分積を1段目の符号拡張器24及び加
算器26と2段目の符号拡張器40及び加算器42とに
よって一度に(1サイクル中に)加算するようにしてい
る。このため、第1実施形態の繰り返し乗算器M1と比
較して、2つの加算器26,42が必要となるものの、
2サイクルで乗算を終了することができ、演算速度が2
倍になる。
As described in detail above, in the iterative multiplier M2 of the second embodiment, the two partial product generation circuits 36, 3
8, two partial products are generated for each operation cycle, and the two partial products are once generated by the first-stage sign extender 24 and the adder 26 and the second-stage sign extender 40 and the adder 42. (During one cycle). Therefore, although two adders 26 and 42 are required as compared with the repetitive multiplier M1 of the first embodiment,
The multiplication can be completed in two cycles, and the operation speed is 2
Double.

【0102】そして特に、本第2実施形態の繰り返し乗
算器M2においても、演算の1サイクル目では、被加数
選択回路32により、1段目の符号拡張器24へは、中
間和保持回路28の出力に代えて、部分積発生回路22
からの第1部分積B0 を供給するようにしている。この
ため、本第2実施形態の繰り返し乗算器M2によって
も、演算の1サイクル目から、第1部分積B0 とそれよ
り上位の第2部分積B1及び第3部分積B2 とを加算す
ることができ、その結果、積を得るまでの演算速度を向
上させることができる。
In particular, also in the iterative multiplier M2 of the second embodiment, in the first cycle of operation, the addend selection circuit 32 sends the intermediate sum holding circuit 28 to the first-stage sign extender 24. , The partial product generation circuit 22
From the first partial product B0. Therefore, the iterative multiplier M2 of the second embodiment can also add the first partial product B0 and the second and third partial products B1 and B2 higher than the first partial product B0 from the first cycle of the operation. As a result, the calculation speed up to obtaining the product can be improved.

【0103】つまり、例えば図15に示した従来の繰り
返し乗算器J3において、本第2実施形態の様に、各演
算サイクル毎に部分積を2つずつ生成して加算するよう
に構成しても、部分積の総数(=5)が、1サイクル毎
に加算していく部分積の数(=2)で割り切れず1余る
ため、積を得るまでに3サイクル必要となり、符号拡張
器及び加算器が1段増加される割には十分な効果を得る
ことができない。これに対して、本第2実施形態の繰り
返し乗算器M2によれば、積を得るのに必要な演算サイ
クル数を非常に効率良く減少させることができるのであ
る。
That is, for example, in the conventional iterative multiplier J3 shown in FIG. 15, two partial products are generated and added for each operation cycle as in the second embodiment. , The total number of partial products (= 5) is not divisible by the number of partial products (= 2) added for each cycle, and one remainder is required. However, a sufficient effect cannot be obtained in spite of the fact that is increased by one step. On the other hand, according to the iterative multiplier M2 of the second embodiment, the number of operation cycles required to obtain the product can be reduced very efficiently.

【0104】以上、本発明の一実施形態について説明し
たが、本発明は、前述した各実施形態に限定されるもの
ではなく、種々の形態を採り得ることは言うまでもな
い。例えば、第1実施形態の繰り返し乗算器M1におい
て、被乗数保持回路10とビット拡張器12との接続順
序、或いは、ビット拡張器14と乗数保持回路16との
接続順序は、入れ替えても良い。つまり、それらの接続
順序を入れ替えたとしても、被乗数保持回路10及びビ
ット拡張器12により、8ビットの被乗数Xが切替信号
に従い2ビット符号拡張又は0拡張されて保持されるこ
ととなり、また、ビット拡張器14及び乗数保持回路1
6により、8ビットの乗数Yが切替信号に従い2ビット
符号拡張又は0拡張されて保持されることとなるからで
ある。そして、このことは、第2実施形態の繰り返し乗
算器M2についても同様である。
As described above, one embodiment of the present invention has been described. However, it is needless to say that the present invention is not limited to the above-described embodiments, but can take various forms. For example, in the iterative multiplier M1 of the first embodiment, the order of connection between the multiplicand holding circuit 10 and the bit extender 12 or the order of connection between the bit extender 14 and the multiplier holding circuit 16 may be changed. That is, even if the order of connection is changed, the multiplicand X of 8 bits is held by the 2-bit sign extension or 0 extension according to the switching signal and held by the multiplicand holding circuit 10 and the bit extender 12. Extender 14 and multiplier holding circuit 1
6, the 8-bit multiplier Y is 2-bit code-extended or 0-extended according to the switching signal and held. This is the same for the iterative multiplier M2 of the second embodiment.

【0105】また、上記各実施形態の繰り返し乗算器M
1,M2では、演算サイクル信号として、各サイクル毎
に値が変化する信号を用いたが、これに限るものではな
い。例えば、各サイクル毎に立ち上がる(或いは立ち下
がる)クロック信号と初期化信号とを演算サイクル信号
として用い、被乗数保持回路10、乗数保持回路16、
乗数ビット選択回路18,34、及び被加数選択回路3
2の各々は、初期化信号を受けてから上記クロック信号
が立ち上がった(或いは立ち下がった)回数により、演
算のサイクル数を把握するように構成することができ
る。
The repetition multiplier M of each of the above embodiments is used.
In 1 and M2, as the operation cycle signal, a signal whose value changes in each cycle is used, but the present invention is not limited to this. For example, a clock signal that rises (or falls) in each cycle and an initialization signal are used as operation cycle signals, and the multiplicand holding circuit 10, the multiplier holding circuit 16,
Multiplier bit selection circuits 18 and 34 and augend selection circuit 3
Each of 2 can be configured to grasp the number of operation cycles based on the number of times the clock signal rises (or falls) after receiving the initialization signal.

【0106】一方、上記各実施形態の繰り返し乗算器M
1,M2では、2次のブースのアルゴリズムを用いてい
るため、生成すべき部分積の数を減らすことができる
が、部分積は、例えば乗数Yの1ビットずつに対応して
生成する等、2次のブースのアルゴリズム以外によって
生成するように構成しても良い。
On the other hand, the repetition multiplier M of each of the above embodiments
In M1 and M2, since the second-order Booth algorithm is used, the number of partial products to be generated can be reduced. You may comprise so that it may generate | generate by the algorithm other than the secondary booth algorithm.

【0107】また、上記各実施形態の繰り返し乗算器M
1,M2は、符号付き乗算と符号無し乗算とを共通のハ
ードウエアで択一的に実行するものであったが、本発明
は、符号付き乗算のみを行う乗算器、或いは、符号無し
乗算のみを行う乗算器についても、全く同様に適用する
ことができる。
The repetition multiplier M of each of the above embodiments is used.
1 and M2 execute signed multiplication and unsigned multiplication alternatively with common hardware, but the present invention provides a multiplier that performs only signed multiplication or only an unsigned multiplication. Can be applied in exactly the same way.

【0108】例えば、第1実施形態の繰り返し乗算器M
1において、2つのビット拡張器12,14を削除すれ
ば、符号付き乗算のみを行う繰り返し乗算器が得られ
る。そして、このように構成した場合には、図10に示
した従来の繰り返し乗算器J1と比較して、積を得るの
に必要なサイクル数を4サイクルから3サイクルへと1
つ減らすことができる。
For example, the repetition multiplier M of the first embodiment
In 1, if the two bit extenders 12 and 14 are deleted, an iterative multiplier that performs only signed multiplication can be obtained. In the case of such a configuration, the number of cycles required to obtain a product is reduced from four to three as compared with the conventional repetitive multiplier J1 shown in FIG.
Can be reduced.

【0109】また更に、上記各実施形態の繰り返し乗算
器M1,M2は、8ビットの被乗数Xと乗数Yを入力し
て8ビット×8ビットの乗算を行うものであったが、本
発明は、他のビット長の乗算を行う繰り返し乗算器に対
しても、全く同様に適用することができる。
Further, the repetitive multipliers M1 and M2 of the above embodiments are configured to perform an 8-bit × 8-bit multiplication by inputting an 8-bit multiplicand X and a multiplier Y. The same can be applied to a repetitive multiplier that performs multiplication of another bit length.

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

【図1】 第1実施形態の繰り返し乗算器の構成を表す
ブロック図である。
FIG. 1 is a block diagram illustrating a configuration of an iterative multiplier according to a first embodiment.

【図2】 図1の繰り返し乗算器の乗算動作を表す模式
図である。
FIG. 2 is a schematic diagram illustrating a multiplication operation of the iterative multiplier of FIG. 1;

【図3】 図1の繰り返し乗算器における乗数ビット選
択回路の作用を説明する説明図である。
FIG. 3 is an explanatory diagram illustrating an operation of a multiplier bit selection circuit in the iterative multiplier of FIG. 1;

【図4】 第2実施形態の繰り返し乗算器の構成を表す
ブロック図である。
FIG. 4 is a block diagram illustrating a configuration of an iterative multiplier according to a second embodiment.

【図5】 図4の繰り返し乗算器の乗算動作を表す模式
図である。
FIG. 5 is a schematic diagram illustrating a multiplication operation of the iterative multiplier of FIG. 4;

【図6】 図4の繰り返し乗算器における乗数ビット選
択回路の作用を説明する説明図である。
FIG. 6 is an explanatory diagram illustrating an operation of a multiplier bit selection circuit in the iterative multiplier of FIG. 4;

【図7】 2次のブースのアルゴリズムを説明する真理
値表である。
FIG. 7 is a truth table illustrating a secondary Booth algorithm.

【図8】 2次のブースのアルゴリズムを用いた2の補
数表示形式の8ビット×8ビットの乗算を説明する説明
図である。
FIG. 8 is an explanatory diagram for explaining multiplication of 8 bits × 8 bits in a two's complement display format using a secondary Booth algorithm.

【図9】 2次のブースのアルゴリズムにおける乗数の
ビットのグループ分けを説明する説明図である。
FIG. 9 is an explanatory diagram illustrating grouping of bits of a multiplier in a secondary Booth algorithm.

【図10】 2次のブースのアルゴリズムを用いて2の
補数表示形式の8ビット×8ビットの乗算を行う従来の
繰り返し乗算器の構成を表すブロック図である。
FIG. 10 is a block diagram showing a configuration of a conventional repetition multiplier that performs multiplication of 8 bits × 8 bits in a 2's complement format using a second-order Booth algorithm.

【図11】 図10の繰り返し乗算器の乗算動作を表す
模式図である。
FIG. 11 is a schematic diagram illustrating a multiplication operation of the iterative multiplier of FIG.

【図12】 2次のブースのアルゴリズムを用いて8ビ
ット×8ビットの符号付き乗算と符号無し乗算とを切り
替えて行う場合の実行例を説明する説明図である。
FIG. 12 is an explanatory diagram illustrating an execution example in a case where switching is performed between 8 bit × 8 bit signed multiplication and unsigned multiplication by using a secondary Booth algorithm.

【図13】 2次のブースのアルゴリズムを用いて8ビ
ット×8ビットの符号付き乗算と符号無し乗算とを実行
する従来の繰り返し乗算器を表すブロック図である。
FIG. 13 is a block diagram illustrating a conventional iterative multiplier that performs signed multiplication and unsigned multiplication of 8 × 8 bits using a second-order Booth algorithm.

【図14】 図13の繰り返し乗算器の乗算動作を表す
模式図である。
FIG. 14 is a schematic diagram illustrating a multiplication operation of the iterative multiplier of FIG.

【図15】 2次のブースのアルゴリズムを用いて8ビ
ット×8ビットの符号付き乗算と符号無し乗算とを実行
する従来の他の繰り返し乗算器を表すブロック図であ
る。
FIG. 15 is a block diagram showing another conventional iterative multiplier that performs signed multiplication and unsigned multiplication of 8 bits × 8 bits using a second-order Booth algorithm.

【図16】 図15の繰り返し乗算器の乗算動作を表す
模式図である。
FIG. 16 is a schematic diagram illustrating a multiplication operation of the iterative multiplier of FIG.

【図17】 図15の繰り返し乗算器における乗数ビッ
ト選択回路の作用を説明する説明図である。
FIG. 17 is an explanatory diagram illustrating an operation of a multiplier bit selection circuit in the iterative multiplier of FIG. 15;

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

M1,M2…繰り返し乗算器 L1 …第1制御線
L2 …第2制御線 10…被乗数保持回路 12,14…ビット拡張器
16…乗数保持回路 18,34…乗数ビット選択回路 20,22,36,38…部分積発生回路 24,4
0…符号拡張器 26,42…加算器 28…中間和保持回路 30,44…シフトレジスタ 32…被加数選択回路
M1, M2 ... iterative multiplier L1 ... first control line
L2: second control line 10: multiplicand holding circuit 12, 14: bit extender
16 Multiplier holding circuit 18, 34 Multiplier bit selection circuit 20, 22, 36, 38 ... Partial product generation circuit 24, 4
0: sign extender 26, 42 ... adder 28 ... intermediate sum holding circuit 30, 44 ... shift register 32 ... addend selection circuit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 被乗数を保持する被乗数保持手段と、 乗数を保持する乗数保持手段と、 演算のサイクル数を示す演算サイクル信号の変化に同期
して、前記乗数保持手段に保持されている乗数を構成す
るビットの一部を、下位のものから順番に選択すると共
に、その選択した一部のビットと前記被乗数保持手段に
保持されている被乗数とから部分積を生成する第1の部
分積発生回路と、 加算手段及び該加算手段の加算結果を保持する加算結果
保持手段を有し、前記加算手段が前記加算結果保持手段
に保持されている値に前記第1の部分積発生回路によっ
て生成された部分積を加算すると共に、前記加算結果保
持手段が前記演算サイクル信号の変化に同期して前記加
算手段の加算結果を更新して保持することにより、前記
第1の部分積発生回路によって生成される部分積を累積
加算する部分積累積加算回路と、 を備えた乗算器において、 前記第1の部分積発生回路は、前記乗数保持手段に保持
されている乗数を構成するビットのうちの最下位側の一
部のビットを除く他の一部のビットを、下位のものから
順番に選択して部分積を生成するように構成されてお
り、 更に、前記演算サイクル信号が最初の演算サイクルを示
す場合に、前記乗数保持手段に保持されている乗数を構
成するビットのうちの最下位側の一部のビットと前記被
乗数保持手段に保持されている被乗数とから部分積を生
成する第2の部分積発生回路と、 前記演算サイクル信号が最初の演算サイクルを示す場合
に、前記第2の部分発生回路によって生成された部分積
を、前記加算結果保持手段に保持されている値に代え
て、前記加算手段に被加数として供給する被加数選択回
路と、 を備えていることを特徴とする乗算器。
1. A multiplicand holding means for holding a multiplicand, a multiplier holding means for holding a multiplier, and a multiplier held by the multiplier holding means in synchronization with a change in an operation cycle signal indicating the number of operation cycles. A first partial product generation circuit for selecting some of the constituent bits in order from the lower order and generating a partial product from the selected partial bits and the multiplicand held in the multiplicand holding means; And an addition means and an addition result holding means for holding the addition result of the addition means, wherein the addition means generates the value held in the addition result holding means by the first partial product generation circuit. In addition to adding the partial products, the addition result holding unit updates and holds the addition result of the addition unit in synchronization with a change in the operation cycle signal, so that the first partial product generation circuit A partial product accumulative addition circuit for accumulatively adding the partial products generated by the multiplier. The first partial product generation circuit comprises: And a partial product is generated by selecting some bits other than the least significant bit in order from the least significant bit to generate a partial product. When a cycle is indicated, a partial product is generated from a part of the least significant bits of the bits constituting the multiplier held in the multiplier holding means and the multiplicand held in the multiplicand holding means. And a partial product generation circuit, wherein when the operation cycle signal indicates the first operation cycle, the partial product generated by the second partial generation circuit is replaced with a value held in the addition result holding means. hand And a addend selection circuit for supplying the addend to the adder as an addend.
【請求項2】 請求項1に記載の乗算器において、 前記第1の部分積発生回路及び第2の部分積発生回路
は、2次のブースのアルゴリズムに基づいて部分積を生
成すること、 を特徴とする乗算器。
2. The multiplier according to claim 1, wherein the first partial product generation circuit and the second partial product generation circuit generate a partial product based on a secondary Booth algorithm. Multiplier characterized.
【請求項3】 請求項2に記載の乗算器において、 前記被乗数保持手段は、 当該乗算器が行う乗算の種類を符号付き乗算と符号無し
乗算との何れかに設定するための切替信号が符号付き乗
算の実行を示す場合には、外部から入力される被乗数
を、その最上位ビットで2ビット符号拡張して保持し、
前記切替信号が符号無し乗算の実行を示す場合には、外
部から入力される被乗数を、その最上位ビット側を2ビ
ット0拡張して保持するように構成されており、 前記乗数保持手段は、 前記切替信号が符号付き乗算の実行を示す場合には、外
部から入力される乗数を、その最上位ビットで2ビット
符号拡張して保持し、前記切替信号が符号無し乗算の実
行を示す場合には、外部から入力される乗数を、その最
上位ビット側を2ビット0拡張して保持するように構成
されていること、 を特徴とする乗算器。
3. The multiplier according to claim 2, wherein the multiplicand holding means outputs a sign signal for setting the type of multiplication performed by the multiplier to one of signed multiplication and unsigned multiplication. When indicating the execution of multiplication with a sign, the multiplicand input from the outside is sign-extended with the most significant bit by 2 bits and held.
When the switching signal indicates the execution of unsigned multiplication, the multiplicand input from the outside is configured to hold the most significant bit side by extending 2 bits 0, and the multiplier holding means includes: When the switching signal indicates execution of signed multiplication, the multiplier input from the outside is sign-extended by 2 bits at the most significant bit and held, and when the switching signal indicates execution of unsigned multiplication. Is configured to hold a multiplier input from the outside by extending the most significant bit side by 2 bits 0, and holding the multiplier.
JP27153798A 1998-09-25 1998-09-25 Multiplier Expired - Lifetime JP3855491B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27153798A JP3855491B2 (en) 1998-09-25 1998-09-25 Multiplier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27153798A JP3855491B2 (en) 1998-09-25 1998-09-25 Multiplier

Publications (2)

Publication Number Publication Date
JP2000099313A true JP2000099313A (en) 2000-04-07
JP3855491B2 JP3855491B2 (en) 2006-12-13

Family

ID=17501455

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27153798A Expired - Lifetime JP3855491B2 (en) 1998-09-25 1998-09-25 Multiplier

Country Status (1)

Country Link
JP (1) JP3855491B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114239819A (en) * 2021-12-24 2022-03-25 西安交通大学 DSP-based hybrid bit width accelerator and fusion calculation method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114239819A (en) * 2021-12-24 2022-03-25 西安交通大学 DSP-based hybrid bit width accelerator and fusion calculation method
CN114239819B (en) * 2021-12-24 2023-09-26 西安交通大学 Mixed bit width accelerator based on DSP and fusion calculation method

Also Published As

Publication number Publication date
JP3855491B2 (en) 2006-12-13

Similar Documents

Publication Publication Date Title
JPS588009B2 (en) digital multiplier
JPH0831025B2 (en) Multiplication circuit
JP3277089B2 (en) Multiplier and product-sum operation unit
US5870322A (en) Multiplier to selectively perform unsigned magnitude multiplication or signed magnitude multiplication
JP3417286B2 (en) Multiplier
JP2000099313A (en) Multiplier
JP3660075B2 (en) Dividing device
JP3190826B2 (en) Product-sum operation unit
JP3123060B2 (en) Digital arithmetic circuit
JP3106767B2 (en) Multiplication method and multiplication circuit
JP4293665B2 (en) Remainder multiplier
JP2734438B2 (en) Multiplier
JP2001134556A (en) Repetitive multiplier and array multiplier
JP4042215B2 (en) Arithmetic processing apparatus and method
JP3017203B1 (en) Binary-decimal conversion circuit and method
JP2864598B2 (en) Digital arithmetic circuit
JP2004295345A (en) Arithmetic unit and multiplying unit
JP3012557B2 (en) Decimal-binary conversion circuit
JPH0368415B2 (en)
JP3241642B2 (en) Binary-decimal conversion circuit
JP2000172487A (en) Multiplier circuit and method therefor
JPH0944340A (en) Parallel multiplying circuit
JPH10312269A (en) Product sum computing element
JPH11134174A (en) Arithmetic circuit
JPH0773024A (en) Decimal multiplier

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041001

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060810

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: 20060822

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060904

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

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090922

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100922

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100922

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110922

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110922

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120922

Year of fee payment: 6