JP2635696B2 - Multiplication instruction processing method - Google Patents

Multiplication instruction processing method

Info

Publication number
JP2635696B2
JP2635696B2 JP63171831A JP17183188A JP2635696B2 JP 2635696 B2 JP2635696 B2 JP 2635696B2 JP 63171831 A JP63171831 A JP 63171831A JP 17183188 A JP17183188 A JP 17183188A JP 2635696 B2 JP2635696 B2 JP 2635696B2
Authority
JP
Japan
Prior art keywords
multiplier
partial
decoder
group
bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP63171831A
Other languages
Japanese (ja)
Other versions
JPH0222733A (en
Inventor
浩二 黒田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP63171831A priority Critical patent/JP2635696B2/en
Publication of JPH0222733A publication Critical patent/JPH0222733A/en
Application granted granted Critical
Publication of JP2635696B2 publication Critical patent/JP2635696B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔概 要〕 計算機システム内の乗算回路の乗算処理方式に関し、 乗算回路部のハードウェアの削減を目的とし、被乗数
を入力とする被乗数レジスタと、乗数の一部を入力とす
る乗数レジスタと、該乗数レジスタの乗数データをブー
スのアルゴリズムに従いデコードするデコーダと、該デ
コーダのデコード結果に基づき被乗数の倍数を演算する
倍数発生器と、該倍数発生器から出力される部分積を入
力とする複数段からなる第1の桁上げ保存加算器と、該
桁上げ保存算器の出力を入力とする第1の桁上げ先見加
算器とを備えた部分乗算器ブロックにおいて、 上記倍数発生器から出力される倍数の符号拡張部分の
すべてをデコードし符号拡張の和を求めるデコーダを設
けて構成する。
DETAILED DESCRIPTION OF THE INVENTION [Summary] Regarding a multiplication processing method of a multiplication circuit in a computer system, a multiplicand register for inputting a multiplicand and a part of a multiplier are input for the purpose of reducing hardware of the multiplication circuit unit. A multiplier register, a decoder for decoding the multiplier data of the multiplier register according to the Booth algorithm, a multiple generator for calculating a multiple of the multiplicand based on the decoding result of the decoder, and a partial product output from the multiple generator. A partial multiplier block comprising: a first carry save adder comprising a plurality of stages having an input; and a first carry look-ahead adder having an output of the carry save arithmetic as an input. A decoder is provided to decode all of the multiple code extension portions output from the generator and obtain the sum of the code extensions.

〔産業上の利用分野〕[Industrial applications]

本発明は、計算機システム内の乗算回路の乗算処理方
法に関するものであり、特に、ブースのアルゴリズムに
よる乗算処理方式における部分積の符号拡張部の処理に
関するものである。
The present invention relates to a multiplication processing method of a multiplication circuit in a computer system, and more particularly to a processing of a sign extension unit of a partial product in a multiplication processing method based on Booth's algorithm.

〔従来の技術〕[Conventional technology]

計算機システム内の乗算回路の乗算処理は、処理の高
速化及びハードウェアの削減の為、ブースのアルゴリズ
ムが通常良く使用される。
In the multiplication processing of the multiplication circuit in the computer system, Booth's algorithm is often used in order to speed up the processing and reduce hardware.

第7図は2ビットのブースのアルゴリズムについて説
明する図を示しており、同図(a)は、2ビットのブー
スのアルゴリズムによる乗数ビットの区分について説明
する図を示しており、 Fは1ビットの固定データ、b00、b01、b02〜b14、b
15は乗数を構成する2進数の各ビット(以後、bitとも
称す)、b00はMSB(Most Significant Bit)、b15はLSB
(Least Siginificant Bit)、G1〜G9は2ビットのブー
スのアルゴリズムに従った乗数ビットのグループ区分を
表わしている。同図(b)は、各グループの構成ビット
とビット値に対応してブースのアルゴリズムに従いデコ
ードされる数値Nを示す図であり、周知のものである。
該数値Nは被乗数との積が取られ倍数を発生する。
FIG. 7 is a diagram for explaining the 2-bit Booth algorithm, and FIG. 7A is a diagram for explaining the division of multiplier bits by the 2-bit Booth algorithm. Fixed data, b 00 , b 01 , b 02 to b 14 , b
15 is each bit of a binary number forming a multiplier (hereinafter also referred to as bit), b 00 is MSB (Most Significant Bit), and b 15 is LSB
(Least Siginificant Bit), G1 to G9 represent group division of multiplier bits according to the 2-bit Booth algorithm. FIG. 1B is a diagram showing a numerical value N to be decoded according to the Booth algorithm corresponding to the constituent bits and bit values of each group, and is well known.
The number N is multiplied by the multiplicand to generate a multiple.

第8図は倍数の符号を示す図であり、デコードされた
数値Nと、被乗数と、被乗数×数値Nなる倍数との符号
関係を表わしている。該倍数は各グループG1〜G9毎に生
成され、各々乗算時の部分積の数値データ部を構成し、
また該部分積が負となる場合は、補数表示に従い、上位
桁に向って符号の拡張が必要となる。
FIG. 8 is a diagram showing the sign of the multiple, and shows the sign relationship between the decoded numerical value N, the multiplicand, and the multiple of multiplicand × numerical value N. The multiple is generated for each of the groups G1 to G9, and constitutes a numerical data portion of a partial product at the time of multiplication, respectively.
When the partial product is negative, it is necessary to extend the sign toward the upper digit according to the complement notation.

第9図は、乗算時の部分積の様子を示す図であり、51
〜59は各グループのデコードされた数値Nと乗算器の積
なる部分積(図中〔Gn〕で示す記号はn番目のグループ
のブースのアルゴリズムによるデコードされた数値Nを
表わしている)、60は最終結果なる積、61は部分積での
符号拡張が必要となる部分を表している。また、このう
ち61−1はグループ1、グループ2、グループ3の部分
積での符号拡張が必要となる部分で、61−2はグループ
4、グループ5、グループ6の部分積での符号拡張が必
要となる部分で、61−3はグループ7、グループ8、グ
ループ9の部分積での符号拡張が必要となる部分であ
る。
FIG. 9 is a diagram showing a state of a partial product at the time of multiplication.
Reference numerals 59 to 59 denote a partial product obtained by multiplying the decoded numerical value N of each group by the multiplier (the symbol [Gn] in the figure represents the numerical value N decoded by the Booth algorithm of the n-th group), 60 Denotes a product as a final result, and 61 denotes a portion that requires sign extension in a partial product. Among them, 61-1 is a part that requires sign extension in the partial product of group 1, group 2, and group 3, and 61-2 is a sign extension in the partial product of group 4, group 5, and group 6. In the required portion, reference numeral 61-3 denotes a portion that requires sign extension in a partial product of the group 7, the group 8, and the group 9.

すなわち、部分積は数値データ部の他に拡張された符
号部が上位桁に向って付加され、また、各部分積51〜59
は符号拡張部61と合はせて加算され最終結果としての積
60を得ている。
That is, in the partial product, an extended code part is added to the upper digit in addition to the numerical data part.
Is added together with the sign extension unit 61 and added as the final result.
Has got 60.

所で、拡張された符号部を有する部分積の加算におい
ては、拡張された符号部は各部分積においては数値の
“1"か“0"かどちらかに一義的に決まるものであり、符
号同志をあえて加算することはなく、デコーダを使用し
ハードウェアの減少を図っている。
In addition, in addition of partial products having an extended sign part, the extended sign part is uniquely determined by either “1” or “0” of a numerical value in each partial product. We do not dare add comrades, but use a decoder to reduce hardware.

これを具体的な例を上げて説明すると、 第10図は符号拡張部の具体的な例を示す図であり、グ
ループ4、グループ5、グループ6を例に取っている。
同図において、Aはグループ4の部分積(数値データ部
と符号拡張部)、Bはグループ5の部分積(数値データ
部と符号拡張部)、Cはグループ6の部分積(数値デー
タ部と符号拡張部)、SAはグルー4の部分積の符号拡張
部の各ビット、XAはグループ4の部分積の数値データ部
の各ビット、SBはグループ5の部分積の符号拡張部の各
ビット、XBはグループ5の部分席の数値データ部の各ビ
ット、SCはグループ6の部分積の符号拡張部の各ビッ
ト、XCはグループ6の部分積の数値データ部の各ビッ
ト、点線で囲まれる部分62は符号拡張部全体、実線の太
枠で囲まれる部分63は符号拡張部の共通部分を表わして
いる。
This will be described with reference to a specific example. FIG. 10 is a diagram showing a specific example of the sign extension unit, taking groups 4, 5, and 6 as examples.
In the figure, A is a partial product of group 4 (numerical data part and sign extension part), B is a partial product of group 5 (numeric data part and sign extension part), and C is a partial product of group 6 (numeric data part and sign extension part). Sign extension part), SA is each bit of the sign extension part of the partial product of glue 4, XA is each bit of the numerical data part of the partial product of group 4, SB is each bit of the sign extension part of the partial product of group 5, XB is each bit of the numerical data part of the partial seat of group 5, SC is each bit of the sign extension part of the partial product of group 6, XC is each bit of the numerical data part of the partial product of group 6, the part enclosed by the dotted line Reference numeral 62 denotes the entire sign extension unit, and a portion 63 surrounded by a thick solid frame represents a common portion of the sign extension unit.

従来の技術では、同図の部分積A、B、Cを加算する
場合、部分積A、B、Cの符号が出そろう部分63(ビッ
トb0〜b5間)では、符号ビットSA、SB、SCをそれぞれの
ビット毎に加算するのではなく、 ハードウェアの削減を図るために、符号SA、SB、SCを
入力とし、符号拡張の和のb0〜b5を出力するデコーダを
使用していた。
In the prior art, in the case of adding the partial products A, B, C in the figure, the partial products A, B, C numerals appear all together portion 63 (bits b 0 ~b 5 between), sign bit SA, SB, SC rather than adding for each bit, in order to reduce the hardware, code SA, SB, and SC as an input, uses a decoder that outputs b 0 ~b 5 of the sum of the sign extension Was.

第11図は、従来の符号拡張部のデコーダの入出力関係
を示す図であり、 符号SA、SB、SCを入力として、符号拡張の和のb0〜b5
までを直に得るようにして、該符号拡張の和をもとめ
て、数値データ部と加算することにより、ハードウェア
の削減を図るよう構成されていた。
FIG. 11 is a diagram showing an input / output relationship of a decoder of a conventional code extension unit. The codes SA, SB, and SC are input, and b 0 to b 5
, The sum of the sign extension is obtained, and the sum is added to the numerical data part, thereby reducing the hardware.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

従来例の乗算装置では、部分積を加算する場合、部分
積の符号拡張が出そろう部分についてはデコーダを使用
し符号拡張の和を得ていた。そのため、倍数発生器の符
号拡張部でデコードされない部分については、通常の数
値データと同様に加算して行く必要があり、その分、加
算回路が複雑となり、かつ、部分積を加算する桁上げ保
存回路への入力数が多くなりハードウェアが増大せざる
を得なかった。
In the conventional multiplication apparatus, when adding partial products, a decoder is used to obtain the sum of the sign extensions of the parts where the sign extension of the partial products is likely to occur. Therefore, for the part that is not decoded by the sign extension part of the multiple generator, it is necessary to perform addition in the same way as ordinary numerical data, which complicates the addition circuit, and carries the carry for adding the partial product. The number of inputs to the circuit increased and the hardware had to increase.

第12図は倍数器内の倍数発生回路と桁上げ保存加算回
路の一部を示す図であって、特にグループ4、グループ
5、グループ6の各部分積の部分についての回路列を示
したものである。
FIG. 12 is a diagram showing a part of a multiple generation circuit and a carry save addition circuit in a multiplier, and particularly shows a circuit sequence for each partial product of groups 4, 5, and 6; It is.

同図において、30−1は倍数発生回路、31−1は桁上
げ保存加算回路、32はグループ6の倍数発生回路ブロッ
ク、33はグループ5の倍数発生回路ブロック、34はグル
ープ4の倍数発生回路ブロック、35はAND回路、36はワ
イヤードOR回路、37はゲート回路、39は3入力の桁上げ
保存加算器(CSA)、40はAND回路を表している。
In the figure, 30-1 is a multiple generation circuit, 31-1 is a carry save addition circuit, 32 is a multiple generation circuit block of group 6, 33 is a multiple generation circuit block of group 5, and 34 is a multiple generation circuit of group 4. A block, 35 is an AND circuit, 36 is a wired OR circuit, 37 is a gate circuit, 39 is a 3-input carry save adder (CSA), and 40 is an AND circuit.

また、記号+FIXEDは被乗算数の先頭に付加された1bi
tの固定データ、+CAND−SIGNは被乗数の符号信号、−C
AND−SIGNは被乗数の符号信号の反転理論値、+CAND−0
0は被乗数のMSBのビット値、−CAND−00は被乗数のMSB
のビット値の反転論理値、+CAND−nは被乗数のnビッ
トのビット値、−CAND−nは被乗数のnビット目のビッ
ト値の反転論理値、+G6−bit5はグループ6の部分積の
5ビット目のビット値、−G6−bit5はグループ6の部分
積の5ビット目のビット値の反転理論値、同様にして、
+Gm−bitnはグループmの部分積のnビット目のビット
値、−Gm−bitnはグループmの部分積のnビット目のビ
ット値の反転理論値、+SUM−bit6は6ビット目の加算
値、同様にして、+SUM−bitnはビット目の加算値、CRR
Y−bit7は7bitn目のキャリー信号、同様にして、+CARR
Y−bitnはnビット目のキャリー信号、A1、A2、A3、A
4、B1、B2、B3、B4、C1、C2、C3、C4はブースのアルゴ
リズムに従った倍数信号線を表わしている。
The symbol + FIXED is 1bi added to the beginning of the multiplicand.
t fixed data, + CAND-SIGN is the sign signal of the multiplicand, -C
AND-SIGN is the inverted theoretical value of the sign signal of the multiplicand, + CAND-0
0 is the bit value of the MSB of the multiplicand, -CAND-00 is the MSB of the multiplicand
+ CAND-n is the n-bit bit value of the multiplicand, -CAND-n is the inverted logical value of the n-th bit value of the multiplicand, and + G6-bit5 is 5 bits of the partial product of group 6. The bit value of the fifth bit, −G6−bit5, is the inverted theoretical value of the bit value of the fifth bit of the partial product of group 6, similarly,
+ Gm-bitn is the bit value of the nth bit of the partial product of the group m, -Gm-bitn is the inverted theoretical value of the bit value of the nth bit of the partial product of the group m, + SUM-bit6 is the addition value of the 6th bit, Similarly, + SUM-bitn is the added value of the bit, CRR
Y-bit7 is the carry signal of the 7th bit, similarly, + CARR
Y-bitn is the carry signal of the n-th bit, A1, A2, A3, A
4, B1, B2, B3, B4, C1, C2, C3, C4 represent multiple signal lines according to the Booth algorithm.

被乗数の符号信号+CAND−SIGNは、固定データ+FIXE
Dとビット値+CAND−00の理論積で作成され、倍数回路
ブロック32の入力信号として使用される。
Multiplicand sign signal + CAND-SIGN is fixed data + FIXE
It is created by the theoretical product of D and the bit value + CAND-00, and is used as an input signal of the multiple circuit block 32.

32で示すグループ6の倍数回路は、被乗数の符号信号
±CAND−SIGN及び各構成ビット値±CAND−00〜±CAND−
nを入力とし、倍数選択信号線A1、A2、A3、A4により第
1図に示すデコーダ5の出力結果に従い、0、±1、±
2、のいずれかの倍数演算を実行し、その結果を±G6−
ビット5〜±G6+bitnのビット値として得る、他のグル
ープ5、グループ4の倍数発生回路についても同様であ
る。
The multiple circuit of group 6 indicated by 32 includes a code signal ± CAND-SIGN of the multiplicand and each constituent bit value ± CAND-00 to ± CAND-
n, and 0, ± 1, ± 1 according to the output result of the decoder 5 shown in FIG. 1 through multiple selection signal lines A1, A2, A3, A4.
2. Execute the multiple operation of either of 2 and the result is ± G6−
The same applies to the multiple generation circuits of the other groups 5 and 4, which are obtained as the bit values of bits 5 ± G6 + bitn.

倍数発生回路30−1内の各グループ32、33、34の倍数
結果は31−1で示した桁上げ保存加算回路の入力とな
り、各ビットの加算値及びキャリーを得る。
The multiple result of each of the groups 32, 33, and 34 in the multiple generation circuit 30-1 is input to the carry save addition circuit indicated by 31-1, and the addition value and carry of each bit are obtained.

従来の構成では、この桁上げ加算器の入力線は12本、
3入力桁上げ保存加算器39が4個であるのでゲート数は
40個あることになる。また、この計算は上位4ビットに
ついてのみ行ったものであるから3ブロック当では入力
線数は36本ゲート数は120個となる。
In the conventional configuration, this carry adder has 12 input lines,
Since there are four 3-input carry save adders 39, the number of gates is
There are forty. Since this calculation is performed only for the upper 4 bits, the number of input lines is 36 and the number of gates is 120 for three blocks.

本発明は、上記問題点に鑑みなされたものであり、 符号拡張部と数値データ部の加算形式を単純化し、ま
た、桁上げ保存加算回路への入力線数を減少させ、ハー
ドウェアの削減を図ることを目的とする。
The present invention has been made in view of the above problems, and simplifies the addition format of a sign extension unit and a numerical data unit, reduces the number of input lines to a carry-save addition circuit, and reduces hardware. The purpose is to aim.

〔課題を解決するための手段〕[Means for solving the problem]

本発明によれば、上述の目的は、前記特許請求の範囲
に記載した手段により達成される。
According to the present invention, the above-mentioned object is achieved by the means described in the claims.

すなわち、本発明は、被乗数を入力とする被乗数レジ
スタと、乗数の一部を入力すると乗数レジスタと、該乗
数レジスタの乗数データをブースのアルゴリズムに従い
デコードするデコーダと、該デコーダのデコード結果に
基づき被乗数の倍数を演算する倍数発生器と、該倍数発
生器から出力される部分積を入力とする複数段からなる
第1の桁上げ保存加算器と、該桁上げ保存加算器の出力
を入力とする第1の桁上げ先見加算器とを備えた部分乗
算器ブロックを複数個有し、かつ、該部分乗算器ブロッ
クの複数個の出力結果の全体を加算する第2の桁上げ保
存加算器と、該桁上げ保存加算器の出力を入力とする第
2の桁上げ先見加算器とを備えた乗算装置において、 該部分乗算器ブロック中には、倍数発生器から出力さ
れる倍数の符号拡張部分のすべてをデコードし符号拡張
の和を求めるデコーダを設け、該デコーダの出力結果を
第1の桁上げ保存加算器にて数値データと加算するよう
構成された乗算命令処理方式である。
That is, the present invention provides a multiplicand register that receives a multiplicand, a multiplier register that receives a part of the multiplier, a decoder that decodes the multiplier data of the multiplier register according to the Booth algorithm, and a multiplicand based on the decoding result of the decoder. , A first carry save adder comprising a plurality of stages to which the partial product output from the multiple generator is input, and an output of the carry save adder being an input. A second carry save adder having a plurality of partial multiplier blocks each including a first carry look-ahead adder, and adding all of a plurality of output results of the partial multiplier blocks; A second carry look-ahead adder receiving the output of the carry save adder as an input, wherein the partial multiplier block includes a sign extension portion of a multiple output from a multiple generator. Are provided, and a decoder for obtaining the sum of sign extensions is provided, and the output result of the decoder is added to the numerical data by a first carry save adder.

〔作 用〕(Operation)

部分乗算器ブロックにおいて、被乗数を保持するレジ
スタと、部分乗数を保持するレジスタとで乗算を行うに
際し、 部分乗数は、例えば2ビットのブースのアルゴリズム
に従い、ビット区分された複数のグループに分割され
る。
In the partial multiplier block, when performing the multiplication by the register holding the multiplicand and the register holding the partial multiplier, the partial multiplier is divided into a plurality of bit-divided groups according to, for example, a 2-bit Booth algorithm. .

各グループを構成するビット値は上記ブースのアルゴ
リズムに従うデコーダの入力となり、デコード結果なる
数値Nが各グループ毎に発生される。
The bit values constituting each group are input to a decoder according to the Booth algorithm, and a numerical value N as a decoding result is generated for each group.

該数値Nと被乗数との積が倍数器内で倍数として求ま
り、該倍数は各グループ毎に求まり、それぞれ乗算にお
ける部分積を構成する。該各グループ毎の部分積は桁上
げ保存加算器及び桁上げ先見加算器を用いて全体として
合計加算されるが、各部分積は、それぞれ桁位置が異な
るため、例えば負数などでは、補数表示のために上位桁
に向って符号の拡張を行ってから加算する必要がある
が、本発明では、各グループの部分積の符号拡張部のす
べてと、部分積の数値データ部と分離して、数値データ
部は桁上げ保存加算器の入力として加算開始し、符号拡
張部は別途デコーダに入力し、符号拡張部の和として求
め、桁上げ保存加算器の段階でまとめて加算する。
The product of the numerical value N and the multiplicand is determined as a multiple in the multiplier, and the multiple is determined for each group, and constitutes a partial product in the multiplication. The partial products for each group are summed as a whole by using a carry save adder and a carry look-ahead adder. However, since each partial product has a different digit position, for example, in the case of a negative number, a complement notation is used. Therefore, it is necessary to add the sign after extending the sign toward the upper digit, but in the present invention, all the sign extension parts of the partial products of each group and the numerical data part of the The data section starts addition as an input to the carry save adder, and the sign extension section is separately input to a decoder, obtained as a sum of the sign extension sections, and added together at the carry save adder stage.

〔実施例〕〔Example〕

第1図は、本発明の乗算命令処理方式が適用されるシ
ステム構成図を示しており、 1−1は被乗数の保持されるレジスタ、1−2は乗数
の保持されるレジスタ(本例では64ビット)、 2−1、2−2、2−3、2−4は乗数64ビットを16
ビット毎に分割して乗算を行う部分乗算器ブロック、 3は被乗数の保持レジスタ、4は分割された乗数の部
分乗数の保持レジスタ(本例では16ビット)、5はブー
スのアルゴリズムによるデコーダ、6は倍数発生回路
(MPG)、7は符号拡張部のデコーダ、8は桁上げ保存
加算回路(CSA)、9は桁上げ先見加算回路(CPA)、10
−1〜10−4は各乗算器ブロック2−1〜2−4の結果
を保持するレジスタ、11−1〜11−8はレジスタ10−1
〜10−4の内容をビット分割して保持するレジスタ、 12−1、12−2は桁上げ保存加算回路(CSA)、13−
1、13−2は桁上げ先見加算回路(CPA)、14−1、14
−2は結果保持用レジスタ、15は桁上げ先見加算回路
(CPA)、16は最終結果保持用レジスタを表わしてい
る。
FIG. 1 shows a system configuration to which a multiplication instruction processing method of the present invention is applied. 1-1 is a register holding a multiplicand, 1-2 is a register holding a multiplier (64 in this example). 2-1), 2-2, 2-3, and 2-4 are 64 bits of multiplier 16
A partial multiplier block that performs division and multiplication for each bit; 3 is a register for holding a multiplicand; 4 is a register for holding a partial multiplier of a divided multiplier (in this example, 16 bits); 5 is a decoder using Booth's algorithm; Is a multiple generation circuit (MPG), 7 is a decoder of a sign extension unit, 8 is a carry save addition circuit (CSA), 9 is a carry look-ahead addition circuit (CPA), 10
-1 to 10-4 are registers for holding the results of the multiplier blocks 2-1 to 2-4, and 11-1 to 11-8 are registers 10-1.
Registers that hold the contents of .about.10-4 by dividing them into bits. 12-1 and 12-2 are carry save and add circuits (CSA).
1, 13-2 are carry look-ahead addition circuits (CPA), 14-1, 14
-2 is a result holding register, 15 is a carry look-ahead adder (CPA), and 16 is a final result holding register.

本図のシステムの全体動作について概略説明を行う
と、まず、被乗算数はレジスタ1−1に、乗数はレジス
タ1−2に保持されている。乗数は本システムの場合64
ビットで構成されており、各16ビットずつに4分割さ
れ、部分乗算器ブロック2−1〜2−4に与えられ乗算
がブロック単位に分割して行なわれる。部分乗算器ブロ
ック2−1〜2−4中ではブースのアルコリズムが使用
され、4個のブロック2−1〜2−4は、同一のハード
ウェア構成を取っている。
The overall operation of the system shown in this figure will be briefly described. First, the multiplicand is held in the register 1-1 and the multiplier is held in the register 1-2. The multiplier is 64 for this system
Each of the partial multiplier blocks 2-1 to 2-4 is divided into four blocks, and multiplication is performed in block units. Booth's algorithm is used in the partial multiplier blocks 2-1 to 2-4, and the four blocks 2-1 to 2-4 have the same hardware configuration.

部分乗算器ブロック2−1〜2−4での演算結果は、
それぞれレジスタ10−1〜10−4に保持され、該レジス
タの内容は、それぞれビット分割されて、レジスタ11−
1〜11−8に保持され、12−1、12−2で示す桁上げ保
存加算回路の2系統に分けて並列に演算が進められ、そ
れぞれ、桁上げ先見回路13−1、13−2を通じて結果が
レジスタ14−1、14−2に保持され、両レジスタ14−
1、14−2に保持されたデータは桁上げ先見回路15で加
算され、最終の積をレジスタ16上に得る。
The operation results in the partial multiplier blocks 2-1 to 2-4 are as follows:
The contents of the registers are respectively divided into bits, and held in registers 10-1 to 10-4.
The calculation is carried out in parallel by being divided into two systems of carry save and add circuits denoted by 12-1 and 12-2, and carried through the look-ahead circuits 13-1 and 13-2, respectively. The result is held in registers 14-1 and 14-2, and both registers 14-
The data held in 1, 14-2 are added by the carry look-ahead circuit 15, and the final product is obtained on the register 16.

本発明の乗算処理方式は部分乗算器ブロック2−1〜
2−4にそれぞれ適用され、該ブロック内のハードウェ
アの削減を目的とするものであり、代表的に2−1で示
す部分乗算器ブロックを例に取って説明する。
The multiplication processing method of the present invention employs partial multiplier blocks 2-1 to 2-1.
Each of the blocks is applied to 2-4, and is intended to reduce hardware in the block. A description will be given of a partial multiplier block shown as 2-1 as an example.

部分乗算器ブロック2−1においては、被乗数の保持
レジスタ3の内容と部分乗数の保持レジスタ4の内容と
の乗算を行うに際し、部分乗数の保持レジスタ4の内容
は2ビットのブースのアルゴリズムに従ったデコーダ5
により、2ビット区分のグループ毎に、デコード結果に
なる数値Nを発生し、各グループ毎に該数値Nと被乗数
の積が倍数器(MPG)6で行なわれ、各グループ毎に部
分積が生成される。該部分積は多段の桁上げ保存加算器
8により加算され、桁上げ先見加算器9により最終結果
を得るよう構成される。
In the partial multiplier block 2-1, when the contents of the multiplicand holding register 3 and the contents of the partial multiplier holding register 4 are multiplied, the contents of the partial multiplier holding register 4 follow the 2-bit Booth algorithm. Decoder 5
As a result, a numerical value N serving as a decoding result is generated for each group of 2-bit divisions, and the product of the numerical value N and the multiplicand is performed by a multiplier (MPG) 6 for each group, and a partial product is generated for each group. Is done. The partial products are added by a multi-stage carry save adder 8, and the carry look-ahead adder 9 is configured to obtain a final result.

7で示すデコーダは部分積の符号拡張部のデコーダで
あり、該デコーダ7の出力結果は桁上げ保存加算器8と
加算される。
The decoder indicated by 7 is a decoder for the sign extension unit of the partial product, and the output result of the decoder 7 is added to the carry save adder 8.

本発明の乗算処理方式は、該符号拡張部のデコーダ7
のデコード方法に特徴があり、 以下その詳細について説明する。
The multiplication processing method according to the present invention uses the decoder 7 of the sign extension unit.
The decoding method is characterized in detail, and the details will be described below.

第2図は、乗算時の部分積の様子を示す図であり、17
〜25は各グループのデコーダ5によりデコードされた数
値Nと被乗数との積なる部分積の数値データ部(図中
[Gn]で示す行号はn番目のグループのブースのアルゴ
リズムによるデコードされた数値Nを示す)、26は最終
結果なる積、27は部分積での符号拡張が必要となる部分
を表わしている。
FIG. 2 is a diagram showing a state of a partial product at the time of multiplication.
Numeral 25 denotes a numerical data part of a partial product obtained by multiplying the numerical value N and the multiplicand decoded by the decoder 5 of each group (the symbol indicated by [Gn] in the figure indicates the numerical value decoded by the Booth algorithm of the n-th group) N), 26 is the final product, and 27 is the portion that requires sign extension in the partial product.

すなわち、例えば、グループ1に属する部分積が、負
であったとすると補数表示の為に、数値“1"を上位桁に
向って拡張する必要があり、この符号の拡張は同図に示
す如く、各グループ毎の部分積について必要であり、下
位桁に属する部分積程符号拡張部のビット数が多くな
り、27で示す符号拡張が必要となる部分(斜線部)のご
とくなる。
That is, for example, if the partial product belonging to group 1 is negative, it is necessary to extend the numerical value “1” toward the upper digit for complement display, and this sign is extended as shown in FIG. This is necessary for the partial product of each group, and the number of bits of the partial product code extension unit belonging to the lower order digit is increased.

27で示す部分のうち、27−1はグループ1、グループ
2、グループ3の部分積の符号拡張が必要となる部分で
あり、同様に27−2はグループ4、グループ5、グルー
プ6の部分積の符号拡張が必要となる部分で、27−3は
グループ7、グループ8、グループ9の部分積の符号拡
張が必要となる部分である。
Of the portions indicated by 27, 27-1 is a portion that requires sign extension of partial products of groups 1, 2 and 3, and similarly 27-2 is a partial product of groups 4, 5 and 6. Is the portion that requires sign extension, and 27-3 is the portion that requires sign extension of the partial product of group 7, group 8, and group 9.

第3図は、符号拡張部の具体的な例を示す図であり、
28はグループ4、5、6の部分積の符号拡張部全体、29
はグループ4、5、6の部分積の数値データ部、その他
の符号は、従来技術の項で説明した第10図の符号と同様
である。
FIG. 3 is a diagram showing a specific example of a sign extension unit;
28 is the entire sign extension of the partial products of groups 4, 5, and 6;
Is the numerical data part of the partial product of groups 4, 5, and 6, and the other symbols are the same as the symbols in FIG. 10 described in the section of the prior art.

本発明では、符号拡張部全体28を、第1図で示す符号
拡張部のデコーダ7でデコードし、符号拡張の和を求め
るものであり、符号の出そろう部分のみならず、符号拡
張部すべてをデコードする方法を用いるものである。
In the present invention, the entire sign extension unit 28 is decoded by the decoder 7 of the sign extension unit shown in FIG. 1, and the sum of sign extensions is obtained. The method is used.

第4図は、本発明による符号拡張部のデコーダ7の入
出力関係を示す図であり、第3図で示符号拡張部全体28
の場合の符号入力SA,SB,SCに対する出力ビットb0〜b9
でのデコード結果を示している。
FIG. 4 is a diagram showing the input / output relationship of the decoder 7 of the sign extension unit according to the present invention.
Code input SA of cases, SB, shows the result of decoding to the output bit b 0 ~b 9 for SC.

例えば、第1図において、部分乗算器ブロック2−1
中の倍数器(MPG)6で生じた部分積は、その符号拡張
部が、全てデコーダ7によりデコードされ、符号拡張の
和として求められる。
For example, in FIG. 1, the partial multiplier block 2-1
The sign extension of the partial product generated by the middle multiplier (MPG) 6 is entirely decoded by the decoder 7, and is obtained as the sum of sign extension.

従って桁上げ保存加算器8は、まず、部分積の数値デ
ータ部だけを入力とし演算開始し、 また、符号拡張の和は、ひとまとめとして、桁上げ保
存加算器8の後段で加算すれば良く、 加算形式の単純化及び、桁上げ保存加算回路8への入
力線数が減少する。
Therefore, the carry save adder 8 first starts the operation by inputting only the numerical value data part of the partial product, and the sum of the sign extension may be added as a group at the subsequent stage of the carry save adder 8. The addition form is simplified, and the number of input lines to the carry save addition circuit 8 is reduced.

次に、具体的な回路例を上げてその動作を説明する。 Next, the operation will be described with reference to a specific circuit example.

第5図は、倍数器内の倍数発生回路と桁上げ保存加算
回路の接続を示す図であり、第5図(その1)と第5図
(その2)は合わせて1の図を構成する。また、同図は
グループ4、グループ5、グループ6の各部分積の部分
についての回路図である。
FIG. 5 is a diagram showing the connection between the multiple generation circuit and the carry save addition circuit in the multiplier, and FIG. 5 (part 1) and FIG. 5 (part 2) together constitute one figure. . FIG. 4 is a circuit diagram of each partial product of groups 4, 5, and 6.

同図において、先に述べた第12図と同一の符号は同一
のものを表わしている。また、30−2は倍数発生回路、
31−2は桁上げ保存加算回路、38は2入力の桁上げ保存
加算器(CSA)を表している。
12, the same reference numerals as those in FIG. 12 described above denote the same components. 30-2 is a multiple generation circuit,
31-2 denotes a carry save adder, and 38 denotes a two-input carry save adder (CSA).

本発明では、桁上げ保存回路31−1内の、bit 6、7
の加算は単一ゲート37により行われ、bit 8、bit 9の加
算は2入力の桁上げ保存加算は2入力の桁上げ保存加算
器で実行され、従来使用する必要のあった3入力の桁上
げ加算器39に比較してハードウエアの削減が図れる。
In the present invention, bits 6 and 7 in the carry storage circuit 31-1 are stored.
Is performed by a single gate 37, the addition of bit 8 and bit 9 is carried out by a two-input carry save adder by a two-input carry-save adder, and a three-input digit that had to be used conventionally. Hardware can be reduced in comparison with the adder 39.

具体的には、本実施例の桁上げ保存回路31−1では、
入力線が6本、ANDゲートが2個、2入力桁上げ保存加
算器が2個あるから合計12ゲートなる。ここでは上位4
ビットについてのみ示したが、以下に続くビットは同じ
ものであるから3ブロックの合計では入力線18本、ゲー
ト数は36個である。この結果を先に第12図で示した従来
の桁上げ保存加算回路のと比較すると、ゲート線で18
本、物量では84ゲートが削減できたことになる。
Specifically, in the carry storage circuit 31-1 of the present embodiment,
Since there are six input lines, two AND gates, and two two-input carry save adders, the total is 12 gates. Here are the top four
Although only the bits are shown, the following bits are the same, so that the total of three blocks has 18 input lines and 36 gates. Comparing this result with that of the conventional carry save and add circuit shown in FIG.
This means that 84 gates could be reduced in terms of quantity and quantity.

第6図は、本発明の一実施例によるデコーダであり、
本デコーダは、第4図に示したデコーダの入出力関係を
示す図の中で、b0−b9までの符号拡張の和を得る回路で
ある。
FIG. 6 is a decoder according to one embodiment of the present invention;
This decoder is a circuit for obtaining the sum of sign extensions from b0 to b9 in the diagram showing the input / output relationship of the decoder shown in FIG.

第6図において、信号+SIGN−EXPAND−bit−0nは符
号拡張の和のn番目のビット値を表わし、nは0〜9の
数値の範囲である。
In FIG. 6, the signal + SIGN-EXPAND-bit-0n represents the n-th bit value of the sum of the sign extension, and n is in the range of 0-9.

同図の回路においては、倍数発生回路の符号拡張部の
信号を入力とし、符号拡張の和をデコーダ出力するもの
であり、該符号拡張の和は、第1図のデコーダ7の出力
となり、複数段で構成される桁上げ保存加算8の後段で
まとめて加算され、加算部の構成が簡単な形となる。
The circuit shown in the figure receives the signal of the sign extension unit of the multiple generation circuit as an input, and outputs the sum of the sign extension as a decoder. The sum of the sign extension becomes the output of the decoder 7 in FIG. The addition is collectively performed at the subsequent stage of the carry save addition 8 composed of stages, so that the configuration of the addition unit is simple.

〔発明の効果〕〔The invention's effect〕

符号拡張部分をすべてデコードし符号の拡張の和を求
めてから、桁上げ保存加算器中の数値データと加算を行
なえばよく、加算の形が簡単化され、かつ、従来の符号
拡張部のデコードされていなかった部分のために必要で
あった回路部と、桁上げ保存加算器への入力線数とを減
らせ、ハードウェアの削減が達成される。
It is sufficient to decode all the sign extension parts and obtain the sum of the sign extension, and then add the numerical data in the carry save adder, thereby simplifying the form of addition and decoding the conventional sign extension part. The number of circuits required for the portion not performed and the number of input lines to the carry save adder can be reduced, and the hardware can be reduced.

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

第1図は本発明の乗算命令方式が適用されるシステム構
成図、 第2図は乗算時の部分積の様子を示す図、 第3図は符号拡張部の具体的な例を示す図、 第4図は本発明による符号拡張部のデコーダの入出力関
係を示す図、 第5図は倍数発生回路と桁上げ保存加算回路の接続を示
す図、 第6図は本発明の一実施例によるデコーダ、 第7図は2ビットのブースのアルゴリズムについて説明
する図、第8図は倍数の符号を示す図、第9図は乗算時
の部分積の様子を示す図、第10図は符号拡張部の具体的
な例を示す図、 第11図は従来例の符号拡張部のデコーダの入出力関係を
示す図、第12図は従来の倍数発生回路と桁上げ保存加算
回路を示す図である。 1−1……被乗数の保持されるレジスタ、1−2……乗
数の保持されるレジスタ、2−1〜2−4……部分乗算
器ブロック、3……被乗数の保持レジスタ、4……部分
乗数の保持レジスタ、5……ブースのアルゴリズムによ
るデコーダ、6……倍数発生回路、7……符号拡張部の
デコーダ、8、12−1、12−2……桁上げ保存加算回
路、9、13−1、13−2、15……桁上げ先見加算回路、
10−1〜10−4……部分乗算器ブロック2−1〜2−4
の結果を保持するレジスタ、11−1〜11−8……レジス
タ10−1〜10−4の内容をビット分割して保持するレジ
スタ、14−1、14−2……結果保持用レジスタ、16……
最終結果保持用のレジスタ、17〜25……各グループの部
分積の数値データ部 26……最終結果の積、27……符号拡張が必要となる部
分、28……グループ4、5、6の部分積の符号拡張部全
体、29……グループ4、5、6の部分積の数値データ
部、30−1、30−2……倍数発生回路、31−1、31−2
……桁上げ保存加算回路、32……グループ6の倍数発生
回路ブロック、33……グループ5の倍数発生回路ブロッ
ク、34……グループ4の倍数発生回路ブロック、35……
AND回路、36……ワイヤードOR回路、37……ゲート回
路、38……2入力の桁上げ保存加算器、39……3入力の
桁上げ保存加算器、40……AND回路
FIG. 1 is a system configuration diagram to which the multiplication instruction system of the present invention is applied, FIG. 2 is a diagram showing a state of a partial product at the time of multiplication, FIG. 3 is a diagram showing a specific example of a sign extension unit, 4 is a diagram showing an input / output relationship of a decoder of a sign extension unit according to the present invention, FIG. 5 is a diagram showing a connection between a multiple generation circuit and a carry save addition circuit, and FIG. 6 is a decoder according to one embodiment of the present invention. FIG. 7 is a diagram for explaining a 2-bit Booth algorithm, FIG. 8 is a diagram showing a code of a multiple, FIG. 9 is a diagram showing a state of a partial product at the time of multiplication, and FIG. FIG. 11 is a diagram showing a specific example, FIG. 11 is a diagram showing an input / output relationship of a decoder of a conventional sign extension unit, and FIG. 12 is a diagram showing a conventional multiple generation circuit and a carry save addition circuit. 1-1 Register holding multiplicand, 1-2 Register holding multiplier, 2-1 to 2-4 partial multiplier block, 3 register holding multiplicand, 4 partial Multiplier holding register, 5: Decoder by Booth's algorithm, 6: Multiple generation circuit, 7: Decoder of sign extension unit, 8, 12-1, 12-2 ... Carry saving and adding circuit, 9, 13 -1, 13-2, 15 ... carry look-ahead addition circuit,
10-1 to 10-4 ... partial multiplier blocks 2-1 to 2-4
, Registers for holding the contents of the registers 10-1 to 10-4 by dividing them into bits, 14-1, 14-2,..., Result holding registers, 16 ......
Register for holding final result, 17 to 25 Numerical data part of partial product of each group 26 Product of final result, 27 Part requiring sign extension, 28 29: Numerical data part of partial products of groups 4, 5, and 6; 30-1, 30-2: multiple generation circuit; 31-1, 31-2
... Carry save addition circuit, 32 ... Multiple generation circuit block of group 6, 33 ... Multiple generation circuit block of group 5, 34 ... Multiple generation circuit block of group 4, 35 ...
AND circuit, 36: Wired OR circuit, 37: Gate circuit, 38: 2-input carry save adder, 39: 3-input carry save adder, 40: AND circuit

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】被乗数を入力とする被乗数レジスタと、乗
数の一部を入力とする乗数レジスタと、該乗数レジスタ
の乗数データをブースのアルゴリズムに従いデコードす
るデコーダと、該デコーダのデコード結果に基づき被乗
数の倍数を演算する倍数発生器と、該倍数発生器から出
力される部分積を入力とする複数段からなる第1の桁上
げ保存加算器と、該桁上げ保存加算器の出力を入力とす
る第1の桁上げ先見加算器とを備えた部分乗算器ブロッ
クを複数個有し、かつ、該部分乗算器ブロックの複数個
の出力結果の全体を加算する第2の桁上げ保存加算器
と、桁上げ保存加算器の出力を入力とする第2の桁上げ
先見加算器とを備えた乗算装置において、 該部分乗算器ブロック中には、倍数発生器から出力され
る倍数の符号拡張部分のすべてをデコードし符号拡張の
和を求めるデコーダを設け、該デコーダの出力結果を第
1の桁上げ保存加算器にて数値データと加算するよう構
成された乗算命令処理方式。
1. A multiplicand register for inputting a multiplicand, a multiplier register for inputting a part of the multiplier, a decoder for decoding multiplier data of the multiplier register according to Booth's algorithm, and a multiplicand based on a decoding result of the decoder. , A first carry save adder comprising a plurality of stages to which the partial product output from the multiple generator is input, and an output of the carry save adder being an input. A second carry save adder having a plurality of partial multiplier blocks each including a first carry look-ahead adder, and adding all of a plurality of output results of the partial multiplier blocks; A multiplying device having a second carry look-ahead adder receiving the output of the carry save adder as an input, wherein in the partial multiplier block, all of the multiple sign extension portions output from the multiple generator are provided. To A multiplication instruction processing method comprising: a decoder for decoding and obtaining a sum of sign extensions; and an output result of the decoder is added to numerical data by a first carry save adder.
JP63171831A 1988-07-12 1988-07-12 Multiplication instruction processing method Expired - Lifetime JP2635696B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63171831A JP2635696B2 (en) 1988-07-12 1988-07-12 Multiplication instruction processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63171831A JP2635696B2 (en) 1988-07-12 1988-07-12 Multiplication instruction processing method

Publications (2)

Publication Number Publication Date
JPH0222733A JPH0222733A (en) 1990-01-25
JP2635696B2 true JP2635696B2 (en) 1997-07-30

Family

ID=15930555

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63171831A Expired - Lifetime JP2635696B2 (en) 1988-07-12 1988-07-12 Multiplication instruction processing method

Country Status (1)

Country Link
JP (1) JP2635696B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2597736B2 (en) * 1990-07-17 1997-04-09 株式会社東芝 Fast multiplier
FR2722590B1 (en) * 1994-07-15 1996-09-06 Sgs Thomson Microelectronics PARALLEL MULTIPLICATION LOGIC CIRCUIT

Also Published As

Publication number Publication date
JPH0222733A (en) 1990-01-25

Similar Documents

Publication Publication Date Title
JP3244506B2 (en) Small multiplier
US5790446A (en) Floating point multiplier with reduced critical paths using delay matching techniques
US5343416A (en) Method and apparatus for re-configuring a partial product reduction tree
JPH0543136B2 (en)
US5010511A (en) Digit-serial linear combining apparatus useful in dividers
US6434586B1 (en) Narrow Wallace multiplier
US5944776A (en) Fast carry-sum form booth encoder
US5734599A (en) Performing a population count using multiplication
US5721697A (en) Performing tree additions via multiplication
US3641331A (en) Apparatus for performing arithmetic operations on numbers using a multiple generating and storage technique
US5497343A (en) Reducing the number of carry-look-ahead adder stages in high-speed arithmetic units, structure and method
US4545028A (en) Partial product accumulation in high performance multipliers
JP2635696B2 (en) Multiplication instruction processing method
US5084834A (en) Digit-serial linear combining apparatus
US8417761B2 (en) Direct decimal number tripling in binary coded adders
US4935892A (en) Divider and arithmetic processing units using signed digit operands
CA2055900C (en) Binary tree multiplier constructed of carry save adders having an area efficient floor plan
JPH076024A (en) Decimal number multiplier
US3462589A (en) Parallel digital arithmetic unit utilizing a signed-digit format
US5416733A (en) Apparatus for finding quotient in a digital system
Bashagha et al. A new digit-serial divider architecture
Takagi Arithmetic unit based on a high-speed multiplier with a redundant-binary addition tree
JP2605792B2 (en) Arithmetic processing unit
JP3433487B2 (en) Binary to decimal converter
GB2337621A (en) Determining a scaling factor